fa5ebbdc76fa257981f99bd393b018eb59fd11e1
[openwrt.git] / target / linux / sunxi / files / arch / arm / boot / dts / sun4i-a10-olinuxino-lime.dts
1 /*
2  * Copyright 2012 Stefan Roese
3  * Stefan Roese <sr@denx.de>
4  *
5  * The code contained herein is licensed under the GNU General Public
6  * License. You may obtain a copy of the GNU General Public License
7  * Version 2 or later at the following locations:
8  *
9  * http://www.opensource.org/licenses/gpl-license.html
10  * http://www.gnu.org/copyleft/gpl.html
11  */
12
13 /dts-v1/;
14 /include/ "sun4i-a10.dtsi"
15
16 / {
17         model = "Olimex A10-Olinuxino LIME";
18         compatible = "olimex,a10-olinuxino-lime", "allwinner,sun4i-a10";
19
20         soc@01c00000 {
21                 emac: ethernet@01c0b000 {
22                         pinctrl-names = "default";
23                         pinctrl-0 = <&emac_pins_a>;
24                         phy = <&phy1>;
25                         status = "okay";
26                 };
27
28                 mdio@01c0b080 {
29                         status = "okay";
30
31                         phy1: ethernet-phy@1 {
32                                 reg = <1>;
33                         };
34                 };
35
36                 sdc0: sdc@01c0f000 {
37                         pinctrl-names = "default";
38                         pinctrl-0 = <&sdc0_pins_a>;
39                         pinctrl-1 = <&mmc0_cd_pin_olinuxino>;
40                         cd-gpios = <&pio 7 1 0>; /* PH1 */
41                         cd-mode = <1>;
42                         status = "okay";
43                 };
44
45                 sata: ahci@01c18000 {
46                         pwr-supply = <&reg_ahci_5v>;
47                         status = "okay";
48                 };
49
50                 pinctrl@01c20800 {
51                         ahci_pwr_pin: ahci_pwr_pin@0 {
52                                 allwinner,pins = "PC3";
53                                 allwinner,function = "gpio_out";
54                                 allwinner,drive = <0>;
55                                 allwinner,pull = <0>;
56                         };
57
58                         mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
59                                 allwinner,pins = "PH1";
60                                 allwinner,function = "gpio_in";
61                                 allwinner,drive = <0>;
62                                 allwinner,pull = <0>;
63                         };
64
65                         led_pins_olinuxino: led_pins@0 {
66                                 allwinner,pins = "PH2";
67                                 allwinner,function = "gpio_out";
68                                 allwinner,drive = <1>;
69                                 allwinner,pull = <0>;
70                         };
71
72                         usb1_vbus_pin: usb1_vbus_pin@0 {
73                                         allwinner,pins = "PH6";
74                                         allwinner,function = "gpio_out";
75                                         allwinner,drive = <0>;
76                                         allwinner,pull = <2>;
77                         };
78
79                         usb2_vbus_pin: usb2_vbus_pin@0 {
80                                         allwinner,pins = "PH3";
81                                         allwinner,function = "gpio_out";
82                                         allwinner,drive = <0>;
83                                         allwinner,pull = <2>;
84                         };
85                 };
86
87                 uart0: serial@01c28000 {
88                         pinctrl-names = "default";
89                         pinctrl-0 = <&uart0_pins_a>;
90                         status = "okay";
91                 };
92
93                 i2c0: i2c@01c2ac00 {
94                         pinctrl-names = "default";
95                         pinctrl-0 = <&i2c0_pins_a>;
96                         status = "okay";
97                 };
98
99                 i2c1: i2c@01c2b000 {
100                         pinctrl-names = "default";
101                         pinctrl-0 = <&i2c1_pins_a>;
102                         status = "okay";
103                 };
104
105                 ehci0: ehci0@0x01c14000 {
106                                 vbus-supply = <&reg_usb1_vbus>;
107                                 status = "okay";
108                 };
109
110                 ehci1: ehci1@0x01c1c000 {
111                                 vbus-supply = <&reg_usb2_vbus>;
112                                 status = "okay";
113                 };
114         };
115
116         leds {
117                 compatible = "gpio-leds";
118                 pinctrl-names = "default";
119                 pinctrl-0 = <&led_pins_olinuxino>;
120
121                 green {
122                         label = "a10-olinuxino-lime:green:usr";
123                         gpios = <&pio 7 2 0>;
124                         default-state = "on";
125                 };
126         };
127
128         regulators {
129                 compatible = "simple-bus";
130
131                 reg_usb1_vbus: usb1-vbus {
132                         compatible = "regulator-fixed";
133                         pinctrl-names = "default";
134                         pinctrl-0 = <&usb1_vbus_pin>;
135                         regulator-name = "usb1-vbus";
136                         regulator-min-microvolt = <5000000>;
137                         regulator-max-microvolt = <5000000>;
138                         enable-active-high;
139                         gpio = <&pio 7 6 0>;
140                 };
141
142                 reg_usb2_vbus: usb2-vbus {
143                         compatible = "regulator-fixed";
144                         pinctrl-names = "default";
145                         pinctrl-0 = <&usb2_vbus_pin>;
146                         regulator-name = "usb2-vbus";
147                         regulator-min-microvolt = <5000000>;
148                         regulator-max-microvolt = <5000000>;
149                         enable-active-high;
150                         gpio = <&pio 7 3 0>;
151                 };
152         };
153
154         regulators {
155                 compatible = "simple-bus";
156                 pinctrl-names = "default";
157
158                 reg_ahci_5v: ahci-5v {
159                         compatible = "regulator-fixed";
160                         regulator-name = "ahci-5v";
161                         regulator-min-microvolt = <5000000>;
162                         regulator-max-microvolt = <5000000>;
163                         pinctrl-0 = <&ahci_pwr_pin>;
164                         gpio = <&pio 2 3 0>;
165                         enable-active-high;
166                 };
167         };
168 };