diff --git a/components/drivers/Kconfig b/components/drivers/Kconfig index 94af3524102bafc951b6f124dfa489db50e39e22..8c54fff033b6a5bbc12e2282743a4f9a36c73e00 100755 --- a/components/drivers/Kconfig +++ b/components/drivers/Kconfig @@ -185,6 +185,10 @@ config RT_USING_SPI config RT_SFUD_USING_FLASH_INFO_TABLE bool "Using defined supported flash chip information table" default y + + config RT_SFUD_USING_QSPI + bool "Using QSPI mode support" + default n config RT_DEBUG_SFUD bool "Show more SFUD debug information" diff --git a/components/drivers/include/drivers/spi.h b/components/drivers/include/drivers/spi.h index 7394710581aebcbf7c5829d1b7cf213e1903eeb3..04a65421a53cada4a3227e8f6a8f343f76452598 100644 --- a/components/drivers/include/drivers/spi.h +++ b/components/drivers/include/drivers/spi.h @@ -144,8 +144,8 @@ struct rt_qspi_configuration rt_uint32_t medium_size; /* double data rate mode */ rt_uint8_t ddr_mode; - /* the number of lines connected to the hardware */ - rt_uint8_t qspi_hw_lines; + /* the data lines max width which QSPI bus supported, such as 1, 2, 4 */ + rt_uint8_t qspi_dl_width ; }; struct rt_qspi_device diff --git a/components/drivers/spi/SConscript b/components/drivers/spi/SConscript index ee423c33db428305c8dae0cd1684e9f330630115..0343fb8d1354b29361d107fe2a7fa4510a289882 100644 --- a/components/drivers/spi/SConscript +++ b/components/drivers/spi/SConscript @@ -2,7 +2,7 @@ from building import * import rtconfig cwd = GetCurrentDir() -src = ['spi_core.c', 'spi_dev.c'] +src = ['spi_core.c', 'spi_dev.c', 'qspi_core.c'] CPPPATH = [cwd, cwd + '/../include'] LOCAL_CCFLAGS = '' diff --git a/components/drivers/spi/qspi_core.c b/components/drivers/spi/qspi_core.c index 7676764b59465b92e854d09fe878d67d3600725c..c9ff6a963799a9b179d907236fb044029f20b843 100644 --- a/components/drivers/spi/qspi_core.c +++ b/components/drivers/spi/qspi_core.c @@ -25,7 +25,7 @@ rt_err_t rt_qspi_configure(struct rt_qspi_device *device, struct rt_qspi_configu qspi_device->config.parent.reserved = cfg->parent.reserved; qspi_device->config.medium_size = cfg->medium_size; qspi_device->config.ddr_mode = cfg->ddr_mode; - qspi_device->config.qspi_hw_lines = cfg->qspi_hw_lines; + qspi_device->config.qspi_dl_width = cfg->qspi_dl_width; result = rt_spi_configure(&device->parent, &cfg->parent);