I am on a custom board using an i.MX6. I am using Yocto (Pyro) to build my kernel (4.14.16).
I am using the generic imx6qdl.dtsi device tree entry for PWM2 to drive the fan and it appears to work fine. The fan has a Tachometer input, which is connected to GPIO2_7. How do I read the fan speed? I have seen device tree blobs for cooling devices, but none of the examples I found have a tachometer input to monitor the fan's speed.
解決済! 解決策の投稿を見る。
Hi Allen
seems most simple is to configure gpio interrupt and measure tachometer period.
Other option may be using GPT, if there is iomux option for that (may be checked in
IOMUX Chapter of Reference Manual).
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Allen
seems most simple is to configure gpio interrupt and measure tachometer period.
Other option may be using GPT, if there is iomux option for that (may be checked in
IOMUX Chapter of Reference Manual).
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
This works, and I have a prototype (and extremely ugly) program that can read it. I was hoping for a device tree solution, but there doesn't appear to be one. It just boggles my mind that in 2019 there isn't a fan driver.