Commit graph

15 commits

Author SHA1 Message Date
Daniel DeGrasse
54eb607392 drivers: disk: usdhc: enable pinctrl for usdhc driver
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>
2022-03-25 15:47:54 -05:00
Nazar Kazakov
9713f0d47c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-14 20:22:24 -04:00
Daniel DeGrasse
419dc385f2 drivers: usdhc: Add log for DAT3 detection
Add log to tell user when DAT3 detection method is in use

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-02-02 16:59:30 +01:00
Daniel DeGrasse
1328abe052 drivers: disk: USDHC: Update USDHC driver to pass disk test
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>
2021-12-13 20:30:06 -05:00
Daniel DeGrasse
57f35bbf5a drivers: USDHC: Enable detection using DAT3 pulldown
Enable USDHC host to detect inserted SD card via DAT3 line pulldown.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-12-06 15:27:25 -05:00
Daniel DeGrasse
4712913872 drivers: USDHC: Update USDHC driver for RT11xx SOCs
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>
2021-12-06 15:27:25 -05:00
Mahesh Mahadevan
a90c4c38a1 drivers: disk: Fix USDHC driver to return 0 on success
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>
2021-09-17 08:12:22 -04:00
Mahesh Mahadevan
387e6a676f drivers: disk: Update NXP USDHC driver
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>
2021-08-17 17:53:31 -04:00
Gerard Marull-Paretas
374d46c235 drivers: disk: remove usage of device_pm_control_nop
device_pm_control_nop is now deprecated in favour of NULL.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 16:41:29 -04:00
Frank Li
42333dc282 driver: usdhc: add option to disable 1.8v
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>
2021-04-19 08:25:55 -05:00
Frank Li
6f97f52f34 driver: usdhc: modify LOG message
LOG API will auto add \r\n at output end,
remove the \r\n at the end of debug messge.

Fix misspelled.

Signed-off-by: Frank Li <lgl88911@163.com>
2021-04-06 08:13:24 -05:00
Frank Li
664aaf0bdc driver: usdhc: fix spec 1.0 sdcard can't work
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>
2021-04-06 08:13:24 -05:00
Johann Fischer
45d468bfdb include: move disk driver interface to own header
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>
2021-03-23 12:16:01 +01:00
Johann Fischer
69a5f07d16 drivers: disk: cleanup after driver relocation
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>
2021-03-23 12:16:01 +01:00
Johann Fischer
03101e75d8 disk: move disk and sdmmc controller drivers to drivers/disk
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>
2021-03-23 12:16:01 +01:00
Renamed from subsys/disk/disk_access_usdhc.c (Browse further)