aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Klein <matthias.klein@linux.com>2014-11-20 05:52:45 -0500
committerArnd Bergmann <arnd@arndb.de>2014-11-20 06:17:25 -0500
commitba2a1d6959acfc387c20eae6480b1c4b3bbc5950 (patch)
tree8252c652b77f179d6b0324c341b502c0f84e7c8c
parent498149dd1218625867d5139773c560f9f12193c9 (diff)
ARM: bcm2835: Add device tree for Raspberry Pi model B+
The model B and B+ differ in the GPIO lines for ACT and PWR leds, and the I2S interface. Signed-off-by: Matthias Klein <matthias.klein@linux.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Lee Jones <lee@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--arch/arm/boot/dts/Makefile1
-rw-r--r--arch/arm/boot/dts/bcm2835-rpi-b-plus.dts30
-rw-r--r--arch/arm/boot/dts/bcm2835-rpi-b.dts46
-rw-r--r--arch/arm/boot/dts/bcm2835-rpi.dtsi51
4 files changed, 85 insertions, 43 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 2b57568af583..165a6add38b9 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -54,6 +54,7 @@ dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4ek.dtb
54dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb 54dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
55dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb 55dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
56dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb 56dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
57dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
57dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \ 58dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
58 bcm911360_entphn.dtb \ 59 bcm911360_entphn.dtb \
59 bcm911360k.dtb \ 60 bcm911360k.dtb \
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
new file mode 100644
index 000000000000..e479515099c3
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
@@ -0,0 +1,30 @@
1/dts-v1/;
2/include/ "bcm2835-rpi.dtsi"
3
4/ {
5 compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
6 model = "Raspberry Pi Model B+";
7
8 leds {
9 act {
10 gpios = <&gpio 47 0>;
11 };
12
13 pwr {
14 label = "PWR";
15 gpios = <&gpio 35 0>;
16 default-state = "keep";
17 linux,default-trigger = "default-on";
18 };
19 };
20};
21
22&gpio {
23 pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>;
24
25 /* I2S interface */
26 i2s_alt0: i2s_alt0 {
27 brcm,pins = <18 19 20 21>;
28 brcm,function = <4>; /* alt0 */
29 };
30};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
index 58a0d60b95f1..bafa46fc226a 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
@@ -1,63 +1,23 @@
1/dts-v1/; 1/dts-v1/;
2/include/ "bcm2835.dtsi" 2/include/ "bcm2835-rpi.dtsi"
3 3
4/ { 4/ {
5 compatible = "raspberrypi,model-b", "brcm,bcm2835"; 5 compatible = "raspberrypi,model-b", "brcm,bcm2835";
6 model = "Raspberry Pi Model B"; 6 model = "Raspberry Pi Model B";
7 7
8 memory {
9 reg = <0 0x10000000>;
10 };
11
12 leds { 8 leds {
13 compatible = "gpio-leds";
14
15 act { 9 act {
16 label = "ACT";
17 gpios = <&gpio 16 1>; 10 gpios = <&gpio 16 1>;
18 default-state = "keep";
19 linux,default-trigger = "heartbeat";
20 }; 11 };
21 }; 12 };
22}; 13};
23 14
24&gpio { 15&gpio {
25 pinctrl-names = "default"; 16 pinctrl-0 = <&gpioout &alt0 &i2s_alt2 &alt3>;
26 pinctrl-0 = <&gpioout &alt0 &alt2 &alt3>;
27
28 gpioout: gpioout {
29 brcm,pins = <6>;
30 brcm,function = <1>; /* GPIO out */
31 };
32
33 alt0: alt0 {
34 brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>;
35 brcm,function = <4>; /* alt0 */
36 };
37
38 alt3: alt3 {
39 brcm,pins = <48 49 50 51 52 53>;
40 brcm,function = <7>; /* alt3 */
41 };
42 17
43 /* I2S interface */ 18 /* I2S interface */
44 alt2: alt2 { 19 i2s_alt2: i2s_alt2 {
45 brcm,pins = <28 29 30 31>; 20 brcm,pins = <28 29 30 31>;
46 brcm,function = <6>; /* alt2 */ 21 brcm,function = <6>; /* alt2 */
47 }; 22 };
48}; 23};
49
50&i2c0 {
51 status = "okay";
52 clock-frequency = <100000>;
53};
54
55&i2c1 {
56 status = "okay";
57 clock-frequency = <100000>;
58};
59
60&sdhci {
61 status = "okay";
62 bus-width = <4>;
63};
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
new file mode 100644
index 000000000000..c7064487017d
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -0,0 +1,51 @@
1/include/ "bcm2835.dtsi"
2
3/ {
4 memory {
5 reg = <0 0x10000000>;
6 };
7
8 leds {
9 compatible = "gpio-leds";
10
11 act {
12 label = "ACT";
13 default-state = "keep";
14 linux,default-trigger = "heartbeat";
15 };
16 };
17};
18
19&gpio {
20 pinctrl-names = "default";
21
22 gpioout: gpioout {
23 brcm,pins = <6>;
24 brcm,function = <1>; /* GPIO out */
25 };
26
27 alt0: alt0 {
28 brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>;
29 brcm,function = <4>; /* alt0 */
30 };
31
32 alt3: alt3 {
33 brcm,pins = <48 49 50 51 52 53>;
34 brcm,function = <7>; /* alt3 */
35 };
36};
37
38&i2c0 {
39 status = "okay";
40 clock-frequency = <100000>;
41};
42
43&i2c1 {
44 status = "okay";
45 clock-frequency = <100000>;
46};
47
48&sdhci {
49 status = "okay";
50 bus-width = <4>;
51};