bluerobotics / bluerobotics/BlueOS
[Pi 5] i2c conflicts with MIPI
- Dominant language
- Vue
- Stars
- 453
- Forks
- 151
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 174
Description
On the Pi 4, the GPIO pins 22 and 23 map to i2c6 ([ref](https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/README#L2544-L2550)).
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:
https://github.com/bluerobotics/BlueOS/blob/bfbe43a076ff15ecb4888f0c49cb25fce60a0dfe/install/boards/bcm_2712.sh#L58
..and i2c4 is symlinked to i2c3:
https://github.com/bluerobotics/BlueOS/blob/bfbe43a076ff15ecb4888f0c49cb25fce60a0dfe/core/tools/blueos_startup_update/blueos_startup_update.py#L277-L287
---
What can we do about it?
For my testing, I moved the i2c-gpio from `bus=6` to `bus=8`:
```diff
- "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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with install/boards/bcm_2712.sh and core/tools/blueos_startup_update/blueos_startup_update.py, then compare the Pi 5 I2C mappings with the referenced kernel overlay documentation. Evaluate moving the GPIO bus from 6 to 8 without breaking the navigator, I2C symlinks, or MIPI camera use; done means the conflict is resolved and both workflows are verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python, raspberry-pi, shell
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100