Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: lemans: Add SDHCI support for SD card via overlay
@ 2026-12-03 11:16 Monish Chunara
  2026-12-04 23:14 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Monish Chunara @ 2026-12-03 11:16 UTC (permalink / raw)
  To: andersson, dmitry.baryshkov, konradybcio, robh, krzk+dt, conor+dt,
	mani
  Cc: linux-arm-msm, devicetree, linux-kernel, sarthak.garg,
	pradeep.pragallapati, nitin.rawat, shiraz.hashim, monish.chunara

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.

Signed-off-by: Monish Chunara <monish.chunara@oss.qualcomm.com>
---
This patch depends on the LeMans Draco EVK base support series:
https://lore.kernel.org/all/20261123-lemans-draco-final-changes-bringup-v4-0-dbfc15cd0883@oss.qualcomm.com/
---
 arch/arm64/boot/dts/qcom/Makefile             |  3 +
 .../dts/qcom/lemans-draco-evk-sd-card.dtso    | 57 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/lemans-draco-evk.dts |  1 +
 3 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 e34b6cd8409e..45257b32989d 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -72,6 +72,9 @@ lemans-draco-evk-el2-dtbs := lemans-draco-evk.dtb lemans-el2.dtbo
 
 dtb-$(CONFIG_ARCH_QCOM)	+= lemans-draco-evk-el2.dtb
 
+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
+
 lemans-evk-camera-csi1-imx577-dtbs	:= lemans-evk.dtb lemans-evk-camera-csi1-imx577.dtbo
 lemans-evk-camera-dtbs	:= lemans-evk.dtb lemans-evk-camera.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 000000000000..e81bc933df31
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/lemans-draco-evk-sd-card.dtso
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&{/} {
+	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";
+};
diff --git a/arch/arm64/boot/dts/qcom/lemans-draco-evk.dts b/arch/arm64/boot/dts/qcom/lemans-draco-evk.dts
index 00a0a4315bf3..14b8fdefd443 100644
--- a/arch/arm64/boot/dts/qcom/lemans-draco-evk.dts
+++ b/arch/arm64/boot/dts/qcom/lemans-draco-evk.dts
@@ -16,6 +16,7 @@ / {
 	aliases {
 		ethernet0 = &ethernet0;
 		ethernet1 = &ethernet1;
+		mmc1 = &sdhc;
 		serial1 = &uart17;
 	};
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm64: dts: qcom: lemans: Add SDHCI support for SD card via overlay
  2026-12-03 11:16 [PATCH] arm64: dts: qcom: lemans: Add SDHCI support for SD card via overlay Monish Chunara
@ 2026-12-04 23:14 ` Bjorn Andersson
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2026-12-04 23:14 UTC (permalink / raw)
  To: Monish Chunara
  Cc: dmitry.baryshkov, konradybcio, robh, krzk+dt, conor+dt, mani,
	linux-arm-msm, devicetree, linux-kernel, sarthak.garg,
	pradeep.pragallapati, nitin.rawat, shiraz.hashim

On Thu, Dec 03, 2026 at 04:46:25PM +0530, Monish Chunara wrote:
> 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.
> 

We use overlays for cases where you can plug in different daughter
cards or possibly where you have a dip-switch to select between two set
of hardware.

Your commit message doesn't indicate that your EVK is either one of
these - I'm guessing the EVK has a SD-card slot, and if so that should
be described in the dts.

Please fix your patch and/or commit message.

Thanks,
Bjorn

> Signed-off-by: Monish Chunara <monish.chunara@oss.qualcomm.com>
> ---
> This patch depends on the LeMans Draco EVK base support series:
> https://lore.kernel.org/all/20261123-lemans-draco-final-changes-bringup-v4-0-dbfc15cd0883@oss.qualcomm.com/
> ---
>  arch/arm64/boot/dts/qcom/Makefile             |  3 +
>  .../dts/qcom/lemans-draco-evk-sd-card.dtso    | 57 +++++++++++++++++++
>  arch/arm64/boot/dts/qcom/lemans-draco-evk.dts |  1 +
>  3 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 e34b6cd8409e..45257b32989d 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -72,6 +72,9 @@ lemans-draco-evk-el2-dtbs := lemans-draco-evk.dtb lemans-el2.dtbo
>  
>  dtb-$(CONFIG_ARCH_QCOM)	+= lemans-draco-evk-el2.dtb
>  
> +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
> +
>  lemans-evk-camera-csi1-imx577-dtbs	:= lemans-evk.dtb lemans-evk-camera-csi1-imx577.dtbo
>  lemans-evk-camera-dtbs	:= lemans-evk.dtb lemans-evk-camera.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 000000000000..e81bc933df31
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/lemans-draco-evk-sd-card.dtso
> @@ -0,0 +1,57 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +#include <dt-bindings/gpio/gpio.h>
> +
> +&{/} {
> +	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";
> +};
> diff --git a/arch/arm64/boot/dts/qcom/lemans-draco-evk.dts b/arch/arm64/boot/dts/qcom/lemans-draco-evk.dts
> index 00a0a4315bf3..14b8fdefd443 100644
> --- a/arch/arm64/boot/dts/qcom/lemans-draco-evk.dts
> +++ b/arch/arm64/boot/dts/qcom/lemans-draco-evk.dts
> @@ -16,6 +16,7 @@ / {
>  	aliases {
>  		ethernet0 = &ethernet0;
>  		ethernet1 = &ethernet1;
> +		mmc1 = &sdhc;
>  		serial1 = &uart17;
>  	};
>  
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-04 23:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 11:16 [PATCH] arm64: dts: qcom: lemans: Add SDHCI support for SD card via overlay Monish Chunara
2026-12-04 23:14 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox