forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
....@@ -1,15 +1,11 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2013 Gateworks Corporation
3
- *
4
- * The code contained herein is licensed under the GNU General Public
5
- * License. You may obtain a copy of the GNU General Public License
6
- * Version 2 or later at the following locations:
7
- *
8
- * http://www.opensource.org/licenses/gpl-license.html
9
- * http://www.gnu.org/copyleft/gpl.html
104 */
115
126 #include <dt-bindings/gpio/gpio.h>
7
+#include <dt-bindings/input/linux-event-codes.h>
8
+#include <dt-bindings/interrupt-controller/irq.h>
139
1410 / {
1511 /* these are used by bootloader for disabling nodes */
....@@ -32,6 +28,53 @@
3228 pwms = <&pwm4 0 5000000>;
3329 brightness-levels = <0 4 8 16 32 64 128 255>;
3430 default-brightness-level = <7>;
31
+ };
32
+
33
+ gpio-keys {
34
+ compatible = "gpio-keys";
35
+ #address-cells = <1>;
36
+ #size-cells = <0>;
37
+
38
+ user-pb {
39
+ label = "user_pb";
40
+ gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
41
+ linux,code = <BTN_0>;
42
+ };
43
+
44
+ user-pb1x {
45
+ label = "user_pb1x";
46
+ linux,code = <BTN_1>;
47
+ interrupt-parent = <&gsc>;
48
+ interrupts = <0>;
49
+ };
50
+
51
+ key-erased {
52
+ label = "key-erased";
53
+ linux,code = <BTN_2>;
54
+ interrupt-parent = <&gsc>;
55
+ interrupts = <1>;
56
+ };
57
+
58
+ eeprom-wp {
59
+ label = "eeprom_wp";
60
+ linux,code = <BTN_3>;
61
+ interrupt-parent = <&gsc>;
62
+ interrupts = <2>;
63
+ };
64
+
65
+ tamper {
66
+ label = "tamper";
67
+ linux,code = <BTN_4>;
68
+ interrupt-parent = <&gsc>;
69
+ interrupts = <5>;
70
+ };
71
+
72
+ switch-hold {
73
+ label = "switch_hold";
74
+ linux,code = <BTN_5>;
75
+ interrupt-parent = <&gsc>;
76
+ interrupts = <7>;
77
+ };
3578 };
3679
3780 leds {
....@@ -60,6 +103,7 @@
60103 };
61104
62105 memory@10000000 {
106
+ device_type = "memory";
63107 reg = <0x10000000 0x20000000>;
64108 };
65109
....@@ -139,7 +183,7 @@
139183 };
140184
141185 &ecspi3 {
142
- cs-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>;
186
+ cs-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>;
143187 pinctrl-names = "default";
144188 pinctrl-0 = <&pinctrl_ecspi3>;
145189 status = "okay";
....@@ -170,6 +214,109 @@
170214 pinctrl-0 = <&pinctrl_i2c1>;
171215 status = "okay";
172216
217
+ gsc: gsc@20 {
218
+ compatible = "gw,gsc";
219
+ reg = <0x20>;
220
+ interrupt-parent = <&gpio1>;
221
+ interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
222
+ interrupt-controller;
223
+ #interrupt-cells = <1>;
224
+ #size-cells = <0>;
225
+
226
+ adc {
227
+ compatible = "gw,gsc-adc";
228
+ #address-cells = <1>;
229
+ #size-cells = <0>;
230
+
231
+ channel@0 {
232
+ gw,mode = <0>;
233
+ reg = <0x00>;
234
+ label = "temp";
235
+ };
236
+
237
+ channel@2 {
238
+ gw,mode = <1>;
239
+ reg = <0x02>;
240
+ label = "vdd_vin";
241
+ };
242
+
243
+ channel@5 {
244
+ gw,mode = <1>;
245
+ reg = <0x05>;
246
+ label = "vdd_3p3";
247
+ };
248
+
249
+ channel@8 {
250
+ gw,mode = <1>;
251
+ reg = <0x08>;
252
+ label = "vdd_bat";
253
+ };
254
+
255
+ channel@b {
256
+ gw,mode = <1>;
257
+ reg = <0x0b>;
258
+ label = "vdd_5p0";
259
+ };
260
+
261
+ channel@e {
262
+ gw,mode = <1>;
263
+ reg = <0xe>;
264
+ label = "vdd_arm";
265
+ };
266
+
267
+ channel@11 {
268
+ gw,mode = <1>;
269
+ reg = <0x11>;
270
+ label = "vdd_soc";
271
+ };
272
+
273
+ channel@14 {
274
+ gw,mode = <1>;
275
+ reg = <0x14>;
276
+ label = "vdd_3p0";
277
+ };
278
+
279
+ channel@17 {
280
+ gw,mode = <1>;
281
+ reg = <0x17>;
282
+ label = "vdd_1p5";
283
+ };
284
+
285
+ channel@1d {
286
+ gw,mode = <1>;
287
+ reg = <0x1d>;
288
+ label = "vdd_1p8";
289
+ };
290
+
291
+ channel@20 {
292
+ gw,mode = <1>;
293
+ reg = <0x20>;
294
+ label = "vdd_1p0";
295
+ };
296
+
297
+ channel@23 {
298
+ gw,mode = <1>;
299
+ reg = <0x23>;
300
+ label = "vdd_2p5";
301
+ };
302
+
303
+ channel@29 {
304
+ gw,mode = <1>;
305
+ reg = <0x29>;
306
+ label = "vdd_an1";
307
+ };
308
+ };
309
+ };
310
+
311
+ gsc_gpio: gpio@23 {
312
+ compatible = "nxp,pca9555";
313
+ reg = <0x23>;
314
+ gpio-controller;
315
+ #gpio-cells = <2>;
316
+ interrupt-parent = <&gsc>;
317
+ interrupts = <4>;
318
+ };
319
+
173320 eeprom1: eeprom@50 {
174321 compatible = "atmel,24c02";
175322 reg = <0x50>;
....@@ -192,13 +339,6 @@
192339 compatible = "atmel,24c02";
193340 reg = <0x53>;
194341 pagesize = <16>;
195
- };
196
-
197
- gpio: pca9555@23 {
198
- compatible = "nxp,pca9555";
199
- reg = <0x23>;
200
- gpio-controller;
201
- #gpio-cells = <2>;
202342 };
203343
204344 rtc: ds1672@68 {
....@@ -318,6 +458,11 @@
318458 interrupts = <12 2>;
319459 wakeup-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
320460 };
461
+
462
+ accel@1e {
463
+ compatible = "nxp,fxos8700";
464
+ reg = <0x1e>;
465
+ };
321466 };
322467
323468 &ldb {
....@@ -365,6 +510,7 @@
365510 };
366511
367512 &pwm4 {
513
+ #pwm-cells = <2>;
368514 pinctrl-names = "default";
369515 pinctrl-0 = <&pinctrl_pwm4>;
370516 status = "okay";
....@@ -504,6 +650,7 @@
504650 fsl,pins = <
505651 MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
506652 MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
653
+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0xb0b1
507654 >;
508655 };
509656