All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/10] ASoC: dt-bindings: audio-graph-port related update
@ 2023-01-11  1:07 ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:07 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Linux-ALSA, devicetree, Geert Uytterhoeven


Hi ASoC ML, DT ML
Cc Geert

These v2 patches fixups audio-graph-port, and its related DT schema.
Audio-Graph-Card and Simple-Audio-Card are similar Card
and are sharing same utils. Thus we can also sharing same schema.

This patch-set fixup some Renesas's "make dtbs_check".

v1 -> v2
	- remove patch for Nvidia
	- tidyup ti,pcm3168a schema
	  - maintainers
	  - ports
	- explain more on git-log

Link: https://lore.kernel.org/r/87v8mepyoy.wl-kuninori.morimoto.gx@renesas.com

Geert Uytterhoeven (1):
  ASoC: dt-bindings: ti,pcm3168a: Convert to json-schema

Kuninori Morimoto (9):
  ASoC: dt-bindings: audio-graph-port: use definitions for port/endpoint
  ASoC: dt-bindings: audio-graph-port: add definitions/ports
  ASoC: dt-bindings: audio-graph-port: add missing mclk-fs
  ASoC: dt-bindings: audio-graph-port: add clocks on endpoint
  ASoC: dt-bindings: audio-graph-port: remove prefix
  ASoC: dt-bindings: ak4613: enable Of-graph (Audio-Graph-Card) style
  ASoC: dt-bindings: renesas,rsnd: add missing playback/capture
  ASoC: dt-bindings: renesas,rsnd: #sound-dai-cells is not mandatory
  ASoC: dt-bindings: simple-card: add missing #address-cells/#size-cells

 .../devicetree/bindings/sound/ak4613.yaml     |   7 ++
 .../bindings/sound/audio-graph-port.yaml      |  65 +++++++----
 .../bindings/sound/renesas,rsnd.yaml          |  27 ++++-
 .../bindings/sound/simple-card.yaml           |   4 +
 .../devicetree/bindings/sound/ti,pcm3168a.txt |  56 ---------
 .../bindings/sound/ti,pcm3168a.yaml           | 107 ++++++++++++++++++
 6 files changed, 184 insertions(+), 82 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
 create mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml

-- 
2.25.1


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

* [PATCH v2 00/10] ASoC: dt-bindings: audio-graph-port related update
@ 2023-01-11  1:07 ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:07 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, Linux-ALSA, Geert Uytterhoeven


Hi ASoC ML, DT ML
Cc Geert

These v2 patches fixups audio-graph-port, and its related DT schema.
Audio-Graph-Card and Simple-Audio-Card are similar Card
and are sharing same utils. Thus we can also sharing same schema.

This patch-set fixup some Renesas's "make dtbs_check".

v1 -> v2
	- remove patch for Nvidia
	- tidyup ti,pcm3168a schema
	  - maintainers
	  - ports
	- explain more on git-log

Link: https://lore.kernel.org/r/87v8mepyoy.wl-kuninori.morimoto.gx@renesas.com

Geert Uytterhoeven (1):
  ASoC: dt-bindings: ti,pcm3168a: Convert to json-schema

Kuninori Morimoto (9):
  ASoC: dt-bindings: audio-graph-port: use definitions for port/endpoint
  ASoC: dt-bindings: audio-graph-port: add definitions/ports
  ASoC: dt-bindings: audio-graph-port: add missing mclk-fs
  ASoC: dt-bindings: audio-graph-port: add clocks on endpoint
  ASoC: dt-bindings: audio-graph-port: remove prefix
  ASoC: dt-bindings: ak4613: enable Of-graph (Audio-Graph-Card) style
  ASoC: dt-bindings: renesas,rsnd: add missing playback/capture
  ASoC: dt-bindings: renesas,rsnd: #sound-dai-cells is not mandatory
  ASoC: dt-bindings: simple-card: add missing #address-cells/#size-cells

 .../devicetree/bindings/sound/ak4613.yaml     |   7 ++
 .../bindings/sound/audio-graph-port.yaml      |  65 +++++++----
 .../bindings/sound/renesas,rsnd.yaml          |  27 ++++-
 .../bindings/sound/simple-card.yaml           |   4 +
 .../devicetree/bindings/sound/ti,pcm3168a.txt |  56 ---------
 .../bindings/sound/ti,pcm3168a.yaml           | 107 ++++++++++++++++++
 6 files changed, 184 insertions(+), 82 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
 create mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml

-- 
2.25.1


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

* [PATCH v2 01/10] ASoC: dt-bindings: audio-graph-port: use definitions for port/endpoint
  2023-01-11  1:07 ` Kuninori Morimoto
@ 2023-01-11  1:08   ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:08 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Linux-ALSA, devicetree, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Audio Graph base driver might need to add its own properties.
In such case, having definitions for port/endpoint is easy to handle it.
This patch adds definitions for port/endpoint.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../bindings/sound/audio-graph-port.yaml      | 39 +++++++++++--------
 1 file changed, 22 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
index f5b8b6d13077c..fa66b73abcaf2 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -11,25 +11,22 @@ maintainers:
 
 select: false
 
-allOf:
-  - $ref: /schemas/graph.yaml#/$defs/port-base
-
-properties:
-  prefix:
-    description: "device name prefix"
-    $ref: /schemas/types.yaml#/definitions/string
-  convert-rate:
-    $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
-  convert-channels:
-    $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
-  convert-sample-format:
-    $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
+definitions:
+  port-base:
+    $ref: /schemas/graph.yaml#/$defs/port-base
+    properties:
+      prefix:
+        description: "device name prefix"
+        $ref: /schemas/types.yaml#/definitions/string
+      convert-rate:
+        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
+      convert-channels:
+        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
+      convert-sample-format:
+        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
 
-patternProperties:
-  "^endpoint(@[0-9a-f]+)?":
+  endpoint-base:
     $ref: /schemas/graph.yaml#/$defs/endpoint-base
-    unevaluatedProperties: false
-
     properties:
       mclk-fs:
         description: |
@@ -100,4 +97,12 @@ patternProperties:
               minimum: 1
               maximum: 64
 
+allOf:
+  - $ref: "#/definitions/port-base"
+
+patternProperties:
+  "^endpoint(@[0-9a-f]+)?":
+    $ref: "#/definitions/endpoint-base"
+    unevaluatedProperties: false
+
 additionalProperties: true
-- 
2.25.1


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

* [PATCH v2 01/10] ASoC: dt-bindings: audio-graph-port: use definitions for port/endpoint
@ 2023-01-11  1:08   ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:08 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, Linux-ALSA, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Audio Graph base driver might need to add its own properties.
In such case, having definitions for port/endpoint is easy to handle it.
This patch adds definitions for port/endpoint.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../bindings/sound/audio-graph-port.yaml      | 39 +++++++++++--------
 1 file changed, 22 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
index f5b8b6d13077c..fa66b73abcaf2 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -11,25 +11,22 @@ maintainers:
 
 select: false
 
-allOf:
-  - $ref: /schemas/graph.yaml#/$defs/port-base
-
-properties:
-  prefix:
-    description: "device name prefix"
-    $ref: /schemas/types.yaml#/definitions/string
-  convert-rate:
-    $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
-  convert-channels:
-    $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
-  convert-sample-format:
-    $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
+definitions:
+  port-base:
+    $ref: /schemas/graph.yaml#/$defs/port-base
+    properties:
+      prefix:
+        description: "device name prefix"
+        $ref: /schemas/types.yaml#/definitions/string
+      convert-rate:
+        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
+      convert-channels:
+        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
+      convert-sample-format:
+        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
 
-patternProperties:
-  "^endpoint(@[0-9a-f]+)?":
+  endpoint-base:
     $ref: /schemas/graph.yaml#/$defs/endpoint-base
-    unevaluatedProperties: false
-
     properties:
       mclk-fs:
         description: |
@@ -100,4 +97,12 @@ patternProperties:
               minimum: 1
               maximum: 64
 
+allOf:
+  - $ref: "#/definitions/port-base"
+
+patternProperties:
+  "^endpoint(@[0-9a-f]+)?":
+    $ref: "#/definitions/endpoint-base"
+    unevaluatedProperties: false
+
 additionalProperties: true
-- 
2.25.1


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

* [PATCH v2 02/10] ASoC: dt-bindings: audio-graph-port: add definitions/ports
  2023-01-11  1:07 ` Kuninori Morimoto
@ 2023-01-11  1:09   ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:09 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Linux-ALSA, devicetree, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Audio Graph user needs "ports" not only "port".
This patch adds standard "ports" as definitions to use it easily.

If user needs standard "ports", it can use

   ports:
     $ref: audio-graph-port.yaml#/definitions/ports

If user want to use custom ports, it can re-use
audio-graph-port.yaml#/definitions/port-base"
audio-graph-port.yaml#/definitions/endpoint-base"

https://lore.kernel.org/r/87sfhipynv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../devicetree/bindings/sound/audio-graph-port.yaml  | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
index fa66b73abcaf2..6fcf7f567424d 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -97,6 +97,18 @@ definitions:
               minimum: 1
               maximum: 64
 
