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>
29 #include "bcm2712.dtsi"
52 compatible = "raspberrypi,5-model-b", "brcm,bcm2712";
53 model = "Raspberry Pi 5";
55 /* Will be filled by the bootloader */
57 device_type = "memory";
58 reg = <0 0 0x28000000>;
62 compatible = "gpio-leds";
66 gpios = <&rp1_gpio 44 GPIO_ACTIVE_LOW>;
67 default-state = "off";
68 linux,default-trigger = "none";
73 gpios = <&gio_aon 9 GPIO_ACTIVE_LOW>;
74 default-state = "off";
75 linux,default-trigger = "mmc0";
79 sd_io_1v8_reg: sd_io_1v8_reg {
80 compatible = "regulator-gpio";
81 regulator-name = "vdd-sd-io";
82 regulator-min-microvolt = <1800000>;
83 regulator-max-microvolt = <3300000>;
86 regulator-settling-time-us = <5000>;
87 gpios = <&gio_aon 3 GPIO_ACTIVE_HIGH>;
93 sd_vcc_reg: sd_vcc_reg {
94 compatible = "regulator-fixed";
95 regulator-name = "vcc-sd";
96 regulator-min-microvolt = <3300000>;
97 regulator-max-microvolt = <3300000>;
100 gpios = <&gio_aon 4 GPIO_ACTIVE_HIGH>;
104 wl_on_reg: wl_on_reg {
105 compatible = "regulator-fixed";
106 regulator-name = "wl-on-regulator";
107 regulator-min-microvolt = <3300000>;
108 regulator-max-microvolt = <3300000>;
109 pinctrl-0 = <&wl_on_pins>;
110 pinctrl-names = "default";
112 gpio = <&gio 28 GPIO_ACTIVE_HIGH>;
114 startup-delay-us = <150000>;
122 compatible = "fixed-clock";
128 compatible = "fixed-clock";
134 compatible = "regulator-fixed";
135 regulator-name = "cam0_reg";
138 gpio = <&rp1_gpio 34 0>; // CD0_IO0_MICCLK, to MIPI 0 connector
142 compatible = "regulator-fixed";
143 regulator-name = "cam1_reg";
146 gpio = <&rp1_gpio 46 0>; // CD1_IO0_MICCLK, to MIPI 1 connector
149 cam_dummy_reg: cam_dummy_reg {
150 compatible = "regulator-fixed";
151 regulator-name = "cam-dummy-reg";
156 // A target for unwanted overlay fragments
160 // A few extra labels to keep overlays happy
168 brcm,vdm-qos-map = <0xbbaa9888>;
173 // Add some labels to 2712 device
176 uart10: &_uart0 { status = "okay"; };
178 // The system SPI for the bootloader EEPROM
179 spi10: &_spi0 { status = "okay"; };
181 i2c_rp1boot: &_i2c3 { };
186 // PCIe address space layout:
187 // 00_00000000-00_00xxxxxx = RP1 peripherals
188 // 10_00000000-1x_xxxxxxxx = up to 64GB system RAM
190 // outbound access aimed at PCIe 0_00xxxxxx -> RP1 c0_40xxxxxx
191 // This is the RP1 peripheral space
192 ranges = <0xc0 0x40000000
193 0x02000000 0x00 0x00000000
197 // inbound RP1 1x_xxxxxxxx -> PCIe 1x_xxxxxxxx
199 0x43000000 0x10 0x00000000
202 // inbound RP1 c0_40xxxxxx -> PCIe 00_00xxxxxx
203 // This allows the RP1 DMA controller to address RP1 hardware
205 0x02000000 0x0 0x00000000
208 // inbound RP1 0x_xxxxxxxx -> PCIe 1x_xxxxxxxx
210 0x02000000 0x10 0x00000000
214 // Expose RP1 nodes as system nodes with labels
222 phy-handle = <&phy1>;
223 phy-reset-gpios = <&rp1_gpio 32 GPIO_ACTIVE_LOW>;
224 phy-reset-duration = <5>;
226 phy1: ethernet-phy@1 {
228 brcm,powerdown-enable;
239 pinctrl-0 = <&usb_vbus_pins>;
240 pinctrl-names = "default";
248 #include "bcm2712-rpi.dtsi"
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 = "reboot=w 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 krnbt = <&bluetooth>, "status";
813 nvme = <&pciex1>, "status";
814 pciex1 = <&pciex1>, "status";
815 pciex1_gen = <&pciex1> , "max-link-speed:0";
816 pciex1_no_l0s = <&pciex1>, "aspm-no-l0s?";
817 pciex1_tperst_clk_ms = <&pciex1>, "brcm,tperst-clk-ms:0";
818 pcie_tperst_clk_ms = <&pciex1>, "brcm,tperst-clk-ms:0";
819 random = <&random>, "status";
820 rtc = <&rpi_rtc>, "status";
821 rtc_bbat_vchg = <&rpi_rtc>, "trickle-charge-microvolt:0";
822 spi = <&spi0>, "status";
823 suspend = <&pwr_key>, "linux,code:0=205";
824 uart0 = <&uart0>, "status";
825 wifiaddr = <&wifi>, "local-mac-address[";
827 act_led_gpio = <&led_act>,"gpios:4",<&led_act>,"gpios:0=",<&gpio>;
828 act_led_activelow = <&led_act>,"gpios:8";
829 act_led_trigger = <&led_act>, "linux,default-trigger";
830 pwr_led_gpio = <&led_pwr>,"gpios:4";
831 pwr_led_activelow = <&led_pwr>, "gpios:8";
832 pwr_led_trigger = <&led_pwr>, "linux,default-trigger";
833 eth_led0 = <&phy1>,"led-modes:0";
834 eth_led1 = <&phy1>,"led-modes:4";
835 drm_fb0_rp1_dsi0 = <&aliases>, "drm-fb0=",&dsi0;
836 drm_fb0_rp1_dsi1 = <&aliases>, "drm-fb0=",&dsi1;
837 drm_fb0_rp1_dpi = <&aliases>, "drm-fb0=",&dpi;
838 drm_fb0_vc4 = <&aliases>, "drm-fb0=",&vc4;
839 drm_fb1_rp1_dsi0 = <&aliases>, "drm-fb1=",&dsi0;
840 drm_fb1_rp1_dsi1 = <&aliases>, "drm-fb1=",&dsi1;
841 drm_fb1_rp1_dpi = <&aliases>, "drm-fb1=",&dpi;
842 drm_fb1_vc4 = <&aliases>, "drm-fb1=",&vc4;
843 drm_fb2_rp1_dsi0 = <&aliases>, "drm-fb2=",&dsi0;
844 drm_fb2_rp1_dsi1 = <&aliases>, "drm-fb2=",&dsi1;
845 drm_fb2_rp1_dpi = <&aliases>, "drm-fb2=",&dpi;
846 drm_fb2_vc4 = <&aliases>, "drm-fb2=",&vc4;
848 fan_temp0 = <&cpu_tepid>,"temperature:0";
849 fan_temp1 = <&cpu_warm>,"temperature:0";
850 fan_temp2 = <&cpu_hot>,"temperature:0";
851 fan_temp3 = <&cpu_vhot>,"temperature:0";
852 fan_temp0_hyst = <&cpu_tepid>,"hysteresis:0";
853 fan_temp1_hyst = <&cpu_warm>,"hysteresis:0";
854 fan_temp2_hyst = <&cpu_hot>,"hysteresis:0";
855 fan_temp3_hyst = <&cpu_vhot>,"hysteresis:0";
856 fan_temp0_speed = <&fan>, "cooling-levels:4";
857 fan_temp1_speed = <&fan>, "cooling-levels:8";
858 fan_temp2_speed = <&fan>, "cooling-levels:12";
859 fan_temp3_speed = <&fan>, "cooling-levels:16";