ARM: dts: bcm2711: Add firmware usb reset node
[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 / {
8         compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
9         model = "Raspberry Pi 4 Model B";
10
11         chosen {
12                 /* 8250 auxiliary UART instead of pl011 */
13                 stdout-path = "serial1:115200n8";
14         };
15
16         /* Will be filled by the bootloader */
17         memory@0 {
18                 device_type = "memory";
19                 reg = <0 0 0>;
20         };
21
22         aliases {
23                 emmc2bus = &emmc2bus;
24                 ethernet0 = &genet;
25                 pcie0 = &pcie0;
26         };
27
28         leds {
29                 act {
30                         gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
31                 };
32
33                 pwr {
34                         label = "PWR";
35                         gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
36                         default-state = "keep";
37                         linux,default-trigger = "default-on";
38                 };
39         };
40
41         wifi_pwrseq: wifi-pwrseq {
42                 compatible = "mmc-pwrseq-simple";
43                 reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
44         };
45
46         sd_io_1v8_reg: sd_io_1v8_reg {
47                 compatible = "regulator-gpio";
48                 regulator-name = "vdd-sd-io";
49                 regulator-min-microvolt = <1800000>;
50                 regulator-max-microvolt = <3300000>;
51                 regulator-boot-on;
52                 regulator-always-on;
53                 regulator-settling-time-us = <5000>;
54                 gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
55                 states = <1800000 0x1
56                           3300000 0x0>;
57                 status = "okay";
58         };
59
60         sd_vcc_reg: sd_vcc_reg {
61                 compatible = "regulator-fixed";
62                 regulator-name = "vcc-sd";
63                 regulator-min-microvolt = <3300000>;
64                 regulator-max-microvolt = <3300000>;
65                 regulator-boot-on;
66                 enable-active-high;
67                 gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
68         };
69 };
70
71 &firmware {
72         firmware_clocks: clocks {
73                 compatible = "raspberrypi,firmware-clocks";
74                 #clock-cells = <1>;
75         };
76
77         expgpio: gpio {
78                 compatible = "raspberrypi,firmware-gpio";
79                 gpio-controller;
80                 #gpio-cells = <2>;
81                 gpio-line-names = "BT_ON",
82                                   "WL_ON",
83                                   "PWR_LED_OFF",
84                                   "GLOBAL_RESET",
85                                   "VDD_SD_IO_SEL",
86                                   "CAM_GPIO",
87                                   "SD_PWR_ON",
88                                   "";
89                 status = "okay";
90         };
91
92         reset: reset {
93                 compatible = "raspberrypi,firmware-reset";
94                 #reset-cells = <1>;
95         };
96 };
97
98 &gpio {
99         /*
100          * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and
101          * the official GPU firmware DT blob.
102          *
103          * Legend:
104          * "FOO" = GPIO line named "FOO" on the schematic
105          * "FOO_N" = GPIO line named "FOO" on schematic, active low
106          */
107         gpio-line-names = "ID_SDA",
108                           "ID_SCL",
109                           "SDA1",
110                           "SCL1",
111                           "GPIO_GCLK",
112                           "GPIO5",
113                           "GPIO6",
114                           "SPI_CE1_N",
115                           "SPI_CE0_N",
116                           "SPI_MISO",
117                           "SPI_MOSI",
118                           "SPI_SCLK",
119                           "GPIO12",
120                           "GPIO13",
121                           /* Serial port */
122                           "TXD1",
123                           "RXD1",
124                           "GPIO16",
125                           "GPIO17",
126                           "GPIO18",
127                           "GPIO19",
128                           "GPIO20",
129                           "GPIO21",
130                           "GPIO22",
131                           "GPIO23",
132                           "GPIO24",
133                           "GPIO25",
134                           "GPIO26",
135                           "GPIO27",
136                           "RGMII_MDIO",
137                           "RGMIO_MDC",
138                           /* Used by BT module */
139                           "CTS0",
140                           "RTS0",
141                           "TXD0",
142                           "RXD0",
143                           /* Used by Wifi */
144                           "SD1_CLK",
145                           "SD1_CMD",
146                           "SD1_DATA0",
147                           "SD1_DATA1",
148                           "SD1_DATA2",
149                           "SD1_DATA3",
150                           /* Shared with SPI flash */
151                           "PWM0_MISO",
152                           "PWM1_MOSI",
153                           "STATUS_LED_G_CLK",
154                           "SPIFLASH_CE_N",
155                           "SDA0",
156                           "SCL0",
157                           "RGMII_RXCLK",
158                           "RGMII_RXCTL",
159                           "RGMII_RXD0",
160                           "RGMII_RXD1",
161                           "RGMII_RXD2",
162                           "RGMII_RXD3",
163                           "RGMII_TXCLK",
164                           "RGMII_TXCTL",
165                           "RGMII_TXD0",
166                           "RGMII_TXD1",
167                           "RGMII_TXD2",
168                           "RGMII_TXD3";
169 };
170
171 &pwm1 {
172         pinctrl-names = "default";
173         pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
174         status = "okay";
175 };
176
177 /* SDHCI is used to control the SDIO for wireless */
178 &sdhci {
179         #address-cells = <1>;
180         #size-cells = <0>;
181         pinctrl-names = "default";
182         pinctrl-0 = <&emmc_gpio34>;
183         bus-width = <4>;
184         non-removable;
185         mmc-pwrseq = <&wifi_pwrseq>;
186         status = "okay";
187
188         brcmf: wifi@1 {
189                 reg = <1>;
190                 compatible = "brcm,bcm4329-fmac";
191         };
192 };
193
194 /* EMMC2 is used to drive the SD card */
195 &emmc2 {
196         vqmmc-supply = <&sd_io_1v8_reg>;
197         vmmc-supply = <&sd_vcc_reg>;
198         broken-cd;
199         status = "okay";
200 };
201
202 &genet {
203         phy-handle = <&phy1>;
204         phy-mode = "rgmii-rxid";
205         status = "okay";
206 };
207
208 &genet_mdio {
209         phy1: ethernet-phy@1 {
210                 /* No PHY interrupt */
211                 reg = <0x1>;
212         };
213 };
214
215 /* uart0 communicates with the BT module */
216 &uart0 {
217         pinctrl-names = "default";
218         pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
219         uart-has-rtscts;
220         status = "okay";
221
222         bluetooth {
223                 compatible = "brcm,bcm43438-bt";
224                 max-speed = <2000000>;
225                 shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
226         };
227 };
228
229 /* uart1 is mapped to the pin header */
230 &uart1 {
231         pinctrl-names = "default";
232         pinctrl-0 = <&uart1_gpio14>;
233         status = "okay";
234 };
235
236 &vchiq {
237         interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
238 };