Commit a7a18abb authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown

ASoC: dt-bindings: rt5682s: correct several errors

Correct several errors in rt5682s dtschema:
1. The examples should be under "examples":
    'example' is not one of ['$id', '$schema', 'title', 'description', 'examples', ...

2. Missing type for vendor properties

3. clock-names should be an array:
    properties:clock-names:items: {'const': 'mclk'} is not of type 'array'

4. Example DTS should include headers:
    [scripts/Makefile.lib:386: Documentation/devicetree/bindings/sound/realtek,rt5682s.example.dt.yaml] Error 1

5. Node name in example DTS misses unit address and does not match DT
   convention (generic name):
    Warning (reg_format): /example-0/rt5682s:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1)

6. Node address should be in size-cells:0 block in example DTS:
    Warning (reg_format): /example-0/codec@1a:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1)

Fixes: 50159fdb ("ASoC: dt-bindings: rt5682s: add bindings for rt5682s")
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210920112106.140918-1-krzysztof.kozlowski@canonical.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ef92ed26
...@@ -24,18 +24,21 @@ properties: ...@@ -24,18 +24,21 @@ properties:
description: The CODEC's interrupt output. description: The CODEC's interrupt output.
realtek,dmic1-data-pin: realtek,dmic1-data-pin:
$ref: /schemas/types.yaml#/definitions/uint32
enum: enum:
- 0 # dmic1 data is not used - 0 # dmic1 data is not used
- 1 # using GPIO2 pin as dmic1 data pin - 1 # using GPIO2 pin as dmic1 data pin
- 2 # using GPIO5 pin as dmic1 data pin - 2 # using GPIO5 pin as dmic1 data pin
realtek,dmic1-clk-pin: realtek,dmic1-clk-pin:
$ref: /schemas/types.yaml#/definitions/uint32
enum: enum:
- 0 # dmic1 clk is not used - 0 # dmic1 clk is not used
- 1 # using GPIO1 pin as dmic1 clock pin - 1 # using GPIO1 pin as dmic1 clock pin
- 2 # using GPIO3 pin as dmic1 clock pin - 2 # using GPIO3 pin as dmic1 clock pin
realtek,jd-src: realtek,jd-src:
$ref: /schemas/types.yaml#/definitions/uint32
enum: enum:
- 0 # No JD is used - 0 # No JD is used
- 1 # using JD1 as JD source - 1 # using JD1 as JD source
...@@ -63,7 +66,7 @@ properties: ...@@ -63,7 +66,7 @@ properties:
clock-names: clock-names:
items: items:
const: mclk - const: mclk
"#clock-cells": "#clock-cells":
const: 1 const: 1
...@@ -79,22 +82,30 @@ required: ...@@ -79,22 +82,30 @@ required:
- compatible - compatible
- reg - reg
example: examples:
- | - |
rt5682s { #include <dt-bindings/gpio/tegra-gpio.h>
compatible = "realtek,rt5682s"; #include <dt-bindings/interrupt-controller/irq.h>
reg = <0x1a>;
interrupt-parent = <&gpio>; i2c {
interrupts = <TEGRA_GPIO(U, 6) IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>;
realtek,ldo1-en-gpios = #size-cells = <0>;
<&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>;
realtek,dmic1-data-pin = <1>; codec@1a {
realtek,dmic1-clk-pin = <1>; compatible = "realtek,rt5682s";
realtek,jd-src = <1>; reg = <0x1a>;
interrupt-parent = <&gpio>;
#clock-cells = <1>; interrupts = <TEGRA_GPIO(U, 6) IRQ_TYPE_LEVEL_HIGH>;
clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk"; realtek,ldo1-en-gpios =
<&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>;
clocks = <&osc>; realtek,dmic1-data-pin = <1>;
clock-names = "mclk"; realtek,dmic1-clk-pin = <1>;
realtek,jd-src = <1>;
#clock-cells = <1>;
clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk";
clocks = <&osc>;
clock-names = "mclk";
};
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment