public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema
@ 2024-05-30 11:12 Mighty
  2024-05-31  8:58 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Mighty @ 2024-05-30 11:12 UTC (permalink / raw)
  Cc: peter.ujfalusi, Mithil Bavishi, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lopez Cruz,
	linux-sound, devicetree, linux-kernel

From: Mithil Bavishi <bavishimithil@gmail.com>

Convert the OMAP4+ McPDM bindings to DT schema.

Signed-off-by: Mithil Bavishi <bavishimithil@gmail.com>
---
Changelog v6:
- Add dma property
- Add dma-names property
- Add reg-names property
- Remove ti,hwmods completely (no longer needed since the sysc
  conversion)
- Update example to match one in DTS

Changelog v5:
- Add imports for constants
- Add desc to ti,hwmods

Changelog v4:
- Changed maintainer name
- Use $ref and enum in ti-hwmods property
- Make clocks property only have maxItems, no description
- Add items to clock-names
- Fix address of node in example
- Remove extra line

 .../devicetree/bindings/sound/omap-mcpdm.txt  | 30 --------
 .../bindings/sound/ti,omap4-mcpdm.yaml        | 73 +++++++++++++++++++
 2 files changed, 73 insertions(+), 30 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/omap-mcpdm.txt
 create mode 100644 Documentation/devicetree/bindings/sound/ti,omap4-mcpdm.yaml

diff --git a/Documentation/devicetree/bindings/sound/omap-mcpdm.txt b/Documentation/devicetree/bindings/sound/omap-mcpdm.txt
deleted file mode 100644
index ff98a0cb5..000000000
--- a/Documentation/devicetree/bindings/sound/omap-mcpdm.txt
+++ /dev/null
@@ -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";
-};
diff --git a/Documentation/devicetree/bindings/sound/ti,omap4-mcpdm.yaml b/Documentation/devicetree/bindings/sound/ti,omap4-mcpdm.yaml
new file mode 100644
index 000000000..cdea0a008
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ti,omap4-mcpdm.yaml
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/ti,omap4-mcpdm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OMAP McPDM
+
+maintainers:
+  - Misael Lopez Cruz <misael.lopez@ti.com>
+
+description:
+  OMAP ALSA SoC DAI driver using McPDM port used by TWL6040
+
+properties:
+  compatible:
+    const: ti,omap4-mcpdm
+
+  reg:
+    items:
+      - description: MPU access base address
+      - description: L3 interconnect address
+
+  reg-names:
+    items:
+      - const: mpu
+      - const: dma
+
+  interrupts:
+    maxItems: 1
+
+  dmas:
+    maxItems: 2
+
+  dma-names:
+    items:
+      - const: up_link
+      - const: dn_link
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: pdmclk
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - interrupts
+  - dmas
+  - dma-names
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    mcpdm@0 {
+      compatible = "ti,omap4-mcpdm";
+      reg = <0x0 0x7f>, /* MPU private access */
+            <0x49032000 0x7f>; /* L3 Interconnect */
+      reg-names = "mpu", "dma";
+      interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+      interrupt-parent = <&gic>;
+      dmas = <&sdma 65>, <&sdma 66>;
+      dma-names = "up_link", "dn_link";
+      clocks = <&twl6040>;
+      clock-names = "pdmclk";
+    };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v6] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema
  2024-05-30 11:12 [PATCH v6] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema Mighty
@ 2024-05-31  8:58 ` Krzysztof Kozlowski
  2024-06-01  6:16   ` Mithil
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-05-31  8:58 UTC (permalink / raw)
  To: Mighty
  Cc: peter.ujfalusi, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Lopez Cruz, linux-sound,
	devicetree, linux-kernel

On 30/05/2024 13:12, Mighty wrote:
> From: Mithil Bavishi <bavishimithil@gmail.com>
> 
> Convert the OMAP4+ McPDM bindings to DT schema.
> 
> Signed-off-by: Mithil Bavishi <bavishimithil@gmail.com>

> +
> +properties:
> +  compatible:
> +    const: ti,omap4-mcpdm
> +
> +  reg:
> +    items:
> +      - description: MPU access base address
> +      - description: L3 interconnect address
> +
> +  reg-names:
> +    items:
> +      - const: mpu
> +      - const: dma
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  dmas:
> +    maxItems: 2
> +
> +  dma-names:
> +    items:
> +      - const: up_link
> +      - const: dn_link

Please mention in the commit msg all changes (and explain why!) done
during conversion (comparing to original binding). I am pretty sure I
gave this feedback already.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v6] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema
  2024-05-31  8:58 ` Krzysztof Kozlowski
@ 2024-06-01  6:16   ` Mithil
  2024-06-01 15:14     ` Krzysztof Kozlowski
  2024-06-02 15:18     ` Krzysztof Kozlowski
  0 siblings, 2 replies; 7+ messages in thread
