blob: 5f817b65ceeaae83d0352c7f9743698aa3efd10e [file] [log] [blame]
Oliver Schinagl01ed6632013-10-08 10:22:32 +02001/*
2 * Copyright 2013 Oliver Schinagl
3 *
4 * Oliver Schinagl <oliver@schinagl.nl>
5 *
6 * The code contained herein is licensed under the GNU General Public
7 * License. You may obtain a copy of the GNU General Public License
8 * Version 2 or later at the following locations:
9 *
10 * http://www.opensource.org/licenses/gpl-license.html
11 * http://www.gnu.org/copyleft/gpl.html
12 */
13
14/dts-v1/;
Maxime Ripard71455702014-12-16 22:59:54 +010015#include "sun7i-a20.dtsi"
16#include "sunxi-common-regulators.dtsi"
Oliver Schinagl01ed6632013-10-08 10:22:32 +020017
Maxime Ripardbca12922014-12-16 22:59:55 +010018#include <dt-bindings/gpio/gpio.h>
Maxime Riparda6bac9e2014-12-16 22:59:59 +010019#include <dt-bindings/interrupt-controller/irq.h>
Maxime Ripard092a0c32014-12-16 22:59:57 +010020#include <dt-bindings/pinctrl/sun4i-a10.h>
Maxime Ripardbca12922014-12-16 22:59:55 +010021
Oliver Schinagl01ed6632013-10-08 10:22:32 +020022/ {
23 model = "Cubietech Cubietruck";
24 compatible = "cubietech,cubietruck", "allwinner,sun7i-a20";
25
26 soc@01c00000 {
Hans de Goedec6211832014-05-02 17:57:28 +020027 mmc0: mmc@01c0f000 {
28 pinctrl-names = "default";
29 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
Hans de Goede0ed9eab2014-05-11 09:46:57 +020030 vmmc-supply = <&reg_vcc3v3>;
Hans de Goedec6211832014-05-02 17:57:28 +020031 bus-width = <4>;
Maxime Ripardbca12922014-12-16 22:59:55 +010032 cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
Hans de Goedec6211832014-05-02 17:57:28 +020033 cd-inverted;
34 status = "okay";
35 };
36
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +020037 mmc3: mmc@01c12000 {
38 pinctrl-names = "default";
39 pinctrl-0 = <&mmc3_pins_a>;
40 vmmc-supply = <&reg_vmmc3>;
Hans de Goedec5b72612014-05-21 19:43:30 +020041 bus-width = <4>;
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +020042 non-removable;
43 status = "okay";
44 };
45
Hans de Goedea415eef2014-03-01 20:26:34 +010046 usbphy: phy@01c13400 {
Roman Byshkoa7679b62014-11-10 19:55:10 +010047 usb0_vbus-supply = <&reg_usb0_vbus>;
Hans de Goedea415eef2014-03-01 20:26:34 +010048 usb1_vbus-supply = <&reg_usb1_vbus>;
49 usb2_vbus-supply = <&reg_usb2_vbus>;
50 status = "okay";
51 };
52
53 ehci0: usb@01c14000 {
54 status = "okay";
55 };
56
57 ohci0: usb@01c14400 {
58 status = "okay";
59 };
60
Hans de Goede902febf2014-03-01 20:26:22 +010061 ahci: sata@01c18000 {
62 target-supply = <&reg_ahci_5v>;
63 status = "okay";
64 };
65
Hans de Goedea415eef2014-03-01 20:26:34 +010066 ehci1: usb@01c1c000 {
67 status = "okay";
68 };
69
70 ohci1: usb@01c1c400 {
71 status = "okay";
72 };
73
Oliver Schinagl01ed6632013-10-08 10:22:32 +020074 pinctrl@01c20800 {
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +020075 mmc3_pins_a: mmc3@0 {
76 /* AP6210 requires pull-up */
Maxime Ripard092a0c32014-12-16 22:59:57 +010077 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +020078 };
79
80 vmmc3_pin_cubietruck: vmmc3_pin@0 {
81 allwinner,pins = "PH9";
82 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +010083 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
84 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +020085 };
86
Hans de Goede902febf2014-03-01 20:26:22 +010087 ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
88 allwinner,pins = "PH12";
89 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +010090 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
91 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Hans de Goede902febf2014-03-01 20:26:22 +010092 };
93
Oliver Schinagl01ed6632013-10-08 10:22:32 +020094 led_pins_cubietruck: led_pins@0 {
95 allwinner,pins = "PH7", "PH11", "PH20", "PH21";
96 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +010097 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
98 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Oliver Schinagl01ed6632013-10-08 10:22:32 +020099 };
Roman Byshko9eb1e272014-11-10 19:55:09 +0100100
101 usb0_vbus_pin_a: usb0_vbus_pin@0 {
102 allwinner,pins = "PH17";
103 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +0100104 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
105 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Roman Byshko9eb1e272014-11-10 19:55:09 +0100106 };
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200107 };
108
Alexandre Belloni96ac3b32014-04-28 18:17:14 +0200109 pwm: pwm@01c20e00 {
110 pinctrl-names = "default";
111 pinctrl-0 = <&pwm0_pins_a>, <&pwm1_pins_a>;
112 status = "okay";
113 };
114
Alexander Bersenev02564522014-06-09 00:08:13 +0600115 ir0: ir@01c21800 {
116 pinctrl-names = "default";
117 pinctrl-0 = <&ir0_pins_a>;
118 status = "okay";
119 };
120
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200121 uart0: serial@01c28000 {
122 pinctrl-names = "default";
123 pinctrl-0 = <&uart0_pins_a>;
124 status = "okay";
125 };
Chen-Yu Tsai62673552014-01-06 13:58:12 +0800126
127 i2c0: i2c@01c2ac00 {
128 pinctrl-names = "default";
129 pinctrl-0 = <&i2c0_pins_a>;
130 status = "okay";
Carlo Caioneec0c9332014-06-30 23:57:53 +0200131
132 axp209: pmic@34 {
Carlo Caioneec0c9332014-06-30 23:57:53 +0200133 reg = <0x34>;
134 interrupt-parent = <&nmi_intc>;
Maxime Riparda6bac9e2014-12-16 22:59:59 +0100135 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
Carlo Caioneec0c9332014-06-30 23:57:53 +0200136 };
Chen-Yu Tsai62673552014-01-06 13:58:12 +0800137 };
138
139 i2c1: i2c@01c2b000 {
140 pinctrl-names = "default";
141 pinctrl-0 = <&i2c1_pins_a>;
142 status = "okay";
143 };
144
145 i2c2: i2c@01c2b400 {
146 pinctrl-names = "default";
147 pinctrl-0 = <&i2c2_pins_a>;
148 status = "okay";
149 };
Chen-Yu Tsai67073d92014-02-10 18:35:51 +0800150
151 gmac: ethernet@01c50000 {
152 pinctrl-names = "default";
153 pinctrl-0 = <&gmac_pins_rgmii_a>;
154 phy = <&phy1>;
155 phy-mode = "rgmii";
156 status = "okay";
157
158 phy1: ethernet-phy@1 {
159 reg = <1>;
160 };
161 };
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200162 };
163
164 leds {
165 compatible = "gpio-leds";
166 pinctrl-names = "default";
167 pinctrl-0 = <&led_pins_cubietruck>;
168
169 blue {
170 label = "cubietruck:blue:usr";
Maxime Ripardbca12922014-12-16 22:59:55 +0100171 gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200172 };
173
174 orange {
175 label = "cubietruck:orange:usr";
Maxime Ripardbca12922014-12-16 22:59:55 +0100176 gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200177 };
178
179 white {
180 label = "cubietruck:white:usr";
Maxime Ripardbca12922014-12-16 22:59:55 +0100181 gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>;
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200182 };
183
184 green {
185 label = "cubietruck:green:usr";
Maxime Ripardbca12922014-12-16 22:59:55 +0100186 gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>;
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200187 };
188 };
Hans de Goede902febf2014-03-01 20:26:22 +0100189
190 reg_ahci_5v: ahci-5v {
191 pinctrl-0 = <&ahci_pwr_pin_cubietruck>;
Maxime Ripardbca12922014-12-16 22:59:55 +0100192 gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
Hans de Goede902febf2014-03-01 20:26:22 +0100193 status = "okay";
194 };
Hans de Goedea415eef2014-03-01 20:26:34 +0100195
Roman Byshko9eb1e272014-11-10 19:55:09 +0100196 reg_usb0_vbus: usb0-vbus {
197 pinctrl-0 = <&usb0_vbus_pin_a>;
Maxime Ripardbca12922014-12-16 22:59:55 +0100198 gpio = <&pio 7 17 GPIO_ACTIVE_HIGH>;
Roman Byshko9eb1e272014-11-10 19:55:09 +0100199 status = "okay";
200 };
201
Hans de Goedea415eef2014-03-01 20:26:34 +0100202 reg_usb1_vbus: usb1-vbus {
203 status = "okay";
204 };
205
206 reg_usb2_vbus: usb2-vbus {
207 status = "okay";
208 };
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +0200209
210 reg_vmmc3: vmmc3 {
211 compatible = "regulator-fixed";
212 pinctrl-names = "default";
213 pinctrl-0 = <&vmmc3_pin_cubietruck>;
214 regulator-name = "vmmc3";
215 regulator-min-microvolt = <3300000>;
216 regulator-max-microvolt = <3300000>;
217 enable-active-high;
Maxime Ripardbca12922014-12-16 22:59:55 +0100218 gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>;
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +0200219 };
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200220};
Chen-Yu Tsai0d4e29342015-01-12 12:34:05 +0800221
222#include "axp209.dtsi"
223
224&cpu0 {
225 cpu-supply = <&reg_dcdc2>;
226};
227
228&reg_dcdc2 {
229 regulator-always-on;
230 regulator-min-microvolt = <1000000>;
231 regulator-max-microvolt = <1450000>;
232 regulator-name = "vdd-cpu";
233};
234
235&reg_dcdc3 {
236 regulator-always-on;
237 regulator-min-microvolt = <1000000>;
238 regulator-max-microvolt = <1400000>;
239 regulator-name = "vdd-int-dll";
240};
241
242&reg_ldo1 {
243 regulator-name = "vdd-rtc";
244};
245
246&reg_ldo2 {
247 regulator-always-on;
248 regulator-min-microvolt = <3000000>;
249 regulator-max-microvolt = <3000000>;
250 regulator-name = "avcc";
251};