/dts-v1/; #include "bcm2711.dtsi" #include "bcm2711-rpi.dtsi" #include "bcm283x-rpi-csi1-2lane.dtsi" / { compatible = "raspberrypi,4-model-b", "brcm,bcm2838"; model = "Raspberry Pi 4 Model B"; memory { device_type = "memory"; reg = <0x0 0x0 0x0>; }; chosen { bootargs = "coherent_pool=1M 8250.nr_uarts=1 cma=64M"; }; aliases { serial0 = &uart1; serial1 = &uart0; mmc0 = &emmc2; mmc1 = &mmcnr; mmc2 = &sdhost; i2c3 = &i2c3; i2c4 = &i2c4; i2c5 = &i2c5; i2c6 = &i2c6; /delete-property/ ethernet; /delete-property/ intc; ethernet0 = &genet; }; }; &soc { virtgpio: virtgpio { compatible = "brcm,bcm2835-virtgpio"; gpio-controller; #gpio-cells = <2>; firmware = <&firmware>; status = "okay"; }; }; &mmcnr { pinctrl-names = "default"; pinctrl-0 = <&sdio_pins>; bus-width = <4>; status = "okay"; }; &firmware { expgpio: gpio { compatible = "raspberrypi,firmware-gpio"; gpio-controller; #gpio-cells = <2>; gpio-line-names = "BT_ON", "WL_ON", "PWR_LED_OFF", "GLOBAL_RESET", "VDD_SD_IO_SEL", "CAM_GPIO", "", ""; status = "okay"; }; }; &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins &bt_pins>; status = "okay"; }; &uart1 { pinctrl-names = "default"; pinctrl-0 = <&uart1_pins>; status = "okay"; }; &spi0 { pinctrl-names = "default"; pinctrl-0 = <&spi0_pins &spi0_cs_pins>; cs-gpios = <&gpio 8 1>, <&gpio 7 1>; spidev0: spidev@0{ compatible = "spidev"; reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; spi-max-frequency = <125000000>; }; spidev1: spidev@1{ compatible = "spidev"; reg = <1>; /* CE1 */ #address-cells = <1>; #size-cells = <0>; spi-max-frequency = <125000000>; }; }; // ============================================= // Board specific stuff here / { sd_io_1v8_reg: sd_io_1v8_reg { status = "okay"; compatible = "regulator-gpio"; vin-supply = <&vdd_5v0_reg>; regulator-name = "vdd-sd-io"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-boot-on; regulator-always-on; regulator-settling-time-us = <5000>; gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>; states = <1800000 0x1 3300000 0x0>; }; }; &sdhost { status = "disabled"; }; &emmc2 { status = "okay"; broken-cd; vqmmc-supply = <&sd_io_1v8_reg>; }; &leds { act_led: act { label = "led0"; linux,default-trigger = "mmc0"; gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; }; pwr_led: pwr { label = "led1"; linux,default-trigger = "default-on"; gpios = <&expgpio 2 GPIO_ACTIVE_LOW>; }; }; &audio { pinctrl-names = "default"; pinctrl-0 = <&audio_pins>; }; &sdhost_gpio48 { brcm,pins = <22 23 24 25 26 27>; brcm,function = ; }; &gpio { spi0_pins: spi0_pins { brcm,pins = <9 10 11>; brcm,function = ; }; spi0_cs_pins: spi0_cs_pins { brcm,pins = <8 7>; brcm,function = ; }; spi3_pins: spi3_pins { brcm,pins = <1 2 3>; brcm,function = ; }; spi3_cs_pins: spi3_cs_pins { brcm,pins = <0 24>; brcm,function = ; }; spi4_pins: spi4_pins { brcm,pins = <5 6 7>; brcm,function = ; }; spi4_cs_pins: spi4_cs_pins { brcm,pins = <4 25>; brcm,function = ; }; spi5_pins: spi5_pins { brcm,pins = <13 14 15>; brcm,function = ; }; spi5_cs_pins: spi5_cs_pins { brcm,pins = <12 26>; brcm,function = ; }; spi6_pins: spi6_pins { brcm,pins = <19 20 21>; brcm,function = ; }; spi6_cs_pins: spi6_cs_pins { brcm,pins = <18 27>; brcm,function = ; }; i2c0_pins: i2c0 { brcm,pins = <0 1>; brcm,function = ; brcm,pull = ; }; i2c1_pins: i2c1 { brcm,pins = <2 3>; brcm,function = ; brcm,pull = ; }; i2c3_pins: i2c3 { brcm,pins = <4 5>; brcm,function = ; brcm,pull = ; }; i2c4_pins: i2c4 { brcm,pins = <8 9>; brcm,function = ; brcm,pull = ; }; i2c5_pins: i2c5 { brcm,pins = <12 13>; brcm,function = ; brcm,pull = ; }; i2c6_pins: i2c6 { brcm,pins = <22 23>; brcm,function = ; brcm,pull = ; }; i2s_pins: i2s { brcm,pins = <18 19 20 21>; brcm,function = ; }; sdio_pins: sdio_pins { brcm,pins = <34 35 36 37 38 39>; brcm,function = ; // alt3 = SD1 brcm,pull = <0 2 2 2 2 2>; }; bt_pins: bt_pins { brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0 // to fool pinctrl brcm,function = <0>; brcm,pull = <2>; }; uart0_pins: uart0_pins { brcm,pins = <32 33>; brcm,function = ; brcm,pull = <0 2>; }; uart1_pins: uart1_pins { brcm,pins; brcm,function; brcm,pull; }; uart2_pins: uart2_pins { brcm,pins = <0 1>; brcm,function = ; brcm,pull = <0 2>; }; uart3_pins: uart3_pins { brcm,pins = <4 5>; brcm,function = ; brcm,pull = <0 2>; }; uart4_pins: uart4_pins { brcm,pins = <8 9>; brcm,function = ; brcm,pull = <0 2>; }; uart5_pins: uart5_pins { brcm,pins = <12 13>; brcm,function = ; brcm,pull = <0 2>; }; audio_pins: audio_pins { brcm,pins = <40 41>; brcm,function = <4>; }; }; &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; clock-frequency = <100000>; }; &i2c1 { pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins>; clock-frequency = <100000>; }; &i2c2 { clock-frequency = <100000>; }; &i2s { pinctrl-names = "default"; pinctrl-0 = <&i2s_pins>; }; / { __overrides__ { act_led_gpio = <&act_led>,"gpios:4"; act_led_activelow = <&act_led>,"gpios:8"; act_led_trigger = <&act_led>,"linux,default-trigger"; pwr_led_gpio = <&pwr_led>,"gpios:4"; pwr_led_activelow = <&pwr_led>,"gpios:8"; pwr_led_trigger = <&pwr_led>,"linux,default-trigger"; }; };