Skip to content

Commit aab128d

Browse files
Eugeniy Paltsevvineetgarc
authored andcommitted
ARC: [plat-hsdk]: enable DW SPI controller
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>
1 parent fd5de27 commit aab128d

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

‎arch/arc/boot/dts/hsdk.dts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99
/dts-v1/;
1010

11+
#include <dt-bindings/gpio/gpio.h>
1112
#include <dt-bindings/reset/snps,hsdk-reset.h>
1213

1314
/ {
@@ -252,6 +253,19 @@
252253
dma-coherent;
253254
};
254255

256+
spi0: spi@20000 {
257+
compatible = "snps,dw-apb-ssi";
258+
reg = <0x20000 0x100>;
259+
#address-cells = <1>;
260+
#size-cells = <0>;
261+
interrupts = <16>;
262+
num-cs = <2>;
263+
reg-io-width = <4>;
264+
clocks = <&input_clk>;
265+
cs-gpios = <&creg_gpio 0 GPIO_ACTIVE_LOW>,
266+
<&creg_gpio 1 GPIO_ACTIVE_LOW>;
267+
};
268+
255269
creg_gpio: gpio@14b0 {
256270
compatible = "snps,creg-gpio-hsdk";
257271
reg = <0x14b0 0x4>;

‎arch/arc/configs/hsdk_defconfig‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ CONFIG_SERIAL_8250_CONSOLE=y
4646
CONFIG_SERIAL_8250_DW=y
4747
CONFIG_SERIAL_OF_PLATFORM=y
4848
# CONFIG_HW_RANDOM is not set
49+
CONFIG_SPI=y
50+
CONFIG_SPI_DESIGNWARE=y
51+
CONFIG_SPI_DW_MMIO=y
4952
CONFIG_GPIOLIB=y
5053
CONFIG_GPIO_SYSFS=y
5154
CONFIG_GPIO_DWAPB=y

0 commit comments

Comments
 (0)