0001 // SPDX-License-Identifier: GPL-2.0
0002 /dts-v1/;
0003 #include "bcm2711.dtsi"
0004 #include "bcm2711-rpi.dtsi"
0005 #include "bcm283x-rpi-usb-peripheral.dtsi"
0006 #include "bcm283x-rpi-wifi-bt.dtsi"
0007
0008 / {
0009 compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
0010 model = "Raspberry Pi 4 Model B";
0011
0012 chosen {
0013 /* 8250 auxiliary UART instead of pl011 */
0014 stdout-path = "serial1:115200n8";
0015 };
0016
0017 leds {
0018 led-act {
0019 gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
0020 };
0021
0022 led-pwr {
0023 label = "PWR";
0024 gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
0025 default-state = "keep";
0026 linux,default-trigger = "default-on";
0027 };
0028 };
0029
0030 sd_io_1v8_reg: sd_io_1v8_reg {
0031 compatible = "regulator-gpio";
0032 regulator-name = "vdd-sd-io";
0033 regulator-min-microvolt = <1800000>;
0034 regulator-max-microvolt = <3300000>;
0035 regulator-boot-on;
0036 regulator-always-on;
0037 regulator-settling-time-us = <5000>;
0038 gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
0039 states = <1800000 0x1>,
0040 <3300000 0x0>;
0041 status = "okay";
0042 };
0043
0044 sd_vcc_reg: sd_vcc_reg {
0045 compatible = "regulator-fixed";
0046 regulator-name = "vcc-sd";
0047 regulator-min-microvolt = <3300000>;
0048 regulator-max-microvolt = <3300000>;
0049 regulator-boot-on;
0050 enable-active-high;
0051 gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
0052 };
0053 };
0054
0055 &bt {
0056 shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
0057 };
0058
0059 &ddc0 {
0060 status = "okay";
0061 };
0062
0063 &ddc1 {
0064 status = "okay";
0065 };
0066
0067 &expgpio {
0068 gpio-line-names = "BT_ON", /* 0 */
0069 "WL_ON",
0070 "PWR_LED_OFF",
0071 "GLOBAL_RESET",
0072 "VDD_SD_IO_SEL",
0073 "CAM_GPIO", /* 5 */
0074 "SD_PWR_ON",
0075 "";
0076 };
0077
0078 &gpio {
0079 /*
0080 * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and
0081 * the official GPU firmware DT blob.
0082 *
0083 * Legend:
0084 * "FOO" = GPIO line named "FOO" on the schematic
0085 * "FOO_N" = GPIO line named "FOO" on schematic, active low
0086 */
0087 gpio-line-names = "ID_SDA", /* 0 */
0088 "ID_SCL",
0089 "SDA1",
0090 "SCL1",
0091 "GPIO_GCLK",
0092 "GPIO5", /* 5 */
0093 "GPIO6",
0094 "SPI_CE1_N",
0095 "SPI_CE0_N",
0096 "SPI_MISO",
0097 "SPI_MOSI", /* 10 */
0098 "SPI_SCLK",
0099 "GPIO12",
0100 "GPIO13",
0101 /* Serial port */
0102 "TXD1",
0103 "RXD1", /* 15 */
0104 "GPIO16",
0105 "GPIO17",
0106 "GPIO18",
0107 "GPIO19",
0108 "GPIO20", /* 20 */
0109 "GPIO21",
0110 "GPIO22",
0111 "GPIO23",
0112 "GPIO24",
0113 "GPIO25", /* 25 */
0114 "GPIO26",
0115 "GPIO27",
0116 "RGMII_MDIO",
0117 "RGMIO_MDC",
0118 /* Used by BT module */
0119 "CTS0", /* 30 */
0120 "RTS0",
0121 "TXD0",
0122 "RXD0",
0123 /* Used by Wifi */
0124 "SD1_CLK",
0125 "SD1_CMD", /* 35 */
0126 "SD1_DATA0",
0127 "SD1_DATA1",
0128 "SD1_DATA2",
0129 "SD1_DATA3",
0130 /* Shared with SPI flash */
0131 "PWM0_MISO", /* 40 */
0132 "PWM1_MOSI",
0133 "STATUS_LED_G_CLK",
0134 "SPIFLASH_CE_N",
0135 "SDA0",
0136 "SCL0", /* 45 */
0137 "RGMII_RXCLK",
0138 "RGMII_RXCTL",
0139 "RGMII_RXD0",
0140 "RGMII_RXD1",
0141 "RGMII_RXD2", /* 50 */
0142 "RGMII_RXD3",
0143 "RGMII_TXCLK",
0144 "RGMII_TXCTL",
0145 "RGMII_TXD0",
0146 "RGMII_TXD1", /* 55 */
0147 "RGMII_TXD2",
0148 "RGMII_TXD3";
0149 };
0150
0151 &hdmi0 {
0152 status = "okay";
0153 };
0154
0155 &hdmi1 {
0156 status = "okay";
0157 };
0158
0159 &pixelvalve0 {
0160 status = "okay";
0161 };
0162
0163 &pixelvalve1 {
0164 status = "okay";
0165 };
0166
0167 &pixelvalve2 {
0168 status = "okay";
0169 };
0170
0171 &pixelvalve4 {
0172 status = "okay";
0173 };
0174
0175 &pwm1 {
0176 pinctrl-names = "default";
0177 pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
0178 status = "okay";
0179 };
0180
0181 /* EMMC2 is used to drive the SD card */
0182 &emmc2 {
0183 vqmmc-supply = <&sd_io_1v8_reg>;
0184 vmmc-supply = <&sd_vcc_reg>;
0185 broken-cd;
0186 status = "okay";
0187 };
0188
0189 &genet {
0190 phy-handle = <&phy1>;
0191 phy-mode = "rgmii-rxid";
0192 status = "okay";
0193 };
0194
0195 &genet_mdio {
0196 phy1: ethernet-phy@1 {
0197 /* No PHY interrupt */
0198 reg = <0x1>;
0199 };
0200 };
0201
0202 &pcie0 {
0203 pci@0,0 {
0204 device_type = "pci";
0205 #address-cells = <3>;
0206 #size-cells = <2>;
0207 ranges;
0208
0209 reg = <0 0 0 0 0>;
0210
0211 usb@0,0 {
0212 reg = <0 0 0 0 0>;
0213 resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>;
0214 };
0215 };
0216 };
0217
0218 /* uart0 communicates with the BT module */
0219 &uart0 {
0220 pinctrl-names = "default";
0221 pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
0222 uart-has-rtscts;
0223 };
0224
0225 /* uart1 is mapped to the pin header */
0226 &uart1 {
0227 pinctrl-names = "default";
0228 pinctrl-0 = <&uart1_gpio14>;
0229 status = "okay";
0230 };
0231
0232 &vc4 {
0233 status = "okay";
0234 };
0235
0236 &vec {
0237 status = "disabled";
0238 };
0239
0240 &wifi_pwrseq {
0241 reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
0242 };