brcm2708: update to latest patches from the RPi foundation
[openwrt/staging/lynxis.git] / target / linux / brcm2708 / patches-4.14 / 950-0250-BCM270X_DT-Add-Pi-3-dts-files.patch
1 From 09bd29626a880f4bbcd4d3b3ebbdbaf170e0b27c Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Fri, 21 Jul 2017 11:33:25 +0100
4 Subject: [PATCH 250/454] BCM270X_DT: Add Pi 3+ dts files
5
6 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
7 ---
8 arch/arm/boot/dts/Makefile | 1 +
9 arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts | 183 +++++++++++++++++++++
10 arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi | 36 ++++
11 arch/arm/boot/dts/overlays/README | 8 +
12 4 files changed, 228 insertions(+)
13 create mode 100644 arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts
14 create mode 100644 arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
15
16 --- a/arch/arm/boot/dts/Makefile
17 +++ b/arch/arm/boot/dts/Makefile
18 @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
19 bcm2708-rpi-0-w.dtb \
20 bcm2709-rpi-2-b.dtb \
21 bcm2710-rpi-3-b.dtb \
22 + bcm2710-rpi-3-b-plus.dtb \
23 bcm2710-rpi-cm3.dtb
24
25 dtb-$(CONFIG_ARCH_ALPINE) += \
26 --- /dev/null
27 +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts
28 @@ -0,0 +1,183 @@
29 +/dts-v1/;
30 +
31 +#include "bcm2710.dtsi"
32 +#include "bcm283x-rpi-lan7515.dtsi"
33 +
34 +/ {
35 + compatible = "raspberrypi,3-model-b-plus", "brcm,bcm2837";
36 + model = "Raspberry Pi 3 Model B+";
37 +
38 + chosen {
39 + bootargs = "8250.nr_uarts=1";
40 + };
41 +
42 + aliases {
43 + serial0 = &uart1;
44 + serial1 = &uart0;
45 + };
46 +};
47 +
48 +&gpio {
49 + spi0_pins: spi0_pins {
50 + brcm,pins = <9 10 11>;
51 + brcm,function = <4>; /* alt0 */
52 + };
53 +
54 + spi0_cs_pins: spi0_cs_pins {
55 + brcm,pins = <8 7>;
56 + brcm,function = <1>; /* output */
57 + };
58 +
59 + i2c0_pins: i2c0 {
60 + brcm,pins = <0 1>;
61 + brcm,function = <4>;
62 + };
63 +
64 + i2c1_pins: i2c1 {
65 + brcm,pins = <2 3>;
66 + brcm,function = <4>;
67 + };
68 +
69 + i2s_pins: i2s {
70 + brcm,pins = <18 19 20 21>;
71 + brcm,function = <4>; /* alt0 */
72 + };
73 +
74 + sdio_pins: sdio_pins {
75 + brcm,pins = <34 35 36 37 38 39>;
76 + brcm,function = <7>; // alt3 = SD1
77 + brcm,pull = <0 2 2 2 2 2>;
78 + };
79 +
80 + bt_pins: bt_pins {
81 + brcm,pins = <43>;
82 + brcm,function = <4>; /* alt0:GPCLK2 */
83 + brcm,pull = <0>;
84 + };
85 +
86 + uart0_pins: uart0_pins {
87 + brcm,pins = <32 33>;
88 + brcm,function = <7>; /* alt3=UART0 */
89 + brcm,pull = <0 2>;
90 + };
91 +
92 + uart1_pins: uart1_pins {
93 + brcm,pins;
94 + brcm,function;
95 + brcm,pull;
96 + };
97 +
98 + audio_pins: audio_pins {
99 + brcm,pins = <40 41>;
100 + brcm,function = <4>;
101 + };
102 +};
103 +
104 +&mmc {
105 + pinctrl-names = "default";
106 + pinctrl-0 = <&sdio_pins>;
107 + non-removable;
108 + bus-width = <4>;
109 + status = "okay";
110 + brcm,overclock-50 = <0>;
111 +};
112 +
113 +&soc {
114 + expgpio: expgpio {
115 + compatible = "brcm,bcm2835-expgpio";
116 + gpio-controller;
117 + #gpio-cells = <2>;
118 + firmware = <&firmware>;
119 + status = "okay";
120 + };
121 +};
122 +
123 +&uart0 {
124 + pinctrl-names = "default";
125 + pinctrl-0 = <&uart0_pins &bt_pins>;
126 + status = "okay";
127 +};
128 +
129 +&uart1 {
130 + pinctrl-names = "default";
131 + pinctrl-0 = <&uart1_pins>;
132 + status = "okay";
133 +};
134 +
135 +&spi0 {
136 + pinctrl-names = "default";
137 + pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
138 + cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
139 +
140 + spidev0: spidev@0{
141 + compatible = "spidev";
142 + reg = <0>; /* CE0 */
143 + #address-cells = <1>;
144 + #size-cells = <0>;
145 + spi-max-frequency = <125000000>;
146 + };
147 +
148 + spidev1: spidev@1{
149 + compatible = "spidev";
150 + reg = <1>; /* CE1 */
151 + #address-cells = <1>;
152 + #size-cells = <0>;
153 + spi-max-frequency = <125000000>;
154 + };
155 +};
156 +
157 +&i2c0 {
158 + pinctrl-names = "default";
159 + pinctrl-0 = <&i2c0_pins>;
160 + clock-frequency = <100000>;
161 +};
162 +
163 +&i2c1 {
164 + pinctrl-names = "default";
165 + pinctrl-0 = <&i2c1_pins>;
166 + clock-frequency = <100000>;
167 +};
168 +
169 +&i2c2 {
170 + clock-frequency = <100000>;
171 +};
172 +
173 +&i2s {
174 + pinctrl-names = "default";
175 + pinctrl-0 = <&i2s_pins>;
176 +};
177 +
178 +&leds {
179 + act_led: act {
180 + label = "led0";
181 + linux,default-trigger = "mmc0";
182 + gpios = <&gpio 29 0>;
183 + };
184 +
185 + pwr_led: pwr {
186 + label = "led1";
187 + linux,default-trigger = "default-on";
188 + gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
189 + };
190 +};
191 +
192 +&hdmi {
193 + hpd-gpios = <&expgpio 4 GPIO_ACTIVE_LOW>;
194 +};
195 +
196 +&audio {
197 + pinctrl-names = "default";
198 + pinctrl-0 = <&audio_pins>;
199 +};
200 +
201 +/ {
202 + __overrides__ {
203 + act_led_gpio = <&act_led>,"gpios:4";
204 + act_led_activelow = <&act_led>,"gpios:8";
205 + act_led_trigger = <&act_led>,"linux,default-trigger";
206 +
207 + pwr_led_gpio = <&pwr_led>,"gpios:4";
208 + pwr_led_activelow = <&pwr_led>,"gpios:8";
209 + pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
210 + };
211 +};
212 --- /dev/null
213 +++ b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
214 @@ -0,0 +1,36 @@
215 +/ {
216 + aliases {
217 + ethernet0 = &ethernet;
218 + };
219 +};
220 +
221 +&usb {
222 + usb1@1 {
223 + compatible = "usb424,2514";
224 + reg = <1>;
225 + #address-cells = <1>;
226 + #size-cells = <0>;
227 +
228 + usb1_1@1 {
229 + compatible = "usb424,2514";
230 + reg = <1>;
231 + #address-cells = <1>;
232 + #size-cells = <0>;
233 +
234 + ethernet: usbether@1 {
235 + compatible = "usb424,7800";
236 + reg = <1>;
237 + microchip,eee-enabled;
238 + microchip,tx-lpi-timer = <600>; /* non-aggressive*/
239 + };
240 + };
241 + };
242 +};
243 +
244 +
245 +/ {
246 + __overrides__ {
247 + eee = <&ethernet>,"microchip,eee-enabled?";
248 + tx_lpi_timer = <&ethernet>,"microchip,tx-lpi-timer:0";
249 + };
250 +};
251 --- a/arch/arm/boot/dts/overlays/README
252 +++ b/arch/arm/boot/dts/overlays/README
253 @@ -89,6 +89,10 @@ Params:
254 audio Set to "on" to enable the onboard ALSA audio
255 interface (default "off")
256
257 + eee Enable Energy Efficient Ethernet support for
258 + compatible devices (default "on"). See also
259 + "tx_lpi_timer".
260 +
261 i2c_arm Set to "on" to enable the ARM's i2c interface
262 (default "off")
263
264 @@ -125,6 +129,10 @@ Params:
265
266 sd_debug Enable debug output from SD driver (default off)
267
268 + tx_lpi_timer Set the delay in microseconds between going idle
269 + and entering the low power state (default 600).
270 + Requires EEE to be enabled - see "eee".
271 +
272 uart0 Set to "off" to disable uart0 (default "on")
273
274 uart1 Set to "on" or "off" to enable or disable uart1