From 42b3b1fadfdf79121f661bfe87689cdc4a659791 Mon Sep 17 00:00:00 2001 From: Monish Chunara Date: Thu, 3 Dec 2026 17:04:57 +0530 Subject: [PATCH] FROMLIST: arm64: dts: qcom: lemans: Add SDHCI support for SD card via overlay Enable the SDHCI controller for SD card on the LeMans Draco EVK using a device tree overlay. Add the fixed vmmc supply, the GPIO-controlled vqmmc supply that switches between 1.8V and 2.95V, and the card-detect and SD mode pin configuration. As on the LeMans EVK, the SoC has a single SDHC instance that can be routed to either the SD card slot or eMMC, so storage support is kept in overlays rather than the base board DT. An eMMC overlay will be added once hardware with eMMC populated is available. Link: https://lore.kernel.org/all/20261203111625.1526521-1-monish.chunara@oss.qualcomm.com/ Signed-off-by: Monish Chunara --- arch/arm64/boot/dts/qcom/Makefile | 3 + .../dts/qcom/lemans-draco-evk-sd-card.dtso | 58 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/lemans-draco-evk-sd-card.dtso diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 0bb6b675b8c07..ed3005fec1328 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -633,6 +633,9 @@ dtb-$(CONFIG_ARCH_QCOM) += lemans-draco-evk-raspberrypi-dsi-7inch.dtbo dtb-$(CONFIG_ARCH_QCOM) += lemans-draco-evk-waveshare-dsi-8inch.dtb dtb-$(CONFIG_ARCH_QCOM) += lemans-draco-evk-waveshare-dsi-8inch.dtbo +lemans-draco-evk-sd-card-dtbs := lemans-draco-evk.dtb lemans-draco-evk-sd-card.dtbo +dtb-$(CONFIG_ARCH_QCOM) += lemans-draco-evk-sd-card.dtb + dtb-$(CONFIG_ARCH_QCOM) += lemans-evk-staging.dtbo dtb-$(CONFIG_ARCH_QCOM) += lemans-staging.dtbo diff --git a/arch/arm64/boot/dts/qcom/lemans-draco-evk-sd-card.dtso b/arch/arm64/boot/dts/qcom/lemans-draco-evk-sd-card.dtso new file mode 100644 index 0000000000000..24fe94530996f --- /dev/null +++ b/arch/arm64/boot/dts/qcom/lemans-draco-evk-sd-card.dtso @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +/dts-v1/; +/plugin/; + +#include + +&{/} { + vmmc_sdc: regulator-vmmc-sdc { + compatible = "regulator-fixed"; + regulator-name = "vmmc_sdc"; + + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + }; + + vreg_sdc: regulator-vreg-sdc { + compatible = "regulator-gpio"; + + regulator-name = "vreg_sdc"; + regulator-type = "voltage"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + + gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; + states = <1800000 1>, <2950000 0>; + + startup-delay-us = <100>; + }; +}; + +&tlmm { + sd_cd: sd-cd-state { + pins = "gpio59"; + function = "gpio"; + bias-pull-up; + }; +}; + +&sdhc { + vmmc-supply = <&vmmc_sdc>; + vqmmc-supply = <&vreg_sdc>; + + pinctrl-0 = <&sdc_default>, <&sd_cd>; + pinctrl-1 = <&sdc_sleep>, <&sd_cd>; + pinctrl-names = "default", "sleep"; + + bus-width = <4>; + cd-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>; + no-mmc; + no-sdio; + + status = "okay"; +}; +