2 * Copyright 2014 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.
19 * You should have received a copy of the GNU General Public
20 * License along with this file; if not, write to the Free
21 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
26 * b) Permission is hereby granted, free of charge, to any person
27 * obtaining a copy of this software and associated documentation
28 * files (the "Software"), to deal in the Software without
29 * restriction, including without limitation the rights to use,
30 * copy, modify, merge, publish, distribute, sublicense, and/or
31 * sell copies of the Software, and to permit persons to whom the
32 * Software is furnished to do so, subject to the following
35 * The above copyright notice and this permission notice shall be
36 * included in all copies or substantial portions of the Software.
38 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
39 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
40 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
41 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
42 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
43 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
44 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
45 * OTHER DEALINGS IN THE SOFTWARE.
49 #include "sun7i-a20.dtsi"
50 #include "sunxi-common-regulators.dtsi"
52 #include <dt-bindings/gpio/gpio.h>
53 #include <dt-bindings/interrupt-controller/irq.h>
54 #include <dt-bindings/pinctrl/sun4i-a10.h>
57 model = "I12 / Q5 / QT840A A20 tvbox";
58 compatible = "allwinner,i12-tvbox", "allwinner,sun7i-a20";
62 pinctrl-names = "default";
63 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
64 vmmc-supply = <®_vcc3v3>;
66 cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
72 pinctrl-names = "default";
73 pinctrl-0 = <&mmc3_pins_a>;
74 vmmc-supply = <®_vmmc3>;
80 usbphy: phy@01c13400 {
81 usb1_vbus-supply = <®_usb1_vbus>;
82 usb2_vbus-supply = <®_usb2_vbus>;
103 mmc3_pins_a: mmc3@0 {
104 /* AP6210 / AP6330 requires pull-up */
105 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
108 vmmc3_pin_i12_tvbox: vmmc3_pin@0 {
109 allwinner,pins = "PH2";
110 allwinner,function = "gpio_out";
111 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
112 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
115 vmmc3_io_pin_i12_tvbox: vmmc3_io_pin@0 {
116 allwinner,pins = "PH12";
117 allwinner,function = "gpio_out";
118 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
119 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
122 gmac_power_pin_i12_tvbox: gmac_power_pin@0 {
123 allwinner,pins = "PH21";
124 allwinner,function = "gpio_out";
125 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
126 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
129 led_pins_i12_tvbox: led_pins@0 {
130 allwinner,pins = "PH9", "PH20";
131 allwinner,function = "gpio_out";
132 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
133 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
138 pinctrl-names = "default";
139 pinctrl-0 = <&ir0_pins_a>;
143 uart0: serial@01c28000 {
144 pinctrl-names = "default";
145 pinctrl-0 = <&uart0_pins_a>;
150 pinctrl-names = "default";
151 pinctrl-0 = <&i2c0_pins_a>;
155 compatible = "x-powers,axp209";
157 interrupt-parent = <&nmi_intc>;
158 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
160 interrupt-controller;
161 #interrupt-cells = <1>;
165 gmac: ethernet@01c50000 {
166 pinctrl-names = "default";
167 pinctrl-0 = <&gmac_pins_mii_a>;
170 phy-supply = <®_gmac_3v3>;
173 phy1: ethernet-phy@1 {
180 compatible = "gpio-leds";
181 pinctrl-names = "default";
182 pinctrl-0 = <&led_pins_i12_tvbox>;
185 label = "i12_tvbox:red:usr";
186 gpios = <&pio 7 9 GPIO_ACTIVE_LOW>;
190 label = "i12_tvbox:blue:usr";
191 gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
195 reg_usb1_vbus: usb1-vbus {
199 reg_usb2_vbus: usb2-vbus {
204 compatible = "regulator-fixed";
205 pinctrl-names = "default";
206 pinctrl-0 = <&vmmc3_pin_i12_tvbox>;
207 regulator-name = "vmmc3";
208 regulator-min-microvolt = <3300000>;
209 regulator-max-microvolt = <3300000>;
211 gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>;
214 reg_vmmc3_io: vmmc3-io {
215 compatible = "regulator-fixed";
216 pinctrl-names = "default";
217 pinctrl-0 = <&vmmc3_io_pin_i12_tvbox>;
218 regulator-name = "vmmc3-io";
219 regulator-min-microvolt = <3300000>;
220 regulator-max-microvolt = <3300000>;
221 /* This controls VCC-PI, must be always on! */
224 gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
227 reg_gmac_3v3: gmac-3v3 {
228 compatible = "regulator-fixed";
229 pinctrl-names = "default";
230 pinctrl-0 = <&gmac_power_pin_i12_tvbox>;
231 regulator-name = "gmac-3v3";
232 regulator-min-microvolt = <3300000>;
233 regulator-max-microvolt = <3300000>;
234 startup-delay-us = <50000>;
236 gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>;