ath79: add support for TP-LINK Archer C7 v4
[openwrt/staging/jogo.git] / target / linux / brcm2708 / patches-4.9 / 950-1002-bcm2708-raspberry-pi-3-b-plus.patch
1 --- a/arch/arm/boot/dts/Makefile
2 +++ b/arch/arm/boot/dts/Makefile
3 @@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
4 bcm2708-rpi-0-w.dtb \
5 bcm2709-rpi-2-b.dtb \
6 bcm2710-rpi-3-b.dtb \
7 + bcm2710-rpi-3-b-plus.dtb \
8 bcm2710-rpi-cm3.dtb
9
10 dtb-$(CONFIG_ARCH_ALPINE) += \
11 --- /dev/null
12 +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts
13 @@ -0,0 +1,220 @@
14 +/dts-v1/;
15 +
16 +#include "bcm2710.dtsi"
17 +#include "bcm283x-rpi-lan7515.dtsi"
18 +
19 +/ {
20 + compatible = "raspberrypi,3-model-b-plus", "brcm,bcm2837", "brcm,bcm2836";
21 + model = "Raspberry Pi 3 Model B+";
22 +};
23 +
24 +&gpio {
25 + sdhost_pins: sdhost_pins {
26 + brcm,pins = <48 49 50 51 52 53>;
27 + brcm,function = <4>; /* alt0 */
28 + };
29 +
30 + spi0_pins: spi0_pins {
31 + brcm,pins = <9 10 11>;
32 + brcm,function = <4>; /* alt0 */
33 + };
34 +
35 + spi0_cs_pins: spi0_cs_pins {
36 + brcm,pins = <8 7>;
37 + brcm,function = <1>; /* output */
38 + };
39 +
40 + i2c0_pins: i2c0 {
41 + brcm,pins = <0 1>;
42 + brcm,function = <4>;
43 + };
44 +
45 + i2c1_pins: i2c1 {
46 + brcm,pins = <2 3>;
47 + brcm,function = <4>;
48 + };
49 +
50 + i2s_pins: i2s {
51 + brcm,pins = <18 19 20 21>;
52 + brcm,function = <4>; /* alt0 */
53 + };
54 +
55 + sdio_pins: sdio_pins {
56 + brcm,pins = <34 35 36 37 38 39>;
57 + brcm,function = <7>; // alt3 = SD1
58 + brcm,pull = <0 2 2 2 2 2>;
59 + };
60 +
61 + bt_pins: bt_pins {
62 + brcm,pins = <43>;
63 + brcm,function = <4>; /* alt0:GPCLK2 */
64 + brcm,pull = <0>;
65 + };
66 +
67 + uart0_pins: uart0_pins {
68 + brcm,pins = <32 33>;
69 + brcm,function = <7>; /* alt3=UART0 */
70 + brcm,pull = <0 2>;
71 + };
72 +
73 + uart1_pins: uart1_pins {
74 + brcm,pins;
75 + brcm,function;
76 + brcm,pull;
77 + };
78 +
79 + audio_pins: audio_pins {
80 + brcm,pins = <40 41>;
81 + brcm,function = <4>;
82 + };
83 +};
84 +
85 +&sdhost {
86 + pinctrl-names = "default";
87 + pinctrl-0 = <&sdhost_pins>;
88 + bus-width = <4>;
89 + status = "okay";
90 +};
91 +
92 +&mmc {
93 + pinctrl-names = "default";
94 + pinctrl-0 = <&sdio_pins>;
95 + non-removable;
96 + bus-width = <4>;
97 + status = "okay";
98 + brcm,overclock-50 = <0>;
99 +};
100 +
101 +&soc {
102 + expgpio: expgpio {
103 + compatible = "brcm,bcm2835-expgpio";
104 + gpio-controller;
105 + #gpio-cells = <2>;
106 + firmware = <&firmware>;
107 + status = "okay";
108 + };
109 +};
110 +
111 +&fb {
112 + status = "okay";
113 +};
114 +
115 +&uart0 {
116 + pinctrl-names = "default";
117 + pinctrl-0 = <&uart0_pins &bt_pins>;
118 + status = "okay";
119 +};
120 +
121 +&uart1 {
122 + pinctrl-names = "default";
123 + pinctrl-0 = <&uart1_pins>;
124 + status = "okay";
125 +};
126 +
127 +&spi0 {
128 + pinctrl-names = "default";
129 + pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
130 + cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
131 +
132 + spidev0: spidev@0{
133 + compatible = "spidev";
134 + reg = <0>; /* CE0 */
135 + #address-cells = <1>;
136 + #size-cells = <0>;
137 + spi-max-frequency = <125000000>;
138 + };
139 +
140 + spidev1: spidev@1{
141 + compatible = "spidev";
142 + reg = <1>; /* CE1 */
143 + #address-cells = <1>;
144 + #size-cells = <0>;
145 + spi-max-frequency = <125000000>;
146 + };
147 +};
148 +
149 +&i2c0 {
150 + pinctrl-names = "default";
151 + pinctrl-0 = <&i2c0_pins>;
152 + clock-frequency = <100000>;
153 +};
154 +
155 +&i2c1 {
156 + pinctrl-names = "default";
157 + pinctrl-0 = <&i2c1_pins>;
158 + clock-frequency = <100000>;
159 +};
160 +
161 +&i2c2 {
162 + clock-frequency = <100000>;
163 +};
164 +
165 +&i2s {
166 + pinctrl-names = "default";
167 + pinctrl-0 = <&i2s_pins>;
168 +};
169 +
170 +&leds {
171 + act_led: act {
172 + label = "led0";
173 + linux,default-trigger = "mmc0";
174 + gpios = <&gpio 29 0>;
175 + };
176 +
177 + pwr_led: pwr {
178 + label = "led1";
179 + linux,default-trigger = "default-on";
180 + gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
181 + };
182 +};
183 +
184 +&hdmi {
185 + hpd-gpios = <&expgpio 4 GPIO_ACTIVE_LOW>;
186 +};
187 +
188 +&audio {
189 + pinctrl-names = "default";
190 + pinctrl-0 = <&audio_pins>;
191 +};
192 +
193 +/ {
194 + chosen {
195 + bootargs = "8250.nr_uarts=1";
196 + };
197 +};
198 +
199 +/ {
200 + __overrides__ {
201 + uart0 = <&uart0>,"status";
202 + uart1 = <&uart1>,"status";
203 + i2s = <&i2s>,"status";
204 + spi = <&spi0>,"status";
205 + i2c0 = <&i2c0>,"status";
206 + i2c1 = <&i2c1>,"status";
207 + i2c2_iknowwhatimdoing = <&i2c2>,"status";
208 + i2c0_baudrate = <&i2c0>,"clock-frequency:0";
209 + i2c1_baudrate = <&i2c1>,"clock-frequency:0";
210 + i2c2_baudrate = <&i2c2>,"clock-frequency:0";
211 +
212 + act_led_gpio = <&act_led>,"gpios:4";
213 + act_led_activelow = <&act_led>,"gpios:8";
214 + act_led_trigger = <&act_led>,"linux,default-trigger";
215 +
216 + pwr_led_gpio = <&pwr_led>,"gpios:4";
217 + pwr_led_activelow = <&pwr_led>,"gpios:8";
218 + pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
219 +
220 + audio = <&audio>,"status";
221 + watchdog = <&watchdog>,"status";
222 + random = <&random>,"status";
223 + sd_overclock = <&sdhost>,"brcm,overclock-50:0";
224 + sd_force_pio = <&sdhost>,"brcm,force-pio?";
225 + sd_pio_limit = <&sdhost>,"brcm,pio-limit:0";
226 + sd_debug = <&sdhost>,"brcm,debug";
227 + };
228 +};
229 +
230 +&i2c_dsi {
231 + gpios = <&gpio 44 0
232 + &gpio 45 0>;
233 +};
234 --- /dev/null
235 +++ b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
236 @@ -0,0 +1,36 @@
237 +/ {
238 + aliases {
239 + ethernet = &ethernet;
240 + };
241 +};
242 +
243 +&usb {
244 + usb1@1 {
245 + compatible = "usb424,2514";
246 + reg = <1>;
247 + #address-cells = <1>;
248 + #size-cells = <0>;
249 +
250 + usb1_1@1 {
251 + compatible = "usb424,2514";
252 + reg = <1>;
253 + #address-cells = <1>;
254 + #size-cells = <0>;
255 +
256 + ethernet: usbether@1 {
257 + compatible = "usb424,7800";
258 + reg = <1>;
259 + microchip,eee-enabled;
260 + microchip,tx-lpi-timer = <600>; /* non-aggressive*/
261 + };
262 + };
263 + };
264 +};
265 +
266 +
267 +/ {
268 + __overrides__ {
269 + eee = <&ethernet>,"microchip,eee-enabled?";
270 + tx_lpi_timer = <&ethernet>,"microchip,tx-lpi-timer:0";
271 + };
272 +};
273 --- a/arch/arm64/boot/dts/broadcom/Makefile
274 +++ b/arch/arm64/boot/dts/broadcom/Makefile
275 @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rp
276 dtb-$(CONFIG_ARCH_BCM_IPROC) += ns2-svk.dtb
277 dtb-$(CONFIG_ARCH_VULCAN) += vulcan-eval.dtb
278 dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb
279 +dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b-plus.dtb
280
281 dts-dirs += ../overlays
282
283 --- /dev/null
284 +++ b/arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b-plus.dts
285 @@ -0,0 +1,3 @@
286 +#define RPI364
287 +
288 +#include "../../../../arm/boot/dts/bcm2710-rpi-3-b-plus.dts"
289 --- a/arch/arm64/configs/bcmrpi3_defconfig
290 +++ b/arch/arm64/configs/bcmrpi3_defconfig
291 @@ -482,6 +482,7 @@ CONFIG_USB_NET_SR9700=m
292 CONFIG_USB_NET_SR9800=m
293 CONFIG_USB_NET_SMSC75XX=m
294 CONFIG_USB_NET_SMSC95XX=y
295 +CONFIG_USB_LAN78XX=y
296 CONFIG_USB_NET_GL620A=m
297 CONFIG_USB_NET_NET1080=m
298 CONFIG_USB_NET_PLUSB=m