nds32: board: Support SPI driver.

Add spi dts node and enable spi dm flash config.

Signed-off-by: rick <rick@andestech.com>
This commit is contained in:
rick
2017-08-28 15:13:09 +08:00
committed by Andes
parent 6d3cb0fdcd
commit 7b1a50b7b6
3 changed files with 45 additions and 3 deletions

View File

@@ -8,6 +8,7 @@
aliases {
uart0 = &serial0;
ethernet0 = &mac0;
spi0 = &spi;
} ;
chosen {
@@ -22,6 +23,12 @@
reg = <0x00000000 0x40000000>;
};
spiclk: virt_100mhz {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <100000000>;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -69,4 +76,20 @@
device-width = <1>;
};
spi: spi@f0b00000 {
compatible = "andestech,atcspi200";
reg = <0xf0b00000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
num-cs = <1>;
clocks = <&spiclk>;
interrupts = <3 4>;
flash@0 {
compatible = "spi-flash";
spi-max-frequency = <50000000>;
reg = <0>;
spi-cpol;
spi-cpha;
};
};
};