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 = <&spi0_pins &spi0_cs_pins>;
316 cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
320 compatible = "spidev";
322 #address-cells = <1>;
324 spi-max-frequency = <125000000>;
328 compatible = "spidev";
330 #address-cells = <1>;
332 spi-max-frequency = <125000000>;
337 spi0_pins: spi0_pins {
338 brcm,pins = <9 10 11>;
339 brcm,function = <BCM2835_FSEL_ALT0>;
342 spi0_cs_pins: spi0_cs_pins {
344 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
347 spi3_pins: spi3_pins {
349 brcm,function = <BCM2835_FSEL_ALT3>;
352 spi3_cs_pins: spi3_cs_pins {
354 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
357 spi4_pins: spi4_pins {
359 brcm,function = <BCM2835_FSEL_ALT3>;
362 spi4_cs_pins: spi4_cs_pins {
364 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
367 spi5_pins: spi5_pins {
368 brcm,pins = <13 14 15>;
369 brcm,function = <BCM2835_FSEL_ALT3>;
372 spi5_cs_pins: spi5_cs_pins {
374 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
377 spi6_pins: spi6_pins {
378 brcm,pins = <19 20 21>;
379 brcm,function = <BCM2835_FSEL_ALT3>;
382 spi6_cs_pins: spi6_cs_pins {
384 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
389 brcm,function = <BCM2835_FSEL_ALT0>;
390 brcm,pull = <BCM2835_PUD_UP>;
395 brcm,function = <BCM2835_FSEL_ALT0>;
396 brcm,pull = <BCM2835_PUD_UP>;
401 brcm,function = <BCM2835_FSEL_ALT5>;
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>;
424 brcm,pins = <18 19 20 21>;
425 brcm,function = <BCM2835_FSEL_ALT0>;
428 sdio_pins: sdio_pins {
429 brcm,pins = <34 35 36 37 38 39>;
430 brcm,function = <BCM2835_FSEL_ALT3>; // alt3 = SD1
431 brcm,pull = <0 2 2 2 2 2>;
435 brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0
441 uart0_pins: uart0_pins {
443 brcm,function = <BCM2835_FSEL_ALT3>;
447 uart1_pins: uart1_pins {
453 uart2_pins: uart2_pins {
455 brcm,function = <BCM2835_FSEL_ALT4>;
459 uart3_pins: uart3_pins {
461 brcm,function = <BCM2835_FSEL_ALT4>;
465 uart4_pins: uart4_pins {
467 brcm,function = <BCM2835_FSEL_ALT4>;
471 uart5_pins: uart5_pins {
473 brcm,function = <BCM2835_FSEL_ALT4>;
477 /* Needs to describe gpio settings at config.txt */
478 key_volume_up: key_volume_up {
480 brcm,function = <1>; /* BCM2835_FSEL_GPIO_IN */
481 brcm,pull = <2>; /* BCM2835_PUD_UP */
484 key_volume_down: key_volume_down {
490 key_fastforward: key_fastforward {
496 key_rewind: key_rewind {
502 key_playpause: key_playpause {
510 clock-frequency = <100000>;
514 pinctrl-names = "default";
515 pinctrl-0 = <&i2c1_pins>;
516 clock-frequency = <100000>;
519 #address-cells = <1>;
523 compatible = "x-power,ac108_0";
525 #sound-dai-cells = <0>;
531 pinctrl-names = "default";
532 pinctrl-0 = <&i2s_pins>;
534 #sound-dai-cells = <0>;
539 compatible = "seeed-voicecard";
540 seeed-voice-card,format = "dsp_a";
541 seeed-voice-card,name = "seeed-4mic-voicecard";
544 seeed-voice-card,bitclock-master = <&codec_dai>;
545 seeed-voice-card,frame-master = <&codec_dai>;
546 seeed-voice-card,channels-playback-override = <4>;
547 seeed-voice-card,channels-capture-override = <4>;
549 cpu_dai: seeed-voice-card,cpu {
551 dai-tdm-slot-num = <2>;
552 dai-tdm-slot-width = <32>;
553 dai-tdm-slot-tx-mask = <1 1 0 0>;
554 dai-tdm-slot-rx-mask = <1 1 0 0>;
556 codec_dai: seeed-voice-card,codec {
557 sound-dai = <&ac108_a>;
558 system-clock-frequency = <24000000>;
564 /delete-property/ i2c2_baudrate;
565 /delete-property/ i2c2_iknowwhatimdoing;
570 compatible = "raspberrypi,rpi-firmware-kms-2711";
573 // =============================================
574 // Board specific stuff here
577 sd_vcc_reg: sd_vcc_reg {
578 compatible = "regulator-fixed";
579 regulator-name = "vcc-sd";
580 regulator-min-microvolt = <3300000>;
581 regulator-max-microvolt = <3300000>;
584 gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
593 vmmc-supply = <&sd_vcc_reg>;
598 led-modes = <0x00 0x08>; /* link/activity link */
602 audio_pins: audio_pins {
611 linux,default-trigger = "mmc0";
612 gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
617 linux,default-trigger = "default-on";
618 gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
627 pinctrl-names = "default";
628 pinctrl-0 = <&audio_pins>;
633 compatible = "brcm,bcm2835-usb";
635 g-np-tx-fifo-size = <32>;
636 g-rx-fifo-size = <558>;
637 g-tx-fifo-size = <512 512 512 512 512 256 256>;
707 size = <0x10000000>; /* 256MB */
712 act_led_gpio = <&act_led>,"gpios:4";
713 act_led_activelow = <&act_led>,"gpios:8";
714 act_led_trigger = <&act_led>,"linux,default-trigger";
716 pwr_led_gpio = <&pwr_led>,"gpios:4";
717 pwr_led_activelow = <&pwr_led>,"gpios:8";
718 pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
720 eth_led0 = <&phy1>,"led-modes:0";
721 eth_led1 = <&phy1>,"led-modes:4";
723 spi_dma4 = <&spi0>, "dmas:0=", <&dma40>,
724 <&spi0>, "dmas:8=", <&dma40>;