mvebu: 6.6: refresh patches
[openwrt/openwrt.git] / target / linux / mvebu / patches-6.6 / 901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch
1 From aa4a0ccc41997f2da172165c92803abace43bd1c Mon Sep 17 00:00:00 2001
2 From: Luka Kovacic <luka.kovacic () sartura ! hr>
3 Date: Tue, 24 Aug 2021 12:44:32 +0000
4 Subject: [PATCH 1/7] dt-bindings: Add IEI vendor prefix and IEI WT61P803
5 PUZZLE driver bindings
6
7 Add the IEI WT61P803 PUZZLE Device Tree bindings for MFD, HWMON and LED
8 drivers. A new vendor prefix is also added accordingly for
9 IEI Integration Corp.
10
11 Signed-off-by: Luka Kovacic <luka.kovacic@sartura.hr>
12 Signed-off-by: Pavo Banicevic <pavo.banicevic@sartura.hr>
13 Cc: Luka Perkov <luka.perkov@sartura.hr>
14 Cc: Robert Marko <robert.marko@sartura.hr>
15 ---
16 .../hwmon/iei,wt61p803-puzzle-hwmon.yaml | 53 ++++++++++++
17 .../leds/iei,wt61p803-puzzle-leds.yaml | 39 +++++++++
18 .../bindings/mfd/iei,wt61p803-puzzle.yaml | 82 +++++++++++++++++++
19 .../devicetree/bindings/vendor-prefixes.yaml | 2 +
20 4 files changed, 176 insertions(+)
21 create mode 100644 Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml
22 create mode 100644 Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml
23 create mode 100644 Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml
24
25 --- /dev/null
26 +++ b/Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml
27 @@ -0,0 +1,53 @@
28 +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
29 +%YAML 1.2
30 +---
31 +$id: http://devicetree.org/schemas/hwmon/iei,wt61p803-puzzle-hwmon.yaml#
32 +$schema: http://devicetree.org/meta-schemas/core.yaml#
33 +
34 +title: IEI WT61P803 PUZZLE MCU HWMON module from IEI Integration Corp.
35 +
36 +maintainers:
37 + - Luka Kovacic <luka.kovacic@sartura.hr>
38 +
39 +description: |
40 + This module is a part of the IEI WT61P803 PUZZLE MFD device. For more details
41 + see Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml.
42 +
43 + The HWMON module is a sub-node of the MCU node in the Device Tree.
44 +
45 +properties:
46 + compatible:
47 + const: iei,wt61p803-puzzle-hwmon
48 +
49 + "#address-cells":
50 + const: 1
51 +
52 + "#size-cells":
53 + const: 0
54 +
55 +patternProperties:
56 + "^fan-group@[0-1]$":
57 + type: object
58 + properties:
59 + reg:
60 + minimum: 0
61 + maximum: 1
62 + description:
63 + Fan group ID
64 +
65 + cooling-levels:
66 + minItems: 1
67 + maxItems: 255
68 + description:
69 + Cooling levels for the fans (PWM value mapping)
70 + description: |
71 + Properties for each fan group.
72 + required:
73 + - reg
74 +
75 +required:
76 + - compatible
77 + - "#address-cells"
78 + - "#size-cells"
79 +
80 +additionalProperties: false
81 --- /dev/null
82 +++ b/Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml
83 @@ -0,0 +1,39 @@
84 +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
85 +%YAML 1.2
86 +---
87 +$id: http://devicetree.org/schemas/leds/iei,wt61p803-puzzle-leds.yaml#
88 +$schema: http://devicetree.org/meta-schemas/core.yaml#
89 +
90 +title: IEI WT61P803 PUZZLE MCU LED module from IEI Integration Corp.
91 +
92 +maintainers:
93 + - Luka Kovacic <luka.kovacic@sartura.hr>
94 +
95 +description: |
96 + This module is a part of the IEI WT61P803 PUZZLE MFD device. For more details
97 + see Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml.
98 +
99 + The LED module is a sub-node of the MCU node in the Device Tree.
100 +
101 +properties:
102 + compatible:
103 + const: iei,wt61p803-puzzle-leds
104 +
105 + "#address-cells":
106 + const: 1
107 +
108 + "#size-cells":
109 + const: 0
110 +
111 + led@0:
112 + type: object
113 + $ref: common.yaml
114 + description: |
115 + Properties for a single LED.
116 +
117 +required:
118 + - compatible
119 + - "#address-cells"
120 + - "#size-cells"
121 +
122 +additionalProperties: false
123 --- /dev/null
124 +++ b/Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml
125 @@ -0,0 +1,82 @@
126 +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
127 +%YAML 1.2
128 +---
129 +$id: http://devicetree.org/schemas/mfd/iei,wt61p803-puzzle.yaml#
130 +$schema: http://devicetree.org/meta-schemas/core.yaml#
131 +
132 +title: IEI WT61P803 PUZZLE MCU from IEI Integration Corp.
133 +
134 +maintainers:
135 + - Luka Kovacic <luka.kovacic@sartura.hr>
136 +
137 +description: |
138 + IEI WT61P803 PUZZLE MCU is embedded in some IEI Puzzle series boards.
139 + It's used for controlling system power states, fans, LEDs and temperature
140 + sensors.
141 +
142 + For Device Tree bindings of other sub-modules (HWMON, LEDs) refer to the
143 + binding documents under the respective subsystem directories.
144 +
145 +properties:
146 + compatible:
147 + const: iei,wt61p803-puzzle
148 +
149 + current-speed:
150 + description:
151 + Serial bus speed in bps
152 + maxItems: 1
153 +
154 + enable-beep: true
155 +
156 + hwmon:
157 + $ref: /schemas/hwmon/iei,wt61p803-puzzle-hwmon.yaml
158 +
159 + leds:
160 + $ref: /schemas/leds/iei,wt61p803-puzzle-leds.yaml
161 +
162 +required:
163 + - compatible
164 + - current-speed
165 +
166 +additionalProperties: false
167 +
168 +examples:
169 + - |
170 + #include <dt-bindings/leds/common.h>
171 + serial {
172 + mcu {
173 + compatible = "iei,wt61p803-puzzle";
174 + current-speed = <115200>;
175 + enable-beep;
176 +
177 + leds {
178 + compatible = "iei,wt61p803-puzzle-leds";
179 + #address-cells = <1>;
180 + #size-cells = <0>;
181 +
182 + led@0 {
183 + reg = <0>;
184 + function = LED_FUNCTION_POWER;
185 + color = <LED_COLOR_ID_BLUE>;
186 + };
187 + };
188 +
189 + hwmon {
190 + compatible = "iei,wt61p803-puzzle-hwmon";
191 + #address-cells = <1>;
192 + #size-cells = <0>;
193 +
194 + fan-group@0 {
195 + #cooling-cells = <2>;
196 + reg = <0x00>;
197 + cooling-levels = <64 102 170 230 250>;
198 + };
199 +
200 + fan-group@1 {
201 + #cooling-cells = <2>;
202 + reg = <0x01>;
203 + cooling-levels = <64 102 170 230 250>;
204 + };
205 + };
206 + };
207 + };
208 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
209 +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
210 @@ -609,6 +609,8 @@ patternProperties:
211 description: IC Plus Corp.
212 "^idt,.*":
213 description: Integrated Device Technologies, Inc.
214 + "^iei,.*":
215 + description: IEI Integration Corp.
216 "^ifi,.*":
217 description: Ingenieurburo Fur Ic-Technologie (I/F/I)
218 "^ilitek,.*":