diff mbox series

[v2,2/2] imx: kontron-sl-mx8mm: Enable PCA9450 regulator driver and fix SD card access

Message ID 20220627110100.130033-2-frieder@fris.de
State Accepted
Commit 1af2d4697a3b229e84901d2bdd4ffba0eb2217de
Delegated to: Stefano Babic
Headers show
Series [v2,1/2] pmic: pca9450: Add optional SD_VSEL GPIO for LDO5 | expand

Commit Message

Frieder Schrempf June 27, 2022, 11 a.m. UTC
From: Frieder Schrempf <frieder.schrempf@kontron.de>

Currently accessing the SD card on USDHC2 fails with:

=> mmc dev 1
Card did not respond to voltage select! : -110

This is due to the fact that UHS modes are enabled in the defconfig
and the devicetree, but the referenced LDO5 regulator (reg_nvcc_sd)
is not available to switch the data lines from 3.3V to 1.8V mode.

By enabling the regulator driver the vqmmc-supply is now available
and the SD card works also in high speed modes:

=> mmc dev 1
switch to partitions #0, OK
mmc1 is current device

Please note that the board has a GPIO connected to the SD_VSEL signal
of the PMIC. As the driver uses the LDO5CTRL_H register to set the
voltage, we need to make sure that this GPIO (GPIO01_IO4) is set to
a high level.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
---
Changes in v2:
  * Add Fabio's R-b (Thanks!)
---
 configs/kontron-sl-mx8mm_defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Fabio Estevam June 28, 2022, 10:51 a.m. UTC | #1
On Mon, Jun 27, 2022 at 8:01 AM Frieder Schrempf <frieder@fris.de> wrote:
>
> From: Frieder Schrempf <frieder.schrempf@kontron.de>
>
> Currently accessing the SD card on USDHC2 fails with:
>
> => mmc dev 1
> Card did not respond to voltage select! : -110
>
> This is due to the fact that UHS modes are enabled in the defconfig
> and the devicetree, but the referenced LDO5 regulator (reg_nvcc_sd)
> is not available to switch the data lines from 3.3V to 1.8V mode.
>
> By enabling the regulator driver the vqmmc-supply is now available
> and the SD card works also in high speed modes:
>
> => mmc dev 1
> switch to partitions #0, OK
> mmc1 is current device
>
> Please note that the board has a GPIO connected to the SD_VSEL signal
> of the PMIC. As the driver uses the LDO5CTRL_H register to set the
> voltage, we need to make sure that this GPIO (GPIO01_IO4) is set to
> a high level.
>
> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> Reviewed-by: Fabio Estevam <festevam@denx.de>

Tested-by: Fabio Estevam <festevam@denx.de>
diff mbox series

Patch

diff --git a/configs/kontron-sl-mx8mm_defconfig b/configs/kontron-sl-mx8mm_defconfig
index 2e9d52522b2..727f99f0063 100644
--- a/configs/kontron-sl-mx8mm_defconfig
+++ b/configs/kontron-sl-mx8mm_defconfig
@@ -99,6 +99,7 @@  CONFIG_DM_PMIC=y
 CONFIG_DM_PMIC_PCA9450=y
 CONFIG_SPL_DM_PMIC_PCA9450=y
 CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_PCA9450=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_RV8803=y
 CONFIG_CONS_INDEX=2