1 // SPDX-License-Identifier: GPL-2.0
3 #include "bcm2711.dtsi"
4 #include "bcm2835-rpi.dtsi"
5 #include <dt-bindings/input/input.h>
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";
16 /* Will be filled by the bootloader */
18 device_type = "memory";
26 rpi_backlight: rpi_backlight {
27 compatible = "raspberrypi,rpi-backlight";
28 firmware = <&firmware>;
32 rpi_ft5406: rpi_ft5406 {
33 compatible = "rpi,rpi-ft5406";
34 firmware = <&firmware>;
39 compatible = "gpio-keys";
43 linux,code = <KEY_VOLUMEUP>;
44 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
48 lable = "volume-down";
49 linux,code = <KEY_VOLUMEDOWN>;
50 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
54 lable = "fastforward";
55 linux,code = <KEY_FASTFORWARD>;
56 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_REWIND>;
62 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
67 linux,code = <KEY_PLAYPAUSE>;
68 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
74 gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
79 gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
83 wifi_pwrseq: wifi-pwrseq {
84 compatible = "mmc-pwrseq-simple";
85 reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
88 sd_io_1v8_reg: sd_io_1v8_reg {
89 compatible = "regulator-gpio";
90 regulator-name = "vdd-sd-io";
91 regulator-min-microvolt = <1800000>;
92 regulator-max-microvolt = <3300000>;
95 regulator-settling-time-us = <5000>;
96 gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
105 compatible = "raspberrypi,firmware-gpio";
108 gpio-line-names = "BT_ON",
121 pinctrl-names = "default";
122 pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
126 /* SDHCI is used to control the SDIO for wireless */
128 #address-cells = <1>;
130 pinctrl-names = "default";
131 pinctrl-0 = <&emmc_gpio34>;
134 mmc-pwrseq = <&wifi_pwrseq>;
139 compatible = "brcm,bcm4329-fmac";
143 /* EMMC2 is used to drive the SD card */
145 vqmmc-supply = <&sd_io_1v8_reg>;
151 phy-handle = <&phy1>;
152 phy-mode = "rgmii-rxid";
157 phy1: ethernet-phy@1 {
158 /* No PHY interrupt */
163 /* uart0 communicates with the BT module */
165 pinctrl-names = "default";
166 pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
171 compatible = "brcm,bcm43438-bt";
172 max-speed = <2000000>;
173 shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
177 /* uart1 is mapped to the pin header */
179 pinctrl-names = "default";
180 pinctrl-0 = <&uart1_gpio14>;
185 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
228 // =============================================
229 // Downstream rpi- changes
231 #include "bcm270x.dtsi"
232 #include "bcm271x-rpi-bt.dtsi"
236 /delete-node/ pixelvalve@7e807000;
237 /delete-node/ hdmi@7e902000;
241 #include "bcm2711-rpi.dtsi"
242 #include "bcm283x-rpi-csi1-2lane.dtsi"
243 #include "bcm283x-rpi-i2c0mux_0_44.dtsi"
245 /delete-node/ &emmc2;
249 bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1";
258 /delete-property/ i2c2;
263 /delete-property/ ethernet;
264 /delete-property/ intc;
266 emmc2bus = &emmc2bus;
270 compatible = "simple-bus";
271 #address-cells = <2>;
274 ranges = <0x0 0x7e000000 0x0 0xfe000000 0x01800000>;
275 dma-ranges = <0x0 0xc0000000 0x0 0x00000000 0x40000000>;
277 emmc2: emmc2@7e340000 {
278 compatible = "brcm,bcm2711-emmc2";
280 interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
281 clocks = <&clocks BCM2711_CLOCK_EMMC2>;
282 reg = <0x0 0x7e340000 0x100>;
283 vqmmc-supply = <&sd_io_1v8_reg>;
287 /delete-node/ wifi-pwrseq;
291 #address-cells = <1>;
293 pinctrl-names = "default";
294 pinctrl-0 = <&sdio_pins>;
299 compatible = "brcm,bcm4329-fmac";
300 brcm,feature-disable = <0x2000>; /* BIT[13] : sup-wpa */
305 pinctrl-0 = <&uart0_pins &bt_pins &uart0_ctsrts_gpio30>;
310 pinctrl-0 = <&uart1_pins>;
314 pinctrl-names = "default";
315 pinctrl-0 = <&uart2_pins>;
320 pinctrl-names = "default";
321 pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
322 cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
326 compatible = "spidev";
328 #address-cells = <1>;
330 spi-max-frequency = <125000000>;
334 compatible = "spidev";
336 #address-cells = <1>;
338 spi-max-frequency = <125000000>;
343 spi0_pins: spi0_pins {
344 brcm,pins = <9 10 11>;
345 brcm,function = <BCM2835_FSEL_ALT0>;
348 spi0_cs_pins: spi0_cs_pins {
350 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
353 spi3_pins: spi3_pins {
355 brcm,function = <BCM2835_FSEL_ALT3>;
358 spi3_cs_pins: spi3_cs_pins {
360 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
363 spi4_pins: spi4_pins {
365 brcm,function = <BCM2835_FSEL_ALT3>;
368 spi4_cs_pins: spi4_cs_pins {
370 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
373 spi5_pins: spi5_pins {
374 brcm,pins = <13 14 15>;
375 brcm,function = <BCM2835_FSEL_ALT3>;
378 spi5_cs_pins: spi5_cs_pins {
380 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
383 spi6_pins: spi6_pins {
384 brcm,pins = <19 20 21>;
385 brcm,function = <BCM2835_FSEL_ALT3>;
388 spi6_cs_pins: spi6_cs_pins {
390 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
395 brcm,function = <BCM2835_FSEL_ALT0>;
396 brcm,pull = <BCM2835_PUD_UP>;
401 brcm,function = <BCM2835_FSEL_ALT0>;
402 brcm,pull = <BCM2835_PUD_UP>;
407 brcm,function = <BCM2835_FSEL_ALT5>;
408 brcm,pull = <BCM2835_PUD_UP>;
413 brcm,function = <BCM2835_FSEL_ALT5>;
414 brcm,pull = <BCM2835_PUD_UP>;
419 brcm,function = <BCM2835_FSEL_ALT5>;
420 brcm,pull = <BCM2835_PUD_UP>;
425 brcm,function = <BCM2835_FSEL_ALT5>;
426 brcm,pull = <BCM2835_PUD_UP>;
430 brcm,pins = <18 19 20 21>;
431 brcm,function = <BCM2835_FSEL_ALT0>;
434 sdio_pins: sdio_pins {
435 brcm,pins = <34 35 36 37 38 39>;
436 brcm,function = <BCM2835_FSEL_ALT3>; // alt3 = SD1
437 brcm,pull = <0 2 2 2 2 2>;
441 brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0
447 uart0_pins: uart0_pins {
449 brcm,function = <BCM2835_FSEL_ALT3>;
453 uart1_pins: uart1_pins {
459 uart2_pins: uart2_pins {
461 brcm,function = <BCM2835_FSEL_ALT4>;
465 uart3_pins: uart3_pins {
467 brcm,function = <BCM2835_FSEL_ALT4>;
471 uart4_pins: uart4_pins {
473 brcm,function = <BCM2835_FSEL_ALT4>;
477 uart5_pins: uart5_pins {
479 brcm,function = <BCM2835_FSEL_ALT4>;
483 /* Needs to describe gpio settings at config.txt */
484 key_volume_up: key_volume_up {
486 brcm,function = <1>; /* BCM2835_FSEL_GPIO_IN */
487 brcm,pull = <2>; /* BCM2835_PUD_UP */
490 key_volume_down: key_volume_down {
496 key_fastforward: key_fastforward {
502 key_rewind: key_rewind {
508 key_playpause: key_playpause {
516 clock-frequency = <100000>;
520 pinctrl-names = "default";
521 pinctrl-0 = <&i2c1_pins>;
522 clock-frequency = <100000>;
525 #address-cells = <1>;
529 compatible = "x-power,ac108_0";
531 #sound-dai-cells = <0>;
537 pinctrl-names = "default";
538 pinctrl-0 = <&i2s_pins>;
540 #sound-dai-cells = <0>;
545 compatible = "seeed-voicecard";
546 seeed-voice-card,format = "dsp_a";
547 seeed-voice-card,name = "seeed-4mic-voicecard";
550 seeed-voice-card,bitclock-master = <&codec_dai>;
551 seeed-voice-card,frame-master = <&codec_dai>;
552 seeed-voice-card,channels-playback-override = <4>;
553 seeed-voice-card,channels-capture-override = <4>;
555 cpu_dai: seeed-voice-card,cpu {
557 dai-tdm-slot-num = <2>;
558 dai-tdm-slot-width = <32>;
559 dai-tdm-slot-tx-mask = <1 1 0 0>;
560 dai-tdm-slot-rx-mask = <1 1 0 0>;
562 codec_dai: seeed-voice-card,codec {
563 sound-dai = <&ac108_a>;
564 system-clock-frequency = <24000000>;
570 /delete-property/ i2c2_baudrate;
571 /delete-property/ i2c2_iknowwhatimdoing;
576 compatible = "raspberrypi,rpi-firmware-kms-2711";
579 // =============================================
580 // Board specific stuff here
583 sd_vcc_reg: sd_vcc_reg {
584 compatible = "regulator-fixed";
585 regulator-name = "vcc-sd";
586 regulator-min-microvolt = <3300000>;
587 regulator-max-microvolt = <3300000>;
590 gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
599 vmmc-supply = <&sd_vcc_reg>;
604 led-modes = <0x00 0x08>; /* link/activity link */
608 audio_pins: audio_pins {
617 linux,default-trigger = "mmc0";
618 gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
623 linux,default-trigger = "default-on";
624 gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
633 pinctrl-names = "default";
634 pinctrl-0 = <&audio_pins>;
639 compatible = "brcm,bcm2835-usb";
641 g-np-tx-fifo-size = <32>;
642 g-rx-fifo-size = <558>;
643 g-tx-fifo-size = <512 512 512 512 512 256 256>;
713 size = <0x20000000>; /* 512MB */
718 act_led_gpio = <&act_led>,"gpios:4";
719 act_led_activelow = <&act_led>,"gpios:8";
720 act_led_trigger = <&act_led>,"linux,default-trigger";
722 pwr_led_gpio = <&pwr_led>,"gpios:4";
723 pwr_led_activelow = <&pwr_led>,"gpios:8";
724 pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
726 eth_led0 = <&phy1>,"led-modes:0";
727 eth_led1 = <&phy1>,"led-modes:4";
729 spi_dma4 = <&spi0>, "dmas:0=", <&dma40>,
730 <&spi0>, "dmas:8=", <&dma40>;