1

I'm using Raspberry PI OS image is 2021-03-04-raspios-buster-armhf-lite and I spotted in the product sheet for the Raspberry PI CM4IO (Compute Module 4 IO board) that it was i2c-10 assigned for the fan.

Certainly seems to be active..

sudo i2cdetect -l
i2c-10  i2c         i2c-11-mux (chan_id 1)              I2C adapter
i2c-1   i2c         bcm2835 (i2c@7e804000)              I2C adapter
i2c-11  i2c         bcm2835 (i2c@7e205000)              I2C adapter
i2c-0   i2c         i2c-11-mux (chan_id 0)              I2C adapter

 i2cdetect -y 10
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- 0c -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 2f
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

I have failed to find any more information via internet searches for this i2c resource... Though the RPI docs seem to point to it being a EMC2301 chipset. https://ww1.microchip.com/downloads/en/DeviceDoc/2301.pdf

Does anyone have any pointers or examples of using the i2c Fan controller on a CM4IO?

Thanks in advance

5
  • This reminds me of the fan built into the PoE hat. It uses the same I2C for control but there it's an AVR with some sort of custom firmware. I got similarly nothing when I tried to find out how that worked in hope of making a cooling fan hat that didn't need PWM. I wish you luck, and maybe this'll give you a lead? Apr 6 at 22:37
  • Thanks. I've discovered the i2C specification I'm just playing with some code to see if I can talk to the EMC2301 chip.. Apr 7 at 8:21
  • Well I’ve read some of the simpler values from the EMC2301 using a Python script. Not yet figured out how to control the fan speed as of yet. Apr 10 at 7:56
  • I this thread, there is an alternative but only for 64-bit OS. raspberrypi.org/forums/viewtopic.php?t=308787 The code and instructions are in the GitHub repo : github.com/neg2led/cm4io-fan Jun 17 at 0:20
  • Right... Have fun with this, it's written in C and based off of drivers and libs made by waveshare. if it cooks stuff, not my problem, but I'd like a video anyway as I think it'll be epic. github.com/Shuudoushi/EMC2301
    – Shuudoushi
    Jun 20 at 21:01
1

I'm in the same state, I'm seeing the i2c interface, and got the same response from the pi. I've tried to dive deeper, but I've found the i2c instance is not very accessible (for non-software engineers, like myself), as it is very low level.

Nevertheless, this is what I've found so far:

  • If no I2C interface is available when running sudo i2cdetect -y 10 (not recognized at all), the I2C interface might need to be enabled with sudo raspi-config --> Interface Options --> I2C --> Enable reference.
  • if you do not see the response of the i2c interface as above when you run sudo i2cdetect -y 10 making some adjustments to your /boot/config.txt might help (add dtparam=i2c_vc=on and comment out dtparam=audio=on): reference
  • Similar thread on can be found here, where it seems that there has been some progress on a Python package by EcometTools (see his comment in the previous link), see GitHub repo
  • Support for the drivers in lm_sensors is not yet implemented, although there seems to be some kernel patch for the EMC2301 out there already made by Reinhard Pfau: linux discussion.

This will be an important feature to enable integrating the CM4 into everyone's prototypes (got to keep things quiet and cool ;) ). Hope this helps, and would really appreciate it when you share the solution if you got it working :).

1

Have found a working solution to the control of the fan controller. User neg2led has created a GitHub project for the kernel driver which includes install instructions here:-

https://github.com/neg2led/cm4io-fan

Please note that this is for 64bit kernels only. I can confirm this works with Ubuntu 21.10 on the CM4IO board.

0

Having the same trouble. Pi4b, bought the Argon40 ssd case with programmable fan, etc. lost the docs but found this the other day.

Curl https://download.argon40.com//argon1.sh l bash Hope this helps.

0

I had the same problem so I made a simple Python wrapper around ecomet_i2c_raspberry_tools for Raspi CM4 IO Board.

Here's the repo: https://github.com/konsou/raspi-cm4-ioboard-fan

It's a work in progress but works on my Pi. Feel free to create issues to the repo if you want something fixed / made easier!

2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – Milliways
    Sep 17 at 0:15
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Sep 17 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.