Skip to contentSkip to conversation

dt-bindings: sound: convert rockchip spdif bindings to yaml

PATCH Superseded Johan Jonker 4 participants 10 messages Mar 24, 2020 – Mar 31, 2020

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 dt-bindings: sound: convert rockchip spdif bindings to yaml

Current dts files with 'spdif' nodes are manually verified. In order to automate this process rockchip-spdif.txt has to be converted to yaml.

Also rk3188.dtsi, rk3288.dtsi use an extra fallback string, so change this in the documentation.

Changed:
"rockchip,rk3188-spdif", "rockchip,rk3066-spdif"
"rockchip,rk3288-spdif", "rockchip,rk3066-spdif"

---
Changed V2:
dmas and dma-names layout

---
 .../devicetree/bindings/sound/rockchip-spdif.txt   | 45 -----------
 .../devicetree/bindings/sound/rockchip-spdif.yaml  | 94 ++++++++++++++++++++++
 2 files changed, 94 insertions(+), 45 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/rockchip-spdif.txt
 create mode 100644 Documentation/devicetree/bindings/sound/rockchip-spdif.yaml
Documentation/devicetree/bindings/sound/rockchip-spdif.txt deleted +0 -45
deleted file mode 100644
index ec20c1271..000000000
@@ -1,45 +0,0 @@
-* Rockchip SPDIF transceiver
-
-The S/PDIF audio block is a stereo transceiver that allows the
-processor to receive and transmit digital audio via an coaxial cable or
-a fibre cable.
-
-Required properties:
-
-- compatible: should be one of the following:
-   - "rockchip,rk3066-spdif"
-   - "rockchip,rk3188-spdif"
-   - "rockchip,rk3228-spdif"
-   - "rockchip,rk3288-spdif"
-   - "rockchip,rk3328-spdif"
-   - "rockchip,rk3366-spdif"
-   - "rockchip,rk3368-spdif"
-   - "rockchip,rk3399-spdif"
-- reg: physical base address of the controller and length of memory mapped
-  region.
-- interrupts: should contain the SPDIF interrupt.
-- dmas: DMA specifiers for tx dma. See the DMA client binding,
-  Documentation/devicetree/bindings/dma/dma.txt
-- dma-names: should be "tx"
-- clocks: a list of phandle + clock-specifier pairs, one for each entry
-  in clock-names.
-- clock-names: should contain following:
-   - "hclk": clock for SPDIF controller
-   - "mclk" : clock for SPDIF bus
-
-Required properties on RK3288:
-  - rockchip,grf: the phandle of the syscon node for the general register
-                   file (GRF)
-
-Example for the rk3188 SPDIF controller:
-
-spdif: spdif@1011e000 {
-	compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif";
-	reg = <0x1011e000 0x2000>;
-	interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-	dmas = <&dmac1_s 8>;
-	dma-names = "tx";
-	clock-names = "hclk", "mclk";
-	clocks = <&cru HCLK_SPDIF>, <&cru SCLK_SPDIF>;
-	#sound-dai-cells = <0>;
-};
Documentation/devicetree/bindings/sound/rockchip-spdif.yaml new file +94 -0

94 lines not on this page · raw message

Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 2/3 dt-bindings: sound: rockchip-spdif: add #sound-dai-cells property

'#sound-dai-cells' is required to properly interpret the list of DAI specified in the 'sound-dai' property, so add them to 'rockchip-spdif.yaml'

---
 Documentation/devicetree/bindings/sound/rockchip-spdif.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/sound/rockchip-spdif.yaml +5 -0
index d1c72c8a5..0546fd4cc 100644
@@ -57,6 +57,9 @@ properties:
       The phandle of the syscon node for the GRF register.
       Required property on RK3288.
 
+  "#sound-dai-cells":
+    const: 0
+
 required:
   - compatible
   - reg
@@ -65,6 +68,7 @@ required:
   - clock-names
   - dmas
   - dma-names
+  - "#sound-dai-cells"
 
 if:
   properties:
@@ -91,4 +95,5 @@ examples:
       clock-names = "mclk", "hclk";
       dmas = <&dmac1_s 8>;
       dma-names = "tx";
+      #sound-dai-cells = <0>;
     };
Signature · 1 line
2.11.0
maintainer Reviewed-by on v2 2/3
#2 lore raw

Re: [PATCH v2 2/3] dt-bindings: sound: rockchip-spdif: add #sound-dai-cells property

Quoted 9 lines · Johan Jonker

'#sound-dai-cells' is required to properly interpret the list of DAI specified in the 'sound-dai' property, so add them to 'rockchip-spdif.yaml'

---
 Documentation/devicetree/bindings/sound/rockchip-spdif.yaml | 5 +++++
 1 file changed, 5 insertions(+)
#3 lore raw

PATCH v2 3/3 dt-bindings: sound: rockchip-spdif: add power-domains property

