hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/arch/arm/boot/dts/imx6qdl-gw5903.dtsi
....@@ -46,6 +46,8 @@
4646 */
4747
4848 #include <dt-bindings/gpio/gpio.h>
49
+#include <dt-bindings/input/linux-event-codes.h>
50
+#include <dt-bindings/interrupt-controller/irq.h>
4951
5052 / {
5153 chosen {
....@@ -71,6 +73,53 @@
7173 default-brightness-level = <100>;
7274 };
7375
76
+ gpio-keys {
77
+ compatible = "gpio-keys";
78
+ #address-cells = <1>;
79
+ #size-cells = <0>;
80
+
81
+ user-pb {
82
+ label = "user_pb";
83
+ gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
84
+ linux,code = <BTN_0>;
85
+ };
86
+
87
+ user-pb1x {
88
+ label = "user_pb1x";
89
+ linux,code = <BTN_1>;
90
+ interrupt-parent = <&gsc>;
91
+ interrupts = <0>;
92
+ };
93
+
94
+ key-erased {
95
+ label = "key-erased";
96
+ linux,code = <BTN_2>;
97
+ interrupt-parent = <&gsc>;
98
+ interrupts = <1>;
99
+ };
100
+
101
+ eeprom-wp {
102
+ label = "eeprom_wp";
103
+ linux,code = <BTN_3>;
104
+ interrupt-parent = <&gsc>;
105
+ interrupts = <2>;
106
+ };
107
+
108
+ tamper {
109
+ label = "tamper";
110
+ linux,code = <BTN_4>;
111
+ interrupt-parent = <&gsc>;
112
+ interrupts = <5>;
113
+ };
114
+
115
+ switch-hold {
116
+ label = "switch_hold";
117
+ linux,code = <BTN_5>;
118
+ interrupt-parent = <&gsc>;
119
+ interrupts = <7>;
120
+ };
121
+ };
122
+
74123 leds {
75124 compatible = "gpio-leds";
76125 pinctrl-names = "default";
....@@ -84,6 +133,7 @@
84133 };
85134
86135 memory@10000000 {
136
+ device_type = "memory";
87137 reg = <0x10000000 0x40000000>;
88138 };
89139
....@@ -182,11 +232,101 @@
182232 pinctrl-0 = <&pinctrl_i2c1>;
183233 status = "okay";
184234
185
- pca9555: gpio@23 {
235
+ gsc: gsc@20 {
236
+ compatible = "gw,gsc";
237
+ reg = <0x20>;
238
+ interrupt-parent = <&gpio1>;
239
+ interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
240
+ interrupt-controller;
241
+ #interrupt-cells = <1>;
242
+ #size-cells = <0>;
243
+
244
+ adc {
245
+ compatible = "gw,gsc-adc";
246
+ #address-cells = <1>;
247
+ #size-cells = <0>;
248
+
249
+ channel@0 {
250
+ gw,mode = <0>;
251
+ reg = <0x00>;
252
+ label = "temp";
253
+ };
254
+
255
+ channel@2 {
256
+ gw,mode = <1>;
257
+ reg = <0x02>;
258
+ label = "vdd_vin";
259
+ };
260
+
261
+ channel@5 {
262
+ gw,mode = <1>;
263
+ reg = <0x05>;
264
+ label = "vdd_3p3";
265
+ };
266
+
267
+ channel@8 {
268
+ gw,mode = <1>;
269
+ reg = <0x08>;
270
+ label = "vdd_bat";
271
+ };
272
+
273
+ channel@b {
274
+ gw,mode = <1>;
275
+ reg = <0x0b>;
276
+ label = "vdd_5p0";
277
+ };
278
+
279
+ channel@e {
280
+ gw,mode = <1>;
281
+ reg = <0xe>;
282
+ label = "vdd_arm";
283
+ };
284
+
285
+ channel@11 {
286
+ gw,mode = <1>;
287
+ reg = <0x11>;
288
+ label = "vdd_soc";
289
+ };
290
+
291
+ channel@14 {
292
+ gw,mode = <1>;
293
+ reg = <0x14>;
294
+ label = "vdd_3p0";
295
+ };
296
+
297
+ channel@17 {
298
+ gw,mode = <1>;
299
+ reg = <0x17>;
300
+ label = "vdd_1p5";
301
+ };
302
+
303
+ channel@1d {
304
+ gw,mode = <1>;
305
+ reg = <0x1d>;
306
+ label = "vdd_1p8";
307
+ };
308
+
309
+ channel@20 {
310
+ gw,mode = <1>;
311
+ reg = <0x20>;
312
+ label = "vdd_an1";
313
+ };
314
+
315
+ channel@23 {
316
+ gw,mode = <1>;
317
+ reg = <0x23>;
318
+ label = "vdd_2p5";
319
+ };
320
+ };
321
+ };
322
+
323
+ gsc_gpio: gpio@23 {
186324 compatible = "nxp,pca9555";
187325 reg = <0x23>;
188326 gpio-controller;
189327 #gpio-cells = <2>;
328
+ interrupt-parent = <&gsc>;
329
+ interrupts = <4>;
190330 };
191331
192332 eeprom1: eeprom@50 {
....@@ -310,7 +450,7 @@
310450 tlv320aic3105: codec@18 {
311451 compatible = "ti,tlv320aic3x";
312452 reg = <0x18>;
313
- gpio-reset = <&gpio5 17 GPIO_ACTIVE_LOW>;
453
+ reset-gpios = <&gpio5 17 GPIO_ACTIVE_LOW>;
314454 clocks = <&clks IMX6QDL_CLK_CKO>;
315455 ai3x-micbias-vg = <2>; /* MICBIAS_2_5V */
316456 /* Regulators */
....@@ -364,6 +504,7 @@
364504 };
365505
366506 &pwm1 {
507
+ #pwm-cells = <2>;
367508 pinctrl-names = "default";
368509 pinctrl-0 = <&pinctrl_pwm1>;
369510 status = "okay";