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/ {
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
61&firmware {
62 expgpio: gpio {
63 compatible = "raspberrypi,firmware-gpio";
64 gpio-controller;
65 #gpio-cells = <2>;
66 gpio-line-names = "BT_ON",
67 "WL_ON",
68 "PWR_LED_OFF",
69 "GLOBAL_RESET",
70 "VDD_SD_IO_SEL",
71 "CAM_GPIO",
72 "",
73 "";
74 status = "okay";
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&pwm1 {
152 pinctrl-names = "default";
153 pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
154 status = "okay";
155};
156
157/* SDHCI is used to control the SDIO for wireless */
158&sdhci {
159 #address-cells = <1>;
160 #size-cells = <0>;
161 pinctrl-names = "default";
162 pinctrl-0 = <&emmc_gpio34>;
163 bus-width = <4>;
164 non-removable;
165 mmc-pwrseq = <&wifi_pwrseq>;
166 status = "okay";
167
168 brcmf: wifi@1 {
169 reg = <1>;
170 compatible = "brcm,bcm4329-fmac";
171 };
172};
173
174/* EMMC2 is used to drive the SD card */
175&emmc2 {
176 vqmmc-supply = <&sd_io_1v8_reg>;
177 broken-cd;
178 status = "okay";
179};
180
181&genet {
182 phy-handle = <&phy1>;
183 phy-mode = "rgmii-rxid";
184 status = "okay";
185};
186
187&genet_mdio {
188 phy1: ethernet-phy@1 {
189 /* No PHY interrupt */
190 reg = <0x1>;
191 };
192};
193
194/* uart0 communicates with the BT module */
195&uart0 {
196 pinctrl-names = "default";
197 pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
198 uart-has-rtscts;
199 status = "okay";
200
201 bluetooth {
202 compatible = "brcm,bcm43438-bt";
203 max-speed = <2000000>;
204 shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
205 };
206};
207
208/* uart1 is mapped to the pin header */
209&uart1 {
210 pinctrl-names = "default";
211 pinctrl-0 = <&uart1_gpio14>;
212 status = "okay";
213};
214
215&vchiq {
216 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
217};