sunxi: bump kernel to 3.18
[openwrt/svn-archive/archive.git] / target / linux / sunxi / patches-3.18 / 301-add-bananapro.diff
1 diff -ruN old/arch/arm/boot/dts/Makefile new/arch/arm/boot/dts/Makefile
2 --- old/arch/arm/boot/dts/Makefile 2015-01-06 09:29:23.612462619 +0100
3 +++ new/arch/arm/boot/dts/Makefile 2015-01-06 09:29:36.316254352 +0100
4 @@ -436,6 +436,7 @@
5 sun6i-a31-m9.dtb
6 dtb-$(CONFIG_MACH_SUN7I) += \
7 sun7i-a20-bananapi.dtb \
8 + sun7i-a20-bananapro.dtb \
9 sun7i-a20-cubieboard2.dtb \
10 sun7i-a20-cubietruck.dtb \
11 sun7i-a20-hummingbird.dtb \
12 diff -ruN old/arch/arm/boot/dts/sun7i-a20-bananapro.dts new/arch/arm/boot/dts/sun7i-a20-bananapro.dts
13 --- old/arch/arm/boot/dts/sun7i-a20-bananapro.dts 1970-01-01 01:00:00.000000000 +0100
14 +++ new/arch/arm/boot/dts/sun7i-a20-bananapro.dts 2015-01-06 09:31:18.290582574 +0100
15 @@ -0,0 +1,232 @@
16 +/*
17 + * Copyright 2014 Zoltan HERPAI <wigyori@uid0.hu>
18 + *
19 + * This file is dual-licensed: you can use it either under the terms
20 + * of the GPL or the X11 license, at your option. Note that this dual
21 + * licensing only applies to this file, and not this project as a
22 + * whole.
23 + *
24 + * a) This library is free software; you can redistribute it and/or
25 + * modify it under the terms of the GNU General Public License as
26 + * published by the Free Software Foundation; either version 2 of the
27 + * License, or (at your option) any later version.
28 + *
29 + * This library is distributed in the hope that it will be useful,
30 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 + * GNU General Public License for more details.
33 + *
34 + * You should have received a copy of the GNU General Public
35 + * License along with this library; if not, write to the Free
36 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
37 + * MA 02110-1301 USA
38 + *
39 + * Or, alternatively,
40 + *
41 + * b) Permission is hereby granted, free of charge, to any person
42 + * obtaining a copy of this software and associated documentation
43 + * files (the "Software"), to deal in the Software without
44 + * restriction, including without limitation the rights to use,
45 + * copy, modify, merge, publish, distribute, sublicense, and/or
46 + * sell copies of the Software, and to permit persons to whom the
47 + * Software is furnished to do so, subject to the following
48 + * conditions:
49 + *
50 + * The above copyright notice and this permission notice shall be
51 + * included in all copies or substantial portions of the Software.
52 + *
53 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
54 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
55 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
56 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
57 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
58 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
59 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
60 + * OTHER DEALINGS IN THE SOFTWARE.
61 + */
62 +
63 +/dts-v1/;
64 +/include/ "sun7i-a20.dtsi"
65 +/include/ "sunxi-common-regulators.dtsi"
66 +
67 +/ {
68 + model = "LeMaker Banana Pro";
69 + compatible = "lemaker,bananapro", "allwinner,sun7i-a20";
70 +
71 + soc@01c00000 {
72 + spi0: spi@01c05000 {
73 + pinctrl-names = "default";
74 + pinctrl-0 = <&spi0_pins_a>;
75 + status = "okay";
76 + };
77 +
78 + mmc0: mmc@01c0f000 {
79 + pinctrl-names = "default";
80 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapro>;
81 + vmmc-supply = <&reg_vcc3v3>;
82 + bus-width = <4>;
83 + cd-gpios = <&pio 7 10 0>; /* PH10 */
84 + cd-inverted;
85 + status = "okay";
86 + };
87 +
88 + mmc3: mmc@01c12000 {
89 + #address-cells = <1>;
90 + #size-cells = <0>;
91 +
92 + pinctrl-names = "default";
93 + pinctrl-0 = <&mmc3_pins_a>
94 + vmmc-supply = <&reg_vmmc3>;
95 + bus-width = <4>;
96 + non-removable;
97 + status = "okay";
98 +
99 + brcmf: bcrmf@1 {
100 + reg = <1>;
101 + ccompatible = "brcm,bcm4329-fmac";
102 + interrupt-parent = <&pio>;
103 + interrupts = <10 8>; /* PH10 / EINT10 * taken from https://github.com/Bananian/fex/blob/master/BananaPro/BananaPro.fex.otg-off */
104 + interrupt-names = "host-wake";
105 + };
106 + };
107 +
108 + usbphy: phy@01c13400 {
109 + usb1_vbus-supply = <&reg_usb1_vbus>;
110 + usb2_vbus-supply = <&reg_usb2_vbus>;
111 + status = "okay";
112 + };
113 +
114 + ehci0: usb@01c14000 {
115 + status = "okay";
116 + };
117 +
118 + ohci0: usb@01c14400 {
119 + status = "okay";
120 + };
121 +
122 + ahci: sata@01c18000 {
123 + status = "okay";
124 + };
125 +
126 + ehci1: usb@01c1c000 {
127 + status = "okay";
128 + };
129 +
130 + ohci1: usb@01c1c400 {
131 + status = "okay";
132 + };
133 +
134 + pinctrl@01c20800 {
135 + mmc0_cd_pin_bananapro: mmc0_cd_pin@0 {
136 + allwinner,pins = "PH10";
137 + allwinner,function = "gpio_in";
138 + allwinner,drive = <0>;
139 + allwinner,pull = <1>;
140 + };
141 +
142 + gmac_power_pin_bananapro: gmac_power_pin@0 {
143 + allwinner,pins = "PH23";
144 + allwinner,function = "gpio_out";
145 + allwinner,drive = <0>;
146 + allwinner,pull = <0>;
147 + };
148 +
149 + led_pins_bananapro: led_pins@0 {
150 + allwinner,pins = "PH24";
151 + allwinner,function = "gpio_out";
152 + allwinner,drive = <0>;
153 + allwinner,pull = <0>;
154 + };
155 + };
156 +
157 + ir0: ir@01c21800 {
158 + pinctrl-names = "default";
159 + pinctrl-0 = <&ir0_pins_a>;
160 + status = "okay";
161 + };
162 +
163 + uart0: serial@01c28000 {
164 + pinctrl-names = "default";
165 + pinctrl-0 = <&uart0_pins_a>;
166 + status = "okay";
167 + };
168 +
169 + uart3: serial@01c28c00 {
170 + pinctrl-names = "default";
171 + pinctrl-0 = <&uart3_pins_b>;
172 + status = "okay";
173 + };
174 +
175 + uart7: serial@01c29c00 {
176 + pinctrl-names = "default";
177 + pinctrl-0 = <&uart7_pins_a>;
178 + status = "okay";
179 + };
180 +
181 + i2c0: i2c@01c2ac00 {
182 + pinctrl-names = "default";
183 + pinctrl-0 = <&i2c0_pins_a>;
184 + status = "okay";
185 +
186 + axp209: pmic@34 {
187 + compatible = "x-powers,axp209";
188 + reg = <0x34>;
189 + interrupt-parent = <&nmi_intc>;
190 + interrupts = <0 8>;
191 +
192 + interrupt-controller;
193 + #interrupt-cells = <1>;
194 + };
195 + };
196 +
197 + i2c2: i2c@01c2b400 {
198 + pinctrl-names = "default";
199 + pinctrl-0 = <&i2c2_pins_a>;
200 + status = "okay";
201 + };
202 +
203 + gmac: ethernet@01c50000 {
204 + pinctrl-names = "default";
205 + pinctrl-0 = <&gmac_pins_rgmii_a>;
206 + phy = <&phy1>;
207 + phy-mode = "rgmii";
208 + phy-supply = <&reg_gmac_3v3>;
209 + status = "okay";
210 +
211 + phy1: ethernet-phy@1 {
212 + reg = <1>;
213 + };
214 + };
215 + };
216 +
217 + leds {
218 + compatible = "gpio-leds";
219 + pinctrl-names = "default";
220 + pinctrl-0 = <&led_pins_bananapro>;
221 +
222 + green {
223 + label = "bananapro:green:usr";
224 + gpios = <&pio 7 24 0>;
225 + };
226 + };
227 +
228 + reg_usb1_vbus: usb1-vbus {
229 + status = "okay";
230 + };
231 +
232 + reg_usb2_vbus: usb2-vbus {
233 + status = "okay";
234 + };
235 +
236 + reg_gmac_3v3: gmac-3v3 {
237 + compatible = "regulator-fixed";
238 + pinctrl-names = "default";
239 + pinctrl-0 = <&gmac_power_pin_bananapro>;
240 + regulator-name = "gmac-3v3";
241 + regulator-min-microvolt = <3300000>;
242 + regulator-max-microvolt = <3300000>;
243 + startup-delay-us = <50000>;
244 + enable-active-high;
245 + gpio = <&pio 7 23 0>;
246 + };
247 +};