Skip to content

Commit 6fd9353

Browse files
pelwellpopcornmix
authored andcommitted
ARM: dts: Add CM0 dts file
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
1 parent 7a69249 commit 6fd9353

File tree

3 files changed

+254
-0
lines changed

3 files changed

+254
-0
lines changed

arch/arm/boot/dts/broadcom/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
6666
bcm2710-rpi-3-b.dtb \
6767
bcm2710-rpi-3-b-plus.dtb \
6868
bcm2709-rpi-cm2.dtb \
69+
bcm2710-rpi-cm0.dtb \
6970
bcm2710-rpi-cm3.dtb \
7071
bcm2711-rpi-cm4.dtb \
7172
bcm2711-rpi-cm4s.dtb
Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,252 @@
1+
/dts-v1/;
2+
3+
#include "bcm2710.dtsi"
4+
#include "bcm2709-rpi.dtsi"
5+
#include "bcm283x-rpi-csi1-2lane.dtsi"
6+
#include "bcm283x-rpi-i2c0mux_0_44.dtsi"
7+
#include "bcm2708-rpi-bt.dtsi"
8+
#include "bcm283x-rpi-led-deprecated.dtsi"
9+
10+
/ {
11+
compatible = "raspberrypi,0-compute-module", "brcm,bcm2837";
12+
model = "Raspberry Pi Compute Module 0";
13+
14+
aliases {
15+
serial0 = &uart1;
16+
serial1 = &uart0;
17+
mmc1 = &mmcnr;
18+
};
19+
};
20+
21+
&gpio {
22+
/*
23+
* These names are (mostly) from the schematic.
24+
*/
25+
gpio-line-names = "ID_SDA",
26+
"ID_SCL",
27+
"GPIO2",
28+
"GPIO3",
29+
"GPIO4",
30+
"GPIO5",
31+
"GPIO6",
32+
"GPIO7",
33+
"GPIO8",
34+
"GPIO9",
35+
"GPIO10",
36+
"GPIO11",
37+
"GPIO12",
38+
"GPIO13",
39+
"GPIO14",
40+
"GPIO15",
41+
"GPIO16",
42+
"GPIO17",
43+
"GPIO18",
44+
"GPIO19",
45+
"GPIO20",
46+
"GPIO21",
47+
"GPIO22",
48+
"GPIO23",
49+
"GPIO24",
50+
"GPIO25",
51+
"GPIO26",
52+
"GPIO27",
53+
"HDMI_HPD_N",
54+
"STATUS_LED_N",
55+
/* Used by BT module */
56+
"BT_CTS",
57+
"BT_RTS",
58+
"BT_TXD",
59+
"BT_RXD",
60+
/* Used by Wifi */
61+
"WIFI_SD_CLK",
62+
"WIFI_SD_CMD",
63+
"WIFI_SD_D0",
64+
"WIFI_SD_D1",
65+
"WIFI_SD_D2",
66+
"WIFI_SD_D3",
67+
"CAM_GPIO", /* GPIO40 */
68+
"WL_ON", /* GPIO41 */
69+
"BT_ON", /* GPIO42 */
70+
"EMMC_REENABLE_N", /* GPIO43 */
71+
"SDA0", /* GPIO44 */
72+
"SCL0", /* GPIO45 */
73+
"INT_SDA", /* GPIO46 */
74+
"INT_SCL", /* GPIO47 */
75+
/* Used by SD Card */
76+
"SD_CLK",
77+
"SD_CMD",
78+
"SD_D0",
79+
"SD_D1",
80+
"SD_D2",
81+
"SD_D3";
82+
83+
spi0_pins: spi0_pins {
84+
brcm,pins = <9 10 11>;
85+
brcm,function = <4>; /* alt0 */
86+
};
87+
88+
spi0_cs_pins: spi0_cs_pins {
89+
brcm,pins = <8 7>;
90+
brcm,function = <1>; /* output */
91+
};
92+
93+
i2c0_pins: i2c0 {
94+
brcm,pins = <0 1>;
95+
brcm,function = <4>;
96+
};
97+
98+
i2c1_pins: i2c1 {
99+
brcm,pins = <2 3>;
100+
brcm,function = <4>;
101+
};
102+
103+
i2s_pins: i2s {
104+
brcm,pins = <18 19 20 21>;
105+
brcm,function = <4>; /* alt0 */
106+
};
107+
108+
sdio_pins: sdio_pins {
109+
brcm,pins = <34 35 36 37 38 39>;
110+
brcm,function = <7>; // alt3 = SD1
111+
brcm,pull = <0 2 2 2 2 2>;
112+
};
113+
114+
bt_pins: bt_pins {
115+
brcm,pins = <43>;
116+
brcm,function = <4>; /* alt0:GPCLK2 */
117+
brcm,pull = <0>;
118+
};
119+
120+
uart0_pins: uart0_pins {
121+
brcm,pins = <30 31 32 33>;
122+
brcm,function = <7>; /* alt3=UART0 */
123+
brcm,pull = <2 0 0 2>; /* up none none up */
124+
};
125+
126+
uart1_pins: uart1_pins {
127+
brcm,pins;
128+
brcm,function;
129+
brcm,pull;
130+
};
131+
132+
uart1_bt_pins: uart1_bt_pins {
133+
brcm,pins = <32 33 30 31>;
134+
brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
135+
brcm,pull = <0 2 2 0>;
136+
};
137+
138+
audio_pins: audio_pins {
139+
brcm,pins = <>;
140+
brcm,function = <>;
141+
};
142+
};
143+
144+
&mmcnr {
145+
pinctrl-names = "default";
146+
pinctrl-0 = <&sdio_pins>;
147+
bus-width = <4>;
148+
status = "okay";
149+
#address-cells = <1>;
150+
#size-cells = <0>;
151+
152+
brcmf: wifi@1 {
153+
reg = <1>;
154+
compatible = "brcm,bcm4329-fmac";
155+
};
156+
};
157+
158+
&uart0 {
159+
pinctrl-names = "default";
160+
pinctrl-0 = <&uart0_pins &bt_pins>;
161+
status = "okay";
162+
};
163+
164+
&uart1 {
165+
pinctrl-names = "default";
166+
pinctrl-0 = <&uart1_pins>;
167+
status = "okay";
168+
};
169+
170+
&spi0 {
171+
pinctrl-names = "default";
172+
pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
173+
cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
174+
175+
spidev0: spidev@0{
176+
compatible = "spidev";
177+
reg = <0>; /* CE0 */
178+
#address-cells = <1>;
179+
#size-cells = <0>;
180+
spi-max-frequency = <125000000>;
181+
};
182+
183+
spidev1: spidev@1{
184+
compatible = "spidev";
185+
reg = <1>; /* CE1 */
186+
#address-cells = <1>;
187+
#size-cells = <0>;
188+
spi-max-frequency = <125000000>;
189+
};
190+
};
191+
192+
&i2c0if {
193+
clock-frequency = <100000>;
194+
};
195+
196+
&i2c1 {
197+
pinctrl-names = "default";
198+
pinctrl-0 = <&i2c1_pins>;
199+
clock-frequency = <100000>;
200+
};
201+
202+
&i2c2 {
203+
clock-frequency = <100000>;
204+
};
205+
206+
&i2s {
207+
pinctrl-names = "default";
208+
pinctrl-0 = <&i2s_pins>;
209+
};
210+
211+
&led_act {
212+
gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
213+
default-state = "off";
214+
linux,default-trigger = "actpwr";
215+
};
216+
217+
&hdmi {
218+
hpd-gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
219+
};
220+
221+
&vchiq {
222+
pinctrl-names = "default";
223+
pinctrl-0 = <&audio_pins>;
224+
};
225+
226+
&bt {
227+
shutdown-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
228+
};
229+
230+
&minibt {
231+
shutdown-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
232+
};
233+
234+
&cam1_reg {
235+
gpio = <&gpio 40 GPIO_ACTIVE_HIGH>;
236+
};
237+
238+
cam0_reg: &cam_dummy_reg {
239+
};
240+
241+
i2c_csi_dsi0: &i2c0 {
242+
};
243+
244+
/ {
245+
__overrides__ {
246+
audio = <&chosen>,"bootargs{on='snd_bcm2835.enable_hdmi=1',off='snd_bcm2835.enable_hdmi=0'}";
247+
248+
act_led_gpio = <&led_act>,"gpios:4";
249+
act_led_activelow = <&led_act>,"gpios:8";
250+
act_led_trigger = <&led_act>,"linux,default-trigger";
251+
};
252+
};

arch/arm64/boot/dts/broadcom/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-zero-2-w.dtb
1919
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-2-b.dtb
2020
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb
2121
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b-plus.dtb
22+
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-cm0.dtb
2223
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-cm3.dtb
2324
dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4.dtb
2425
dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4s.dtb

0 commit comments

Comments
 (0)