Merge tag 'timers-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / arch / arm / boot / dts / bcm2711-rpi-4-b.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /dts-v1/;
3 #include "bcm2711.dtsi"
4 #include "bcm2835-rpi.dtsi"
5 #include "bcm283x-rpi-usb-peripheral.dtsi"
6
7 #include <dt-bindings/reset/raspberrypi,firmware-reset.h>
8
9 / {
10         compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
11         model = "Raspberry Pi 4 Model B";
12
13         chosen {
14                 /* 8250 auxiliary UART instead of pl011 */
15                 stdout-path = "serial1:115200n8";
16         };
17
18         /* Will be filled by the bootloader */
19         memory@0 {
20                 device_type = "memory";
21                 reg = <0 0 0>;
22         };
23
24         aliases {
25                 emmc2bus = &emmc2bus;
26                 ethernet0 = &genet;
27                 pcie0 = &pcie0;
28         };
29
30         leds {
31                 act {
32                         gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
33                 };
34
35                 pwr {
36                         label = "PWR";
37                         gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
38                         default-state = "keep";
39                         linux,default-trigger = "default-on";
40                 };
41         };
42
43         wifi_pwrseq: wifi-pwrseq {
44                 compatible = "mmc-pwrseq-simple";
45                 reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
46         };
47
48         sd_io_1v8_reg: sd_io_1v8_reg {
49                 compatible = "regulator-gpio";
50                 regulator-name = "vdd-sd-io";
51                 regulator-min-microvolt = <1800000>;
52                 regulator-max-microvolt = <3300000>;
53                 regulator-boot-on;
54                 regulator-always-on;
55                 regulator-settling-time-us = <5000>;
56                 gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
57                 states = <1800000 0x1
58                           3300000 0x0>;
59                 status = "okay";
60         };
61
62         sd_vcc_reg: sd_vcc_reg {
63                 compatible = "regulator-fixed";
64                 regulator-name = "vcc-sd";
65                 regulator-min-microvolt = <3300000>;
66                 regulator-max-microvolt = <3300000>;
67                 regulator-boot-on;
68                 enable-active-high;
69                 gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
70         };
71 };
72
73 &ddc0 {
74         status = "okay";
75 };
76
77 &ddc1 {
78         status = "okay";
79 };
80
81 &firmware {
82         firmware_clocks: clocks {
83                 compatible = "raspberrypi,firmware-clocks";
84                 #clock-cells = <1>;
85         };
86
87         expgpio: gpio {
88                 compatible = "raspberrypi,firmware-gpio";
89                 gpio-controller;
90                 #gpio-cells = <2>;
91                 gpio-line-names = "BT_ON",
92                                   "WL_ON",
93                                   "PWR_LED_OFF",
94                                   "GLOBAL_RESET",
95                                   "VDD_SD_IO_SEL",
96                                   "CAM_GPIO",
97                                   "SD_PWR_ON",
98                                   "";
99                 status = "okay";
100         };
101
102         reset: reset {
103                 compatible = "raspberrypi,firmware-reset";
104                 #reset-cells = <1>;
105         };
106 };
107
108 &gpio {
109         /*
110          * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and
111          * the official GPU firmware DT blob.
112          *
113          * Legend:
114          * "FOO" = GPIO line named "FOO" on the schematic
115          * "FOO_N" = GPIO line named "FOO" on schematic, active low
116          */
117         gpio-line-names = "ID_SDA",
118                           "ID_SCL",
119                           "SDA1",
120                           "SCL1",
121                           "GPIO_GCLK",
122                           "GPIO5",
123                           "GPIO6",
124                           "SPI_CE1_N",
125                           "SPI_CE0_N",
126                           "SPI_MISO",
127                           "SPI_MOSI",
128                           "SPI_SCLK",
129                           "GPIO12",
130                           "GPIO13",
131                           /* Serial port */
132                           "TXD1",
133                           "RXD1",
134                           "GPIO16",
135                           "GPIO17",
136                           "GPIO18",
137                           "GPIO19",
138                           "GPIO20",
139                           "GPIO21",
140                           "GPIO22",
141                           "GPIO23",
142                           "GPIO24",
143                           "GPIO25",
144                           "GPIO26",
145                           "GPIO27",
146                           "RGMII_MDIO",
147                           "RGMIO_MDC",
148                           /* Used by BT module */
149                           "CTS0",
150                           "RTS0",
151                           "TXD0",
152                           "RXD0",
153                           /* Used by Wifi */
154                           "SD1_CLK",
155                           "SD1_CMD",
156                           "SD1_DATA0",
157                           "SD1_DATA1",
158                           "SD1_DATA2",
159                           "SD1_DATA3",
160                           /* Shared with SPI flash */
161                           "PWM0_MISO",
162                           "PWM1_MOSI",
163                           "STATUS_LED_G_CLK",
164                           "SPIFLASH_CE_N",
165                           "SDA0",
166                           "SCL0",
167                           "RGMII_RXCLK",
168                           "RGMII_RXCTL",
169                           "RGMII_RXD0",
170                           "RGMII_RXD1",
171                           "RGMII_RXD2",
172                           "RGMII_RXD3",
173                           "RGMII_TXCLK",
174                           "RGMII_TXCTL",
175                           "RGMII_TXD0",
176                           "RGMII_TXD1",
177                           "RGMII_TXD2",
178                           "RGMII_TXD3";
179 };
180
181 &hdmi0 {
182         clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 0>, <&clk_27MHz>;
183         clock-names = "hdmi", "bvb", "audio", "cec";
184         wifi-2.4ghz-coexistence;
185         status = "okay";
186 };
187
188 &hdmi1 {
189         clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
190         clock-names = "hdmi", "bvb", "audio", "cec";
191         wifi-2.4ghz-coexistence;
192         status = "okay";
193 };
194
195 &hvs {
196         clocks = <&firmware_clocks 4>;
197 };
198
199 &pixelvalve0 {
200         status = "okay";
201 };
202
203 &pixelvalve1 {
204         status = "okay";
205 };
206
207 &pixelvalve2 {
208         status = "okay";
209 };
210
211 &pixelvalve4 {
212         status = "okay";
213 };
214
215 &pwm1 {
216         pinctrl-names = "default";
217         pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
218         status = "okay";
219 };
220
221 /* SDHCI is used to control the SDIO for wireless */
222 &sdhci {
223         #address-cells = <1>;
224         #size-cells = <0>;
225         pinctrl-names = "default";
226         pinctrl-0 = <&emmc_gpio34>;
227         bus-width = <4>;
228         non-removable;
229         mmc-pwrseq = <&wifi_pwrseq>;
230         status = "okay";
231
232         brcmf: wifi@1 {
233                 reg = <1>;
234                 compatible = "brcm,bcm4329-fmac";
235         };
236 };
237
238 /* EMMC2 is used to drive the SD card */
239 &emmc2 {
240         vqmmc-supply = <&sd_io_1v8_reg>;
241         vmmc-supply = <&sd_vcc_reg>;
242         broken-cd;
243         status = "okay";
244 };
245
246 &genet {
247         phy-handle = <&phy1>;
248         phy-mode = "rgmii-rxid";
249         status = "okay";
250 };
251
252 &genet_mdio {
253         phy1: ethernet-phy@1 {
254                 /* No PHY interrupt */
255                 reg = <0x1>;
256         };
257 };
258
259 &pcie0 {
260         pci@1,0 {
261                 #address-cells = <3>;
262                 #size-cells = <2>;
263                 ranges;
264
265                 reg = <0 0 0 0 0>;
266
267                 usb@1,0 {
268                         reg = <0x10000 0 0 0 0>;
269                         resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>;
270                 };
271         };
272 };
273
274 /* uart0 communicates with the BT module */
275 &uart0 {
276         pinctrl-names = "default";
277         pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
278         uart-has-rtscts;
279         status = "okay";
280
281         bluetooth {
282                 compatible = "brcm,bcm43438-bt";
283                 max-speed = <2000000>;
284                 shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
285         };
286 };
287
288 /* uart1 is mapped to the pin header */
289 &uart1 {
290         pinctrl-names = "default";
291         pinctrl-0 = <&uart1_gpio14>;
292         status = "okay";
293 };
294
295 &vchiq {
296         interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
297 };
298
299 &vc4 {
300         status = "okay";
301 };
302
303 &vec {
304         status = "disabled";
305 };