+  ports:
+    $ref: "#/definitions/port-base"
+    unevaluatedProperties: false
+    patternProperties:
+      "^port(@[0-9a-f]+)?$":
+        $ref: "#/definitions/port-base"
+        unevaluatedProperties: false
+        patternProperties:
+          "^endpoint(@[0-9a-f]+)?":
+            $ref: "#/definitions/endpoint-base"
+            unevaluatedProperties: false
+
 allOf:
   - $ref: "#/definitions/port-base"
 
-- 
2.25.1


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

* [PATCH v2 02/10] ASoC: dt-bindings: audio-graph-port: add definitions/ports
@ 2023-01-11  1:09   ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:09 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, Linux-ALSA, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Audio Graph user needs "ports" not only "port".
This patch adds standard "ports" as definitions to use it easily.

If user needs standard "ports", it can use

   ports:
     $ref: audio-graph-port.yaml#/definitions/ports

If user want to use custom ports, it can re-use
audio-graph-port.yaml#/definitions/port-base"
audio-graph-port.yaml#/definitions/endpoint-base"

https://lore.kernel.org/r/87sfhipynv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../devicetree/bindings/sound/audio-graph-port.yaml  | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
index fa66b73abcaf2..6fcf7f567424d 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -97,6 +97,18 @@ definitions:
               minimum: 1
               maximum: 64
 
+  ports:
+    $ref: "#/definitions/port-base"
+    unevaluatedProperties: false
+    patternProperties:
+      "^port(@[0-9a-f]+)?$":
+        $ref: "#/definitions/port-base"
+        unevaluatedProperties: false
+        patternProperties:
+          "^endpoint(@[0-9a-f]+)?":
+            $ref: "#/definitions/endpoint-base"
+            unevaluatedProperties: false
+
 allOf:
   - $ref: "#/definitions/port-base"
 
-- 
2.25.1


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

* [PATCH v2 03/10] ASoC: dt-bindings: audio-graph-port: add missing mclk-fs
  2023-01-11  1:07 ` Kuninori Morimoto
@ 2023-01-11  1:10   ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:10 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Linux-ALSA, devicetree, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

audio-graph-port is missing "mclk-fs" on ports/port,
it is used not only endpoint. It is already defined on simple-card.
This patch fixup it.
Without this patch, we will get below warning.

${LINUX}/arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dtb: audio-codec@44: ports: 'mclk-fs' does not match any of the regexes: '^port@[0-9a-f]+$', 'pinctrl-[0-9]+'
	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../devicetree/bindings/sound/audio-graph-port.yaml       | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
index 6fcf7f567424d..036682e55b2dd 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -24,16 +24,14 @@ definitions:
         $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
       convert-sample-format:
         $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
+      mclk-fs:
+        $ref: "simple-card.yaml#/definitions/mclk-fs"
 
   endpoint-base:
     $ref: /schemas/graph.yaml#/$defs/endpoint-base
     properties:
       mclk-fs:
-        description: |
-          Multiplication factor between stream rate and codec mclk.
-          When defined, mclk-fs property defined in dai-link sub nodes are
-          ignored.
-        $ref: /schemas/types.yaml#/definitions/uint32
+        $ref: "simple-card.yaml#/definitions/mclk-fs"
       frame-inversion:
         description: dai-link uses frame clock inversion
         $ref: /schemas/types.yaml#/definitions/flag
-- 
2.25.1


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

* [PATCH v2 03/10] ASoC: dt-bindings: audio-graph-port: add missing mclk-fs
@ 2023-01-11  1:10   ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:10 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, Linux-ALSA, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

audio-graph-port is missing "mclk-fs" on ports/port,
it is used not only endpoint. It is already defined on simple-card.
This patch fixup it.
Without this patch, we will get below warning.

${LINUX}/arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dtb: audio-codec@44: ports: 'mclk-fs' does not match any of the regexes: '^port@[0-9a-f]+$', 'pinctrl-[0-9]+'
	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../devicetree/bindings/sound/audio-graph-port.yaml       | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
index 6fcf7f567424d..036682e55b2dd 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -24,16 +24,14 @@ definitions:
         $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
       convert-sample-format:
         $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
+      mclk-fs:
+        $ref: "simple-card.yaml#/definitions/mclk-fs"
 
   endpoint-base:
     $ref: /schemas/graph.yaml#/$defs/endpoint-base
     properties:
       mclk-fs:
-        description: |
-          Multiplication factor between stream rate and codec mclk.
-          When defined, mclk-fs property defined in dai-link sub nodes are
-          ignored.
-        $ref: /schemas/types.yaml#/definitions/uint32
+        $ref: "simple-card.yaml#/definitions/mclk-fs"
       frame-inversion:
         description: dai-link uses frame clock inversion
         $ref: /schemas/types.yaml#/definitions/flag
-- 
2.25.1


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

* [PATCH v2 04/10] ASoC: dt-bindings: audio-graph-port: add clocks on endpoint
  2023-01-11  1:07 ` Kuninori Morimoto
@ 2023-01-11  1:10   ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:10 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Linux-ALSA, devicetree, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Audio Graph endpoint is possible to have clocks, and system-clock-xxx,
but these are missing on audio-graph-port.yaml.
These have been already defined on simple-card.yaml.

This patch re-use these.  We will get below warning without this patch.

