Skip to content

Commit 25f3e06

Browse files
notropopcornmix
authored andcommitted
BCM2708: Add core Device Tree support
Add the bare minimum needed to boot BCM2708 from a Device Tree. Signed-off-by: Noralf Tronnes <[email protected]> BCM2708: DT: change 'axi' nodename to 'soc' Change DT node named 'axi' to 'soc' so it matches ARCH_BCM2835. The VC4 bootloader fills in certain properties in the 'axi' subtree, but since this is part of an upstreaming effort, the name is changed. Signed-off-by: Noralf Tronnes [email protected] BCM2708_DT: Correct length of the peripheral space
1 parent 996a96c commit 25f3e06

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3316
-54
lines changed

arch/arm/boot/dts/Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
ifeq ($(CONFIG_OF),y)
22

3+
dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b.dtb
4+
dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b-plus.dtb
5+
dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-cm.dtb
6+
dtb-$(CONFIG_BCM2709_DT) += bcm2709-rpi-2-b.dtb
7+
8+
# Raspberry Pi
9+
ifeq ($(CONFIG_BCM2708_DT),y)
10+
RPI_DT_OVERLAYS=y
11+
endif
12+
ifeq ($(CONFIG_BCM2709_DT),y)
13+
RPI_DT_OVERLAYS=y
14+
endif
15+
ifeq ($(CONFIG_ARCH_BCM2835),y)
16+
RPI_DT_OVERLAYS=y
17+
endif
18+
319
dtb-$(CONFIG_ARCH_ALPINE) += \
420
alpine-db.dtb
521
dtb-$(CONFIG_MACH_ASM9260) += \
@@ -660,7 +676,18 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
660676
mt6592-evb.dtb \
661677
mt8127-moose.dtb \
662678
mt8135-evbp1.dtb
679+
680+
targets += dtbs dtbs_install
681+
targets += $(dtb-y)
682+
663683
endif
664684

