1 // SPDX-License-Identifier: GPL-2.0
3 #include "bcm2711.dtsi"
4 #include "bcm2711-rpi.dtsi"
5 //#include "bcm283x-rpi-usb-peripheral.dtsi"
8 compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
9 model = "Raspberry Pi 4 Model B";
12 /* 8250 auxiliary UART instead of pl011 */
13 stdout-path = "serial1:115200n8";
18 gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
23 gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
24 default-state = "keep";
25 linux,default-trigger = "default-on";
29 wifi_pwrseq: wifi-pwrseq {
30 compatible = "mmc-pwrseq-simple";
31 reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
34 sd_io_1v8_reg: sd_io_1v8_reg {
35 compatible = "regulator-gpio";
36 regulator-name = "vdd-sd-io";
37 regulator-min-microvolt = <1800000>;
38 regulator-max-microvolt = <3300000>;
41 regulator-settling-time-us = <5000>;
42 gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
43 states = <1800000 0x1>,
48 sd_vcc_reg: sd_vcc_reg {
49 compatible = "regulator-fixed";
50 regulator-name = "vcc-sd";
51 regulator-min-microvolt = <3300000>;
52 regulator-max-microvolt = <3300000>;
55 gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
68 gpio-line-names = "BT_ON",
80 * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and
81 * the official GPU firmware DT blob.
84 * "FOO" = GPIO line named "FOO" on the schematic
85 * "FOO_N" = GPIO line named "FOO" on schematic, active low
87 gpio-line-names = "ID_SDA",
118 /* Used by BT module */
130 /* Shared with SPI flash */
176 pinctrl-names = "default";
177 pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
181 /* SDHCI is used to control the SDIO for wireless */
183 #address-cells = <1>;
185 pinctrl-names = "default";
186 pinctrl-0 = <&emmc_gpio34>;
189 mmc-pwrseq = <&wifi_pwrseq>;
194 compatible = "brcm,bcm4329-fmac";
198 /* EMMC2 is used to drive the SD card */
200 vqmmc-supply = <&sd_io_1v8_reg>;
201 vmmc-supply = <&sd_vcc_reg>;
207 phy-handle = <&phy1>;
208 phy-mode = "rgmii-rxid";
213 phy1: ethernet-phy@1 {
214 /* No PHY interrupt */
222 #address-cells = <3>;
230 resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>;
235 /* uart0 communicates with the BT module */
237 pinctrl-names = "default";
238 pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
243 compatible = "brcm,bcm43438-bt";
244 max-speed = <2000000>;
245 shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
249 /* uart1 is mapped to the pin header */
251 pinctrl-names = "default";
252 pinctrl-0 = <&uart1_gpio14>;
264 // =============================================
265 // Downstream rpi- changes
269 #include "bcm270x.dtsi"
270 #include "bcm271x-rpi-bt.dtsi"
274 /delete-node/ pixelvalve@7e807000;
275 /delete-node/ hdmi@7e902000;
279 #include "bcm2711-rpi-ds.dtsi"
280 #include "bcm283x-rpi-csi1-2lane.dtsi"
281 #include "bcm283x-rpi-i2c0mux_0_44.dtsi"
282 #include "bcm283x-rpi-cam1-regulator.dtsi"
286 bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
305 /delete-property/ intc;
308 /delete-node/ wifi-pwrseq;
312 pinctrl-names = "default";
313 pinctrl-0 = <&sdio_pins>;
319 pinctrl-0 = <&uart0_pins &bt_pins>;
324 pinctrl-0 = <&uart1_pins>;
328 pinctrl-names = "default";
329 pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
330 cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
333 compatible = "spidev";
335 #address-cells = <1>;
337 spi-max-frequency = <125000000>;
341 compatible = "spidev";
343 #address-cells = <1>;
345 spi-max-frequency = <125000000>;
350 spi0_pins: spi0_pins {
351 brcm,pins = <9 10 11>;
352 brcm,function = <BCM2835_FSEL_ALT0>;
355 spi0_cs_pins: spi0_cs_pins {
357 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
360 spi3_pins: spi3_pins {
362 brcm,function = <BCM2835_FSEL_ALT3>;
365 spi3_cs_pins: spi3_cs_pins {
367 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
370 spi4_pins: spi4_pins {
372 brcm,function = <BCM2835_FSEL_ALT3>;
375 spi4_cs_pins: spi4_cs_pins {
377 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
380 spi5_pins: spi5_pins {
381 brcm,pins = <13 14 15>;
382 brcm,function = <BCM2835_FSEL_ALT3>;
385 spi5_cs_pins: spi5_cs_pins {
387 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
390 spi6_pins: spi6_pins {
391 brcm,pins = <19 20 21>;
392 brcm,function = <BCM2835_FSEL_ALT3>;
395 spi6_cs_pins: spi6_cs_pins {
397 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
402 brcm,function = <BCM2835_FSEL_ALT0>;
403 brcm,pull = <BCM2835_PUD_UP>;
408 brcm,function = <BCM2835_FSEL_ALT0>;
409 brcm,pull = <BCM2835_PUD_UP>;
414 brcm,function = <BCM2835_FSEL_ALT5>;
415 brcm,pull = <BCM2835_PUD_UP>;
420 brcm,function = <BCM2835_FSEL_ALT5>;
421 brcm,pull = <BCM2835_PUD_UP>;
426 brcm,function = <BCM2835_FSEL_ALT5>;
427 brcm,pull = <BCM2835_PUD_UP>;
432 brcm,function = <BCM2835_FSEL_ALT5>;
433 brcm,pull = <BCM2835_PUD_UP>;
437 brcm,pins = <18 19 20 21>;
438 brcm,function = <BCM2835_FSEL_ALT0>;
441 sdio_pins: sdio_pins {
442 brcm,pins = <34 35 36 37 38 39>;
443 brcm,function = <BCM2835_FSEL_ALT3>; // alt3 = SD1
444 brcm,pull = <0 2 2 2 2 2>;
448 brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0
454 uart0_pins: uart0_pins {
456 brcm,function = <BCM2835_FSEL_ALT3>;
460 uart1_pins: uart1_pins {
466 uart2_pins: uart2_pins {
468 brcm,function = <BCM2835_FSEL_ALT4>;
472 uart3_pins: uart3_pins {
474 brcm,function = <BCM2835_FSEL_ALT4>;
478 uart4_pins: uart4_pins {
480 brcm,function = <BCM2835_FSEL_ALT4>;
484 uart5_pins: uart5_pins {
486 brcm,function = <BCM2835_FSEL_ALT4>;
492 clock-frequency = <100000>;
496 pinctrl-names = "default";
497 pinctrl-0 = <&i2c1_pins>;
498 clock-frequency = <100000>;
502 pinctrl-names = "default";
503 pinctrl-0 = <&i2s_pins>;
506 // =============================================
507 // Board specific stuff here
514 led-modes = <0x00 0x08>; /* link/activity link */
518 audio_pins: audio_pins {
527 linux,default-trigger = "mmc0";
528 gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
533 linux,default-trigger = "default-on";
534 gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
543 pinctrl-names = "default";
544 pinctrl-0 = <&audio_pins>;
548 gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>;
553 act_led_gpio = <&act_led>,"gpios:4";
554 act_led_activelow = <&act_led>,"gpios:8";
555 act_led_trigger = <&act_led>,"linux,default-trigger";
557 pwr_led_gpio = <&pwr_led>,"gpios:4";
558 pwr_led_activelow = <&pwr_led>,"gpios:8";
559 pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
561 eth_led0 = <&phy1>,"led-modes:0";
562 eth_led1 = <&phy1>,"led-modes:4";
564 sd_poll_once = <&emmc2>, "non-removable?";
565 spi_dma4 = <&spi0>, "dmas:0=", <&dma40>,
566 <&spi0>, "dmas:8=", <&dma40>;