soc/add_spi_flash: fix bios 1x mode support
require both phy and flash support to enable QUAD/QPI capability. Many flash devices support 4x read but may be on a 1x phy
This commit is contained in:
parent
4dae3a9f4d
commit
08189663ba
|
@ -1909,10 +1909,11 @@ class LiteXSoC(SoC):
|
|||
self.add_constant(f"{name}_MODULE_NAME", module.name.upper())
|
||||
self.add_constant(f"{name}_MODULE_TOTAL_SIZE", module.total_size)
|
||||
self.add_constant(f"{name}_MODULE_PAGE_SIZE", module.page_size)
|
||||
if SpiNorFlashOpCodes.READ_1_1_4 in module.supported_opcodes:
|
||||
self.add_constant(f"{name}_MODULE_QUAD_CAPABLE")
|
||||
if SpiNorFlashOpCodes.READ_4_4_4 in module.supported_opcodes:
|
||||
self.add_constant(f"{name}_MODULE_QPI_CAPABLE")
|
||||
if mode in [ "4x" ]:
|
||||
if SpiNorFlashOpCodes.READ_1_1_4 in module.supported_opcodes:
|
||||
self.add_constant(f"{name}_MODULE_QUAD_CAPABLE")
|
||||
if SpiNorFlashOpCodes.READ_4_4_4 in module.supported_opcodes:
|
||||
self.add_constant(f"{name}_MODULE_QPI_CAPABLE")
|
||||
if software_debug:
|
||||
self.add_constant(f"{name}_DEBUG")
|
||||
|
||||
|
|
Loading…
Reference in New Issue