On the Pi 4, the GPIO pins 22 and 23 map to i2c6 (ref).
However, on Pi 5:
- The
i2c6 maps to MIPI CAM/DISP0 using sda=38,scl=39.
- The
i2c4 maps to MIPI CAM/DISP1 using sda=40,scl=41.
So if someone tries to use a MIPI camera, it will conflict:
|
"dtoverlay=i2c-gpio,i2c_gpio_sda=22,i2c_gpio_scl=23,bus=6,i2c_gpio_delay_us=0" \ |
..and i2c4 is symlinked to i2c3:
|
def update_i2c4_symlink() -> bool: |
|
logger.info("Running i2c4 symlink update..") |
|
i2c4_symlink = "/dev/i2c-4" |
|
i2c4_device = "/dev/i2c-3" |
|
if os.path.exists(i2c4_symlink): |
|
return False |
|
if not os.path.exists(i2c4_device): |
|
return False |
|
command = f"sudo ln -s {i2c4_device} {i2c4_symlink}" |
|
run_command(command, False) |
|
return False # This patch doesn't require restart to take effect |
What can we do about it?
For my testing, I moved the i2c-gpio from bus=6 to bus=8:
- "dtoverlay=i2c-gpio,i2c_gpio_sda=22,i2c_gpio_scl=23,bus=6,i2c_gpio_delay_us=0" \
+ "dtoverlay=i2c-gpio,i2c_gpio_sda=22,i2c_gpio_scl=23,bus=8,i2c_gpio_delay_us=0" \
The navigator seemed to be working fine, but there might be side effects.
On the Pi 4, the GPIO pins 22 and 23 map to i2c6 (ref).
However, on Pi 5:
i2c6maps to MIPI CAM/DISP0 usingsda=38,scl=39.i2c4maps to MIPI CAM/DISP1 usingsda=40,scl=41.So if someone tries to use a MIPI camera, it will conflict:
BlueOS/install/boards/bcm_2712.sh
Line 58 in bfbe43a
..and i2c4 is symlinked to i2c3:
BlueOS/core/tools/blueos_startup_update/blueos_startup_update.py
Lines 277 to 287 in bfbe43a
What can we do about it?
For my testing, I moved the i2c-gpio from
bus=6tobus=8:The navigator seemed to be working fine, but there might be side effects.