Skip to contentSkip to conversation

dt-bindings: omap-mcpdm: Convert to DT schema

PATCH Superseded Mighty 2 participants 2 messages Apr 3, 2024

Subsystems (2)

v1 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Mighty

author
#0 lore raw

PATCH 1/1 dt-bindings: omap-mcpdm: Convert to DT schema

Convert the OMAP4+ McPDM bindings to DT schema.

---
 .../devicetree/bindings/sound/omap-mcpdm.txt  | 30 ----------
 .../devicetree/bindings/sound/omap-mcpdm.yaml | 58 +++++++++++++++++++
 2 files changed, 58 insertions(+), 30 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/omap-mcpdm.txt
 create mode 100644 Documentation/devicetree/bindings/sound/omap-mcpdm.yaml
Documentation/devicetree/bindings/sound/omap-mcpdm.txt deleted +0 -30
deleted file mode 100644
index ff98a0cb5..000000000
@@ -1,30 +0,0 @@
-* Texas Instruments OMAP4+ McPDM
-
-Required properties:
-- compatible: "ti,omap4-mcpdm"
-- reg: Register location and size as an array:
-       <MPU access base address, size>,
-       <L3 interconnect address, size>;
-- interrupts: Interrupt number for McPDM
-- ti,hwmods: Name of the hwmod associated to the McPDM
-- clocks:  phandle for the pdmclk provider, likely <&twl6040>
-- clock-names: Must be "pdmclk"
-
-Example:
-
-mcpdm: mcpdm@40132000 {
-	compatible = "ti,omap4-mcpdm";
-	reg = <0x40132000 0x7f>, /* MPU private access */
-	      <0x49032000 0x7f>; /* L3 Interconnect */
-	interrupts = <0 112 0x4>;
-	interrupt-parent = <&gic>;
-	ti,hwmods = "mcpdm";
-};
-
-In board DTS file the pdmclk needs to be added:
-
-&mcpdm {
-	clocks = <&twl6040>;
-	clock-names = "pdmclk";
-	status = "okay";
-};
Documentation/devicetree/bindings/sound/omap-mcpdm.yaml new file +58 -0

58 lines not on this page · raw message

Signature · 1 line
2.34.1
#1 lore raw
Quoted 2 lines · Mighty

Convert the OMAP4+ McPDM bindings to DT schema.

Please use subject prefixes matching the subsystem. You can get them for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching.

Quoted 1 line

Is it your full name?

Quoted 15 lines
---
 .../devicetree/bindings/sound/omap-mcpdm.txt  | 30 ----------
 .../devicetree/bindings/sound/omap-mcpdm.yaml | 58 +++++++++++++++++++
 2 files changed, 58 insertions(+), 30 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/omap-mcpdm.txt
 create mode 100644 Documentation/devicetree/bindings/sound/omap-mcpdm.yaml
Documentation/devicetree/bindings/sound/omap-mcpdm.txt deleted +0 -2
deleted file mode 100644
index ff98a0cb5..000000000
@@ -1,30 +0,0 @@
-* Texas Instruments OMAP4+ McPDM
-

...

Documentation/devicetree/bindings/sound/omap-mcpdm.yaml

Quoted 5 lines
Documentation/devicetree/bindings/sound/omap-mcpdm.yaml new file +0 -0
new file mode 100644
index 000000000..8c9ff9d90

Filename like compatible.

Quoted 13 lines
Documentation/devicetree/bindings/sound/omap-mcpdm.yaml new file +12 -0
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/omap-mcpdm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OMAP McPDM
+
+maintainers:
+  - Krzysztof Kozlowski <[email protected]>
+
+description:

Documentation/devicetree/bindings/sound/omap-mcpdm.yaml line 22

Quoted 10 lines
Documentation/devicetree/bindings/sound/omap-mcpdm.yaml new file +10 -0
+  OMAP ALSA SoC DAI driver using McPDM port used by TWL6040
+
+properties:
+  compatible:
+    const: ti,omap4-mcpdm
+
+  reg:
+    description: 'Register location and size as an array:
+       <MPU access base address, size>,
+       <L3 interconnect address, size>;'

Please open existing bindings and look how it is done there.

Documentation/devicetree/bindings/sound/omap-mcpdm.yaml line 25

Quoted 3 lines
Documentation/devicetree/bindings/sound/omap-mcpdm.yaml new file +3 -0
+
+  interrupts:
+    description: Interrupt number for McPDM

Same problem. Drop useless description but provide maxItems.

Documentation/devicetree/bindings/sound/omap-mcpdm.yaml line 28

Quoted 3 lines
Documentation/devicetree/bindings/sound/omap-mcpdm.yaml new file +3 -0
+
+  ti,hwmods:
+    description: Name of the hwmod associated to the McPDM

It does not look like you tested the bindings, at least after quick look. Please run make dt_binding_check (see Documentation/devicetree/bindings/writing-schema.rst for instructions). Maybe you need to update your dtschema and yamllint.

Sorry, this was neither tested nor done in a way matching anything already in the tree. Please do not invent your own style, but open existing binding and look how is it done.

Because of above, I did not perform full review.

Quoted 11 lines
Documentation/devicetree/bindings/sound/omap-mcpdm.yaml new file +11 -0
+
+  clocks:
+    description: phandle for the pdmclk provider, likely <&twl6040>
+
+  clock-names:
+    description: Must be "pdmclk"
+
+
+required:
+  - compatible
+  - reg

Documentation/devicetree/bindings/sound/omap-mcpdm.yaml line 49

Quoted 10 lines
Documentation/devicetree/bindings/sound/omap-mcpdm.yaml new file +10 -0
+  - interrupts
+  - ti,hwmods
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    mcpdm: mcpdm@40132000 {

Node names should be generic. See also an explanation and list of examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

Best regards,
Krzysztof