Skip to content

Commit 84b1d6c

Browse files
ukleinekffainelli
authored andcommitted
ARM: dts: bcm2711-rpi: Add pinctrl-based multiplexing for I2C0
BCM2711-based Raspberry Pi boards (4B, CM4 and 400) multiplex the I2C0 controller over two sets of pins, GPIO0+1 and GPIO44+45. The former is exposed on the 40-pin header, while the latter is used for the CSI and DSI connectors. Add a pinctrl-based I2C bus multiplexer to bcm2711-rpi.dtsi to model this multiplexing. The two child buses are named i2c0_0 and i2c0_1. Note that if you modified the dts before to add devices to the i2c bus appearing on pins gpio0 + gpio1 (either directly in the dts or using an overlay), you have to put these into the i2c0_0 node introduced here now. Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://lore.kernel.org/r/20240402000424.4650-8-laurent.pinchart@ideasonboard.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
1 parent f702475 commit 84b1d6c

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,30 @@
1717
pcie0 = &pcie0;
1818
blconfig = &blconfig;
1919
};
20+
21+
i2c0mux: i2c-mux0 {
22+
compatible = "i2c-mux-pinctrl";
23+
#address-cells = <1>;
24+
#size-cells = <0>;
25+
26+
i2c-parent = <&i2c0>;
27+
28+
pinctrl-names = "i2c0", "i2c0-vc";
29+
pinctrl-0 = <&i2c0_gpio0>;
30+
pinctrl-1 = <&i2c0_gpio44>;
31+
32+
i2c0_0: i2c@0 {
33+
reg = <0>;
34+
#address-cells = <1>;
35+
#size-cells = <0>;
36+
};
37+
38+
i2c0_1: i2c@1 {
39+
reg = <1>;
40+
#address-cells = <1>;
41+
#size-cells = <0>;
42+
};
43+
};
2044
};
2145

2246
&firmware {
@@ -49,6 +73,11 @@
4973
clocks = <&firmware_clocks 4>;
5074
};
5175

76+
&i2c0 {
77+
/delete-property/ pinctrl-names;
78+
/delete-property/ pinctrl-0;
79+
};
80+
5281
&rmem {
5382
/*
5483
* RPi4's co-processor will copy the board's bootloader configuration

0 commit comments

Comments
 (0)