Skip to content

Commit c5ecb35

Browse files
committed
ARM: dts: Create bcm2708-rpi-b-rev1.dts
The first revision of the Pi Model B used I2C0 to address the camera and I2C0 was available for user applications on the 26-pin header. The second revision switched the roles, kept I2C0 on the 26-pin header and added I2C1 on a new 8-way header (P5). Up to now, downstream DTS has used a single file for both revisions of the board, with a small amount of patching from the firmware. With the introduction of an I2C mux to share I2C0 between the camera/display connectors and the IDC headers, the difference between the two versions becomes too great to comfortably manage with tweaking, hence this split. Upstream DTS files already have bcm2835-rpi-b.dts and bcm2835-rpi-b-rev2.dts, but for backwards compatibility the new file is being added as bcm2708-rpi-b-rev1.dts, rather than renaming the old shared version to bcm2708-rpi-b-rev2.dts. Signed-off-by: Phil Elwell <[email protected]>
1 parent 39e472b commit c5ecb35

File tree

3 files changed

+132
-0
lines changed

3 files changed

+132
-0
lines changed

arch/arm/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
dtb-$(CONFIG_ARCH_BCM2835) += \
44
bcm2708-rpi-b.dtb \
5+
bcm2708-rpi-b-rev1.dtb \
56
bcm2708-rpi-b-plus.dtb \
67
bcm2708-rpi-cm.dtb \
78
bcm2708-rpi-zero.dtb \
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
/dts-v1/;
2+
3+
#include "bcm2708.dtsi"
4+
#include "bcm2708-rpi.dtsi"
5+
#include "bcm283x-rpi-smsc9512.dtsi"
6+
#include "bcm283x-rpi-csi1-2lane.dtsi"
7+
8+
/ {
9+
compatible = "raspberrypi,model-b", "brcm,bcm2835";
10+
model = "Raspberry Pi Model B";
11+
};
12+
13+
&gpio {
14+
spi0_pins: spi0_pins {
15+
brcm,pins = <9 10 11>;
16+
brcm,function = <4>; /* alt0 */
17+
};
18+
19+
spi0_cs_pins: spi0_cs_pins {
20+
brcm,pins = <8 7>;
21+
brcm,function = <1>; /* output */
22+
};
23+
24+
i2c0_pins: i2c0 {
25+
brcm,pins = <0 1>;
26+
brcm,function = <4>;
27+
};
28+
29+
i2c1_pins: i2c1 {
30+
brcm,pins = <2 3>;
31+
brcm,function = <4>;
32+
};
33+
34+
i2s_pins: i2s {
35+
brcm,pins = <28 29 30 31>;
36+
brcm,function = <6>; /* alt2 */
37+
};
38+
39+
audio_pins: audio_pins {
40+
brcm,pins = <40 45>;
41+
brcm,function = <4>;
42+
};
43+
};
44+
45+
&uart0 {
46+
status = "okay";
47+
};
48+
49+
&spi0 {
50+
pinctrl-names = "default";
51+
pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
52+
cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
53+
54+
spidev0: spidev@0{
55+
compatible = "spidev";
56+
reg = <0>; /* CE0 */
57+
#address-cells = <1>;
58+
#size-cells = <0>;
59+
spi-max-frequency = <125000000>;
60+
};
61+
62+
spidev1: spidev@1{
63+
compatible = "spidev";
64+
reg = <1>; /* CE1 */
65+
#address-cells = <1>;
66+
#size-cells = <0>;
67+
spi-max-frequency = <125000000>;
68+
};
69+
};
70+
71+
/delete-node/ &i2c0mux;
72+
73+
i2c0: &i2c0if {
74+
pinctrl-names = "default";
75+
pinctrl-0 = <&i2c0_pins>;
76+
clock-frequency = <100000>;
77+
};
78+
79+
i2c_csi_dsi: &i2c1 {
80+
pinctrl-names = "default";
81+
pinctrl-0 = <&i2c1_pins>;
82+
clock-frequency = <100000>;
83+
};
84+
85+
/ {
86+
aliases {
87+
i2c0 = &i2c0;
88+
};
89+
90+
__overrides__ {
91+
i2c0 = <&i2c0>, "status";
92+
};
93+
};
94+
95+
&i2c2 {
96+
clock-frequency = <100000>;
97+
};
98+
99+
&i2s {
100+
pinctrl-names = "default";
101+
pinctrl-0 = <&i2s_pins>;
102+
};
103+
104+
&leds {
105+
act_led: act {
106+
label = "led0";
107+
linux,default-trigger = "mmc0";
108+
gpios = <&gpio 16 1>;
109+
};
110+
};
111+
112+
&hdmi {
113+
hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
114+
};
115+
116+
&audio {
117+
pinctrl-names = "default";
118+
pinctrl-0 = <&audio_pins>;
119+
};
120+
121+
/ {
122+
__overrides__ {
123+
act_led_gpio = <&act_led>,"gpios:4";
124+
act_led_activelow = <&act_led>,"gpios:8";
125+
act_led_trigger = <&act_led>,"linux,default-trigger";
126+
};
127+
};

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@
110110
status = "disabled";
111111
};
112112

113+
&i2c0mux {
114+
status = "disabled";
115+
};
116+
113117
&i2c1 {
114118
status = "disabled";
115119
};

0 commit comments

Comments
 (0)