ad65de2f523d777c351d5fd9639ebea66fa7e06e
[openwrt/staging/pepe2k.git] /
1 From 4f11095a4ae00b2fe4cebb21e36ee37cc62f5e1a Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <kabel@kernel.org>
3 Date: Mon, 1 Jul 2024 13:30:09 +0200
4 Subject: [PATCH 07/11] ARM: dts: turris-omnia: Add MCU system-controller node
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Turris Omnia's MCU provides various features that can be configured over
10 I2C at address 0x2a. Add device-tree node.
11
12 This does not carry a Fixes tag - we do not want this to get backported
13 to stable kernels for the following reason: U-Boot since v2022.10
14 inserts a phy-reset-gpio property into the WAN ethernet node pointing to
15 the MCU node if it finds the MCU node with a cznic,turris-omnia-mcu
16 compatible. Thus if this change got backported to a stable kernel, the
17 WAN interface driver would defer probe indefinitely (since it would wait
18 for the turris-omnia-mcu driver which would not be present).
19
20 Signed-off-by: Marek BehĂșn <kabel@kernel.org>
21 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
22 Reviewed-by: Andy Shevchenko <andy@kernel.org>
23 Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
24 Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
25 Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
26 Link: https://lore.kernel.org/r/20240701113010.16447-8-kabel@kernel.org
27 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
28 ---
29 .../dts/marvell/armada-385-turris-omnia.dts | 22 ++++++++++++++++++-
30 1 file changed, 21 insertions(+), 1 deletion(-)
31
32 --- a/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
33 +++ b/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
34 @@ -218,7 +218,22 @@
35 #size-cells = <0>;
36 reg = <0>;
37
38 - /* STM32F0 command interface at address 0x2a */
39 + mcu: system-controller@2a {
40 + compatible = "cznic,turris-omnia-mcu";
41 + reg = <0x2a>;
42 +
43 + pinctrl-names = "default";
44 + pinctrl-0 = <&mcu_pins>;
45 +
46 + interrupt-parent = <&gpio1>;
47 + interrupts = <11 IRQ_TYPE_NONE>;
48 +
49 + gpio-controller;
50 + #gpio-cells = <3>;
51 +
52 + interrupt-controller;
53 + #interrupt-cells = <2>;
54 + };
55
56 led-controller@2b {
57 compatible = "cznic,turris-omnia-leds";
58 @@ -503,6 +518,11 @@
59 };
60
61 &pinctrl {
62 + mcu_pins: mcu-pins {
63 + marvell,pins = "mpp43";
64 + marvell,function = "gpio";
65 + };
66 +
67 pcawan_pins: pcawan-pins {
68 marvell,pins = "mpp46";
69 marvell,function = "gpio";