File tree Expand file tree Collapse file tree 5 files changed +577
-0
lines changed Expand file tree Collapse file tree 5 files changed +577
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ zephyr_library_sources_ifdef(CONFIG_USERSPACE flash_handlers.c)
27
27
zephyr_library_sources_ifdef (CONFIG_FLASH_ADI_MAX32_SPIXF flash_max32_spixf_nor.c )
28
28
zephyr_library_sources_ifdef (CONFIG_FLASH_AMBIQ flash_ambiq.c )
29
29
zephyr_library_sources_ifdef (CONFIG_FLASH_ANDES_QSPI flash_andes_qspi.c )
30
+ zephyr_library_sources_ifdef (CONFIG_FLASH_ANDES_QSPI_XIP flash_andes_qspi_xip.c )
30
31
zephyr_library_sources_ifdef (CONFIG_FLASH_CAD_QSPI_NOR flash_cadence_qspi_nor.c flash_cadence_qspi_nor_ll.c )
31
32
zephyr_library_sources_ifdef (CONFIG_FLASH_CDNS_NAND flash_cadence_nand.c flash_cadence_nand_ll.c )
32
33
zephyr_library_sources_ifdef (CONFIG_FLASH_INFINEON_CAT1 flash_ifx_cat1.c )
@@ -166,3 +167,6 @@ if(CONFIG_SOC_FLASH_RENESAS_RA_HP)
166
167
zephyr_library_sources (soc_flash_renesas_ra_hp.c )
167
168
zephyr_library_sources_ifdef (CONFIG_FLASH_EX_OP_ENABLED soc_flash_renesas_ra_hp_ex_op.c )
168
169
endif ()
170
+
171
+ # Do not use prologue and epilogue code that uses library function calls
172
+ zephyr_library_compile_options_ifdef (CONFIG_FLASH_ANDES_QSPI_XIP -mno-save-restore )
Original file line number Diff line number Diff line change @@ -39,6 +39,27 @@ config FLASH_ANDES_QSPI_SFDP_RUNTIME
39
39
40
40
endchoice
41
41
42
+ endif
43
+
44
+ config FLASH_ANDES_QSPI_XIP
45
+ bool "Andes FLASH driver for XIP chip"
46
+ default y
47
+ depends on DT_HAS_ANDESTECH_QSPI_NOR_XIP_ENABLED
48
+ select FLASH_HAS_PAGE_LAYOUT
49
+ select FLASH_HAS_DRIVER_ENABLED
50
+ select FLASH_HAS_EXPLICIT_ERASE
51
+ depends on XIP
52
+ depends on !SPI_NOR
53
+ depends on ARCH_HAS_RAMFUNC_SUPPORT
54
+ depends on !SMP
55
+ help
56
+ Enable minimalistic driver for Andes QSPI that can be used with a
57
+ flash chip that is used for XIP execution. The driver places necessary
58
+ code in RAM, because code can not be fetched from flash while
59
+ performing erase/write operations.
60
+
61
+ if FLASH_ANDES_QSPI || FLASH_ANDES_QSPI_XIP
62
+
42
63
config FLASH_ANDES_QSPI_INIT_PRIORITY
43
64
int
44
65
default 80
@@ -56,3 +77,12 @@ config FLASH_ANDES_QSPI_LAYOUT_PAGE_SIZE
56
77
sector size.
57
78
58
79
endif
80
+
81
+ if FLASH_ANDES_QSPI_XIP
82
+
83
+ config FLASH_ANDES_QSPI_XIP_COUNT_REGS
84
+ bool "Use separated write/read count registers"
85
+ help
86
+ The Andes qspi module has separated write/read count registers.
87
+
88
+ endif
Original file line number Diff line number Diff line change 46
46
#define TFMAT_SLVMODE_MSK BIT(2)
47
47
#define TFMAT_DATA_MERGE_MSK BIT(7)
48
48
#define TFMAT_DATA_LEN_MSK GENMASK(12, 8)
49
+ #define TFMAT_ADDR_LEN_MSK GENMASK(17, 16)
49
50
50
51
/* Field mask of SPI transfer control register */
51
52
#define TCTRL_RD_TCNT_OFFSET (0)
You can’t perform that action at this time.
0 commit comments