Re: [PATCH 2/3] arm64: dts: qcom: monaco-evk: Enable SDHCI for SD Card via overlay

From: Konrad Dybcio

Date: Tue Jun 16 2026 - 09:03:40 EST


On 6/16/26 2:30 PM, Monish Chunara wrote:
> On Mon, Mar 23, 2026 at 03:15:09PM +0100, Konrad Dybcio wrote:
>> On 3/2/26 3:24 PM, Monish Chunara wrote:
>>> On Fri, Feb 27, 2026 at 10:03:10PM +0200, Dmitry Baryshkov wrote:
>>>> On Fri, Feb 27, 2026 at 04:20:54PM +0530, Monish Chunara wrote:
>>>>> The monaco EVK board supports either eMMC or SD-card, but only one
>>>>> can be active at a time.
>>>>>
>>>>> Enable the SD Host Controller Interface (SDHCI) on the monaco EVK board
>>>>> to support SD Card for storage via a device tree overlay. This allows
>>>>> eMMC support to be enabled through a separate overlay when required.
>>>>>
>>>>> Signed-off-by: Monish Chunara <monish.chunara@xxxxxxxxxxxxxxxx>
>>>>> ---
>>>>> arch/arm64/boot/dts/qcom/Makefile | 4 ++
>>>>> .../boot/dts/qcom/monaco-evk-sd-card.dtso | 72 +++++++++++++++++++
>>>>> 2 files changed, 76 insertions(+)
>>>>> create mode 100644 arch/arm64/boot/dts/qcom/monaco-evk-sd-card.dtso
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
>>>>> index 317af937d038..c86242a1631d 100644
>>>>> --- a/arch/arm64/boot/dts/qcom/Makefile
>>>>> +++ b/arch/arm64/boot/dts/qcom/Makefile
>>>>> @@ -46,6 +46,10 @@ lemans-evk-el2-dtbs := lemans-evk.dtb lemans-el2.dtbo
>>>>> dtb-$(CONFIG_ARCH_QCOM) += lemans-evk-el2.dtb
>>>>> dtb-$(CONFIG_ARCH_QCOM) += milos-fairphone-fp6.dtb
>>>>> dtb-$(CONFIG_ARCH_QCOM) += monaco-evk.dtb
>>>>> +
>>>>> +monaco-evk-sd-card-dtbs := monaco-evk.dtb monaco-evk-sd-card.dtbo
>>>>> +dtb-$(CONFIG_ARCH_QCOM) += monaco-evk-sd-card.dtb
>>>>> +
>>>>> dtb-$(CONFIG_ARCH_QCOM) += msm8216-samsung-fortuna3g.dtb
>>>>> dtb-$(CONFIG_ARCH_QCOM) += msm8916-acer-a1-724.dtb
>>>>> dtb-$(CONFIG_ARCH_QCOM) += msm8916-alcatel-idol347.dtb
>>>>> 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 000000000000..a0bc5c47d40b
>>>>> --- /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-dummy {
>>>>
>>>> No dummy regulators, please.
>>>
>>> ACK, these will be renamed as per the schematic. Since these are direct supplies
>>> on hardware, used fixed-regulator configuration.
>>>
>>>>
>>>>> + 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>;
>>>>> +
>>>>> + pinctrl-0 = <&sdc1_state_on>, <&sd_cd>;
>>>>> + pinctrl-1 = <&sdc1_state_off>, <&sd_cd>;
>>>>> + pinctrl-names = "default", "sleep";
>>>>> +
>>>>> + cap-sd-highspeed;
>>>>> + no-1-8-v;
>>>>> +
>>>>> + bus-width = <4>;
>>>>> + cd-gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
>>>>> + no-mmc;
>>>>> + no-sdio;
>>>>> +
>>>>> + status = "okay";
>>>>> +};
>>>>> +
>>>>> +&sdhc1_opp_table {
>>>>
>>>> Why? Is it specific to the device or to the chip? In the latter case,
>>>> please define a separate table in the monaco.dtsi and switch to it here.
>>>>
>>>
>>> As per the previous review, it was suggested to use an existing table. But yes,
>>> this is specific to the Host controller and the corresponding voltage corners on
>>> the chip and can be defined as a separate entity for SD card use-case.
>>
>> The SDC programming guide I have access to does not seem to have bene
>> updated for any recent chips. Are you sure these different corners are
>> *actually* valid? The clock-side documentation doesn't mention that
>>
>
> There seems a gap in the clock documentation. This is being communicated to the
> corresponding stakeholders. However, the corners mentioned are as per the
> reference platform and will be updated in the subsequent series based on the
> updates from the clock-plan PoC as required.

Thanks for chasing this down

Konrad