Skip to content

Commit

Permalink
BCM2708: Add core Device Tree support
Browse files Browse the repository at this point in the history
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
  • Loading branch information
notro authored and popcornmix committed Aug 4, 2015
1 parent 996a96c commit 25f3e06
Show file tree
Hide file tree
Showing 45 changed files with 3,316 additions and 54 deletions.
27 changes: 27 additions & 0 deletions arch/arm/boot/dts/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
ifeq ($(CONFIG_OF),y)

dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b.dtb
dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b-plus.dtb
dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-cm.dtb
dtb-$(CONFIG_BCM2709_DT) += bcm2709-rpi-2-b.dtb

# Raspberry Pi
ifeq ($(CONFIG_BCM2708_DT),y)
RPI_DT_OVERLAYS=y
endif
ifeq ($(CONFIG_BCM2709_DT),y)
RPI_DT_OVERLAYS=y
endif
ifeq ($(CONFIG_ARCH_BCM2835),y)
RPI_DT_OVERLAYS=y
endif

dtb-$(CONFIG_ARCH_ALPINE) += \
alpine-db.dtb
dtb-$(CONFIG_MACH_ASM9260) += \
Expand Down Expand Up @@ -660,7 +676,18 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt6592-evb.dtb \
mt8127-moose.dtb \
mt8135-evbp1.dtb

targets += dtbs dtbs_install
targets += $(dtb-y)

endif

always := $(dtb-y)
clean-files := *.dtb

# Enable fixups to support overlays on BCM2708 platforms
ifeq ($(RPI_DT_OVERLAYS),y)
DTC_FLAGS ?= -@
endif

subdir-y += overlays
140 changes: 140 additions & 0 deletions arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/dts-v1/;

/include/ "bcm2708.dtsi"

/ {
compatible = "brcm,bcm2708";
model = "Raspberry Pi Model B+";

aliases {
soc = &soc;
spi0 = &spi0;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2s = &i2s;
gpio = &gpio;
intc = &intc;
leds = &leds;
audio = &audio;
sound = &sound;
uart0 = &uart0;
uart1 = &uart1;
clocks = &clocks;
};

sound: sound {
};
};

&gpio {
spi0_pins: spi0_pins {
brcm,pins = <7 8 9 10 11>;
brcm,function = <4>; /* alt0 */
};

i2c0_pins: i2c0 {
brcm,pins = <0 1>;
brcm,function = <4>;
};

i2c1_pins: i2c1 {
brcm,pins = <2 3>;
brcm,function = <4>;
};

i2s_pins: i2s {
brcm,pins = <18 19 20 21>;
brcm,function = <4>; /* alt0 */
};
};

&mmc {
status = "okay";
bus-width = <4>;
};

&fb {
status = "okay";
};

&uart0 {
status = "okay";
};

&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;

spidev@0{
compatible = "spidev";
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
};

spidev@1{
compatible = "spidev";
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
};
};

&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
clock-frequency = <100000>;
};

&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
clock-frequency = <100000>;
};

&i2s {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&i2s_pins>;
};

&leds {
act_led: act {
label = "led0";
linux,default-trigger = "mmc0";
gpios = <&gpio 47 0>;
};

pwr_led: pwr {
label = "led1";
linux,default-trigger = "input";
gpios = <&gpio 35 0>;
};
};

/ {
__overrides__ {
uart0 = <&uart0>,"status";
uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
i2s = <&i2s>,"status";
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
i2c1 = <&i2c1>,"status";
i2c0_baudrate = <&i2c0>,"clock-frequency:0";
i2c1_baudrate = <&i2c1>,"clock-frequency:0";

act_led_gpio = <&act_led>,"gpios:4";
act_led_activelow = <&act_led>,"gpios:8";
act_led_trigger = <&act_led>,"linux,default-trigger";

pwr_led_gpio = <&pwr_led>,"gpios:4";
pwr_led_activelow = <&pwr_led>,"gpios:8";
pwr_led_trigger = <&pwr_led>,"linux,default-trigger";

audio = <&audio>,"status";
watchdog = <&watchdog>,"status";
random = <&random>,"status";
};
};
130 changes: 130 additions & 0 deletions arch/arm/boot/dts/bcm2708-rpi-b.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
/dts-v1/;

