hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/arch/arm/boot/dts/imx6qdl-gw5904.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 /* these are used by bootloader for disabling nodes */
....@@ -66,6 +68,53 @@
6668 pwms = <&pwm4 0 5000000>;
6769 brightness-levels = <0 4 8 16 32 64 128 255>;
6870 default-brightness-level = <7>;
71
+ };
72
+
73
+ gpio-keys {
74
+ compatible = "gpio-keys";
75
+ #address-cells = <1>;
76
+ #size-cells = <0>;
77
+
78
+ user-pb {
79
+ label = "user_pb";
80
+ gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
81
+ linux,code = <BTN_0>;
82
+ };
83
+
84
+ user-pb1x {
85
+ label = "user_pb1x";
86
+ linux,code = <BTN_1>;
87
+ interrupt-parent = <&gsc>;
88
+ interrupts = <0>;
89
+ };
90
+
91
+ key-erased {
92
+ label = "key-erased";
93
+ linux,code = <BTN_2>;
94
+ interrupt-parent = <&gsc>;
95
+ interrupts = <1>;
96
+ };
97
+
98
+ eeprom-wp {
99
+ label = "eeprom_wp";
100
+ linux,code = <BTN_3>;
101
+ interrupt-parent = <&gsc>;
102
+ interrupts = <2>;
103
+ };
104
+
105
+ tamper {
106
+ label = "tamper";
107
+ linux,code = <BTN_4>;
108
+ interrupt-parent = <&gsc>;
109
+ interrupts = <5>;
110
+ };
111
+
112
+ switch-hold {
113
+ label = "switch_hold";
114
+ linux,code = <BTN_5>;
115
+ interrupt-parent = <&gsc>;
116
+ interrupts = <7>;
117
+ };
69118 };
70119
71120 leds {
....@@ -94,6 +143,7 @@
94143 };
95144
96145 memory@10000000 {
146
+ device_type = "memory";
97147 reg = <0x10000000 0x40000000>;
98148 };
99149
....@@ -204,11 +254,101 @@
204254 pinctrl-0 = <&pinctrl_i2c1>;
205255 status = "okay";
206256
207
- pca9555: gpio@23 {
257
+ gsc: gsc@20 {
258
+ compatible = "gw,gsc";
259
+ reg = <0x20>;
260
+ interrupt-parent = <&gpio1>;
261
+ interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
262
+ interrupt-controller;
263
+ #interrupt-cells = <1>;
264
+ #size-cells = <0>;
265
+
266
+ adc {
267
+ compatible = "gw,gsc-adc";
268
+ #address-cells = <1>;
269
+ #size-cells = <0>;
270
+
271
+ channel@0 {
272
+ gw,mode = <0>;
273
+ reg = <0x00>;
274
+ label = "temp";
275
+ };
276
+
277
+ channel@2 {
278
+ gw,mode = <1>;
279
+ reg = <0x02>;
280
+ label = "vdd_vin";
281
+ };
282
+
283
+ channel@5 {
284
+ gw,mode = <1>;
285
+ reg = <0x05>;
286
+ label = "vdd_3p3";
287
+ };
288
+
289
+ channel@8 {
290
+ gw,mode = <1>;
291
+ reg = <0x08>;
292
+ label = "vdd_bat";
293
+ };
294
+
295
+ channel@b {
296
+ gw,mode = <1>;
297
+ reg = <0x0b>;
298
+ label = "vdd_5p0";
299
+ };
300
+
301
+ channel@e {
302
+ gw,mode = <1>;
303
+ reg = <0xe>;
304
+ label = "vdd_arm";
305
+ };
306
+
307
+ channel@11 {
308
+ gw,mode = <1>;
309
+ reg = <0x11>;
310
+ label = "vdd_soc";
311
+ };
312
+
313
+ channel@14 {
314
+ gw,mode = <1>;
315
+ reg = <0x14>;
316
+ label = "vdd_3p0";
317
+ };
318
+
319
+ channel@17 {
320
+ gw,mode = <1>;
321
+ reg = <0x17>;
322
+ label = "vdd_1p5";
323
+ };
324
+
325
+ channel@1d {
326
+ gw,mode = <1>;
327
+ reg = <0x1d>;
328
+ label = "vdd_1p8";
329
+ };
330
+
331
+ channel@20 {
332
+ gw,mode = <1>;
333
+ reg = <0x20>;
334
+ label = "vdd_an1";
335
+ };
336
+
337
+ channel@23 {
338
+ gw,mode = <1>;
339
+ reg = <0x23>;
340
+ label = "vdd_2p5";
341
+ };
342
+ };
343
+ };
344
+
345
+ gsc_gpio: gpio@23 {
208346 compatible = "nxp,pca9555";
209347 reg = <0x23>;
210348 gpio-controller;
211349 #gpio-cells = <2>;
350
+ interrupt-parent = <&gsc>;
351
+ interrupts = <4>;
212352 };
213353
214354 eeprom1: eeprom@50 {
....@@ -246,6 +386,15 @@
246386 pinctrl-names = "default";
247387 pinctrl-0 = <&pinctrl_i2c2>;
248388 status = "okay";
389
+
390
+ magn@1c {
391
+ compatible = "st,lsm9ds1-magn";
392
+ reg = <0x1c>;
393
+ pinctrl-names = "default";
394
+ pinctrl-0 = <&pinctrl_mag>;
395
+ interrupt-parent = <&gpio5>;
396
+ interrupts = <17 IRQ_TYPE_EDGE_RISING>;
397
+ };
249398
250399 ltc3676: pmic@3c {
251400 compatible = "lltc,ltc3676";
....@@ -319,6 +468,16 @@
319468 };
320469 };
321470 };
471
+
472
+ imu@6a {
473
+ compatible = "st,lsm9ds1-imu";
474
+ reg = <0x6a>;
475
+ st,drdy-int-pin = <1>;
476
+ pinctrl-names = "default";
477
+ pinctrl-0 = <&pinctrl_imu>;
478
+ interrupt-parent = <&gpio4>;
479
+ interrupts = <18 IRQ_TYPE_LEVEL_HIGH>;
480
+ };
322481 };
323482
324483 &i2c3 {
....@@ -381,6 +540,7 @@
381540 };
382541
383542 &pwm4 {
543
+ #pwm-cells = <2>;
384544 pinctrl-names = "default";
385545 pinctrl-0 = <&pinctrl_pwm4>;
386546 status = "okay";
....@@ -483,6 +643,7 @@
483643 fsl,pins = <
484644 MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
485645 MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
646
+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x0001b0b0 /* GSC_IRQ# */
486647 >;
487648 };
488649
....@@ -500,6 +661,18 @@
500661 >;
501662 };
502663
664
+ pinctrl_imu: imugrp {
665
+ fsl,pins = <
666
+ MX6QDL_PAD_DI0_PIN2__GPIO4_IO18 0x1b0b0
667
+ >;
668
+ };
669
+
670
+ pinctrl_mag: maggrp {
671
+ fsl,pins = <
672
+ MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17 0x1b0b0
673
+ >;
674
+ };
675
+
503676 pinctrl_pcie: pciegrp {
504677 fsl,pins = <
505678 MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0 /* PCIE RST */