1 From 911dedf3f51adf8cfd6554af1c89c922c4453889 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Mon, 24 Apr 2023 16:27:57 +0100
4 Subject: [PATCH] dtoverlays: Add overrides for alternate i2c buses to
7 The i2c-mux overlay was fixed to i2c-1. Add overrides to allow
8 it to be assigned to alternate buses.
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 arch/arm/boot/dts/overlays/README | 16 ++++++++
13 .../arm/boot/dts/overlays/i2c-mux-overlay.dts | 40 +++++++++++++++++--
14 2 files changed, 53 insertions(+), 3 deletions(-)
16 --- a/arch/arm/boot/dts/overlays/README
17 +++ b/arch/arm/boot/dts/overlays/README
18 @@ -1833,6 +1833,22 @@ Params: pca9542 Select t
20 addr Change I2C address of the device (default 0x70)
22 + i2c0 Choose the I2C0 bus on GPIOs 0&1
24 + i2c_csi_dsi Choose the I2C0 bus on GPIOs 44&45
26 + i2c3 Choose the I2C3 bus (configure with the i2c3
27 + overlay - BCM2711 only)
29 + i2c4 Choose the I2C3 bus (configure with the i2c3
30 + overlay - BCM2711 only)
32 + i2c5 Choose the I2C5 bus (configure with the i2c4
33 + overlay - BCM2711 only)
35 + i2c6 Choose the I2C6 bus (configure with the i2c6
36 + overlay - BCM2711 only)
39 [ The i2c-mux-pca9548a overlay has been deleted. See i2c-mux. ]
41 --- a/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts
42 +++ b/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts
44 compatible = "brcm,bcm2835";
47 - target = <&i2c_arm>;
56 - target = <&i2c_arm>;
65 - target = <&i2c_arm>;
74 + frag100: fragment@100 {
75 + target = <&i2c_arm>;
76 + i2cbus: __overlay__ {
89 + target = <&i2c0mux>;
99 addr = <&pca9542>,"reg:0",
103 + i2c0 = <&frag100>, "target:0=",<&i2c0>,
105 + i2c_csi_dsi = <&frag100>, "target:0=",<&i2c_csi_dsi>,
107 + i2c3 = <&frag100>, "target?=0",
108 + <&frag100>, "target-path=i2c3";
109 + i2c4 = <&frag100>, "target?=0",
110 + <&frag100>, "target-path=i2c4";
111 + i2c5 = <&frag100>, "target?=0",
112 + <&frag100>, "target-path=i2c5";
113 + i2c6 = <&frag100>, "target?=0",
114 + <&frag100>, "target-path=i2c6";