${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dtb: audio-codec@44: ports:port@0:endpoint: Unevaluated properties are not allowed ('clocks' was unexpected)
	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml

Link: https://lore.kernel.org/r/87pmcmpyml.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../devicetree/bindings/sound/audio-graph-port.yaml      | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
index 036682e55b2dd..edd6cc37118ee 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -48,6 +48,15 @@ definitions:
         oneOf:
           - $ref: /schemas/types.yaml#/definitions/flag
           - $ref: /schemas/types.yaml#/definitions/phandle
+      clocks:
+        description: Indicates system clock
+        $ref: /schemas/types.yaml#/definitions/phandle
+      system-clock-frequency:
+        $ref: "simple-card.yaml#/definitions/system-clock-frequency"
+      system-clock-direction-out:
+        $ref: "simple-card.yaml#/definitions/system-clock-direction-out"
+      system-clock-fixed:
+        $ref: "simple-card.yaml#/definitions/system-clock-fixed"
 
       dai-format:
         description: audio format.
-- 
2.25.1


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

* [PATCH v2 04/10] ASoC: dt-bindings: audio-graph-port: add clocks on endpoint
@ 2023-01-11  1:10   ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:10 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, Linux-ALSA, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Audio Graph endpoint is possible to have clocks, and system-clock-xxx,
but these are missing on audio-graph-port.yaml.
These have been already defined on simple-card.yaml.

This patch re-use these.  We will get below warning without this patch.

${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dtb: audio-codec@44: ports:port@0:endpoint: Unevaluated properties are not allowed ('clocks' was unexpected)
	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml

Link: https://lore.kernel.org/r/87pmcmpyml.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../devicetree/bindings/sound/audio-graph-port.yaml      | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
index 036682e55b2dd..edd6cc37118ee 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -48,6 +48,15 @@ definitions:
         oneOf:
           - $ref: /schemas/types.yaml#/definitions/flag
           - $ref: /schemas/types.yaml#/definitions/phandle
+      clocks:
+        description: Indicates system clock
+        $ref: /schemas/types.yaml#/definitions/phandle
+      system-clock-frequency:
+        $ref: "simple-card.yaml#/definitions/system-clock-frequency"
+      system-clock-direction-out:
+        $ref: "simple-card.yaml#/definitions/system-clock-direction-out"
+      system-clock-fixed:
+        $ref: "simple-card.yaml#/definitions/system-clock-fixed"
 
       dai-format:
         description: audio format.
-- 
2.25.1


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

* [PATCH v2 05/10] ASoC: dt-bindings: audio-graph-port: remove prefix
  2023-01-11  1:07 ` Kuninori Morimoto
@ 2023-01-11  1:11   ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:11 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Linux-ALSA, devicetree, Geert Uytterhoeven


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Audio Graph port doesn't use prefix.
This patch removes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/audio-graph-port.yaml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
index edd6cc37118ee..6b4e02a0695ad 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -15,9 +15,6 @@ definitions:
   port-base:
     $ref: /schemas/graph.yaml#/$defs/port-base
     properties:
-      prefix:
-        description: "device name prefix"
-        $ref: /schemas/types.yaml#/definitions/string
       convert-rate:
         $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
       convert-channels:
-- 
2.25.1


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

* [PATCH v2 05/10] ASoC: dt-bindings: audio-graph-port: remove prefix
@ 2023-01-11  1:11   ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:11 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, Linux-ALSA, Geert Uytterhoeven


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Audio Graph port doesn't use prefix.
This patch removes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/audio-graph-port.yaml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
index edd6cc37118ee..6b4e02a0695ad 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -15,9 +15,6 @@ definitions:
   port-base:
     $ref: /schemas/graph.yaml#/$defs/port-base
     properties:
-      prefix:
-        description: "device name prefix"
-        $ref: /schemas/types.yaml#/definitions/string
       convert-rate:
         $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
       convert-channels:
-- 
2.25.1


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

* [PATCH v2 06/10] ASoC: dt-bindings: ti,pcm3168a: Convert to json-schema
  2023-01-11  1:07 ` Kuninori Morimoto
@ 2023-01-11  1:11   ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:11 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Linux-ALSA, devicetree, Geert Uytterhoeven

From: Geert Uytterhoeven <geert+renesas@glider.be>

Convert the Texas Instruments PCM3168A Audio Codec Device Tree binding
documentation to json-schema.

Add missing properties.
Drop unneeded pinctrl properties from example.

Link: https://lore.kernel.org/r/cover.1669980383.git.geert+renesas@glider.be
Link: https://lore.kernel.org/r/87mt7qpylw.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../devicetree/bindings/sound/ti,pcm3168a.txt |  56 ---------
 .../bindings/sound/ti,pcm3168a.yaml           | 107 ++++++++++++++++++
 2 files changed, 107 insertions(+), 56 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
 create mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml

diff --git a/Documentation/devicetree/bindings/sound/ti,pcm3168a.txt b/Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
deleted file mode 100644
index a02ecaab51832..0000000000000
--- a/Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-Texas Instruments pcm3168a DT bindings
-
-This driver supports both SPI and I2C bus access for this codec
-
-Required properties:
-
-  - compatible: "ti,pcm3168a"
-
-  - clocks : Contains an entry for each entry in clock-names
-
-  - clock-names : Includes the following entries:
-	"scki"	The system clock
-
-  - VDD1-supply : Digital power supply regulator 1 (+3.3V)
-
-  - VDD2-supply : Digital power supply regulator 2 (+3.3V)
-
-  - VCCAD1-supply : ADC power supply regulator 1 (+5V)
-
-  - VCCAD2-supply : ADC power supply regulator 2 (+5V)
-
-  - VCCDA1-supply : DAC power supply regulator 1 (+5V)
-
-  - VCCDA2-supply : DAC power supply regulator 2 (+5V)
-
-For required properties on SPI/I2C, consult SPI/I2C device tree documentation
-
-Optional properties:
-
-  - reset-gpios : Optional reset gpio line connected to RST pin of the codec.
-		  The RST line is low active:
-		  RST = low: device power-down
-		  RST = high: device is enabled
-
-Examples:
-
-i2c0: i2c0@0 {
-
-	...
-
-	pcm3168a: audio-codec@44 {
-		compatible = "ti,pcm3168a";
-		reg = <0x44>;
-		reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
-		clocks = <&clk_core CLK_AUDIO>;
-		clock-names = "scki";
-		VDD1-supply = <&supply3v3>;
-		VDD2-supply = <&supply3v3>;
-		VCCAD1-supply = <&supply5v0>;
-		VCCAD2-supply = <&supply5v0>;
-		VCCDA1-supply = <&supply5v0>;
-		VCCDA2-supply = <&supply5v0>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&dac_clk_pin>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml b/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
new file mode 100644
index 0000000000000..b6a4360ab845d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
@@ -0,0 +1,107 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/ti,pcm3168a.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments PCM3168A Audio Codec
+
+maintainers:
+  - Damien Horsley <Damien.Horsley@imgtec.com>
+  - Geert Uytterhoeven <geert+renesas@glider.be>
+  - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+description:
+  The Texas Instruments PCM3168A is a 24-bit Multi-channel Audio CODEC with
+  96/192kHz sampling rate, supporting both SPI and I2C bus access.
+
+properties:
+  compatible:
+    const: ti,pcm3168a
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: System clock input
+
+  clock-names:
+    items:
+      - const: scki
+
+  reset-gpios:
+    items:
+      - description: |
+          GPIO line connected to the active-low RST pin of the codec.
+            RST = low: device power-down
+            RST = high: device is enabled
+
+  "#sound-dai-cells":
+    enum: [0, 1]
+
+  VDD1-supply:
+    description: Digital power supply regulator 1 (+3.3V)
+
+  VDD2-supply:
+    description: Digital power supply regulator 2 (+3.3V)
+
+  VCCAD1-supply:
+    description: ADC power supply regulator 1 (+5V)
+
+  VCCAD2-supply:
+    description: ADC power supply regulator 2 (+5V)
+
+  VCCDA1-supply:
+    description: DAC power supply regulator 1 (+5V)
+
+  VCCDA2-supply:
+    description: DAC power supply regulator 2 (+5V)
+
+  ports:
+    $ref: audio-graph-port.yaml#/definitions/port-base
+    properties:
+      port@0:
+        $ref: audio-graph-port.yaml#
+        description: Audio input port.
+
+      port@1:
+        $ref: audio-graph-port.yaml#
+        description: Audio output port.
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - VDD1-supply
+  - VDD2-supply
+  - VCCAD1-supply
+  - VCCAD2-supply
+  - VCCDA1-supply
+  - VCCDA2-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pcm3168a: audio-codec@44 {
+            compatible = "ti,pcm3168a";
+            reg = <0x44>;
+            reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+            clocks = <&clk_core 42>;
+            clock-names = "scki";
+            VDD1-supply = <&supply3v3>;
+            VDD2-supply = <&supply3v3>;
+            VCCAD1-supply = <&supply5v0>;
+            VCCAD2-supply = <&supply5v0>;
+            VCCDA1-supply = <&supply5v0>;
+            VCCDA2-supply = <&supply5v0>;
+        };
+    };
-- 
2.25.1


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

* [PATCH v2 06/10] ASoC: dt-bindings: ti, pcm3168a: Convert to json-schema
@ 2023-01-11  1:11   ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:11 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, Linux-ALSA, Geert Uytterhoeven

From: Geert Uytterhoeven <geert+renesas@glider.be>

Convert the Texas Instruments PCM3168A Audio Codec Device Tree binding
documentation to json-schema.

Add missing properties.
Drop unneeded pinctrl properties from example.

Link: https://lore.kernel.org/r/cover.1669980383.git.geert+renesas@glider.be
Link: https://lore.kernel.org/r/87mt7qpylw.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../devicetree/bindings/sound/ti,pcm3168a.txt |  56 ---------
 .../bindings/sound/ti,pcm3168a.yaml           | 107 ++++++++++++++++++
 2 files changed, 107 insertions(+), 56 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
 create mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml

diff --git a/Documentation/devicetree/bindings/sound/ti,pcm3168a.txt b/Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
deleted file mode 100644
index a02ecaab51832..0000000000000
--- a/Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-Texas Instruments pcm3168a DT bindings
-
-This driver supports both SPI and I2C bus access for this codec
-
-Required properties:
-
-  - compatible: "ti,pcm3168a"
-
-  - clocks : Contains an entry for each entry in clock-names
-
-  - clock-names : Includes the following entries:
-	"scki"	The system clock
-
-  - VDD1-supply : Digital power supply regulator 1 (+3.3V)
-
-  - VDD2-supply : Digital power supply regulator 2 (+3.3V)
-
-  - VCCAD1-supply : ADC power supply regulator 1 (+5V)
-
-  - VCCAD2-supply : ADC power supply regulator 2 (+5V)
-
-  - VCCDA1-supply : DAC power supply regulator 1 (+5V)
-
-  - VCCDA2-supply : DAC power supply regulator 2 (+5V)
-
-For required properties on SPI/I2C, consult SPI/I2C device tree documentation
-
-Optional properties:
-
-  - reset-gpios : Optional reset gpio line connected to RST pin of the codec.
-		  The RST line is low active:
-		  RST = low: device power-down
-		  RST = high: device is enabled
-
-Examples:
-
-i2c0: i2c0@0 {
-
-	...
-
-	pcm3168a: audio-codec@44 {
-		compatible = "ti,pcm3168a";
-		reg = <0x44>;
-		reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
-		clocks = <&clk_core CLK_AUDIO>;
-		clock-names = "scki";
-		VDD1-supply = <&supply3v3>;
-		VDD2-supply = <&supply3v3>;
-		VCCAD1-supply = <&supply5v0>;
-		VCCAD2-supply = <&supply5v0>;
-		VCCDA1-supply = <&supply5v0>;
-		VCCDA2-supply = <&supply5v0>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&dac_clk_pin>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml b/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
new file mode 100644
index 0000000000000..b6a4360ab845d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
@@ -0,0 +1,107 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/ti,pcm3168a.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments PCM3168A Audio Codec
+
+maintainers:
+  - Damien Horsley <Damien.Horsley@imgtec.com>
+  - Geert Uytterhoeven <geert+renesas@glider.be>
+  - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+description:
+  The Texas Instruments PCM3168A is a 24-bit Multi-channel Audio CODEC with
+  96/192kHz sampling rate, supporting both SPI and I2C bus access.
+
+properties:
+  compatible:
+    const: ti,pcm3168a
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: System clock input
+
+  clock-names:
+    items:
+      - const: scki
+
+  reset-gpios:
+    items:
+      - description: |
+          GPIO line connected to the active-low RST pin of the codec.
+            RST = low: device power-down
+            RST = high: device is enabled
+
+  "#sound-dai-cells":
+    enum: [0, 1]
+
+  VDD1-supply:
+    description: Digital power supply regulator 1 (+3.3V)
+
+  VDD2-supply:
+    description: Digital power supply regulator 2 (+3.3V)
+
+  VCCAD1-supply:
+    description: ADC power supply regulator 1 (+5V)
+
+  VCCAD2-supply:
+    description: ADC power supply regulator 2 (+5V)
+
+  VCCDA1-supply:
+    description: DAC power supply regulator 1 (+5V)
+
+  VCCDA2-supply:
+    description: DAC power supply regulator 2 (+5V)
+
+  ports:
+    $ref: audio-graph-port.yaml#/definitions/port-base
+    properties:
+      port@0:
+        $ref: audio-graph-port.yaml#
+        description: Audio input port.
+
+      port@1:
+        $ref: audio-graph-port.yaml#
+        description: Audio output port.
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - VDD1-supply
+  - VDD2-supply
+  - VCCAD1-supply
+  - VCCAD2-supply
+  - VCCDA1-supply
+  - VCCDA2-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pcm3168a: audio-codec@44 {
+            compatible = "ti,pcm3168a";
+            reg = <0x44>;
+            reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+            clocks = <&clk_core 42>;
+            clock-names = "scki";
+            VDD1-supply = <&supply3v3>;
+            VDD2-supply = <&supply3v3>;
+            VCCAD1-supply = <&supply5v0>;
+            VCCAD2-supply = <&supply5v0>;
+            VCCDA1-supply = <&supply5v0>;
+            VCCDA2-supply = <&supply5v0>;
+        };
+    };
-- 
2.25.1


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

* [PATCH v2 07/10] ASoC: dt-bindings: ak4613: enable Of-graph (Audio-Graph-Card) style
  2023-01-11  1:07 ` Kuninori Morimoto
@ 2023-01-11  1:11   ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:11 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Linux-ALSA, devicetree, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ak4613 is possible to use Of-graph (Audio-Graph-Card) style,
but we need to indicate it. Otherwise we will get below warning.
This patch add it.

${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: codec@10: 'port' does not match any of the regexes: '^asahi-kasei,in[1-2]-single-end$', '^asahi-kasei,out[1-6]-single-end$', 'pinctrl-[0-9]+'
	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ak4613.yaml

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/ak4613.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/ak4613.yaml b/Documentation/devicetree/bindings/sound/ak4613.yaml
index 010574645e6ae..75e13414d6eb1 100644
--- a/Documentation/devicetree/bindings/sound/ak4613.yaml
+++ b/Documentation/devicetree/bindings/sound/ak4613.yaml
@@ -25,6 +25,13 @@ properties:
   "#sound-dai-cells":
     const: 0
 
+  ports:
+    $ref: audio-graph-port.yaml#/definitions/ports
+
+  port:
+    $ref: audio-graph-port.yaml#
+    unevaluatedProperties: false
+
 patternProperties:
   "^asahi-kasei,in[1-2]-single-end$":
     description: Input Pin 1 - 2.
-- 
2.25.1


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

* [PATCH v2 07/10] ASoC: dt-bindings: ak4613: enable Of-graph (Audio-Graph-Card) style
@ 2023-01-11  1:11   ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:11 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, Linux-ALSA, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ak4613 is possible to use Of-graph (Audio-Graph-Card) style,
but we need to indicate it. Otherwise we will get below warning.
This patch add it.

${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: codec@10: 'port' does not match any of the regexes: '^asahi-kasei,in[1-2]-single-end$', '^asahi-kasei,out[1-6]-single-end$', 'pinctrl-[0-9]+'
	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ak4613.yaml

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/ak4613.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/ak4613.yaml b/Documentation/devicetree/bindings/sound/ak4613.yaml
index 010574645e6ae..75e13414d6eb1 100644
--- a/Documentation/devicetree/bindings/sound/ak4613.yaml
+++ b/Documentation/devicetree/bindings/sound/ak4613.yaml
@@ -25,6 +25,13 @@ properties:
   "#sound-dai-cells":
     const: 0
 
+  ports:
+    $ref: audio-graph-port.yaml#/definitions/ports
+
+  port:
+    $ref: audio-graph-port.yaml#
+    unevaluatedProperties: false
+
 patternProperties:
   "^asahi-kasei,in[1-2]-single-end$":
     description: Input Pin 1 - 2.
-- 
2.25.1


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

* [PATCH v2 08/10] ASoC: dt-bindings: renesas,rsnd: add missing playback/capture
  2023-01-11  1:07 ` Kuninori Morimoto
@ 2023-01-11  1:12   ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:12 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Linux-ALSA, devicetree, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

renesas,rsnd.yaml is possible to use ports/port/endpoint if it is using
Audio Graph Card/Card2 for sound. The schema is defined under
audio-graph-port.yaml.

rsnd driver needs "playback/capture" property under endpoint, but it is not
defined in audio-graph-port.yaml. This patch adds missing "playback/capture"
properties under endpoint.

Without this patch, we will get below warning

${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: sound@ec500000: ports:port@0:endpoint: Unevaluated properties are not allowed ('playback', 'capture' were unexpected)
	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../bindings/sound/renesas,rsnd.yaml          | 25 ++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index cb90463c72973..6ea8dd74932c2 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -113,15 +113,34 @@ properties:
         - pattern: '^clk_(a|b|c|i)$'
 
   ports:
-    $ref: /schemas/graph.yaml#/properties/ports
+    $ref: audio-graph-port.yaml#/definitions/port-base
+    unevaluatedProperties: false
     patternProperties:
       '^port(@[0-9a-f]+)?$':
-        $ref: audio-graph-port.yaml#
+        $ref: audio-graph-port.yaml#/definitions/port-base
         unevaluatedProperties: false
+        patternProperties:
+          "^endpoint(@[0-9a-f]+)?":
+            $ref: audio-graph-port.yaml#/definitions/endpoint-base
+            properties:
+              playback:
+                $ref: /schemas/types.yaml#/definitions/phandle-array
+              capture:
+                $ref: /schemas/types.yaml#/definitions/phandle-array
+            unevaluatedProperties: false
 
   port:
-    $ref: audio-graph-port.yaml#
+    $ref: audio-graph-port.yaml#/definitions/port-base
     unevaluatedProperties: false
+    patternProperties:
+      "^endpoint(@[0-9a-f]+)?":
+        $ref: audio-graph-port.yaml#/definitions/endpoint-base
+        properties:
+          playback:
+            $ref: /schemas/types.yaml#/definitions/phandle-array
+          capture:
+            $ref: /schemas/types.yaml#/definitions/phandle-array
+        unevaluatedProperties: false
 
   rcar_sound,dvc:
     description: DVC subnode.
-- 
2.25.1


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

* [PATCH v2 08/10] ASoC: dt-bindings: renesas, rsnd: add missing playback/capture
@ 2023-01-11  1:12   ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:12 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, Linux-ALSA, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

renesas,rsnd.yaml is possible to use ports/port/endpoint if it is using
Audio Graph Card/Card2 for sound. The schema is defined under
audio-graph-port.yaml.

rsnd driver needs "playback/capture" property under endpoint, but it is not
defined in audio-graph-port.yaml. This patch adds missing "playback/capture"
properties under endpoint.

Without this patch, we will get below warning

${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: sound@ec500000: ports:port@0:endpoint: Unevaluated properties are not allowed ('playback', 'capture' were unexpected)
	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../bindings/sound/renesas,rsnd.yaml          | 25 ++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index cb90463c72973..6ea8dd74932c2 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -113,15 +113,34 @@ properties:
         - pattern: '^clk_(a|b|c|i)$'
 
   ports:
-    $ref: /schemas/graph.yaml#/properties/ports
+    $ref: audio-graph-port.yaml#/definitions/port-base
+    unevaluatedProperties: false
     patternProperties:
       '^port(@[0-9a-f]+)?$':
-        $ref: audio-graph-port.yaml#
+        $ref: audio-graph-port.yaml#/definitions/port-base
         unevaluatedProperties: false
+        patternProperties:
+          "^endpoint(@[0-9a-f]+)?":
+            $ref: audio-graph-port.yaml#/definitions/endpoint-base
+            properties:
+              playback:
+                $ref: /schemas/types.yaml#/definitions/phandle-array
+              capture:
+                $ref: /schemas/types.yaml#/definitions/phandle-array
+            unevaluatedProperties: false
 
   port:
-    $ref: audio-graph-port.yaml#
+    $ref: audio-graph-port.yaml#/definitions/port-base
     unevaluatedProperties: false
+    patternProperties:
+      "^endpoint(@[0-9a-f]+)?":
+        $ref: audio-graph-port.yaml#/definitions/endpoint-base
+        properties:
+          playback:
+            $ref: /schemas/types.yaml#/definitions/phandle-array
+          capture:
+            $ref: /schemas/types.yaml#/definitions/phandle-array
+        unevaluatedProperties: false
 
   rcar_sound,dvc:
     description: DVC subnode.
-- 
2.25.1


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

* [PATCH v2 09/10] ASoC: dt-bindings: renesas,rsnd: #sound-dai-cells is not mandatory
  2023-01-11  1:07 ` Kuninori Morimoto
@ 2023-01-11  1:12   ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:12 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Linux-ALSA, devicetree, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current renesas,rsnd is requesting #sound-dai-cells, but it is
needed in case of it is using "simple-card", but not needed in case of
"audio-graph". We will get below warning without this patch.
This patch fiup it.

${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: sound@ec500000: '#sound-dai-cells' is a required property
	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 6ea8dd74932c2..bd3a98efab5a5 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -68,6 +68,7 @@ properties:
     description: |
       it must be 0 if your system is using single DAI
       it must be 1 if your system is using multi  DAIs
+      This is used on simple-audio-card
     enum: [0, 1]
 
   "#clock-cells":
@@ -290,7 +291,6 @@ required:
   - reg-names
   - clocks
   - clock-names
-  - "#sound-dai-cells"
 
 allOf:
   - $ref: dai-common.yaml#
-- 
2.25.1


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

* [PATCH v2 09/10] ASoC: dt-bindings: renesas, rsnd: #sound-dai-cells is not mandatory
@ 2023-01-11  1:12   ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:12 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, Linux-ALSA, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current renesas,rsnd is requesting #sound-dai-cells, but it is
needed in case of it is using "simple-card", but not needed in case of
"audio-graph". We will get below warning without this patch.
This patch fiup it.

${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: sound@ec500000: '#sound-dai-cells' is a required property
	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 6ea8dd74932c2..bd3a98efab5a5 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -68,6 +68,7 @@ properties:
     description: |
       it must be 0 if your system is using single DAI
       it must be 1 if your system is using multi  DAIs
+      This is used on simple-audio-card
     enum: [0, 1]
 
   "#clock-cells":
@@ -290,7 +291,6 @@ required:
   - reg-names
   - clocks
   - clock-names
-  - "#sound-dai-cells"
 
 allOf:
   - $ref: dai-common.yaml#
-- 
2.25.1


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

* [PATCH v2 10/10] ASoC: dt-bindings: simple-card: add missing #address-cells/#size-cells
  2023-01-11  1:07 ` Kuninori Morimoto
@ 2023-01-11  1:12   ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:12 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Linux-ALSA, devicetree, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

In case of using MIXer with Simple Audio Card, it needs below DT.

	simple-audio-card,dai-link@1 {
		cpu@0 {
			...
		};
		cpu@1 {
			...
		};
		...
	};

This case, it requires "reg = <xxx>" which needs #address-cells/#size-cells,
but simple-audio-card.yaml is missing these. This patch adds it.

Without this patch, we will get below warning.

${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-ulcb.dtb: sound: simple-audio-card,dai-link@0: '#address-cells', '#size-cells' do not match any of the regexes: '^codec(@[0-9a-f]+)?', '^cpu(@[0-9a-f]+)?', 'pinctrl-[0-9]+'
	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.yaml

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/simple-card.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml
index 08743741b09eb..a69af0bfd371f 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.yaml
+++ b/Documentation/devicetree/bindings/sound/simple-card.yaml
@@ -215,6 +215,10 @@ patternProperties:
       reg:
         maxItems: 1
 
+      "#address-cells":
+        const: 1
+      "#size-cells":
+        const: 0
       # common properties
       frame-master:
         $ref: "#/definitions/frame-master"
-- 
2.25.1


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

* [PATCH v2 10/10] ASoC: dt-bindings: simple-card: add missing #address-cells/#size-cells
@ 2023-01-11  1:12   ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-11  1:12 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, Linux-ALSA, Geert Uytterhoeven

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

In case of using MIXer with Simple Audio Card, it needs below DT.

	simple-audio-card,dai-link@1 {
		cpu@0 {
			...
		};
		cpu@1 {
			...
		};
		...
	};

This case, it requires "reg = <xxx>" which needs #address-cells/#size-cells,
but simple-audio-card.yaml is missing these. This patch adds it.

Without this patch, we will get below warning.

${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-ulcb.dtb: sound: simple-audio-card,dai-link@0: '#address-cells', '#size-cells' do not match any of the regexes: '^codec(@[0-9a-f]+)?', '^cpu(@[0-9a-f]+)?', 'pinctrl-[0-9]+'
	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.yaml

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/simple-card.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml
index 08743741b09eb..a69af0bfd371f 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.yaml
+++ b/Documentation/devicetree/bindings/sound/simple-card.yaml
@@ -215,6 +215,10 @@ patternProperties:
       reg:
         maxItems: 1
 
+      "#address-cells":
+        const: 1
+      "#size-cells":
+        const: 0
       # common properties
       frame-master:
         $ref: "#/definitions/frame-master"
-- 
2.25.1


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

* Re: [PATCH v2 08/10] ASoC: dt-bindings: renesas,rsnd: add missing playback/capture
  2023-01-11  1:12   ` [PATCH v2 08/10] ASoC: dt-bindings: renesas, rsnd: " Kuninori Morimoto
@ 2023-01-11 13:29     ` Rob Herring
  -1 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2023-01-11 13:29 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: devicetree, Linux-ALSA, Mark Brown, Krzysztof Kozlowski,
	Geert Uytterhoeven


On Wed, 11 Jan 2023 01:12:18 +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> renesas,rsnd.yaml is possible to use ports/port/endpoint if it is using
> Audio Graph Card/Card2 for sound. The schema is defined under
> audio-graph-port.yaml.
> 
> rsnd driver needs "playback/capture" property under endpoint, but it is not
> defined in audio-graph-port.yaml. This patch adds missing "playback/capture"
> properties under endpoint.
> 
> Without this patch, we will get below warning
> 
> ${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: sound@ec500000: ports:port@0:endpoint: Unevaluated properties are not allowed ('playback', 'capture' were unexpected)
> 	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../bindings/sound/renesas,rsnd.yaml          | 25 ++++++++++++++++---
>  1 file changed, 22 insertions(+), 3 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: sound@ec500000: Unevaluated properties are not allowed ('rcar_sound,src' was unexpected)
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/87r0w1ho26.wl-kuninori.morimoto.gx@renesas.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

* Re: [PATCH v2 08/10] ASoC: dt-bindings: renesas,rsnd: add missing playback/capture
@ 2023-01-11 13:29     ` Rob Herring
  0 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2023-01-11 13:29 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Linux-ALSA, Geert Uytterhoeven, Krzysztof Kozlowski, Mark Brown,
	devicetree


On Wed, 11 Jan 2023 01:12:18 +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> renesas,rsnd.yaml is possible to use ports/port/endpoint if it is using
> Audio Graph Card/Card2 for sound. The schema is defined under
> audio-graph-port.yaml.
> 
> rsnd driver needs "playback/capture" property under endpoint, but it is not
> defined in audio-graph-port.yaml. This patch adds missing "playback/capture"
> properties under endpoint.
> 
> Without this patch, we will get below warning
> 
> ${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: sound@ec500000: ports:port@0:endpoint: Unevaluated properties are not allowed ('playback', 'capture' were unexpected)
> 	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../bindings/sound/renesas,rsnd.yaml          | 25 ++++++++++++++++---
>  1 file changed, 22 insertions(+), 3 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: sound@ec500000: Unevaluated properties are not allowed ('rcar_sound,src' was unexpected)
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/87r0w1ho26.wl-kuninori.morimoto.gx@renesas.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

* Re: [PATCH v2 08/10] ASoC: dt-bindings: renesas,rsnd: add missing playback/capture
  2023-01-11 13:29     ` Rob Herring
@ 2023-01-12  0:58       ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-12  0:58 UTC (permalink / raw)
  To: Rob Herring
  Cc: Linux-ALSA, Geert Uytterhoeven, Krzysztof Kozlowski, Mark Brown,
	devicetree


Hi Rob
Cc Mark

Thank you for your report

> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: sound@ec500000: Unevaluated properties are not allowed ('rcar_sound,src' was unexpected)
> 	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

This error is not generated by this patch, but already exist and not yet solved.
We need +1 patch to solve it.
I will post the patch and connect to this patch-set.

Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH v2 08/10] ASoC: dt-bindings: renesas, rsnd: add missing playback/capture
@ 2023-01-12  0:58       ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-12  0:58 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, Linux-ALSA, Mark Brown, Krzysztof Kozlowski,
	Geert Uytterhoeven


Hi Rob
Cc Mark

Thank you for your report

> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: sound@ec500000: Unevaluated properties are not allowed ('rcar_sound,src' was unexpected)
> 	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

This error is not generated by this patch, but already exist and not yet solved.
We need +1 patch to solve it.
I will post the patch and connect to this patch-set.

Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

* [PATCH 11/10] ASoC: dt-bindings: renesas,rsnd: tidyup rcar_sound,src
  2023-01-11  1:07 ` Kuninori Morimoto
@ 2023-01-12  1:01   ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-12  1:01 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Linux-ALSA, devicetree, Geert Uytterhoeven


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Some SRC is not implemented on some SoC, thus
interrupts/dmas/dma-names are not mandatory.
This patch solve it. Without this patch we will get below error
when 'make DT_CHECKER_FLAGS=-m dt_binding_check'.

dtschema/dtc warnings/errors:
${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: \
 sound@ec500000: Unevaluated properties are not allowed ('rcar_sound,src' was unexpected)
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

Link: https://lore.kernel.org/r/167344317928.394453.14105689826645262807.robh@kernel.org
Reported-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index bd3a98efab5a5..e01ec01792908 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -198,10 +198,6 @@ properties:
                   enum:
                     - tx
                     - rx
-        required:
-          - interrupts
-          - dmas
-          - dma-names
     additionalProperties: false
 
   rcar_sound,ssiu:
-- 
2.25.1


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

* [PATCH 11/10] ASoC: dt-bindings: renesas,rsnd: tidyup rcar_sound,src
@ 2023-01-12  1:01   ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-12  1:01 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, Linux-ALSA, Geert Uytterhoeven


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Some SRC is not implemented on some SoC, thus
interrupts/dmas/dma-names are not mandatory.
This patch solve it. Without this patch we will get below error
when 'make DT_CHECKER_FLAGS=-m dt_binding_check'.

dtschema/dtc warnings/errors:
${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: \
 sound@ec500000: Unevaluated properties are not allowed ('rcar_sound,src' was unexpected)
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

Link: https://lore.kernel.org/r/167344317928.394453.14105689826645262807.robh@kernel.org
Reported-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index bd3a98efab5a5..e01ec01792908 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -198,10 +198,6 @@ properties:
                   enum:
                     - tx
                     - rx
-        required:
-          - interrupts
-          - dmas
-          - dma-names
     additionalProperties: false
 
   rcar_sound,ssiu:
-- 
2.25.1


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

* Re: [PATCH 11/10] ASoC: dt-bindings: renesas,rsnd: tidyup rcar_sound,src
  2023-01-12  1:01   ` Kuninori Morimoto
@ 2023-01-12 12:22     ` Rob Herring
  -1 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2023-01-12 12:22 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Mark Brown, Geert Uytterhoeven, devicetree, Linux-ALSA,
	Krzysztof Kozlowski


On Thu, 12 Jan 2023 01:01:45 +0000, Kuninori Morimoto wrote:
> 
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Some SRC is not implemented on some SoC, thus
> interrupts/dmas/dma-names are not mandatory.
> This patch solve it. Without this patch we will get below error
> when 'make DT_CHECKER_FLAGS=-m dt_binding_check'.
> 
> dtschema/dtc warnings/errors:
> ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: \
>  sound@ec500000: Unevaluated properties are not allowed ('rcar_sound,src' was unexpected)
> 	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> 
> Link: https://lore.kernel.org/r/167344317928.394453.14105689826645262807.robh@kernel.org
> Reported-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 4 ----
>  1 file changed, 4 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: sound@ec500000: Unevaluated properties are not allowed ('port' was unexpected)
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/878ri84lc6.wl-kuninori.morimoto.gx@renesas.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

* Re: [PATCH 11/10] ASoC: dt-bindings: renesas, rsnd: tidyup rcar_sound, src
@ 2023-01-12 12:22     ` Rob Herring
  0 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2023-01-12 12:22 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: devicetree, Linux-ALSA, Mark Brown, Krzysztof Kozlowski,
	Geert Uytterhoeven


On Thu, 12 Jan 2023 01:01:45 +0000, Kuninori Morimoto wrote:
> 
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Some SRC is not implemented on some SoC, thus
> interrupts/dmas/dma-names are not mandatory.
> This patch solve it. Without this patch we will get below error
> when 'make DT_CHECKER_FLAGS=-m dt_binding_check'.
> 
> dtschema/dtc warnings/errors:
> ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: \
>  sound@ec500000: Unevaluated properties are not allowed ('rcar_sound,src' was unexpected)
> 	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> 
> Link: https://lore.kernel.org/r/167344317928.394453.14105689826645262807.robh@kernel.org
> Reported-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 4 ----
>  1 file changed, 4 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: sound@ec500000: Unevaluated properties are not allowed ('port' was unexpected)
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/878ri84lc6.wl-kuninori.morimoto.gx@renesas.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

* Re: [PATCH 11/10] ASoC: dt-bindings: renesas,rsnd: tidyup rcar_sound,src
  2023-01-12 12:22     ` [PATCH 11/10] ASoC: dt-bindings: renesas, rsnd: tidyup rcar_sound, src Rob Herring
@ 2023-01-12 22:53       ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-12 22:53 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Brown, Geert Uytterhoeven, devicetree, Linux-ALSA,
	Krzysztof Kozlowski


Hi Mark, Rob

> > Some SRC is not implemented on some SoC, thus
> > interrupts/dmas/dma-names are not mandatory.
> > This patch solve it. Without this patch we will get below error
> > when 'make DT_CHECKER_FLAGS=-m dt_binding_check'.
> > 
> > dtschema/dtc warnings/errors:
> > ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: \
> >  sound@ec500000: Unevaluated properties are not allowed ('rcar_sound,src' was unexpected)
> > 	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> > 
> > Link: https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fr%2F167344317928.394453.14105689826645262807.robh%40kernel.org&data=05%7C01%7Ckuninori.morimoto.gx%40renesas.com%7C134cb1f3436642e9441508daf497aa25%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C1%7C638091229473457624%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0z6yVah04cE%2BdpCxMMPdL4mJhICUA3HjecWVxM3V2fY%3D&reserved=0
> > Reported-by: Rob Herring <robh@kernel.org>
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> >  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 4 ----
> >  1 file changed, 4 deletions(-)
> > 
> 
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: sound@ec500000: Unevaluated properties are not allowed ('port' was unexpected)
> 	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

Current upstream has 2 errors on renesas,rsnd.yaml,
and my posted patches solve these one-by-one.
All errors should be gone if you added all patches.


Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH 11/10] ASoC: dt-bindings: renesas, rsnd: tidyup rcar_sound, src
@ 2023-01-12 22:53       ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-12 22:53 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, Linux-ALSA, Mark Brown, Krzysztof Kozlowski,
	Geert Uytterhoeven


Hi Mark, Rob

> > Some SRC is not implemented on some SoC, thus
> > interrupts/dmas/dma-names are not mandatory.
> > This patch solve it. Without this patch we will get below error
> > when 'make DT_CHECKER_FLAGS=-m dt_binding_check'.
> > 
> > dtschema/dtc warnings/errors:
> > ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: \
> >  sound@ec500000: Unevaluated properties are not allowed ('rcar_sound,src' was unexpected)
> > 	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> > 
> > Link: https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fr%2F167344317928.394453.14105689826645262807.robh%40kernel.org&data=05%7C01%7Ckuninori.morimoto.gx%40renesas.com%7C134cb1f3436642e9441508daf497aa25%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C1%7C638091229473457624%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0z6yVah04cE%2BdpCxMMPdL4mJhICUA3HjecWVxM3V2fY%3D&reserved=0
> > Reported-by: Rob Herring <robh@kernel.org>
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> >  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 4 ----
> >  1 file changed, 4 deletions(-)
> > 
> 
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: sound@ec500000: Unevaluated properties are not allowed ('port' was unexpected)
> 	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

Current upstream has 2 errors on renesas,rsnd.yaml,
and my posted patches solve these one-by-one.
All errors should be gone if you added all patches.


Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH v2 02/10] ASoC: dt-bindings: audio-graph-port: add definitions/ports
  2023-01-11  1:09   ` Kuninori Morimoto
@ 2023-01-17 17:04     ` Rob Herring
  -1 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2023-01-17 17:04 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Mark Brown, Krzysztof Kozlowski, Linux-ALSA, devicetree,
	Geert Uytterhoeven

On Wed, Jan 11, 2023 at 01:09:52AM +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Audio Graph user needs "ports" not only "port".
> This patch adds standard "ports" as definitions to use it easily.
> 
> If user needs standard "ports", it can use
> 
>    ports:
>      $ref: audio-graph-port.yaml#/definitions/ports
> 
> If user want to use custom ports, it can re-use
> audio-graph-port.yaml#/definitions/port-base"
> audio-graph-port.yaml#/definitions/endpoint-base"
> 
> https://lore.kernel.org/r/87sfhipynv.wl-kuninori.morimoto.gx@renesas.com
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../devicetree/bindings/sound/audio-graph-port.yaml  | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> index fa66b73abcaf2..6fcf7f567424d 100644
> --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> @@ -97,6 +97,18 @@ definitions:
>                minimum: 1
>                maximum: 64
>  
> +  ports:
> +    $ref: "#/definitions/port-base"

This applies to 'port' nodes, but this is the 'ports' node.

For example, this schema says you can have endpoint nodes directly under 
'ports' which is not valid.

But why do you need this? The graph.yaml schema should be sufficient 
because you aren't adding custom properties in 'ports'. BTW, the 
preference is to only add properties in 'endpoint' nodes.

> +    unevaluatedProperties: false
> +    patternProperties:
> +      "^port(@[0-9a-f]+)?$":
> +        $ref: "#/definitions/port-base"
> +        unevaluatedProperties: false

If 'ports' schema is applied to a DT, then its 'port' node(s) cannot 
have any additional properties. That defeats the point of patch 1.

You cannot have 2 schemas with child nodes and be able to extend the 
properties on the child nodes. The 2 child node schemas can't 'see' each 
other in that case. In these cases, the base child node schema has to be 
referenced directly by the extended child node schema.


> +        patternProperties:
> +          "^endpoint(@[0-9a-f]+)?":
> +            $ref: "#/definitions/endpoint-base"
> +            unevaluatedProperties: false

The same thing applies here.

Rob

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

* Re: [PATCH v2 02/10] ASoC: dt-bindings: audio-graph-port: add definitions/ports
@ 2023-01-17 17:04     ` Rob Herring
  0 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2023-01-17 17:04 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: devicetree, Linux-ALSA, Mark Brown, Geert Uytterhoeven,
	Krzysztof Kozlowski

On Wed, Jan 11, 2023 at 01:09:52AM +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Audio Graph user needs "ports" not only "port".
> This patch adds standard "ports" as definitions to use it easily.
> 
> If user needs standard "ports", it can use
> 
>    ports:
>      $ref: audio-graph-port.yaml#/definitions/ports
> 
> If user want to use custom ports, it can re-use
> audio-graph-port.yaml#/definitions/port-base"
> audio-graph-port.yaml#/definitions/endpoint-base"
> 
> https://lore.kernel.org/r/87sfhipynv.wl-kuninori.morimoto.gx@renesas.com
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../devicetree/bindings/sound/audio-graph-port.yaml  | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> index fa66b73abcaf2..6fcf7f567424d 100644
> --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> @@ -97,6 +97,18 @@ definitions:
>                minimum: 1
>                maximum: 64
>  
> +  ports:
> +    $ref: "#/definitions/port-base"

This applies to 'port' nodes, but this is the 'ports' node.

For example, this schema says you can have endpoint nodes directly under 
'ports' which is not valid.

But why do you need this? The graph.yaml schema should be sufficient 
because you aren't adding custom properties in 'ports'. BTW, the 
preference is to only add properties in 'endpoint' nodes.

> +    unevaluatedProperties: false
> +    patternProperties:
> +      "^port(@[0-9a-f]+)?$":
> +        $ref: "#/definitions/port-base"
> +        unevaluatedProperties: false

If 'ports' schema is applied to a DT, then its 'port' node(s) cannot 
have any additional properties. That defeats the point of patch 1.

You cannot have 2 schemas with child nodes and be able to extend the 
properties on the child nodes. The 2 child node schemas can't 'see' each 
other in that case. In these cases, the base child node schema has to be 
referenced directly by the extended child node schema.


> +        patternProperties:
> +          "^endpoint(@[0-9a-f]+)?":
> +            $ref: "#/definitions/endpoint-base"
> +            unevaluatedProperties: false

The same thing applies here.

Rob

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

* Re: [PATCH v2 03/10] ASoC: dt-bindings: audio-graph-port: add missing mclk-fs
  2023-01-11  1:10   ` Kuninori Morimoto
@ 2023-01-17 17:09     ` Rob Herring
  -1 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2023-01-17 17:09 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Mark Brown, Krzysztof Kozlowski, Linux-ALSA, devicetree,
	Geert Uytterhoeven

On Wed, Jan 11, 2023 at 01:10:29AM +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> audio-graph-port is missing "mclk-fs" on ports/port,
> it is used not only endpoint. It is already defined on simple-card.
> This patch fixup it.
> Without this patch, we will get below warning.
> 
> ${LINUX}/arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dtb: audio-codec@44: ports: 'mclk-fs' does not match any of the regexes: '^port@[0-9a-f]+$', 'pinctrl-[0-9]+'
> 	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml

IMO, the warning is correct. 'ports' should not be anything but a 
container of 'port' nodes. If something applies to all ports, then it 
should probably be in the device node (or implicit).

Rob

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

* Re: [PATCH v2 03/10] ASoC: dt-bindings: audio-graph-port: add missing mclk-fs
@ 2023-01-17 17:09     ` Rob Herring
  0 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2023-01-17 17:09 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: devicetree, Linux-ALSA, Mark Brown, Geert Uytterhoeven,
	Krzysztof Kozlowski

On Wed, Jan 11, 2023 at 01:10:29AM +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> audio-graph-port is missing "mclk-fs" on ports/port,
> it is used not only endpoint. It is already defined on simple-card.
> This patch fixup it.
> Without this patch, we will get below warning.
> 
> ${LINUX}/arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dtb: audio-codec@44: ports: 'mclk-fs' does not match any of the regexes: '^port@[0-9a-f]+$', 'pinctrl-[0-9]+'
> 	From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml

IMO, the warning is correct. 'ports' should not be anything but a 
container of 'port' nodes. If something applies to all ports, then it 
should probably be in the device node (or implicit).

Rob

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

* Re: [PATCH v2 05/10] ASoC: dt-bindings: audio-graph-port: remove prefix
  2023-01-11  1:11   ` Kuninori Morimoto
@ 2023-01-17 17:11     ` Rob Herring
  -1 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2023-01-17 17:11 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Krzysztof Kozlowski, Mark Brown, Geert Uytterhoeven, devicetree,
	Linux-ALSA


On Wed, 11 Jan 2023 01:11:08 +0000, Kuninori Morimoto wrote:
> 
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Audio Graph port doesn't use prefix.
> This patch removes it.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  Documentation/devicetree/bindings/sound/audio-graph-port.yaml | 3 ---
>  1 file changed, 3 deletions(-)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 05/10] ASoC: dt-bindings: audio-graph-port: remove prefix
@ 2023-01-17 17:11     ` Rob Herring
  0 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2023-01-17 17:11 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: devicetree, Linux-ALSA, Mark Brown, Geert Uytterhoeven,
	Krzysztof Kozlowski


On Wed, 11 Jan 2023 01:11:08 +0000, Kuninori Morimoto wrote:
> 
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Audio Graph port doesn't use prefix.
> This patch removes it.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  Documentation/devicetree/bindings/sound/audio-graph-port.yaml | 3 ---
>  1 file changed, 3 deletions(-)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 06/10] ASoC: dt-bindings: ti,pcm3168a: Convert to json-schema
  2023-01-11  1:11   ` [PATCH v2 06/10] ASoC: dt-bindings: ti, pcm3168a: " Kuninori Morimoto
@ 2023-01-17 17:12     ` Rob Herring
  -1 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2023-01-17 17:12 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: devicetree, Linux-ALSA, Mark Brown, Krzysztof Kozlowski,
	Geert Uytterhoeven


On Wed, 11 Jan 2023 01:11:35 +0000, Kuninori Morimoto wrote:
> From: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> Convert the Texas Instruments PCM3168A Audio Codec Device Tree binding
> documentation to json-schema.
> 
> Add missing properties.
> Drop unneeded pinctrl properties from example.
> 
> Link: https://lore.kernel.org/r/cover.1669980383.git.geert+renesas@glider.be
> Link: https://lore.kernel.org/r/87mt7qpylw.wl-kuninori.morimoto.gx@renesas.com
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../devicetree/bindings/sound/ti,pcm3168a.txt |  56 ---------
>  .../bindings/sound/ti,pcm3168a.yaml           | 107 ++++++++++++++++++
>  2 files changed, 107 insertions(+), 56 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 06/10] ASoC: dt-bindings: ti,pcm3168a: Convert to json-schema
@ 2023-01-17 17:12     ` Rob Herring
  0 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2023-01-17 17:12 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: devicetree, Geert Uytterhoeven, Mark Brown, Krzysztof Kozlowski,
	Linux-ALSA


On Wed, 11 Jan 2023 01:11:35 +0000, Kuninori Morimoto wrote:
> From: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> Convert the Texas Instruments PCM3168A Audio Codec Device Tree binding
> documentation to json-schema.
> 
> Add missing properties.
> Drop unneeded pinctrl properties from example.
> 
> Link: https://lore.kernel.org/r/cover.1669980383.git.geert+renesas@glider.be
> Link: https://lore.kernel.org/r/87mt7qpylw.wl-kuninori.morimoto.gx@renesas.com
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../devicetree/bindings/sound/ti,pcm3168a.txt |  56 ---------
>  .../bindings/sound/ti,pcm3168a.yaml           | 107 ++++++++++++++++++
>  2 files changed, 107 insertions(+), 56 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 02/10] ASoC: dt-bindings: audio-graph-port: add definitions/ports
  2023-01-17 17:04     ` Rob Herring
@ 2023-01-18  0:08       ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-18  0:08 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, Linux-ALSA, Mark Brown, Geert Uytterhoeven,
	Krzysztof Kozlowski


Hi Rob

Thank for your feedback. 

> > +  ports:
> > +    $ref: "#/definitions/port-base"
> 
> This applies to 'port' nodes, but this is the 'ports' node.
> 
> For example, this schema says you can have endpoint nodes directly under 
> 'ports' which is not valid.

It is a little bit confusable, but "port-base" doesn't include "endpoint" (A).
It is the reason why audio-graph-port.yaml has patternProperties for endpoint (B),
if my understand was correct.
And user use audio-graph-port.yaml for "port" (C)
Thus, above doesn't indicate that "ports" can use direct "endpoint".

	--- audio-graph-port.yaml ---
 ^	port-base:
 |	    $ref: /schemas/graph.yaml#/$defs/port-base
 |	    properties:
 |	      convert-rate:
 |	        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
(A)	      convert-channels:
 |	        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
 |	      convert-sample-format:
 |	        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
 |	      mclk-fs:
 v	        $ref: "simple-card.yaml#/definitions/mclk-fs"

	endpoint-base:
	    ...

	allOf:
(B)	  - $ref: "#/definitions/port-base"	/* this doesn't include "endpoint" */

	patternProperties:
(B)	  "^endpoint(@[0-9a-f]+)?":
	    $ref: "#/definitions/endpoint-base"	/* "endpoint" is defined here */
	    unevaluatedProperties: false
	-----------------------------

	--- port user ----
	port:
(C)	  $ref: audio-graph-port.yaml#
	------------------


> But why do you need this? The graph.yaml schema should be sufficient 

Sometimes Audio Graph Card/Card2 want to use "ports" not only "port".
People can use "audio-graph-card.yaml" as "port" today (C).
So we want to use similar style for *normal* "ports.
"ports" is defined under "definitions" (D), so there is no effect for normal
"port" user, I think.

	--- port user ----
	port:
(C)	  $ref: audio-graph-port.yaml#
	------------------
	--- ports user ---
	ports:
(D)	  $ref: audio-graph-port.yaml#/definitions/ports
	------------------

As I mentioned on git-log, *normal* ports user can use (D) style.
*custom* ports user can reuse "port-base" and "endpoint-base".
see below.

	---- git log ---------------------------------------
	If user needs standard "ports", it can use

	    ports:
	      $ref: audio-graph-port.yaml#/definitions/ports

	If user want to use custom ports, it can re-use
	audio-graph-port.yaml#/definitions/port-base"
	audio-graph-port.yaml#/definitions/endpoint-base"
	----------------------------------------------------

> because you aren't adding custom properties in 'ports'.
(snip)
> If 'ports' schema is applied to a DT, then its 'port' node(s) cannot 
> have any additional properties. That defeats the point of patch 1.

Renesas Sound want to have custom "port", but sometimes it want to use
"ports" too. [08/10] patch customs both "ports" and "port".

Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH v2 02/10] ASoC: dt-bindings: audio-graph-port: add definitions/ports
@ 2023-01-18  0:08       ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2023-01-18  0:08 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Brown, Krzysztof Kozlowski, Linux-ALSA, devicetree,
	Geert Uytterhoeven


Hi Rob

Thank for your feedback. 

> > +  ports:
> > +    $ref: "#/definitions/port-base"
> 
> This applies to 'port' nodes, but this is the 'ports' node.
> 
> For example, this schema says you can have endpoint nodes directly under 
> 'ports' which is not valid.

It is a little bit confusable, but "port-base" doesn't include "endpoint" (A).
It is the reason why audio-graph-port.yaml has patternProperties for endpoint (B),
if my understand was correct.
And user use audio-graph-port.yaml for "port" (C)
Thus, above doesn't indicate that "ports" can use direct "endpoint".

	--- audio-graph-port.yaml ---
 ^	port-base:
 |	    $ref: /schemas/graph.yaml#/$defs/port-base
 |	    properties:
 |	      convert-rate:
 |	        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
(A)	      convert-channels:
 |	        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
 |	      convert-sample-format:
 |	        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
 |	      mclk-fs:
 v	        $ref: "simple-card.yaml#/definitions/mclk-fs"

	endpoint-base:
	    ...

	allOf:
(B)	  - $ref: "#/definitions/port-base"	/* this doesn't include "endpoint" */

	patternProperties:
(B)	  "^endpoint(@[0-9a-f]+)?":
	    $ref: "#/definitions/endpoint-base"	/* "endpoint" is defined here */
	    unevaluatedProperties: false
	-----------------------------

	--- port user ----
	port:
(C)	  $ref: audio-graph-port.yaml#
	------------------


> But why do you need this? The graph.yaml schema should be sufficient 

Sometimes Audio Graph Card/Card2 want to use "ports" not only "port".
People can use "audio-graph-card.yaml" as "port" today (C).
So we want to use similar style for *normal* "ports.
"ports" is defined under "definitions" (D), so there is no effect for normal
"port" user, I think.

	--- port user ----
	port:
(C)	  $ref: audio-graph-port.yaml#
	------------------
	--- ports user ---
	ports:
(D)	  $ref: audio-graph-port.yaml#/definitions/ports
	------------------

As I mentioned on git-log, *normal* ports user can use (D) style.
*custom* ports user can reuse "port-base" and "endpoint-base".
see below.

	---- git log ---------------------------------------
	If user needs standard "ports", it can use

	    ports:
	      $ref: audio-graph-port.yaml#/definitions/ports

	If user want to use custom ports, it can re-use
	audio-graph-port.yaml#/definitions/port-base"
	audio-graph-port.yaml#/definitions/endpoint-base"
	----------------------------------------------------

> because you aren't adding custom properties in 'ports'.
(snip)
> If 'ports' schema is applied to a DT, then its 'port' node(s) cannot 
> have any additional properties. That defeats the point of patch 1.

Renesas Sound want to have custom "port", but sometimes it want to use
"ports" too. [08/10] patch customs both "ports" and "port".

Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

end of thread, other threads:[~2023-01-18  0:39 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-11  1:07 [PATCH v2 00/10] ASoC: dt-bindings: audio-graph-port related update Kuninori Morimoto
2023-01-11  1:07 ` Kuninori Morimoto
2023-01-11  1:08 ` [PATCH v2 01/10] ASoC: dt-bindings: audio-graph-port: use definitions for port/endpoint Kuninori Morimoto
2023-01-11  1:08   ` Kuninori Morimoto
2023-01-11  1:09 ` [PATCH v2 02/10] ASoC: dt-bindings: audio-graph-port: add definitions/ports Kuninori Morimoto
2023-01-11  1:09   ` Kuninori Morimoto
2023-01-17 17:04   ` Rob Herring
2023-01-17 17:04     ` Rob Herring
2023-01-18  0:08     ` Kuninori Morimoto
2023-01-18  0:08       ` Kuninori Morimoto
2023-01-11  1:10 ` [PATCH v2 03/10] ASoC: dt-bindings: audio-graph-port: add missing mclk-fs Kuninori Morimoto
2023-01-11  1:10   ` Kuninori Morimoto
2023-01-17 17:09   ` Rob Herring
2023-01-17 17:09     ` Rob Herring
2023-01-11  1:10 ` [PATCH v2 04/10] ASoC: dt-bindings: audio-graph-port: add clocks on endpoint Kuninori Morimoto
2023-01-11  1:10   ` Kuninori Morimoto
2023-01-11  1:11 ` [PATCH v2 05/10] ASoC: dt-bindings: audio-graph-port: remove prefix Kuninori Morimoto
2023-01-11  1:11   ` Kuninori Morimoto
2023-01-17 17:11   ` Rob Herring
2023-01-17 17:11     ` Rob Herring
2023-01-11  1:11 ` [PATCH v2 06/10] ASoC: dt-bindings: ti,pcm3168a: Convert to json-schema Kuninori Morimoto
2023-01-11  1:11   ` [PATCH v2 06/10] ASoC: dt-bindings: ti, pcm3168a: " Kuninori Morimoto
2023-01-17 17:12   ` [PATCH v2 06/10] ASoC: dt-bindings: ti,pcm3168a: " Rob Herring
2023-01-17 17:12     ` Rob Herring
2023-01-11  1:11 ` [PATCH v2 07/10] ASoC: dt-bindings: ak4613: enable Of-graph (Audio-Graph-Card) style Kuninori Morimoto
2023-01-11  1:11   ` Kuninori Morimoto
2023-01-11  1:12 ` [PATCH v2 08/10] ASoC: dt-bindings: renesas,rsnd: add missing playback/capture Kuninori Morimoto
2023-01-11  1:12   ` [PATCH v2 08/10] ASoC: dt-bindings: renesas, rsnd: " Kuninori Morimoto
2023-01-11 13:29   ` [PATCH v2 08/10] ASoC: dt-bindings: renesas,rsnd: " Rob Herring
2023-01-11 13:29     ` Rob Herring
2023-01-12  0:58     ` Kuninori Morimoto
2023-01-12  0:58       ` [PATCH v2 08/10] ASoC: dt-bindings: renesas, rsnd: " Kuninori Morimoto
2023-01-11  1:12 ` [PATCH v2 09/10] ASoC: dt-bindings: renesas,rsnd: #sound-dai-cells is not mandatory Kuninori Morimoto
2023-01-11  1:12   ` [PATCH v2 09/10] ASoC: dt-bindings: renesas, rsnd: " Kuninori Morimoto
2023-01-11  1:12 ` [PATCH v2 10/10] ASoC: dt-bindings: simple-card: add missing #address-cells/#size-cells Kuninori Morimoto
2023-01-11  1:12   ` Kuninori Morimoto
2023-01-12  1:01 ` [PATCH 11/10] ASoC: dt-bindings: renesas,rsnd: tidyup rcar_sound,src Kuninori Morimoto
2023-01-12  1:01   ` Kuninori Morimoto
2023-01-12 12:22   ` Rob Herring
2023-01-12 12:22     ` [PATCH 11/10] ASoC: dt-bindings: renesas, rsnd: tidyup rcar_sound, src Rob Herring
2023-01-12 22:53     ` [PATCH 11/10] ASoC: dt-bindings: renesas,rsnd: tidyup rcar_sound,src Kuninori Morimoto
2023-01-12 22:53       ` [PATCH 11/10] ASoC: dt-bindings: renesas, rsnd: tidyup rcar_sound, src Kuninori Morimoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.