diff --git a/boards/sparc/gr716a_mini/gr716a_mini.dts b/boards/sparc/gr716a_mini/gr716a_mini.dts index 551caba6b8..745caa64f6 100644 --- a/boards/sparc/gr716a_mini/gr716a_mini.dts +++ b/boards/sparc/gr716a_mini/gr716a_mini.dts @@ -6,11 +6,15 @@ /dts-v1/; +#include #include / { 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 = ; + jedec-id = [c2 20 19]; + }; +}; diff --git a/boards/sparc/gr716a_mini/gr716a_mini.yaml b/boards/sparc/gr716a_mini/gr716a_mini.yaml index 4107097aab..8b673cebfa 100644 --- a/boards/sparc/gr716a_mini/gr716a_mini.yaml +++ b/boards/sparc/gr716a_mini/gr716a_mini.yaml @@ -9,6 +9,7 @@ toolchain: - xtools supported: - netif + - spi testing: ignore_tags: - net diff --git a/dts/sparc/gaisler/gr716a.dtsi b/dts/sparc/gaisler/gr716a.dtsi index 78b9c806bb..a3c79e1eaa 100644 --- a/dts/sparc/gaisler/gr716a.dtsi +++ b/dts/sparc/gaisler/gr716a.dtsi @@ -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"; + }; }; }; diff --git a/soc/sparc/gr716a/Kconfig.defconfig b/soc/sparc/gr716a/Kconfig.defconfig index 6feb4ff3d6..ef9bf0ca77 100644 --- a/soc/sparc/gr716a/Kconfig.defconfig +++ b/soc/sparc/gr716a/Kconfig.defconfig @@ -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