Skip to content

Commit 717a3f4

Browse files
pelwellpopcornmix
authored andcommitted
ARM: dts: Add bcm2709-rpi-cm2.dts
Compute Module 2 is a CM3 with a 2836. The DTS file reflects that. Signed-off-by: Phil Elwell <[email protected]>
1 parent e3979e0 commit 717a3f4

File tree

2 files changed

+220
-0
lines changed

2 files changed

+220
-0
lines changed

arch/arm/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
1515
bcm2710-rpi-3-b-plus.dtb \
1616
bcm2711-rpi-4-b.dtb \
1717
bcm2711-rpi-400.dtb \
18+
bcm2709-rpi-cm2.dtb \
1819
bcm2710-rpi-cm3.dtb \
1920
bcm2711-rpi-cm4.dtb \
2021
bcm2711-rpi-cm4s.dtb

arch/arm/boot/dts/bcm2709-rpi-cm2.dts

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
/dts-v1/;
2+
3+
#include "bcm2709.dtsi"
4+
#include "bcm2709-rpi.dtsi"
5+
#include "bcm283x-rpi-csi0-2lane.dtsi"
6+
#include "bcm283x-rpi-csi1-4lane.dtsi"
7+
#include "bcm283x-rpi-i2c0mux_0_28.dtsi"
8+
9+
/ {
10+
compatible = "raspberrypi,2-compute-module", "brcm,bcm2836";
11+
model = "Raspberry Pi Compute Module 2";
12+
};
13+
14+
&cam1_reg {
15+
gpio = <&gpio 2 GPIO_ACTIVE_HIGH>;
16+
status = "disabled";
17+
};
18+
19+
cam0_reg: &cam0_regulator {
20+
gpio = <&gpio 30 GPIO_ACTIVE_HIGH>;
21+
};
22+
23+
&uart0 {
24+
status = "okay";
25+
};
26+
27+
&gpio {
28+
/*
29+
* This is based on the official GPU firmware DT blob.
30+
*
31+
* Legend:
32+
* "NC" = not connected (no rail from the SoC)
33+
* "FOO" = GPIO line named "FOO" on the schematic
34+
* "FOO_N" = GPIO line named "FOO" on schematic, active low
35+
*/
36+
gpio-line-names = "GPIO0",
37+
"GPIO1",
38+
"GPIO2",
39+
"GPIO3",
40+
"GPIO4",
41+
"GPIO5",
42+
"GPIO6",
43+
"GPIO7",
44+
"GPIO8",
45+
"GPIO9",
46+
"GPIO10",
47+
"GPIO11",
48+
"GPIO12",
49+
"GPIO13",
50+
"GPIO14",
51+
"GPIO15",
52+
"GPIO16",
53+
"GPIO17",
54+
"GPIO18",
55+
"GPIO19",
56+
"GPIO20",
57+
"GPIO21",
58+
"GPIO22",
59+
"GPIO23",
60+
"GPIO24",
61+
"GPIO25",
62+
"GPIO26",
63+
"GPIO27",
64+
"GPIO28",
65+
"GPIO29",
66+
"GPIO30",
67+
"GPIO31",
68+
"GPIO32",
69+
"GPIO33",
70+
"GPIO34",
71+
"GPIO35",
72+
"GPIO36",
73+
"GPIO37",
74+
"GPIO38",
75+
"GPIO39",
76+
"GPIO40",
77+
"GPIO41",
78+
"GPIO42",
79+
"GPIO43",
80+
"GPIO44",
81+
"GPIO45",
82+
"SMPS_SCL",
83+
"SMPS_SDA",
84+
/* Used by eMMC */
85+
"SD_CLK_R",
86+
"SD_CMD_R",
87+
"SD_DATA0_R",
88+
"SD_DATA1_R",
89+
"SD_DATA2_R",
90+
"SD_DATA3_R";
91+
92+
spi0_pins: spi0_pins {
93+
brcm,pins = <9 10 11>;
94+
brcm,function = <4>; /* alt0 */
95+
};
96+
97+
spi0_cs_pins: spi0_cs_pins {
98+
brcm,pins = <8 7>;
99+
brcm,function = <1>; /* output */
100+
};
101+
102+
i2c0_pins: i2c0 {
103+
brcm,pins = <0 1>;
104+
brcm,function = <4>;
105+
};
106+
107+
i2c1_pins: i2c1 {
108+
brcm,pins = <2 3>;
109+
brcm,function = <4>;
110+
};
111+
112+
i2s_pins: i2s {
113+
brcm,pins = <18 19 20 21>;
114+
brcm,function = <4>; /* alt0 */
115+
};
116+
117+
audio_pins: audio_pins {
118+
brcm,pins;
119+
brcm,function;
120+
};
121+
};
122+
123+
&soc {
124+
virtgpio: virtgpio {
125+
compatible = "brcm,bcm2835-virtgpio";
126+
gpio-controller;
127+
#gpio-cells = <2>;
128+
firmware = <&firmware>;
129+
status = "okay";
130+
};
131+
132+
};
133+
134+
&firmware {
135+
expgpio: expgpio {
136+
compatible = "raspberrypi,firmware-gpio";
137+
gpio-controller;
138+
#gpio-cells = <2>;
139+
gpio-line-names = "HDMI_HPD_N",
140+
"EMMC_EN_N",
141+
"NC",
142+
"NC",
143+
"NC",
144+
"NC",
145+
"NC",
146+
"NC";
147+
status = "okay";
148+
};
149+
};
150+
151+
&spi0 {
152+
pinctrl-names = "default";
153+
pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
154+
cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
155+
156+
spidev0: spidev@0{
157+
compatible = "spidev";
158+
reg = <0>; /* CE0 */
159+
#address-cells = <1>;
160+
#size-cells = <0>;
161+
spi-max-frequency = <125000000>;
162+
};
163+
164+
spidev1: spidev@1{
165+
compatible = "spidev";
166+
reg = <1>; /* CE1 */
167+
#address-cells = <1>;
168+
#size-cells = <0>;
169+
spi-max-frequency = <125000000>;
170+
};
171+
};
172+
173+
&i2c0if {
174+
clock-frequency = <100000>;
175+
};
176+
177+
&i2c1 {
178+
pinctrl-names = "default";
179+
pinctrl-0 = <&i2c1_pins>;
180+
clock-frequency = <100000>;
181+
};
182+
183+
&i2c2 {
184+
clock-frequency = <100000>;
185+
};
186+
187+
&i2s {
188+
pinctrl-names = "default";
189+
pinctrl-0 = <&i2s_pins>;
190+
};
191+
192+
&leds {
193+
act_led: led-act {
194+
label = "led0";
195+
linux,default-trigger = "mmc0";
196+
gpios = <&virtgpio 0 0>;
197+
};
198+
};
199+
200+
&hdmi {
201+
hpd-gpios = <&expgpio 0 GPIO_ACTIVE_LOW>;
202+
};
203+
204+
&audio {
205+
pinctrl-names = "default";
206+
pinctrl-0 = <&audio_pins>;
207+
};
208+
209+
/ {
210+
__overrides__ {
211+
act_led_gpio = <&act_led>,"gpios:4";
212+
act_led_activelow = <&act_led>,"gpios:8";
213+
act_led_trigger = <&act_led>,"linux,default-trigger";
214+
cam0_reg = <&cam0_reg>,"status";
215+
cam0_reg_gpio = <&cam0_reg>,"gpio:4";
216+
cam1_reg = <&cam1_reg>,"status";
217+
cam1_reg_gpio = <&cam1_reg>,"gpio:4";
218+
};
219+
};

0 commit comments

Comments
 (0)