From 5b3496fb7be86a22b6dc54e0414d676987a89eca Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 1 Mar 2023 14:28:35 +0900 Subject: [PATCH] boards: spresense: Add configuration for eMMC power control Update Kconfig to add eMMC power pin selection. --- boards/arm/cxd56xx/spresense/Kconfig | 15 +++++++++++++++ boards/arm/cxd56xx/spresense/include/board.h | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/boards/arm/cxd56xx/spresense/Kconfig b/boards/arm/cxd56xx/spresense/Kconfig index fc0fe123a1..0e9e415470 100644 --- a/boards/arm/cxd56xx/spresense/Kconfig +++ b/boards/arm/cxd56xx/spresense/Kconfig @@ -809,4 +809,19 @@ config CXD56_SDCARD_AUTOMOUNT_UDELAY endif # CXD56_SDCARD_AUTOMOUNT +choice + prompt "eMMC Power Pin selection" + default CXD56_EMMC_POWER_PIN_NONE + +config CXD56_EMMC_POWER_PIN_NONE + bool "None" + +config CXD56_EMMC_POWER_PIN_I2S0_BCK + bool "Use PIN I2S0_BCK" + +config CXD56_EMMC_POWER_PIN_UART2_CTS + bool "Use PIN UART2_CTS" + +endchoice + endif diff --git a/boards/arm/cxd56xx/spresense/include/board.h b/boards/arm/cxd56xx/spresense/include/board.h index aa385c46a0..e19782e6fe 100644 --- a/boards/arm/cxd56xx/spresense/include/board.h +++ b/boards/arm/cxd56xx/spresense/include/board.h @@ -201,7 +201,13 @@ enum board_power_device POWER_BTBLE = PMIC_NONE, POWER_SENSOR = PMIC_NONE, +#if defined(CONFIG_CXD56_EMMC_POWER_PIN_I2S0_BCK) + POWER_EMMC = CHIP_GPIO(PIN_I2S0_BCK), +#elif defined(CONFIG_CXD56_EMMC_POWER_PIN_UART2_CTS) + POWER_EMMC = CHIP_GPIO(PIN_UART2_CTS), +#else POWER_EMMC = PMIC_NONE, +#endif POWER_LTE = PMIC_GPO(2), };