665685
always := $(dtb-y)
666686
clean-files := *.dtb
687+
688+
# Enable fixups to support overlays on BCM2708 platforms
689+
ifeq ($(RPI_DT_OVERLAYS),y)
690+
DTC_FLAGS ?= -@
691+
endif
692+
693+
subdir-y += overlays
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
/dts-v1/;
2+
3+
/include/ "bcm2708.dtsi"
4+
5+
/ {
6+
compatible = "brcm,bcm2708";
7+
model = "Raspberry Pi Model B+";
8+
9+
aliases {
10+
soc = &soc;
11+
spi0 = &spi0;
12+
i2c0 = &i2c0;
13+
i2c1 = &i2c1;
14+
i2s = &i2s;
15+
gpio = &gpio;
16+
intc = &intc;
17+
leds = &leds;
18+
audio = &audio;
19+
sound = &sound;
20+
uart0 = &uart0;
21+
uart1 = &uart1;
22+
clocks = &clocks;
23+
};
24+
25+
sound: sound {
26+
};
27+
};
28+
29+
&gpio {
30+
spi0_pins: spi0_pins {
31+
brcm,pins = <7 8 9 10 11>;
32+
brcm,function = <4>; /* alt0 */
33+
};
34+
35+
i2c0_pins: i2c0 {
36+
brcm,pins = <0 1>;
37+
brcm,function = <4>;
38+
};
39+
40+
i2c1_pins: i2c1 {
41+
brcm,pins = <2 3>;
42+
brcm,function = <4>;
43+
};
44+
45+
i2s_pins: i2s {
46+
brcm,pins = <18 19 20 21>;
47+
brcm,function = <4>; /* alt0 */
48+
};
49+
};
50+
51+
&mmc {
52+
status = "okay";
53+
bus-width = <4>;
54+
};
55+
56+
&fb {
57+
status = "okay";
58+
};
59+
60+
&uart0 {
61+
status = "okay";
62+
};
63+
64+
&spi0 {
65+
pinctrl-names = "default";
66+
pinctrl-0 = <&spi0_pins>;
67+
68+
spidev@0{
69+
compatible = "spidev";
70+
reg = <0>; /* CE0 */
71+
#address-cells = <1>;
72+
#size-cells = <0>;
73+
spi-max-frequency = <500000>;
74+
};
75+
76+
spidev@1{
77+
compatible = "spidev";
78+
reg = <1>; /* CE1 */
79+
#address-cells = <1>;
80+
#size-cells = <0>;
81+
spi-max-frequency = <500000>;
82+
};
83+
};
84+
85+
&i2c0 {
86+
pinctrl-names = "default";
87+
pinctrl-0 = <&i2c0_pins>;
88+
clock-frequency = <100000>;
89+
};
90+
91+
&i2c1 {
92+
pinctrl-names = "default";
93+
pinctrl-0 = <&i2c1_pins>;
94+
clock-frequency = <100000>;
95+
};
96+
97+
&i2s {
98+
#sound-dai-cells = <0>;
99+
pinctrl-names = "default";
100+
pinctrl-0 = <&i2s_pins>;
101+
};
102+
103+
&leds {
104+
act_led: act {
105+
label = "led0";
106+
linux,default-trigger = "mmc0";
107+
gpios = <&gpio 47 0>;
108+
};
109+
110+
pwr_led: pwr {
111+
label = "led1";
112+
linux,default-trigger = "input";
113+
gpios = <&gpio 35 0>;
114+
};
115+
};
116+
117+
/ {
118+
__overrides__ {
119+
uart0 = <&uart0>,"status";
120+
uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
121+
i2s = <&i2s>,"status";
122+
spi = <&spi0>,"status";
123+
i2c0 = <&i2c0>,"status";
124+
i2c1 = <&i2c1>,"status";
125+
i2c0_baudrate = <&i2c0>,"clock-frequency:0";
126+
i2c1_baudrate = <&i2c1>,"clock-frequency:0";
127+
128+
act_led_gpio = <&act_led>,"gpios:4";
129+
act_led_activelow = <&act_led>,"gpios:8";
130+
act_led_trigger = <&act_led>,"linux,default-trigger";
131+
132+
pwr_led_gpio = <&pwr_led>,"gpios:4";
133+
pwr_led_activelow = <&pwr_led>,"gpios:8";
134+
pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
135+
136+
audio = <&audio>,"status";
137+
watchdog = <&watchdog>,"status";
138+
random = <&random>,"status";
139+
};
140+
};

