Skip to content

Commit 36faab6

Browse files
committed
dts: bcm2712-rpi: Add aliases for the CSI/DSI I2Cs
Older Pis arrange that the camera I2C ports appear as /dev/i2c-10. Add aliases so that on the Pi 5 family, i2c_csi_dsi0 becomes i2c-10 and i2c_csi_dsi1 becomes i2c-11. Only the I2C buses that appear on the 40-pin header, i.e. I2C0 to I2C3, get a low bus number. Also add hints for our udev rules about which symlinks to create for backwards-compatibility with the previous bus numbers. Note that lower numbers have priority, so i2c-0 on CM5 masks i2c-11, forcing i2c-11 to be a symlink to i2c-0, not vice versa. Signed-off-by: Phil Elwell <[email protected]>
1 parent 18d1851 commit 36faab6

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,14 @@ i2c_csi_dsi0: &i2c6 { // Note: This is for MIPI0 connector only
255255
pinctrl-0 = <&rp1_i2c6_38_39>;
256256
pinctrl-names = "default";
257257
clock-frequency = <100000>;
258+
symlink = "i2c-6";
258259
};
259260

260261
i2c_csi_dsi1: &i2c4 { // Note: This is for MIPI1 connector only
261262
pinctrl-0 = <&rp1_i2c4_40_41>;
262263
pinctrl-names = "default";
263264
clock-frequency = <100000>;
265+
symlink = "i2c-4";
264266
};
265267

266268
i2c_csi_dsi: &i2c_csi_dsi1 { }; // An alias for compatibility

arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,11 @@ i2c_csi_dsi0: &i2c6 { // Note: This is for MIPI0 connector only
238238
pinctrl-0 = <&rp1_i2c6_38_39>;
239239
pinctrl-names = "default";
240240
clock-frequency = <100000>;
241+
symlink = "i2c-6";
241242
};
242243

243244
i2c_csi_dsi1: &i2c0 { // Note: This is for MIPI1 connector
245+
symlink = "i2c-11";
244246
};
245247

246248
i2c_csi_dsi: &i2c_csi_dsi1 { }; // An alias for compatibility

arch/arm64/boot/dts/broadcom/bcm2712-rpi.dtsi

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,11 @@
117117
i2c = &i2c_arm;
118118
i2c0 = &i2c0;
119119
i2c1 = &i2c1;
120-
i2c10 = &i2c_rp1boot;
121120
i2c2 = &i2c2;
122121
i2c3 = &i2c3;
123-
i2c4 = &i2c4;
124-
i2c5 = &i2c5;
125-
i2c6 = &i2c6;
122+
i2c10 = &i2c_csi_dsi0;
123+
i2c11 = &i2c_csi_dsi1;
124+
i2c12 = &i2c_rp1boot;
126125
mailbox = &mailbox;
127126
mmc0 = &sdio1;
128127
serial0 = &uart0;

0 commit comments

Comments
 (0)