Sorry for hijacking your thread, but I can’t create new topic. Still, related - I am trying to make GPIO/I2C working with BMP280 sensor. But despite having wiring right, the sensor is not detected. What I do:
I am using GPIO pins 1,3,5,9, to connect VCC, GND, SCL, SDA pins on BMP280.
Then, I do run this:
echo bmp280 0x76 > /sys/class/i2c-adapter/i2c-0/new_device
I do get this in DMESG:
[Thu Mar 27 08:48:32 2025] bmp280 1-0076: supply vddd not found, using dummy regulator
[Thu Mar 27 08:48:32 2025] bmp280 1-0076: supply vdda not found, using dummy regulator
[Thu Mar 27 08:48:32 2025] bmp280 1-0076: GPIO lookup for consumer reset
[Thu Mar 27 08:48:32 2025] bmp280 1-0076: using lookup tables for GPIO lookup
[Thu Mar 27 08:48:32 2025] bmp280 1-0076: No GPIO consumer reset found
[Thu Mar 27 08:48:32 2025] i2c i2c-1: new_device: Instantiated device bmp280 at 0x76
I tried to set the sensor for I2C-1 and I2C-2 as well, and also tried higher memory binding to 0x77. Nothing works. I can’t read the sensor:
root@ap-unimatrix:/usr/src# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Also, scanning I2C-0 spams DMESG by this:
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: ddc failed!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: i2c ack err!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: ddc failed!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: i2c ack err!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: ddc failed!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: i2c ack err!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: ddc failed!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: i2c ack err!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: ddc failed!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: i2c ack err!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: ddc failed!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: i2c ack err!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: ddc failed!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: i2c ack err!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: ddc failed!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: i2c ack err!
[Thu Mar 27 09:36:41 2025] mediatek-hdmi-ddc 11013000.i2c: ddc failed!
As for GPIO Pins being claimed by i2c interfaces, it looks like they are assigned to bogus func1 interface instead:
root@ap-unimatrix:/usr/src# cat /sys/kernel/debug/pinctrl/1000b000.pinctrl/pinmux-pins | grep .i2c
pin 57 (SDA1): 11008000.i2c (GPIO UNCLAIMED) function func1 group SDA1
pin 58 (SCL1): 11008000.i2c (GPIO UNCLAIMED) function func1 group SCL1
pin 75 (SDA0): 11007000.i2c (GPIO UNCLAIMED) function func1 group SDA0
pin 76 (SCL0): 11007000.i2c (GPIO UNCLAIMED) function func1 group SCL0
pin 124 (HDMISCK): 11013000.i2c (GPIO UNCLAIMED) function func1 group HDMISCK
pin 125 (HDMISD): 11013000.i2c (GPIO UNCLAIMED) function func1 group HDMISD
@frank-w Any clue? Any hint on where to look? You’ve experimented with GPIO on this board after all. Do I need DTS overlay to work with I2C?
Note: I am using BPi-R2, not BPi-R2 Pro. So GPIO mapping on Pro variant could be different.