Merge pull request #1001 from notro/closer

ARCH_BCM2835 closing in on ARCH_BCM270X
This commit is contained in:
popcornmix
2015-06-03 17:05:55 +01:00
10 changed files with 1245 additions and 77 deletions

View File

@@ -12,6 +12,9 @@ endif
ifeq ($(CONFIG_BCM2709_DT),y)
RPI_DT_OVERLAYS=y
endif
ifeq ($(CONFIG_ARCH_BCM2835),y)
RPI_DT_OVERLAYS=y
endif
subdir-$(RPI_DT_OVERLAYS) += overlays

View File

@@ -4,27 +4,40 @@
/ {
compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
model = "Raspberry Pi Model B+";
leds {
act {
gpios = <&gpio 47 0>;
};
pwr {
label = "PWR";
gpios = <&gpio 35 0>;
default-state = "keep";
linux,default-trigger = "default-on";
};
};
};
&gpio {
pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>;
/* I2S interface */
i2s_alt0: i2s_alt0 {
i2s_pins: i2s {
brcm,pins = <18 19 20 21>;
brcm,function = <4>; /* alt0 */
};
};
&i2s {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&i2s_pins>;
};
&act_led {
gpios = <&gpio 47 0>;
};
&leds {
pwr_led: pwr {
label = "led1";
linux,default-trigger = "input";
gpios = <&gpio 35 0>;
};
};
/ {
__overrides__ {
act_led_gpio = <&act_led>,"gpios:4";
act_led_activelow = <&act_led>,"gpios:8";
pwr_led_gpio = <&pwr_led>,"gpios:4";
pwr_led_activelow = <&pwr_led>,"gpios:8";
pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
};
};

View File

@@ -5,19 +5,28 @@
compatible = "raspberrypi,model-b", "brcm,bcm2835";
model = "Raspberry Pi Model B";
leds {
act {
gpios = <&gpio 16 1>;
};
};
};
&gpio {
pinctrl-0 = <&gpioout &alt0 &i2s_alt2 &alt3>;
/* I2S interface */
i2s_alt2: i2s_alt2 {
i2s_pins: i2s {
brcm,pins = <28 29 30 31>;
brcm,function = <6>; /* alt2 */
brcm,function = <4>; /* alt0 */
};
};
&i2s {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&i2s_pins>;
};
&act_led {
gpios = <&gpio 16 1>;
};
/ {
__overrides__ {
act_led_gpio = <&act_led>,"gpios:4";
act_led_activelow = <&act_led>,"gpios:8";
};
};

View File

@@ -1,17 +1,29 @@
/include/ "bcm2835.dtsi"
/ {
/* This is left here in case u-boot needs it */
memory {
reg = <0 0x10000000>;
};
leds {
aliases {
soc = &soc;
spi0 = &spi0;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2s = &i2s;
gpio = &gpio;
intc = &intc;
leds = &leds;
sound = &sound;
};
leds: leds {
compatible = "gpio-leds";
act {
label = "ACT";
default-state = "keep";
linux,default-trigger = "heartbeat";
act_led: act {
label = "led0";
linux,default-trigger = "mmc0";
};
};
@@ -19,35 +31,61 @@
audio: audio {
compatible = "brcm,bcm2835-audio";
brcm,pwm-channels = <8>;
status = "disabled";
};
/* External sound card */
sound: sound {
};
};
&gpio {
pinctrl-names = "default";
gpioout: gpioout {
brcm,pins = <6>;
brcm,function = <1>; /* GPIO out */
};
alt0: alt0 {
brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>;
spi0_pins: spi0_pins {
brcm,pins = <7 8 9 10 11>;
brcm,function = <4>; /* alt0 */
};
alt3: alt3 {
brcm,pins = <48 49 50 51 52 53>;
brcm,function = <7>; /* alt3 */
i2c0_pins: i2c0 {
brcm,pins = <0 1>;
brcm,function = <4>;
};
i2c1_pins: i2c1 {
brcm,pins = <2 3>;
brcm,function = <4>;
};
};
&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 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
clock-frequency = <100000>;
};
&i2c1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
clock-frequency = <100000>;
};
@@ -59,3 +97,16 @@
&fb {
status = "okay";
};
/ {
__overrides__ {
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_trigger = <&act_led>,"linux,default-trigger";
audio = <&audio>,"status";
};
};

View File

@@ -9,7 +9,7 @@
bootargs = "";
};
soc {
soc: soc {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
@@ -51,12 +51,12 @@
#interrupt-cells = <2>;
};
watchdog@7e100000 {
watchdog: watchdog@7e100000 {
compatible = "brcm,bcm2835-pm-wdt";
reg = <0x7e100000 0x28>;
};
rng@7e104000 {
random: rng@7e104000 {
compatible = "brcm,bcm2835-rng";
reg = <0x7e104000 0x10>;
};
@@ -90,7 +90,7 @@
#interrupt-cells = <2>;
};
uart@7e201000 {
uart0: uart@7e201000 {
compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
reg = <0x7e201000 0x1000>;
interrupts = <2 25>;
@@ -109,7 +109,7 @@
status = "disabled";
};
spi: spi@7e204000 {
spi0: spi@7e204000 {
compatible = "brcm,bcm2835-spi";
reg = <0x7e204000 0x1000>;
interrupts = <2 22>;
@@ -150,7 +150,7 @@
status = "disabled";
};
usb@7e980000 {
usb: usb@7e980000 {
compatible = "brcm,bcm2835-usb";
reg = <0x7e980000 0x10000>;
interrupts = <1 9>;

View File

@@ -8,6 +8,9 @@ endif
ifeq ($(CONFIG_BCM2709_DT),y)
RPI_DT_OVERLAYS=y
endif
ifeq ($(CONFIG_ARCH_BCM2835),y)
RPI_DT_OVERLAYS=y
endif
dtb-$(RPI_DT_OVERLAYS) += ads7846-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor-overlay.dtb

File diff suppressed because it is too large Load Diff

View File

@@ -18,6 +18,7 @@
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/clk/bcm2835.h>
#include <asm/system_info.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -107,6 +108,9 @@ static void __init bcm2835_map_io(void)
static void __init bcm2835_init(void)
{
struct device_node *np = of_find_node_by_path("/system");
u32 val;
u64 val64;
int ret;
bcm2835_setup_restart();
@@ -121,6 +125,11 @@ static void __init bcm2835_init(void)
pr_err("of_platform_populate failed: %d\n", ret);
BUG();
}
if (!of_property_read_u32(np, "linux,revision", &val))
system_rev = val;
if (!of_property_read_u64(np, "linux,serial", &val64))
system_serial_low = val64;
}
static const char * const bcm2835_compat[] = {

View File

@@ -2,7 +2,7 @@
config VIDEO_BCM2835
bool "Broadcom BCM2835 camera interface driver"
depends on VIDEO_V4L2 && (ARCH_BCM2708 || ARCH_BCM2709)
depends on VIDEO_V4L2 && (ARCH_BCM2708 || ARCH_BCM2709 || ARCH_BCM2835)
---help---
Say Y here to enable camera host interface devices for
Broadcom BCM2835 SoC. This operates over the VCHIQ interface

View File

@@ -21,49 +21,49 @@ config SND_BCM2708_SOC_I2S
config SND_BCM2708_SOC_HIFIBERRY_DAC
tristate "Support for HifiBerry DAC"
depends on SND_BCM2708_SOC_I2S
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
select SND_SOC_PCM5102A
help
Say Y or M if you want to add support for HifiBerry DAC.
config SND_BCM2708_SOC_HIFIBERRY_DACPLUS
tristate "Support for HifiBerry DAC+"
depends on SND_BCM2708_SOC_I2S
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
select SND_SOC_PCM512x
help
Say Y or M if you want to add support for HifiBerry DAC+.
config SND_BCM2708_SOC_HIFIBERRY_DIGI
tristate "Support for HifiBerry Digi"
depends on SND_BCM2708_SOC_I2S
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
select SND_SOC_WM8804
help
Say Y or M if you want to add support for HifiBerry Digi S/PDIF output board.
config SND_BCM2708_SOC_HIFIBERRY_AMP
tristate "Support for the HifiBerry Amp"
depends on SND_BCM2708_SOC_I2S
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
select SND_SOC_TAS5713
help
Say Y or M if you want to add support for the HifiBerry Amp amplifier board.
config SND_BCM2708_SOC_RPI_DAC
tristate "Support for RPi-DAC"
depends on SND_BCM2708_SOC_I2S
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
select SND_SOC_PCM1794A
help
Say Y or M if you want to add support for RPi-DAC.
config SND_BCM2708_SOC_RPI_PROTO
tristate "Support for Rpi-PROTO"
depends on SND_BCM2708_SOC_I2S
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
select SND_SOC_WM8731
help
Say Y or M if you want to add support for Audio Codec Board PROTO (WM8731).
config SND_BCM2708_SOC_IQAUDIO_DAC
tristate "Support for IQaudIO-DAC"
depends on SND_BCM2708_SOC_I2S
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
select SND_SOC_PCM512x_I2C
help
Say Y or M if you want to add support for IQaudIO-DAC.