2 * Copyright 2016 Free Electrons
3 * Copyright 2016 NextThing Co
5 * Mylène Josserand <mylene.josserand@free-electrons.com>
7 * This file is dual-licensed: you can use it either under the terms
8 * of the GPL or the X11 license, at your option. Note that this dual
9 * licensing only applies to this file, and not this project as a
12 * a) This file is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of the
15 * License, or (at your option) any later version.
17 * This file is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
24 * b) Permission is hereby granted, free of charge, to any person
25 * obtaining a copy of this software and associated documentation
26 * files (the "Software"), to deal in the Software without
27 * restriction, including without limitation the rights to use,
28 * copy, modify, merge, publish, distribute, sublicense, and/or
29 * sell copies of the Software, and to permit persons to whom the
30 * Software is furnished to do so, subject to the following
33 * The above copyright notice and this permission notice shall be
34 * included in all copies or substantial portions of the Software.
36 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43 * OTHER DEALINGS IN THE SOFTWARE.
47 #include "sun5i-gr8.dtsi"
48 #include "sunxi-common-regulators.dtsi"
50 #include <dt-bindings/gpio/gpio.h>
51 #include <dt-bindings/input/input.h>
52 #include <dt-bindings/interrupt-controller/irq.h>
55 model = "NextThing GR8-EVB";
56 compatible = "nextthing,gr8-evb", "nextthing,gr8";
67 stdout-path = "serial0:115200n8";
70 backlight: backlight {
71 compatible = "pwm-backlight";
72 pwms = <&pwm 0 10000 0>;
73 enable-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>;
75 brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
76 default-brightness-level = <8>;
80 compatible = "simple-audio-card";
81 simple-audio-card,name = "gr8-evb-wm8978";
82 simple-audio-card,format = "i2s";
83 simple-audio-card,mclk-fs = <512>;
85 simple-audio-card,cpu {
89 simple-audio-card,codec {
90 sound-dai = <&wm8978>;
95 compatible = "simple-audio-card";
96 simple-audio-card,name = "On-board SPDIF";
98 simple-audio-card,cpu {
102 simple-audio-card,codec {
103 sound-dai = <&spdif_out>;
107 spdif_out: spdif-out {
108 #sound-dai-cells = <0>;
109 compatible = "linux,spdif-dit";
126 pinctrl-names = "default";
127 pinctrl-0 = <&i2c0_pins_a>;
134 * The interrupt is routed through the "External Fast
135 * Interrupt Request" pin (ball G13 of the module)
136 * directly to the main interrupt controller, without
137 * any other controller interfering.
143 #include "axp209.dtsi"
146 pinctrl-names = "default";
147 pinctrl-0 = <&i2c1_pins_a>;
151 #sound-dai-cells = <0>;
152 compatible = "wlf,wm8978";
157 compatible = "phg,pcf8563";
163 pinctrl-names = "default";
164 pinctrl-0 = <&i2c2_pins_a>;
169 pinctrl-names = "default";
170 pinctrl-0 = <&i2s0_mclk_pins_a>, <&i2s0_data_pins_a>;
175 pinctrl-names = "default";
176 pinctrl-0 = <&ir0_rx_pins_a>;
181 vref-supply = <®_ldo2>;
186 linux,code = <KEY_VOLUMEUP>;
192 label = "Volume Down";
193 linux,code = <KEY_VOLUMEDOWN>;
200 linux,code = <KEY_MENU>;
207 linux,code = <KEY_SEARCH>;
214 linux,code = <KEY_HOMEPAGE>;
221 linux,code = <KEY_ESC>;
228 linux,code = <KEY_ENTER>;
235 pinctrl-names = "default";
236 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gr8_evb>;
237 vmmc-supply = <®_vcc3v3>;
239 cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
244 pinctrl-names = "default";
245 pinctrl-0 = <&nand_pins_a &nand_cs0_pins_a &nand_rb0_pins_a>;
247 /* MLC Support sucks for now */
260 mmc0_cd_pin_gr8_evb: mmc0-cd-pin@0 {
262 function = "gpio_in";
265 usb0_id_pin_gr8_evb: usb0-id-pin@0 {
267 function = "gpio_in";
270 usb0_vbus_det_pin_gr8_evb: usb0-vbus-det-pin@0 {
272 function = "gpio_in";
275 usb1_vbus_pin_gr8_evb: usb1-vbus-pin@0 {
277 function = "gpio_out";
282 pinctrl-names = "default";
283 pinctrl-0 = <&pwm0_pins>;
288 regulator-min-microvolt = <1000000>;
289 regulator-max-microvolt = <1400000>;
290 regulator-name = "vdd-cpu";
295 regulator-min-microvolt = <1000000>;
296 regulator-max-microvolt = <1300000>;
297 regulator-name = "vdd-sys";
302 regulator-name = "vdd-rtc";
306 regulator-min-microvolt = <2700000>;
307 regulator-max-microvolt = <3300000>;
308 regulator-name = "avcc";
313 pinctrl-0 = <&usb1_vbus_pin_gr8_evb>;
314 gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
319 allwinner,ts-attached;
323 pinctrl-names = "default";
324 pinctrl-0 = <&spdif_tx_pins_a>;
333 pinctrl-names = "default";
334 pinctrl-0 = <&uart1_pins_b>, <&uart1_cts_rts_pins_a>;
340 * The GR8-EVB has a somewhat interesting design. There's a
341 * pin supposed to control VBUS, an ID pin, a VBUS detect pin,
342 * so everything should work just fine.
344 * Except that the pin supposed to control VBUS is not
345 * connected to any controllable output, neither to the SoC
346 * through a GPIO or to the PMIC, and it is pulled down,
347 * meaning that we will never be able to enable VBUS on this
359 pinctrl-names = "default";
360 pinctrl-0 = <&usb0_id_pin_gr8_evb>, <&usb0_vbus_det_pin_gr8_evb>;
361 usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
362 usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
363 usb0_vbus_power-supply = <&usb_power_supply>;
364 usb1_vbus-supply = <®_usb1_vbus>;