Skip to content

Commit d15b6cc

Browse files
author
Phil Elwell
committed
arm: dts: First draft of upstream Pi4 DTS
I've attempted to follow the upstream conventions in the DT commits, but this is just presented here initially as a talking point. Signed-off-by: Phil Elwell <[email protected]>
1 parent 40d2467 commit d15b6cc

File tree

3 files changed

+144
-0
lines changed

3 files changed

+144
-0
lines changed

arch/arm/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
9696
bcm2837-rpi-3-b.dtb \
9797
bcm2837-rpi-3-b-plus.dtb \
9898
bcm2837-rpi-cm3-io3.dtb \
99+
bcm2838-rpi-4-b.dtb \
99100
bcm2835-rpi-zero.dtb \
100101
bcm2835-rpi-zero-w.dtb
101102
dtb-$(CONFIG_ARCH_BCM_5301X) += \

arch/arm/boot/dts/bcm2838-rpi-4-b.dts

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/dts-v1/;
3+
#include "bcm2838.dtsi"
4+
#include "bcm2835-rpi.dtsi"
5+
#include "bcm2838-rpi.dtsi"
6+
7+
/ {
8+
compatible = "raspberrypi,4-model-b", "brcm,bcm2838";
9+
model = "Raspberry Pi 4 Model B";
10+
11+
chosen {
12+
/* 8250 auxiliary UART instead of pl011 */
13+
stdout-path = "serial1:115200n8";
14+
};
15+
16+
memory {
17+
reg = <0 0 0x40000000>;
18+
};
19+
20+
leds {
21+
act {
22+
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
23+
};
24+
25+
pwr {
26+
label = "PWR";
27+
gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
28+
};
29+
};
30+
31+
wifi_pwrseq: wifi-pwrseq {
32+
compatible = "mmc-pwrseq-simple";
33+
reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
34+
};
35+
36+
sd_io_1v8_reg: sd_io_1v8_reg {
37+
status = "okay";
38+
compatible = "regulator-gpio";
39+
vin-supply = <&vdd_5v0_reg>;
40+
regulator-name = "vdd-sd-io";
41+
regulator-min-microvolt = <1800000>;
42+
regulator-max-microvolt = <3300000>;
43+
regulator-boot-on;
44+
regulator-always-on;
45+
regulator-settling-time-us = <5000>;
46+
47+
gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
48+
states = <1800000 0x1
49+
3300000 0x0>;
50+
};
51+
};
52+
53+
&firmware {
54+
expgpio: gpio {
55+
compatible = "raspberrypi,firmware-gpio";
56+
gpio-controller;
57+
#gpio-cells = <2>;
58+
gpio-line-names = "BT_ON",
59+
"WL_ON",
60+
"PWR_LED_OFF",
61+
"GLOBAL_RESET",
62+
"VDD_SD_IO_SEL",
63+
"CAM_GPIO",
64+
"",
65+
"";
66+
status = "okay";
67+
};
68+
};
69+
70+
&pwm1 {
71+
pinctrl-names = "default";
72+
pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio41>;
73+
status = "okay";
74+
};
75+
76+
/* SDHCI is used to control the SDIO for wireless */
77+
&sdhci {
78+
#address-cells = <1>;
79+
#size-cells = <0>;
80+
pinctrl-names = "default";
81+
pinctrl-0 = <&emmc_gpio34>;
82+
status = "okay";
83+
bus-width = <4>;
84+
non-removable;
85+
mmc-pwrseq = <&wifi_pwrseq>;
86+
87+
brcmf: wifi@1 {
88+
reg = <1>;
89+
compatible = "brcm,bcm4329-fmac";
90+
};
91+
};
92+
93+
/* EMMC2 is used to drive the SD card */
94+
&emmc2 {
95+
status = "okay";
96+
broken-cd;
97+
vqmmc-supply = <&sd_io_1v8_reg>;
98+
};
99+
100+
/* uart0 communicates with the BT module */
101+
&uart0 {
102+
pinctrl-names = "default";
103+
pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32 &gpclk2_gpio43>;
104+
status = "okay";
105+
106+
bluetooth {
107+
compatible = "brcm,bcm43438-bt";
108+
max-speed = <2000000>;
109+
shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
110+
};
111+
};
112+
113+
/* uart1 is mapped to the pin header */
114+
&uart1 {
115+
pinctrl-names = "default";
116+
pinctrl-0 = <&uart1_gpio14>;
117+
status = "okay";
118+
};

arch/arm/boot/dts/bcm2838-rpi.dtsi

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
3+
/ {
4+
soc {
5+
/delete-node/ mailbox@7e00b840;
6+
};
7+
};
8+
9+
&scb {
10+
vchiq: mailbox@7e00b840 {
11+
compatible = "brcm,bcm2838-vchiq";
12+
reg = <0 0x7e00b840 0x3c>;
13+
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
14+
};
15+
};
16+
17+
&dma {
18+
/* The VPU firmware uses DMA channel 11 for VCHIQ */
19+
brcm,dma-channel-mask = <0x1f5>;
20+
};
21+
22+
&dma40 {
23+
/* The VPU firmware DMA channel 11 for VCHIQ */
24+
brcm,dma-channel-mask = <0x7000>;
25+
};

0 commit comments

Comments
 (0)