In order to bring consistency in-tree, migrate all drivers to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
remove existing SDMMC SPI driver, since it is replaced by the SPI mode
SD host controller driver.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
all in tree SOCs with the USDHC peripheral have now been converted to
use the new SD host controller USDHC driver, so remove legacy NXP disk
USDHC driver.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Even if not used DMA HAL is required in F4 SD HAL driver. Just
as for L4/F7 series that have been added before.
Add it for this specific serie.
Signed-off-by: John Kjellberg <kjellberg.john@gmail.com>
Enable pinctrl driver for usdhc. USDHC driver uses custom pinctrl states
for fast, slow, and medium signal frequencies, as well as pin pull for
SD detection.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The PINCTRL_DT_(INST_)DEFINE macros already defined the trailing ;,
making its usage inconsistent with other macros such as
DEVICE_DT_DEFINE.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add checks for the upper boundary in access_read/access_write
instead of the homeopathic ASSERTS.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
USDHC driver did not pass disk test (failed during multiple writes). Add
logic to wait for the SD card to be idle before reading new data, so
that the test will pass. Also, add logic to reject OOB reads and writes
to the disk.
Fixes#39942
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
RT11xx USDHC lacks some watermarking features that RT10xx SOCs include.
Place #ifdef guards around these features.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Even if not used DMA HAL is required in L4/F7 SD HAL driver.
Add them for these specific series.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
During SDMMC card init, HW_FC is disabled by default, overwriting
driver configuration.
To avoid this, move HW FC configuration after card init.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add a Kconfig symbol to enable use of SDMMC hardware flow control.
In specific cases, this feature could help to avoid FIFO ovderrun
and underrun errors.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The function usdhc_board_access_init was returning a non-zero
value as the variable "ret" is also used to store the GPIO
level for card-detect.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
1. Do not throw an error when FSL_FEATURE_USDHC_HAS_HS400_MODE
is defined
2. Add support for the case when the card detect is handled
by the USDHC module
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Instead of putting object files inside libzephyr.a,
simply build a separate static library as most other
driver types are doing this already.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Since we removed various series headers, move stm32 driver
under main driver/pinmux folder.
Take this change into account into various drivers.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
When 1.8V is disabled, sdhc can only
communicate at low speed. But this can
save the external circuit for switching
between 3.3V and 1.8V, which is very
practical in costdown scenarios.
Signed-off-by: Frank Li <lgl88911@163.com>
The SD Card below Physical Layer 1.10 does not support CMD6.
When usdhc_sd_init is executed, it will fail to exit due to
execution of CMD6, causing the SD Card to not work normally.
For different SD Card Physical Layer specifications,
the following modifications have been made:
Version 1.10 and above support CMD6.
Version 3.0 and above support CMD6 Group 3 (driver strength
and current limit) .
Signed-off-by: Frank Li <lgl88911@163.com>
This patch removes scenario which was testing deprecated
API behaviors. Needed as As flash_write_protection_set() was
deprecated and became no-operation.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
The "spi-max-frequency" property already exists, but was unused. This
now sets the SPI clock frequency to this value (limited to 24MHz) once
initialisation is complete.
Due to the nature of the SPI API, it is necessary to have two separate
configuration structures to switch clock speed as some SPI drivers only
compare pointers to detect changes.
Fixes: #32996
Signed-off-by: Rich Barlow <rich@bennellick.com>
Move disk driver interface to own header and
separate disk access interface and disk driver interface.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add common SDMMC_LOG_LEVEL and SDMMC_VOLUME_NAME.
Initialize drivers at POST_KERNEL level.
Update CODEOWNERS after sdmmc drivers relocation.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The files disk_access_usdhc.c, disk_access_spi_sdhc.c,
disk_access_stm32_sdmmc.c, disk_access_ram.c and
disk_access_flash.c are actually drivers for block devices and SD/MMC
controllers. This patch moves this drivers to drivers/disk and
reworks the configuration so that the drivers are selected when
the corresponding node is enabled.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>