-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Please add MCP9808 sensor support to i2c-sensor dtoverlay list #5234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
Done - see ac4cf1b. GitHub doesn't allow the creation of arbitrary sections, and requesting additions via the Issues page works for us. |
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
Cool, I just did not want to post the requests the wrong way or such. I should be able to test MCP9808 sensor first thing tomorrow, once I get the update. |
Is this update published yet? Ran rpi-update on a Pi4, then added dtoverlay=i2c-sensor,mcp980x,addr=0x18 to /boot/config.txt, and rebooted, but did not see the typical UU on i2c-detect -y 1 scan? Shows 18 as address rather than UU. |
Not yet - the last update was on Monday. You can see the release history here: https://github.com/raspberrypi/rpi-firmware/commits/master |
Excellent, that is going to be a book mark! Thanks. |
See: https://forums.raspberrypi.com/viewtopic.php?p=2051557#p2051557 kernel: overlays: pisound: Make button pins owned by card See: raspberrypi/linux#5235 kernel: overlays: i2c-sensor: Add mcp980x support See: raspberrypi/linux#5234
See: https://forums.raspberrypi.com/viewtopic.php?p=2051557#p2051557 kernel: overlays: pisound: Make button pins owned by card See: raspberrypi/linux#5235 kernel: overlays: i2c-sensor: Add mcp980x support See: raspberrypi/linux#5234
rpi-update contains this now. |
Excellent! Yup, now see kernel/dtoverlay control of the sensor, i.e. UU in i2c address slot (0x18) in the i2c detect result. |
Odd... the direct query of temp1_input under kernel/dtoverlay... the result is '62' which does not make sense. So I pulled the sample test script from Adafruit, and after loading the dependencies, and running the simple test, the results were as expected. # cd /root # cd examples The dtoverlay just provides visibility to the native kernel support, right? Thus, I am not sure this is Raspberry Pi issue to solve, but documented here to illustrate there seems to be an issue with the existing kernel support for MCP9808 sensor. |
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
Ah, thanks! Look forward to testing. |
Oh dear. The I'll add a |
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: #5234 Signed-off-by: Phil Elwell <[email protected]>
41d7f47 is the update to the overlay. To save you waiting for the next build you can download a patched overlay here: https://drive.google.com/file/d/1eWeA3oRhVTrYI1Y57HLoXzy_dhXmQOd8/view?usp=share_link Just |
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
Wow, I pulled the C source for the support of the MCP9808, but have not had time to review it as yet. Interesting. First test is odd, after reboot... # cat /sys/devices/platform/soc/fe804000.i2c/i2c-1/1-0018/hwmon/hwmon2/temp1_input Look like the changes are flooding blasting the i2c bus? I set boot/config.txt to... dtoverlay=i2c-sensor,jc42 I pulled the VCC from the sensor, to reset it, and then got... # i2cdetect -y 1 Not sure where 0x68 is coming from, I only have 1 device on the i2c bus. But still can seem to read the sensor right... # cat /sys/devices/platform/soc/fe804000.i2c/i2c-1/1-0018/hwmon/hwmon2/temp1_input Of course if I use the python script... # python3 simpletest.py |
Did one more reboot... And the phantom 0x68 is gone, and i2c detect scan clear... # i2cdetect -y 1
But the sensor read is still not right... # cat /sys/devices/platform/soc/fe804000.i2c/i2c-1/1-0018/hwmon/hwmon2/temp1_input |
You need to remove the usage of |
Testing now... just with the 'dtoverlay=i2c-sensor,jc42' or 'dtoverlay=i2c-sensor,jc42,addr=0x18' the typical UU is not present, just the raw address of 0x18. So, does not appear the kernel has control or access to the sensor. # ls -l /sys/devices/platform/soc/fe804000.i2c/i2c-1/1-0018/ There is not temp1_input file, so can't query for temperature via CLI. But, clearly the jc42 driver loaded... # cat /sys/devices/platform/soc/fe804000.i2c/i2c-1/1-0018/name What is interesting,is the mcp9808 is show as compatible. Required properties:
microchip,mcp9808 |
But looking at the actual kernel patch for JEDEC? They don't list the MCP9808...
So I wonder if the actual kernel patch is missing what is otherwise documented? I only see references to the MCP9805. The cool thing is the since you added the JEDEC compatibles that adds a lot of additional sensors to the pool. :) But we don't have the one i need working quite yet. |
I don't have a Pi setup to execute C source correctly, and I have little experience with C in Linux, versus on Macintosh and PC. If I can setup a C environment, but that would be the actual proof, to run the raw C code that the kernel has, right? |
Yup... { MCP_MANID, MCP9808_DEVID, MCP9808_DEVID_MASK }, That is good then, I am trying to brute force load the driver. THAT WORKED! # modprobe jc42 # cat /sys/devices/platform/soc/fe804000.i2c/i2c-1/1-0018/hwmon/hwmon2/temp1_input So is what I did above not basically what the overlay is going to do? |
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: #5234 Signed-off-by: Phil Elwell <[email protected]>
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: #5234 Signed-off-by: Phil Elwell <[email protected]>
commit daecda9b2a297ee2cfd68ac5faeefe906aef1b38 from https://github.com/raspberrypi/linux.git rpi-6.1.y See: raspberrypi/linux#5234 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Meng Li <[email protected]>
commit 73e4a8820aefb39a814d2d715d70df2703e747ff from https://github.com/raspberrypi/linux.git rpi-6.1.y This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: raspberrypi/linux#5234 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Meng Li <[email protected]>
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: #5234 Signed-off-by: Phil Elwell <[email protected]>
commit daecda9b2a297ee2cfd68ac5faeefe906aef1b38 from https://github.com/raspberrypi/linux.git rpi-6.1.y See: raspberrypi/linux#5234 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Meng Li <[email protected]>
commit 73e4a8820aefb39a814d2d715d70df2703e747ff from https://github.com/raspberrypi/linux.git rpi-6.1.y This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: raspberrypi/linux#5234 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Meng Li <[email protected]>
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: #5234 Signed-off-by: Phil Elwell <[email protected]>
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: #5234 Signed-off-by: Phil Elwell <[email protected]>
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: #5234 Signed-off-by: Phil Elwell <[email protected]>
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: #5234 Signed-off-by: Phil Elwell <[email protected]>
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: #5234 Signed-off-by: Phil Elwell <[email protected]>
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: #5234 Signed-off-by: Phil Elwell <[email protected]>
See: #5234 Signed-off-by: Phil Elwell <[email protected]>
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: #5234 Signed-off-by: Phil Elwell <[email protected]>
commit 4177cf92eca72c4c84a2dda2dc9197b78ba7d982 from https://github.com/raspberrypi/linux.git rpi-6.1.y See: raspberrypi/linux#5234 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Meng Li <[email protected]>
commit d74bac6d7d54bab21b1f434a4697285dd5cfe058 from https://github.com/raspberrypi/linux.git rpi-6.1.y This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: raspberrypi/linux#5234 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Meng Li <[email protected]>
commit 4177cf92eca72c4c84a2dda2dc9197b78ba7d982 from https://github.com/raspberrypi/linux.git rpi-6.1.y See: raspberrypi/linux#5234 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Meng Li <[email protected]>
commit d74bac6d7d54bab21b1f434a4697285dd5cfe058 from https://github.com/raspberrypi/linux.git rpi-6.1.y This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: raspberrypi/linux#5234 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Meng Li <[email protected]>
See: raspberrypi#5234 Signed-off-by: Phil Elwell <[email protected]>
This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: raspberrypi#5234 Signed-off-by: Phil Elwell <[email protected]>
Describe the bug
Not a bug but a support request. Please add MCP9808 sensor support to i2c-sensor dtoverlay list. As I understand it, this sensor already is supported by the Linux kernel? Thanks.
Steps to reproduce the behaviour
NA
Device (s)
Other
System
Latest Raspberry Pi firmware image (or so I believe what is how support is implemented).
Logs
No response
Additional context
Just a suggestion but maybe setup a sub section on github under the Raspberry Pi area for such requests?
The text was updated successfully, but these errors were encountered: