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-compute-module", "brcm,bcm2711";
9 model = "Raspberry Pi Compute Module 4";
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",
79 gpios = <3 GPIO_ACTIVE_HIGH>;
85 gpios = <7 GPIO_ACTIVE_HIGH>;
92 * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and
93 * the official GPU firmware DT blob.
96 * "FOO" = GPIO line named "FOO" on the schematic
97 * "FOO_N" = GPIO line named "FOO" on schematic, active low
99 gpio-line-names = "ID_SDA",
130 /* Used by BT module */
142 /* Shared with SPI flash */
188 pinctrl-names = "default";
189 pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
193 /* SDHCI is used to control the SDIO for wireless */
195 #address-cells = <1>;
197 pinctrl-names = "default";
198 pinctrl-0 = <&emmc_gpio34>;
201 mmc-pwrseq = <&wifi_pwrseq>;
206 compatible = "brcm,bcm4329-fmac";
210 /* EMMC2 is used to drive the EMMC card */
213 vqmmc-supply = <&sd_io_1v8_reg>;
214 vmmc-supply = <&sd_vcc_reg>;
220 phy-handle = <&phy1>;
221 phy-mode = "rgmii-rxid";
226 phy1: ethernet-phy@0 {
227 /* No PHY interrupt */
235 #address-cells = <3>;
243 /* uart0 communicates with the BT module */
245 pinctrl-names = "default";
246 pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
251 compatible = "brcm,bcm43438-bt";
252 max-speed = <2000000>;
253 shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
257 /* uart1 is mapped to the pin header */
259 pinctrl-names = "default";
260 pinctrl-0 = <&uart1_gpio14>;
265 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
276 // =============================================
277 // Downstream rpi- changes
281 #include "bcm270x.dtsi"
282 #include "bcm271x-rpi-bt.dtsi"
286 /delete-node/ pixelvalve@7e807000;
287 /delete-node/ hdmi@7e902000;
291 #include "bcm2711-rpi-ds.dtsi"
292 #include "bcm283x-rpi-csi0-2lane.dtsi"
293 #include "bcm283x-rpi-csi1-4lane.dtsi"
294 #include "bcm283x-rpi-i2c0mux_0_44.dtsi"
298 bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
317 /delete-property/ intc;
320 /delete-node/ wifi-pwrseq;
324 pinctrl-names = "default";
325 pinctrl-0 = <&sdio_pins>;
331 pinctrl-0 = <&uart0_pins &bt_pins>;
336 pinctrl-0 = <&uart1_pins>;
340 pinctrl-names = "default";
341 pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
342 cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
345 compatible = "spidev";
347 #address-cells = <1>;
349 spi-max-frequency = <125000000>;
353 compatible = "spidev";
355 #address-cells = <1>;
357 spi-max-frequency = <125000000>;
362 spi0_pins: spi0_pins {
363 brcm,pins = <9 10 11>;
364 brcm,function = <BCM2835_FSEL_ALT0>;
367 spi0_cs_pins: spi0_cs_pins {
369 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
372 spi3_pins: spi3_pins {
374 brcm,function = <BCM2835_FSEL_ALT3>;
377 spi3_cs_pins: spi3_cs_pins {
379 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
382 spi4_pins: spi4_pins {
384 brcm,function = <BCM2835_FSEL_ALT3>;
387 spi4_cs_pins: spi4_cs_pins {
389 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
392 spi5_pins: spi5_pins {
393 brcm,pins = <13 14 15>;
394 brcm,function = <BCM2835_FSEL_ALT3>;
397 spi5_cs_pins: spi5_cs_pins {
399 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
402 spi6_pins: spi6_pins {
403 brcm,pins = <19 20 21>;
404 brcm,function = <BCM2835_FSEL_ALT3>;
407 spi6_cs_pins: spi6_cs_pins {
409 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
414 brcm,function = <BCM2835_FSEL_ALT0>;
415 brcm,pull = <BCM2835_PUD_UP>;
420 brcm,function = <BCM2835_FSEL_ALT0>;
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>;
438 brcm,function = <BCM2835_FSEL_ALT5>;
439 brcm,pull = <BCM2835_PUD_UP>;
444 brcm,function = <BCM2835_FSEL_ALT5>;
445 brcm,pull = <BCM2835_PUD_UP>;
449 brcm,pins = <18 19 20 21>;
450 brcm,function = <BCM2835_FSEL_ALT0>;
453 sdio_pins: sdio_pins {
454 brcm,pins = <34 35 36 37 38 39>;
455 brcm,function = <BCM2835_FSEL_ALT3>; // alt3 = SD1
456 brcm,pull = <0 2 2 2 2 2>;
460 brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0
466 uart0_pins: uart0_pins {
468 brcm,function = <BCM2835_FSEL_ALT3>;
472 uart1_pins: uart1_pins {
478 uart2_pins: uart2_pins {
480 brcm,function = <BCM2835_FSEL_ALT4>;
484 uart3_pins: uart3_pins {
486 brcm,function = <BCM2835_FSEL_ALT4>;
490 uart4_pins: uart4_pins {
492 brcm,function = <BCM2835_FSEL_ALT4>;
496 uart5_pins: uart5_pins {
498 brcm,function = <BCM2835_FSEL_ALT4>;
504 clock-frequency = <100000>;
508 pinctrl-names = "default";
509 pinctrl-0 = <&i2c1_pins>;
510 clock-frequency = <100000>;
514 pinctrl-names = "default";
515 pinctrl-0 = <&i2s_pins>;
518 // =============================================
519 // Board specific stuff here
530 led-modes = <0x00 0x08>; /* link/activity link */
534 audio_pins: audio_pins {
543 linux,default-trigger = "mmc0";
544 gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
549 linux,default-trigger = "default-on";
550 gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
559 pinctrl-names = "default";
560 pinctrl-0 = <&audio_pins>;
561 brcm,disable-headphones = <1>;
564 cam0_reg: &cam1_reg {
565 gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>;
570 act_led_gpio = <&act_led>,"gpios:4";
571 act_led_activelow = <&act_led>,"gpios:8";
572 act_led_trigger = <&act_led>,"linux,default-trigger";
574 pwr_led_gpio = <&pwr_led>,"gpios:4";
575 pwr_led_activelow = <&pwr_led>,"gpios:8";
576 pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
578 eth_led0 = <&phy1>,"led-modes:0";
579 eth_led1 = <&phy1>,"led-modes:4";
581 ant1 = <&ant1>,"output-high?=on",
582 <&ant1>, "output-low?=off",
583 <&ant2>, "output-high?=off",
584 <&ant2>, "output-low?=on";
585 ant2 = <&ant1>,"output-high?=off",
586 <&ant1>, "output-low?=on",
587 <&ant2>, "output-high?=on",
588 <&ant2>, "output-low?=off";
589 noant = <&ant1>,"output-high?=off",
590 <&ant1>, "output-low?=on",
591 <&ant2>, "output-high?=off",
592 <&ant2>, "output-low?=on";
594 sd_poll_once = <&emmc2>, "non-removable?";
595 spi_dma4 = <&spi0>, "dmas:0=", <&dma40>,
596 <&spi0>, "dmas:8=", <&dma40>;