Commit graph

101 commits

Author SHA1 Message Date
Anas Nashif
303af992e5 style: fix 'if (' usage in cmake files
Replace with 'if(' and 'else(' per the cmake style guidelines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-29 11:44:13 +02:00
Fan Wang
ca3b80cf5b drivers: sdhc: Support SD Card for Apollo510
This commit support SD Card for Apollo510 SDIO

Signed-off-by: Fan Wang <fan.wang@ambiq.com>
2025-10-25 10:47:28 +03:00
Fan Wang
adb6461d8a drivers: sdhc: optimize cache related coding
Add buf_in_nocache to check buffer cacheability.

Signed-off-by: Fan Wang <fan.wang@ambiq.com>
2025-10-25 10:47:28 +03:00
Fan Wang
d770690176 drivers: sdhc:Updated sdhc driver for apollo510&apollo510L
Deleted PM device macro definition

Updated SDIO base for apollo510 and apollo510L

Signed-off-by: Fan Wang <fan.wang@ambiq.com>
2025-10-25 10:47:28 +03:00
Guillaume Gautier
004c613e25 drivers: stm32: replace MODIFY_REG HAL macro by stm32_reg_modify_bits
For all STM32 drivers and SoC, replace the MODIFY_REG macro (defined in
the STM32 HAL) by stm32_reg_modify_bits defined in Zephyr.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 08:58:25 -07:00
Daniel DeGrasse
79bfd9525e drivers: sdhc: mcux_sdif: report 4 bit bus support
SDIF peripheral supports 4 bit bus width, report this correctly

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-10-06 20:00:29 +03:00
Declan Snyder
570b445a61 drivers: Convert to use SPI macro without delay parameters
Convert all drivers and other consumers to use SPI macros without the
delay parameters.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-01 14:39:36 +03:00
Fin Maaß
34039c90b8 drivers: sdhc: stm32: add forgotten if around options
add forgotten if around Kconfig options.
This applied the default of 32 to all
CONFIG_SDHC_BUFFER_ALIGNMENT.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-23 12:11:53 -04:00
Quy Tran
77d02aa1f9 drivers: sdhc: Update timeout unit to us for event wait
r_sdhi_wait_for_event requires input timeout as us but the current
implemetation using timeout_ms instead

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2025-09-20 11:10:24 +02:00
CHEN Xing
3a6ae2b01c driver: sdhc: add sdmmc for sama7g5
Add driver for sama7g54 Secure Digital MultiMedia Card Controller

Signed-off-by: CHEN Xing <xing.chen@microchip.com>
2025-09-17 19:12:45 -04:00
Khoa Nguyen
db981f65e9 drivers: Add assign event for current core for all Renesas drivers
Add assign event for current core for all Renesas drivers

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-09-11 09:53:13 +02:00
Bas van Loon
8d417a31a2 drivers: sdhc: imx_usdhc: Add more verbose error reporting.
When USDHC_Reset fails, we should be more verbose about it failing. Add
the error prints here so that we can observe the failure in logs.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2025-09-04 08:10:40 +02:00
Bas van Loon
04d40ecc68 drivers: sdhc: imx_usdhc: Fix USDHC_Reset reset type.
Probably a C/P error. This error was leading to reset timeouts as the
wrong mask is being used.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2025-09-04 08:10:40 +02:00
Benjamin Cabé
0132ea07fb doc: fix spelling errors tree-wide
fix some spelling errors in code comments and Kconfig helps

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 17:04:13 +02:00
Benjamin Cabé
89fef8aa6d doc: correct the spelling of "comparison"
s/comparision/comparison/

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 17:04:13 +02:00
Alain Volmat
fd5dd5e04f drivers: sdhc: stm32: add select PINCTRL
stm32 sdhc driver is relying on the pinctrl framework
hence select CONFIG_PINCTRL to ensure proper build.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-18 17:49:28 +02:00
Sara Touqan
477d749b39 drivers: sdhc: Support SDHC SDIO driver for STM32
This commit introduces support for the SDHC driver on STM32, enabling
functionality APIs for SDHC host controllers.

Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2025-07-29 22:56:24 -04:00
Pisit Sawangvonganan
b8a8173c1f drivers: kconfig: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in `Kconfig` files within the `drivers` directory.
Additionally, incorporates a fix recommended by the reviewer.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-07-01 10:58:54 -10:00
Pieter De Gendt
6c6d3523ca drivers: sdhc: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Benjamin Cabé
dcec4ee653 driver: sdhc: fix typo in SAM4E hsmci driver
Fix parameter name (HSMCI -> hsmci)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:12:17 +02:00
Khoa Nguyen
463f518192 drivers: Update dtc transfer info alignment
Update dtc transfer info alignment for Renesas drivers

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-05-30 10:26:34 +02:00
Jiafei Pan
51e0fcf80c drivers: sdhc: imx_usdhc: enable MMIO mapping
Enable MMIO mapping in the driver.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-05-12 16:47:49 +02:00
Jiafei Pan
819125f726 drivers: sdhc: imx_usdhc: run clang-format on the driver
Format the driver by using clang-format.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-05-12 16:47:49 +02:00
Paul Alvin
327c78ec0a drivers: sdhc: Add driver support for xlnx SDHC
Add driver support for xlnx SD/EMMC host controller. The driver
currently support SD host controller version 3.0 and EMMC host
controller version 5.1. This driver functions with the SDHC subsystem to
perform operations on device.

