.../devicetree/bindings/mmc/ti,omap2420-mmc.yaml | 66 ++++++++++++++++++++++ Documentation/devicetree/bindings/mmc/ti-omap.txt | 26 --------- 2 files changed, 66 insertions(+), 26 deletions(-)
Convert TI MMC host controller binding to YAML format.
Changes during Conversion:
- Add new properties 'dma', 'dma-names' under required.
- Define two separate phandles for 'dmas' in the examples.
- Include appropriate header file for interrupts and use
it in the examples.
Signed-off-by: Charan Pedumuru <charan.pedumuru@gmail.com>
---
Changes in v3:
- Changed maintainer to Tony Lindgren.
- Redefine 'ti,hwmods' with $ref under properties.
- Modify subject prefix with ti,omap2420-mmc.
- Link to v2: https://lore.kernel.org/r/20250519-ti-omap-v2-1-2a0dbc08fb9c@gmail.com
Changes in v2:
- Added include statement for irq interrupt controller and
modified the interrupts under property to use header.
- Changed maintainer to Rob Herring.
- Defined two seperate phandles for 'dmas' under examples.
- Rename the YAML file name to the compatible 'ti,omap2420-mmc'.
- Added missing type and maxItems to 'ti,hwmods' under properties.
- Link to v1: https://lore.kernel.org/r/20250510-ti-omap-v1-1-588b0ccb1823@gmail.com
---
.../devicetree/bindings/mmc/ti,omap2420-mmc.yaml | 66 ++++++++++++++++++++++
Documentation/devicetree/bindings/mmc/ti-omap.txt | 26 ---------
2 files changed, 66 insertions(+), 26 deletions(-)
diff --git a/Documentation/devicetree/bindings/mmc/ti,omap2420-mmc.yaml b/Documentation/devicetree/bindings/mmc/ti,omap2420-mmc.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..61fd4244b92cb3b76db1a765933ebb2af2ccae28
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/ti,omap2420-mmc.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/ti,omap2420-mmc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI MMC host controller for OMAP1 and 2420
+
+description:
+ The MMC Host controller for TI OMAP1 and 2420 family provides
+ an interface for MMC, SD and SDIO types of memory cards.
+
+allOf:
+ - $ref: mmc-controller.yaml
+
+maintainers:
+ - Tony Lindgren <tony@atomide.com>
+
+properties:
+ compatible:
+ const: ti,omap2420-mmc
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ dmas:
+ maxItems: 2
+
+ dma-names:
+ items:
+ - const: tx
+ - const: rx
+
+ ti,hwmods:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ List of hwmod names (ascii strings), that comes from the OMAP
+ HW documentation, attached to a device. Must contain at least
+ one hwmod.
+ pattern: "^msdi[0-9]+$"
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - dmas
+ - dma-names
+ - ti,hwmods
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ mmc@4809c000 {
+ compatible = "ti,omap2420-mmc";
+ ti,hwmods = "msdi1";
+ reg = <0x4809c000 0x80>;
+ interrupts = <83 IRQ_TYPE_LEVEL_HIGH>;
+ dmas = <&sdma 61>, <&sdma 62>;
+ dma-names = "tx", "rx";
+ };
+...
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap.txt b/Documentation/devicetree/bindings/mmc/ti-omap.txt
deleted file mode 100644
index 02fd31cf361d6ed893ec2f9eb8368b358ab2bae1..0000000000000000000000000000000000000000
--- a/Documentation/devicetree/bindings/mmc/ti-omap.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-* TI MMC host controller for OMAP1 and 2420
-
-The MMC Host Controller on TI OMAP1 and 2420 family provides
-an interface for MMC, SD, and SDIO types of memory cards.
-
-This file documents differences between the core properties described
-by mmc.txt and the properties used by the omap mmc driver.
-
-Note that this driver will not work with omap2430 or later omaps,
-please see the omap hsmmc driver for the current omaps.
-
-Required properties:
-- compatible: Must be "ti,omap2420-mmc", for OMAP2420 controllers
-- ti,hwmods: For 2420, must be "msdi<n>", where n is controller
- instance starting 1
-
-Examples:
-
- msdi1: mmc@4809c000 {
- compatible = "ti,omap2420-mmc";
- ti,hwmods = "msdi1";
- reg = <0x4809c000 0x80>;
- interrupts = <83>;
- dmas = <&sdma 61 &sdma 62>;
- dma-names = "tx", "rx";
- };
---
base-commit: 3e039dcc9c1320c0d33ddd51c372dcc91d3ea3c7
change-id: 20250502-ti-omap-12655fa9db3e
Best regards,
--
Charan Pedumuru <charan.pedumuru@gmail.com>
On 20/05/2025 15:12, Charan Pedumuru wrote: > Convert TI MMC host controller binding to YAML format. > Changes during Conversion: > - Add new properties 'dma', 'dma-names' under required. Why? > - Define two separate phandles for 'dmas' in the examples. > - Include appropriate header file for interrupts and use > it in the examples. Examples are not the binding, so you can drop last two items. > > Signed-off-by: Charan Pedumuru <charan.pedumuru@gmail.com> > --- > Changes in v3: ... > + dmas: > + maxItems: 2 > + > + dma-names: > + items: > + - const: tx > + - const: rx > + > + ti,hwmods: > + $ref: /schemas/types.yaml#/definitions/string > + description: > + List of hwmod names (ascii strings), that comes from the OMAP > + HW documentation, attached to a device. Must contain at least > + one hwmod. Description does not match the property. It is not a list and where the hwmod below: > + pattern: "^msdi[0-9]+$" I see msdi - is it something different? There was no such description in original binding, so maybe you are changing something but anyway it should be correct. > + > +required: > + - compatible > + - reg > + - interrupts > + - dmas > + - dma-names > + - ti,hwmods Best regards, Krzysztof
On 20-05-2025 19:39, Krzysztof Kozlowski wrote: > On 20/05/2025 15:12, Charan Pedumuru wrote: >> Convert TI MMC host controller binding to YAML format. >> Changes during Conversion: >> - Add new properties 'dma', 'dma-names' under required. > > Why? Actually, dma and dma-names can be removed from required, so there is no need to add any new properties to required. I will remove them. > >> - Define two separate phandles for 'dmas' in the examples. >> - Include appropriate header file for interrupts and use >> it in the examples. > > Examples are not the binding, so you can drop last two items. > >> >> Signed-off-by: Charan Pedumuru <charan.pedumuru@gmail.com> >> --- >> Changes in v3: > > > ... > >> + dmas: >> + maxItems: 2 >> + >> + dma-names: >> + items: >> + - const: tx >> + - const: rx >> + >> + ti,hwmods: >> + $ref: /schemas/types.yaml#/definitions/string >> + description: >> + List of hwmod names (ascii strings), that comes from the OMAP >> + HW documentation, attached to a device. Must contain at least >> + one hwmod. > > Description does not match the property. It is not a list and where the > hwmod below: Sure, will change the description. > >> + pattern: "^msdi[0-9]+$" > > I see msdi - is it something different? > > There was no such description in original binding, so maybe you are > changing something but anyway it should be correct. Normally, it should be mmc, but for this particular binding it is msdi or do we need to change it to mmc for ti,hwmods property in dts and redefine the pattern here? > >> + >> +required: >> + - compatible >> + - reg >> + - interrupts >> + - dmas >> + - dma-names >> + - ti,hwmods > Best regards, > Krzysztof -- Best Regards, Charan.
© 2016 - 2025 Red Hat, Inc.