arch/arm/boot/dts/bcm2708-rpi-b.dts

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
/dts-v1/;
2+
3+
/include/ "bcm2708.dtsi"
4+
5+
/ {
6+
compatible = "brcm,bcm2708";
7+
model = "Raspberry Pi Model B";
8+
9+
aliases {
10+
soc = &soc;
11+
spi0 = &spi0;
12+
i2c0 = &i2c0;
13+
i2c1 = &i2c1;
14+
i2s = &i2s;
15+
gpio = &gpio;
16+
intc = &intc;
17+
leds = &leds;
18+
audio = &audio;
19+
sound = &sound;
20+
uart0 = &uart0;
21+
uart1 = &uart1;
22+
clocks = &clocks;
23+
};
24+
25+
sound: sound {
26+
};
27+
};
28+
29+
&gpio {
30+
spi0_pins: spi0_pins {
31+
brcm,pins = <7 8 9 10 11>;
32+
brcm,function = <4>; /* alt0 */
33+
};
34+
35+
i2c0_pins: i2c0 {
36+
brcm,pins = <0 1>;
37+
brcm,function = <4>;
38+
};
39+
40+
i2c1_pins: i2c1 {
41+
brcm,pins = <2 3>;
42+
brcm,function = <4>;
43+
};
44+
45+
i2s_pins: i2s {
46+
brcm,pins = <28 29 30 31>;
47+
brcm,function = <4>; /* alt0 */
48+
};
49+
};
50+
51+
&mmc {
52+
status = "okay";
53+
bus-width = <4>;
54+
};
55+
56+
&fb {
57+
status = "okay";
58+
};
59+
60+
&uart0 {
61+
status = "okay";
62+
};
63+
64+
&spi0 {
65+
pinctrl-names = "default";
66+
pinctrl-0 = <&spi0_pins>;
67+
68+
spidev@0{
69+
compatible = "spidev";
70+
reg = <0>; /* CE0 */
71+
#address-cells = <1>;
72+
#size-cells = <0>;
73+
spi-max-frequency = <500000>;
74+
};
75+
76+
spidev@1{
77+
compatible = "spidev";
78+
reg = <1>; /* CE1 */
79+
#address-cells = <1>;
80+
#size-cells = <0>;
81+
spi-max-frequency = <500000>;
82+
};
83+
};
84+
85+
&i2c0 {
86+
pinctrl-names = "default";
87+
pinctrl-0 = <&i2c0_pins>;
88+
clock-frequency = <100000>;
89+
};
90+
91+
&i2c1 {
92+
pinctrl-names = "default";
93+
pinctrl-0 = <&i2c1_pins>;
94+
clock-frequency = <100000>;
95+
};
96+
97+
&i2s {
98+
#sound-dai-cells = <0>;
99+
pinctrl-names = "default";
100+
pinctrl-0 = <&i2s_pins>;
101+
};
102+
103+
&leds {
104+
act_led: act {
105+
label = "led0";
106+
linux,default-trigger = "mmc0";
107+
gpios = <&gpio 16 1>;
108+
};
109+
};
110+
111+
/ {
112+
__overrides__ {
113+
uart0 = <&uart0>,"status";
114+
uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
115+
i2s = <&i2s>,"status";
116+
spi = <&spi0>,"status";
117+
i2c0 = <&i2c0>,"status";
118+
i2c1 = <&i2c1>,"status";
119+
i2c0_baudrate = <&i2c0>,"clock-frequency:0";
120+
i2c1_baudrate = <&i2c1>,"clock-frequency:0";
121+
122+
act_led_gpio = <&act_led>,"gpios:4";
123+
act_led_activelow = <&act_led>,"gpios:8";
124+
act_led_trigger = <&act_led>,"linux,default-trigger";
125+
126+
audio = <&audio>,"status";
127+
watchdog = <&watchdog>,"status";
128+
random = <&random>,"status";
129+
};
130+
};

arch/arm/boot/dts/bcm2708-rpi-cm.dts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/dts-v1/;
2+
3+
/include/ "bcm2708-rpi-cm.dtsi"
4+
5+
/ {
6+
model = "Raspberry Pi Compute Module";
7+
};
8+
9+
&uart0 {
10+
status = "okay";
11+
};
12+
13+
/ {
14+
__overrides__ {
15+
uart0 = <&uart0>,"status";
16+
uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
17+
};
18+
};

arch/arm/boot/dts/bcm2708-rpi-cm.dtsi

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/include/ "bcm2708.dtsi"
2+
3+
/ {
4+
aliases {
5+
soc = &soc;
6+
spi0 = &spi0;
7+
i2c0 = &i2c0;
8+
i2c1 = &i2c1;
9+
i2s = &i2s;
10+
gpio = &gpio;
11+
intc = &intc;
12+
leds = &leds;
13+
audio = &audio;
14+
sound = &sound;
15+
uart0 = &uart0;
16+
uart1 = &uart1;
17+
clocks = &clocks;
18+
};
19+
20+
sound: sound {
21+
};
22+
};
23+
24+
&leds {
25+
act_led: act {
26+
label = "led0";
27+
linux,default-trigger = "mmc0";
28+
gpios = <&gpio 47 0>;
29+
};
30+
};
31+
32+
&mmc {
33+
status = "okay";
34+
bus-width = <4>;
35+
};
36+
37+
&fb {
38+
status = "okay";
39+
};
40+
41+
&audio {
42+
status = "okay";
43+
};
44+
45+
/ {
46+
__overrides__ {
47+
act_led_gpio = <&act_led>,"gpios:4";
48+
act_led_activelow = <&act_led>,"gpios:8";
49+
act_led_trigger = <&act_led>,"linux,default-trigger";
50+
};
51+
};

0 commit comments

Comments
 (0)