dt-bindings: sound: Convert Samsung I2S controller to dt-schema
A message that is not in the archive (sent off-list or not yet received): CGME20190917111420eucas1p1f4c9fc370f501b1ec1e2d2fb4299db96@eucas1p1.samsung.com
PATCH 1/2 dt-bindings: sound: Convert Samsung I2S controller to dt-schema
Convert Samsung I2S controller to newer dt-schema format
--- .../devicetree/bindings/sound/samsung-i2s.txt | 84 ------------- .../bindings/sound/samsung-i2s.yaml | 119 ++++++++++++++++++ 2 files changed, 119 insertions(+), 84 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.yaml
Documentation/devicetree/bindings/sound/samsung-i2s.txt deleted +0 -84
@@ -1,84 +0,0 @@ -* Samsung I2S controller - -Required SoC Specific Properties: - -- compatible : should be one of the following. - - samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. - - samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with - secondary fifo, s/w reset control and internal mux for root clk src. - - samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for - playback, stereo channel capture, secondary fifo using internal - or external dma, s/w reset control, internal mux for root clk src - and 7.1 channel TDM support for playback. TDM (Time division multiplexing) - is to allow transfer of multiple channel audio data on single data line. - - samsung,exynos7-i2s: with all the available features of exynos5 i2s, - exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo - with only external dma and more no.of root clk sampling frequencies. - - samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports - stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with - slightly modified bit offsets. - -- reg: physical base address of the controller and length of memory mapped - region. -- dmas: list of DMA controller phandle and DMA request line ordered pairs. -- dma-names: identifier string for each DMA request line in the dmas property. - These strings correspond 1:1 with the ordered pairs in dmas. -- clocks: Handle to iis clock and RCLK source clk. -- clock-names: - i2s0 uses some base clocks from CMU and some are from audio subsystem internal - clock controller. The clock names for i2s0 should be "iis", "i2s_opclk0" and - "i2s_opclk1" as shown in the example below. - i2s1 and i2s2 uses clocks from CMU. The clock names for i2s1 and i2s2 should - be "iis" and "i2s_opclk0". - "iis" is the i2s bus clock and i2s_opclk0, i2s_opclk1 are sources of the root - clk. i2s0 has internal mux to select the source of root clk and i2s1 and i2s2 - doesn't have any such mux. -- #clock-cells: should be 1, this property must be present if the I2S device - is a clock provider in terms of the common clock bindings, described in - ../clock/clock-bindings.txt. -- clock-output-names (deprecated): from the common clock bindings, names of - the CDCLK I2S output clocks, suggested values are "i2s_cdclk0", "i2s_cdclk1", - "i2s_cdclk3" for the I2S0, I2S1, I2S2 devices respectively. - -There are following clocks available at the I2S device nodes: - CLK_I2S_CDCLK - the CDCLK (CODECLKO) gate clock, - CLK_I2S_RCLK_PSR - the RCLK prescaler divider clock (corresponding to the - IISPSR register), - CLK_I2S_RCLK_SRC - the RCLKSRC mux clock (corresponding to RCLKSRC bit in - IISMOD register). - -Refer to the SoC datasheet for availability of the above clocks. -The CLK_I2S_RCLK_PSR and CLK_I2S_RCLK_SRC clocks are usually only available -in the IIS Multi Audio Interface. - -Note: Old DTs may not have the #clock-cells property and then not use the I2S -node as a clock supplier. - -Optional SoC Specific Properties: - -- samsung,idma-addr: Internal DMA register base address of the audio - sub system(used in secondary sound source). -- pinctrl-0: Should specify pin control groups used for this controller. -- pinctrl-names: Should contain only one value - "default". -- #sound-dai-cells: should be 1. - - -Example: - -i2s0: i2s@3830000 { - compatible = "samsung,s5pv210-i2s"; - reg = <0x03830000 0x100>; - dmas = <&pdma0 10 - &pdma0 9 - &pdma0 8>; - dma-names = "tx", "rx", "tx-sec"; - clocks = <&clock_audss EXYNOS_I2S_BUS>, - <&clock_audss EXYNOS_I2S_BUS>, - <&clock_audss EXYNOS_SCLK_I2S>; - clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; - #clock-cells = <1>; - samsung,idma-addr = <0x03000000>; - pinctrl-names = "default"; - pinctrl-0 = <&i2s0_bus>; - #sound-dai-cells = <1>; -};
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +119 -0
119 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 2/2 dt-bindings: sound: Convert Samsung SMDK audio complex
Convert Samsung SMDK audio complex to newer dt-schema format.
--- .../bindings/sound/samsung,smdk-wm8994.txt | 14 ------- .../bindings/sound/samsung,smdk-wm8994.yaml | 38 +++++++++++++++++++ 2 files changed, 38 insertions(+), 14 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt create mode 100644 Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.yaml
Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt deleted +0 -14
@@ -1,14 +0,0 @@ -Samsung SMDK audio complex - -Required properties: -- compatible : "samsung,smdk-wm8994" -- samsung,i2s-controller: The phandle of the Samsung I2S0 controller -- samsung,audio-codec: The phandle of the WM8994 audio codec -Example: - -sound { - compatible = "samsung,smdk-wm8994"; - - samsung,i2s-controller = <&i2s0>; - samsung,audio-codec = <&wm8994>; -};
Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.yaml new file +38 -0
@@ -0,0 +1,38 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/samsung,smdk-wm8994.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung SoC SMDK audio complex + +maintainers: + - Krzysztof Kozlowski <[email protected]> + - Sangbeom Kim <[email protected]> + - Sylwester Nawrocki <[email protected]> + +properties: + compatible: + const: "samsung,smdk-wm8994" + + samsung,i2s-controller: + $ref: /schemas/types.yaml#/definitions/phandle + description: The phandle of the Samsung I2S0 controller + + samsung,audio-codec: + $ref: /schemas/types.yaml#/definitions/phandle + description: The phandle of the WM8994 audio codec + +required: + - compatible + - samsung,i2s-controller + - samsung,audio-codec + +examples: + - | + sound { + compatible = "samsung,smdk-wm8994"; + samsung,i2s-controller = <&i2s0>; + samsung,audio-codec = <&wm8994>; + }; +
Signature · 1 line
2.17.1
PATCH v2 1/2 dt-bindings: sound: Convert Samsung I2S controller to dt-schema
In reply to Maciej FalkowskiConvert Samsung I2S controller to newer dt-schema format.
---
v2:
- Added missing Signed-off-by certificate
--- .../devicetree/bindings/sound/samsung-i2s.txt | 84 ------------- .../bindings/sound/samsung-i2s.yaml | 119 ++++++++++++++++++ 2 files changed, 119 insertions(+), 84 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.yaml
Documentation/devicetree/bindings/sound/samsung-i2s.txt deleted +0 -84
@@ -1,84 +0,0 @@ -* Samsung I2S controller - -Required SoC Specific Properties: - -- compatible : should be one of the following. - - samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. - - samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with - secondary fifo, s/w reset control and internal mux for root clk src. - - samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for - playback, stereo channel capture, secondary fifo using internal - or external dma, s/w reset control, internal mux for root clk src - and 7.1 channel TDM support for playback. TDM (Time division multiplexing) - is to allow transfer of multiple channel audio data on single data line. - - samsung,exynos7-i2s: with all the available features of exynos5 i2s, - exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo - with only external dma and more no.of root clk sampling frequencies. - - samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports - stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with - slightly modified bit offsets. - -- reg: physical base address of the controller and length of memory mapped - region. -- dmas: list of DMA controller phandle and DMA request line ordered pairs. -- dma-names: identifier string for each DMA request line in the dmas property. - These strings correspond 1:1 with the ordered pairs in dmas. -- clocks: Handle to iis clock and RCLK source clk. -- clock-names: - i2s0 uses some base clocks from CMU and some are from audio subsystem internal - clock controller. The clock names for i2s0 should be "iis", "i2s_opclk0" and - "i2s_opclk1" as shown in the example below. - i2s1 and i2s2 uses clocks from CMU. The clock names for i2s1 and i2s2 should - be "iis" and "i2s_opclk0". - "iis" is the i2s bus clock and i2s_opclk0, i2s_opclk1 are sources of the root - clk. i2s0 has internal mux to select the source of root clk and i2s1 and i2s2 - doesn't have any such mux. -- #clock-cells: should be 1, this property must be present if the I2S device - is a clock provider in terms of the common clock bindings, described in - ../clock/clock-bindings.txt. -- clock-output-names (deprecated): from the common clock bindings, names of - the CDCLK I2S output clocks, suggested values are "i2s_cdclk0", "i2s_cdclk1", - "i2s_cdclk3" for the I2S0, I2S1, I2S2 devices respectively. - -There are following clocks available at the I2S device nodes: - CLK_I2S_CDCLK - the CDCLK (CODECLKO) gate clock, - CLK_I2S_RCLK_PSR - the RCLK prescaler divider clock (corresponding to the - IISPSR register), - CLK_I2S_RCLK_SRC - the RCLKSRC mux clock (corresponding to RCLKSRC bit in - IISMOD register). - -Refer to the SoC datasheet for availability of the above clocks. -The CLK_I2S_RCLK_PSR and CLK_I2S_RCLK_SRC clocks are usually only available -in the IIS Multi Audio Interface. - -Note: Old DTs may not have the #clock-cells property and then not use the I2S -node as a clock supplier. - -Optional SoC Specific Properties: - -- samsung,idma-addr: Internal DMA register base address of the audio - sub system(used in secondary sound source). -- pinctrl-0: Should specify pin control groups used for this controller. -- pinctrl-names: Should contain only one value - "default". -- #sound-dai-cells: should be 1. - - -Example: - -i2s0: i2s@3830000 { - compatible = "samsung,s5pv210-i2s"; - reg = <0x03830000 0x100>; - dmas = <&pdma0 10 - &pdma0 9 - &pdma0 8>; - dma-names = "tx", "rx", "tx-sec"; - clocks = <&clock_audss EXYNOS_I2S_BUS>, - <&clock_audss EXYNOS_I2S_BUS>, - <&clock_audss EXYNOS_SCLK_I2S>; - clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; - #clock-cells = <1>; - samsung,idma-addr = <0x03000000>; - pinctrl-names = "default"; - pinctrl-0 = <&i2s0_bus>; - #sound-dai-cells = <1>; -};
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +119 -0
119 lines not on this page · raw message
Signature · 1 line
2.17.1
Sylwester Nawrocki
maintainerQuoted 65 lines · Maciej Falkowski
Convert Samsung I2S controller to newer dt-schema format.
Signed-off-by Maciej Falkowski <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>Documentation/devicetree/bindings/sound/samsung-i2s.txt deleted +0
-32@@ -1,84 +0,0 @@ -* Samsung I2S controller -- clocks: Handle to iis clock and RCLK source clk. -- clock-names: - i2s0 uses some base clocks from CMU and some are from audio subsystem internal - clock controller. The clock names for i2s0 should be "iis", "i2s_opclk0" and - "i2s_opclk1" as shown in the example below. - i2s1 and i2s2 uses clocks from CMU. The clock names for i2s1 and i2s2 should - be "iis" and "i2s_opclk0". - "iis" is the i2s bus clock and i2s_opclk0, i2s_opclk1 are sources of the root - clk. i2s0 has internal mux to select the source of root clk and i2s1 and i2s2 - doesn't have any such mux. - -There are following clocks available at the I2S device nodes: - CLK_I2S_CDCLK - the CDCLK (CODECLKO) gate clock, - CLK_I2S_RCLK_PSR - the RCLK prescaler divider clock (corresponding to the - IISPSR register), - CLK_I2S_RCLK_SRC - the RCLKSRC mux clock (corresponding to RCLKSRC bit in - IISMOD register). - -Refer to the SoC datasheet for availability of the above clocks. -The CLK_I2S_RCLK_PSR and CLK_I2S_RCLK_SRC clocks are usually only available -in the IIS Multi Audio Interface. - -Note: Old DTs may not have the #clock-cells property and then not use the I2S -node as a clock supplier. -Example: - -i2s0: i2s@3830000 { - clocks = <&clock_audss EXYNOS_I2S_BUS>, - <&clock_audss EXYNOS_I2S_BUS>, - <&clock_audss EXYNOS_SCLK_I2S>; -};Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +13
-0@@ -0,0 +1,119 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +properties: + clocks: + minItems: 1 + maxItems: 3 + + clock-names: + oneOf: + - items: + - const: iis + - items:
Documentation/devicetree/bindings/sound/samsung-i2s.yaml line 72
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +10
-0+ - const: iis + - const: i2s_opclk0 + - items: + - const: iis + - const: i2s_opclk0 + - const: i2s_opclk1 + description: | + "iis" is the i2s bus clock. + For i2s1 and i2s2 - "iis", "i2s_opclk0" + For i2s0 - "iis", "i2s_opclk0", "i2s_opclk1"
My impression is that there is a significant information loss in conversion
of: clocks, clock-names properties. Can't we describe the meaning of CLK_I2S_CDCLK, CLK_I2S_RCLK_PSR, CLK_I2S_RCLK_SRC supplier clocks similarly as it was in txt version?
Documentation/devicetree/bindings/sound/samsung-i2s.yaml line 111
Quoted 12 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +12
-0+examples: + - | + i2s0: i2s@3830000 { + compatible = "samsung,s5pv210-i2s"; + reg = <0x03830000 0x100>; + dmas = <&pdma0 10 + &pdma0 9 + &pdma0 8>; + dma-names = "tx", "rx", "tx-sec"; + clocks = <&clock_audss 0>, // EXYNOS_I2S_BUS + <&clock_audss 0>, // EXYNOS_I2S_BUS + <&clock_audss 0>; // EXYNOS_SCLK_I2S
It should not be <&clock_audss 0> for each clock, each clock has different index as indicated by the commented out macro definitions.
Quoted 1 line
+ clock-names = "iis", "
i2s_opclk0", "i2s_opclk1";
Signature · 2 lines
Thanks, Sylwester
Quoted 52 lines · Maciej Falkowski
Convert Samsung I2S controller to newer dt-schema format.
Signed-off-by Maciej Falkowski <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
v2:
- Added missing Signed-off-by certificate--- .../devicetree/bindings/sound/samsung-i2s.txt | 84 ------------- .../bindings/sound/samsung-i2s.yaml | 119 ++++++++++++++++++ 2 files changed, 119 insertions(+), 84 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.yamlDocumentation/devicetree/bindings/sound/samsung-i2s.yaml new file +31
-0@@ -0,0 +1,119 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/samsung-i2s.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung SoC I2S controller + +maintainers: + - Krzysztof Kozlowski <[email protected]> + - Sangbeom Kim <[email protected]> + - Sylwester Nawrocki <[email protected]> + +properties: + compatible: + description: | + samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. + + samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with + secondary fifo, s/w reset control and internal mux for root clk src. + + samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for + playback, stereo channel capture, secondary fifo using internal + or external dma, s/w reset control, internal mux for root clk src + and 7.1 channel TDM support for playback. TDM (Time division multiplexing) + is to allow transfer of multiple channel audio data on single data line. + + samsung,exynos7-i2s: with all the available features of exynos5 i2s. + + exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo + with only external dma and more no.of root clk sampling frequencies.
Documentation/devicetree/bindings/sound/samsung-i2s.yaml line 41
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +10
-0+ + samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports + stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with + slightly modified bit offsets. + enum: + - "samsung,s3c6410-i2s" + - "samsung,s5pv210-i2s" + - "samsung,exynos5420-i2s" + - "samsung,exynos7-i2s" + - "samsung,exynos7-i2s1"
No need for quotes here.
Documentation/devicetree/bindings/sound/samsung-i2s.yaml line 47
Quoted 6 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +6
-0+ + reg: + maxItems: 1 + + dmas: + description: list of DMA controller phandle and DMA request line ordered pairs.
How many?
Quoted 75 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +72
-1+ + dma-names: + description: | + identifier string for each DMA request line in the dmas property. + These strings correspond 1:1 with the ordered pairs in dmas. + + clocks: + minItems: 1 + maxItems: 3 + + clock-names: + oneOf: + - items: + - const: iis + - items: + - const: iis + - const: i2s_opclk0 + - items: + - const: iis + - const: i2s_opclk0 + - const: i2s_opclk1 + description: | + "iis" is the i2s bus clock. + For i2s1 and i2s2 - "iis", "i2s_opclk0" + For i2s0 - "iis", "i2s_opclk0", "i2s_opclk1" + + "#clock-cells": + const: 1 + + samsung,idma-addr: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Internal DMA register base address of the audio + sub system(used in secondary sound source). + + pinctrl-0: + description: Should specify pin control groups used for this controller. + + pinctrl-names: + const: default + + "#sound-dai-cells": + const: 1 + +required: + - compatible + - reg + - dmas + - dma-names + - clocks + - clock-names + +examples: + - | + i2s0: i2s@3830000 { + compatible = "samsung,s5pv210-i2s"; + reg = <0x03830000 0x100>; + dmas = <&pdma0 10 + &pdma0 9 + &pdma0 8>; + dma-names = "tx", "rx", "tx-sec"; + clocks = <&clock_audss 0>, // EXYNOS_I2S_BUS + <&clock_audss 0>, // EXYNOS_I2S_BUS + <&clock_audss 0>; // EXYNOS_SCLK_I2S + clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; + #clock-cells = <1>; + samsung,idma-addr = <0x03000000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2s0_bus>; + #sound-dai-cells = <1>; + }; + --2.17.1
Quoted 64 lines · Rob Herring
Quoted 50 lines · Maciej Falkowski
Convert Samsung I2S controller to newer dt-schema format.
Signed-off-by Maciej Falkowski <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
v2:
- Added missing Signed-off-by certificate--- .../devicetree/bindings/sound/samsung-i2s.txt | 84 ------------- .../bindings/sound/samsung-i2s.yaml | 119 ++++++++++++++++++ 2 files changed, 119 insertions(+), 84 deletions(-)delete mode 100644
Documentation/devicetree/bindings/sound/samsung-i2s.txtcreate mode 100644Documentation/devicetree/bindings/sound/samsung-i2s.yamlDocumentation/devicetree/bindings/sound/samsung-i2s.yaml new file +31
-0@@ -0,0 +1,119 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/samsung-i2s.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung SoC I2S controller + +maintainers: + - Krzysztof Kozlowski <[email protected]> + - Sangbeom Kim <[email protected]> + - Sylwester Nawrocki <[email protected]> + +properties: + compatible: + description: | + samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. + + samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with + secondary fifo, s/w reset control and internal mux for root clk src. + + samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for + playback, stereo channel capture, secondary fifo using internal + or external dma, s/w reset control, internal mux for root clk src + and 7.1 channel TDM support for playback. TDM (Time division multiplexing) + is to allow transfer of multiple channel audio data on single data line. + + samsung,exynos7-i2s: with all the available features of exynos5 i2s. + + exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo + with only external dma and more no.of root clk sampling frequencies.Documentation/devicetree/bindings/sound/samsung-i2s.yaml line 41
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +10
-0+ + samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports + stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with + slightly modified bit offsets. + enum: + - "samsung,s3c6410-i2s" + - "samsung,s5pv210-i2s" + - "samsung,exynos5420-i2s" + - "samsung,exynos7-i2s" + - "samsung,exynos7-i2s1"No need for quotes here.
Quoted 7 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml line 47
Quoted 6 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +6
-0+ + reg: + maxItems: 1 + + dmas: + description: list of DMA controller phandle and DMA request line ordered pairs.How many?
Hi Rob,
I have one problem with determining size of dmas.
It seems that there are only two options for dmas: tx, rx or tx, rx, tx-sec.
It looks like minItems should be two and maxItems should be three.
However, some of bindings have different definition of dmas.
When there is:
dmas = <&pdma0 10
&pdma0 9
&pdma0 8>;
the number of Items for dmas is one,
when there is:
dmas = <&pdma0 10>,
<&pdma0 9>,
<&pdma0 8>;
the number of Items is three.
Both of these are equal from perspective of dtc,
however from schema point of view, they have different size.
What is a proper solution to this kind of problem?
Best regards,
Maciej Falkowski
Quoted 76 lines
Quoted 75 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +72
-1+ + dma-names: + description: | + identifier string for each DMA request line in the dmas property. + These strings correspond 1:1 with the ordered pairs in dmas. + + clocks: + minItems: 1 + maxItems: 3 + + clock-names: + oneOf: + - items: + - const: iis + - items: + - const: iis + - const: i2s_opclk0 + - items: + - const: iis + - const: i2s_opclk0 + - const: i2s_opclk1 + description: | + "iis" is the i2s bus clock. + For i2s1 and i2s2 - "iis", "i2s_opclk0" + For i2s0 - "iis", "i2s_opclk0", "i2s_opclk1" + + "#clock-cells": + const: 1 + + samsung,idma-addr: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Internal DMA register base address of the audio + sub system(used in secondary sound source). + + pinctrl-0: + description: Should specify pin control groups used for this controller. + + pinctrl-names: + const: default + + "#sound-dai-cells": + const: 1 + +required: + - compatible + - reg + - dmas + - dma-names + - clocks + - clock-names + +examples: + - | + i2s0: i2s@3830000 { + compatible = "samsung,s5pv210-i2s"; + reg = <0x03830000 0x100>; + dmas = <&pdma0 10 + &pdma0 9 + &pdma0 8>; + dma-names = "tx", "rx", "tx-sec"; + clocks = <&clock_audss 0>, // EXYNOS_I2S_BUS + <&clock_audss 0>, // EXYNOS_I2S_BUS + <&clock_audss 0>; // EXYNOS_SCLK_I2S + clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; + #clock-cells = <1>; + samsung,idma-addr = <0x03000000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2s0_bus>; + #sound-dai-cells = <1>; + }; + --2.17.1
Quoted 100 lines · Maciej Falkowski
Quoted 64 lines · Rob Herring
Quoted 50 lines · Maciej Falkowski
Convert Samsung I2S controller to newer dt-schema format.
Signed-off-by Maciej Falkowski <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
v2:
- Added missing Signed-off-by certificate--- .../devicetree/bindings/sound/samsung-i2s.txt | 84 ------------- .../bindings/sound/samsung-i2s.yaml | 119 ++++++++++++++++++ 2 files changed, 119 insertions(+), 84 deletions(-)delete mode 100644
Documentation/devicetree/bindings/sound/samsung-i2s.txtcreate mode 100644Documentation/devicetree/bindings/sound/samsung-i2s.yamlDocumentation/devicetree/bindings/sound/samsung-i2s.yaml new file +31
-0@@ -0,0 +1,119 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/samsung-i2s.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung SoC I2S controller + +maintainers: + - Krzysztof Kozlowski <[email protected]> + - Sangbeom Kim <[email protected]> + - Sylwester Nawrocki <[email protected]> + +properties: + compatible: + description: | + samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. + + samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with + secondary fifo, s/w reset control and internal mux for root clk src. + + samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for + playback, stereo channel capture, secondary fifo using internal + or external dma, s/w reset control, internal mux for root clk src + and 7.1 channel TDM support for playback. TDM (Time division multiplexing) + is to allow transfer of multiple channel audio data on single data line. + + samsung,exynos7-i2s: with all the available features of exynos5 i2s. + + exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo + with only external dma and more no.of root clk sampling frequencies.Documentation/devicetree/bindings/sound/samsung-i2s.yaml line 41
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +10
-0+ + samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports + stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with + slightly modified bit offsets. + enum: + - "samsung,s3c6410-i2s" + - "samsung,s5pv210-i2s" + - "samsung,exynos5420-i2s" + - "samsung,exynos7-i2s" + - "samsung,exynos7-i2s1"No need for quotes here.
Quoted 7 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml line 47
Quoted 6 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +6
-0+ + reg: + maxItems: 1 + + dmas: + description: list of DMA controller phandle and DMA request line ordered pairs.How many?
Hi Rob,
I have one problem with determining size of dmas.
It seems that there are only two options for dmas: tx, rx or tx, rx, tx-sec.
It looks like minItems should be two and maxItems should be three.
However, some of bindings have different definition of dmas.
When there is:
dmas = <&pdma0 10 &pdma0 9 &pdma0 8>;the number of Items for dmas is one,
when there is:
dmas = <&pdma0 10>, <&pdma0 9>, <&pdma0 8>;
Quoted 8 lines
the number of Items is three.
Both of these are equal from perspective of dtc,
however from schema point of view, they have different size.
What is a proper solution to this kind of problem?
The solution is writing things in the latter form. I have a script to convert a bunch of these. I need to coordinate doing that at the end of a merge window.
Rob
PATCH v3 1/1 dt-bindings: sound: Convert Samsung I2S controller to dt-schema
From: Maciej Falkowski <[email protected]>
Convert Samsung I2S controller to newer dt-schema format.
---
v3:
- Removed quotation marks from strings in compatible property
- Added min/max items to dmas property
- Removed unneeded description from dma-names property
- Added specific dma-names
- Added clock description
- Added include directive to examples to use clock macros directly
--- .../devicetree/bindings/sound/samsung-i2s.txt | 84 ----------- .../bindings/sound/samsung-i2s.yaml | 135 ++++++++++++++++++ 2 files changed, 135 insertions(+), 84 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.yaml
Documentation/devicetree/bindings/sound/samsung-i2s.txt deleted +0 -84
@@ -1,84 +0,0 @@ -* Samsung I2S controller - -Required SoC Specific Properties: - -- compatible : should be one of the following. - - samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. - - samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with - secondary fifo, s/w reset control and internal mux for root clk src. - - samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for - playback, stereo channel capture, secondary fifo using internal - or external dma, s/w reset control, internal mux for root clk src - and 7.1 channel TDM support for playback. TDM (Time division multiplexing) - is to allow transfer of multiple channel audio data on single data line. - - samsung,exynos7-i2s: with all the available features of exynos5 i2s, - exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo - with only external dma and more no.of root clk sampling frequencies. - - samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports - stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with - slightly modified bit offsets. - -- reg: physical base address of the controller and length of memory mapped - region. -- dmas: list of DMA controller phandle and DMA request line ordered pairs. -- dma-names: identifier string for each DMA request line in the dmas property. - These strings correspond 1:1 with the ordered pairs in dmas. -- clocks: Handle to iis clock and RCLK source clk. -- clock-names: - i2s0 uses some base clocks from CMU and some are from audio subsystem internal - clock controller. The clock names for i2s0 should be "iis", "i2s_opclk0" and - "i2s_opclk1" as shown in the example below. - i2s1 and i2s2 uses clocks from CMU. The clock names for i2s1 and i2s2 should - be "iis" and "i2s_opclk0". - "iis" is the i2s bus clock and i2s_opclk0, i2s_opclk1 are sources of the root - clk. i2s0 has internal mux to select the source of root clk and i2s1 and i2s2 - doesn't have any such mux. -- #clock-cells: should be 1, this property must be present if the I2S device - is a clock provider in terms of the common clock bindings, described in - ../clock/clock-bindings.txt. -- clock-output-names (deprecated): from the common clock bindings, names of - the CDCLK I2S output clocks, suggested values are "i2s_cdclk0", "i2s_cdclk1", - "i2s_cdclk3" for the I2S0, I2S1, I2S2 devices respectively. - -There are following clocks available at the I2S device nodes: - CLK_I2S_CDCLK - the CDCLK (CODECLKO) gate clock, - CLK_I2S_RCLK_PSR - the RCLK prescaler divider clock (corresponding to the - IISPSR register), - CLK_I2S_RCLK_SRC - the RCLKSRC mux clock (corresponding to RCLKSRC bit in - IISMOD register). - -Refer to the SoC datasheet for availability of the above clocks. -The CLK_I2S_RCLK_PSR and CLK_I2S_RCLK_SRC clocks are usually only available -in the IIS Multi Audio Interface. - -Note: Old DTs may not have the #clock-cells property and then not use the I2S -node as a clock supplier. - -Optional SoC Specific Properties: - -- samsung,idma-addr: Internal DMA register base address of the audio - sub system(used in secondary sound source). -- pinctrl-0: Should specify pin control groups used for this controller. -- pinctrl-names: Should contain only one value - "default". -- #sound-dai-cells: should be 1. - - -Example: - -i2s0: i2s@3830000 { - compatible = "samsung,s5pv210-i2s"; - reg = <0x03830000 0x100>; - dmas = <&pdma0 10 - &pdma0 9 - &pdma0 8>; - dma-names = "tx", "rx", "tx-sec"; - clocks = <&clock_audss EXYNOS_I2S_BUS>, - <&clock_audss EXYNOS_I2S_BUS>, - <&clock_audss EXYNOS_SCLK_I2S>; - clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; - #clock-cells = <1>; - samsung,idma-addr = <0x03000000>; - pinctrl-names = "default"; - pinctrl-0 = <&i2s0_bus>; - #sound-dai-cells = <1>; -};
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +135 -0
135 lines not on this page · raw message
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerQuoted 6 lines · Marek Szyprowski
From: Maciej Falkowski <[email protected]>
Convert Samsung I2S controller to newer dt-schema format.
Signed-off-by Maciej Falkowski <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>
Quoted 8 lines
---
v3:
- Removed quotation marks from strings in compatible property
- Added min/max items to dmas property
- Removed unneeded description from dma-names property
- Added specific dma-names
- Added clock description
- Added include directive to examples to use clock macros directly
Guys, please stop attaching new versions of entire patchset to existing discussions with in-reply-to. Entire V2 was attached to V1. V3 is attached here. On some mail clients (GMail) this does not mark entire thread unread at it looks like someone just commented about something. Some other clients, e.g. mbsynsc with GMail, do not sync entire thread so new version looks like reply-to but attached to nothing (missing context). Not mentioning that you need additional effort on your side to copy+paste the in-reply-to ID.
Quoted 38 lines
--- .../devicetree/bindings/sound/samsung-i2s.txt | 84 ----------- .../bindings/sound/samsung-i2s.yaml | 135 ++++++++++++++++++ 2 files changed, 135 insertions(+), 84 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.yamlDocumentation/devicetree/bindings/sound/samsung-i2s.txt deleted +0
-25@@ -1,84 +0,0 @@ -* Samsung I2S controller - -Required SoC Specific Properties: - -- compatible : should be one of the following. - - samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. - - samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with - secondary fifo, s/w reset control and internal mux for root clk src. - - samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for - playback, stereo channel capture, secondary fifo using internal - or external dma, s/w reset control, internal mux for root clk src - and 7.1 channel TDM support for playback. TDM (Time division multiplexing) - is to allow transfer of multiple channel audio data on single data line. - - samsung,exynos7-i2s: with all the available features of exynos5 i2s, - exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo - with only external dma and more no.of root clk sampling frequencies. - - samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports - stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with - slightly modified bit offsets. - -- reg: physical base address of the controller and length of memory mapped - region. -- dmas: list of DMA controller phandle and DMA request line ordered pairs. -- dma-names: identifier string for each DMA request line in the dmas property. - These strings correspond 1:1 with the ordered pairs in dmas.
Documentation/devicetree/bindings/sound/samsung-i2s.txt line 35
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung-i2s.txt deleted +0
-10-- clocks: Handle to iis clock and RCLK source clk. -- clock-names: - i2s0 uses some base clocks from CMU and some are from audio subsystem internal - clock controller. The clock names for i2s0 should be "iis", "i2s_opclk0" and - "i2s_opclk1" as shown in the example below. - i2s1 and i2s2 uses clocks from CMU. The clock names for i2s1 and i2s2 should - be "iis" and "i2s_opclk0". - "iis" is the i2s bus clock and i2s_opclk0, i2s_opclk1 are sources of the root - clk. i2s0 has internal mux to select the source of root clk and i2s1 and i2s2 - doesn't have any such mux.
I think you still miss this description of clocks and Sylwester asked for it.
Documentation/devicetree/bindings/sound/samsung-i2s.txt line 41
Quoted 6 lines
Documentation/devicetree/bindings/sound/samsung-i2s.txt deleted +0
-6-- #clock-cells: should be 1, this property must be present if the I2S device - is a clock provider in terms of the common clock bindings, described in - ../clock/clock-bindings.txt. -- clock-output-names (deprecated): from the common clock bindings, names of - the CDCLK I2S output clocks, suggested values are "i2s_cdclk0", "i2s_cdclk1", - "i2s_cdclk3" for the I2S0, I2S1, I2S2 devices respectively.
You missed this. If you decide to remove deprecated properties, then make it in separate patach. You described this patch as pure conversion so I expect no logical/functional changes.
Quoted 155 lines
Documentation/devicetree/bindings/sound/samsung-i2s.txt deleted +0
-43- -There are following clocks available at the I2S device nodes: - CLK_I2S_CDCLK - the CDCLK (CODECLKO) gate clock, - CLK_I2S_RCLK_PSR - the RCLK prescaler divider clock (corresponding to the - IISPSR register), - CLK_I2S_RCLK_SRC - the RCLKSRC mux clock (corresponding to RCLKSRC bit in - IISMOD register). - -Refer to the SoC datasheet for availability of the above clocks. -The CLK_I2S_RCLK_PSR and CLK_I2S_RCLK_SRC clocks are usually only available -in the IIS Multi Audio Interface. - -Note: Old DTs may not have the #clock-cells property and then not use the I2S -node as a clock supplier. - -Optional SoC Specific Properties: - -- samsung,idma-addr: Internal DMA register base address of the audio - sub system(used in secondary sound source). -- pinctrl-0: Should specify pin control groups used for this controller. -- pinctrl-names: Should contain only one value - "default". -- #sound-dai-cells: should be 1. - - -Example: - -i2s0: i2s@3830000 { - compatible = "samsung,s5pv210-i2s"; - reg = <0x03830000 0x100>; - dmas = <&pdma0 10 - &pdma0 9 - &pdma0 8>; - dma-names = "tx", "rx", "tx-sec"; - clocks = <&clock_audss EXYNOS_I2S_BUS>, - <&clock_audss EXYNOS_I2S_BUS>, - <&clock_audss EXYNOS_SCLK_I2S>; - clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; - #clock-cells = <1>; - samsung,idma-addr = <0x03000000>; - pinctrl-names = "default"; - pinctrl-0 = <&i2s0_bus>; - #sound-dai-cells = <1>; -};Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +106
-0@@ -0,0 +1,135 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/samsung-i2s.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung SoC I2S controller + +maintainers: + - Krzysztof Kozlowski <[email protected]> + - Sylwester Nawrocki <[email protected]> + +properties: + compatible: + description: | + samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. + + samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with + secondary fifo, s/w reset control and internal mux for root clk src. + + samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for + playback, stereo channel capture, secondary fifo using internal + or external dma, s/w reset control, internal mux for root clk src + and 7.1 channel TDM support for playback. TDM (Time division multiplexing) + is to allow transfer of multiple channel audio data on single data line. + + samsung,exynos7-i2s: with all the available features of exynos5 i2s. + exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo + with only external dma and more no.of root clk sampling frequencies. + + samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports + stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with + slightly modified bit offsets. + enum: + - samsung,s3c6410-i2s + - samsung,s5pv210-i2s + - samsung,exynos5420-i2s + - samsung,exynos7-i2s + - samsung,exynos7-i2s1 + + reg: + maxItems: 1 + + dmas: + minItems: 2 + maxItems: 3 + + dma-names: + oneOf: + - items: + - const: tx + - const: rx + - items: + - const: tx + - const: rx + - const: tx-sec + + clocks: + minItems: 1 + maxItems: 3 + description: | + There are following clocks available at the I2S device nodes: + CLK_I2S_CDCLK: + the CDCLK (CODECLKO) gate clock. + + CLK_I2S_RCLK_PSR: + RCLK prescaler divider clock corresponding to the IISPSR register. + + CLK_I2S_RCLK_SRC: + RCLKSRC mux clock corresponding to RCLKSRC bit in IISMOD register. + + clock-names: + oneOf: + - items: + - const: iis + - items: + - const: iis + - const: i2s_opclk0 + - items: + - const: iis + - const: i2s_opclk0 + - const: i2s_opclk1 + description: | + "iis" is the i2s bus clock. + For i2s1 and i2s2 - "iis", "i2s_opclk0" + For i2s0 - "iis", "i2s_opclk0", "i2s_opclk1" + + "#clock-cells": + const: 1 + + samsung,idma-addr: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Internal DMA register base address of the audio + sub system(used in secondary sound source). + + pinctrl-0: + description: Should specify pin control groups used for this controller. + + pinctrl-names: + const: default + + "#sound-dai-cells": + const: 1 + +required:
Documentation/devicetree/bindings/sound/samsung-i2s.yaml line 116
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +10
-0+ - compatible + - reg + - dmas + - dma-names + - clocks + - clock-names + +examples: + - | + #include <dt-bindings/clock/exynos-audss-clk.h>
Does it really work? When I tried, it was failing... If you look up at resulting DTS example it is wrong.
Best regards,
Krzysztof
Quoted 24 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +19
-0+ + i2s0: i2s@3830000 { + compatible = "samsung,s5pv210-i2s"; + reg = <0x03830000 0x100>; + dmas = <&pdma0 10>, + <&pdma0 9>, + <&pdma0 8>; + dma-names = "tx", "rx", "tx-sec"; + clocks = <&clock_audss EXYNOS_I2S_BUS>, + <&clock_audss EXYNOS_I2S_BUS>, + <&clock_audss EXYNOS_SCLK_I2S>; + clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; + #clock-cells = <1>; + samsung,idma-addr = <0x03000000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2s0_bus>; + #sound-dai-cells = <1>; + }; +Signature · 1 line
2.17.1
Hi Krzysztof,
Quoted 243 lines · Krzysztof Kozlowski
Quoted 6 lines · Marek Szyprowski
From: Maciej Falkowski <[email protected]>
Convert Samsung I2S controller to newer dt-schema format.
Signed-off-by Maciej Falkowski <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>Quoted 8 lines
---
v3:
- Removed quotation marks from strings in compatible property
- Added min/max items to dmas property
- Removed unneeded description from dma-names property
- Added specific dma-names
- Added clock description
- Added include directive to examples to use clock macros directlyGuys, please stop attaching new versions of entire patchset to existing discussions with in-reply-to. Entire V2 was attached to V1. V3 is attached here. On some mail clients (GMail) this does not mark entire thread unread at it looks like someone just commented about something. Some other clients, e.g. mbsynsc with GMail, do not sync entire thread so new version looks like reply-to but attached to nothing (missing context). Not mentioning that you need additional effort on your side to copy+paste the in-reply-to ID.
Quoted 38 lines
--- .../devicetree/bindings/sound/samsung-i2s.txt | 84 ----------- .../bindings/sound/samsung-i2s.yaml | 135 ++++++++++++++++++ 2 files changed, 135 insertions(+), 84 deletions(-)delete mode 100644
Documentation/devicetree/bindings/sound/samsung-i2s.txtcreate mode 100644Documentation/devicetree/bindings/sound/samsung-i2s.yamlDocumentation/devicetree/bindings/sound/samsung-i2s.txt deleted +0
-25@@ -1,84 +0,0 @@ -* Samsung I2S controller - -Required SoC Specific Properties: - -- compatible : should be one of the following. - - samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. - - samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with - secondary fifo, s/w reset control and internal mux for root clk src. - - samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for - playback, stereo channel capture, secondary fifo using internal - or external dma, s/w reset control, internal mux for root clk src - and 7.1 channel TDM support for playback. TDM (Time division multiplexing) - is to allow transfer of multiple channel audio data on single data line. - - samsung,exynos7-i2s: with all the available features of exynos5 i2s, - exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo - with only external dma and more no.of root clk sampling frequencies. - - samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports - stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with - slightly modified bit offsets. - -- reg: physical base address of the controller and length of memory mapped - region. -- dmas: list of DMA controller phandle and DMA request line ordered pairs. -- dma-names: identifier string for each DMA request line in the dmas property. - These strings correspond 1:1 with the ordered pairs in dmas.Documentation/devicetree/bindings/sound/samsung-i2s.txt line 35
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung-i2s.txt deleted +0
-10-- clocks: Handle to iis clock and RCLK source clk. -- clock-names: - i2s0 uses some base clocks from CMU and some are from audio subsystem internal - clock controller. The clock names for i2s0 should be "iis", "i2s_opclk0" and - "i2s_opclk1" as shown in the example below. - i2s1 and i2s2 uses clocks from CMU. The clock names for i2s1 and i2s2 should - be "iis" and "i2s_opclk0". - "iis" is the i2s bus clock and i2s_opclk0, i2s_opclk1 are sources of the root - clk. i2s0 has internal mux to select the source of root clk and i2s1 and i2s2 - doesn't have any such mux.I think you still miss this description of clocks and Sylwester asked for it.
Documentation/devicetree/bindings/sound/samsung-i2s.txt line 41
Quoted 6 lines
Documentation/devicetree/bindings/sound/samsung-i2s.txt deleted +0
-6-- #clock-cells: should be 1, this property must be present if the I2S device - is a clock provider in terms of the common clock bindings, described in - ../clock/clock-bindings.txt. -- clock-output-names (deprecated): from the common clock bindings, names of - the CDCLK I2S output clocks, suggested values are "i2s_cdclk0", "i2s_cdclk1", - "i2s_cdclk3" for the I2S0, I2S1, I2S2 devices respectively.You missed this. If you decide to remove deprecated properties, then make it in separate patach. You described this patch as pure conversion so I expect no logical/functional changes.
Quoted 159 lines
Documentation/devicetree/bindings/sound/samsung-i2s.txt deleted +0
-43- -There are following clocks available at the I2S device nodes: - CLK_I2S_CDCLK - the CDCLK (CODECLKO) gate clock, - CLK_I2S_RCLK_PSR - the RCLK prescaler divider clock (corresponding to the - IISPSR register), - CLK_I2S_RCLK_SRC - the RCLKSRC mux clock (corresponding to RCLKSRC bit in - IISMOD register). - -Refer to the SoC datasheet for availability of the above clocks. -The CLK_I2S_RCLK_PSR and CLK_I2S_RCLK_SRC clocks are usually only available -in the IIS Multi Audio Interface. - -Note: Old DTs may not have the #clock-cells property and then not use the I2S -node as a clock supplier. - -Optional SoC Specific Properties: - -- samsung,idma-addr: Internal DMA register base address of the audio - sub system(used in secondary sound source). -- pinctrl-0: Should specify pin control groups used for this controller. -- pinctrl-names: Should contain only one value - "default". -- #sound-dai-cells: should be 1. - - -Example: - -i2s0: i2s@3830000 { - compatible = "samsung,s5pv210-i2s"; - reg = <0x03830000 0x100>; - dmas = <&pdma0 10 - &pdma0 9 - &pdma0 8>; - dma-names = "tx", "rx", "tx-sec"; - clocks = <&clock_audss EXYNOS_I2S_BUS>, - <&clock_audss EXYNOS_I2S_BUS>, - <&clock_audss EXYNOS_SCLK_I2S>; - clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; - #clock-cells = <1>; - samsung,idma-addr = <0x03000000>; - pinctrl-names = "default"; - pinctrl-0 = <&i2s0_bus>; - #sound-dai-cells = <1>; -};Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +110
-0@@ -0,0 +1,135 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/samsung-i2s.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung SoC I2S controller + +maintainers: + - Krzysztof Kozlowski <[email protected]> + - Sylwester Nawrocki <[email protected]> + +properties: + compatible: + description: | + samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. + + samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with + secondary fifo, s/w reset control and internal mux for root clk src. + + samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for + playback, stereo channel capture, secondary fifo using internal + or external dma, s/w reset control, internal mux for root clk src + and 7.1 channel TDM support for playback. TDM (Time division multiplexing) + is to allow transfer of multiple channel audio data on single data line. + + samsung,exynos7-i2s: with all the available features of exynos5 i2s. + exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo + with only external dma and more no.of root clk sampling frequencies. + + samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports + stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with + slightly modified bit offsets. + enum: + - samsung,s3c6410-i2s + - samsung,s5pv210-i2s + - samsung,exynos5420-i2s + - samsung,exynos7-i2s + - samsung,exynos7-i2s1 + + reg: + maxItems: 1 + + dmas: + minItems: 2 + maxItems: 3 + + dma-names: + oneOf: + - items: + - const: tx + - const: rx + - items: + - const: tx + - const: rx + - const: tx-sec + + clocks: + minItems: 1 + maxItems: 3 + description: | + There are following clocks available at the I2S device nodes: + CLK_I2S_CDCLK: + the CDCLK (CODECLKO) gate clock. + + CLK_I2S_RCLK_PSR: + RCLK prescaler divider clock corresponding to the IISPSR register. + + CLK_I2S_RCLK_SRC: + RCLKSRC mux clock corresponding to RCLKSRC bit in IISMOD register. + + clock-names: + oneOf: + - items: + - const: iis + - items: + - const: iis + - const: i2s_opclk0 + - items: + - const: iis + - const: i2s_opclk0 + - const: i2s_opclk1 + description: | + "iis" is the i2s bus clock. + For i2s1 and i2s2 - "iis", "i2s_opclk0" + For i2s0 - "iis", "i2s_opclk0", "i2s_opclk1" + + "#clock-cells": + const: 1 + + samsung,idma-addr: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Internal DMA register base address of the audio + sub system(used in secondary sound source). + + pinctrl-0: + description: Should specify pin control groups used for this controller. + + pinctrl-names: + const: default + + "#sound-dai-cells": + const: 1 + +required: + - compatible + - reg + - dmas + - dma-names
Quoted 8 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml line 116
Quoted 6 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +6
-0+ - clocks + - clock-names + +examples: + - | + #include <dt-bindings/clock/exynos-audss-clk.h>Does it really work? When I tried, it was failing... If you look up at resulting DTS example it is wrong.
In which way it was wrong? We checked and it was correctly propagated to the example dts. It also compiled fine without errors. The only minor issue was that the include was generated inside the root node, but for the clock definitions this doesn't matter, but it makes the example easier to understand.
Quoted 1 line
...
Best regards
Signature · 2 lines
Marek Szyprowski, PhD Samsung R&D Institute Poland
Krzysztof Kozlowski
maintainerQuoted 5 lines · Marek Szyprowski
Hi Krzysztof,
Quoted 3 lines
+examples:
Quoted 2 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +2
-0+ - | + #include <dt-bindings/clock/exynos-audss-clk.h>
Quoted 8 lines
Quoted 2 lines
Does it really work? When I tried, it was failing... If you look up at resulting DTS example it is wrong.
In which way it was wrong? We checked and it was correctly propagated to the example dts. It also compiled fine without errors. The only minor issue was that the include was generated inside the root node, but for the clock definitions this doesn't matter, but it makes the example easier to understand.
Hmmm.... indeed this works. The output DTS is weird as include goes to example node (not even root) but it compiles. Somehow my previous tries with it were failing, I need to check why. In general I am all in for this include.
Best regards,
Krzysztof
Sylwester Nawrocki
maintainerQuoted 20 lines · Marek Szyprowski
From: Maciej Falkowski <[email protected]>
Convert Samsung I2S controller to newer dt-schema format.
.../devicetree/bindings/sound/samsung-i2s.txt | 84 ----------- .../bindings/sound/samsung-i2s.yaml | 135 ++++++++++++++++++ 2 files changed, 135 insertions(+), 84 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.yamlDocumentation/devicetree/bindings/sound/samsung-i2s.yaml new file +3
-0+ clocks: + minItems: 1 + maxItems: 3
Documentation/devicetree/bindings/sound/samsung-i2s.yaml line 70
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +10
-0+ description: | + There are following clocks available at the I2S device nodes: + CLK_I2S_CDCLK: + the CDCLK (CODECLKO) gate clock. + + CLK_I2S_RCLK_PSR: + RCLK prescaler divider clock corresponding to the IISPSR register. + + CLK_I2S_RCLK_SRC: + RCLKSRC mux clock corresponding to RCLKSRC bit in IISMOD register.
Sorry for the confusion, this description refers to the supplier clocks but the clocks property refers to the consumer clocks. The I2C controller is both clock consumer and provider. I'm not sure where this description should be moved to, "#clock-cells" property might be better but is likely not the right place either.
Quoted 8 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +8
-0+ clock-names: + oneOf: + - items: + - const: iis + - items: + - const: iis + - const: i2s_opclk0 + - items:
Documentation/devicetree/bindings/sound/samsung-i2s.yaml line 89
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung-i2s.yaml new file +10
-0+ - const: iis + - const: i2s_opclk0 + - const: i2s_opclk1 + description: | + "iis" is the i2s bus clock. + For i2s1 and i2s2 - "iis", "i2s_opclk0" + For i2s0 - "iis", "i2s_opclk0", "i2s_opclk1" + + "#clock-cells": + const: 1
--
Thanks,
Sylwester
PATCH 1/2 ARM: dts: exynos: split phandle in dmas property
In reply to Rob HerringFrom: Maciej Falkowski <[email protected]>
Change representation of phandle array as then
dt-schema counts number of its items properly.
--- arch/arm/boot/dts/exynos5250.dtsi | 14 +++++++------- arch/arm/boot/dts/exynos5410.dtsi | 6 +++--- arch/arm/boot/dts/exynos5420.dtsi | 14 +++++++------- 3 files changed, 17 insertions(+), 17 deletions(-)
arch/arm/boot/dts/exynos5250.dtsi +7 -7
@@ -586,9 +586,9 @@ compatible = "samsung,s5pv210-i2s"; status = "disabled"; reg = <0x03830000 0x100>; - dmas = <&pdma0 10 - &pdma0 9 - &pdma0 8>; + dmas = <&pdma0 10>, + <&pdma0 9>, + <&pdma0 8>; dma-names = "tx", "rx", "tx-sec"; clocks = <&clock_audss EXYNOS_I2S_BUS>, <&clock_audss EXYNOS_I2S_BUS>,
@@ -606,8 +606,8 @@ compatible = "samsung,s3c6410-i2s"; status = "disabled"; reg = <0x12D60000 0x100>; - dmas = <&pdma1 12 - &pdma1 11>; + dmas = <&pdma1 12>, + <&pdma1 11>; dma-names = "tx", "rx"; clocks = <&clock CLK_I2S1>, <&clock CLK_DIV_I2S1>; clock-names = "iis", "i2s_opclk0";
@@ -621,8 +621,8 @@ compatible = "samsung,s3c6410-i2s"; status = "disabled"; reg = <0x12D70000 0x100>; - dmas = <&pdma0 12 - &pdma0 11>; + dmas = <&pdma0 12>, + <&pdma0 11>; dma-names = "tx", "rx"; clocks = <&clock CLK_I2S2>, <&clock CLK_DIV_I2S2>; clock-names = "iis", "i2s_opclk0";
arch/arm/boot/dts/exynos5410.dtsi +3 -3
@@ -222,9 +222,9 @@ audi2s0: i2s@3830000 { compatible = "samsung,exynos5420-i2s"; reg = <0x03830000 0x100>; - dmas = <&pdma0 10 - &pdma0 9 - &pdma0 8>; + dmas = <&pdma0 10>, + <&pdma0 9>, + <&pdma0 8>; dma-names = "tx", "rx", "tx-sec"; clocks = <&clock_audss EXYNOS_I2S_BUS>, <&clock_audss EXYNOS_I2S_BUS>,
arch/arm/boot/dts/exynos5420.dtsi +7 -7
@@ -434,9 +434,9 @@ i2s0: i2s@3830000 { compatible = "samsung,exynos5420-i2s"; reg = <0x03830000 0x100>; - dmas = <&adma 0 - &adma 2 - &adma 1>; + dmas = <&adma 0>, + <&adma 2>, + <&adma 1>; dma-names = "tx", "rx", "tx-sec"; clocks = <&clock_audss EXYNOS_I2S_BUS>, <&clock_audss EXYNOS_I2S_BUS>,
@@ -455,8 +455,8 @@ i2s1: i2s@12d60000 { compatible = "samsung,exynos5420-i2s"; reg = <0x12D60000 0x100>; - dmas = <&pdma1 12 - &pdma1 11>; + dmas = <&pdma1 12>, + <&pdma1 11>; dma-names = "tx", "rx"; clocks = <&clock CLK_I2S1>, <&clock CLK_SCLK_I2S1>; clock-names = "iis", "i2s_opclk0";
@@ -471,8 +471,8 @@ i2s2: i2s@12d70000 { compatible = "samsung,exynos5420-i2s"; reg = <0x12D70000 0x100>; - dmas = <&pdma0 12 - &pdma0 11>; + dmas = <&pdma0 12>, + <&pdma0 11>; dma-names = "tx", "rx"; clocks = <&clock CLK_I2S2>, <&clock CLK_SCLK_I2S2>; clock-names = "iis", "i2s_opclk0";
Signature · 1 line
2.17.1
PATCH 2/2 arm64: dts: exynos: split phandle in dmas property
From: Maciej Falkowski <[email protected]>
Change representation of phandle array as then
dt-schema counts number of its items properly.
--- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/exynos/exynos5433.dtsi +2 -2
@@ -1452,7 +1452,7 @@ i2s1: i2s@14d60000 { compatible = "samsung,exynos7-i2s"; reg = <0x14d60000 0x100>; - dmas = <&pdma0 31 &pdma0 30>; + dmas = <&pdma0 31>, <&pdma0 30>; dma-names = "tx", "rx"; interrupts = <GIC_SPI 435 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cmu_peric CLK_PCLK_I2S1>,
@@ -1811,7 +1811,7 @@ i2s0: i2s@11440000 { compatible = "samsung,exynos7-i2s"; reg = <0x11440000 0x100>; - dmas = <&adma 0 &adma 2>; + dmas = <&adma 0>, <&adma 2>; dma-names = "tx", "rx"; interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>;
Signature · 1 line
2.17.1
Re: [PATCH 2/2] arm64: dts: exynos: split phandle in dmas property
Quoted 4 lines · Marek Szyprowski
From: Maciej Falkowski <[email protected]>
Change representation of phandle array as then
dt-schema counts number of its items properly.
Thanks, applied. Please split the commit msg according to Coding Style (submitting patches, chapter 2 and 14).
Best regards,
Krzysztof
Krzysztof Kozlowski
maintainerRe: [PATCH 1/2] ARM: dts: exynos: split phandle in dmas property
In reply to Marek SzyprowskiQuoted 5 lines · Marek Szyprowski
From: Maciej Falkowski <[email protected]>
Change representation of phandle array as then
dt-schema counts number of its items properly.
Quoted 7 lines
Signed-off-by Maciej Falkowski <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>--- arch/arm/boot/dts/exynos5250.dtsi | 14 +++++++------- arch/arm/boot/dts/exynos5410.dtsi | 6 +++--- arch/arm/boot/dts/exynos5420.dtsi | 14 +++++++------- 3 files changed, 17 insertions(+), 17 deletions(-)
Looks good, I'll take it after merge window but why this is in-reply-to (inside thread) of completely different patchset?
Best regards,
Krzysztof
Re: [PATCH 1/2] ARM: dts: exynos: split phandle in dmas property
In reply to Marek SzyprowskiQuoted 11 lines · Marek Szyprowski
From: Maciej Falkowski <[email protected]>
Change representation of phandle array as then
dt-schema counts number of its items properly.Signed-off-by Maciej Falkowski <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>--- arch/arm/boot/dts/exynos5250.dtsi | 14 +++++++------- arch/arm/boot/dts/exynos5410.dtsi | 6 +++--- arch/arm/boot/dts/exynos5420.dtsi | 14 +++++++-------
Thanks, applied.
Best regards,
Krzysztof
PATCH v2 2/2 dt-bindings: sound: Convert Samsung SMDK audio complex
In reply to Maciej FalkowskiConvert Samsung SMDK audio complex to newer dt-schema format.
---
v2:
- Added missing Signed-off-by certificate
--- .../bindings/sound/samsung,smdk-wm8994.txt | 14 ------- .../bindings/sound/samsung,smdk-wm8994.yaml | 38 +++++++++++++++++++ 2 files changed, 38 insertions(+), 14 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt create mode 100644 Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.yaml
Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt deleted +0 -14
@@ -1,14 +0,0 @@ -Samsung SMDK audio complex - -Required properties: -- compatible : "samsung,smdk-wm8994" -- samsung,i2s-controller: The phandle of the Samsung I2S0 controller -- samsung,audio-codec: The phandle of the WM8994 audio codec -Example: - -sound { - compatible = "samsung,smdk-wm8994"; - - samsung,i2s-controller = <&i2s0>; - samsung,audio-codec = <&wm8994>; -};
Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.yaml new file +38 -0
@@ -0,0 +1,38 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/samsung,smdk-wm8994.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung SoC SMDK audio complex + +maintainers: + - Krzysztof Kozlowski <[email protected]> + - Sangbeom Kim <[email protected]> + - Sylwester Nawrocki <[email protected]> + +properties: + compatible: + const: "samsung,smdk-wm8994" + + samsung,i2s-controller: + $ref: /schemas/types.yaml#/definitions/phandle + description: The phandle of the Samsung I2S0 controller + + samsung,audio-codec: + $ref: /schemas/types.yaml#/definitions/phandle + description: The phandle of the WM8994 audio codec + +required: + - compatible + - samsung,i2s-controller + - samsung,audio-codec + +examples: + - | + sound { + compatible = "samsung,smdk-wm8994"; + samsung,i2s-controller = <&i2s0>; + samsung,audio-codec = <&wm8994>; + }; +
Signature · 1 line
2.17.1
Re: [PATCH v2 2/2] dt-bindings: sound: Convert Samsung SMDK audio complex
Quoted 8 lines · Maciej Falkowski
Convert Samsung SMDK audio complex to newer dt-schema format.
Signed-off-by Maciej Falkowski <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
v2:
- Added missing Signed-off-by certificate
Quoted 6 lines
--- .../bindings/sound/samsung,smdk-wm8994.txt | 14 ------- .../bindings/sound/samsung,smdk-wm8994.yaml | 38 +++++++++++++++++++ 2 files changed, 38 insertions(+), 14 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt create mode 100644 Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.yaml
Krzysztof Kozlowski
maintainerRe: [PATCH v2 2/2] dt-bindings: sound: Convert Samsung SMDK audio complex
In reply to Maciej FalkowskiQuoted 8 lines · Maciej Falkowski
Convert Samsung SMDK audio complex to newer dt-schema format.
Signed-off-by Maciej Falkowski <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
v2:
- Added missing Signed-off-by certificate
I understood you cannot certify that you have the rights to send the patch. Adding someone's else Signed-off-by does not solve the problem of lack of such permission. Marek could certify that but you cannot certify for him. Otherwise it really makes the process bogus - anyone can add Linus' SoB and say that Linus certified the rights to include this contribution.
In my understanding of Developer's Certificate of Origin 1.1, these patches do not meet the criteria and therefore should not be included from that point of view.
One minor comment further.
Quoted 34 lines
--- .../bindings/sound/samsung,smdk-wm8994.txt | 14 ------- .../bindings/sound/samsung,smdk-wm8994.yaml | 38 +++++++++++++++++++ 2 files changed, 38 insertions(+), 14 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt create mode 100644 Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.yamlDocumentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt deleted +0
-14@@ -1,14 +0,0 @@ -Samsung SMDK audio complex - -Required properties: -- compatible : "samsung,smdk-wm8994" -- samsung,i2s-controller: The phandle of the Samsung I2S0 controller -- samsung,audio-codec: The phandle of the WM8994 audio codec -Example: - -sound { - compatible = "samsung,smdk-wm8994"; - - samsung,i2s-controller = <&i2s0>; - samsung,audio-codec = <&wm8994>; -};Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.yaml new file +1
-0@@ -0,0 +1,38 @@ +# SPDX-License-Identifier: GPL-2.0
Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.yaml line 11
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.yaml new file +10
-0+%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/samsung,smdk-wm8994.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung SoC SMDK audio complex + +maintainers: + - Krzysztof Kozlowski <[email protected]> + - Sangbeom Kim <[email protected]>
Unfortunately there was no mails coming from Sangbeom Kim so I think he is not active in maintaining these pieces. Let's skip this entry.
Best regards,
Krzysztof
Quoted 30 lines
Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.yaml new file +27
-1+ - Sylwester Nawrocki <[email protected]> + +properties: + compatible: + const: "samsung,smdk-wm8994" + + samsung,i2s-controller: + $ref: /schemas/types.yaml#/definitions/phandle + description: The phandle of the Samsung I2S0 controller + + samsung,audio-codec: + $ref: /schemas/types.yaml#/definitions/phandle + description: The phandle of the WM8994 audio codec + +required: + - compatible + - samsung,i2s-controller + - samsung,audio-codec + +examples: + - | + sound { + compatible = "samsung,smdk-wm8994"; + samsung,i2s-controller = <&i2s0>; + samsung,audio-codec = <&wm8994>; + }; + --2.17.1