Devicetree
 help / color / mirror / Atom feed
* [PATCH RESEND v1 0/2] arm64: dts: qcom: lemans-evk: Update SDHC storage support via overlays
@ 2026-08-26 11:32 Monish Chunara
  2026-08-26 11:32 ` [PATCH RESEND v1 1/2] arm64: dts: qcom: lemans-evk: Move SD card support to overlay Monish Chunara
  2026-08-26 11:32 ` [PATCH RESEND v1 2/2] arm64: dts: qcom: lemans-evk: Add SDHCI support for eMMC via overlay Monish Chunara
  0 siblings, 2 replies; 4+ messages in thread
From: Monish Chunara @ 2026-08-26 11:32 UTC (permalink / raw)
  To: Bjorn Andersson, Dmitry Baryshkov, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam
  Cc: linux-arm-msm, devicetree, linux-kernel, Sarthak Garg,
	Pradeep Pragallapati, Nitin Rawat, Shiraz Hashim, Monish Chunara

This series updates the device tree configuration for the LeMans EVK
board to support dynamic selection between SD card and eMMC storage.

The LeMans EVK hardware supports either an SD card or eMMC, but the
interfaces are mutually exclusive as they share the same controller and
resources. Previously, SD card support was hardcoded in the main device
tree, preventing easy switching to eMMC.

This series refactors the SDHC configuration by:

1. Moving the existing SD card configuration into a dedicated overlay.
2. Adding a new overlay to support eMMC.
3. Updating the common SDHC node in the SoC dtsi to include necessary
resources (clocks, register ranges) required by the eMMC configuration.

This allows the bootloader to apply the appropriate overlay based on the
desired storage medium.

Monish Chunara (2):
  arm64: dts: qcom: lemans-evk: Move SD card support to overlay
  arm64: dts: qcom: lemans-evk: Add SDHCI support for eMMC via overlay

 arch/arm64/boot/dts/qcom/Makefile             |  6 ++
 arch/arm64/boot/dts/qcom/lemans-evk-emmc.dtso | 64 +++++++++++++++++++
 .../boot/dts/qcom/lemans-evk-sd-card.dtso     | 25 ++++++++
 arch/arm64/boot/dts/qcom/lemans-evk.dts       | 16 -----
 arch/arm64/boot/dts/qcom/lemans.dtsi          | 10 ++-
 5 files changed, 102 insertions(+), 19 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/lemans-evk-emmc.dtso
 create mode 100644 arch/arm64/boot/dts/qcom/lemans-evk-sd-card.dtso

-- 
2.34.1


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

* [PATCH RESEND v1 1/2] arm64: dts: qcom: lemans-evk: Move SD card support to overlay
  2026-08-26 11:32 [PATCH RESEND v1 0/2] arm64: dts: qcom: lemans-evk: Update SDHC storage support via overlays Monish Chunara
@ 2026-08-26 11:32 ` Monish Chunara
  2026-08-26 11:32 ` [PATCH RESEND v1 2/2] arm64: dts: qcom: lemans-evk: Add SDHCI support for eMMC via overlay Monish Chunara
  1 sibling, 0 replies; 4+ messages in thread
From: Monish Chunara @ 2026-08-26 11:32 UTC (permalink / raw)
  To: Bjorn Andersson, Dmitry Baryshkov, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam
  Cc: linux-arm-msm, devicetree, linux-kernel, Sarthak Garg,
	Pradeep Pragallapati, Nitin Rawat, Shiraz Hashim, Monish Chunara

The lemans EVK board supports either eMMC or SD-card, but only one can
be active at a time.

Move the SDHC node for SD card into a dedicated device tree overlay.
This decoupling allows the storage medium to be selected dynamically by
applying the appropriate overlay for either SD card or eMMC support.