Driver support both interrupt and polled mode data transfer. Uses ADMA2
to perform data transfer.

Signed-off-by: Paul Alvin <alvin.paulp@amd.com>
2025-04-28 12:56:50 -05:00
Pieter De Gendt
7b1d748e8b drivers: Wrap device driver APIs using DEVICE_API macro
Put the device APIs in their respective linker sections with the
DEVICE_API wrapper macro.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-04-28 13:41:03 +02:00
Hao Luo
6f4b92d64d soc: ambiq: Optimize the inclusion relationship of header files
Optimized the inclusion relationship of header files

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-17 09:06:18 +02:00
Darren Lu
129ccf981c drivers: sdhc: add sdhc driver for Ambiq MCU
Add SDHC/SDIO driver support for Ambiq Apollo4 MCU.

Signed-off-by: Darren Lu <dlu@ambiq.com>
2025-04-11 06:33:24 +02:00
Khoa Nguyen
c768144002 drivers: Correct value of event macro for all Renesas SoC
Since the RA2L1 uses the macro "ICU_EVENT" instead of
"ELC_EVENT" (which is currently used) to input into
the IELSR register, the ek_ra2l1 board cannot assign
any interrupts for any driver.

This commit aim to correct the Event macro to input correct
value for IELSR register on all the Renesas SoC by using
"BSP_PRV_IELS_ENUM" macro.

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-02-28 18:29:17 +01:00
Benjamin Cabé
ff9fd96036 drivers: fix spelling of "transfer"
s/trasnfer/transfer/

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-21 11:41:46 +00:00
Benjamin Cabé
67633f8df5 drivers: sdhc: fix spelling of "programing"
s/programing/programming/

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-19 18:51:13 +01:00
Jordan Yates
30f88d8bf5 sdhc: sdhc_spi: additional SPI PM calls
`sdhc_spi_card_busy` requires additional PM calls to ensure the bus is
enabled in the API call.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-02-17 21:03:47 +01:00
Mert Ekren
b11b640571 drivers: sdhc: Add MAX32666 SDHC driver
This commit adds MAX32666 SDHC driver.

Co-Authored-By: Anil Kara <Anil.Kara@analog.com>
Co-Authored-By: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2025-02-14 20:20:03 +01:00
Egill Sigurdur
18acd4ce40 drivers: sdhc: Fix acronym expansion for SD Host Controller in Kconfig
Fixes an issue in which "SDHC" had been incorrectly expanded to
"Secure Digital High Capacity" instead of "SD Host Controller".

Signed-off-by: Egill Sigurdur <egill@egill.xyz>
2025-02-14 19:14:21 +00:00
Thomas Stranger
3652918f5e drivers: sdhc: fix infineon cat1 gpio initialization
Initialize the cyhal_sdio_config, such that the init
function won't do the pin configuration.
The gpios are setup using the zephyr pinctrl driver already.

