* [PATCH v5] dt-bindings: sound: Convert Samsung I2S controller to dt-schema
[not found] <CGME20190925132644eucas1p2716a805d184f9bbc4ad7a94cc9cca633@eucas1p2.samsung.com>
@ 2019-09-25 13:26 ` Marek Szyprowski
2019-09-26 9:22 ` Krzysztof Kozlowski
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Marek Szyprowski @ 2019-09-25 13:26 UTC (permalink / raw)
To: devicetree, alsa-devel, linux-kernel, linux-samsung-soc
Cc: Rob Herring, Mark Rutland, Krzysztof Kozlowski, Mark Brown,
Sylwester Nawrocki, Liam Girdwood, Maciej Falkowski,
Marek Szyprowski
From: Maciej Falkowski <m.falkowski@samsung.com>
Convert Samsung I2S controller to newer dt-schema format.
Signed-off-by: Maciej Falkowski <m.falkowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
v5:
- Removed '#clock-cells' property from required properties
- Added deprecated property to 'clock-output-names'
and removed corresponding comment.
Best regards,
Maciej Falkowski
---
.../devicetree/bindings/sound/samsung-i2s.txt | 84 -----------
.../bindings/sound/samsung-i2s.yaml | 136 ++++++++++++++++++
2 files changed, 136 insertions(+), 84 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt
create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.yaml
diff --git a/Documentation/devicetree/bindings/sound/samsung-i2s.txt b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
deleted file mode 100644
index a88cb00fa096..000000000000
--- a/Documentation/devicetree/bindings/sound/samsung-i2s.txt
+++ /dev/null
@@ -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>;
-};
diff --git a/Documentation/devicetree/bindings/sound/samsung-i2s.yaml b/Documentation/devicetree/bindings/sound/samsung-i2s.yaml
new file mode 100644
index 000000000000..b9502b82fa9d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/samsung-i2s.yaml
@@ -0,0 +1,136 @@
+# 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 <krzk@kernel.org>
+ - Sylwester Nawrocki <s.nawrocki@samsung.com>
+
+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
+
+ clock-names:
+ oneOf:
+ - items:
+ - const: iis
+ - items: # for i2s0
+ - const: iis
+ - const: i2s_opclk0
+ - const: i2s_opclk1
+ - items: # for i2s1 and i2s2
+ - const: iis
+ - const: i2s_opclk0
+ description: |
+ "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":
+ const: 1
+
+ clock-output-names:
+ deprecated: true
+ oneOf:
+ - items: # for i2s0
+ - const: i2s_cdclk0
+ - items: # for i2s1
+ - const: i2s_cdclk1
+ - items: # for i2s2
+ - const: i2s_cdclk2
+ description: Names of the CDCLK I2S output clocks.
+
+ 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:
+ - |
+ #include <dt-bindings/clock/exynos-audss-clk.h>
+
+ 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>;
+ };
+
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v5] dt-bindings: sound: Convert Samsung I2S controller to dt-schema
2019-09-25 13:26 ` [PATCH v5] dt-bindings: sound: Convert Samsung I2S controller to dt-schema Marek Szyprowski
@ 2019-09-26 9:22 ` Krzysztof Kozlowski
2019-09-26 11:08 ` [alsa-devel] " Sylwester Nawrocki
2019-09-27 16:17 ` Rob Herring
2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-26 9:22 UTC (permalink / raw)
To: Marek Szyprowski
Cc: devicetree, alsa-devel, linux-kernel, linux-samsung-soc,
Rob Herring, Mark Rutland, Mark Brown, Sylwester Nawrocki,
Liam Girdwood, Maciej Falkowski
On Wed, Sep 25, 2019 at 03:26:28PM +0200, Marek Szyprowski wrote:
> From: Maciej Falkowski <m.falkowski@samsung.com>
>
> Convert Samsung I2S controller to newer dt-schema format.
>
> Signed-off-by: Maciej Falkowski <m.falkowski@samsung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> v5:
> - Removed '#clock-cells' property from required properties
> - Added deprecated property to 'clock-output-names'
> and removed corresponding comment.
>
> Best regards,
> Maciej Falkowski
> ---
> .../devicetree/bindings/sound/samsung-i2s.txt | 84 -----------
> .../bindings/sound/samsung-i2s.yaml | 136 ++++++++++++++++++
> 2 files changed, 136 insertions(+), 84 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt
> create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.yaml
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [alsa-devel] [PATCH v5] dt-bindings: sound: Convert Samsung I2S controller to dt-schema
2019-09-25 13:26 ` [PATCH v5] dt-bindings: sound: Convert Samsung I2S controller to dt-schema Marek Szyprowski
2019-09-26 9:22 ` Krzysztof Kozlowski
@ 2019-09-26 11:08 ` Sylwester Nawrocki
2019-09-27 16:17 ` Rob Herring
2 siblings, 0 replies; 4+ messages in thread
From: Sylwester Nawrocki @ 2019-09-26 11:08 UTC (permalink / raw)
To: Marek Szyprowski, Maciej Falkowski
Cc: devicetree, alsa-devel, linux-kernel, linux-samsung-soc,
Mark Rutland, Liam Girdwood, Rob Herring, Mark Brown,
Krzysztof Kozlowski
On 9/25/19 15:26, Marek Szyprowski wrote:
> From: Maciej Falkowski <m.falkowski@samsung.com>
>
> Convert Samsung I2S controller to newer dt-schema format.
>
> Signed-off-by: Maciej Falkowski <m.falkowski@samsung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
Thanks Maciej, it looks good to me, I just think it might make sense
to improve the comments a little while we are doing such a conversion.
Please see my comments below.
With those corrections made:
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> .../devicetree/bindings/sound/samsung-i2s.txt | 84 -----------
> .../bindings/sound/samsung-i2s.yaml | 136 ++++++++++++++++++
> 2 files changed, 136 insertions(+), 84 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt
> create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.yaml
> +++ b/Documentation/devicetree/bindings/sound/samsung-i2s.yaml
> @@ -0,0 +1,136 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: https://protect2.fireeye.com/url?k=9b0307ba8b0d1f39.9b028cf5-9870da798974f201&u=http://devicetree.org/schemas/sound/samsung-i2s.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Samsung SoC I2S controller
> +
> +maintainers:
> + - Krzysztof Kozlowski <krzk@kernel.org>
> + - Sylwester Nawrocki <s.nawrocki@samsung.com>
> +
> +properties:
> + compatible:
> + description: |
> + samsung,s3c6410-i2s: for 8/16/24bit stereo I2S.
> +
> + samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with
space before "(5.1)" ?
> + secondary fifo, s/w reset control and internal mux for root clk src.
s/fifo/FIFO ?
s/clk src/clock source ?
> + samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for
space before "(5.1)" ?
> + playback, stereo channel capture, secondary fifo using internal
s/fifo/FIFO
> + or external dma, s/w reset control, internal mux for root clk src
s/dma/DMA ?
s/clk src/clock source ?
> + 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.
s/exynos5 i2s/ exynos5 I2S ?
> + exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo
s/fifo/FIFO ?
> + with only external dma and more no.of root clk sampling frequencies.
s/dma/DMA ?
s/no.of/number of ?
> + samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports
> + stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with
s/i2s1/I2S1 ? It would be good to convert all i2s0, i2s1, i2s2 occurrences
in comments/descriptions into either upper or lower case for consistency.
> + clock-names:
> + oneOf:
> + - items:
> + - const: iis
> + - items: # for i2s0
> + - const: iis
> + - const: i2s_opclk0
> + - const: i2s_opclk1
> + - items: # for i2s1 and i2s2
> + - const: iis
> + - const: i2s_opclk0
> + description: |
> + "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-output-names:
> + deprecated: true
> + oneOf:
> + - items: # for i2s0
> + - const: i2s_cdclk0
> + - items: # for i2s1> + - const: i2s_cdclk1
> + - items: # for i2s2
> + - const: i2s_cdclk2
> + description: Names of the CDCLK I2S output clocks.
> + 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).
s/sub system(used/subsystem (used ?
--
Thanks,
Sylwester
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v5] dt-bindings: sound: Convert Samsung I2S controller to dt-schema
2019-09-25 13:26 ` [PATCH v5] dt-bindings: sound: Convert Samsung I2S controller to dt-schema Marek Szyprowski
2019-09-26 9:22 ` Krzysztof Kozlowski
2019-09-26 11:08 ` [alsa-devel] " Sylwester Nawrocki
@ 2019-09-27 16:17 ` Rob Herring
2 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2019-09-27 16:17 UTC (permalink / raw)
To: Marek Szyprowski
Cc: devicetree, alsa-devel, linux-kernel, linux-samsung-soc,
Sylwester Nawrocki, Liam Girdwood, Maciej Falkowski,
Marek Szyprowski
On Wed, 25 Sep 2019 15:26:28 +0200, Marek Szyprowski wrote:
> From: Maciej Falkowski <m.falkowski@samsung.com>
>
> Convert Samsung I2S controller to newer dt-schema format.
>
> Signed-off-by: Maciej Falkowski <m.falkowski@samsung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> v5:
> - Removed '#clock-cells' property from required properties
> - Added deprecated property to 'clock-output-names'
> and removed corresponding comment.
>
> Best regards,
> Maciej Falkowski
> ---
> .../devicetree/bindings/sound/samsung-i2s.txt | 84 -----------
> .../bindings/sound/samsung-i2s.yaml | 136 ++++++++++++++++++
> 2 files changed, 136 insertions(+), 84 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt
> create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.yaml
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-27 16:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20190925132644eucas1p2716a805d184f9bbc4ad7a94cc9cca633@eucas1p2.samsung.com>
2019-09-25 13:26 ` [PATCH v5] dt-bindings: sound: Convert Samsung I2S controller to dt-schema Marek Szyprowski
2019-09-26 9:22 ` Krzysztof Kozlowski
2019-09-26 11:08 ` [alsa-devel] " Sylwester Nawrocki
2019-09-27 16:17 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).