Signed-off-by: Monish Chunara <monish.chunara@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/Makefile             |  3 +++
 .../boot/dts/qcom/lemans-evk-sd-card.dtso     | 25 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/lemans-evk.dts       | 16 ------------
 3 files changed, 28 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/lemans-evk-sd-card.dtso

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 1c86e7e98f55..67b768fa8063 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -46,6 +46,9 @@ dtb-$(CONFIG_ARCH_QCOM)	+= kaanapali-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= kaanapali-qrd.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= lemans-evk.dtb
 
+lemans-evk-sd-card-dtbs := lemans-evk.dtb lemans-evk-sd-card.dtbo
+dtb-$(CONFIG_ARCH_QCOM) += lemans-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-evk-sd-card.dtso b/arch/arm64/boot/dts/qcom/lemans-evk-sd-card.dtso
new file mode 100644
index 000000000000..007ab6347349
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/lemans-evk-sd-card.dtso
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&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 36 GPIO_ACTIVE_LOW>;
+	no-mmc;
+	no-sdio;
+
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/lemans-evk.dts b/arch/arm64/boot/dts/qcom/lemans-evk.dts
index a45485b54a5b..579a34678949 100644
--- a/arch/arm64/boot/dts/qcom/lemans-evk.dts
+++ b/arch/arm64/boot/dts/qcom/lemans-evk.dts
@@ -961,22 +961,6 @@ &remoteproc_gpdsp1 {
 	status = "okay";
 };
 
