All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Monish Chunara" <monish.chunara@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH V6 3/3] arm64: dts: qcom: monaco-evk: Add SDHCI support for eMMC via overlay
Date: Thu, 05 Nov 2026 10:34:24 +0000	[thread overview]
Message-ID: <sashiko-outbox-198862@kernel.org> (raw)
In-Reply-To: <20261105101955.3732723-4-monish.chunara@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] arm64: dts: qcom: root node syntax in monaco-evk-sd-card.dtso drops regulators
- [Medium] arm64: dts: qcom: missing supports-cqe on sdhc_1 in monaco-ac-evk.dts
- [Medium] arm64: dts: qcom: invalid and duplicate OPPs in monaco-evk-sd-card.dtso
--

commit 55ce3aa0fb14b29f7953daf1505d7c18f0d799da
Author: Monish Chunara <monish.chunara@oss.qualcomm.com>

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

This series moves the eMMC supports-cqe property from the Monaco SoC device
tree to the board level and switches Monaco EVK SDHCI storage selection between
SD card and eMMC to device tree overlays.

> diff --git a/arch/arm64/boot/dts/qcom/monaco-evk-sd-card.dtso b/arch/arm64/boot/dts/qcom/monaco-evk-sd-card.dtso
> new file mode 100644
> index 0000000000000..bc4ea12587a2e
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/monaco-evk-sd-card.dtso
> @@ -0,0 +1,72 @@
> +// 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-mmc-sdc {
> +                compatible = "regulator-fixed";
> +
> +                regulator-name = "vmmc_sdc";
> +                regulator-min-microvolt = <2950000>;
> +                regulator-max-microvolt = <2950000>;
> +        };
> +
> +        vreg_sdc: regulator-sdc {
> +		compatible = "regulator-gpio";
> +
> +		regulator-name = "vreg_sdc";
> +		regulator-type = "voltage";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <2950000>;
> +
> +		gpios = <&expander1 7 GPIO_ACTIVE_HIGH>;
> +		states = <1800000 1>, <2950000 0>;
> +
> +		startup-delay-us = <100>;
> +        };
> +};
> +
> +&sdhc_1 {
> +	vmmc-supply = <&vmmc_sdc>;
> +	vqmmc-supply = <&vreg_sdc>;

[Severity: High]
Should the root node in monaco-evk-sd-card.dtso use &{/} { ... }; instead of
/ { ... };?

In a /plugin/; device tree overlay, defining nodes under / { ... }; places
regulator-mmc-sdc and regulator-sdc directly under the root of the compiled
.dtbo rather than wrapping them in a fragment node with an __overlay__ child.

When fdt_overlay_apply() -> overlay_merge() in scripts/dtc/libfdt/fdt_overlay.c
(or init_overlay_changeset() in drivers/of/overlay.c) merges the overlay:

	fdt_for_each_subnode(fragment, fdto, 0) {
		overlay = fdt_subnode_offset(fdto, fragment, "__overlay__");
		if (overlay == -FDT_ERR_NOTFOUND)
			continue;

both regulator nodes are skipped and omitted from the merged DTB, while
vmmc-supply and vqmmc-supply in sdhc_1 are left pointing at phandles that do
not exist in the merged tree. When sdhci_msm_probe() -> sdhci_setup_host() ->
mmc_regulator_get_supply() runs, resolving both supplies fails with -ENODEV.

[ ... ]

> +&sdhc1_opp_table {
> +	opp-100000000 {
> +		opp-hz = /bits/ 64 <100000000>;
> +		required-opps = <&rpmhpd_opp_low_svs>;
> +	};
> +
> +	opp-202000000 {
> +		opp-hz = /bits/ 64 <202000000>;
> +		required-opps = <&rpmhpd_opp_svs_l1>;
> +	};
> +};

[Severity: Medium]
Is this override of sdhc1_opp_table intended for sdhc_1 on Monaco?

In arch/arm64/boot/dts/qcom/monaco.dtsi, sdhc1_opp_table already defines:

			sdhc1_opp_table: opp-table {
				compatible = "operating-points-v2";

				opp-50000000 {
					opp-hz = /bits/ 64 <50000000>;
					required-opps = <&rpmhpd_opp_low_svs>;
				};

				opp-100000000 {
					opp-hz = /bits/ 64 <100000000>;
					required-opps = <&rpmhpd_opp_svs>;
				};

				opp-200000000 {
					opp-hz = /bits/ 64 <200000000>;
					required-opps = <&rpmhpd_opp_svs_l1>;
				};

				opp-384000000 {
					opp-hz = /bits/ 64 <384000000>;
					required-opps = <&rpmhpd_opp_nom>;
				};
			};

And in drivers/clk/qcom/gcc-qcs8300.c, ftbl_gcc_sdcc1_apps_clk_src supports
50 MHz, 100 MHz, 192 MHz, and 384 MHz, with no 202 MHz entry.

Because overlay_apply_node() merges new subnodes without removing existing
ones, applying monaco-evk-sd-card.dtso leaves opp-200000000 and opp-384000000
in sdhc1_opp_table alongside the new opp-202000000 node, while also lowering
the 100 MHz required-opps vote from rpmhpd_opp_svs to rpmhpd_opp_low_svs.

[ ... ]

> diff --git a/arch/arm64/boot/dts/qcom/monaco.dtsi b/arch/arm64/boot/dts/qcom/monaco.dtsi
> index 35fbee63d4c65..591ad233f90eb 100644
> --- a/arch/arm64/boot/dts/qcom/monaco.dtsi
> +++ b/arch/arm64/boot/dts/qcom/monaco.dtsi
> @@ -4843,7 +4843,6 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
>  			qcom,dll-config = <0x000f64ee>;
>  			qcom,ddr-config = <0x80040868>;
>  			bus-width = <8>;
> -			supports-cqe;
>  			dma-coherent;

[Severity: Medium]
Should arch/arm64/boot/dts/qcom/monaco-ac-evk.dts also have supports-cqe added
to &sdhc_1?

monaco-ac-evk.dts includes monaco.dtsi and enables sdhc_1 for non-removable
eMMC:

&sdhc_1 {
	vmmc-supply = <&vreg_l8a>;
	vqmmc-supply = <&vreg_s2s>;

	no-sd;
	no-sdio;
	non-removable;

	status = "okay";
};

In drivers/mmc/host/sdhci-msm.c, sdhci_msm_probe() checks for supports-cqe:

	if (of_property_read_bool(node, "supports-cqe"))
		ret = sdhci_msm_cqe_add_host(host, pdev);
	else
		ret = sdhci_add_host(host);

Removing supports-cqe from monaco.dtsi without adding it to monaco-ac-evk.dts
causes sdhci_msm_probe() to skip sdhci_msm_cqe_add_host() (and
sdhci_msm_ice_init() called from within it), disabling CQE and ICE on
Monaco-AC EVK.

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

      reply	other threads:[~2026-11-05 10:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 10:19 [PATCH V6 0/3] arm64: dts: qcom: Monaco: Enable SDHCI storage support Monish Chunara
2026-11-05 10:19 ` [PATCH V6 1/3] arm64: dts: qcom: monaco: Move eMMC CQE support from SoC to board DT Monish Chunara
2026-11-05 10:31   ` sashiko-bot
2026-11-05 10:19 ` [PATCH V6 2/3] arm64: dts: qcom: monaco-evk: Enable SDHCI for SD Card via overlay Monish Chunara
2026-11-05 10:41   ` sashiko-bot
2026-11-05 10:19 ` [PATCH V6 3/3] arm64: dts: qcom: monaco-evk: Add SDHCI support for eMMC " Monish Chunara
2026-11-05 10:34   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-198862@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=monish.chunara@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.