forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/arm/boot/dts/imx6qdl-gw53xx.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 0x40000000>;
64108 };
65109
....@@ -163,6 +207,115 @@
163207 pinctrl-0 = <&pinctrl_i2c1>;
164208 status = "okay";
165209
210
+ gsc: gsc@20 {
211
+ compatible = "gw,gsc";
212
+ reg = <0x20>;
213
+ interrupt-parent = <&gpio1>;
214
+ interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
215
+ interrupt-controller;
216
+ #interrupt-cells = <1>;
217
+ #size-cells = <0>;
218
+
219
+ adc {
220
+ compatible = "gw,gsc-adc";
221
+ #address-cells = <1>;
222
+ #size-cells = <0>;
223
+
224
+ channel@0 {
225
+ gw,mode = <0>;
226
+ reg = <0x00>;
227
+ label = "temp";
228
+ };
229
+
230
+ channel@2 {
231
+ gw,mode = <1>;
232
+ reg = <0x02>;
233
+ label = "vdd_vin";
234
+ };
235
+
236
+ channel@5 {
237
+ gw,mode = <1>;
238
+ reg = <0x05>;
239
+ label = "vdd_3p3";
240
+ };
241
+
242
+ channel@8 {
243
+ gw,mode = <1>;
244
+ reg = <0x08>;
245
+ label = "vdd_bat";
246
+ };
247
+
248
+ channel@b {
249
+ gw,mode = <1>;
250
+ reg = <0x0b>;
251
+ label = "vdd_5p0";
252
+ };
253
+
254
+ channel@e {
255
+ gw,mode = <1>;
256
+ reg = <0xe>;
257
+ label = "vdd_arm";
258
+ };
259
+
260
+ channel@11 {
261
+ gw,mode = <1>;
262
+ reg = <0x11>;
263
+ label = "vdd_soc";
264
+ };
265
+
266
+ channel@14 {
267
+ gw,mode = <1>;
268
+ reg = <0x14>;
269
+ label = "vdd_3p0";
270
+ };
271
+
272
+ channel@17 {
273
+ gw,mode = <1>;
274
+ reg = <0x17>;
275
+ label = "vdd_1p5";
276
+ };
277
+
278
+ channel@1d {
279
+ gw,mode = <1>;
280
+ reg = <0x1d>;
281
+ label = "vdd_1p8";
282
+ };
283
+
284
+ channel@20 {
285
+ gw,mode = <1>;
286
+ reg = <0x20>;
287
+ label = "vdd_1p0";
288
+ };
289
+
290
+ channel@23 {
291
+ gw,mode = <1>;
292
+ reg = <0x23>;
293
+ label = "vdd_2p5";
294
+ };
295
+
296
+ channel@26 {
297
+ gw,mode = <1>;
298
+ reg = <0x26>;
299
+ label = "vdd_gps";
300
+ };
301
+
302
+ channel@29 {
303
+ gw,mode = <1>;
304
+ reg = <0x29>;
305
+ label = "vdd_an1";
306
+ };
307
+ };
308
+ };
309
+
310
+ gsc_gpio: gpio@23 {
311
+ compatible = "nxp,pca9555";
312
+ reg = <0x23>;
313
+ gpio-controller;
314
+ #gpio-cells = <2>;
315
+ interrupt-parent = <&gsc>;
316
+ interrupts = <4>;
317
+ };
318
+
166319 eeprom1: eeprom@50 {
167320 compatible = "atmel,24c02";
168321 reg = <0x50>;
....@@ -185,13 +338,6 @@
185338 compatible = "atmel,24c02";
186339 reg = <0x53>;
187340 pagesize = <16>;
188
- };
189
-
190
- gpio: pca9555@23 {
191
- compatible = "nxp,pca9555";
192
- reg = <0x23>;
193
- gpio-controller;
194
- #gpio-cells = <2>;
195341 };
196342
197343 rtc: ds1672@68 {
....@@ -309,6 +455,11 @@
309455 interrupts = <11 2>;
310456 wakeup-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
311457 };
458
+
459
+ accel@1e {
460
+ compatible = "nxp,fxos8700";
461
+ reg = <0x1e>;
462
+ };
312463 };
313464
314465 &ldb {
....@@ -356,6 +507,7 @@
356507 };
357508
358509 &pwm4 {
510
+ #pwm-cells = <2>;
359511 pinctrl-names = "default";
360512 pinctrl-0 = <&pinctrl_pwm4>;
361513 status = "okay";
....@@ -486,6 +638,7 @@
486638 fsl,pins = <
487639 MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
488640 MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
641
+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0xb0b1
489642 >;
490643 };
491644