hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/boot/dts/imx6qdl-gw560x.dtsi
....@@ -47,6 +47,7 @@
4747
4848 #include <dt-bindings/gpio/gpio.h>
4949 #include <dt-bindings/input/input.h>
50
+#include <dt-bindings/interrupt-controller/irq.h>
5051
5152 / {
5253 /* these are used by bootloader for disabling nodes */
....@@ -88,6 +89,53 @@
8889 default-on;
8990 };
9091
92
+ gpio-keys {
93
+ compatible = "gpio-keys";
94
+ #address-cells = <1>;
95
+ #size-cells = <0>;
96
+
97
+ user-pb {
98
+ label = "user_pb";
99
+ gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
100
+ linux,code = <BTN_0>;
101
+ };
102
+
103
+ user-pb1x {
104
+ label = "user_pb1x";
105
+ linux,code = <BTN_1>;
106
+ interrupt-parent = <&gsc>;
107
+ interrupts = <0>;
108
+ };
109
+
110
+ key-erased {
111
+ label = "key-erased";
112
+ linux,code = <BTN_2>;
113
+ interrupt-parent = <&gsc>;
114
+ interrupts = <1>;
115
+ };
116
+
117
+ eeprom-wp {
118
+ label = "eeprom_wp";
119
+ linux,code = <BTN_3>;
120
+ interrupt-parent = <&gsc>;
121
+ interrupts = <2>;
122
+ };
123
+
124
+ tamper {
125
+ label = "tamper";
126
+ linux,code = <BTN_4>;
127
+ interrupt-parent = <&gsc>;
128
+ interrupts = <5>;
129
+ };
130
+
131
+ switch-hold {
132
+ label = "switch_hold";
133
+ linux,code = <BTN_5>;
134
+ interrupt-parent = <&gsc>;
135
+ interrupts = <7>;
136
+ };
137
+ };
138
+
91139 leds {
92140 compatible = "gpio-leds";
93141 pinctrl-names = "default";
....@@ -114,6 +162,7 @@
114162 };
115163
116164 memory@10000000 {
165
+ device_type = "memory";
117166 reg = <0x10000000 0x40000000>;
118167 };
119168
....@@ -204,7 +253,7 @@
204253 };
205254
206255 &ecspi3 {
207
- cs-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>;
256
+ cs-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>;
208257 pinctrl-names = "default";
209258 pinctrl-0 = <&pinctrl_ecspi3>;
210259 status = "okay";
....@@ -242,6 +291,115 @@
242291 pinctrl-0 = <&pinctrl_i2c1>;
243292 status = "okay";
244293
294
+ gsc: gsc@20 {
295
+ compatible = "gw,gsc";
296
+ reg = <0x20>;
297
+ interrupt-parent = <&gpio1>;
298
+ interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
299
+ interrupt-controller;
300
+ #interrupt-cells = <1>;
301
+ #size-cells = <0>;
302
+
303
+ adc {
304
+ compatible = "gw,gsc-adc";
305
+ #address-cells = <1>;
306
+ #size-cells = <0>;
307
+
308
+ channel@0 {
309
+ gw,mode = <0>;
310
+ reg = <0x00>;
311
+ label = "temp";
312
+ };
313
+
314
+ channel@2 {
315
+ gw,mode = <1>;
316
+ reg = <0x02>;
317
+ label = "vdd_vin";
318
+ };
319
+
320
+ channel@5 {
321
+ gw,mode = <1>;
322
+ reg = <0x05>;
323
+ label = "vdd_3p3";
324
+ };
325
+
326
+ channel@8 {
327
+ gw,mode = <1>;
328
+ reg = <0x08>;
329
+ label = "vdd_bat";
330
+ };
331
+
332
+ channel@b {
333
+ gw,mode = <1>;
334
+ reg = <0x0b>;
335
+ label = "vdd_5p0";
336
+ };
337
+
338
+ channel@e {
339
+ gw,mode = <1>;
340
+ reg = <0xe>;
341
+ label = "vdd_arm";
342
+ };
343
+
344
+ channel@11 {
345
+ gw,mode = <1>;
346
+ reg = <0x11>;
347
+ label = "vdd_soc";
348
+ };
349
+
350
+ channel@14 {
351
+ gw,mode = <1>;
352
+ reg = <0x14>;
353
+ label = "vdd_3p0";
354
+ };
355
+
356
+ channel@17 {
357
+ gw,mode = <1>;
358
+ reg = <0x17>;
359
+ label = "vdd_1p5";
360
+ };
361
+
362
+ channel@1d {
363
+ gw,mode = <1>;
364
+ reg = <0x1d>;
365
+ label = "vdd_1p8";
366
+ };
367
+
368
+ channel@20 {
369
+ gw,mode = <1>;
370
+ reg = <0x20>;
371
+ label = "vdd_an1";
372
+ };
373
+
374
+ channel@23 {
375
+ gw,mode = <1>;
376
+ reg = <0x23>;
377
+ label = "vdd_2p5";
378
+ };
379
+
380
+ channel@26 {
381
+ gw,mode = <1>;
382
+ reg = <0x26>;
383
+ label = "vdd_gps";
384
+ };
385
+
386
+ channel@29 {
387
+ gw,mode = <1>;
388
+ reg = <0x29>;
389
+ label = "vdd_an2";
390
+ };
391
+ };
392
+ };
393
+
394
+ gsc_gpio: gpio@23 {
395
+ compatible = "nxp,pca9555";
396
+ reg = <0x23>;
397
+ gpio-controller;
398
+ #gpio-cells = <2>;
399
+ interrupt-parent = <&gsc>;
400
+ interrupts = <4>;
401
+ };
402
+
245403 eeprom1: eeprom@50 {
246404 compatible = "atmel,24c02";
247405 reg = <0x50>;
....@@ -266,13 +424,6 @@
266424 pagesize = <16>;
267425 };
268426
269
- pca9555: gpio@23 {
270
- compatible = "nxp,pca9555";
271
- reg = <0x23>;
272
- gpio-controller;
273
- #gpio-cells = <2>;
274
- };
275
-
276427 ds1672: rtc@68 {
277428 compatible = "dallas,ds1672";
278429 reg = <0x68>;
....@@ -292,6 +443,15 @@
292443 clocks = <&clks IMX6QDL_CLK_CKO>;
293444 VDDA-supply = <&reg_1p8v>;
294445 VDDIO-supply = <&reg_3p3v>;
446
+ };
447
+
448
+ magn@1c {
449
+ compatible = "st,lsm9ds1-magn";
450
+ reg = <0x1c>;
451
+ pinctrl-names = "default";
452
+ pinctrl-0 = <&pinctrl_mag>;
453
+ interrupt-parent = <&gpio5>;
454
+ interrupts = <9 IRQ_TYPE_EDGE_RISING>;
295455 };
296456
297457 tca8418: keypad@34 {
....@@ -388,6 +548,16 @@
388548 };
389549 };
390550 };
551
+
552
+ imu@6a {
553
+ compatible = "st,lsm9ds1-imu";
554
+ reg = <0x6a>;
555
+ st,drdy-int-pin = <1>;
556
+ pinctrl-names = "default";
557
+ pinctrl-0 = <&pinctrl_imu>;
558
+ interrupt-parent = <&gpio5>;
559
+ interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
560
+ };
391561 };
392562
393563 &i2c3 {
....@@ -451,6 +621,7 @@
451621 };
452622
453623 &pwm4 {
624
+ #pwm-cells = <2>;
454625 pinctrl-names = "default";
455626 pinctrl-0 = <&pinctrl_pwm4>;
456627 status = "okay";
....@@ -588,6 +759,7 @@
588759 fsl,pins = <
589760 MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
590761 MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
762
+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0xb0b1
591763 >;
592764 };
593765
....@@ -608,6 +780,12 @@
608780 >;
609781 };
610782
783
+ pinctrl_imu: imugrp {
784
+ fsl,pins = <
785
+ MX6QDL_PAD_DISP0_DAT12__GPIO5_IO06 0x1b0b0
786
+ >;
787
+ };
788
+
611789 pinctrl_keypad: keypadgrp {
612790 fsl,pins = <
613791 MX6QDL_PAD_DISP0_DAT17__GPIO5_IO11 0x0001b0b0 /* KEYPAD_IRQ# */
....@@ -615,6 +793,12 @@
615793 >;
616794 };
617795
796
+ pinctrl_mag: maggrp {
797
+ fsl,pins = <
798
+ MX6QDL_PAD_DISP0_DAT15__GPIO5_IO09 0x1b0b0
799
+ >;
800
+ };
801
+
618802 pinctrl_pcie: pciegrp {
619803 fsl,pins = <
620804 MX6QDL_PAD_DISP0_DAT10__GPIO4_IO31 0x1b0b0 /* PCI_RST# */