* [PATCH v3 0/2] dt-bindings: mmc: st,sdhci: convert STMicroelectronics SDHCI-ST MMC/SD Controller controller binding to YAML
@ 2026-05-08 17:23 Charan Pedumuru
2026-05-08 17:23 ` [PATCH v3 1/2] arm: dts: st: align node patterns with established convention Charan Pedumuru
2026-05-08 17:23 ` [PATCH v3 2/2] dt-bindings: mmc: st,sdhci: convert to DT schema Charan Pedumuru
0 siblings, 2 replies; 6+ messages in thread
From: Charan Pedumuru @ 2026-05-08 17:23 UTC (permalink / raw)
To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Peter Griffin, Patrice Chotard
Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
Charan Pedumuru
This patch series converts the legacy text-based Device Tree binding for
STMicroelectronics SDHCI-ST MMC/SD controller to DT schema (YAML) format.
Note:
The patch "dt-bindings: mmc: st,sdhci: convert to DT schema"
depends on the patch "arm: dts: st: align node patterns with established
convention". If the DT schema patch is applied before the DTS
cleanup patch, `dtbs_check` will fail due to the presence of the removed
properties in the existing DTS.
Signed-off-by: Charan Pedumuru <charan.pedumuru@gmail.com>
---
Changes in v3:
- st,sdhci: Edit description of reg property. Modify reg-names. Add
"minItems" for clocks and clock-names properties.
- Modify the commit message to match with the updated changes.
- Link to v2: https://patch.msgid.link/20260503-st-mmc-v2-0-11ae3216d2ce@gmail.com
Changes in v2:
- Fix node name in DTS for the MMC to match with the estableshed convention.
- st,sdhci: drop unnecessary properties, modify "reg", "reg-names" and
"clock-names" properties, include an allOf with $ref to mmc-controller.
- Link to v1: https://patch.msgid.link/20260409-st-mmc-v1-1-4c54321c3535@gmail.com
---
Charan Pedumuru (2):
arm: dts: st: align node patterns with established convention
dt-bindings: mmc: st,sdhci: convert to DT schema
Documentation/devicetree/bindings/mmc/sdhci-st.txt | 110 ---------------------
.../devicetree/bindings/mmc/st,sdhci.yaml | 91 +++++++++++++++++
arch/arm/boot/dts/st/stih407-family.dtsi | 4 +-
3 files changed, 93 insertions(+), 112 deletions(-)
---
base-commit: cf2cd8efd046c561191b8541d32a8bfe845bf06b
change-id: 20260327-st-mmc-c906ad95ff83
Best regards,
--
Charan Pedumuru <charan.pedumuru@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH v3 1/2] arm: dts: st: align node patterns with established convention 2026-05-08 17:23 [PATCH v3 0/2] dt-bindings: mmc: st,sdhci: convert STMicroelectronics SDHCI-ST MMC/SD Controller controller binding to YAML Charan Pedumuru @ 2026-05-08 17:23 ` Charan Pedumuru 2026-05-08 22:15 ` sashiko-bot 2026-05-08 17:23 ` [PATCH v3 2/2] dt-bindings: mmc: st,sdhci: convert to DT schema Charan Pedumuru 1 sibling, 1 reply; 6+ messages in thread From: Charan Pedumuru @ 2026-05-08 17:23 UTC (permalink / raw) To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Peter Griffin, Patrice Chotard Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel, Charan Pedumuru Update ST MMC DTS node patterns to match established convention. Signed-off-by: Charan Pedumuru <charan.pedumuru@gmail.com> --- arch/arm/boot/dts/st/stih407-family.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/st/stih407-family.dtsi b/arch/arm/boot/dts/st/stih407-family.dtsi index 3e6a0542e3ae..08acba209c56 100644 --- a/arch/arm/boot/dts/st/stih407-family.dtsi +++ b/arch/arm/boot/dts/st/stih407-family.dtsi @@ -596,7 +596,7 @@ spi@9542000 { status = "disabled"; }; - mmc0: sdhci@9060000 { + mmc0: mmc@9060000 { compatible = "st,sdhci-stih407", "st,sdhci"; status = "disabled"; reg = <0x09060000 0x7ff>, <0x9061008 0x20>; @@ -611,7 +611,7 @@ mmc0: sdhci@9060000 { bus-width = <8>; }; - mmc1: sdhci@9080000 { + mmc1: mmc@9080000 { compatible = "st,sdhci-stih407", "st,sdhci"; status = "disabled"; reg = <0x09080000 0x7ff>; -- 2.54.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/2] arm: dts: st: align node patterns with established convention 2026-05-08 17:23 ` [PATCH v3 1/2] arm: dts: st: align node patterns with established convention Charan Pedumuru @ 2026-05-08 22:15 ` sashiko-bot 0 siblings, 0 replies; 6+ messages in thread From: sashiko-bot @ 2026-05-08 22:15 UTC (permalink / raw) To: Charan Pedumuru; +Cc: conor+dt, krzk+dt, robh, devicetree Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Renaming `sdhci` nodes to `mmc` in `stih407-family.dtsi` breaks node overrides in dependent device trees, causing MMC controllers to become non-functional. -- commit 874b7326db9041ff83194d41b493b257577ea261 Author: Charan Pedumuru <charan.pedumuru@gmail.com> arm: dts: st: align node patterns with established convention This commit updates the device tree node patterns for ST MMC controllers to match established conventions by renaming the sdhci nodes to mmc. > diff --git a/arch/arm/boot/dts/st/stih407-family.dtsi b/arch/arm/boot/dts/st/stih407-family.dtsi > index 3e6a0542e3aea..08acba209c564 100644 > --- a/arch/arm/boot/dts/st/stih407-family.dtsi > +++ b/arch/arm/boot/dts/st/stih407-family.dtsi > @@ -596,7 +596,7 @@ spi@9542000 { > status = "disabled"; > }; > > - mmc0: sdhci@9060000 { > + mmc0: mmc@9060000 { Does this rename break device tree overrides in dependent files like stih418-b2199.dts and stih410-b2260.dts? If dependent board files override properties by reopening the nodes using their exact path and old names (e.g., soc { mmc0: sdhci@9060000 { ... }; }), changing the base node name here to mmc@9060000 will cause the device tree compiler to create a new parallel node instead of merging the properties. The original mmc@9060000 node would remain disabled, and the newly created sdhci@9060000 node would lack the required compatible, reg, and interrupts properties, which could prevent the MMC driver from probing correctly. > compatible = "st,sdhci-stih407", "st,sdhci"; > status = "disabled"; > reg = <0x09060000 0x7ff>, <0x9061008 0x20>; [ ... ] > - mmc1: sdhci@9080000 { > + mmc1: mmc@9080000 { Could this node rename also cause similar override failures for dependent files that override mmc1? > compatible = "st,sdhci-stih407", "st,sdhci"; > status = "disabled"; > reg = <0x09080000 0x7ff>; -- Sashiko AI review · https://sashiko.dev/#/patchset/20260508-st-mmc-v3-0-81c329ed28e8@gmail.com?part=1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 2/2] dt-bindings: mmc: st,sdhci: convert to DT schema 2026-05-08 17:23 [PATCH v3 0/2] dt-bindings: mmc: st,sdhci: convert STMicroelectronics SDHCI-ST MMC/SD Controller controller binding to YAML Charan Pedumuru 2026-05-08 17:23 ` [PATCH v3 1/2] arm: dts: st: align node patterns with established convention Charan Pedumuru @ 2026-05-08 17:23 ` Charan Pedumuru 2026-05-08 22:22 ` sashiko-bot 1 sibling, 1 reply; 6+ messages in thread From: Charan Pedumuru @ 2026-05-08 17:23 UTC (permalink / raw) To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Peter Griffin, Patrice Chotard Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel, Charan Pedumuru Convert STMicroelectronics sdhci-st MMC/SD controller binding to DT schema. Changes during conversion: - In the legacy text binding, 'icn' was optional. Keep the clock list flexible to preserve compatibility, although all existing in-tree DTS files already provide both clocks. - Document the optional "top-mmc-delay" register region and corresponding reg-name in the YAML binding, as existing in-tree DTS files already use both "mmc" and "top-mmc-delay" entries. Signed-off-by: Charan Pedumuru <charan.pedumuru@gmail.com> --- Documentation/devicetree/bindings/mmc/sdhci-st.txt | 110 --------------------- .../devicetree/bindings/mmc/st,sdhci.yaml | 91 +++++++++++++++++ 2 files changed, 91 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..10e0e1ee6d5c --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/st,sdhci.yaml @@ -0,0 +1,91 @@ +# 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. + +allOf: + - $ref: mmc-controller.yaml# + +maintainers: + - Peter Griffin <peter.griffin@linaro.org> + +properties: + compatible: + oneOf: + - const: st,sdhci + - items: + - const: st,sdhci-stih407 + - const: st,sdhci + + reg: + minItems: 1 + items: + - description: MMC controller registers + - description: MMC delay/auxiliary registers + + reg-names: + items: + - const: mmc + - const: top-mmc-delay + + clocks: + minItems: 1 + items: + - description: Clock for the MMC controller + - description: Interconnect (ICN) clock + + clock-names: + items: + - const: mmc + - const: icn + + interrupts: + maxItems: 1 + + interrupt-names: + const: mmcirq + + resets: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + - interrupt-names + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/stih407-clks.h> + mmc@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>; + }; +... -- 2.54.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] dt-bindings: mmc: st,sdhci: convert to DT schema 2026-05-08 17:23 ` [PATCH v3 2/2] dt-bindings: mmc: st,sdhci: convert to DT schema Charan Pedumuru @ 2026-05-08 22:22 ` sashiko-bot 2026-05-10 7:11 ` Charan Pedumuru 0 siblings, 1 reply; 6+ messages in thread From: sashiko-bot @ 2026-05-08 22:22 UTC (permalink / raw) To: Charan Pedumuru; +Cc: robh, devicetree, krzk+dt, conor+dt Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Missing `minItems: 1` for `clock-names` and `reg-names` restricts them to exactly two items, breaking schema validation for existing device trees. -- commit 66ec88f9e00b102af921864d0e0bf8b1b9e7f38d Author: Charan Pedumuru <charan.pedumuru@gmail.com> dt-bindings: mmc: st,sdhci: convert to DT schema This commit converts the STMicroelectronics sdhci-st MMC/SD controller binding to DT schema. It updates the clock and register properties to support backward compatibility for single-item entries. > - In the legacy text binding, 'icn' was optional. Keep the clock list > flexible to preserve compatibility, although all existing in-tree DTS > files already provide both clocks. > - Document the optional "top-mmc-delay" register region and corresponding > reg-name in the YAML binding, as existing in-tree DTS files already use > both "mmc" and "top-mmc-delay" entries. Are these descriptions accurate regarding all existing in-tree DTS files? In arch/arm/boot/dts/st/stih407-family.dtsi, the mmc1 node defines only a single register name (reg-names = "mmc"). Other device trees such as arch/powerpc/boot/dts/fsp2.dts also define a single clock and register. > diff --git a/Documentation/devicetree/bindings/mmc/st,sdhci.yaml b/Documentation/devicetree/bindings/mmc/st,sdhci.yaml > new file mode 100644 > index 0000000000000..10e0e1ee6d5cd > --- /dev/null > +++ b/Documentation/devicetree/bindings/mmc/st,sdhci.yaml [ ... ] > + reg: > + minItems: 1 > + items: > + - description: MMC controller registers > + - description: MMC delay/auxiliary registers > + > + reg-names: > + items: > + - const: mmc > + - const: top-mmc-delay Because items lists without an explicit minItems default to the length of the list, does this strictly require two items for reg-names? Will this cause make dtbs_check to fail for existing nodes like mmc1 that only provide "mmc"? Should minItems: 1 be added here to allow single entries? [ ... ] > + clocks: > + minItems: 1 > + items: > + - description: Clock for the MMC controller > + - description: Interconnect (ICN) clock > + > + clock-names: > + items: > + - const: mmc > + - const: icn Similarly, does clock-names require minItems: 1 to match the flexibility added to the clocks property and prevent schema validation errors on single-clock configurations? -- Sashiko AI review · https://sashiko.dev/#/patchset/20260508-st-mmc-v3-0-81c329ed28e8@gmail.com?part=2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] dt-bindings: mmc: st,sdhci: convert to DT schema 2026-05-08 22:22 ` sashiko-bot @ 2026-05-10 7:11 ` Charan Pedumuru 0 siblings, 0 replies; 6+ messages in thread From: Charan Pedumuru @ 2026-05-10 7:11 UTC (permalink / raw) To: sashiko; +Cc: robh, devicetree, krzk+dt, conor+dt On 09-05-2026 03:52, sashiko-bot@kernel.org wrote: > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: > - [Medium] Missing `minItems: 1` for `clock-names` and `reg-names` restricts them to exactly two items, breaking schema validation for existing device trees. > -- > > commit 66ec88f9e00b102af921864d0e0bf8b1b9e7f38d > Author: Charan Pedumuru <charan.pedumuru@gmail.com> > dt-bindings: mmc: st,sdhci: convert to DT schema > > This commit converts the STMicroelectronics sdhci-st MMC/SD controller > binding to DT schema. It updates the clock and register properties to > support backward compatibility for single-item entries. > >> - In the legacy text binding, 'icn' was optional. Keep the clock list >> flexible to preserve compatibility, although all existing in-tree DTS >> files already provide both clocks. >> - Document the optional "top-mmc-delay" register region and corresponding >> reg-name in the YAML binding, as existing in-tree DTS files already use >> both "mmc" and "top-mmc-delay" entries. > > Are these descriptions accurate regarding all existing in-tree DTS files? Yes > > In arch/arm/boot/dts/st/stih407-family.dtsi, the mmc1 node defines only a > single register name (reg-names = "mmc"). Other device trees such as > arch/powerpc/boot/dts/fsp2.dts also define a single clock and register. > >> diff --git a/Documentation/devicetree/bindings/mmc/st,sdhci.yaml b/Documentation/devicetree/bindings/mmc/st,sdhci.yaml >> new file mode 100644 >> index 0000000000000..10e0e1ee6d5cd >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/mmc/st,sdhci.yaml > > [ ... ] > >> + reg: >> + minItems: 1 >> + items: >> + - description: MMC controller registers >> + - description: MMC delay/auxiliary registers >> + >> + reg-names: >> + items: >> + - const: mmc >> + - const: top-mmc-delay > > Because items lists without an explicit minItems default to the length of > the list, does this strictly require two items for reg-names? Yes, but I can add minItems as 1 to accept the nodes that define only 1 reg-names. but the existing DTS uses both. > > Will this cause make dtbs_check to fail for existing nodes like mmc1 that > only provide "mmc"? Should minItems: 1 be added here to allow single entries? Yes, I will add minItmes to allow singe entries. > > [ ... ] > >> + clocks: >> + minItems: 1 >> + items: >> + - description: Clock for the MMC controller >> + - description: Interconnect (ICN) clock >> + >> + clock-names: >> + items: >> + - const: mmc >> + - const: icn > > Similarly, does clock-names require minItems: 1 to match the flexibility > added to the clocks property and prevent schema validation errors on > single-clock configurations? I can add minItmes as 1 if the node only requires 1 clock, but the current DTS uses both of them. > -- Best Regards, Charan. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-05-10 7:11 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-05-08 17:23 [PATCH v3 0/2] dt-bindings: mmc: st,sdhci: convert STMicroelectronics SDHCI-ST MMC/SD Controller controller binding to YAML Charan Pedumuru 2026-05-08 17:23 ` [PATCH v3 1/2] arm: dts: st: align node patterns with established convention Charan Pedumuru 2026-05-08 22:15 ` sashiko-bot 2026-05-08 17:23 ` [PATCH v3 2/2] dt-bindings: mmc: st,sdhci: convert to DT schema Charan Pedumuru 2026-05-08 22:22 ` sashiko-bot 2026-05-10 7:11 ` Charan Pedumuru
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox