diff options
author | Uwe Kleine-König <uwe@kleine-koenig.org> | 2024-04-02 02:04:14 +0200 |
---|---|---|
committer | Florian Fainelli <florian.fainelli@broadcom.com> | 2024-04-04 18:49:35 +0200 |
commit | 84b1d6cc3e4cc49f04aaacc5e0094c221a772cf0 (patch) | |
tree | 9dfbef0bd908bf42e2b1644833ff8133c04bf01e /arch/arm/boot/dts/broadcom | |
parent | ARM: dts: bcm2835-rpi: Move duplicate firmware-clocks to bcm2835-rpi.dtsi (diff) | |
download | linux-84b1d6cc3e4cc49f04aaacc5e0094c221a772cf0.tar.xz linux-84b1d6cc3e4cc49f04aaacc5e0094c221a772cf0.zip |
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>
Diffstat (limited to 'arch/arm/boot/dts/broadcom')
-rw-r--r-- | arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi b/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi index 86188eabeb24..6bf4241fe3b7 100644 --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi @@ -17,6 +17,30 @@ pcie0 = &pcie0; blconfig = &blconfig; }; + + i2c0mux: i2c-mux0 { + compatible = "i2c-mux-pinctrl"; + #address-cells = <1>; + #size-cells = <0>; + + i2c-parent = <&i2c0>; + + pinctrl-names = "i2c0", "i2c0-vc"; + pinctrl-0 = <&i2c0_gpio0>; + pinctrl-1 = <&i2c0_gpio44>; + + i2c0_0: i2c@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c0_1: i2c@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; }; &firmware { @@ -49,6 +73,11 @@ clocks = <&firmware_clocks 4>; }; +&i2c0 { + /delete-property/ pinctrl-names; + /delete-property/ pinctrl-0; +}; + &rmem { /* * RPi4's co-processor will copy the board's bootloader configuration |