soc/gr716a: Enable SPIMCTRL support on LEON GR716A

GR716A has two SPIMCTRL SPI controllers.

This adds the SPIMCTRL description to the DTS and makes the SPI
option available in the kernel configuration.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
This commit is contained in:
Martin Åberg 2021-03-03 18:54:27 +01:00 committed by Carles Cufí
parent e13d4a14df
commit f033f31728
4 changed files with 48 additions and 0 deletions

View file

@ -6,11 +6,15 @@
/dts-v1/;
#include <mem.h>
#include <gaisler/gr716a.dtsi>
/ {
model = "GR716-MINI Development Board";
compatible = "gaisler,gr716a-mini";
aliases {
spi-flash0 = &flash0;
};
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
@ -21,3 +25,15 @@
&uart0 {
status = "okay";
};
&spim0 {
status = "okay";
/* 256 Mbit SPI flash MX25L25635FZ2I-10G in 8 pin WSON package */
flash0: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
size = <DT_SIZE_M(256)>;
jedec-id = [c2 20 19];
};
};

View file

@ -9,6 +9,7 @@ toolchain:
- xtools
supported:
- netif
- spi
testing:
ignore_tags:
- net

View file

@ -89,5 +89,23 @@
reg = <0x80305000 0x100>;
status = "disabled";
};
spim0: spi@fff00100 {
compatible = "gaisler,spimctrl";
reg = <0xfff00100 0x100>;
interrupts = <2 0>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
spim1: spi@fff00200 {
compatible = "gaisler,spimctrl";
reg = <0xfff00200 0x100>;
interrupts = <2 0>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};
};

View file

@ -13,4 +13,17 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
int
default 50000000
if FLASH
config SPI
default y
config SPI_NOR
default y
config SPI_GRLIB_SPIMCTRL
default y
endif
endif