]> git.ipfire.org Git - thirdparty/openwrt.git/blob
4d6d8e82c2e4beb3b5a4af65f58ca4d2e05c9461
[thirdparty/openwrt.git] /
1 From cdfed4d05780450817ef96567e2cd8d355ca9e70 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:03 +0200
4 Subject: [PATCH 01/11] dt-bindings: firmware: add cznic,turris-omnia-mcu
5 binding
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Add binding for cznic,turris-omnia-mcu, the device-tree node
11 representing the system-controller features provided by the MCU on the
12 Turris Omnia router.
13
14 Signed-off-by: Marek BehĂșn <kabel@kernel.org>
15 Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
16 Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
17 Reviewed-by: Andy Shevchenko <andy@kernel.org>
18 Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
19 Link: https://lore.kernel.org/r/20240701113010.16447-2-kabel@kernel.org
20 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
21 ---
22 .../firmware/cznic,turris-omnia-mcu.yaml | 86 +++++++++++++++++++
23 MAINTAINERS | 1 +
24 2 files changed, 87 insertions(+)
25 create mode 100644 Documentation/devicetree/bindings/firmware/cznic,turris-omnia-mcu.yaml
26
27 --- /dev/null
28 +++ b/Documentation/devicetree/bindings/firmware/cznic,turris-omnia-mcu.yaml
29 @@ -0,0 +1,86 @@
30 +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
31 +%YAML 1.2
32 +---
33 +$id: http://devicetree.org/schemas/firmware/cznic,turris-omnia-mcu.yaml#
34 +$schema: http://devicetree.org/meta-schemas/core.yaml#
35 +
36 +title: CZ.NIC's Turris Omnia MCU
37 +
38 +maintainers:
39 + - Marek BehĂșn <kabel@kernel.org>
40 +
41 +description:
42 + The MCU on Turris Omnia acts as a system controller providing additional
43 + GPIOs, interrupts, watchdog, system power off and wakeup configuration.
44 +
45 +properties:
46 + compatible:
47 + const: cznic,turris-omnia-mcu
48 +
49 + reg:
50 + description: MCU I2C slave address
51 + maxItems: 1
52 +
53 + interrupts:
54 + maxItems: 1
55 +
56 + interrupt-controller: true
57 +
58 + '#interrupt-cells':
59 + const: 2
60 + description: |
61 + The first cell specifies the interrupt number (0 to 63), the second cell
62 + specifies interrupt type (which can be one of IRQ_TYPE_EDGE_RISING,
63 + IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_EDGE_BOTH).
64 + The interrupt numbers correspond sequentially to GPIO numbers, taking the
65 + GPIO banks into account:
66 + IRQ number GPIO bank GPIO pin within bank
67 + 0 - 15 0 0 - 15
68 + 16 - 47 1 0 - 31
69 + 48 - 63 2 0 - 15
70 + There are several exceptions:
71 + IRQ number meaning
72 + 11 LED panel brightness changed by button press
73 + 13 TRNG entropy ready
74 + 14 ECDSA message signature computation done
75 +
76 + gpio-controller: true
77 +
78 + '#gpio-cells':
79 + const: 3
80 + description:
81 + The first cell is bank number (0, 1 or 2), the second cell is pin number
82 + within the bank (0 to 15 for banks 0 and 2, 0 to 31 for bank 1), and the
83 + third cell specifies consumer flags.
84 +
85 +required:
86 + - compatible
87 + - reg
88 + - interrupts
89 + - interrupt-controller
90 + - gpio-controller
91 +
92 +additionalProperties: false
93 +
94 +examples:
95 + - |
96 + #include <dt-bindings/interrupt-controller/irq.h>
97 +
98 + i2c {
99 + #address-cells = <1>;
100 + #size-cells = <0>;
101 +
102 + system-controller@2a {
103 + compatible = "cznic,turris-omnia-mcu";
104 + reg = <0x2a>;
105 +
106 + interrupt-parent = <&gpio1>;
107 + interrupts = <11 IRQ_TYPE_NONE>;
108 +
109 + gpio-controller;
110 + #gpio-cells = <3>;
111 +
112 + interrupt-controller;
113 + #interrupt-cells = <2>;
114 + };
115 + };
116 --- a/MAINTAINERS
117 +++ b/MAINTAINERS
118 @@ -2104,6 +2104,7 @@ F: Documentation/ABI/testing/sysfs-bus-m
119 F: Documentation/ABI/testing/sysfs-firmware-turris-mox-rwtm
120 F: Documentation/devicetree/bindings/bus/moxtet.txt
121 F: Documentation/devicetree/bindings/firmware/cznic,turris-mox-rwtm.txt
122 +F: Documentation/devicetree/bindings/firmware/cznic,turris-omnia-mcu.yaml
123 F: Documentation/devicetree/bindings/gpio/gpio-moxtet.txt
124 F: Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
125 F: Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt