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,6 +1909,7 @@ class LiteXSoC(SoC):
|
||||||
self.add_constant(f"{name}_MODULE_NAME", module.name.upper())
|
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_TOTAL_SIZE", module.total_size)
|
||||||
self.add_constant(f"{name}_MODULE_PAGE_SIZE", module.page_size)
|
self.add_constant(f"{name}_MODULE_PAGE_SIZE", module.page_size)
|
||||||
|
if mode in [ "4x" ]:
|
||||||
if SpiNorFlashOpCodes.READ_1_1_4 in module.supported_opcodes:
|
if SpiNorFlashOpCodes.READ_1_1_4 in module.supported_opcodes:
|
||||||
self.add_constant(f"{name}_MODULE_QUAD_CAPABLE")
|
self.add_constant(f"{name}_MODULE_QUAD_CAPABLE")
|
||||||
if SpiNorFlashOpCodes.READ_4_4_4 in module.supported_opcodes:
|
if SpiNorFlashOpCodes.READ_4_4_4 in module.supported_opcodes:
|
||||||
|
|
Loading…
Reference in New Issue