diff options
author | notro <notro@tronnes.org> | 2014-07-27 20:12:58 +0200 |
---|---|---|
committer | popcornmix <popcornmix@gmail.com> | 2015-05-18 14:11:10 +0100 |
commit | 73da1a3c934193a315915a376dee3b76de984d3f (patch) | |
tree | 3045525975a2f1a2842262b4e98ec4c40bb46f41 /arch/arm | |
parent | a54d4c766a1ae6d104cf7f3937c7beb2a04c533e (diff) | |
download | linux-73da1a3c934193a315915a376dee3b76de984d3f.tar.gz |
spi: bcm2708: add device tree support
Add DT support to driver and add to .dtsi file.
Setup pins and spidev in .dts file.
SPI is disabled by default.
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
BCM2708: don't register SPI controller when using DT
The device for the SPI controller is in the Device Tree.
Only register the device when not using DT.
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
spi: bcm2835: make driver available on ARCH_BCM2708
Make this driver available on ARCH_BCM2708
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
bcm2708: Remove the prohibition on mixing SPIDEV and DT
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/dts/bcm2708.dtsi | 8 | ||||
-rw-r--r-- | arch/arm/mach-bcm2708/bcm2708.c | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/arch/arm/boot/dts/bcm2708.dtsi b/arch/arm/boot/dts/bcm2708.dtsi index 96b7311a797b..93f009a5e89b 100644 --- a/arch/arm/boot/dts/bcm2708.dtsi +++ b/arch/arm/boot/dts/bcm2708.dtsi @@ -82,5 +82,13 @@ compatible = "simple-bus"; #address-cells = <1>; #size-cells = <0>; + + clk_spi: clock@2 { + compatible = "fixed-clock"; + reg = <2>; + #clock-cells = <0>; + clock-output-names = "spi"; + clock-frequency = <250000000>; + }; }; }; diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c index a207ad851d2a..e366bb49eefb 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -836,7 +836,7 @@ void __init bcm2708_init(void) for (i = 0; i < ARRAY_SIZE(bcm2708_alsa_devices); i++) bcm_register_device(&bcm2708_alsa_devices[i]); - bcm_register_device(&bcm2708_spi_device); + bcm_register_device_dt(&bcm2708_spi_device); bcm_register_device(&bcm2708_bsc0_device); bcm_register_device(&bcm2708_bsc1_device); @@ -876,8 +876,9 @@ void __init bcm2708_init(void) system_serial_low = serial; #ifdef CONFIG_BCM2708_SPIDEV - spi_register_board_info(bcm2708_spi_devices, - ARRAY_SIZE(bcm2708_spi_devices)); + if (!use_dt) + spi_register_board_info(bcm2708_spi_devices, + ARRAY_SIZE(bcm2708_spi_devices)); #endif } |