In reply to Johan Jonker

In the old txt situation we add/describe only properties that are used by the driver/hardware itself. With yaml it also filters things in a node that are used by other drivers like 'power-domains' for rk3399, so add it to 'rockchip-spdif.yaml'.

---
 Documentation/devicetree/bindings/sound/rockchip-spdif.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/sound/rockchip-spdif.yaml +3 -0
index 0546fd4cc..f79dbd153 100644
@@ -51,6 +51,9 @@ properties:
   dma-names:
     const: tx
 
+  power-domains:
+    maxItems: 1
+
   rockchip,grf:
     $ref: /schemas/types.yaml#/definitions/phandle
     description:
Signature · 1 line
2.11.0
maintainer Reviewed-by on v2 3/3
#4 lore raw

Re: [PATCH v2 3/3] dt-bindings: sound: rockchip-spdif: add power-domains property

Quoted 10 lines · Johan Jonker

In the old txt situation we add/describe only properties that are used by the driver/hardware itself. With yaml it also filters things in a node that are used by other drivers like 'power-domains' for rk3399, so add it to 'rockchip-spdif.yaml'.

---
 Documentation/devicetree/bindings/sound/rockchip-spdif.yaml | 3 +++
 1 file changed, 3 insertions(+)
maintainer
#5 lore raw
In reply to Johan Jonker
Quoted 8 lines · Johan Jonker

Current dts files with 'spdif' nodes are manually verified. In order to automate this process rockchip-spdif.txt has to be converted to yaml.

---
Changed V2:
dmas and dma-names layout

This is the second v2 you've sent of this today - it adds these but drops Rob's ack?

maintainer
#6 lore raw

Hi Mark,

Am Dienstag, 24. März 2020, 14:35:06 CET schrieb Mark Brown:

Quoted 11 lines · Johan Jonker
Quoted 8 lines

Current dts files with 'spdif' nodes are manually verified. In order to automate this process rockchip-spdif.txt has to be converted to yaml.

---
Changed V2:
dmas and dma-names layout

This is the second v2 you've sent of this today

hmm at least when looking at my inbox ... I got one series for spdif in v2 (this one) and one for i2s in v2. And yes they do look somewhat identical in what they do but of course handle binding changes for different controllers.

Heiko

Quoted 3 lines

- it adds these but
drops Rob's ack?

maintainer
#7 lore raw
Quoted 8 lines · Heiko Stübner

Am Dienstag, 24. März 2020, 14:35:06 CET schrieb Mark Brown:

Quoted 1 line

This is the second v2 you've sent of this today

hmm at least when looking at my inbox ... I got one series for spdif in v2 (this one) and one for i2s in v2. And yes they do look somewhat identical in what they do but of course handle binding changes for different controllers.

Ah, this is one reason why I complain about subject lines - the extra dt-bindings at the front hides the difference in subject lines for me.

#8 lore raw
In reply to Mark Brown

Hi Mark,

Today I send 2 sets. One for I2S and one for SPDIF. 'power-domains' is added in respons to robh answer to rockchip,vop.txt conversion.

Quoted 20 lines
Quoted 8 lines

Hi,

Question for robh:

In the old txt situation we add/describe only properties that are used by the driver/hardware itself. With yaml it also filters things in a node that are used by other drivers like:

Quoted 5 lines

assigned-clocks:
assigned-clock-rates:
power-domains:

Should we add or not?

Yes, only pinctrl properties are automatically added.

We could change 'assigned-clocks', but for now I think they should be added.

Rob

Quoted 13 lines · Mark Brown
Quoted 8 lines · Johan Jonker

Current dts files with 'spdif' nodes are manually verified. In order to automate this process rockchip-spdif.txt has to be converted to yaml.

---
Changed V2:
dmas and dma-names layout

This is the second v2 you've sent of this today - it adds these but drops Rob's ack?

maintainer Reviewed-by on v2 1/3
#9 lore raw
In reply to Johan Jonker
Quoted 15 lines · Johan Jonker

Current dts files with 'spdif' nodes are manually verified. In order to automate this process rockchip-spdif.txt has to be converted to yaml.

Also rk3188.dtsi, rk3288.dtsi use an extra fallback string, so change this in the documentation.

Changed:
"rockchip,rk3188-spdif", "rockchip,rk3066-spdif" "rockchip,rk3288-spdif", "rockchip,rk3066-spdif"

---
Changed V2:
dmas and dma-names layout

Quoted 7 lines
---
 .../devicetree/bindings/sound/rockchip-spdif.txt   | 45 -----------
 .../devicetree/bindings/sound/rockchip-spdif.yaml  | 94 ++++++++++++++++++++++
 2 files changed, 94 insertions(+), 45 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/rockchip-spdif.txt
 create mode 100644 Documentation/devicetree/bindings/sound/rockchip-spdif.yaml