Fan

The phyBOARD-Lyra AM62x includes a 4-pin Hirose connector at X16 for fan connectivity, designed for mounting the fan directly onto the processor heat sink for thermal management. The fan’s 5V power output can be controlled through a general-purpose control signal. When the control signal is set to a low state (0), the fan is powered on. Conversely, setting the control signal to a high state (1) turns off the 5V supply to the fan connector. This guide will demonstrate how to test your connections to the 4-pin Hirose connector at X16. For additional information on phyCORE-AM62x thermal management and fan operation, please refer to the Fan section in the Hardware Manual.

phyCORE-AM62x 1576.1 Fan

Requirements

The phyBOARD-Lyra AM62x does not include a heat sink and fan. The below are the two fans that were tested on the PHYTEC hardware:

Item

Description

Link

Heat Sink

(29mmx29mmx9.5mm)

Digikey link (heat sink)

Fan

DC axial fan, 30mm square x 10mm

Digikey link (fan)

Female Connector

PCB 1576.1 version 4xpin keyed header

Digikey link (female connector for 1576.1)

Female Connector

PCB 1576.2 version 4xpin keyed header

Digikey link (female connector for 1576.2)

Crimping Terminals

4x crimping jackets

Mouser link

phyCORE-AM62x Fan Schematic

Hardware Setup

Connect fan to the 4-pin Hirose connector at X16.

Warning

Please note that the PCB version 1576.1 has a different connector and pin 1 placement than the newer PCB 1576.2 version.

1576.1

1576.2

../_images/pb-07124_fan-closeup-pin1.webp ../_images/pb-07124_fan-2.webp

Enabling the Overlay

  • Power on the development kit and stop in U-boot.

  • Load the device tree overlay required for exporting the GPIO signal that controls the fan and then boot the board.

    phyboard-lyra-am62xx-3:~# setenv overlays k3-am62x-phyboard-lyra-gpio-fan.dtbo
    boot
    

Note

For more information about overlays see chapter Configuring the Bootloader.

  • Verify that the “gpio-fan” was exported properly.

    phyboard-lyra-am62xx-3:~# gpioinfo  | grep gpio-fan
    line  40:       unnamed                 output active-low consumer=gpio-fan
    

Toggling the Fan

  • Turn the fan ON.

    phyboard-lyra-am62xx-3:~# echo 1 > /sys/class/thermal/cooling_device0/cur_state
    
  • Turn the fan OFF.

    phyboard-lyra-am62xx-3:~# echo 0 > /sys/class/thermal/cooling_device0/cur_state
    

Enabling a proper Thermal Governor

If your application includes a GPIO-based fan, PHYTEC recommends enabling the bang-bang thermal governor as the default setting. This governor uses hysteresis to manage fan state transitions, preventing abrupt on/off cycling and enabling smoother control for fans that only support binary on/off operation, rather than variable speed throttling.

Update the current thermal governor strategy to bang-bang using the command below:

phyboard-lyra-am62xx-3:~# echo bang_bang > /sys/class/thermal/thermal_zone0/policy

Note

To enable the bang-bang thermal governor by default, recompile the kernel with CONFIG_THERMAL_DEFAULT_GOV_BANG_BANG=y in the menuconfig configuration. For further details, please refer to the guide: Modify The BSP.