Fan

The phyBOARD-Electra AM64x includes a 4-pin Hirose connector at X12 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 X12. For additional information on phyCORE-AM64x thermal management and fan operation, please refer to the Fan section in the Hardware Manual.

phyCORE-AM64x Fan Location

Requirements

The phyBOARD-Electra AM64x 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

4 pin keyed header

Digikey link (female connector)

Crimping Terminals

4x crimping jackets

Mouser link

phyCORE-AM64x (1566.1) Fan Schematic

Hardware Setup

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

phyCORE-AM64x Fan Pin 1 Location

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.

    sh-uboot:~# setenv overlays k3-am642-phyboard-electra-gpio-fan.dtbo
    sh-uboot:~# boot
    

Note

For more information about overlays see chapter Configuring the Bootloader.

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

    sh-phyboard-electra-am64xx-2:~# gpioinfo  | grep gpio-fan
    line  40:       unnamed                 output active-low consumer=gpio-fan
    

Toggling the Fan

  • Turn the fan ON.

    sh-phyboard-electra-am64xx-2:~# echo 1 > /sys/class/thermal/cooling_device0/cur_state
    
  • Turn the fan OFF.

    sh-phyboard-electra-am64xx-2:~# 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:

sh-phyboard-electra-am64xx-2:~# 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.