blob: 0ba67d79c2b4a8c020de8ee5b63790d872db6525 [file] [log] [blame]
Hans de Goede53ab4af2015-04-15 19:03:49 +02001/*
2 * Copyright 2012 Stefan Roese
3 * Stefan Roese <sr@denx.de>
4 *
5 * This file is dual-licensed: you can use it either under the terms
6 * of the GPL or the X11 license, at your option. Note that this dual
7 * licensing only applies to this file, and not this project as a
8 * whole.
9 *
10 * a) This file is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
14 *
15 * This file is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public
21 * License along with this file; if not, write to the Free
22 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
23 * MA 02110-1301 USA
24 *
25 * Or, alternatively,
26 *
27 * b) Permission is hereby granted, free of charge, to any person
28 * obtaining a copy of this software and associated documentation
29 * files (the "Software"), to deal in the Software without
30 * restriction, including without limitation the rights to use,
31 * copy, modify, merge, publish, distribute, sublicense, and/or
32 * sell copies of the Software, and to permit persons to whom the
33 * Software is furnished to do so, subject to the following
34 * conditions:
35 *
36 * The above copyright notice and this permission notice shall be
37 * included in all copies or substantial portions of the Software.
38 *
39 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
40 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
41 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
42 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
43 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
44 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
45 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
46 * OTHER DEALINGS IN THE SOFTWARE.
47 */
48
49/dts-v1/;
50#include "sun4i-a10.dtsi"
51#include "sunxi-common-regulators.dtsi"
52
53#include <dt-bindings/gpio/gpio.h>
54#include <dt-bindings/pinctrl/sun4i-a10.h>
55
56/ {
57 model = "Cubietech Cubieboard";
58 compatible = "cubietech,a10-cubieboard", "allwinner,sun4i-a10";
59
60 aliases {
61 serial0 = &uart0;
62 };
63
64 chosen {
65 stdout-path = "serial0:115200n8";
66 };
67
68 leds {
69 compatible = "gpio-leds";
70 pinctrl-names = "default";
71 pinctrl-0 = <&led_pins_cubieboard>;
72
73 blue {
74 label = "cubieboard:blue:usr";
75 gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* LED1 */
76 };
77
78 green {
79 label = "cubieboard:green:usr";
80 gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; /* LED2 */
81 linux,default-trigger = "heartbeat";
82 };
83 };
84};
85
86&ahci {
87 target-supply = <&reg_ahci_5v>;
88 status = "okay";
89};
90
91&cpu0 {
92 cpu-supply = <&reg_dcdc2>;
93};
94
95&ehci0 {
96 status = "okay";
97};
98
99&ehci1 {
100 status = "okay";
101};
102
103&emac {
104 pinctrl-names = "default";
105 pinctrl-0 = <&emac_pins_a>;
106 phy = <&phy1>;
107 status = "okay";
108};
109
110&i2c0 {
111 pinctrl-names = "default";
112 pinctrl-0 = <&i2c0_pins_a>;
113 status = "okay";
114
115 axp209: pmic@34 {
116 reg = <0x34>;
117 interrupts = <0>;
118 };
119};
120
121&i2c1 {
122 pinctrl-names = "default";
123 pinctrl-0 = <&i2c1_pins_a>;
124 status = "okay";
125};
126
127&ir0 {
128 pinctrl-names = "default";
129 pinctrl-0 = <&ir0_pins_a>;
130 status = "okay";
131};
132
133&mdio {
134 status = "okay";
135
136 phy1: ethernet-phy@1 {
137 reg = <1>;
138 };
139};
140
141&mmc0 {
142 pinctrl-names = "default";
143 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
144 vmmc-supply = <&reg_vcc3v3>;
145 bus-width = <4>;
146 cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
147 cd-inverted;
148 status = "okay";
149};
150
151&ohci0 {
152 status = "okay";
153};
154
155&ohci1 {
156 status = "okay";
157};
158
159&pio {
160 led_pins_cubieboard: led_pins@0 {
161 allwinner,pins = "PH20", "PH21";
162 allwinner,function = "gpio_out";
163 allwinner,drive = <SUN4I_PINCTRL_20_MA>;
164 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
165 };
166};
167
168&reg_ahci_5v {
169 status = "okay";
170};
171
172#include "axp209.dtsi"
173
174&reg_dcdc2 {
175 regulator-always-on;
176 regulator-min-microvolt = <1000000>;
177 regulator-max-microvolt = <1450000>;
178 regulator-name = "vdd-cpu";
179};
180
181&reg_dcdc3 {
182 regulator-always-on;
183 regulator-min-microvolt = <1000000>;
184 regulator-max-microvolt = <1400000>;
185 regulator-name = "vdd-int-dll";
186};
187
188&reg_ldo1 {
189 regulator-name = "vdd-rtc";
190};
191
192&reg_ldo2 {
193 regulator-always-on;
194 regulator-min-microvolt = <3000000>;
195 regulator-max-microvolt = <3000000>;
196 regulator-name = "avcc";
197};
198
199&reg_usb1_vbus {
200 status = "okay";
201};
202
203&reg_usb2_vbus {
204 status = "okay";
205};
206
207&spi0 {
208 pinctrl-names = "default";
209 pinctrl-0 = <&spi0_pins_a>;
210 status = "okay";
211};
212
213&uart0 {
214 pinctrl-names = "default";
215 pinctrl-0 = <&uart0_pins_a>;
216 status = "okay";
217};
218
219&usbphy {
220 usb1_vbus-supply = <&reg_usb1_vbus>;
221 usb2_vbus-supply = <&reg_usb2_vbus>;
222 status = "okay";
223};