Merge remote-tracking branch 'spi/for-5.9' into spi-linus
[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
93 &gpio {
94         /*
95          * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and
96          * the official GPU firmware DT blob.
97          *
98          * Legend:
99          * "FOO" = GPIO line named "FOO" on the schematic
100          * "FOO_N" = GPIO line named "FOO" on schematic, active low
101          */
102         gpio-line-names = "ID_SDA",
103                           "ID_SCL",
104                           "SDA1",
105                           "SCL1",
106                           "GPIO_GCLK",
107                           "GPIO5",
108                           "GPIO6",
109                           "SPI_CE1_N",
110                           "SPI_CE0_N",
111                           "SPI_MISO",
112                           "SPI_MOSI",
113                           "SPI_SCLK",
114                           "GPIO12",
115                           "GPIO13",
116                           /* Serial port */
117                           "TXD1",
118                           "RXD1",
119                           "GPIO16",
120                           "GPIO17",
121                           "GPIO18",
122                           "GPIO19",
123                           "GPIO20",
124                           "GPIO21",
125                           "GPIO22",
126                           "GPIO23",
127                           "GPIO24",
128                           "GPIO25",
129                           "GPIO26",
130                           "GPIO27",
131                           "RGMII_MDIO",
132                           "RGMIO_MDC",
133                           /* Used by BT module */
134                           "CTS0",
135                           "RTS0",
136                           "TXD0",
137                           "RXD0",
138                           /* Used by Wifi */
139                           "SD1_CLK",
140                           "SD1_CMD",
141                           "SD1_DATA0",
142                           "SD1_DATA1",
143                           "SD1_DATA2",
144                           "SD1_DATA3",
145                           /* Shared with SPI flash */
146                           "PWM0_MISO",
147                           "PWM1_MOSI",
148                           "STATUS_LED_G_CLK",
149                           "SPIFLASH_CE_N",
150                           "SDA0",
151                           "SCL0",
152                           "RGMII_RXCLK",
153                           "RGMII_RXCTL",
154                           "RGMII_RXD0",
155                           "RGMII_RXD1",
156                           "RGMII_RXD2",
157                           "RGMII_RXD3",
158                           "RGMII_TXCLK",
159                           "RGMII_TXCTL",
160                           "RGMII_TXD0",
161                           "RGMII_TXD1",
162                           "RGMII_TXD2",
163                           "RGMII_TXD3";
164 };
165
166 &pwm1 {
167         pinctrl-names = "default";
168         pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
169         status = "okay";
170 };
171
172 /* SDHCI is used to control the SDIO for wireless */
173 &sdhci {
174         #address-cells = <1>;
175         #size-cells = <0>;
176         pinctrl-names = "default";
177         pinctrl-0 = <&emmc_gpio34>;
178         bus-width = <4>;
179         non-removable;
180         mmc-pwrseq = <&wifi_pwrseq>;
181         status = "okay";
182
183         brcmf: wifi@1 {
184                 reg = <1>;
185                 compatible = "brcm,bcm4329-fmac";
186         };
187 };
188
189 /* EMMC2 is used to drive the SD card */
190 &emmc2 {
191         vqmmc-supply = <&sd_io_1v8_reg>;
192         vmmc-supply = <&sd_vcc_reg>;
193         broken-cd;
194         status = "okay";
195 };
196
197 &genet {
198         phy-handle = <&phy1>;
199         phy-mode = "rgmii-rxid";
200         status = "okay";
201 };
202
203 &genet_mdio {
204         phy1: ethernet-phy@1 {
205                 /* No PHY interrupt */
206                 reg = <0x1>;
207         };
208 };
209
210 /* uart0 communicates with the BT module */
211 &uart0 {
212         pinctrl-names = "default";
213         pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
214         uart-has-rtscts;
215         status = "okay";
216
217         bluetooth {
218                 compatible = "brcm,bcm43438-bt";
219                 max-speed = <2000000>;
220                 shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
221         };
222 };
223
224 /* uart1 is mapped to the pin header */
225 &uart1 {
226         pinctrl-names = "default";
227         pinctrl-0 = <&uart1_gpio14>;
228         status = "okay";
229 };
230
231 &vchiq {
232         interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
233 };