-&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 36 GPIO_ACTIVE_LOW>;
-	no-mmc;
-	no-sdio;
-
-	status = "okay";
-};
-
 &serdes0 {
 	phy-supply = <&vreg_l5a>;
 
-- 
2.34.1


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

* [PATCH RESEND v1 2/2] arm64: dts: qcom: lemans-evk: Add SDHCI support for eMMC via overlay
  2026-08-26 11:32 [PATCH RESEND v1 0/2] arm64: dts: qcom: lemans-evk: Update SDHC storage support via overlays Monish Chunara
  2026-08-26 11:32 ` [PATCH RESEND v1 1/2] arm64: dts: qcom: lemans-evk: Move SD card support to overlay Monish Chunara
@ 2026-08-26 11:32 ` Monish Chunara
  2026-08-26 11:46   ` sashiko-bot
  1 sibling, 1 reply; 4+ messages in thread
From: Monish Chunara @ 2026-08-26 11:32 UTC (permalink / raw)
  To: Bjorn Andersson, Dmitry Baryshkov, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam
  Cc: linux-arm-msm, devicetree, linux-kernel, Sarthak Garg,
	Pradeep Pragallapati, Nitin Rawat, Shiraz Hashim, Monish Chunara

Enable the SDHCI controller for eMMC functionality on the lemans EVK
using a device tree overlay. Configure the corresponding addresse space
and resources for eMMC.

Signed-off-by: Monish Chunara <monish.chunara@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/Makefile             |  3 +
 arch/arm64/boot/dts/qcom/lemans-evk-emmc.dtso | 64 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/lemans.dtsi          | 10 ++-
 3 files changed, 74 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/lemans-evk-emmc.dtso

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 67b768fa8063..2250e16e9366 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -46,6 +46,9 @@ dtb-$(CONFIG_ARCH_QCOM)	+= kaanapali-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= kaanapali-qrd.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= lemans-evk.dtb
 
+lemans-evk-emmc-dtbs := lemans-evk.dtb lemans-evk-emmc.dtbo
+dtb-$(CONFIG_ARCH_QCOM) += lemans-evk-emmc.dtb
+
 lemans-evk-sd-card-dtbs := lemans-evk.dtb lemans-evk-sd-card.dtbo
 dtb-$(CONFIG_ARCH_QCOM) += lemans-evk-sd-card.dtb
 
diff --git a/arch/arm64/boot/dts/qcom/lemans-evk-emmc.dtso b/arch/arm64/boot/dts/qcom/lemans-evk-emmc.dtso
new file mode 100644
index 000000000000..52739d39a1ff
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/lemans-evk-emmc.dtso
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/qcom,rpmh.h>
+#include <dt-bindings/clock/qcom,sa8775p-gcc.h>
+
+/ {
+	vmmc_sdc1: regulator-l8c {
+		compatible = "regulator-fixed";
+		regulator-name = "vreg-sdc1";
+
+		regulator-min-microvolt = <2960000>;
+		regulator-max-microvolt = <2960000>;
+	};
+
+	vqmmc_sdc1: regulator-s4a {
+		compatible = "regulator-fixed";
+		regulator-name = "vqmmc-sdc1";
+
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+};
+
+&sdhc {
+	vmmc-supply = <&vmmc_sdc1>;
+	vqmmc-supply = <&vqmmc_sdc1>;
+
+	pinctrl-0 = <&sdc_default>, <&sdc_rclk>;
+	pinctrl-1 = <&sdc_sleep>, <&sdc_rclk_sleep>;
+
+	pinctrl-names = "default", "sleep";
+
+	supports-cqe;
+	non-removable;
+
+	qcom,dll-config = <0x000F64EC>;
+	max-frequency = <50000000>;
+
+	bus-width = <8>;
+	no-sd;
+	no-sdio;
+
+	status = "okay";
+};
+
+&tlmm {
+        sdc_rclk: sdc1-rclk-state {
+                pins = "sdc1_rclk";
+                bias-pull-down;
+        };
+
+        sdc_rclk_sleep: sdc1-rclk-sleep-state {
+                pins = "sdc1_rclk";
+                drive-strength = <2>;
+                bias-bus-hold;
+        };
+};
diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi b/arch/arm64/boot/dts/qcom/lemans.dtsi
index 695eae1b7256..99d21e3d7ab8 100644
--- a/arch/arm64/boot/dts/qcom/lemans.dtsi
+++ b/arch/arm64/boot/dts/qcom/lemans.dtsi
@@ -4300,7 +4300,9 @@ apss_tpdm2_out: endpoint {
 
 		sdhc: mmc@87c4000 {
 			compatible = "qcom,sa8775p-sdhci", "qcom,sdhci-msm-v5";
-			reg = <0x0 0x087c4000 0x0 0x1000>;
+			reg = <0x0 0x87C4000 0x0 0x1000>,
+			      <0x0 0x87C5000 0x0 0x1000>;
+			reg-names = "hc", "cqhci";
 
 			interrupts = <GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 521 IRQ_TYPE_LEVEL_HIGH>;
@@ -4308,9 +4310,11 @@ sdhc: mmc@87c4000 {
 					  "pwr_irq";
 
 			clocks = <&gcc GCC_SDCC1_AHB_CLK>,
-				 <&gcc GCC_SDCC1_APPS_CLK>;
+				<&gcc GCC_SDCC1_APPS_CLK>,
+				<&rpmhcc RPMH_CXO_CLK>;
 			clock-names = "iface",
-				      "core";
+				      "core",
+				      "xo";
 
 			interconnects = <&aggre1_noc MASTER_SDC QCOM_ICC_TAG_ALWAYS
 					 &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
-- 
2.34.1


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

* Re: [PATCH RESEND v1 2/2] arm64: dts: qcom: lemans-evk: Add SDHCI support for eMMC via overlay
  2026-08-26 11:32 ` [PATCH RESEND v1 2/2] arm64: dts: qcom: lemans-evk: Add SDHCI support for eMMC via overlay Monish Chunara
@ 2026-08-26 11:46   ` sashiko-bot
  0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-08-26 11:46 UTC (permalink / raw)
  To: Monish Chunara; +Cc: conor+dt, devicetree, robh

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The eMMC device tree overlay creates dummy fixed regulators instead of referencing the existing PMIC RPMH regulators.
- [Low] Unused device tree binding includes in lemans-evk-emmc.dtso.
- [Low] Inconsistent indentation in clock and clock-names assignments.
--

commit 093f95690ab8c3394206ae0a37d52aa9b43fdb76
Author: Monish Chunara <monish.chunara@oss.qualcomm.com>

arm64: dts: qcom: lemans-evk: Add SDHCI support for eMMC via overlay

Enable the SDHCI controller for eMMC functionality on the lemans EVK
using a device tree overlay. Configure the corresponding address space
and resources for eMMC.

[ ... ]
> diff --git a/arch/arm64/boot/dts/qcom/lemans-evk-emmc.dtso b/arch/arm64/boot/dts/qcom/lemans-evk-emmc.dtso
> new file mode 100644
> index 0000000000000..52739d39a1ff8
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/lemans-evk-emmc.dtso
> @@ -0,0 +1,64 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/clock/qcom,rpmh.h>
> +#include <dt-bindings/clock/qcom,sa8775p-gcc.h>

[Severity: Low]
Are these include directives necessary? It looks like the definitions from
these headers are never used in this overlay, which might just add
unnecessary code clutter.

> +
> +/ {
> +	vmmc_sdc1: regulator-l8c {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vreg-sdc1";
> +
> +		regulator-min-microvolt = <2960000>;
> +		regulator-max-microvolt = <2960000>;
> +	};
> +
> +	vqmmc_sdc1: regulator-s4a {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vqmmc-sdc1";
> +
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <1800000>;
> +	};
> +};
> +
> +&sdhc {
> +	vmmc-supply = <&vmmc_sdc1>;
> +	vqmmc-supply = <&vqmmc_sdc1>;

[Severity: High]
Does wiring the SDHC controller to these dummy fixed regulators prevent
actual hardware control?

By defining these fixed regulators instead of referencing the real PMIC RPMH
regulators (vreg_l8c and vreg_s4a which are already defined in the base
device tree), the kernel might not issue the actual RPMh commands to enable,
disable, or configure voltage for the eMMC.

Could this cause initialization failures if the bootloader has not
pre-configured them, or lead to power management regressions during
suspend/resume where the kernel incorrectly assumes the hardware is
powered down?

[ ... ]
> diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi b/arch/arm64/boot/dts/qcom/lemans.dtsi
> index 353a6e6fd3acb..9f54d69c1be63 100644
> --- a/arch/arm64/boot/dts/qcom/lemans.dtsi
> +++ b/arch/arm64/boot/dts/qcom/lemans.dtsi
[ ... ]
> @@ -4311,9 +4313,11 @@ sdhc: mmc@87c4000 {
>  					  "pwr_irq";
>  
>  			clocks = <&gcc GCC_SDCC1_AHB_CLK>,
> -				 <&gcc GCC_SDCC1_APPS_CLK>;
> +				<&gcc GCC_SDCC1_APPS_CLK>,
> +				<&rpmhcc RPMH_CXO_CLK>;

[Severity: Low]
This isn't a bug, but is the indentation on the newly added clock items
meant to align with the first item in the list? It looks like it is slightly
misaligned compared to the original styling in the block.

>  			clock-names = "iface",
> -				      "core";
> +				      "core",
> +				      "xo";
>  
>  			interconnects = <&aggre1_noc MASTER_SDC QCOM_ICC_TAG_ALWAYS
>  					 &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260826113206.488991-1-monish.chunara@oss.qualcomm.com?part=2

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

end of thread, other threads:[~2026-08-26 11:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-26 11:32 [PATCH RESEND v1 0/2] arm64: dts: qcom: lemans-evk: Update SDHC storage support via overlays Monish Chunara
2026-08-26 11:32 ` [PATCH RESEND v1 1/2] arm64: dts: qcom: lemans-evk: Move SD card support to overlay Monish Chunara
2026-08-26 11:32 ` [PATCH RESEND v1 2/2] arm64: dts: qcom: lemans-evk: Add SDHCI support for eMMC via overlay Monish Chunara
2026-08-26 11:46   ` sashiko-bot

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