* [PATCH] dt-bindings: mmc: st,sdhci: convert to DT schema
@ 2026-04-09 7:43 Charan Pedumuru
2026-04-16 9:18 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Charan Pedumuru @ 2026-04-09 7:43 UTC (permalink / raw)
To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Peter Griffin
Cc: linux-mmc, devicetree, linux-kernel, Charan Pedumuru
Convert STMicroelectronics sdhci-st MMC/SD controller binding to DT schema.
Signed-off-by: Charan Pedumuru <charan.pedumuru@gmail.com>
---
Documentation/devicetree/bindings/mmc/sdhci-st.txt | 110 -------------------
.../devicetree/bindings/mmc/st,sdhci.yaml | 122 +++++++++++++++++++++
2 files changed, 122 insertions(+), 110 deletions(-)
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-st.txt b/Documentation/devicetree/bindings/mmc/sdhci-st.txt
deleted file mode 100644
index ccf82b4ee838..000000000000
--- a/Documentation/devicetree/bindings/mmc/sdhci-st.txt
+++ /dev/null
@@ -1,110 +0,0 @@
-* STMicroelectronics sdhci-st MMC/SD controller
-
-This file documents the differences between the core properties in
-Documentation/devicetree/bindings/mmc/mmc.txt and the properties
-used by the sdhci-st driver.
-
-Required properties:
-- compatible: Must be "st,sdhci" and it can be compatible to "st,sdhci-stih407"
- to set the internal glue logic used for configuring the MMC
- subsystem (mmcss) inside the FlashSS (available in STiH407 SoC
- family).
-
-- clock-names: Should be "mmc" and "icn". (NB: The latter is not compulsory)
- See: Documentation/devicetree/bindings/resource-names.txt
-- clocks: Phandle to the clock.
- See: Documentation/devicetree/bindings/clock/clock-bindings.txt
-
-- interrupts: One mmc interrupt should be described here.
-- interrupt-names: Should be "mmcirq".
-
-- pinctrl-names: A pinctrl state names "default" must be defined.
-- pinctrl-0: Phandle referencing pin configuration of the sd/emmc controller.
- See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
-
-- reg: This must provide the host controller base address and it can also
- contain the FlashSS Top register for TX/RX delay used by the driver
- to configure DLL inside the flashSS, if so reg-names must also be
- specified.
-
-Optional properties:
-- reg-names: Should be "mmc" and "top-mmc-delay". "top-mmc-delay" is optional
- for eMMC on stih407 family silicon to configure DLL inside FlashSS.
-
-- non-removable: Non-removable slot. Also used for configuring mmcss in STiH407 SoC
- family.
- See: Documentation/devicetree/bindings/mmc/mmc.txt.
-
-- bus-width: Number of data lines.
- See: Documentation/devicetree/bindings/mmc/mmc.txt.
-
-- max-frequency: Can be 200MHz, 100MHz or 50MHz (default) and used for
- configuring the CCONFIG3 in the mmcss.
- See: Documentation/devicetree/bindings/mmc/mmc.txt.
-
-- resets: Phandle and reset specifier pair to softreset line of HC IP.
- See: Documentation/devicetree/bindings/reset/reset.txt
-
-- vqmmc-supply: Phandle to the regulator dt node, mentioned as the vcc/vdd
- supply in eMMC/SD specs.
-
-- sd-uhs-sdr50: To enable the SDR50 in the mmcss.
- See: Documentation/devicetree/bindings/mmc/mmc.txt.
-
-- sd-uhs-sdr104: To enable the SDR104 in the mmcss.
- See: Documentation/devicetree/bindings/mmc/mmc.txt.
-
-- sd-uhs-ddr50: To enable the DDR50 in the mmcss.
- See: Documentation/devicetree/bindings/mmc/mmc.txt.
-
-Example:
-
-/* Example stih416e eMMC configuration */
-
-mmc0: sdhci@fe81e000 {
- compatible = "st,sdhci";
- reg = <0xfe81e000 0x1000>;
- interrupts = <GIC_SPI 127 IRQ_TYPE_NONE>;
- interrupt-names = "mmcirq";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_mmc0>;
- clock-names = "mmc";
- clocks = <&clk_s_a1_ls 1>;
- bus-width = <8>
-
-/* Example SD stih407 family configuration */
-
-mmc1: sdhci@9080000 {
- compatible = "st,sdhci-stih407", "st,sdhci";
- reg = <0x09080000 0x7ff>;
- reg-names = "mmc";
- interrupts = <GIC_SPI 90 IRQ_TYPE_NONE>;
- interrupt-names = "mmcirq";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_sd1>;
- clock-names = "mmc";
- clocks = <&clk_s_c0_flexgen CLK_MMC_1>;
- resets = <&softreset STIH407_MMC1_SOFTRESET>;
- bus-width = <4>;
-};
-
-/* Example eMMC stih407 family configuration */
-
-mmc0: sdhci@9060000 {
- compatible = "st,sdhci-stih407", "st,sdhci";
- reg = <0x09060000 0x7ff>, <0x9061008 0x20>;
- reg-names = "mmc", "top-mmc-delay";
- interrupts = <GIC_SPI 92 IRQ_TYPE_NONE>;
- interrupt-names = "mmcirq";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_mmc0>;
- clock-names = "mmc";
- clocks = <&clk_s_c0_flexgen CLK_MMC_0>;
- vqmmc-supply = <&vmmc_reg>;
- max-frequency = <200000000>;
- bus-width = <8>;
- non-removable;
- sd-uhs-sdr50;
- sd-uhs-sdr104;
- sd-uhs-ddr50;
-};
diff --git a/Documentation/devicetree/bindings/mmc/st,sdhci.yaml b/Documentation/devicetree/bindings/mmc/st,sdhci.yaml
new file mode 100644
index 000000000000..22060fe6e364
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/st,sdhci.yaml
@@ -0,0 +1,122 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/st,sdhci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics SDHCI-ST MMC/SD Controller
+
+description:
+ The STMicroelectronics SDHCI-ST MMC/SD host controller, which is
+ compliant with the SD Host Controller Interface (SDHCI) specification and
+ is used to interface with MMC, SD and SDIO cards. The ST SDHCI controller
+ extends the standard SDHCI capabilities with platform-specific
+ configurations such as additional register regions,clock inputs, and delay
+ control mechanisms required for signal timing adjustments which are
+ necessary to support high-speed modes and ensure reliable data transfer
+ across different ST SoCs.
+
+maintainers:
+ - Peter Griffin <peter.griffin@linaro.org>
+
+properties:
+ compatible:
+ oneOf:
+ - const: st,sdhci
+ - items:
+ - const: st,sdhci-stih407
+ - const: st,sdhci
+
+ reg:
+ minItems: 1
+ maxItems: 2
+
+ reg-names:
+ minItems: 1
+ maxItems: 2
+ items:
+ enum:
+ - mmc
+ - top-mmc-delay
+
+ clocks:
+ minItems: 1
+ maxItems: 2
+
+ clock-names:
+ minItems: 1
+ maxItems: 2
+ items:
+ enum:
+ - mmc
+ - icn
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-names:
+ const: mmcirq
+
+ pinctrl-names:
+ const: default
+
+ resets:
+ maxItems: 1
+ description: Phandle to reset line of host controller.
+
+ vqmmc-supply:
+ description: Regulator supplying I/O voltage (Vcc/Vdd for SD/eMMC).
+
+ non-removable:
+ type: boolean
+ description:
+ Indicates a non-removable device (e.g., eMMC). Also used for mmcss config.
+
+ bus-width:
+ description: Number of data lines.
+ enum: [1, 4, 8]
+
+ max-frequency:
+ enum: [50000000, 100000000, 200000000]
+ default: 50000000
+ description:
+ Maximum bus frequency. Used to configure CCONFIG3 in mmcss.
+
+ sd-uhs-sdr50:
+ type: boolean
+
+ sd-uhs-sdr104:
+ type: boolean
+
+ sd-uhs-ddr50:
+ type: boolean
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+ - interrupt-names
+ - pinctrl-names
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/stih407-clks.h>
+ sdhci@9060000 {
+ compatible = "st,sdhci-stih407", "st,sdhci";
+ reg = <0x09060000 0x7ff>, <0x9061008 0x20>;
+ reg-names = "mmc", "top-mmc-delay";
+ interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "mmcirq";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mmc0>;
+ clock-names = "mmc", "icn";
+ clocks = <&clk_s_c0_flexgen CLK_MMC_0>,
+ <&clk_s_c0_flexgen CLK_RX_ICN_HVA>;
+ bus-width = <8>;
+ };
+...
---
base-commit: e77a5a5cfe43b4c25bd44a3818e487033287517f
change-id: 20260327-st-mmc-c906ad95ff83
Best regards,
--
Charan Pedumuru <charan.pedumuru@gmail.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: mmc: st,sdhci: convert to DT schema
2026-04-09 7:43 [PATCH] dt-bindings: mmc: st,sdhci: convert to DT schema Charan Pedumuru
@ 2026-04-16 9:18 ` Krzysztof Kozlowski
2026-04-23 15:26 ` Charan Pedumuru
0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-16 9:18 UTC (permalink / raw)
To: Charan Pedumuru
Cc: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Peter Griffin, linux-mmc, devicetree, linux-kernel
On Thu, Apr 09, 2026 at 07:43:16AM +0000, Charan Pedumuru wrote:
> +properties:
> + compatible:
> + oneOf:
> + - const: st,sdhci
> + - items:
> + - const: st,sdhci-stih407
> + - const: st,sdhci
> +
> + reg:
> + minItems: 1
> + maxItems: 2
replace maxItems with a list with description
> +
> + reg-names:
> + minItems: 1
> + maxItems: 2
> + items:
> + enum:
List order is not flexible. The only flexibility is presence of top-mmc-delay
> + - mmc
> + - top-mmc-delay
> +
> + clocks:
> + minItems: 1
> + maxItems: 2
> +
> + clock-names:
> + minItems: 1
> + maxItems: 2
> + items:
> + enum:
Same here
> + - mmc
> + - icn
> +
> + interrupts:
> + maxItems: 1
> +
> + interrupt-names:
> + const: mmcirq
> +
> + pinctrl-names:
> + const: default
Drop
> +
> + resets:
> + maxItems: 1
> + description: Phandle to reset line of host controller.
Drop description
> +
> + vqmmc-supply:
> + description: Regulator supplying I/O voltage (Vcc/Vdd for SD/eMMC).
> +
> + non-removable:
> + type: boolean
> + description:
> + Indicates a non-removable device (e.g., eMMC). Also used for mmcss config.
> +
> + bus-width:
> + description: Number of data lines.
> + enum: [1, 4, 8]
> +
> + max-frequency:
> + enum: [50000000, 100000000, 200000000]
> + default: 50000000
> + description:
> + Maximum bus frequency. Used to configure CCONFIG3 in mmcss.
> +
> + sd-uhs-sdr50:
> + type: boolean
> +
> + sd-uhs-sdr104:
> + type: boolean
> +
> + sd-uhs-ddr50:
> + type: boolean
No, drop all above. Look how MMC bindings are written.
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - clock-names
> + - interrupts
> + - interrupt-names
> + - pinctrl-names
> +
Missing allOf with $ref to mmc-controller
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/clock/stih407-clks.h>
> + sdhci@9060000 {
Wrong name. Look at other examples. You might need to fix DTS.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: mmc: st,sdhci: convert to DT schema
2026-04-16 9:18 ` Krzysztof Kozlowski
@ 2026-04-23 15:26 ` Charan Pedumuru
2026-04-23 17:23 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Charan Pedumuru @ 2026-04-23 15:26 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Peter Griffin, linux-mmc, devicetree, linux-kernel
On 16-04-2026 14:48, Krzysztof Kozlowski wrote:
> On Thu, Apr 09, 2026 at 07:43:16AM +0000, Charan Pedumuru wrote:
>> +properties:
>> + compatible:
>> + oneOf:
>> + - const: st,sdhci
>> + - items:
>> + - const: st,sdhci-stih407
>> + - const: st,sdhci
>> +
>> + reg:
>> + minItems: 1
>> + maxItems: 2
>
> replace maxItems with a list with description
maxItems is required, dt_check fails without it and I can add the description.
>
>> +
>> + reg-names:
>> + minItems: 1
>> + maxItems: 2
>> + items:
>> + enum:
>
> List order is not flexible. The only flexibility is presence of top-mmc-delay
Okay.
>
>> + - mmc
>> + - top-mmc-delay
>> +
>> + clocks:
>> + minItems: 1
>> + maxItems: 2
>> +
>> + clock-names:
>> + minItems: 1
>> + maxItems: 2
>> + items:
>> + enum:
>
> Same here
Yeah, I will define them as const
>
>> + - mmc
>> + - icn
>> +
>> + interrupts:
>> + maxItems: 1
>> +
>> + interrupt-names:
>> + const: mmcirq
>> +
>> + pinctrl-names:
>> + const: default
>
> Drop
Okay.
>
>> +
>> + resets:
>> + maxItems: 1
>> + description: Phandle to reset line of host controller.
>
> Drop description
Sure.
>
>> +
>> + vqmmc-supply:
>> + description: Regulator supplying I/O voltage (Vcc/Vdd for SD/eMMC).
>> +
>> + non-removable:
>> + type: boolean
>> + description:
>> + Indicates a non-removable device (e.g., eMMC). Also used for mmcss config.
>> +
>> + bus-width:
>> + description: Number of data lines.
>> + enum: [1, 4, 8]
>> +
>> + max-frequency:
>> + enum: [50000000, 100000000, 200000000]
>> + default: 50000000
>> + description:
>> + Maximum bus frequency. Used to configure CCONFIG3 in mmcss.
>> +
>> + sd-uhs-sdr50:
>> + type: boolean
>> +
>> + sd-uhs-sdr104:
>> + type: boolean
>> +
>> + sd-uhs-ddr50:
>> + type: boolean
>
> No, drop all above. Look how MMC bindings are written.
Okay.
>
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - clocks
>> + - clock-names
>> + - interrupts
>> + - interrupt-names
>> + - pinctrl-names
>> +
>
> Missing allOf with $ref to mmc-controller
Okay, then in that case I need to change the name of the node.
>
>> +additionalProperties: false
>> +
>> +examples:
>> + - |
>> + #include <dt-bindings/interrupt-controller/arm-gic.h>
>> + #include <dt-bindings/clock/stih407-clks.h>
>> + sdhci@9060000 {
>
> Wrong name. Look at other examples. You might need to fix DTS.
Sure, I will send a cleanup patch replacing the sdhci node name to mmc for these compatibles in a separate patch.
>
> Best regards,
> Krzysztof
>
--
Best Regards,
Charan.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: mmc: st,sdhci: convert to DT schema
2026-04-23 15:26 ` Charan Pedumuru
@ 2026-04-23 17:23 ` Krzysztof Kozlowski
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-23 17:23 UTC (permalink / raw)
To: Charan Pedumuru
Cc: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Peter Griffin, linux-mmc, devicetree, linux-kernel
On 23/04/2026 17:26, Charan Pedumuru wrote:
>
>
> On 16-04-2026 14:48, Krzysztof Kozlowski wrote:
>> On Thu, Apr 09, 2026 at 07:43:16AM +0000, Charan Pedumuru wrote:
>>> +properties:
>>> + compatible:
>>> + oneOf:
>>> + - const: st,sdhci
>>> + - items:
>>> + - const: st,sdhci-stih407
>>> + - const: st,sdhci
>>> +
>>> + reg:
>>> + minItems: 1
>>> + maxItems: 2
>>
>> replace maxItems with a list with description
>
> maxItems is required, dt_check fails without it and I can add the description.
No, constraints are required and list with items provides such.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-23 17:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-09 7:43 [PATCH] dt-bindings: mmc: st,sdhci: convert to DT schema Charan Pedumuru
2026-04-16 9:18 ` Krzysztof Kozlowski
2026-04-23 15:26 ` Charan Pedumuru
2026-04-23 17:23 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox