.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 2014 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 |
---|
10 | 4 | */ |
---|
11 | 5 | |
---|
12 | 6 | #include <dt-bindings/gpio/gpio.h> |
---|
| 7 | +#include <dt-bindings/input/linux-event-codes.h> |
---|
| 8 | +#include <dt-bindings/interrupt-controller/irq.h> |
---|
13 | 9 | |
---|
14 | 10 | / { |
---|
15 | 11 | /* these are used by bootloader for disabling nodes */ |
---|
.. | .. |
---|
24 | 20 | |
---|
25 | 21 | chosen { |
---|
26 | 22 | bootargs = "console=ttymxc1,115200"; |
---|
| 23 | + }; |
---|
| 24 | + |
---|
| 25 | + gpio-keys { |
---|
| 26 | + compatible = "gpio-keys"; |
---|
| 27 | + #address-cells = <1>; |
---|
| 28 | + #size-cells = <0>; |
---|
| 29 | + |
---|
| 30 | + user-pb { |
---|
| 31 | + label = "user_pb"; |
---|
| 32 | + gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>; |
---|
| 33 | + linux,code = <BTN_0>; |
---|
| 34 | + }; |
---|
| 35 | + |
---|
| 36 | + user-pb1x { |
---|
| 37 | + label = "user_pb1x"; |
---|
| 38 | + linux,code = <BTN_1>; |
---|
| 39 | + interrupt-parent = <&gsc>; |
---|
| 40 | + interrupts = <0>; |
---|
| 41 | + }; |
---|
| 42 | + |
---|
| 43 | + key-erased { |
---|
| 44 | + label = "key-erased"; |
---|
| 45 | + linux,code = <BTN_2>; |
---|
| 46 | + interrupt-parent = <&gsc>; |
---|
| 47 | + interrupts = <1>; |
---|
| 48 | + }; |
---|
| 49 | + |
---|
| 50 | + eeprom-wp { |
---|
| 51 | + label = "eeprom_wp"; |
---|
| 52 | + linux,code = <BTN_3>; |
---|
| 53 | + interrupt-parent = <&gsc>; |
---|
| 54 | + interrupts = <2>; |
---|
| 55 | + }; |
---|
| 56 | + |
---|
| 57 | + tamper { |
---|
| 58 | + label = "tamper"; |
---|
| 59 | + linux,code = <BTN_4>; |
---|
| 60 | + interrupt-parent = <&gsc>; |
---|
| 61 | + interrupts = <5>; |
---|
| 62 | + }; |
---|
| 63 | + |
---|
| 64 | + switch-hold { |
---|
| 65 | + label = "switch_hold"; |
---|
| 66 | + linux,code = <BTN_5>; |
---|
| 67 | + interrupt-parent = <&gsc>; |
---|
| 68 | + interrupts = <7>; |
---|
| 69 | + }; |
---|
27 | 70 | }; |
---|
28 | 71 | |
---|
29 | 72 | leds { |
---|
.. | .. |
---|
52 | 95 | }; |
---|
53 | 96 | |
---|
54 | 97 | memory@10000000 { |
---|
| 98 | + device_type = "memory"; |
---|
55 | 99 | reg = <0x10000000 0x20000000>; |
---|
56 | 100 | }; |
---|
57 | 101 | |
---|
.. | .. |
---|
97 | 141 | pinctrl-0 = <&pinctrl_i2c1>; |
---|
98 | 142 | status = "okay"; |
---|
99 | 143 | |
---|
| 144 | + gsc: gsc@20 { |
---|
| 145 | + compatible = "gw,gsc"; |
---|
| 146 | + reg = <0x20>; |
---|
| 147 | + interrupt-parent = <&gpio1>; |
---|
| 148 | + interrupts = <4 IRQ_TYPE_LEVEL_LOW>; |
---|
| 149 | + interrupt-controller; |
---|
| 150 | + #interrupt-cells = <1>; |
---|
| 151 | + #size-cells = <0>; |
---|
| 152 | + |
---|
| 153 | + adc { |
---|
| 154 | + compatible = "gw,gsc-adc"; |
---|
| 155 | + #address-cells = <1>; |
---|
| 156 | + #size-cells = <0>; |
---|
| 157 | + |
---|
| 158 | + channel@0 { |
---|
| 159 | + gw,mode = <0>; |
---|
| 160 | + reg = <0x00>; |
---|
| 161 | + label = "temp"; |
---|
| 162 | + }; |
---|
| 163 | + |
---|
| 164 | + channel@2 { |
---|
| 165 | + gw,mode = <1>; |
---|
| 166 | + reg = <0x02>; |
---|
| 167 | + label = "vdd_vin"; |
---|
| 168 | + }; |
---|
| 169 | + |
---|
| 170 | + channel@5 { |
---|
| 171 | + gw,mode = <1>; |
---|
| 172 | + reg = <0x05>; |
---|
| 173 | + label = "vdd_3p3"; |
---|
| 174 | + }; |
---|
| 175 | + |
---|
| 176 | + channel@8 { |
---|
| 177 | + gw,mode = <1>; |
---|
| 178 | + reg = <0x08>; |
---|
| 179 | + label = "vdd_bat"; |
---|
| 180 | + }; |
---|
| 181 | + |
---|
| 182 | + channel@b { |
---|
| 183 | + gw,mode = <1>; |
---|
| 184 | + reg = <0x0b>; |
---|
| 185 | + label = "vdd_5p0"; |
---|
| 186 | + }; |
---|
| 187 | + |
---|
| 188 | + channel@e { |
---|
| 189 | + gw,mode = <1>; |
---|
| 190 | + reg = <0xe>; |
---|
| 191 | + label = "vdd_arm"; |
---|
| 192 | + }; |
---|
| 193 | + |
---|
| 194 | + channel@11 { |
---|
| 195 | + gw,mode = <1>; |
---|
| 196 | + reg = <0x11>; |
---|
| 197 | + label = "vdd_soc"; |
---|
| 198 | + }; |
---|
| 199 | + |
---|
| 200 | + channel@14 { |
---|
| 201 | + gw,mode = <1>; |
---|
| 202 | + reg = <0x14>; |
---|
| 203 | + label = "vdd_3p0"; |
---|
| 204 | + }; |
---|
| 205 | + |
---|
| 206 | + channel@17 { |
---|
| 207 | + gw,mode = <1>; |
---|
| 208 | + reg = <0x17>; |
---|
| 209 | + label = "vdd_1p5"; |
---|
| 210 | + }; |
---|
| 211 | + |
---|
| 212 | + channel@1d { |
---|
| 213 | + gw,mode = <1>; |
---|
| 214 | + reg = <0x1d>; |
---|
| 215 | + label = "vdd_1p8"; |
---|
| 216 | + }; |
---|
| 217 | + |
---|
| 218 | + channel@20 { |
---|
| 219 | + gw,mode = <1>; |
---|
| 220 | + reg = <0x20>; |
---|
| 221 | + label = "vdd_1p0"; |
---|
| 222 | + }; |
---|
| 223 | + |
---|
| 224 | + channel@23 { |
---|
| 225 | + gw,mode = <1>; |
---|
| 226 | + reg = <0x23>; |
---|
| 227 | + label = "vdd_2p5"; |
---|
| 228 | + }; |
---|
| 229 | + }; |
---|
| 230 | + }; |
---|
| 231 | + |
---|
| 232 | + gsc_gpio: gpio@23 { |
---|
| 233 | + compatible = "nxp,pca9555"; |
---|
| 234 | + reg = <0x23>; |
---|
| 235 | + gpio-controller; |
---|
| 236 | + #gpio-cells = <2>; |
---|
| 237 | + interrupt-parent = <&gsc>; |
---|
| 238 | + interrupts = <4>; |
---|
| 239 | + }; |
---|
| 240 | + |
---|
100 | 241 | eeprom1: eeprom@50 { |
---|
101 | 242 | compatible = "atmel,24c02"; |
---|
102 | 243 | reg = <0x50>; |
---|
.. | .. |
---|
119 | 260 | compatible = "atmel,24c02"; |
---|
120 | 261 | reg = <0x53>; |
---|
121 | 262 | pagesize = <16>; |
---|
122 | | - }; |
---|
123 | | - |
---|
124 | | - gpio: pca9555@23 { |
---|
125 | | - compatible = "nxp,pca9555"; |
---|
126 | | - reg = <0x23>; |
---|
127 | | - gpio-controller; |
---|
128 | | - #gpio-cells = <2>; |
---|
129 | 263 | }; |
---|
130 | 264 | |
---|
131 | 265 | rtc: ds1672@68 { |
---|
.. | .. |
---|
263 | 397 | status = "okay"; |
---|
264 | 398 | }; |
---|
265 | 399 | |
---|
| 400 | +&usbotg { |
---|
| 401 | + vbus-supply = <®_5p0v>; |
---|
| 402 | + pinctrl-names = "default"; |
---|
| 403 | + pinctrl-0 = <&pinctrl_usbotg>; |
---|
| 404 | + disable-over-current; |
---|
| 405 | + status = "okay"; |
---|
| 406 | +}; |
---|
| 407 | + |
---|
266 | 408 | &wdog1 { |
---|
267 | 409 | pinctrl-names = "default"; |
---|
268 | 410 | pinctrl-0 = <&pinctrl_wdog>; |
---|
.. | .. |
---|
302 | 444 | fsl,pins = < |
---|
303 | 445 | MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1 |
---|
304 | 446 | MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1 |
---|
| 447 | + MX6QDL_PAD_GPIO_4__GPIO1_IO04 0xb0b1 |
---|
305 | 448 | >; |
---|
306 | 449 | }; |
---|
307 | 450 | |
---|
.. | .. |
---|
364 | 507 | >; |
---|
365 | 508 | }; |
---|
366 | 509 | |
---|
| 510 | + pinctrl_usbotg: usbotggrp { |
---|
| 511 | + fsl,pins = < |
---|
| 512 | + MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x13059 |
---|
| 513 | + >; |
---|
| 514 | + }; |
---|
| 515 | + |
---|
367 | 516 | pinctrl_wdog: wdoggrp { |
---|
368 | 517 | fsl,pins = < |
---|
369 | 518 | MX6QDL_PAD_DISP0_DAT8__WDOG1_B 0x1b0b0 |
---|