Skip to content

Commit d9fac63

Browse files
committed
Add 2709 platform for Raspberry Pi 2
1 parent 5e07ddc commit d9fac63

Some content is hidden

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

65 files changed

+8999
-16
lines changed

arch/arm/Kconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,26 @@ config ARCH_OMAP1
803803
help
804804
Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx)
805805

806+
config ARCH_BCM2709
807+
bool "Broadcom BCM2709 family"
808+
select ARCH_HAS_BARRIERS if SMP
809+
select CPU_V7
810+
select HAVE_SMP
811+
select ARM_AMBA
812+
select MIGHT_HAVE_CACHE_L2X0
813+
select HAVE_SCHED_CLOCK
814+
select NEED_MACH_MEMORY_H
815+
select NEED_MACH_IO_H
816+
select COMMON_CLK
817+
select ARCH_HAS_CPUFREQ
818+
select GENERIC_CLOCKEVENTS
819+
select MACH_BCM2709
820+
select VC4
821+
select FIQ
822+
# select ZONE_DMA
823+
help
824+
This enables support for Broadcom BCM2709 boards.
825+
806826
endchoice
807827

808828
menu "Multiple platform selection"
@@ -990,6 +1010,7 @@ source "arch/arm/mach-vt8500/Kconfig"
9901010

9911011
source "arch/arm/mach-w90x900/Kconfig"
9921012
source "arch/arm/mach-bcm2708/Kconfig"
1013+
source "arch/arm/mach-bcm2709/Kconfig"
9931014

9941015
source "arch/arm/mach-zynq/Kconfig"
9951016

arch/arm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ machine-$(CONFIG_ARCH_AT91) += at91
147147
machine-$(CONFIG_ARCH_AXXIA) += axxia
148148
machine-$(CONFIG_ARCH_BCM) += bcm
149149
machine-$(CONFIG_ARCH_BCM2708) += bcm2708
150+
machine-$(CONFIG_ARCH_BCM2709) += bcm2709
150151
machine-$(CONFIG_ARCH_BERLIN) += berlin
151152
machine-$(CONFIG_ARCH_CLPS711X) += clps711x
152153
machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx

arch/arm/boot/dts/Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4ek.dtb
5353

5454
dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
5555
dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
56+
57+
# Raspberry Pi
58+
ifeq ($(CONFIG_BCM2708_DT),y)
59+
RPI_DT_OVERLAYS=y
60+
endif
61+
ifeq ($(CONFIG_BCM2709_DT),y)
62+
RPI_DT_OVERLAYS=y
63+
endif
5664
dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b.dtb
5765
dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b-plus.dtb
5866
dtb-$(CONFIG_BCM2708_DT) += hifiberry-dac-overlay.dtb
@@ -68,6 +76,7 @@ dtb-$(CONFIG_BCM2708_DT) += ds1307-rtc-overlay.dtb
6876
dtb-$(CONFIG_BCM2708_DT) += w1-gpio-overlay.dtb
6977
dtb-$(CONFIG_BCM2708_DT) += w1-gpio-pullup-overlay.dtb
7078
dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
79+
7180
dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
7281
dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
7382
dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \
@@ -537,7 +546,7 @@ targets += $(dtb-y)
537546
endif
538547

539548
# Enable fixups to support overlays on BCM2708 platforms
540-
ifeq ($(CONFIG_BCM2708_DT),y)
549+
ifeq ($(RPI_DT_OVERLAYS),y)
541550
DTC_FLAGS ?= -@
542551
endif
543552

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
/dts-v1/;
2+
3+
/include/ "bcm2709.dtsi"
4+
5+
/ {
6+
compatible = "brcm,bcm2709";
7+
model = "Raspberry Pi 2 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+
sound = &sound;
19+
};
20+
21+
sound: sound {
22+
};
23+
};
24+
25+
&gpio {
26+
spi0_pins: spi0_pins {
27+
brcm,pins = <7 8 9 10 11>;
28+
brcm,function = <4>; /* alt0 */
29+
};
30+
31+
i2c0_pins: i2c0 {
32+
brcm,pins = <0 1>;
33+
brcm,function = <4>;
34+
};
35+
36+
i2c1_pins: i2c1 {
37+
brcm,pins = <2 3>;
38+
brcm,function = <4>;
39+
};
40+
41+
i2s_pins: i2s {
42+
brcm,pins = <18 19 20 21>;
43+
brcm,function = <4>; /* alt0 */
44+
};
45+
};
46+
47+
&spi0 {
48+
pinctrl-names = "default";
49+
pinctrl-0 = <&spi0_pins>;
50+
51+
spidev@0{
52+
compatible = "spidev";
53+
reg = <0>; /* CE0 */
54+
#address-cells = <1>;
55+
#size-cells = <0>;
56+
spi-max-frequency = <500000>;
57+
};
58+
59+
spidev@1{
60+
compatible = "spidev";
61+
reg = <1>; /* CE1 */
62+
#address-cells = <1>;
63+
#size-cells = <0>;
64+
spi-max-frequency = <500000>;
65+
};
66+
};
67+
68+
&i2c0 {
69+
pinctrl-names = "default";
70+
pinctrl-0 = <&i2c0_pins>;
71+
clock-frequency = <100000>;
72+
};
73+
74+
&i2c1 {
75+
pinctrl-names = "default";
76+
pinctrl-0 = <&i2c1_pins>;
77+
clock-frequency = <100000>;
78+
};
79+
80+
&i2s {
81+
#sound-dai-cells = <0>;
82+
pinctrl-names = "default";
83+
pinctrl-0 = <&i2s_pins>;
84+
};
85+
86+
&act_led {
87+
gpios = <&gpio 47 0>;
88+
};
89+
90+
/ {
91+
__overrides__ {
92+
i2s = <&i2s>,"status";
93+
spi = <&spi0>,"status";
94+
i2c0 = <&i2c0>,"status";
95+
i2c1 = <&i2c1>,"status";
96+
97+
act_led_gpio = <&act_led>,"gpios:4";
98+
act_led_activelow = <&act_led>,"gpios:8";
99+
act_led_trigger = <&act_led>,"linux,default-trigger";
100+
};
101+
};