Before the latest hal update the values were ignored and
the gpio configuration completely skipped.
But this is no longer the case and this commit
fixes that by setting the gpio pins to nc,

Also, explicitly set sdio_config.clock to NULL, to make
it clearer that the driver will check for that.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2025-01-29 07:08:58 +01:00
Thomas Stranger
b0583fc9e5 drivers: sdhc: fix infineon cat1 resource type initialization
The driver should use resource type SDHC not SDIODEV.

In a older HAL version the value was not used as parameter
for clock initialization so it didn't matter, but breaks
the initialization of the driver with the latest hal.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2025-01-29 07:08:58 +01:00
Tran Van Quy
8f91d0c072 drivers: sdhc: support SDHC driver on Renesas RA8
This is initial commit to support SDHC driver on Renesas RA8
with r_sdhi modules

Signed-off-by: Tran Van Quy <quy.tran.pz@renesas.com>
2024-12-25 06:33:12 +01:00
Jordan Yates
a1ad0ad6c6 sdhc: spi: wait for VDD stable before clocking
The SD physical layer specification requires that the operating supply
be stable for at least 1 millisecond before providing the required 74
clocks. The maximum VDD ramp time is specified at 35ms, giving a total
minimum delay of 36ms.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-12-11 07:58:17 +01:00
Jordan Yates
a16bfb39ff sdhc: spi: power card before 74 clock signals
Power on the SD card before sending the required 74 clock signals.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-12-11 07:58:17 +01:00
Pieter De Gendt
c4fbec2377 drivers: sdhc: Place API into iterable section
Add wrapper DEVICE_API macro to all sdhc_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 23:04:22 +01:00
Aymeric Aillet
d41ce536c5 drivers: rcar: Select CONFIG_PINCTRL
Select PINCTRL for drivers: pwm, sdhc, serial

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2024-11-22 17:41:02 +01:00
Gerson Fernando Budke
0cc8f93e8a soc: atmel: Drop PINCTRL from Kconfig.defconfig
This Kconfig has wrongly been added to defconfig files. It is not the
right place for it. It has never been the right place for it. Drivers
that need it should select the symbol in their Kconfig entries. Drop
PINCTL from Kconfig.defconfig and add proper select at Kconfig.sam*.

Fixes #78619

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-11-04 13:43:26 -06:00
Bill Waters
eb19d32588 drivers: Remove CONFIG_PINCTRL in defconfig files
The CONFIG_PINCTRL setting is removed from the board
_defconfig files.  And "select PINCTRL" is added to
the appropriate driver files.

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2024-09-23 18:08:14 -04:00
Sylvio Alves
0aec059630 drivers: sdhc: esp32: remove unused code
Removed unused entry in SDHC driver and initialize
variables accordingly.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-16 20:18:33 +02:00
Raffael Rostagno
90c6106926 drivers: esp32: Interrupts flags configuration
Allows configuring interrupts flags in the device tree for
ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
0b3a34cdca drivers: esp32: Interrupts priority configuration
Allows configuring interrupts priority in the device tree for
ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Daniel DeGrasse
17f71e19f0 drivers: sdhc: imx_usdhc: assume card is present if no detection method
The imx USDHC driver previously queried the peripheral's internal card
detect signal to check card presence if no card detect method was
configured. However, some boards do not route the card detect signal and
do not work correctly with the DAT3 detection method supported by this
peripheral. As a fallback, assume the card is present in the slot but
log a warning to the user.

Fixes #42227

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-22 14:19:37 -04:00
Jordan Yates
b3a4b15e4b sdhc: sdhc_spi: handle PM on SPI bus
Handle SPI buses that have device runtime PM enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-21 18:26:37 +01:00
Jordan Yates
cc84a87e4b sdhc: sdhc_spi: log message on power state change
Add a basic log message when power is applied or removed from the SDHC
card.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-20 19:42:37 -04:00
Pisit Sawangvonganan
1bcae0ea9f style: drivers: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Raffael Rostagno
847832d8f7 sdhc: esp32: Register writing macros cleanup
Macros to write specific peripheral registers were removed as a
compile flag was added to hal_espressif requesting struct bitfields
to have strict volatile access (thus 32-bit access), allowing for
the cleanup.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-17 08:55:37 -04:00