1 From 37034aa6ba14c346f67e8b99a317c45e40f0a2eb Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Tue, 14 Jul 2020 14:21:33 +0100
4 Subject: [PATCH] ARM: dts: Add bcm2711-rpi-400.dts
6 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
8 arch/arm/boot/dts/Makefile | 1 +
9 arch/arm/boot/dts/bcm2711-rpi-400.dts | 585 ++++++++++++++++++
10 arch/arm64/boot/dts/broadcom/Makefile | 1 +
11 .../boot/dts/broadcom/bcm2711-rpi-400.dts | 1 +
12 4 files changed, 588 insertions(+)
13 create mode 100644 arch/arm/boot/dts/bcm2711-rpi-400.dts
14 create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts
16 --- a/arch/arm/boot/dts/Makefile
17 +++ b/arch/arm/boot/dts/Makefile
18 @@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
20 bcm2710-rpi-3-b-plus.dtb \
22 + bcm2711-rpi-400.dtb \
27 +++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts
29 +// SPDX-License-Identifier: GPL-2.0
31 +#include "bcm2711.dtsi"
32 +#include "bcm2835-rpi.dtsi"
35 + compatible = "raspberrypi,400", "brcm,bcm2711";
36 + model = "Raspberry Pi 400";
39 + /* 8250 auxiliary UART instead of pl011 */
40 + stdout-path = "serial1:115200n8";
43 + /* Will be filled by the bootloader */
45 + device_type = "memory";
50 + emmc2bus = &emmc2bus;
57 + gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
62 + gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
63 + default-state = "keep";
64 + linux,default-trigger = "default-on";
68 + wifi_pwrseq: wifi-pwrseq {
69 + compatible = "mmc-pwrseq-simple";
70 + reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
73 + sd_io_1v8_reg: sd_io_1v8_reg {
74 + compatible = "regulator-gpio";
75 + regulator-name = "vdd-sd-io";
76 + regulator-min-microvolt = <1800000>;
77 + regulator-max-microvolt = <3300000>;
79 + regulator-always-on;
80 + regulator-settling-time-us = <5000>;
81 + gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
82 + states = <1800000 0x1
90 + compatible = "raspberrypi,firmware-gpio";
93 + gpio-line-names = "BT_ON",
107 + * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and
108 + * the official GPU firmware DT blob.
111 + * "FOO" = GPIO line named "FOO" on the schematic
112 + * "FOO_N" = GPIO line named "FOO" on schematic, active low
114 + gpio-line-names = "ID_SDA",
145 + /* Used by BT module */
157 + /* Shared with SPI flash */
160 + "STATUS_LED_G_CLK",
179 + pinctrl-names = "default";
180 + pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
184 +/* SDHCI is used to control the SDIO for wireless */
186 + #address-cells = <1>;
188 + pinctrl-names = "default";
189 + pinctrl-0 = <&emmc_gpio34>;
192 + mmc-pwrseq = <&wifi_pwrseq>;
197 + compatible = "brcm,bcm4329-fmac";
201 +/* EMMC2 is used to drive the SD card */
203 + vqmmc-supply = <&sd_io_1v8_reg>;
209 + phy-handle = <&phy1>;
210 + phy-mode = "rgmii-rxid";
215 + phy1: ethernet-phy@1 {
216 + /* No PHY interrupt */
221 +/* uart0 communicates with the BT module */
223 + pinctrl-names = "default";
224 + pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
229 + compatible = "brcm,bcm43438-bt";
230 + max-speed = <2000000>;
231 + shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
235 +/* uart1 is mapped to the pin header */
237 + pinctrl-names = "default";
238 + pinctrl-0 = <&uart1_gpio14>;
243 + interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
246 +// =============================================
247 +// Downstream rpi- changes
249 +#include "bcm270x.dtsi"
250 +#include "bcm271x-rpi-bt.dtsi"
254 + /delete-node/ pixelvalve@7e807000;
255 + /delete-node/ hdmi@7e902000;
259 +#include "bcm2711-rpi.dtsi"
260 +#include "bcm283x-rpi-csi1-2lane.dtsi"
261 +#include "bcm283x-rpi-i2c0mux_0_44.dtsi"
265 + bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1";
274 + /delete-property/ i2c2;
279 + /delete-property/ intc;
282 + /delete-node/ wifi-pwrseq;
286 + pinctrl-names = "default";
287 + pinctrl-0 = <&sdio_pins>;
293 + pinctrl-0 = <&uart0_pins &bt_pins>;
298 + pinctrl-0 = <&uart1_pins>;
302 + pinctrl-names = "default";
303 + pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
304 + cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
307 + compatible = "spidev";
308 + reg = <0>; /* CE0 */
309 + #address-cells = <1>;
311 + spi-max-frequency = <125000000>;
315 + compatible = "spidev";
316 + reg = <1>; /* CE1 */
317 + #address-cells = <1>;
319 + spi-max-frequency = <125000000>;
324 + spi0_pins: spi0_pins {
325 + brcm,pins = <9 10 11>;
326 + brcm,function = <BCM2835_FSEL_ALT0>;
329 + spi0_cs_pins: spi0_cs_pins {
331 + brcm,function = <BCM2835_FSEL_GPIO_OUT>;
334 + spi3_pins: spi3_pins {
335 + brcm,pins = <1 2 3>;
336 + brcm,function = <BCM2835_FSEL_ALT3>;
339 + spi3_cs_pins: spi3_cs_pins {
340 + brcm,pins = <0 24>;
341 + brcm,function = <BCM2835_FSEL_GPIO_OUT>;
344 + spi4_pins: spi4_pins {
345 + brcm,pins = <5 6 7>;
346 + brcm,function = <BCM2835_FSEL_ALT3>;
349 + spi4_cs_pins: spi4_cs_pins {
350 + brcm,pins = <4 25>;
351 + brcm,function = <BCM2835_FSEL_GPIO_OUT>;
354 + spi5_pins: spi5_pins {
355 + brcm,pins = <13 14 15>;
356 + brcm,function = <BCM2835_FSEL_ALT3>;
359 + spi5_cs_pins: spi5_cs_pins {
360 + brcm,pins = <12 26>;
361 + brcm,function = <BCM2835_FSEL_GPIO_OUT>;
364 + spi6_pins: spi6_pins {
365 + brcm,pins = <19 20 21>;
366 + brcm,function = <BCM2835_FSEL_ALT3>;
369 + spi6_cs_pins: spi6_cs_pins {
370 + brcm,pins = <18 27>;
371 + brcm,function = <BCM2835_FSEL_GPIO_OUT>;
376 + brcm,function = <BCM2835_FSEL_ALT0>;
377 + brcm,pull = <BCM2835_PUD_UP>;
382 + brcm,function = <BCM2835_FSEL_ALT0>;
383 + brcm,pull = <BCM2835_PUD_UP>;
388 + brcm,function = <BCM2835_FSEL_ALT5>;
389 + brcm,pull = <BCM2835_PUD_UP>;
394 + brcm,function = <BCM2835_FSEL_ALT5>;
395 + brcm,pull = <BCM2835_PUD_UP>;
399 + brcm,pins = <12 13>;
400 + brcm,function = <BCM2835_FSEL_ALT5>;
401 + brcm,pull = <BCM2835_PUD_UP>;
405 + brcm,pins = <22 23>;
406 + brcm,function = <BCM2835_FSEL_ALT5>;
407 + brcm,pull = <BCM2835_PUD_UP>;
411 + brcm,pins = <18 19 20 21>;
412 + brcm,function = <BCM2835_FSEL_ALT0>;
415 + sdio_pins: sdio_pins {
416 + brcm,pins = <34 35 36 37 38 39>;
417 + brcm,function = <BCM2835_FSEL_ALT3>; // alt3 = SD1
418 + brcm,pull = <0 2 2 2 2 2>;
422 + brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0
424 + brcm,function = <0>;
428 + uart0_pins: uart0_pins {
429 + brcm,pins = <32 33>;
430 + brcm,function = <BCM2835_FSEL_ALT3>;
434 + uart1_pins: uart1_pins {
440 + uart2_pins: uart2_pins {
442 + brcm,function = <BCM2835_FSEL_ALT4>;
446 + uart3_pins: uart3_pins {
448 + brcm,function = <BCM2835_FSEL_ALT4>;
452 + uart4_pins: uart4_pins {
454 + brcm,function = <BCM2835_FSEL_ALT4>;
458 + uart5_pins: uart5_pins {
459 + brcm,pins = <12 13>;
460 + brcm,function = <BCM2835_FSEL_ALT4>;
466 + clock-frequency = <100000>;
470 + pinctrl-names = "default";
471 + pinctrl-0 = <&i2c1_pins>;
472 + clock-frequency = <100000>;
476 + pinctrl-names = "default";
477 + pinctrl-0 = <&i2s_pins>;
482 + /delete-property/ i2c2_baudrate;
483 + /delete-property/ i2c2_iknowwhatimdoing;
488 + compatible = "raspberrypi,rpi-firmware-kms-2711";
491 +// =============================================
492 +// Board specific stuff here
495 + sd_vcc_reg: sd_vcc_reg {
496 + compatible = "regulator-fixed";
497 + regulator-name = "vcc-sd";
498 + regulator-min-microvolt = <3300000>;
499 + regulator-max-microvolt = <3300000>;
501 + enable-active-high;
502 + gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
505 + power_ctrl: power_ctrl {
506 + compatible = "gpio-poweroff";
507 + gpios = <&expgpio 5 0>;
513 + status = "disabled";
517 + vmmc-supply = <&sd_vcc_reg>;
521 + led-modes = <0x00 0x08>; /* link/activity link */
525 + audio_pins: audio_pins {
526 + brcm,pins = <40 41>;
527 + brcm,function = <4>;
534 + linux,default-trigger = "default-on";
535 + default-state = "on";
536 + gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
541 + linux,default-trigger = "default-on";
542 + gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
547 + status = "disabled";
551 + pinctrl-names = "default";
552 + pinctrl-0 = <&audio_pins>;
553 + brcm,disable-headphones = <1>;
557 + status = "disabled";
561 + status = "disabled";
565 + status = "disabled";
569 + status = "disabled";
573 + status = "disabled";
577 + status = "disabled";
581 + status = "disabled";
585 + status = "disabled";
589 + status = "disabled";
593 + status = "disabled";
598 + act_led_gpio = <&act_led>,"gpios:4";
599 + act_led_activelow = <&act_led>,"gpios:8";
600 + act_led_trigger = <&act_led>,"linux,default-trigger";
602 + pwr_led_gpio = <&pwr_led>,"gpios:4";
603 + pwr_led_activelow = <&pwr_led>,"gpios:8";
604 + pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
606 + eth_led0 = <&phy1>,"led-modes:0";
607 + eth_led1 = <&phy1>,"led-modes:4";
609 + sd_poll_once = <&emmc2>, "non-removable?";
610 + spi_dma4 = <&spi0>, "dmas:0=", <&dma40>,
611 + <&spi0>, "dmas:8=", <&dma40>;
614 --- a/arch/arm64/boot/dts/broadcom/Makefile
615 +++ b/arch/arm64/boot/dts/broadcom/Makefile
616 @@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rp
617 dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb
618 dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b-plus.dtb
619 dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-4-b.dtb
620 +dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb
621 dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-cm3.dtb
622 dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4.dtb
625 +++ b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts
627 +#include "../../../../arm/boot/dts/bcm2711-rpi-400.dts"