arch/arm/boot/dts/bcm2709.dtsi

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
/include/ "skeleton.dtsi"
2+
3+
/ {
4+
compatible = "brcm,bcm2709";
5+
model = "BCM2709";
6+
7+
interrupt-parent = <&intc>;
8+
9+
chosen {
10+
/* No padding required - the boot loader can do that. */
11+
bootargs = "";
12+
};
13+
14+
soc: soc {
15+
compatible = "simple-bus";
16+
#address-cells = <1>;
17+
#size-cells = <1>;
18+
ranges = <0x7e000000 0x3f000000 0x01000000>;
19+
20+
intc: interrupt-controller {
21+
compatible = "brcm,bcm2708-armctrl-ic";
22+
reg = <0x7e00b200 0x200>;
23+
interrupt-controller;
24+
#interrupt-cells = <2>;
25+
};
26+
27+
gpio: gpio {
28+
compatible = "brcm,bcm2835-gpio";
29+
reg = <0x7e200000 0xb4>;
30+
interrupts = <2 17>, <2 18>;
31+
32+
gpio-controller;
33+
#gpio-cells = <2>;
34+
35+
interrupt-controller;
36+
#interrupt-cells = <2>;
37+
};
38+
39+
i2s: i2s@7e203000 {
40+
compatible = "brcm,bcm2708-i2s";
41+
reg = <0x7e203000 0x20>,
42+
<0x7e101098 0x02>;
43+
44+
//dmas = <&dma 2>,
45+
// <&dma 3>;
46+
dma-names = "tx", "rx";
47+
status = "disabled";
48+
};
49+
50+
spi0: spi@7e204000 {
51+
compatible = "brcm,bcm2708-spi";
52+
reg = <0x7e204000 0x1000>;
53+
interrupts = <2 22>;
54+
clocks = <&clk_spi>;
55+
#address-cells = <1>;
56+
#size-cells = <0>;
57+
status = "disabled";
58+
};
59+
60+
i2c0: i2c@7e205000 {
61+
compatible = "brcm,bcm2708-i2c";
62+
reg = <0x7e205000 0x1000>;
63+
interrupts = <2 21>;
64+
clocks = <&clk_i2c>;
65+
#address-cells = <1>;
66+
#size-cells = <0>;
67+
status = "disabled";
68+
};
69+
70+
i2c1: i2c@7e804000 {
71+
compatible = "brcm,bcm2708-i2c";
72+
reg = <0x7e804000 0x1000>;
73+
interrupts = <2 21>;
74+
clocks = <&clk_i2c>;
75+
#address-cells = <1>;
76+
#size-cells = <0>;
77+
status = "disabled";
78+
};
79+
80+
leds: leds {
81+
compatible = "gpio-leds";
82+
83+
act_led: act {
84+
label = "ACT";
85+
linux,default-trigger = "mmc0";
86+
};
87+
};
88+
};
89+
90+
clocks {
91+
compatible = "simple-bus";
92+
#address-cells = <1>;
93+
#size-cells = <0>;
94+
95+
clk_i2c: i2c {
96+
compatible = "fixed-clock";
97+
reg = <1>;
98+
#clock-cells = <0>;
99+
clock-frequency = <250000000>;
100+
};
101+
102+
clk_spi: clock@2 {
103+
compatible = "fixed-clock";
104+
reg = <2>;
105+
#clock-cells = <0>;
106+
clock-output-names = "spi";
107+
clock-frequency = <250000000>;
108+
};
109+
};
110+
111+
timer {
112+
compatible = "arm,armv7-timer";
113+
clock-frequency = <19200000>;
114+
interrupts = <3 0>, // PHYS_SECURE_PPI
115+
<3 1>, // PHYS_NONSECURE_PPI
116+
<3 3>, // VIRT_PPI
117+
<3 2>; // HYP_PPI
118+
};
119+
120+
cpus: cpus {
121+
#address-cells = <1>;
122+
#size-cells = <0>;
123+
124+
v7_cpu0: cpu@0 {
125+
device_type = "cpu";
126+
compatible = "arm,cortex-a7";
127+
reg = <0xf00>;
128+
clock-frequency = <800000000>;
129+
};
130+
131+
v7_cpu1: cpu@1 {
132+
device_type = "cpu";
133+
compatible = "arm,cortex-a7";
134+
reg = <0xf01>;
135+
clock-frequency = <800000000>;
136+
};
137+
138+
v7_cpu2: cpu@2 {
139+
device_type = "cpu";
140+
compatible = "arm,cortex-a7";
141+
reg = <0xf02>;
142+
clock-frequency = <800000000>;
143+
};
144+
145+
v7_cpu3: cpu@3 {
146+
device_type = "cpu";
147+
compatible = "arm,cortex-a7";
148+
reg = <0xf03>;
149+
clock-frequency = <800000000>;
150+
};
151+
};
152+
153+
__overrides__ {
154+
arm_freq = <&v7_cpu0>, "clock-frequency:0",
155+
<&v7_cpu1>, "clock-frequency:0",
156+
<&v7_cpu2>, "clock-frequency:0",
157+
<&v7_cpu3>, "clock-frequency:0";
158+
};
159+
};

0 commit comments

Comments
 (0)