sunxi: move pcduino3 dts into patches [3.14]
[openwrt/openwrt.git] / target / linux / sunxi / files / arch / arm / boot / dts / sun7i-a20-bananapi.dts
1 /*
2 * Copyright 2014 Zoltan HERPAI
3 * Zoltan HERPAI <wigyori@uid0.hu>
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/ "sun7i-a20.dtsi"
15 /include/ "sunxi-ahci-reg.dtsi"
16 /include/ "sun4i-a10-usb-vbus-reg.dtsi"
17 #include <dt-bindings/input/input.h>
18
19 / {
20 model = "Lemaker bananaPi";
21 compatible = "lemaker,bananapi", "allwinner,sun7i-a20";
22
23 aliases {
24 spi0 = &spi1;
25 spi1 = &spi2;
26 };
27
28 soc@01c00000 {
29 spi1: spi@01c06000 {
30 pinctrl-names = "default";
31 pinctrl-0 = <&spi1_pins_a>;
32 status = "okay";
33 };
34
35 spi2: spi@01c17000 {
36 pinctrl-names = "default";
37 pinctrl-0 = <&spi2_pins_a>;
38 status = "okay";
39 };
40
41 mmc0: mmc@01c0f000 {
42 pinctrl-names = "default", "default";
43 pinctrl-0 = <&mmc0_pins_a>;
44 pinctrl-1 = <&mmc0_cd_pin_bananapi>;
45 cd-gpios = <&pio 7 10 0>; /* PH10 */
46 status = "okay";
47 };
48
49 usbphy: phy@01c13400 {
50 usb1_vbus-supply = <&reg_usb1_vbus>;
51 usb2_vbus-supply = <&reg_usb2_vbus>;
52 status = "okay";
53 };
54
55 ehci0: usb@01c14000 {
56 status = "okay";
57 };
58
59 ohci0: usb@01c14400 {
60 status = "okay";
61 };
62
63 ahci: sata@01c18000 {
64 target-supply = <&reg_ahci_5v>;
65 status = "okay";
66 };
67
68 ehci1: usb@01c1c000 {
69 status = "okay";
70 };
71
72 ohci1: usb@01c1c400 {
73 status = "okay";
74 };
75
76 pinctrl@01c20800 {
77 led_pins_bananapi: led_pins@0 {
78 allwinner,pins = "PH2";
79 allwinner,function = "gpio_out";
80 allwinner,drive = <1>;
81 allwinner,pull = <0>;
82 };
83
84 mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
85 allwinner,pins = "PH10";
86 allwinner,function = "gpio_in";
87 allwinner,drive = <0>;
88 allwinner,pull = <1>;
89 };
90 };
91
92 lradc: lradc@01c22800 {
93 allwinner,chan0-step = <200>;
94 linux,chan0-keycodes = <KEY_VOLUMEUP KEY_VOLUMEDOWN
95 KEY_MENU KEY_SEARCH KEY_HOME
96 KEY_ESC KEY_ENTER>;
97 status = "okay";
98 };
99
100 uart0: serial@01c28000 {
101 pinctrl-names = "default";
102 pinctrl-0 = <&uart0_pins_a>;
103 status = "okay";
104 };
105
106 uart6: serial@01c29800 {
107 pinctrl-names = "default";
108 pinctrl-0 = <&uart6_pins_a>;
109 status = "okay";
110 };
111
112 uart7: serial@01c29c00 {
113 pinctrl-names = "default";
114 pinctrl-0 = <&uart7_pins_a>;
115 status = "okay";
116 };
117
118 i2c0: i2c@01c2ac00 {
119 pinctrl-names = "default";
120 pinctrl-0 = <&i2c0_pins_a>;
121 status = "okay";
122 };
123
124 i2c1: i2c@01c2b000 {
125 pinctrl-names = "default";
126 pinctrl-0 = <&i2c1_pins_a>;
127 status = "okay";
128 };
129
130 i2c2: i2c@01c2b400 {
131 pinctrl-names = "default";
132 pinctrl-0 = <&i2c2_pins_a>;
133 status = "okay";
134 };
135
136 gmac: ethernet@01c50000 {
137 pinctrl-names = "default";
138 pinctrl-0 = <&gmac_pins_mii_a>;
139 phy = <&phy1>;
140 phy-mode = "mii";
141 status = "okay";
142
143 phy1: ethernet-phy@1 {
144 reg = <1>;
145 };
146 };
147 };
148
149 leds {
150 compatible = "gpio-leds";
151 pinctrl-names = "default";
152 pinctrl-0 = <&led_pins_bananapi>;
153
154 green {
155 label = "bananapi:green:usr";
156 gpios = <&pio 7 2 0>;
157 default-state = "on";
158 };
159 };
160 };