1 // SPDX-License-Identifier: GPL-2.0
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/clock/rp1.h>
6 #include <dt-bindings/interrupt-controller/irq.h>
7 #include <dt-bindings/mfd/rp1.h>
8 #include <dt-bindings/pwm/pwm.h>
9 #include <dt-bindings/reset/raspberrypi,firmware-reset.h>
31 #include "bcm2712.dtsi"
54 compatible = "raspberrypi,5-model-b", "brcm,bcm2712";
55 model = "Raspberry Pi 5";
57 /* Will be filled by the bootloader */
59 device_type = "memory";
60 reg = <0 0 0x28000000>;
64 compatible = "gpio-leds";
68 gpios = <&rp1_gpio 44 GPIO_ACTIVE_LOW>;
69 default-state = "off";
70 linux,default-trigger = "none";
75 gpios = <&gio_aon 9 GPIO_ACTIVE_LOW>;
76 default-state = "off";
77 linux,default-trigger = "mmc0";
81 sd_io_1v8_reg: sd_io_1v8_reg {
82 compatible = "regulator-gpio";
83 regulator-name = "vdd-sd-io";
84 regulator-min-microvolt = <1800000>;
85 regulator-max-microvolt = <3300000>;
88 regulator-settling-time-us = <5000>;
89 gpios = <&gio_aon 3 GPIO_ACTIVE_HIGH>;
95 sd_vcc_reg: sd_vcc_reg {
96 compatible = "regulator-fixed";
97 regulator-name = "vcc-sd";
98 regulator-min-microvolt = <3300000>;
99 regulator-max-microvolt = <3300000>;
102 gpios = <&gio_aon 4 GPIO_ACTIVE_HIGH>;
106 wl_on_reg: wl_on_reg {
107 compatible = "regulator-fixed";
108 regulator-name = "wl-on-regulator";
109 regulator-min-microvolt = <3300000>;
110 regulator-max-microvolt = <3300000>;
111 pinctrl-0 = <&wl_on_pins>;
112 pinctrl-names = "default";
114 gpio = <&gio 28 GPIO_ACTIVE_HIGH>;
116 startup-delay-us = <150000>;
124 compatible = "fixed-clock";
130 compatible = "fixed-clock";
136 compatible = "regulator-fixed";
137 regulator-name = "cam0_reg";
140 gpio = <&rp1_gpio 34 0>; // CD0_IO0_MICCLK, to MIPI 0 connector
144 compatible = "regulator-fixed";
145 regulator-name = "cam1_reg";
148 gpio = <&rp1_gpio 46 0>; // CD1_IO0_MICCLK, to MIPI 1 connector
151 cam_dummy_reg: cam_dummy_reg {
152 compatible = "regulator-fixed";
153 regulator-name = "cam-dummy-reg";
158 // A target for unwanted overlay fragments
163 brcm,vdm-qos-map = <0xbbaa9888>;
168 // Add some labels to 2712 device
171 uart10: &_uart0 { status = "okay"; };
173 // The system SPI for the bootloader EEPROM
174 spi10: &_spi0 { status = "okay"; };
176 i2c_rp1boot: &_i2c3 { };
181 // PCIe address space layout:
182 // 00_00000000-00_00xxxxxx = RP1 peripherals
183 // 10_00000000-1x_xxxxxxxx = up to 64GB system RAM
185 // outbound access aimed at PCIe 0_00xxxxxx -> RP1 c0_40xxxxxx
186 // This is the RP1 peripheral space
187 ranges = <0xc0 0x40000000
188 0x02000000 0x00 0x00000000
192 // inbound RP1 1x_xxxxxxxx -> PCIe 1x_xxxxxxxx
194 0x43000000 0x10 0x00000000
197 // inbound RP1 c0_40xxxxxx -> PCIe 00_00xxxxxx
198 // This allows the RP1 DMA controller to address RP1 hardware
200 0x02000000 0x0 0x00000000
203 // inbound RP1 0x_xxxxxxxx -> PCIe 1x_xxxxxxxx
205 0x02000000 0x10 0x00000000
209 // Expose RP1 nodes as system nodes with labels
217 phy-handle = <&phy1>;
218 phy-reset-gpios = <&rp1_gpio 32 GPIO_ACTIVE_LOW>;
219 phy-reset-duration = <5>;
221 phy1: ethernet-phy@1 {
223 brcm,powerdown-enable;
234 pinctrl-0 = <&usb_vbus_pins>;
235 pinctrl-names = "default";
243 #include "bcm2712-rpi.dtsi"
245 // A few extra labels to keep overlays happy
247 i2c0if: &rp1_gpio {};
248 i2c0mux: &rp1_gpio {};
250 i2c_csi_dsi0: &i2c6 { // Note: This is for MIPI0 connector only
251 pinctrl-0 = <&rp1_i2c6_38_39>;
252 pinctrl-names = "default";
253 clock-frequency = <100000>;
256 i2c_csi_dsi1: &i2c4 { // Note: This is for MIPI1 connector only
257 pinctrl-0 = <&rp1_i2c4_40_41>;
258 pinctrl-names = "default";
259 clock-frequency = <100000>;
262 i2c_csi_dsi: &i2c_csi_dsi1 { }; // An alias for compatibility
270 dpi_gpio0: &rp1_dpi_24bit_gpio0 { };
271 dpi_gpio1: &rp1_dpi_24bit_gpio2 { };
272 dpi_18bit_cpadhi_gpio0: &rp1_dpi_18bit_cpadhi_gpio0 { };
273 dpi_18bit_cpadhi_gpio2: &rp1_dpi_18bit_cpadhi_gpio2 { };
274 dpi_18bit_gpio0: &rp1_dpi_18bit_gpio0 { };
275 dpi_18bit_gpio2: &rp1_dpi_18bit_gpio2 { };
276 dpi_16bit_cpadhi_gpio0: &rp1_dpi_16bit_cpadhi_gpio0 { };
277 dpi_16bit_cpadhi_gpio2: &rp1_dpi_16bit_cpadhi_gpio2 { };
278 dpi_16bit_gpio0: &rp1_dpi_16bit_gpio0 { };
279 dpi_16bit_gpio2: &rp1_dpi_16bit_gpio2 { };
281 /* Add the IOMMUs for some RP1 bus masters */
316 clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 0>, <&clk_27MHz>;
317 clock-names = "hdmi", "bvb", "audio", "cec";
322 clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
323 clock-names = "hdmi", "bvb", "audio", "cec";
328 clocks = <&firmware_clocks 4>, <&firmware_clocks 16>;
329 clock-names = "core", "disp";
352 /* SDIO1 is used to drive the SD card */
354 pinctrl-0 = <&emmc_sd_pulls>, <&emmc_aon_cd_pins>;
355 pinctrl-names = "default";
356 vqmmc-supply = <&sd_io_1v8_reg>;
357 vmmc-supply = <&sd_vcc_reg>;
368 emmc_aon_cd_pins: emmc_aon_cd_pins {
369 function = "sd_card_g";
374 /* Slight hack - only one PWM pin (status LED) is usable */
375 aon_pwm_1pin: aon_pwm_1pin {
376 function = "aon_pwm";
382 pwr_button_pins: pwr_button_pins {
388 wl_on_pins: wl_on_pins {
393 bt_shutdown_pins: bt_shutdown_pins {
398 emmc_sd_pulls: emmc_sd_pulls {
399 function = "emmc_dat0", "emmc_dat1", "emmc_dat2", "emmc_dat3";
404 /* uarta communicates with the BT module */
409 clock-frequency = <96000000>;
410 pinctrl-0 = <&uarta_24_pins &bt_shutdown_pins>;
411 pinctrl-names = "default";
413 bluetooth: bluetooth {
414 compatible = "brcm,bcm43438-bt";
415 max-speed = <3000000>;
416 shutdown-gpios = <&gio 29 GPIO_ACTIVE_HIGH>;
417 local-bd-address = [ 00 00 00 00 00 00 ];
422 clock-frequency = <400000>;
423 pinctrl-0 = <&i2c3_m4_agpio0_pins>;
424 pinctrl-names = "default";
429 bootargs = "coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
430 stdout-path = "serial10:115200n8";
435 compatible = "pwm-fan";
436 #cooling-cells = <2>;
437 cooling-min-state = <0>;
438 cooling-max-state = <3>;
439 cooling-levels = <0 75 125 175 250>;
440 pwms = <&rp1_pwm1 3 41566 PWM_POLARITY_INVERTED>;
441 rpm-regmap = <&rp1_pwm1>;
446 compatible = "gpio-keys";
448 pinctrl-names = "default";
449 pinctrl-0 = <&pwr_button_pins>;
453 label = "pwr_button";
454 // linux,code = <205>; // KEY_SUSPEND
455 linux,code = <116>; // KEY_POWER
456 gpios = <&gio 20 GPIO_ACTIVE_LOW>;
457 debounce-interval = <50>; // ms
463 power-domains = <&power RPI_POWER_DOMAIN_USB>;
466 /* SDIO2 drives the WLAN interface */
468 pinctrl-0 = <&sdio2_30_pins>;
469 pinctrl-names = "default";
471 vmmc-supply = <&wl_on_reg>;
475 #address-cells = <1>;
480 compatible = "brcm,bcm4329-fmac";
481 local-mac-address = [00 00 00 00 00 00];
490 spi10_gpio2: spi10_gpio2 {
491 function = "vc_spi0";
492 pins = "gpio2", "gpio3", "gpio4";
496 spi10_cs_gpio1: spi10_cs_gpio1 {
503 spi10_pins: &spi10_gpio2 {};
504 spi10_cs_pins: &spi10_cs_gpio1 {};
507 pinctrl-names = "default";
508 cs-gpios = <&gio 1 1>;
509 pinctrl-0 = <&spi10_pins &spi10_cs_pins>;
512 compatible = "spidev";
514 #address-cells = <1>;
516 spi-max-frequency = <20000000>;
521 // =============================================
522 // Board specific stuff here
525 // Don't use GIO_AON as an interrupt controller because it will
526 // clash with the firmware monitoring the PMIC interrupt via the VPU.
528 /delete-property/ interrupt-controller;
532 // Don't use the MAIN_AON_IRQ interrupt controller because it will
533 // clash with the firmware monitoring the PMIC interrupt via the VPU.
540 pinctrl-0 = <&rp1_pwm1_gpio45>;
541 pinctrl-names = "default";
545 cpu_tepid: cpu-tepid {
546 temperature = <50000>;
552 temperature = <60000>;
558 temperature = <67500>;
564 temperature = <75000>;
573 cooling-device = <&fan 1 1>;
578 cooling-device = <&fan 2 2>;
583 cooling-device = <&fan 3 3>;
588 cooling-device = <&fan 4 4>;
593 cooling-device = <&fan 4 4>;
598 // The GPIOs above 35 are not used on Pi 5, so shrink the upper bank
599 // to reduce the clutter in gpioinfo/pinctrl
600 brcm,gpio-bank-widths = <32 4>;
604 "2712_BOOT_CS_N", // GPIO_001
605 "2712_BOOT_MISO", // GPIO_002
606 "2712_BOOT_MOSI", // GPIO_003
607 "2712_BOOT_SCLK", // GPIO_004
617 "PCIE_SDA", // GPIO_014
618 "PCIE_SCL", // GPIO_015
623 "PWR_GPIO", // GPIO_020
624 "2712_G21_FS", // GPIO_021
627 "BT_RTS", // GPIO_024
628 "BT_CTS", // GPIO_025
629 "BT_TXD", // GPIO_026
630 "BT_RXD", // GPIO_027
633 "WIFI_SDIO_CLK", // GPIO_030
634 "WIFI_SDIO_CMD", // GPIO_031
635 "WIFI_SDIO_D0", // GPIO_032
636 "WIFI_SDIO_D1", // GPIO_033
637 "WIFI_SDIO_D2", // GPIO_034
638 "WIFI_SDIO_D3"; // GPIO_035
643 "RP1_SDA", // AON_GPIO_00
644 "RP1_SCL", // AON_GPIO_01
645 "RP1_RUN", // AON_GPIO_02
646 "SD_IOVDD_SEL", // AON_GPIO_03
647 "SD_PWR_ON", // AON_GPIO_04
648 "SD_CDET_N", // AON_GPIO_05
649 "SD_FLG_N", // AON_GPIO_06
651 "2712_WAKE", // AON_GPIO_08
652 "2712_STAT_LED", // AON_GPIO_09
655 "PMIC_INT", // AON_GPIO_12
656 "UART_TX_FS", // AON_GPIO_13
657 "UART_RX_FS", // AON_GPIO_14
661 // Pad bank0 out to 32 entries
662 "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
664 "HDMI0_SCL", // AON_SGPIO_00
665 "HDMI0_SDA", // AON_SGPIO_01
666 "HDMI1_SCL", // AON_SGPIO_02
667 "HDMI1_SDA", // AON_SGPIO_03
668 "PMIC_SCL", // AON_SGPIO_04
669 "PMIC_SDA"; // AON_SGPIO_05
673 gpios = <2 GPIO_ACTIVE_HIGH>;
675 line-name = "RP1 RUN pin";
710 "PCIE_RP1_WAKE", // GPIO28
711 "FAN_TACH", // GPIO29
712 "HOST_SDA", // GPIO30
713 "HOST_SCL", // GPIO31
714 "ETH_RST_N", // GPIO32
717 "CD0_IO0_MICCLK", // GPIO34
718 "CD0_IO0_MICDAT0", // GPIO35
719 "RP1_PCIE_CLKREQ_N", // GPIO36
725 "USB_VBUS_EN", // GPIO42
726 "USB_OC_N", // GPIO43
727 "RP1_STAT_LED", // GPIO44
729 "CD1_IO0_MICCLK", // GPIO46
730 "2712_WAKE", // GPIO47
731 "CD1_IO1_MICDAT1", // GPIO48
732 "EN_MAX_USB_CUR", // GPIO49
738 usb_vbus_pins: usb_vbus_pins {
740 pins = "gpio42", "gpio43";
746 blconfig = &blconfig;
747 bluetooth = &bluetooth;
749 ethernet0 = &rp1_eth;
774 i2c10 = &i2c_rp1boot;
775 // Bit-bashed i2c_gpios start at 10
787 gpio4 = &pinctrl_aon;
795 bdaddr = <&bluetooth>, "local-bd-address[";
796 button_debounce = <&pwr_key>, "debounce-interval:0";
797 cooling_fan = <&fan>, "status", <&rp1_pwm1>, "status";
798 uart0_console = <&uart0>,"status", <&aliases>, "console=",&uart0;
799 i2c0 = <&i2c0>, "status";
800 i2c1 = <&i2c1>, "status";
801 i2c = <&i2c1>, "status";
802 i2c_arm = <&i2c_arm>, "status";
803 i2c_vc = <&i2c_vc>, "status";
804 i2c_csi_dsi = <&i2c_csi_dsi>, "status";
805 i2c_csi_dsi0 = <&i2c_csi_dsi0>, "status";
806 i2c_csi_dsi1 = <&i2c_csi_dsi1>, "status";
807 i2c0_baudrate = <&i2c0>, "clock-frequency:0";
808 i2c1_baudrate = <&i2c1>, "clock-frequency:0";
809 i2c_baudrate = <&i2c_arm>, "clock-frequency:0";
810 i2c_arm_baudrate = <&i2c_arm>, "clock-frequency:0";
811 i2c_vc_baudrate = <&i2c_vc>, "clock-frequency:0";
812 nvme = <&pciex1>, "status";
813 pciex1 = <&pciex1>, "status";
814 pciex1_gen = <&pciex1> , "max-link-speed:0";
815 pciex1_no_l0s = <&pciex1>, "aspm-no-l0s?";
816 random = <&random>, "status";
817 rtc_bbat_vchg = <&rpi_rtc>, "trickle-charge-microvolt:0";
818 spi = <&spi0>, "status";
819 suspend = <&pwr_key>, "linux,code:0=205";
820 uart0 = <&uart0>, "status";
821 wifiaddr = <&wifi>, "local-mac-address[";
823 act_led_activelow = <&act_led>, "active-low?";
824 act_led_trigger = <&act_led>, "linux,default-trigger";
825 pwr_led_activelow = <&pwr_led>, "gpios:8";
826 pwr_led_trigger = <&pwr_led>, "linux,default-trigger";
827 drm_fb0_rp1_dsi0 = <&aliases>, "drm_fb0=",&dsi0;
828 drm_fb0_rp1_dsi1 = <&aliases>, "drm_fb0=",&dsi1;
829 drm_fb0_rp1_dpi = <&aliases>, "drm_fb0=",&dpi;
830 drm_fb0_vc4 = <&aliases>, "drm_fb0=",&vc4;
831 drm_fb1_rp1_dsi0 = <&aliases>, "drm_fb1=",&dsi0;
832 drm_fb1_rp1_dsi1 = <&aliases>, "drm_fb1=",&dsi1;
833 drm_fb1_rp1_dpi = <&aliases>, "drm_fb1=",&dpi;
834 drm_fb1_vc4 = <&aliases>, "drm_fb1=",&vc4;
835 drm_fb2_rp1_dsi0 = <&aliases>, "drm_fb2=",&dsi0;
836 drm_fb2_rp1_dsi1 = <&aliases>, "drm_fb2=",&dsi1;
837 drm_fb2_rp1_dpi = <&aliases>, "drm_fb2=",&dpi;
838 drm_fb2_vc4 = <&aliases>, "drm_fb2=",&vc4;