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>;
71 label = "Left Joystick Left";
73 linux,input-type = <EV_ABS>;
74 linux,input-value = <0xffffffff>; /* -1 */
75 gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
79 label = "Left Joystick Right";
81 linux,input-type = <EV_ABS>;
82 linux,input-value = <1>;
83 gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
87 label = "Left Joystick Up";
89 linux,input-type = <EV_ABS>;
90 linux,input-value = <0xffffffff>; /* -1 */
91 gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
95 label = "Left Joystick Down";
97 linux,input-type = <EV_ABS>;
98 linux,input-value = <1>;
99 gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
103 label = "Right Joystick Left";
104 linux,code = <ABS_Z>;
105 linux,input-type = <EV_ABS>;
106 linux,input-value = <0xffffffff>; /* -1 */
107 gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
111 label = "Right Joystick Right";
112 linux,code = <ABS_Z>;
113 linux,input-type = <EV_ABS>;
114 linux,input-value = <1>;
115 gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
119 label = "Right Joystick Up";
120 linux,code = <ABS_RZ>;
121 linux,input-type = <EV_ABS>;
122 linux,input-value = <0xffffffff>; /* -1 */
123 gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
127 label = "Right Joystick Down";
128 linux,code = <ABS_RZ>;
129 linux,input-type = <EV_ABS>;
130 linux,input-value = <1>;
131 gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
136 linux,code = <ABS_HAT0X>;
137 linux,input-type = <EV_ABS>;
138 linux,input-value = <0xffffffff>; /* -1 */
139 gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
143 label = "DPad Right";
144 linux,code = <ABS_HAT0X>;
145 linux,input-type = <EV_ABS>;
146 linux,input-value = <1>;
147 gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
152 linux,code = <ABS_HAT0Y>;
153 linux,input-type = <EV_ABS>;
154 linux,input-value = <0xffffffff>; /* -1 */
155 gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
160 linux,code = <ABS_HAT0Y>;
161 linux,input-type = <EV_ABS>;
162 linux,input-value = <1>;
163 gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
168 linux,code = <BTN_X>;
169 gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
174 linux,code = <BTN_Y>;
175 gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
180 linux,code = <BTN_A>;
181 gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
186 linux,code = <BTN_B>;
187 gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
191 label = "Select Button";
192 linux,code = <BTN_SELECT>;
193 gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
197 label = "Start Button";
198 linux,code = <BTN_START>;
199 gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
203 label = "Top Left Button";
204 linux,code = <BTN_TL>;
205 gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
209 label = "Top Right Button";
210 linux,code = <BTN_TR>;
211 gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
217 cpu-supply = <®_dcdc2>;
225 pinctrl-names = "default";
226 pinctrl-0 = <&i2c0_pins_a>;
235 #include "axp209.dtsi"
238 pinctrl-names = "default";
239 pinctrl-0 = <&i2c1_pins_a>;
244 compatible = "bosch,bma250";
246 interrupt-parent = <&pio>;
247 interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
252 pinctrl-names = "default";
253 pinctrl-0 = <&i2c2_pins_a>;
256 ft5406ee8: touchscreen@38 {
257 compatible = "edt,edt-ft5406";
259 interrupt-parent = <&pio>;
260 interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
261 touchscreen-size-x = <800>;
262 touchscreen-size-y = <480>;
267 vref-supply = <®_ldo2>;
272 linux,code = <KEY_MENU>;
279 linux,code = <KEY_VOLUMEUP>;
285 label = "Volume Down";
286 linux,code = <KEY_VOLUMEDOWN>;
293 linux,code = <KEY_HOMEPAGE>;
300 linux,code = <KEY_ESC>;
307 pinctrl-names = "default";
308 pinctrl-0 = <&mmc0_pins_a>;
309 vmmc-supply = <®_vcc3v3>;
311 cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
321 key_pins_inet9f: key_pins@0 {
322 pins = "PA0", "PA1", "PA3", "PA4",
323 "PA5", "PA6", "PA8", "PA9",
324 "PA11", "PA12", "PA13",
325 "PA14", "PA15", "PA16", "PA17",
326 "PH22", "PH23", "PH24", "PH25", "PH26";
327 function = "gpio_in";
331 usb0_id_detect_pin: usb0_id_detect_pin@0 {
333 function = "gpio_in";
337 usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
339 function = "gpio_in";
346 regulator-min-microvolt = <1000000>;
347 regulator-max-microvolt = <1400000>;
348 regulator-name = "vdd-cpu";
353 regulator-min-microvolt = <1250000>;
354 regulator-max-microvolt = <1250000>;
355 regulator-name = "vdd-int-dll";
359 regulator-name = "vdd-rtc";
364 regulator-min-microvolt = <3000000>;
365 regulator-max-microvolt = <3000000>;
366 regulator-name = "avcc";
378 pinctrl-names = "default";
379 pinctrl-0 = <&uart0_pins_a>;
389 pinctrl-names = "default";
390 pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
391 usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
392 usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
393 usb0_vbus-supply = <®_usb0_vbus>;
394 usb2_vbus-supply = <®_usb2_vbus>;