Commit 8ff35bb2 authored by Sowjanya Komatineni's avatar Sowjanya Komatineni Committed by Jens Axboe
Browse files

dt-bindings: ata: tegra: Convert binding documentation to YAML



This patch converts text based dt-binding document to YAML based
dt-binding document.

Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarSowjanya Komatineni <skomatineni@nvidia.com>
Acked-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/1617758731-12380-2-git-send-email-skomatineni@nvidia.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 7d33004d
Loading
Loading
Loading
Loading
+138 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/ata/nvidia,tegra-ahci.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Tegra AHCI SATA Controller

maintainers:
  - Thierry Reding <thierry.reding@gmail.com>
  - Jonathan Hunter <jonathanh@nvidia.com>

properties:
  compatible:
    enum:
      - nvidia,tegra124-ahci
      - nvidia,tegra132-ahci
      - nvidia,tegra210-ahci

  reg:
    minItems: 2
    maxItems: 3
    items:
      - description: AHCI registers
      - description: SATA configuration and IPFS registers
      - description: SATA AUX registers

  interrupts:
    maxItems: 1

  clock-names:
    items:
      - const: sata
      - const: sata-oob

  clocks:
    maxItems: 2

  reset-names:
    items:
      - const: sata
      - const: sata-cold
      - const: sata-oob

  resets:
    maxItems: 3

  phy-names:
    items:
      - const: sata-0

  phys:
    maxItems: 1

  hvdd-supply:
    description: SATA HVDD regulator supply.

  vddio-supply:
    description: SATA VDDIO regulator supply.

  avdd-supply:
    description: SATA AVDD regulator supply.

  target-5v-supply:
    description: SATA 5V power regulator supply.

  target-12v-supply:
    description: SATA 12V power regulator supply.

required:
  - compatible
  - reg
  - interrupts
  - clock-names
  - clocks
  - reset-names
  - resets

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - nvidia,tegra124-ahci
              - nvidia,tegra132-ahci
    then:
      properties:
        reg:
          maxItems: 2
        reset-names:
          minItems: 3
        resets:
          minItems: 3
      required:
        - phys
        - phy-names
        - hvdd-supply
        - vddio-supply
        - avdd-supply

  - if:
      properties:
        compatible:
          contains:
            enum:
              - nvidia,tegra210-ahci
    then:
      properties:
        reg:
          minItems: 3
        reset-names:
          minItems: 3
        resets:
          minItems: 3

additionalProperties: true

examples:
  - |
    #include <dt-bindings/clock/tegra210-car.h>
    #include <dt-bindings/reset/tegra210-car.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    sata@70020000 {
            compatible = "nvidia,tegra210-ahci";
            reg = <0x70027000 0x00002000>, /* AHCI */
                  <0x70020000 0x00007000>, /* SATA */
                  <0x70001100 0x00010000>; /* SATA AUX */
            interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
            clocks = <&tegra_car TEGRA210_CLK_SATA>,
                     <&tegra_car TEGRA210_CLK_SATA_OOB>;
            clock-names = "sata", "sata-oob";
            resets = <&tegra_car 124>,
                     <&tegra_car 129>,
                     <&tegra_car 123>;
            reset-names = "sata", "sata-cold", "sata-oob";
    };
+0 −44
Original line number Diff line number Diff line
Tegra SoC SATA AHCI controller

Required properties :
- compatible : Must be one of:
  - Tegra124 : "nvidia,tegra124-ahci"
  - Tegra132 : "nvidia,tegra132-ahci", "nvidia,tegra124-ahci"
  - Tegra210 : "nvidia,tegra210-ahci"
- reg : Should contain 2 entries:
  - AHCI register set (SATA BAR5)
  - SATA register set
- interrupts : Defines the interrupt used by SATA
- 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:
  - sata
  - sata-oob
- resets : Must contain an entry for each entry in reset-names.
  See ../reset/reset.txt for details.
- reset-names : Must include the following entries:
  - sata
  - sata-oob
  - sata-cold
- phys : Must contain an entry for each entry in phy-names.
  See ../phy/phy-bindings.txt for details.
- phy-names : Must include the following entries:
  - For Tegra124 and Tegra132:
    - sata-phy : XUSB PADCTL SATA PHY
- For Tegra124 and Tegra132:
  - hvdd-supply : Defines the SATA HVDD regulator
  - vddio-supply : Defines the SATA VDDIO regulator
  - avdd-supply : Defines the SATA AVDD regulator
  - target-5v-supply : Defines the SATA 5V power regulator
  - target-12v-supply : Defines the SATA 12V power regulator

Optional properties:
- reg :
  - AUX register set
- clock-names :
  - cml1 :
    cml1 clock should be defined here if the PHY driver
    doesn't manage them. If it does, they should not be.
- phy-names :
  - For T210:
    - sata-phy