Unverified Commit 701a22fd authored by Mohammad Shehar Yaar Tausif's avatar Mohammad Shehar Yaar Tausif Committed by Mark Brown
Browse files

ASoC: dt-bindings: tegra20-ac97: convert to dt schema



Convert NVIDIA Tegra20 AC97 binding to DT schema.
Change -gpio to -gpios in schema as "gpio" suffix is deprecated.

Signed-off-by: default avatarMohammad Shehar Yaar Tausif <sheharyaar48@gmail.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240423115749.15786-1-sheharyaar48@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 181d58cf
Loading
Loading
Loading
Loading
+0 −36
Original line number Diff line number Diff line
NVIDIA Tegra 20 AC97 controller

Required properties:
- compatible : "nvidia,tegra20-ac97"
- reg : Should contain AC97 controller registers location and length
- interrupts : Should contain AC97 interrupt
- resets : Must contain an entry for each entry in reset-names.
  See ../reset/reset.txt for details.
- reset-names : Must include the following entries:
  - ac97
- dmas : Must contain an entry for each entry in clock-names.
  See ../dma/dma.txt for details.
- dma-names : Must include the following entries:
  - rx
  - tx
- clocks : Must contain one entry, for the module clock.
  See ../clocks/clock-bindings.txt for details.
- nvidia,codec-reset-gpio : The Tegra GPIO controller's phandle and the number
  of the GPIO used to reset the external AC97 codec
- nvidia,codec-sync-gpio : The Tegra GPIO controller's phandle and the number
  of the GPIO corresponding with the AC97 DAP _FS line

Example:

ac97@70002000 {
	compatible = "nvidia,tegra20-ac97";
	reg = <0x70002000 0x200>;
	interrupts = <0 81 0x04>;
	nvidia,codec-reset-gpio = <&gpio 170 0>;
	nvidia,codec-sync-gpio = <&gpio 120 0>;
	clocks = <&tegra_car 3>;
	resets = <&tegra_car 3>;
	reset-names = "ac97";
	dmas = <&apbdma 12>, <&apbdma 12>;
	dma-names = "rx", "tx";
};
+82 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nvidia,tegra20-ac97.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NVIDIA Tegra20 AC97 controller

maintainers:
  - Thierry Reding <treding@nvidia.com>
  - Jon Hunter <jonathanh@nvidia.com>

properties:
  compatible:
    const: nvidia,tegra20-ac97

  reg:
    maxItems: 1

  resets:
    maxItems: 1

  reset-names:
    const: ac97

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

  dmas:
    maxItems: 2

  dma-names:
    items:
      - const: rx
      - const: tx

  nvidia,codec-reset-gpios:
    description: Reset pin of external AC97 codec
    maxItems: 1

  nvidia,codec-sync-gpios:
    description: AC97 DAP _FS line
    maxItems: 1

required:
  - compatible
  - reg
  - resets
  - reset-names
  - interrupts
  - clocks
  - dmas
  - dma-names
  - nvidia,codec-reset-gpios
  - nvidia,codec-sync-gpios

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/tegra20-car.h>
    #include <dt-bindings/gpio/tegra-gpio.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/gpio/gpio.h>

    ac97@70002000 {
        compatible = "nvidia,tegra20-ac97";
        reg = <0x70002000 0x200>;
        resets = <&tegra_car 3>;
        reset-names = "ac97";
        interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&tegra_car 3>;
        dmas = <&apbdma 12>, <&apbdma 12>;
        dma-names = "rx", "tx";
        nvidia,codec-reset-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
        nvidia,codec-sync-gpios = <&gpio TEGRA_GPIO(P, 0) GPIO_ACTIVE_HIGH>;
    };
...