1724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0 2724ba675SRob Herring/dts-v1/; 3724ba675SRob Herring#include "bcm2711.dtsi" 4724ba675SRob Herring#include "bcm2711-rpi.dtsi" 5724ba675SRob Herring#include "bcm283x-rpi-led-deprecated.dtsi" 6724ba675SRob Herring#include "bcm283x-rpi-usb-peripheral.dtsi" 7724ba675SRob Herring#include "bcm283x-rpi-wifi-bt.dtsi" 8*a3592faeSFlorian Fainelli#include <dt-bindings/leds/common.h> 9724ba675SRob Herring 10724ba675SRob Herring/ { 11724ba675SRob Herring compatible = "raspberrypi,4-model-b", "brcm,bcm2711"; 12724ba675SRob Herring model = "Raspberry Pi 4 Model B"; 13724ba675SRob Herring 14724ba675SRob Herring chosen { 15724ba675SRob Herring /* 8250 auxiliary UART instead of pl011 */ 16724ba675SRob Herring stdout-path = "serial1:115200n8"; 17724ba675SRob Herring }; 18724ba675SRob Herring 19d990221bSLaurent Pinchart cam1_reg: regulator-cam1 { 20d990221bSLaurent Pinchart compatible = "regulator-fixed"; 21d990221bSLaurent Pinchart regulator-name = "cam1-reg"; 22d990221bSLaurent Pinchart enable-active-high; 23d990221bSLaurent Pinchart gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>; 24d990221bSLaurent Pinchart }; 25d990221bSLaurent Pinchart 26724ba675SRob Herring sd_io_1v8_reg: regulator-sd-io-1v8 { 27724ba675SRob Herring compatible = "regulator-gpio"; 28724ba675SRob Herring regulator-name = "vdd-sd-io"; 29724ba675SRob Herring regulator-min-microvolt = <1800000>; 30724ba675SRob Herring regulator-max-microvolt = <3300000>; 31724ba675SRob Herring regulator-boot-on; 32724ba675SRob Herring regulator-always-on; 33724ba675SRob Herring regulator-settling-time-us = <5000>; 34724ba675SRob Herring gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>; 35724ba675SRob Herring states = <1800000 0x1>, 36724ba675SRob Herring <3300000 0x0>; 37724ba675SRob Herring status = "okay"; 38724ba675SRob Herring }; 39724ba675SRob Herring 40724ba675SRob Herring sd_vcc_reg: regulator-sd-vcc { 41724ba675SRob Herring compatible = "regulator-fixed"; 42724ba675SRob Herring regulator-name = "vcc-sd"; 43724ba675SRob Herring regulator-min-microvolt = <3300000>; 44724ba675SRob Herring regulator-max-microvolt = <3300000>; 45724ba675SRob Herring regulator-boot-on; 46724ba675SRob Herring enable-active-high; 47724ba675SRob Herring gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>; 48724ba675SRob Herring }; 49724ba675SRob Herring}; 50724ba675SRob Herring 51724ba675SRob Herring&bt { 52724ba675SRob Herring shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; 53724ba675SRob Herring}; 54724ba675SRob Herring 55724ba675SRob Herring&ddc0 { 56724ba675SRob Herring status = "okay"; 57724ba675SRob Herring}; 58724ba675SRob Herring 59724ba675SRob Herring&ddc1 { 60724ba675SRob Herring status = "okay"; 61724ba675SRob Herring}; 62724ba675SRob Herring 63724ba675SRob Herring&expgpio { 64724ba675SRob Herring gpio-line-names = "BT_ON", /* 0 */ 65724ba675SRob Herring "WL_ON", 66724ba675SRob Herring "PWR_LED_OFF", 67724ba675SRob Herring "GLOBAL_RESET", 68724ba675SRob Herring "VDD_SD_IO_SEL", 69724ba675SRob Herring "CAM_GPIO", /* 5 */ 70724ba675SRob Herring "SD_PWR_ON", 71724ba675SRob Herring ""; 72724ba675SRob Herring}; 73724ba675SRob Herring 74724ba675SRob Herring&gpio { 75724ba675SRob Herring /* 76724ba675SRob Herring * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and 77724ba675SRob Herring * the official GPU firmware DT blob. 78724ba675SRob Herring * 79724ba675SRob Herring * Legend: 80724ba675SRob Herring * "FOO" = GPIO line named "FOO" on the schematic 81724ba675SRob Herring * "FOO_N" = GPIO line named "FOO" on schematic, active low 82724ba675SRob Herring */ 83724ba675SRob Herring gpio-line-names = "ID_SDA", /* 0 */ 84724ba675SRob Herring "ID_SCL", 85724ba675SRob Herring "SDA1", 86724ba675SRob Herring "SCL1", 87724ba675SRob Herring "GPIO_GCLK", 88724ba675SRob Herring "GPIO5", /* 5 */ 89724ba675SRob Herring "GPIO6", 90724ba675SRob Herring "SPI_CE1_N", 91724ba675SRob Herring "SPI_CE0_N", 92724ba675SRob Herring "SPI_MISO", 93724ba675SRob Herring "SPI_MOSI", /* 10 */ 94724ba675SRob Herring "SPI_SCLK", 95724ba675SRob Herring "GPIO12", 96724ba675SRob Herring "GPIO13", 97724ba675SRob Herring /* Serial port */ 98724ba675SRob Herring "TXD1", 99724ba675SRob Herring "RXD1", /* 15 */ 100724ba675SRob Herring "GPIO16", 101724ba675SRob Herring "GPIO17", 102724ba675SRob Herring "GPIO18", 103724ba675SRob Herring "GPIO19", 104724ba675SRob Herring "GPIO20", /* 20 */ 105724ba675SRob Herring "GPIO21", 106724ba675SRob Herring "GPIO22", 107724ba675SRob Herring "GPIO23", 108724ba675SRob Herring "GPIO24", 109724ba675SRob Herring "GPIO25", /* 25 */ 110724ba675SRob Herring "GPIO26", 111724ba675SRob Herring "GPIO27", 112724ba675SRob Herring "RGMII_MDIO", 113724ba675SRob Herring "RGMIO_MDC", 114724ba675SRob Herring /* Used by BT module */ 115724ba675SRob Herring "CTS0", /* 30 */ 116724ba675SRob Herring "RTS0", 117724ba675SRob Herring "TXD0", 118724ba675SRob Herring "RXD0", 119724ba675SRob Herring /* Used by Wifi */ 120724ba675SRob Herring "SD1_CLK", 121724ba675SRob Herring "SD1_CMD", /* 35 */ 122724ba675SRob Herring "SD1_DATA0", 123724ba675SRob Herring "SD1_DATA1", 124724ba675SRob Herring "SD1_DATA2", 125724ba675SRob Herring "SD1_DATA3", 126724ba675SRob Herring /* Shared with SPI flash */ 127724ba675SRob Herring "PWM0_MISO", /* 40 */ 128724ba675SRob Herring "PWM1_MOSI", 129724ba675SRob Herring "STATUS_LED_G_CLK", 130724ba675SRob Herring "SPIFLASH_CE_N", 131724ba675SRob Herring "SDA0", 132724ba675SRob Herring "SCL0", /* 45 */ 133724ba675SRob Herring "RGMII_RXCLK", 134724ba675SRob Herring "RGMII_RXCTL", 135724ba675SRob Herring "RGMII_RXD0", 136724ba675SRob Herring "RGMII_RXD1", 137724ba675SRob Herring "RGMII_RXD2", /* 50 */ 138724ba675SRob Herring "RGMII_RXD3", 139724ba675SRob Herring "RGMII_TXCLK", 140724ba675SRob Herring "RGMII_TXCTL", 141724ba675SRob Herring "RGMII_TXD0", 142724ba675SRob Herring "RGMII_TXD1", /* 55 */ 143724ba675SRob Herring "RGMII_TXD2", 144724ba675SRob Herring "RGMII_TXD3"; 145724ba675SRob Herring}; 146724ba675SRob Herring 147724ba675SRob Herring&hdmi0 { 148724ba675SRob Herring status = "okay"; 149724ba675SRob Herring}; 150724ba675SRob Herring 151724ba675SRob Herring&hdmi1 { 152724ba675SRob Herring status = "okay"; 153724ba675SRob Herring}; 154724ba675SRob Herring 155724ba675SRob Herring&led_act { 156724ba675SRob Herring gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; 157724ba675SRob Herring}; 158724ba675SRob Herring 159724ba675SRob Herring&leds { 160724ba675SRob Herring led_pwr: led-pwr { 161724ba675SRob Herring label = "PWR"; 162724ba675SRob Herring gpios = <&expgpio 2 GPIO_ACTIVE_LOW>; 163724ba675SRob Herring default-state = "keep"; 164724ba675SRob Herring linux,default-trigger = "default-on"; 165724ba675SRob Herring }; 166724ba675SRob Herring}; 167724ba675SRob Herring 168724ba675SRob Herring&pixelvalve0 { 169724ba675SRob Herring status = "okay"; 170724ba675SRob Herring}; 171724ba675SRob Herring 172724ba675SRob Herring&pixelvalve1 { 173724ba675SRob Herring status = "okay"; 174724ba675SRob Herring}; 175724ba675SRob Herring 176724ba675SRob Herring&pixelvalve2 { 177724ba675SRob Herring status = "okay"; 178724ba675SRob Herring}; 179724ba675SRob Herring 180724ba675SRob Herring&pixelvalve4 { 181724ba675SRob Herring status = "okay"; 182724ba675SRob Herring}; 183724ba675SRob Herring 184724ba675SRob Herring&pwm1 { 185724ba675SRob Herring pinctrl-names = "default"; 186724ba675SRob Herring pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>; 187724ba675SRob Herring status = "okay"; 188724ba675SRob Herring}; 189724ba675SRob Herring 190724ba675SRob Herring/* EMMC2 is used to drive the SD card */ 191724ba675SRob Herring&emmc2 { 192724ba675SRob Herring vqmmc-supply = <&sd_io_1v8_reg>; 193724ba675SRob Herring vmmc-supply = <&sd_vcc_reg>; 194724ba675SRob Herring broken-cd; 195724ba675SRob Herring status = "okay"; 196724ba675SRob Herring}; 197724ba675SRob Herring 198724ba675SRob Herring&genet { 199724ba675SRob Herring phy-handle = <&phy1>; 200724ba675SRob Herring phy-mode = "rgmii-rxid"; 201724ba675SRob Herring status = "okay"; 202724ba675SRob Herring}; 203724ba675SRob Herring 204724ba675SRob Herring&genet_mdio { 205724ba675SRob Herring phy1: ethernet-phy@1 { 206724ba675SRob Herring /* No PHY interrupt */ 207724ba675SRob Herring reg = <0x1>; 208*a3592faeSFlorian Fainelli 209*a3592faeSFlorian Fainelli leds { 210*a3592faeSFlorian Fainelli #address-cells = <1>; 211*a3592faeSFlorian Fainelli #size-cells = <0>; 212*a3592faeSFlorian Fainelli 213*a3592faeSFlorian Fainelli /* LED1 */ 214*a3592faeSFlorian Fainelli led@0 { 215*a3592faeSFlorian Fainelli reg = <0>; 216*a3592faeSFlorian Fainelli color = <LED_COLOR_ID_GREEN>; 217*a3592faeSFlorian Fainelli function = LED_FUNCTION_LAN; 218*a3592faeSFlorian Fainelli default-state = "keep"; 219*a3592faeSFlorian Fainelli }; 220*a3592faeSFlorian Fainelli 221*a3592faeSFlorian Fainelli /* LED2 */ 222*a3592faeSFlorian Fainelli led@1 { 223*a3592faeSFlorian Fainelli reg = <1>; 224*a3592faeSFlorian Fainelli color = <LED_COLOR_ID_AMBER>; 225*a3592faeSFlorian Fainelli function = LED_FUNCTION_LAN; 226*a3592faeSFlorian Fainelli default-state = "keep"; 227*a3592faeSFlorian Fainelli }; 228*a3592faeSFlorian Fainelli }; 229724ba675SRob Herring }; 230724ba675SRob Herring}; 231724ba675SRob Herring 232724ba675SRob Herring&pcie0 { 233724ba675SRob Herring pci@0,0 { 234724ba675SRob Herring device_type = "pci"; 235724ba675SRob Herring #address-cells = <3>; 236724ba675SRob Herring #size-cells = <2>; 237724ba675SRob Herring ranges; 238724ba675SRob Herring 239724ba675SRob Herring reg = <0 0 0 0 0>; 240724ba675SRob Herring 241724ba675SRob Herring usb@0,0 { 242724ba675SRob Herring reg = <0 0 0 0 0>; 243724ba675SRob Herring resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>; 244724ba675SRob Herring }; 245724ba675SRob Herring }; 246724ba675SRob Herring}; 247724ba675SRob Herring 248724ba675SRob Herring/* uart0 communicates with the BT module */ 249724ba675SRob Herring&uart0 { 250724ba675SRob Herring pinctrl-names = "default"; 251724ba675SRob Herring pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>; 252724ba675SRob Herring uart-has-rtscts; 253724ba675SRob Herring}; 254724ba675SRob Herring 255724ba675SRob Herring/* uart1 is mapped to the pin header */ 256724ba675SRob Herring&uart1 { 257724ba675SRob Herring pinctrl-names = "default"; 258724ba675SRob Herring pinctrl-0 = <&uart1_gpio14>; 259724ba675SRob Herring status = "okay"; 260724ba675SRob Herring}; 261724ba675SRob Herring 262724ba675SRob Herring&vc4 { 263724ba675SRob Herring status = "okay"; 264724ba675SRob Herring}; 265724ba675SRob Herring 266724ba675SRob Herring&vec { 267724ba675SRob Herring status = "disabled"; 268724ba675SRob Herring}; 269724ba675SRob Herring 270724ba675SRob Herring&wifi_pwrseq { 271724ba675SRob Herring reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; 272724ba675SRob Herring}; 273