ARC: [plat-hsdk]: enable DW SPI controller
authorEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Fri, 7 Jun 2019 14:48:00 +0000 (17:48 +0300)
committerVineet Gupta <vgupta@synopsys.com>
Mon, 8 Jul 2019 08:24:46 +0000 (09:24 +0100)
HSDK SoC has DW SPI controller. Enable it in preparation of
enabling on-board SPI peripherals.

Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/boot/dts/hsdk.dts
arch/arc/configs/hsdk_defconfig

index 9a45cb09309619d2c0e1e1e8dc179da76e6e2a7c..bfc7f5f5d6f26907121ddc20c4782a5d73f50265 100644 (file)
@@ -8,6 +8,7 @@
  */
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/reset/snps,hsdk-reset.h>
 
 / {
                        dma-coherent;
                };
 
+               spi0: spi@20000 {
+                       compatible = "snps,dw-apb-ssi";
+                       reg = <0x20000 0x100>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <16>;
+                       num-cs = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&input_clk>;
+                       cs-gpios = <&creg_gpio 0 GPIO_ACTIVE_LOW>,
+                                  <&creg_gpio 1 GPIO_ACTIVE_LOW>;
+               };
+
                creg_gpio: gpio@14b0 {
                        compatible = "snps,creg-gpio-hsdk";
                        reg = <0x14b0 0x4>;
index c8fb5d60c53f2c8ad008a1a1954955687c45f5ee..d01b567328dcb03c5347e194c4fa87a65f593b33 100644 (file)
@@ -46,6 +46,9 @@ CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_DW=y
 CONFIG_SERIAL_OF_PLATFORM=y
 # CONFIG_HW_RANDOM is not set
+CONFIG_SPI=y
+CONFIG_SPI_DESIGNWARE=y
+CONFIG_SPI_DW_MMIO=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_SYSFS=y
 CONFIG_GPIO_DWAPB=y