kernel: backport the I2C bus recovery for uDPU
[openwrt/staging/luka.git] / target / linux / mvebu / patches-5.4 / 551-v5.8-arm64-dts-add-uDPU-i2c-bus-recovery.patch
1 From: Russell King <rmk+kernel@armlinux.org.uk>
2 Bcc: linux@mail.armlinux.org.uk
3 Cc: Vladimir Vid <vladimir.vid@sartura.hr>,Jason Cooper <jason@lakedaemon.net>,Andrew Lunn <andrew@lunn.ch>,Gregory Clement <gregory.clement@bootlin.com>,Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,Rob Herring <robh+dt@kernel.org>,Mark Rutland <mark.rutland@arm.com>,linux-arm-kernel@lists.infradead.org,devicetree@vger.kernel.org
4 Subject: [PATCH] arm64: dts: add uDPU i2c bus recovery
5 MIME-Version: 1.0
6 Content-Disposition: inline
7 Content-Transfer-Encoding: 8bit
8 Content-Type: text/plain; charset="utf-8"
9
10 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
11 ---
12 .../boot/dts/marvell/armada-3720-uDPU.dts | 22 +++++++++++++++++--
13 1 file changed, 20 insertions(+), 2 deletions(-)
14
15 diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
16 index 7eb6c1796cef..95d46e8d081c 100644
17 --- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
18 +++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
19 @@ -117,18 +117,36 @@
20 };
21 };
22
23 +&pinctrl_nb {
24 + i2c1_recovery_pins: i2c1-recovery-pins {
25 + groups = "i2c1";
26 + function = "gpio";
27 + };
28 +
29 + i2c2_recovery_pins: i2c2-recovery-pins {
30 + groups = "i2c2";
31 + function = "gpio";
32 + };
33 +};
34 +
35 &i2c0 {
36 status = "okay";
37 - pinctrl-names = "default";
38 + pinctrl-names = "default", "recovery";
39 pinctrl-0 = <&i2c1_pins>;
40 + pinctrl-1 = <&i2c1_recovery_pins>;
41 /delete-property/mrvl,i2c-fast-mode;
42 + scl-gpios = <&gpionb 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
43 + sda-gpios = <&gpionb 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
44 };
45
46 &i2c1 {
47 status = "okay";
48 - pinctrl-names = "default";
49 + pinctrl-names = "default", "recovery";
50 pinctrl-0 = <&i2c2_pins>;
51 + pinctrl-1 = <&i2c2_recovery_pins>;
52 /delete-property/mrvl,i2c-fast-mode;
53 + scl-gpios = <&gpionb 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
54 + sda-gpios = <&gpionb 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
55
56 lm75@48 {
57 status = "okay";
58 --
59 2.20.1
60