/include/ "bcm2708.dtsi"

/ {
compatible = "brcm,bcm2708";
model = "Raspberry Pi Model B";

aliases {
soc = &soc;
spi0 = &spi0;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2s = &i2s;
gpio = &gpio;
intc = &intc;
leds = &leds;
audio = &audio;
sound = &sound;
uart0 = &uart0;
uart1 = &uart1;
clocks = &clocks;
};

sound: sound {
};
};

&gpio {
spi0_pins: spi0_pins {
brcm,pins = <7 8 9 10 11>;
brcm,function = <4>; /* alt0 */
};

i2c0_pins: i2c0 {
brcm,pins = <0 1>;
brcm,function = <4>;
};

i2c1_pins: i2c1 {
brcm,pins = <2 3>;
brcm,function = <4>;
};

i2s_pins: i2s {
brcm,pins = <28 29 30 31>;
brcm,function = <4>; /* alt0 */
};
};

&mmc {
status = "okay";
bus-width = <4>;
};

&fb {
status = "okay";
};

&uart0 {
status = "okay";
};

&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;

spidev@0{
compatible = "spidev";
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
};

spidev@1{
compatible = "spidev";
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
};
};

&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
clock-frequency = <100000>;
};

&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
clock-frequency = <100000>;
};

&i2s {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&i2s_pins>;
};

&leds {
act_led: act {
label = "led0";
linux,default-trigger = "mmc0";
gpios = <&gpio 16 1>;
};
};

/ {
__overrides__ {
uart0 = <&uart0>,"status";
uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
i2s = <&i2s>,"status";
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
i2c1 = <&i2c1>,"status";
i2c0_baudrate = <&i2c0>,"clock-frequency:0";
i2c1_baudrate = <&i2c1>,"clock-frequency:0";

act_led_gpio = <&act_led>,"gpios:4";
act_led_activelow = <&act_led>,"gpios:8";
act_led_trigger = <&act_led>,"linux,default-trigger";

audio = <&audio>,"status";
watchdog = <&watchdog>,"status";
random = <&random>,"status";
};
};
18 changes: 18 additions & 0 deletions arch/arm/boot/dts/bcm2708-rpi-cm.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/dts-v1/;

/include/ "bcm2708-rpi-cm.dtsi"

/ {
model = "Raspberry Pi Compute Module";
};

&uart0 {
status = "okay";
};

/ {
__overrides__ {
uart0 = <&uart0>,"status";
uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
};
};
51 changes: 51 additions & 0 deletions arch/arm/boot/dts/bcm2708-rpi-cm.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/include/ "bcm2708.dtsi"

/ {
aliases {
soc = &soc;
spi0 = &spi0;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2s = &i2s;
gpio = &gpio;
intc = &intc;
leds = &leds;
audio = &audio;
sound = &sound;
uart0 = &uart0;
uart1 = &uart1;
clocks = &clocks;
};

sound: sound {
};
};

&leds {
act_led: act {
label = "led0";
linux,default-trigger = "mmc0";
gpios = <&gpio 47 0>;
};
};

&mmc {
status = "okay";
bus-width = <4>;
};

&fb {
status = "okay";
};

&audio {
status = "okay";
};

/ {
__overrides__ {
act_led_gpio = <&act_led>,"gpios:4";
act_led_activelow = <&act_led>,"gpios:8";
act_led_trigger = <&act_led>,"linux,default-trigger";
};
};
Loading

0 comments on commit 25f3e06

Please sign in to comment.