From: Mithil @ 2024-06-01  6:16 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: peter.ujfalusi, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Lopez Cruz, linux-sound,
	devicetree, linux-kernel

> Please mention in the commit msg all changes (and explain why!) done
> during conversion (comparing to original binding). I am pretty sure I
> gave this feedback already.
I read that i'm supposed to add the changelog below the --- line, my
bad. I'll mention the changes in the commit message itself and that
too from v2 right?

-- 
Best Regards,
Mithil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v6] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema
  2024-06-01  6:16   ` Mithil
@ 2024-06-01 15:14     ` Krzysztof Kozlowski
  2024-06-01 17:35       ` Mithil
  2024-06-02 15:18     ` Krzysztof Kozlowski
  1 sibling, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-01 15:14 UTC (permalink / raw)
  To: Mithil
  Cc: peter.ujfalusi, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Lopez Cruz, linux-sound,
	devicetree, linux-kernel

On 01/06/2024 08:16, Mithil wrote:
>> Please mention in the commit msg all changes (and explain why!) done
>> during conversion (comparing to original binding). I am pretty sure I
>> gave this feedback already.
> I read that i'm supposed to add the changelog below the --- line, my
> bad. I'll mention the changes in the commit message itself and that
> too from v2 right?

I think you are now mixing different things. changelog and differences
comparing to pure 1-to-1 conversion.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v6] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema
  2024-06-01 15:14     ` Krzysztof Kozlowski
@ 2024-06-01 17:35       ` Mithil
  0 siblings, 0 replies; 7+ messages in thread
From: Mithil @ 2024-06-01 17:35 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: peter.ujfalusi, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Lopez Cruz, linux-sound,
	devicetree, linux-kernel

On Sat, Jun 1, 2024 at 8:44 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> I think you are now mixing different things. changelog and differences
> comparing to pure 1-to-1 conversion.
Oh my apologies, the commit message being more descriptive? Should it
also include the changelogs, or just a general description about mcpdm
and it being used in omap4/omap5 platforms?


-- 
Best Regards,
Mithil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v6] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema
  2024-06-01  6:16   ` Mithil
  2024-06-01 15:14     ` Krzysztof Kozlowski
@ 2024-06-02 15:18     ` Krzysztof Kozlowski
  2024-06-05  9:02       ` Mithil
  1 sibling, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-02 15:18 UTC (permalink / raw)
  To: Mithil
  Cc: peter.ujfalusi, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Lopez Cruz, linux-sound,
	devicetree, linux-kernel

On 01/06/2024 08:16, Mithil wrote:
>> Please mention in the commit msg all changes (and explain why!) done
>> during conversion (comparing to original binding). I am pretty sure I
>> gave this feedback already.
> I read that i'm supposed to add the changelog below the --- line, my
> bad. I'll mention the changes in the commit message itself and that
> too from v2 right?
> 

https://lore.kernel.org/all/20240528164227.1988357-1-andreas@kemnade.info/

https://lore.kernel.org/all/20240530211654.7946-1-ansuelsmth@gmail.com/

https://lore.kernel.org/all/20240522151616.27397-1-pratik.farkase@wsisweden.com/

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v6] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema
  2024-06-02 15:18     ` Krzysztof Kozlowski
@ 2024-06-05  9:02       ` Mithil
  0 siblings, 0 replies; 7+ messages in thread
From: Mithil @ 2024-06-05  9:02 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: peter.ujfalusi, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Lopez Cruz, linux-sound,
	devicetree, linux-kernel

On Sun, Jun 2, 2024 at 8:49 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> https://lore.kernel.org/all/20240528164227.1988357-1-andreas@kemnade.info/
>
> https://lore.kernel.org/all/20240530211654.7946-1-ansuelsmth@gmail.com/
>
> https://lore.kernel.org/all/20240522151616.27397-1-pratik.farkase@wsisweden.com/
Understood, thanks a lot!
So something along the lines of
Convert the OMAP4+ McPDM bindings from txt to yaml (dtschema).
Drop ti.hwmods property as it is not needed since the sysc conversion.
Add dma, dma-names, reg-names properties to match the DTS so as to not
break the already existing ABI.
Update example to match the existing node.

Also update the changelog from the start noting all changes.

This much for v7 correct?

-- 
Best Regards,
Mithil

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-05  9:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-30 11:12 [PATCH v6] ASoC: dt-bindings: omap-mcpdm: Convert to DT schema Mighty
2024-05-31  8:58 ` Krzysztof Kozlowski
2024-06-01  6:16   ` Mithil
2024-06-01 15:14     ` Krzysztof Kozlowski
2024-06-01 17:35       ` Mithil
2024-06-02 15:18     ` Krzysztof Kozlowski
2024-06-05  9:02       ` Mithil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox