Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
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 status = "okay";
185};
186
187&hdmi1 {
188 clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
189 clock-names = "hdmi", "bvb", "audio", "cec";
190 status = "okay";
191};
192
193&hvs {
194 clocks = <&firmware_clocks 4>;
195};
196
197&pixelvalve0 {
198 status = "okay";
199};
200
201&pixelvalve1 {
202 status = "okay";
203};
204
205&pixelvalve2 {
206 status = "okay";
207};
208
209&pixelvalve4 {
210 status = "okay";
211};
212
213&pwm1 {
214 pinctrl-names = "default";
215 pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
216 status = "okay";
217};
218
219/* SDHCI is used to control the SDIO for wireless */
220&sdhci {
221 #address-cells = <1>;
222 #size-cells = <0>;
223 pinctrl-names = "default";
224 pinctrl-0 = <&emmc_gpio34>;
225 bus-width = <4>;
226 non-removable;
227 mmc-pwrseq = <&wifi_pwrseq>;
228 status = "okay";
229
230 brcmf: wifi@1 {
231 reg = <1>;
232 compatible = "brcm,bcm4329-fmac";
233 };
234};
235
236/* EMMC2 is used to drive the SD card */
237&emmc2 {
238 vqmmc-supply = <&sd_io_1v8_reg>;
239 vmmc-supply = <&sd_vcc_reg>;
240 broken-cd;
241 status = "okay";
242};
243
244&genet {
245 phy-handle = <&phy1>;
246 phy-mode = "rgmii-rxid";
247 status = "okay";
248};
249
250&genet_mdio {
251 phy1: ethernet-phy@1 {
252 /* No PHY interrupt */
253 reg = <0x1>;
254 };
255};
256
257&pcie0 {
258 pci@1,0 {
259 #address-cells = <3>;
260 #size-cells = <2>;
261 ranges;
262
263 reg = <0 0 0 0 0>;
264
265 usb@1,0 {
266 reg = <0x10000 0 0 0 0>;
267 resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>;
268 };
269 };
270};
271
272/* uart0 communicates with the BT module */
273&uart0 {
274 pinctrl-names = "default";
275 pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
276 uart-has-rtscts;
277 status = "okay";
278
279 bluetooth {
280 compatible = "brcm,bcm43438-bt";
281 max-speed = <2000000>;
282 shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
283 };
284};
285
286/* uart1 is mapped to the pin header */
287&uart1 {
288 pinctrl-names = "default";
289 pinctrl-0 = <&uart1_gpio14>;
290 status = "okay";
291};
292
293&vchiq {
294 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
295};
296
297&vc4 {
298 status = "okay";
299};
300
301&vec {
302 status = "disabled";
303};