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