sunxi: various changes
[openwrt.git] / target / linux / sunxi / files / arch / arm / boot / dts / sun7i-a20-cubietruck.dts
1 /*
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/;
15 /include/ "sun7i-a20.dtsi"
16
17 / {
18         model = "Cubietech Cubietruck";
19         compatible = "cubietech,cubietruck", "allwinner,sun7i-a20";
20
21         soc@01c00000 {
22                 sdc0: sdc@01c0f000 {
23                         pinctrl-names = "default";
24                         pinctrl-0 = <&sdc0_pins_a>;
25                         pinctrl-1 = <&mmc0_cd_pin_cubietruck>;
26                         cd-gpios = <&pio 7 1 0>; /* PH1 */
27                         cd-mode = <1>;
28                         status = "okay";
29                 };
30
31                 ehci0: ehci0@0x01c14000 {
32                         vbus-supply = <&reg_usb1_vbus>;
33                         status = "okay";
34                 };
35
36                 sata: ahci@01c18000 {
37                         pwr-supply = <&reg_ahci_5v>;
38                         status = "okay";
39                 };
40
41                 ehci1: ehci1@0x01c1c000 {
42                         vbus-supply = <&reg_usb2_vbus>;
43                         status = "okay";
44                 };
45
46                 pinctrl@01c20800 {
47                         mmc0_cd_pin_cubietruck: mmc0_cd_pin@0 {
48                                 allwinner,pins = "PH1";
49                                 allwinner,function = "gpio_in";
50                                 allwinner,drive = <0>;
51                                 allwinner,pull = <0>;
52                         };
53
54                         ahci_pwr_pin_cubietruck: ahci_pwr_pin@0 {
55                                 allwinner,pins = "PH12";
56                                 allwinner,function = "gpio_out";
57                                 allwinner,drive = <0>;
58                                 allwinner,pull = <0>;
59                         };
60
61                         led_pins_cubietruck: led_pins@0 {
62                                 allwinner,pins = "PH7", "PH11", "PH20", "PH21";
63                                 allwinner,function = "gpio_out";
64                                 allwinner,drive = <0>;
65                                 allwinner,pull = <0>;
66                         };
67
68                         usb1_vbus_pin: usb1_vbus_pin@0 {
69                                         allwinner,pins = "PH6";
70                                         allwinner,function = "gpio_out";
71                                         allwinner,drive = <0>;
72                                         allwinner,pull = <2>;
73                         };
74
75                         usb2_vbus_pin: usb2_vbus_pin@0 {
76                                         allwinner,pins = "PH3";
77                                         allwinner,function = "gpio_out";
78                                         allwinner,drive = <0>;
79                                         allwinner,pull = <2>;
80                         };
81                 };
82
83                 uart0: serial@01c28000 {
84                         pinctrl-names = "default";
85                         pinctrl-0 = <&uart0_pins_a>;
86                         status = "okay";
87                 };
88         };
89
90         leds {
91                 compatible = "gpio-leds";
92                 pinctrl-names = "default";
93                 pinctrl-0 = <&led_pins_cubietruck>;
94
95                 blue {
96                         label = "cubietruck:blue:usr";
97                         gpios = <&pio 7 21 0>;
98                 };
99
100                 orange {
101                         label = "cubietruck:orange:usr";
102                         gpios = <&pio 7 20 0>;
103                 };
104
105                 white {
106                         label = "cubietruck:white:usr";
107                         gpios = <&pio 7 11 0>;
108                 };
109
110                 green {
111                         label = "cubietruck:green:usr";
112                         gpios = <&pio 7 7 0>;
113                 };
114         };
115
116         regulators {
117                 compatible = "simple-bus";
118                 pinctrl-names = "default";
119
120                 reg_ahci_5v: ahci-5v {
121                         compatible = "regulator-fixed";
122                         regulator-name = "ahci-5v";
123                         regulator-min-microvolt = <5000000>;
124                         regulator-max-microvolt = <5000000>;
125                         pinctrl-0 = <&ahci_pwr_pin_cubietruck>;
126                         gpio = <&pio 7 12 0>;
127                         enable-active-high;
128                 };
129
130                 reg_usb1_vbus: usb1-vbus {
131                         compatible = "regulator-fixed";
132                         pinctrl-names = "default";
133                         pinctrl-0 = <&usb1_vbus_pin>;
134                         regulator-name = "usb1-vbus";
135                         regulator-min-microvolt = <5000000>;
136                         regulator-max-microvolt = <5000000>;
137                         enable-active-high;
138                         gpio = <&pio 7 6 0>;
139                 };
140
141                 reg_usb2_vbus: usb2-vbus {
142                         compatible = "regulator-fixed";
143                         pinctrl-names = "default";
144                         pinctrl-0 = <&usb2_vbus_pin>;
145                         regulator-name = "usb2-vbus";
146                         regulator-min-microvolt = <5000000>;
147                         regulator-max-microvolt = <5000000>;
148                         enable-active-high;
149                         gpio = <&pio 7 3 0>;
150                 };
151         };
152 };