diff options
Diffstat (limited to 'arch/arm/boot/dts/sun7i-a20-cubietruck.dts')
-rw-r--r-- | arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 125 |
1 files changed, 96 insertions, 29 deletions
diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts index a281d259b9b8..8f74a649576d 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts | |||
@@ -3,17 +3,57 @@ | |||
3 | * | 3 | * |
4 | * Oliver Schinagl <oliver@schinagl.nl> | 4 | * Oliver Schinagl <oliver@schinagl.nl> |
5 | * | 5 | * |
6 | * The code contained herein is licensed under the GNU General Public | 6 | * This file is dual-licensed: you can use it either under the terms |
7 | * License. You may obtain a copy of the GNU General Public License | 7 | * of the GPL or the X11 license, at your option. Note that this dual |
8 | * Version 2 or later at the following locations: | 8 | * licensing only applies to this file, and not this project as a |
9 | * whole. | ||
9 | * | 10 | * |
10 | * http://www.opensource.org/licenses/gpl-license.html | 11 | * a) This file is free software; you can redistribute it and/or |
11 | * http://www.gnu.org/copyleft/gpl.html | 12 | * modify it under the terms of the GNU General Public License as |
13 | * published by the Free Software Foundation; either version 2 of the | ||
14 | * License, or (at your option) any later version. | ||
15 | * | ||
16 | * This file is distributed in the hope that it will be useful, | ||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | * GNU General Public License for more details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU General Public | ||
22 | * License along with this file; if not, write to the Free | ||
23 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, | ||
24 | * MA 02110-1301 USA | ||
25 | * | ||
26 | * Or, alternatively, | ||
27 | * | ||
28 | * b) Permission is hereby granted, free of charge, to any person | ||
29 | * obtaining a copy of this software and associated documentation | ||
30 | * files (the "Software"), to deal in the Software without | ||
31 | * restriction, including without limitation the rights to use, | ||
32 | * copy, modify, merge, publish, distribute, sublicense, and/or | ||
33 | * sell copies of the Software, and to permit persons to whom the | ||
34 | * Software is furnished to do so, subject to the following | ||
35 | * conditions: | ||
36 | * | ||
37 | * The above copyright notice and this permission notice shall be | ||
38 | * included in all copies or substantial portions of the Software. | ||
39 | * | ||
40 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
41 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
42 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
43 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
44 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
45 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
46 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
47 | * OTHER DEALINGS IN THE SOFTWARE. | ||
12 | */ | 48 | */ |
13 | 49 | ||
14 | /dts-v1/; | 50 | /dts-v1/; |
15 | /include/ "sun7i-a20.dtsi" | 51 | #include "sun7i-a20.dtsi" |
16 | /include/ "sunxi-common-regulators.dtsi" | 52 | #include "sunxi-common-regulators.dtsi" |
53 | |||
54 | #include <dt-bindings/gpio/gpio.h> | ||
55 | #include <dt-bindings/interrupt-controller/irq.h> | ||
56 | #include <dt-bindings/pinctrl/sun4i-a10.h> | ||
17 | 57 | ||
18 | / { | 58 | / { |
19 | model = "Cubietech Cubietruck"; | 59 | model = "Cubietech Cubietruck"; |
@@ -25,7 +65,7 @@ | |||
25 | pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; | 65 | pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; |
26 | vmmc-supply = <®_vcc3v3>; | 66 | vmmc-supply = <®_vcc3v3>; |
27 | bus-width = <4>; | 67 | bus-width = <4>; |
28 | cd-gpios = <&pio 7 1 0>; /* PH1 */ | 68 | cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ |
29 | cd-inverted; | 69 | cd-inverted; |
30 | status = "okay"; | 70 | status = "okay"; |
31 | }; | 71 | }; |
@@ -70,35 +110,35 @@ | |||
70 | pinctrl@01c20800 { | 110 | pinctrl@01c20800 { |
71 | mmc3_pins_a: mmc3@0 { | 111 | mmc3_pins_a: mmc3@0 { |
72 | /* AP6210 requires pull-up */ | 112 | /* AP6210 requires pull-up */ |
73 | allwinner,pull = <1>; | 113 | allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; |
74 | }; | 114 | }; |
75 | 115 | ||
76 | vmmc3_pin_cubietruck: vmmc3_pin@0 { | 116 | vmmc3_pin_cubietruck: vmmc3_pin@0 { |
77 | allwinner,pins = "PH9"; | 117 | allwinner,pins = "PH9"; |
78 | allwinner,function = "gpio_out"; | 118 | allwinner,function = "gpio_out"; |
79 | allwinner,drive = <0>; | 119 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
80 | allwinner,pull = <0>; | 120 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
81 | }; | 121 | }; |
82 | 122 | ||
83 | ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 { | 123 | ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 { |
84 | allwinner,pins = "PH12"; | 124 | allwinner,pins = "PH12"; |
85 | allwinner,function = "gpio_out"; | 125 | allwinner,function = "gpio_out"; |
86 | allwinner,drive = <0>; | 126 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
87 | allwinner,pull = <0>; | 127 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
88 | }; | 128 | }; |
89 | 129 | ||
90 | led_pins_cubietruck: led_pins@0 { | 130 | led_pins_cubietruck: led_pins@0 { |
91 | allwinner,pins = "PH7", "PH11", "PH20", "PH21"; | 131 | allwinner,pins = "PH7", "PH11", "PH20", "PH21"; |
92 | allwinner,function = "gpio_out"; | 132 | allwinner,function = "gpio_out"; |
93 | allwinner,drive = <0>; | 133 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
94 | allwinner,pull = <0>; | 134 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
95 | }; | 135 | }; |
96 | 136 | ||
97 | usb0_vbus_pin_a: usb0_vbus_pin@0 { | 137 | usb0_vbus_pin_a: usb0_vbus_pin@0 { |
98 | allwinner,pins = "PH17"; | 138 | allwinner,pins = "PH17"; |
99 | allwinner,function = "gpio_out"; | 139 | allwinner,function = "gpio_out"; |
100 | allwinner,drive = <0>; | 140 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
101 | allwinner,pull = <0>; | 141 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
102 | }; | 142 | }; |
103 | }; | 143 | }; |
104 | 144 | ||
@@ -126,13 +166,9 @@ | |||
126 | status = "okay"; | 166 | status = "okay"; |
127 | 167 | ||
128 | axp209: pmic@34 { | 168 | axp209: pmic@34 { |
129 | compatible = "x-powers,axp209"; | ||
130 | reg = <0x34>; | 169 | reg = <0x34>; |
131 | interrupt-parent = <&nmi_intc>; | 170 | interrupt-parent = <&nmi_intc>; |
132 | interrupts = <0 8>; | 171 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
133 | |||
134 | interrupt-controller; | ||
135 | #interrupt-cells = <1>; | ||
136 | }; | 172 | }; |
137 | }; | 173 | }; |
138 | 174 | ||
@@ -168,34 +204,34 @@ | |||
168 | 204 | ||
169 | blue { | 205 | blue { |
170 | label = "cubietruck:blue:usr"; | 206 | label = "cubietruck:blue:usr"; |
171 | gpios = <&pio 7 21 0>; | 207 | gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; |
172 | }; | 208 | }; |
173 | 209 | ||
174 | orange { | 210 | orange { |
175 | label = "cubietruck:orange:usr"; | 211 | label = "cubietruck:orange:usr"; |
176 | gpios = <&pio 7 20 0>; | 212 | gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; |
177 | }; | 213 | }; |
178 | 214 | ||
179 | white { | 215 | white { |
180 | label = "cubietruck:white:usr"; | 216 | label = "cubietruck:white:usr"; |
181 | gpios = <&pio 7 11 0>; | 217 | gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; |
182 | }; | 218 | }; |
183 | 219 | ||
184 | green { | 220 | green { |
185 | label = "cubietruck:green:usr"; | 221 | label = "cubietruck:green:usr"; |
186 | gpios = <&pio 7 7 0>; | 222 | gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; |
187 | }; | 223 | }; |
188 | }; | 224 | }; |
189 | 225 | ||
190 | reg_ahci_5v: ahci-5v { | 226 | reg_ahci_5v: ahci-5v { |
191 | pinctrl-0 = <&ahci_pwr_pin_cubietruck>; | 227 | pinctrl-0 = <&ahci_pwr_pin_cubietruck>; |
192 | gpio = <&pio 7 12 0>; | 228 | gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; |
193 | status = "okay"; | 229 | status = "okay"; |
194 | }; | 230 | }; |
195 | 231 | ||
196 | reg_usb0_vbus: usb0-vbus { | 232 | reg_usb0_vbus: usb0-vbus { |
197 | pinctrl-0 = <&usb0_vbus_pin_a>; | 233 | pinctrl-0 = <&usb0_vbus_pin_a>; |
198 | gpio = <&pio 7 17 0>; | 234 | gpio = <&pio 7 17 GPIO_ACTIVE_HIGH>; |
199 | status = "okay"; | 235 | status = "okay"; |
200 | }; | 236 | }; |
201 | 237 | ||
@@ -215,6 +251,37 @@ | |||
215 | regulator-min-microvolt = <3300000>; | 251 | regulator-min-microvolt = <3300000>; |
216 | regulator-max-microvolt = <3300000>; | 252 | regulator-max-microvolt = <3300000>; |
217 | enable-active-high; | 253 | enable-active-high; |
218 | gpio = <&pio 7 9 0>; | 254 | gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; |
219 | }; | 255 | }; |
220 | }; | 256 | }; |
257 | |||
258 | #include "axp209.dtsi" | ||
259 | |||
260 | &cpu0 { | ||
261 | cpu-supply = <®_dcdc2>; | ||
262 | }; | ||
263 | |||
264 | ®_dcdc2 { | ||
265 | regulator-always-on; | ||
266 | regulator-min-microvolt = <1000000>; | ||
267 | regulator-max-microvolt = <1450000>; | ||
268 | regulator-name = "vdd-cpu"; | ||
269 | }; | ||
270 | |||
271 | ®_dcdc3 { | ||
272 | regulator-always-on; | ||
273 | regulator-min-microvolt = <1000000>; | ||
274 | regulator-max-microvolt = <1400000>; | ||
275 | regulator-name = "vdd-int-dll"; | ||
276 | }; | ||
277 | |||
278 | ®_ldo1 { | ||
279 | regulator-name = "vdd-rtc"; | ||
280 | }; | ||
281 | |||
282 | ®_ldo2 { | ||
283 | regulator-always-on; | ||
284 | regulator-min-microvolt = <3000000>; | ||
285 | regulator-max-microvolt = <3000000>; | ||
286 | regulator-name = "avcc"; | ||
287 | }; | ||