Fan Control - Apalis iMX6, IXORA Carrier Board

on Apalis T30 and Ixora carrier board, we can connect a FAN to header X6 of Ixora and then we can control the pin number “129” to turn it on and off.
It clearly has mentioned in GPIO (Linux) page.

I’m just wondering if we can do the same for controlling the FAN on Apalis iMX6 module and Ixora when a FAN is connected to X6 Header!
If yes, what is the pin number to control?

if not, can you please advise what is the best approach to control a FAN, can we use header X6 at all?

Is there any particular reason for you to set this question on private? With private questions there is no way for the community to provide feedback or profit from any feedback.

According to the Apalis iMX6 data sheet page 13 Apalis GPIO8 which controls the fan on Ixora is the i.MX 6 ball GPIO06 which according to the following article would be number 6. So you may enable the fan as follows:

root@apalis-imx6:~# echo high > /sys/class/gpio/gpio6/direction

You are very welcome.

May I put this question to public for others to be able to see?

I just did that before to make the GPIO6 High and got no result!!!
After you approved that the pin is “6”, I double checked and have found that my fan GND and +5 had pinned wrongly.

Fixed that and it works just fine.
Thank you.

of course mate…

Thanks, sir.

Hello all,
I have created a GITHUB repository holding a setup and configuration for CPU Temperature Based FAN Control for Apalis T30 and iMX6.

On above mentioned repository, there are two subfolders for each module which create a deb package for easy installation, then runs it as service to control the FAN connected to header X6.
The configuration can be changed base on your requirements. Please visit the GITHUB page and readme file for more details.

If you are using Domotics for your Automation system, Apalis T30 one also has a function to report and update the virtual sensor in Domotics.

Hope you find it useful.

As the /sys interface is deprecated, how is the correct call to “gpioset” to enable the fan?
I just can’t figure out the correct chip and pin number for the fan.

Thank you.

Hi @kkettinger ,

if you’re using Apalis iMX6 as well it should be GPIO8 for the fan-control.

Give this a try and let us know if it worked.

Best Regards

Hi @kevin.tx,

i finally figured it out.

Looking at /sys/kernel/debug/gpio, i can find “GPIO8” is unter gpio chip 0/6:

gpiochip0: GPIOs 0-31, parent: platform/209c000.gpio, 209c000.gpio:
 gpio-0   (MXM3_84             |regulator-usb-host-v) out hi
 gpio-1   (MXM3_4              )
 gpio-2   (MXM3_15/GPIO7       |regulator-pcie-switc) out lo
 gpio-3   (MXM3_96             )
 gpio-4   (MXM3_37             |Wake-Up             ) in  hi IRQ ACTIVE LOW
 gpio-5   (                    )
 gpio-6   (MXM3_17/GPIO8       |sysfs               ) in  lo
 gpio-7   (MXM3_14             )
 gpio-8   (MXM3_12             )
 gpio-9   (MXM3_2              )
 gpio-10  (MXM3_184            )
 gpio-11  (MXM3_180            )
 gpio-12  (MXM3_178            )
 gpio-13  (MXM3_176            )
 gpio-14  (MXM3_188            )
 gpio-15  (MXM3_186            )
 gpio-16  (MXM3_160            )
 gpio-17  (MXM3_162            )
 gpio-18  (MXM3_150            )
 gpio-19  (MXM3_144            )
 gpio-20  (MXM3_154            )
 gpio-21  (MXM3_146            )
 gpio-22  (                    )
 gpio-23  (                    )
 gpio-24  (MXM3_72             )
 gpio-25  (                    |phy-reset           ) out hi

But it was already used by sysfs. There was an recipe shipped with meta-toradex-bsp-common called “gpio-export” which was pulled in by the package group “packagegroup-machine-tdx-cli_apalis-imx6”:

RRECOMMENDS_packagegroup-machine-tdx-cli_apalis-imx6 = "\
    bmode-usb \
    gpio-export \

If i disable this recipe (or just remove it on the system with systemctl disable gpio-export + reboot), the gpio is unused and i can enable it with:

gpioset 0 6=1

Best regards,

Hi Kevin,

Thank you for sharing the information.

Glad that you managed to succeed.

Best Regards