xref: /freebsd/sys/contrib/device-tree/src/arm64/broadcom/bcm2712-rpi-5-b-base.dtsi (revision 69ed3df4f588860308677cda76cbcce1f19a54c9)
1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/dts-v1/;
3
4#include <dt-bindings/gpio/gpio.h>
5#include <dt-bindings/input/input.h>
6#include "bcm2712.dtsi"
7
8/ {
9	compatible = "raspberrypi,5-model-b", "brcm,bcm2712";
10	model = "Raspberry Pi 5";
11
12	aliases {
13		serial10 = &uart10;
14	};
15
16	chosen: chosen {
17		stdout-path = "serial10:115200n8";
18	};
19
20	clk_rp1_xosc: clock-50000000 {
21		compatible = "fixed-clock";
22		#clock-cells = <0>;
23		clock-output-names = "rp1-xosc";
24		clock-frequency = <50000000>;
25	};
26
27	/* Will be filled by the bootloader */
28	memory@0 {
29		device_type = "memory";
30		reg = <0 0 0 0x28000000>;
31	};
32
33	gpio-keys {
34		compatible = "gpio-keys";
35		pinctrl-names = "default";
36		pinctrl-0 = <&pwr_button_default>;
37		status = "okay";
38
39		power_button: power-button {
40			label = "pwr_button";
41			linux,code = <KEY_POWER>;
42			gpios = <&gio 20 GPIO_ACTIVE_LOW>;
43			debounce-interval = <50>;
44		};
45	};
46
47	firmware {
48		firmware: rpi-firmware {
49			compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
50
51			mboxes = <&mailbox>;
52
53			firmware_clocks: clocks {
54				compatible = "raspberrypi,firmware-clocks";
55				#clock-cells = <1>;
56			};
57
58			reset: reset {
59				compatible = "raspberrypi,firmware-reset";
60				#reset-cells = <1>;
61			};
62
63			power: power {
64				compatible = "raspberrypi,bcm2835-power";
65				firmware = <&firmware>;
66				#power-domain-cells = <1>;
67			};
68		};
69	};
70
71	sd_io_1v8_reg: sd-io-1v8-reg {
72		compatible = "regulator-gpio";
73		regulator-name = "vdd-sd-io";
74		regulator-min-microvolt = <1800000>;
75		regulator-max-microvolt = <3300000>;
76		regulator-boot-on;
77		regulator-always-on;
78		regulator-settling-time-us = <5000>;
79		gpios = <&gio_aon 3 GPIO_ACTIVE_HIGH>;
80		states = <1800000 1>,
81			 <3300000 0>;
82	};
83
84	sd_vcc_reg: sd-vcc-reg {
85		compatible = "regulator-fixed";
86		regulator-name = "vcc-sd";
87		regulator-min-microvolt = <3300000>;
88		regulator-max-microvolt = <3300000>;
89		regulator-boot-on;
90		enable-active-high;
91		gpios = <&gio_aon 4 GPIO_ACTIVE_HIGH>;
92	};
93
94	wl_on_reg: wl-on-reg {
95		compatible = "regulator-fixed";
96		regulator-name = "wl-on-regulator";
97		regulator-min-microvolt = <3300000>;
98		regulator-max-microvolt = <3300000>;
99		pinctrl-0 = <&wl_on_default>;
100		pinctrl-names = "default";
101		gpio = <&gio 28 GPIO_ACTIVE_HIGH>;
102		startup-delay-us = <150000>;
103		enable-active-high;
104	};
105};
106
107&pinctrl {
108	bt_shutdown_default: bt-shutdown-default-state {
109		function = "gpio";
110		pins = "gpio29";
111	};
112
113	emmc_sd_default: emmc-sd-default-state {
114		pins = "emmc_cmd", "emmc_dat0", "emmc_dat1", "emmc_dat2", "emmc_dat3";
115		bias-pull-up;
116	};
117
118	pwr_button_default: pwr-button-default-state {
119		function = "gpio";
120		pins = "gpio20";
121		bias-pull-up;
122	};
123
124	sdio2_30_default: sdio2-30-default-state {
125		clk-pins {
126			function = "sd2";
127			pins = "gpio30";
128			bias-disable;
129		};
130		cmd-pins {
131			function = "sd2";
132			pins = "gpio31";
133			bias-pull-up;
134		};
135		dat-pins {
136			function = "sd2";
137			pins = "gpio32", "gpio33", "gpio34", "gpio35";
138			bias-pull-up;
139		};
140	};
141
142	uarta_24_default: uarta-24-default-state {
143		rts-pins {
144			function = "uart0";
145			pins = "gpio24";
146			bias-disable;
147		};
148		cts-pins {
149			function = "uart0";
150			pins = "gpio25";
151			bias-pull-up;
152		};
153		txd-pins {
154			function = "uart0";
155			pins = "gpio26";
156			bias-disable;
157		};
158		rxd-pins {
159			function = "uart0";
160			pins = "gpio27";
161			bias-pull-up;
162		};
163	};
164
165	wl_on_default: wl-on-default-state {
166		function = "gpio";
167		pins = "gpio28";
168	};
169};
170
171&pinctrl_aon {
172	emmc_aon_cd_default: emmc-aon-cd-default-state {
173		function = "sd_card_g";
174		pins = "aon_gpio5";
175		bias-pull-up;
176	};
177};
178
179/* The Debug UART, on Rpi5 it's on JST-SH 1.0mm 3-pin connector
180 * labeled "UART", i.e. the interface with the system console.
181 */
182&uart10 {
183	status = "okay";
184};
185
186/* SDIO1 is used to drive the SD card */
187&sdio1 {
188	pinctrl-0 = <&emmc_sd_default>, <&emmc_aon_cd_default>;
189	pinctrl-names = "default";
190	vqmmc-supply = <&sd_io_1v8_reg>;
191	vmmc-supply = <&sd_vcc_reg>;
192	bus-width = <4>;
193	sd-uhs-sdr50;
194	sd-uhs-ddr50;
195	sd-uhs-sdr104;
196	cd-gpios = <&gio_aon 5 GPIO_ACTIVE_LOW>;
197};
198
199&sdio2 {
200	pinctrl-0 = <&sdio2_30_default>;
201	pinctrl-names = "default";
202	bus-width = <4>;
203	vmmc-supply = <&wl_on_reg>;
204	sd-uhs-ddr50;
205	non-removable;
206	status = "okay";
207	#address-cells = <1>;
208	#size-cells = <0>;
209
210	wifi: wifi@1 {
211		reg = <1>;
212		compatible = "brcm,bcm4329-fmac";
213	};
214};
215
216/* uarta communicates with the BT module */
217&uarta {
218	uart-has-rtscts;
219	pinctrl-0 = <&uarta_24_default &bt_shutdown_default>;
220	pinctrl-names = "default";
221	status = "okay";
222
223	bluetooth: bluetooth {
224		compatible = "brcm,bcm43438-bt";
225		max-speed = <3000000>;
226		shutdown-gpios = <&gio 29 GPIO_ACTIVE_HIGH>;
227	};
228};
229
230&hvs {
231	clocks = <&firmware_clocks 4>, <&firmware_clocks 16>;
232	clock-names = "core", "disp";
233};
234
235&hdmi0 {
236	clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 0>, <&clk_27MHz>;
237	clock-names = "hdmi", "bvb", "audio", "cec";
238};
239
240&hdmi1 {
241	clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
242	clock-names = "hdmi", "bvb", "audio", "cec";
243};
244
245&pcie1 {
246	status = "okay";
247};
248
249&pcie2 {
250	status = "okay";
251};
252
253&v3d {
254	clocks = <&firmware_clocks 5>;
255};
256