* [PATCH 1/2] dt-bindings: sound: convert rk3328 codec binding to yaml
@ 2020-06-23 12:47 Katsuhiro Suzuki
2020-06-23 12:47 ` [PATCH 2/2] dt-bindings: sound: add missing clock description of rk3328 DT schema Katsuhiro Suzuki
2020-06-29 22:00 ` [PATCH 1/2] dt-bindings: sound: convert rk3328 codec binding to yaml Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Katsuhiro Suzuki @ 2020-06-23 12:47 UTC (permalink / raw)
To: Rob Herring, devicetree
Cc: Heiko Stuebner, alsa-devel, linux-rockchip, linux-arm-kernel,
Katsuhiro Suzuki
Just convert Rockchip rk3328 audio codec binding to DT schema.
Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
---
.../bindings/sound/rockchip,rk3328-codec.txt | 28 ---------
.../bindings/sound/rockchip,rk3328-codec.yaml | 61 +++++++++++++++++++
2 files changed, 61 insertions(+), 28 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.txt
create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml
diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.txt b/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.txt
deleted file mode 100644
index 1ecd75d2032a..000000000000
--- a/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-* Rockchip Rk3328 internal codec
-
-Required properties:
-
-- compatible: "rockchip,rk3328-codec"
-- reg: physical base address of the controller and length of memory mapped
- region.
-- rockchip,grf: the phandle of the syscon node for GRF register.
-- clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names.
-- clock-names: should be "pclk".
-- spk-depop-time-ms: speak depop time msec.
-
-Optional properties:
-
-- mute-gpios: GPIO specifier for external line driver control (typically the
- dedicated GPIO_MUTE pin)
-
-Example for rk3328 internal codec:
-
-codec: codec@ff410000 {
- compatible = "rockchip,rk3328-codec";
- reg = <0x0 0xff410000 0x0 0x1000>;
- rockchip,grf = <&grf>;
- clocks = <&cru PCLK_ACODEC>;
- clock-names = "pclk";
- mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
- spk-depop-time-ms = 100;
-};
diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml b/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml
new file mode 100644
index 000000000000..08a74e28e483
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/rockchip,rk3328-codec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip rk3328 internal codec
+
+maintainers:
+ - Heiko Stuebner <heiko@sntech.de>
+
+properties:
+ compatible:
+ const: rockchip,rk3328-codec
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: clock for audio codec
+
+ clock-names:
+ items:
+ - const: pclk
+
+ rockchip,grf:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ The phandle of the syscon node for the GRF register.
+
+ spk-depop-time-ms:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 200
+ description:
+ Speaker depop time in msec.
+
+ mute-gpios:
+ maxItems: 1
+ description:
+ GPIO specifier for external line driver control (typically the
+ dedicated GPIO_MUTE pin)
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - rockchip,grf
+
+examples:
+ - |
+ codec: codec@ff410000 {
+ compatible = "rockchip,rk3328-codec";
+ reg = <0xff410000 0x1000>;
+ clocks = <&cru PCLK_ACODEC>;
+ clock-names = "pclk";
+ rockchip,grf = <&grf>;
+ mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
+ spk-depop-time-ms = 100;
+ };
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] dt-bindings: sound: add missing clock description of rk3328 DT schema
2020-06-23 12:47 [PATCH 1/2] dt-bindings: sound: convert rk3328 codec binding to yaml Katsuhiro Suzuki
@ 2020-06-23 12:47 ` Katsuhiro Suzuki
2020-06-29 22:00 ` [PATCH 1/2] dt-bindings: sound: convert rk3328 codec binding to yaml Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Katsuhiro Suzuki @ 2020-06-23 12:47 UTC (permalink / raw)
To: Rob Herring, devicetree
Cc: Heiko Stuebner, alsa-devel, linux-rockchip, linux-arm-kernel,
Katsuhiro Suzuki
This patch adds description about "mclk" clock and fixes some errors
which are dt_binding_check reported.
Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
---
.../bindings/sound/rockchip,rk3328-codec.yaml | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml b/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml
index 08a74e28e483..525b48c2f5de 100644
--- a/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml
+++ b/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml
@@ -19,10 +19,12 @@ properties:
clocks:
items:
- description: clock for audio codec
+ - description: clock for I2S master clock
clock-names:
items:
- const: pclk
+ - const: mclk
rockchip,grf:
$ref: /schemas/types.yaml#/definitions/phandle
@@ -41,21 +43,28 @@ properties:
GPIO specifier for external line driver control (typically the
dedicated GPIO_MUTE pin)
+ "#sound-dai-cells":
+ const: 0
+
required:
- compatible
- reg
- clocks
- clock-names
- rockchip,grf
+ - "#sound-dai-cells"
examples:
- |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/clock/rk3328-cru.h>
codec: codec@ff410000 {
compatible = "rockchip,rk3328-codec";
reg = <0xff410000 0x1000>;
- clocks = <&cru PCLK_ACODEC>;
- clock-names = "pclk";
+ clocks = <&cru PCLK_ACODECPHY>, <&cru SCLK_I2S1>;
+ clock-names = "pclk", "mclk";
rockchip,grf = <&grf>;
mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
- spk-depop-time-ms = 100;
+ spk-depop-time-ms = <100>;
+ #sound-dai-cells = <0>;
};
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] dt-bindings: sound: convert rk3328 codec binding to yaml
2020-06-23 12:47 [PATCH 1/2] dt-bindings: sound: convert rk3328 codec binding to yaml Katsuhiro Suzuki
2020-06-23 12:47 ` [PATCH 2/2] dt-bindings: sound: add missing clock description of rk3328 DT schema Katsuhiro Suzuki
@ 2020-06-29 22:00 ` Rob Herring
2020-06-30 13:54 ` Katsuhiro Suzuki
1 sibling, 1 reply; 4+ messages in thread
From: Rob Herring @ 2020-06-29 22:00 UTC (permalink / raw)
To: Katsuhiro Suzuki
Cc: devicetree, Rob Herring, Heiko Stuebner, linux-arm-kernel,
linux-rockchip, alsa-devel
On Tue, 23 Jun 2020 21:47:33 +0900, Katsuhiro Suzuki wrote:
> Just convert Rockchip rk3328 audio codec binding to DT schema.
>
> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
> ---
> .../bindings/sound/rockchip,rk3328-codec.txt | 28 ---------
> .../bindings/sound/rockchip,rk3328-codec.yaml | 61 +++++++++++++++++++
> 2 files changed, 61 insertions(+), 28 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.txt
> create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
Error: Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.example.dts:22.26-27 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:315: recipe for target 'Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.example.dt.yaml' failed
make[1]: *** [Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:1347: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2
See https://patchwork.ozlabs.org/patch/1315234
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:
pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
Please check and re-submit.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] dt-bindings: sound: convert rk3328 codec binding to yaml
2020-06-29 22:00 ` [PATCH 1/2] dt-bindings: sound: convert rk3328 codec binding to yaml Rob Herring
@ 2020-06-30 13:54 ` Katsuhiro Suzuki
0 siblings, 0 replies; 4+ messages in thread
From: Katsuhiro Suzuki @ 2020-06-30 13:54 UTC (permalink / raw)
To: Rob Herring
Cc: devicetree, Rob Herring, Heiko Stuebner, linux-arm-kernel,
linux-rockchip, alsa-devel
Hello Rob,
Thanks for your comment. I see.
I'll squash 2 patches and resend it.
Best Regards,
Katsuhiro Suzuki
On 2020/06/30 7:00, Rob Herring wrote:
> On Tue, 23 Jun 2020 21:47:33 +0900, Katsuhiro Suzuki wrote:
>> Just convert Rockchip rk3328 audio codec binding to DT schema.
>>
>> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
>> ---
>> .../bindings/sound/rockchip,rk3328-codec.txt | 28 ---------
>> .../bindings/sound/rockchip,rk3328-codec.yaml | 61 +++++++++++++++++++
>> 2 files changed, 61 insertions(+), 28 deletions(-)
>> delete mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.txt
>> create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml
>>
>
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> Error: Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.example.dts:22.26-27 syntax error
> FATAL ERROR: Unable to parse input tree
> scripts/Makefile.lib:315: recipe for target 'Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.example.dt.yaml' failed
> make[1]: *** [Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.example.dt.yaml] Error 1
> make[1]: *** Waiting for unfinished jobs....
> Makefile:1347: recipe for target 'dt_binding_check' failed
> make: *** [dt_binding_check] Error 2
>
>
> See https://patchwork.ozlabs.org/patch/1315234
>
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure dt-schema is up to date:
>
> pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
>
> Please check and re-submit.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-30 13:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-23 12:47 [PATCH 1/2] dt-bindings: sound: convert rk3328 codec binding to yaml Katsuhiro Suzuki
2020-06-23 12:47 ` [PATCH 2/2] dt-bindings: sound: add missing clock description of rk3328 DT schema Katsuhiro Suzuki
2020-06-29 22:00 ` [PATCH 1/2] dt-bindings: sound: convert rk3328 codec binding to yaml Rob Herring
2020-06-30 13:54 ` Katsuhiro Suzuki
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).