2 * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
14 * This file is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use,
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
44 #include "sun4i-a10.dtsi"
45 #include "sunxi-common-regulators.dtsi"
46 #include <dt-bindings/gpio/gpio.h>
47 #include <dt-bindings/input/input.h>
48 #include <dt-bindings/interrupt-controller/irq.h>
51 model = "iNet-9F Rev 03";
52 compatible = "inet-tek,inet9f-rev03", "allwinner,sun4i-a10";
59 stdout-path = "serial0:115200n8";
63 compatible = "gpio-keys-polled";
64 pinctrl-names = "default";
65 pinctrl-0 = <&key_pins_inet9f>;
69 label = "Left Joystick Left";
71 linux,input-type = <EV_ABS>;
72 linux,input-value = <0xffffffff>; /* -1 */
73 gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
77 label = "Left Joystick Right";
79 linux,input-type = <EV_ABS>;
80 linux,input-value = <1>;
81 gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
85 label = "Left Joystick Up";
87 linux,input-type = <EV_ABS>;
88 linux,input-value = <0xffffffff>; /* -1 */
89 gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
93 label = "Left Joystick Down";
95 linux,input-type = <EV_ABS>;
96 linux,input-value = <1>;
97 gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
100 right-joystick-left {
101 label = "Right Joystick Left";
102 linux,code = <ABS_Z>;
103 linux,input-type = <EV_ABS>;
104 linux,input-value = <0xffffffff>; /* -1 */
105 gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
108 right-joystick-right {
109 label = "Right Joystick Right";
110 linux,code = <ABS_Z>;
111 linux,input-type = <EV_ABS>;
112 linux,input-value = <1>;
113 gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
117 label = "Right Joystick Up";
118 linux,code = <ABS_RZ>;
119 linux,input-type = <EV_ABS>;
120 linux,input-value = <0xffffffff>; /* -1 */
121 gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
124 right-joystick-down {
125 label = "Right Joystick Down";
126 linux,code = <ABS_RZ>;
127 linux,input-type = <EV_ABS>;
128 linux,input-value = <1>;
129 gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
134 linux,code = <ABS_HAT0X>;
135 linux,input-type = <EV_ABS>;
136 linux,input-value = <0xffffffff>; /* -1 */
137 gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
141 label = "DPad Right";
142 linux,code = <ABS_HAT0X>;
143 linux,input-type = <EV_ABS>;
144 linux,input-value = <1>;
145 gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
150 linux,code = <ABS_HAT0Y>;
151 linux,input-type = <EV_ABS>;
152 linux,input-value = <0xffffffff>; /* -1 */
153 gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
158 linux,code = <ABS_HAT0Y>;
159 linux,input-type = <EV_ABS>;
160 linux,input-value = <1>;
161 gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
166 linux,code = <BTN_X>;
167 gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
172 linux,code = <BTN_Y>;
173 gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
178 linux,code = <BTN_A>;
179 gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
184 linux,code = <BTN_B>;
185 gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
189 label = "Select Button";
190 linux,code = <BTN_SELECT>;
191 gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
195 label = "Start Button";
196 linux,code = <BTN_START>;
197 gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
201 label = "Top Left Button";
202 linux,code = <BTN_TL>;
203 gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
207 label = "Top Right Button";
208 linux,code = <BTN_TR>;
209 gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
215 cpu-supply = <®_dcdc2>;
231 #include "axp209.dtsi"
238 compatible = "bosch,bma250";
240 interrupt-parent = <&pio>;
241 interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
248 ft5406ee8: touchscreen@38 {
249 compatible = "edt,edt-ft5406";
251 interrupt-parent = <&pio>;
252 interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
253 touchscreen-size-x = <800>;
254 touchscreen-size-y = <480>;
259 vref-supply = <®_ldo2>;
264 linux,code = <KEY_MENU>;
271 linux,code = <KEY_VOLUMEUP>;
277 label = "Volume Down";
278 linux,code = <KEY_VOLUMEDOWN>;
285 linux,code = <KEY_HOMEPAGE>;
292 linux,code = <KEY_ESC>;
299 vmmc-supply = <®_vcc3v3>;
301 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
310 key_pins_inet9f: key-pins {
311 pins = "PA0", "PA1", "PA3", "PA4",
312 "PA5", "PA6", "PA8", "PA9",
313 "PA11", "PA12", "PA13",
314 "PA14", "PA15", "PA16", "PA17",
315 "PH22", "PH23", "PH24", "PH25", "PH26";
316 function = "gpio_in";
320 usb0_id_detect_pin: usb0-id-detect-pin {
322 function = "gpio_in";
326 usb0_vbus_detect_pin: usb0-vbus-detect-pin {
328 function = "gpio_in";
335 regulator-min-microvolt = <1000000>;
336 regulator-max-microvolt = <1400000>;
337 regulator-name = "vdd-cpu";
342 regulator-min-microvolt = <1250000>;
343 regulator-max-microvolt = <1250000>;
344 regulator-name = "vdd-int-dll";
348 regulator-name = "vdd-rtc";
353 regulator-min-microvolt = <3000000>;
354 regulator-max-microvolt = <3000000>;
355 regulator-name = "avcc";
367 pinctrl-names = "default";
368 pinctrl-0 = <&uart0_pb_pins>;
378 pinctrl-names = "default";
379 pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
380 usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
381 usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
382 usb0_vbus-supply = <®_usb0_vbus>;
383 usb2_vbus-supply = <®_usb2_vbus>;