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