From 46ed96751690182a2a4a1a4931ec1f1247b6b41a Mon Sep 17 00:00:00 2001 From: Josuah Demangeon Date: Fri, 18 Aug 2023 11:06:31 +0200 Subject: [PATCH] tools/litex_json2dts_zephyr: add mapped SPI flash for XIP support This allows to execute a firmware loaded in the SPI flash. No support for partitions yet: this does not yet support cohabitating the bitstream and firmware yet, so the bitstream has to be loaded to CRAM directly for now (default for --load). This allows loading larger Zephyr examples, and was required to fit the shell on the Crosslink-NX board. See https://github.com/litex-hub/zephyr-on-litex-vexriscv/pull/13 --- litex/tools/litex_json2dts_zephyr.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/litex/tools/litex_json2dts_zephyr.py b/litex/tools/litex_json2dts_zephyr.py index 485fe9aefa..89543f9a9e 100755 --- a/litex/tools/litex_json2dts_zephyr.py +++ b/litex/tools/litex_json2dts_zephyr.py @@ -207,11 +207,6 @@ def peripheral_handler(name, parm, csr): 'alias': 'eth0', 'config_entry': 'ETH_LITEETH' }, - 'spiflash': { - 'handler': peripheral_handler, - 'alias': 'spi0', - 'config_entry': 'SPI_LITESPI' - }, 'sdcard_block2mem': { 'handler': peripheral_handler, 'alias': 'sdcard_block2mem', @@ -263,6 +258,11 @@ def peripheral_handler(name, parm, csr): 'handler': ram_handler, 'alias': 'ram0', }, + 'spiflash': { + 'handler': ram_handler, + 'alias': 'flash0', + 'config_entry': 'XIP' + }, 'identifier_mem': { 'handler': peripheral_handler, 'alias': 'dna0',