dt-bindings: sound: nvidia,tegra-audio: Convert multiple txt bindings to yaml
Subsystems (3)
PATCH v2 1/1 dt-bindings: sound: nvidia,tegra-audio: Convert multiple txt bindings to yaml
Convert Tegra audio complex with the
* ALC5632
* MAX98090
* RT5640
* RT5677
* SGTL5000
* TrimSlice
* WM8753
* WM8903
* WM9712
codec to the YAML format.
Additional changes:
- added missing HPOUTL to the WM9712 codec.
- extended rt5677 codec with multiple pins
---
v2:
- converted from one big schema into the common properties and then references to it
- few additional changes mentioned in commit message
.../sound/nvidia,tegra-audio-alc5632.txt | 48 -------- .../sound/nvidia,tegra-audio-alc5632.yaml | 74 +++++++++++++ .../sound/nvidia,tegra-audio-common.yaml | 83 ++++++++++++++ .../sound/nvidia,tegra-audio-max98090.txt | 53 --------- .../sound/nvidia,tegra-audio-max98090.yaml | 97 +++++++++++++++++ .../sound/nvidia,tegra-audio-rt5640.txt | 52 --------- .../sound/nvidia,tegra-audio-rt5640.yaml | 85 +++++++++++++++ .../sound/nvidia,tegra-audio-rt5677.txt | 67 ------------ .../sound/nvidia,tegra-audio-rt5677.yaml | 103 ++++++++++++++++++ .../sound/nvidia,tegra-audio-sgtl5000.txt | 42 ------- .../sound/nvidia,tegra-audio-sgtl5000.yaml | 67 ++++++++++++ .../sound/nvidia,tegra-audio-trimslice.txt | 21 ---- .../sound/nvidia,tegra-audio-trimslice.yaml | 33 ++++++ .../sound/nvidia,tegra-audio-wm8753.txt | 40 ------- .../sound/nvidia,tegra-audio-wm8753.yaml | 79 ++++++++++++++ .../sound/nvidia,tegra-audio-wm8903.txt | 62 ----------- .../sound/nvidia,tegra-audio-wm8903.yaml | 93 ++++++++++++++++ .../sound/nvidia,tegra-audio-wm9712.txt | 60 ---------- .../sound/nvidia,tegra-audio-wm9712.yaml | 76 +++++++++++++ 19 files changed, 790 insertions(+), 445 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-common.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5677.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5677.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-sgtl5000.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-sgtl5000.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-trimslice.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-trimslice.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.yaml
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.txt deleted +0 -48
@@ -1,48 +0,0 @@ -NVIDIA Tegra audio complex - -Required properties: -- compatible : "nvidia,tegra-audio-alc5632" -- clocks : Must contain an entry for each entry in clock-names. - See ../clocks/clock-bindings.txt for details. -- clock-names : Must include the following entries: - - pll_a - - pll_a_out0 - - mclk (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) -- nvidia,model : The user-visible name of this sound complex. -- nvidia,audio-routing : A list of the connections between audio components. - Each entry is a pair of strings, the first being the connection's sink, - the second being the connection's source. Valid names for sources and - sinks are the ALC5632's pins as documented in the binding for the device - and: - - * Headset Stereophone - * Int Spk - * Headset Mic - * Digital Mic - -- nvidia,i2s-controller : The phandle of the Tegra I2S controller -- nvidia,audio-codec : The phandle of the ALC5632 audio codec - -Example: - -sound { - compatible = "nvidia,tegra-audio-alc5632-paz00", - "nvidia,tegra-audio-alc5632"; - - nvidia,model = "Compal PAZ00"; - - nvidia,audio-routing = - "Int Spk", "SPK_OUTP", - "Int Spk", "SPK_OUTN", - "Headset Mic","MICBIAS1", - "MIC1_N", "Headset Mic", - "MIC1_P", "Headset Mic", - "Headset Stereophone", "HP_OUT_R", - "Headset Stereophone", "HP_OUT_L"; - - nvidia,i2s-controller = <&tegra_i2s1>; - nvidia,audio-codec = <&alc5632>; - - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 93>; - clock-names = "pll_a", "pll_a_out0", "mclk"; -};
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.yaml new file +74 -0
74 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-common.yaml new file +83 -0
83 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt deleted +0 -53
53 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.yaml new file +97 -0
97 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt deleted +0 -52
52 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.yaml new file +85 -0
85 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5677.txt deleted +0 -67
67 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5677.yaml new file +103 -0
103 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-sgtl5000.txt deleted +0 -42
42 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-sgtl5000.yaml new file +67 -0
67 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-trimslice.txt deleted +0 -21
@@ -1,21 +0,0 @@ -NVIDIA Tegra audio complex for TrimSlice - -Required properties: -- compatible : "nvidia,tegra-audio-trimslice" -- clocks : Must contain an entry for each entry in clock-names. -- clock-names : Must include the following entries: - "pll_a" (The Tegra clock of that name), - "pll_a_out0" (The Tegra clock of that name), - "mclk" (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) -- nvidia,i2s-controller : The phandle of the Tegra I2S1 controller -- nvidia,audio-codec : The phandle of the WM8903 audio codec - -Example: - -sound { - compatible = "nvidia,tegra-audio-trimslice"; - nvidia,i2s-controller = <&tegra_i2s1>; - nvidia,audio-codec = <&codec>; - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 93>; - clock-names = "pll_a", "pll_a_out0", "mclk"; -};
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-trimslice.yaml new file +33 -0
@@ -0,0 +1,33 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-trimslice.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra audio complex with TrimSlice CODEC + +maintainers: + - Jon Hunter <[email protected]> + - Thierry Reding <[email protected]> + +allOf: + - $ref: nvidia,tegra-audio-common.yaml# + +properties: + compatible: + const: nvidia,tegra-audio-trimslice + +required: + - nvidia,i2s-controller + +unevaluatedProperties: false + +examples: + - | + sound { + compatible = "nvidia,tegra-audio-trimslice"; + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&codec>; + clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 93>; + clock-names = "pll_a", "pll_a_out0", "mclk"; + };
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.txt deleted +0 -40
@@ -1,40 +0,0 @@ -NVIDIA Tegra audio complex - -Required properties: -- compatible : "nvidia,tegra-audio-wm8753" -- clocks : Must contain an entry for each entry in clock-names. - See ../clocks/clock-bindings.txt for details. -- clock-names : Must include the following entries: - - pll_a - - pll_a_out0 - - mclk (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) -- nvidia,model : The user-visible name of this sound complex. -- nvidia,audio-routing : A list of the connections between audio components. - Each entry is a pair of strings, the first being the connection's sink, - the second being the connection's source. Valid names for sources and - sinks are the WM8753's pins as documented in the binding for the WM8753, - and the jacks on the board: - - * Headphone Jack - * Mic Jack - -- nvidia,i2s-controller : The phandle of the Tegra I2S1 controller -- nvidia,audio-codec : The phandle of the WM8753 audio codec -Example: - -sound { - compatible = "nvidia,tegra-audio-wm8753-whistler", - "nvidia,tegra-audio-wm8753" - nvidia,model = "tegra-wm8753-harmony"; - - nvidia,audio-routing = - "Headphone Jack", "LOUT1", - "Headphone Jack", "ROUT1"; - - nvidia,i2s-controller = <&i2s1>; - nvidia,audio-codec = <&wm8753>; - - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 93>; - clock-names = "pll_a", "pll_a_out0", "mclk"; -}; -
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.yaml new file +79 -0
79 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt deleted +0 -62
62 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.yaml new file +93 -0
93 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.txt deleted +0 -60
60 lines not on this page · raw message
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.yaml new file +76 -0
76 lines not on this page · raw message
Signature · 1 line
2.33.0
Quoted 53 lines · David Heidelberg
Convert Tegra audio complex with the
* ALC5632
* MAX98090
* RT5640
* RT5677
* SGTL5000
* TrimSlice
* WM8753
* WM8903
* WM9712
codec to the YAML format.Additional changes:
- added missing HPOUTL to the WM9712 codec.
- extended rt5677 codec with multiple pinsReviewed-by Dmitry Osipenko <[email protected]>Signed-off-by David Heidelberg <[email protected]>---
v2:
- converted from one big schema into the common properties and then references to it
- few additional changes mentioned in commit message.../sound/nvidia,tegra-audio-alc5632.txt | 48 -------- .../sound/nvidia,tegra-audio-alc5632.yaml | 74 +++++++++++++ .../sound/nvidia,tegra-audio-common.yaml | 83 ++++++++++++++ .../sound/nvidia,tegra-audio-max98090.txt | 53 --------- .../sound/nvidia,tegra-audio-max98090.yaml | 97 +++++++++++++++++ .../sound/nvidia,tegra-audio-rt5640.txt | 52 --------- .../sound/nvidia,tegra-audio-rt5640.yaml | 85 +++++++++++++++ .../sound/nvidia,tegra-audio-rt5677.txt | 67 ------------ .../sound/nvidia,tegra-audio-rt5677.yaml | 103 ++++++++++++++++++ .../sound/nvidia,tegra-audio-sgtl5000.txt | 42 ------- .../sound/nvidia,tegra-audio-sgtl5000.yaml | 67 ++++++++++++ .../sound/nvidia,tegra-audio-trimslice.txt | 21 ---- .../sound/nvidia,tegra-audio-trimslice.yaml | 33 ++++++ .../sound/nvidia,tegra-audio-wm8753.txt | 40 ------- .../sound/nvidia,tegra-audio-wm8753.yaml | 79 ++++++++++++++ .../sound/nvidia,tegra-audio-wm8903.txt | 62 ----------- .../sound/nvidia,tegra-audio-wm8903.yaml | 93 ++++++++++++++++ .../sound/nvidia,tegra-audio-wm9712.txt | 60 ---------- .../sound/nvidia,tegra-audio-wm9712.yaml | 76 +++++++++++++ 19 files changed, 790 insertions(+), 445 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-alc5632.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-common.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5677.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5677.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-sgtl5000.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-sgtl5000.yaml
Quoted 9 lines
delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-trimslice.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-trimslice.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8753.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.yaml delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.yaml
Mark Brown
maintainerQuoted 5 lines · David Heidelberg
Convert Tegra audio complex with the
* ALC5632
* MAX98090
* RT5640
* RT5677
Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.
Mark Brown
maintainerQuoted 12 lines · David Heidelberg
Convert Tegra audio complex with the
* ALC5632
* MAX98090
* RT5640
* RT5677
* SGTL5000
* TrimSlice
* WM8753
* WM8903
* WM9712
codec to the YAML format.
Quoted 1 line
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] dt-bindings: sound: nvidia,tegra-audio: Convert multiple txt bindings to yaml
commit: 88dffe43cbc625eb52a57daa0d1c0fb7037b63d2
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
12.12.2021 01:49, David Heidelberg пишет:
Quoted 19 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5677.yaml new file +19
-0+unevaluatedProperties: false + +examples: + - | + sound { + compatible = "nvidia,tegra-audio-rt5677-ryu", + "nvidia,tegra-audio-rt5677"; + nvidia,model = "NVIDIA Tegra Ryu"; + + nvidia,audio-routing = + "Headphone", "LOUT2", + "Headphone", "LOUT1", + "Headset Mic", "MICBIAS1", + "IN1P", "Headset Mic", + "IN1N", "Headset Mic", + "DMIC L1", "Internal Mic 1", + "DMIC R1", "Internal Mic 1", + "DMIC L2", "Internal Mic 2", + "DMIC R2", "Internal Mic 2",
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5677.yaml line 97
Quoted 10 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5677.yaml new file +10
-0+ "Speaker", "PDM1L", + "Speaker", "PDM1R"; + + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&rt5677>; + + nvidia,hp-det-gpios = <&gpio 143 0>; + nvidia,mic-present-gpios = <&gpio 132 1>; + nvidia,hp-en-gpios = <&rt5677 1 0>; + nvidia,dmic-clk-en-gpios = <&rt5677 2 1>;
I spotted that nvidia,dmic-clk-en-gpios is undocumented, but DTs and binding are passing the validation. We will make another patch to fix it.
Rob, could you please tell whether this is because unevaluatedProperties doesn't work yet or we're missing something?
Quoted 34 lines · Dmitry Osipenko
12.12.2021 01:49, David Heidelberg пишет:
Quoted 19 lines
(quoted diff) +19
-0+unevaluatedProperties: false + +examples: + - | + sound { + compatible = "nvidia,tegra-audio-rt5677-ryu", + "nvidia,tegra-audio-rt5677"; + nvidia,model = "NVIDIA Tegra Ryu"; + + nvidia,audio-routing = + "Headphone", "LOUT2", + "Headphone", "LOUT1", + "Headset Mic", "MICBIAS1", + "IN1P", "Headset Mic", + "IN1N", "Headset Mic", + "DMIC L1", "Internal Mic 1", + "DMIC R1", "Internal Mic 1", + "DMIC L2", "Internal Mic 2", + "DMIC R2", "Internal Mic 2",Review
Quoted 10 lines
(quoted diff) +10
-0+ "Speaker", "PDM1L", + "Speaker", "PDM1R"; + + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&rt5677>; + + nvidia,hp-det-gpios = <&gpio 143 0>; + nvidia,mic-present-gpios = <&gpio 132 1>; + nvidia,hp-en-gpios = <&rt5677 1 0>; + nvidia,dmic-clk-en-gpios = <&rt5677 2 1>;I spotted that nvidia,dmic-clk-en-gpios is undocumented, but DTs and binding are passing the validation. We will make another patch to fix it.
Quoted 2 lines
Rob, could you please tell whether this is because unevaluatedProperties doesn't work yet or we're missing something?
If you update dt-schema.git to the latest "main" branch you should have most of what's needed to make unevaluatedProperties work. However, there seems to be an issue with some $referenced schemas setting additionalProperties to true and then that gets propogated to the schema that included it.
Rob came up with the patch below to fix that:
--- >8 ---
dtschema/lib.py +3 -0
@@ -367,6 +367,9 @@ def fixup_sub_schema(schema, is_prop): if not isinstance(schema, dict): return + if 'additionalProperties' in schema and schema['additionalProperties'] == True: + schema.pop('additionalProperties', None) + schema.pop('description', None) fixup_interrupts(schema) if is_prop:
--- >8 ---
I'm currently running the tools based on that and it's indeed been flagging some properties as unevaluated that weren't there before.
Thierry
16.12.2021 16:44, Thierry Reding пишет:
Quoted 63 lines · Dmitry Osipenko
Quoted 34 lines
12.12.2021 01:49, David Heidelberg пишет:
Quoted 19 lines
(quoted diff) +19
-0+unevaluatedProperties: false + +examples: + - | + sound { + compatible = "nvidia,tegra-audio-rt5677-ryu", + "nvidia,tegra-audio-rt5677"; + nvidia,model = "NVIDIA Tegra Ryu"; + + nvidia,audio-routing = + "Headphone", "LOUT2", + "Headphone", "LOUT1", + "Headset Mic", "MICBIAS1", + "IN1P", "Headset Mic", + "IN1N", "Headset Mic", + "DMIC L1", "Internal Mic 1", + "DMIC R1", "Internal Mic 1", + "DMIC L2", "Internal Mic 2", + "DMIC R2", "Internal Mic 2",Review
Quoted 10 lines
(quoted diff) +10
-0+ "Speaker", "PDM1L", + "Speaker", "PDM1R"; + + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&rt5677>; + + nvidia,hp-det-gpios = <&gpio 143 0>; + nvidia,mic-present-gpios = <&gpio 132 1>; + nvidia,hp-en-gpios = <&rt5677 1 0>; + nvidia,dmic-clk-en-gpios = <&rt5677 2 1>;I spotted that nvidia,dmic-clk-en-gpios is undocumented, but DTs and binding are passing the validation. We will make another patch to fix it.
Quoted 2 lines
Rob, could you please tell whether this is because unevaluatedProperties doesn't work yet or we're missing something?
If you update dt-schema.git to the latest "main" branch you should have most of what's needed to make unevaluatedProperties work. However, there seems to be an issue with some $referenced schemas setting additionalProperties to true and then that gets propogated to the schema that included it.
Rob came up with the patch below to fix that:
--- >8 ---
dtschema/lib.py +3
-1@@ -367,6 +367,9 @@ def fixup_sub_schema(schema, is_prop): if not isinstance(schema, dict): return + if 'additionalProperties' in schema and schema['additionalProperties'] == True: + schema.pop('additionalProperties', None) + schema.pop('description', None) fixup_interrupts(schema) if is_prop: --- >8 ---
Quoted 2 lines
I'm currently running the tools based on that and it's indeed been flagging some properties as unevaluated that weren't there before.
Thank you! The unevaluatedProperties indeed works properly using this patch.