1 From 393b01ee7330723b5f27b86d1b03bed88f8a8ffa Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 9 Apr 2020 17:26:13 +0100
4 Subject: [PATCH] dt: Update all mainline bcm283x dt files for i2c0
7 BSC0 (aka i2c0) can me muxed via pinctrl to GPIOs 0&1, 28&29, or
8 44&45. These have different uses based on the platform (40pin header,
9 and CSI/DSI connectors), so add a pinctrl I2C mux between the
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
14 arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 5 +++++
15 arch/arm/boot/dts/bcm2835-rpi-a.dts | 7 +++++++
16 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 5 +++++
17 arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 7 +++++++
18 arch/arm/boot/dts/bcm2835-rpi-b.dts | 7 +++++++
19 arch/arm/boot/dts/bcm2835-rpi-cm1-io1.dts | 5 +++++
20 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 5 +++++
21 arch/arm/boot/dts/bcm2835-rpi-zero.dts | 5 +++++
22 arch/arm/boot/dts/bcm2835-rpi.dtsi | 10 +++++++---
23 arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 5 +++++
24 arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts | 5 +++++
25 arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 5 +++++
26 arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 5 +++++
27 arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts | 5 +++++
28 14 files changed, 78 insertions(+), 3 deletions(-)
30 --- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
31 +++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
33 pinctrl-0 = <&uart0_gpio14>;
37 +/* i2c on camera/display connector is gpio 28&29 */
39 + pinctrl-1 = <&i2c0_gpio28>;
41 --- a/arch/arm/boot/dts/bcm2835-rpi-a.dts
42 +++ b/arch/arm/boot/dts/bcm2835-rpi-a.dts
44 pinctrl-0 = <&uart0_gpio14>;
48 +/* i2c0 on camera/display connector is gpio 0&1. Not exposed on header.
49 + * To avoid having to remap everything, map both ports to gpios 0&1
52 + pinctrl-1 = <&i2c0_gpio0>;
54 --- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
55 +++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
57 pinctrl-0 = <&uart0_gpio14>;
61 +/* i2c on camera/display connector is gpio 28&29 */
63 + pinctrl-1 = <&i2c0_gpio28>;
65 --- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
66 +++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
68 pinctrl-0 = <&uart0_gpio14>;
72 +/* i2c0 on camera/display connector is gpio 0&1. Not exposed on header.
73 + * To avoid having to remap everything, map both ports to gpios 0&1
76 + pinctrl-1 = <&i2c0_gpio0>;
78 --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
79 +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
81 pinctrl-0 = <&uart0_gpio14>;
85 +/* camera/display connector use BSC1 on GPIOS 2&3.
86 + * To avoid having to remap everything, map both ports to gpios 0&1
89 + pinctrl-1 = <&i2c0_gpio0>;
91 --- a/arch/arm/boot/dts/bcm2835-rpi-cm1-io1.dts
92 +++ b/arch/arm/boot/dts/bcm2835-rpi-cm1-io1.dts
94 pinctrl-0 = <&uart0_gpio14>;
98 +/* WHAT TO DO HERE? */
100 + pinctrl-1 = <&i2c0_gpio28>;
102 --- a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
103 +++ b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
105 pinctrl-0 = <&uart1_gpio14>;
109 +/* i2c on camera/display connector is gpio 28&29 */
111 + pinctrl-1 = <&i2c0_gpio28>;
113 --- a/arch/arm/boot/dts/bcm2835-rpi-zero.dts
114 +++ b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
116 pinctrl-0 = <&uart0_gpio14>;
120 +/* i2c on camera/display connector is gpio 28&29 */
122 + pinctrl-1 = <&i2c0_gpio28>;
124 --- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
125 +++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
131 - pinctrl-names = "default";
132 - pinctrl-0 = <&i2c0_gpio0>;
135 clock-frequency = <100000>;
139 + pinctrl-0 = <&i2c0_gpio0>;
140 + /* pinctrl-1 varies based on platform */
145 pinctrl-names = "default";
146 pinctrl-0 = <&i2c1_gpio2>;
147 --- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
148 +++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
150 pinctrl-0 = <&uart0_gpio14>;
154 +/* i2c on camera/display connector is gpio 28&29 */
156 + pinctrl-1 = <&i2c0_gpio28>;
158 --- a/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
159 +++ b/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
161 pinctrl-0 = <&uart1_gpio14>;
165 +/* i2c on camera/display connector is gpio 44&45 */
167 + pinctrl-1 = <&i2c0_gpio44>;
169 --- a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
170 +++ b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
172 pinctrl-0 = <&uart1_gpio14>;
176 +/* i2c on camera/display connector is gpio 44&45 */
178 + pinctrl-1 = <&i2c0_gpio44>;
180 --- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
181 +++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
187 +/* i2c on camera/display connector is gpio 44&45 */
189 + pinctrl-1 = <&i2c0_gpio44>;
191 --- a/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts
192 +++ b/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts
194 pinctrl-0 = <&uart0_gpio14>;
198 +/* WHAT TO DO HERE? */
200 + pinctrl-1 = <&i2c0_gpio28>;