Commit | Line | Data |
---|---|---|
f055f1f6 SR |
1 | /* |
2 | * Copyright 2012 Stefan Roese | |
3 | * Stefan Roese <sr@denx.de> | |
4 | * | |
dead1971 MR |
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. | |
f055f1f6 | 9 | * |
dead1971 MR |
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. | |
f055f1f6 SR |
47 | */ |
48 | ||
49 | /dts-v1/; | |
71455701 MR |
50 | #include "sun4i-a10.dtsi" |
51 | #include "sunxi-common-regulators.dtsi" | |
f055f1f6 | 52 | |
bca12924 | 53 | #include <dt-bindings/gpio/gpio.h> |
092a0c3b | 54 | #include <dt-bindings/pinctrl/sun4i-a10.h> |
bca12924 | 55 | |
f055f1f6 SR |
56 | / { |
57 | model = "Cubietech Cubieboard"; | |
68136b10 | 58 | compatible = "cubietech,a10-cubieboard", "allwinner,sun4i-a10"; |
f055f1f6 | 59 | |
7e362103 EL |
60 | leds { |
61 | compatible = "gpio-leds"; | |
62 | pinctrl-names = "default"; | |
63 | pinctrl-0 = <&led_pins_cubieboard>; | |
64 | ||
65 | blue { | |
b9614183 | 66 | label = "cubieboard:blue:usr"; |
bca12924 | 67 | gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* LED1 */ |
7e362103 EL |
68 | }; |
69 | ||
70 | green { | |
b9614183 | 71 | label = "cubieboard:green:usr"; |
bca12924 | 72 | gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; /* LED2 */ |
7e362103 EL |
73 | linux,default-trigger = "heartbeat"; |
74 | }; | |
75 | }; | |
8fd5cfc7 | 76 | }; |
248bd1e2 | 77 | |
8fd5cfc7 MR |
78 | &ahci { |
79 | target-supply = <®_ahci_5v>; | |
80 | status = "okay"; | |
81 | }; | |
82 | ||
83 | &cpu0 { | |
84 | cpu-supply = <®_dcdc2>; | |
85 | }; | |
86 | ||
87 | &ehci0 { | |
88 | status = "okay"; | |
89 | }; | |
90 | ||
91 | &ehci1 { | |
92 | status = "okay"; | |
93 | }; | |
94 | ||
95 | &emac { | |
96 | pinctrl-names = "default"; | |
97 | pinctrl-0 = <&emac_pins_a>; | |
98 | phy = <&phy1>; | |
99 | status = "okay"; | |
100 | }; | |
f28f9eb4 | 101 | |
8fd5cfc7 MR |
102 | &i2c0 { |
103 | pinctrl-names = "default"; | |
104 | pinctrl-0 = <&i2c0_pins_a>; | |
105 | status = "okay"; | |
106 | ||
107 | axp209: pmic@34 { | |
108 | reg = <0x34>; | |
109 | interrupts = <0>; | |
f28f9eb4 | 110 | }; |
8fd5cfc7 | 111 | }; |
f28f9eb4 | 112 | |
8fd5cfc7 MR |
113 | &i2c1 { |
114 | pinctrl-names = "default"; | |
115 | pinctrl-0 = <&i2c1_pins_a>; | |
116 | status = "okay"; | |
117 | }; | |
118 | ||
119 | &ir0 { | |
120 | pinctrl-names = "default"; | |
121 | pinctrl-0 = <&ir0_pins_a>; | |
122 | status = "okay"; | |
123 | }; | |
124 | ||
125 | &mdio { | |
126 | status = "okay"; | |
127 | ||
128 | phy1: ethernet-phy@1 { | |
129 | reg = <1>; | |
f28f9eb4 | 130 | }; |
f055f1f6 | 131 | }; |
ce124f7a | 132 | |
8fd5cfc7 MR |
133 | &mmc0 { |
134 | pinctrl-names = "default"; | |
135 | pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; | |
136 | vmmc-supply = <®_vcc3v3>; | |
137 | bus-width = <4>; | |
138 | cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ | |
139 | cd-inverted; | |
140 | status = "okay"; | |
141 | }; | |
ce124f7a | 142 | |
8fd5cfc7 MR |
143 | &ohci0 { |
144 | status = "okay"; | |
ce124f7a CYT |
145 | }; |
146 | ||
8fd5cfc7 MR |
147 | &ohci1 { |
148 | status = "okay"; | |
149 | }; | |
150 | ||
151 | &pio { | |
152 | led_pins_cubieboard: led_pins@0 { | |
153 | allwinner,pins = "PH20", "PH21"; | |
154 | allwinner,function = "gpio_out"; | |
155 | allwinner,drive = <SUN4I_PINCTRL_20_MA>; | |
156 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; | |
157 | }; | |
158 | }; | |
159 | ||
160 | ®_ahci_5v { | |
161 | status = "okay"; | |
162 | }; | |
163 | ||
164 | #include "axp209.dtsi" | |
165 | ||
ce124f7a CYT |
166 | ®_dcdc2 { |
167 | regulator-always-on; | |
168 | regulator-min-microvolt = <1000000>; | |
169 | regulator-max-microvolt = <1450000>; | |
170 | regulator-name = "vdd-cpu"; | |
171 | }; | |
172 | ||
173 | ®_dcdc3 { | |
174 | regulator-always-on; | |
175 | regulator-min-microvolt = <1000000>; | |
176 | regulator-max-microvolt = <1400000>; | |
177 | regulator-name = "vdd-int-dll"; | |
178 | }; | |
179 | ||
180 | ®_ldo1 { | |
181 | regulator-name = "vdd-rtc"; | |
182 | }; | |
183 | ||
184 | ®_ldo2 { | |
185 | regulator-always-on; | |
186 | regulator-min-microvolt = <3000000>; | |
187 | regulator-max-microvolt = <3000000>; | |
188 | regulator-name = "avcc"; | |
189 | }; | |
8fd5cfc7 MR |
190 | |
191 | ®_usb1_vbus { | |
192 | status = "okay"; | |
193 | }; | |
194 | ||
195 | ®_usb2_vbus { | |
196 | status = "okay"; | |
197 | }; | |
198 | ||
199 | &spi0 { | |
200 | pinctrl-names = "default"; | |
201 | pinctrl-0 = <&spi0_pins_a>; | |
202 | status = "okay"; | |
203 | }; | |
204 | ||
205 | &uart0 { | |
206 | pinctrl-names = "default"; | |
207 | pinctrl-0 = <&uart0_pins_a>; | |
208 | status = "okay"; | |
209 | }; | |
210 | ||
211 | &usbphy { | |
212 | usb1_vbus-supply = <®_usb1_vbus>; | |
213 | usb2_vbus-supply = <®_usb2_vbus>; | |
214 | status = "okay"; | |
215 | }; |