bdk: sdmmc: properly identify sdmmc1 clk config

Remove schmitt trigger config from clock pin on sdmmc1 for identifying previous pinmuxing state.
This commit is contained in:
CTCaer 2023-03-31 08:27:48 +03:00
parent b123571c56
commit 29e32f09fb

View file

@ -1164,6 +1164,7 @@ static int _sdmmc_config_sdmmc1(bool t210b01)
APB_MISC(APB_MISC_GP_SDMMC1_CLK_LPBK_CONTROL) = 1;
// Configure SDMMC1 CLK pinmux, based on state and SoC type.
PINMUX_AUX(PINMUX_AUX_SDMMC1_CLK) &= ~PINMUX_SCHMT;
if (PINMUX_AUX(PINMUX_AUX_SDMMC1_CLK) != (PINMUX_DRIVE_2X | PINMUX_INPUT_ENABLE | PINMUX_PULL_DOWN)) // Check if CLK pad is already configured.
PINMUX_AUX(PINMUX_AUX_SDMMC1_CLK) = PINMUX_DRIVE_2X | PINMUX_INPUT_ENABLE | (t210b01 ? PINMUX_PULL_NONE : PINMUX_PULL_DOWN);