Re: [PATCH v1 1/2] ASoC: dt-bindings: tegra: Add binding for RT5631

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/01/2021 18:41, Ion Agorria wrote:
> From: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> 
> Add device-tree binding that describes hardware integration of RT5631
> audio codec chip with NVIDIA Tegra SoCs.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> Signed-off-by: Ion Agorria <ion@xxxxxxxxxxx>
> ---
>  .../sound/nvidia,tegra-audio-rt5631.yaml      | 134 ++++++++++++++++++
>  1 file changed, 134 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5631.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5631.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5631.yaml
> new file mode 100644
> index 000000000000..6ee62c599518
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5631.yaml
> @@ -0,0 +1,134 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +
> +$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-rt5631.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NVIDIA Tegra RT5631 ASoC
> +
> +description: |
> +  This binding describes integration of the Realtek ALC5631/RT5631 sound
> +  codec with the sound system of NVIDIA Tegra SoCs.
> +
> +maintainers:
> +  - Jon Hunter <jonathanh@xxxxxxxxxx>
> +  - Stephen Warren <swarren@xxxxxxxxxx>
> +  - Thierry Reding <thierry.reding@xxxxxxxxx>


Thierry and I should be sufficient and so no need to include Stephen in
the list.

> +
> +properties:
> +  compatible:
> +    enum:
> +      - nvidia,tegra-audio-rt5631
> +
> +  clocks:
> +    minItems: 3
> +    items:
> +      - description: PLL A clock
> +      - description: PLL A OUT0 clock
> +      - description: The Tegra cdev1/extern1 clock, which feeds the card's mclk
> +
> +  clock-names:
> +    minItems: 3
> +    items:
> +      - const: pll_a
> +      - const: pll_a_out0
> +      - const: mclk
> +
> +  assigned-clocks:
> +    minItems: 1
> +    maxItems: 3
> +
> +  assigned-clock-parents:
> +    minItems: 1
> +    maxItems: 3
> +
> +  assigned-clock-rates:
> +    minItems: 1
> +    maxItems: 3
> +
> +  nvidia,model:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: User-visible name of this sound complex.
> +
> +  nvidia,audio-routing:
> +    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> +    description: |
> +      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 RT5631's pins (as documented in its binding), and the jacks
> +      on the board:
> +
> +      * Int Spk
> +      * Headphone Jack
> +      * Mic Jack
> +      * Int Mic
> +
> +  nvidia,i2s-controller:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: Phandle of the Tegra I2S controller.
> +
> +  nvidia,audio-codec:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: Phandle of the RT5631 audio codec.
> +
> +  nvidia,hp-mute-gpios:
> +    description: GPIO that mutes the headphones (button event).
> +    maxItems: 1
> +
> +  nvidia,hp-det-gpios:
> +    description: GPIO that detects headphones plug-in.
> +    maxItems: 1
> +
> +additionalProperties: false
> +
> +required:
> +  - compatible
> +  - clocks
> +  - clock-names
> +  - assigned-clocks
> +  - assigned-clock-parents
> +  - nvidia,model
> +  - nvidia,audio-routing
> +  - nvidia,i2s-controller
> +  - nvidia,audio-codec
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/tegra30-car.h>
> +    #include <dt-bindings/soc/tegra-pmc.h>
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    sound {
> +        compatible = "nvidia,tegra-audio-rt5631";
> +        nvidia,model = "NVIDIA Tegra RT5631";
> +
> +        nvidia,audio-routing =
> +            "Headphone Jack", "HPOL",
> +            "Headphone Jack", "HPOR",
> +            "Int Spk", "SPOL",
> +            "Int Spk", "SPOR",
> +            "MIC1", "MIC Bias1",
> +            "MIC Bias1", "Mic Jack",
> +            "DMIC", "Int Mic";
> +
> +        nvidia,i2s-controller = <&tegra_i2s1>;
> +        nvidia,audio-codec = <&rt5631>;
> +
> +        nvidia,hp-det-gpios = <&gpio 178 GPIO_ACTIVE_LOW>;
> +        nvidia,hp-mute-gpios = <&gpio 186 GPIO_ACTIVE_LOW>;
> +
> +        clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
> +                 <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
> +                 <&tegra_pmc TEGRA_PMC_CLK_OUT_1>;
> +        clock-names = "pll_a", "pll_a_out0", "mclk";
> +
> +        assigned-clocks = <&tegra_car TEGRA30_CLK_EXTERN1>,
> +                          <&tegra_pmc TEGRA_PMC_CLK_OUT_1>;
> +
> +        assigned-clock-parents = <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
> +                                 <&tegra_car TEGRA30_CLK_EXTERN1>;
> +    };
> +
> +...
> 

Otherwise looks good to me ...

Reviewed-by: Jon Hunter <jonathanh@xxxxxxxxxx>

Cheers
Jon

-- 
nvpublic



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux