forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/arm/boot/dts/imx6qdl-gw51xx.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 */
....@@ -23,6 +19,51 @@
2319
2420 chosen {
2521 bootargs = "console=ttymxc1,115200";
22
+ };
23
+
24
+ gpio-keys {
25
+ compatible = "gpio-keys";
26
+
27
+ user-pb {
28
+ label = "user_pb";
29
+ gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
30
+ linux,code = <BTN_0>;
31
+ };
32
+
33
+ user-pb1x {
34
+ label = "user_pb1x";
35
+ linux,code = <BTN_1>;
36
+ interrupt-parent = <&gsc>;
37
+ interrupts = <0>;
38
+ };
39
+
40
+ key-erased {
41
+ label = "key-erased";
42
+ linux,code = <BTN_2>;
43
+ interrupt-parent = <&gsc>;
44
+ interrupts = <1>;
45
+ };
46
+
47
+ eeprom-wp {
48
+ label = "eeprom_wp";
49
+ linux,code = <BTN_3>;
50
+ interrupt-parent = <&gsc>;
51
+ interrupts = <2>;
52
+ };
53
+
54
+ tamper {
55
+ label = "tamper";
56
+ linux,code = <BTN_4>;
57
+ interrupt-parent = <&gsc>;
58
+ interrupts = <5>;
59
+ };
60
+
61
+ switch-hold {
62
+ label = "switch_hold";
63
+ linux,code = <BTN_5>;
64
+ interrupt-parent = <&gsc>;
65
+ interrupts = <7>;
66
+ };
2667 };
2768
2869 leds {
....@@ -45,6 +86,7 @@
4586 };
4687
4788 memory@10000000 {
89
+ device_type = "memory";
4890 reg = <0x10000000 0x20000000>;
4991 };
5092
....@@ -107,6 +149,103 @@
107149 pinctrl-0 = <&pinctrl_i2c1>;
108150 status = "okay";
109151
152
+ gsc: gsc@20 {
153
+ compatible = "gw,gsc";
154
+ reg = <0x20>;
155
+ interrupt-parent = <&gpio1>;
156
+ interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
157
+ interrupt-controller;
158
+ #interrupt-cells = <1>;
159
+ #size-cells = <0>;
160
+
161
+ adc {
162
+ compatible = "gw,gsc-adc";
163
+ #address-cells = <1>;
164
+ #size-cells = <0>;
165
+
166
+ channel@0 {
167
+ gw,mode = <0>;
168
+ reg = <0x00>;
169
+ label = "temp";
170
+ };
171
+
172
+ channel@2 {
173
+ gw,mode = <1>;
174
+ reg = <0x02>;
175
+ label = "vdd_vin";
176
+ };
177
+
178
+ channel@5 {
179
+ gw,mode = <1>;
180
+ reg = <0x05>;
181
+ label = "vdd_3p3";
182
+ };
183
+
184
+ channel@8 {
185
+ gw,mode = <1>;
186
+ reg = <0x08>;
187
+ label = "vdd_bat";
188
+ };
189
+
190
+ channel@b {
191
+ gw,mode = <1>;
192
+ reg = <0x0b>;
193
+ label = "vdd_5p0";
194
+ };
195
+
196
+ channel@e {
197
+ gw,mode = <1>;
198
+ reg = <0xe>;
199
+ label = "vdd_arm";
200
+ };
201
+
202
+ channel@11 {
203
+ gw,mode = <1>;
204
+ reg = <0x11>;
205
+ label = "vdd_soc";
206
+ };
207
+
208
+ channel@14 {
209
+ gw,mode = <1>;
210
+ reg = <0x14>;
211
+ label = "vdd_3p0";
212
+ };
213
+
214
+ channel@17 {
215
+ gw,mode = <1>;
216
+ reg = <0x17>;
217
+ label = "vdd_1p5";
218
+ };
219
+
220
+ channel@1d {
221
+ gw,mode = <1>;
222
+ reg = <0x1d>;
223
+ label = "vdd_1p8";
224
+ };
225
+
226
+ channel@20 {
227
+ gw,mode = <1>;
228
+ reg = <0x20>;
229
+ label = "vdd_an1";
230
+ };
231
+
232
+ channel@23 {
233
+ gw,mode = <1>;
234
+ reg = <0x23>;
235
+ label = "vdd_2p5";
236
+ };
237
+ };
238
+ };
239
+
240
+ gsc_gpio: gpio@23 {
241
+ compatible = "nxp,pca9555";
242
+ reg = <0x23>;
243
+ gpio-controller;
244
+ #gpio-cells = <2>;
245
+ interrupt-parent = <&gsc>;
246
+ interrupts = <4>;
247
+ };
248
+
110249 eeprom1: eeprom@50 {
111250 compatible = "atmel,24c02";
112251 reg = <0x50>;
....@@ -129,13 +268,6 @@
129268 compatible = "atmel,24c02";
130269 reg = <0x53>;
131270 pagesize = <16>;
132
- };
133
-
134
- gpio: pca9555@23 {
135
- compatible = "nxp,pca9555";
136
- reg = <0x23>;
137
- gpio-controller;
138
- #gpio-cells = <2>;
139271 };
140272
141273 rtc: ds1672@68 {
....@@ -392,6 +524,7 @@
392524 fsl,pins = <
393525 MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
394526 MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
527
+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x0001b0b0 /* GSC_IRQ# */
395528 >;
396529 };
397530