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