xref: /freebsd/sys/contrib/device-tree/Bindings/ata/nvidia,tegra-ahci.yaml (revision 3e8eb5c7f4909209c042403ddee340b2ee7003a5)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/ata/nvidia,tegra-ahci.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Tegra AHCI SATA Controller
8
9maintainers:
10  - Thierry Reding <thierry.reding@gmail.com>
11  - Jonathan Hunter <jonathanh@nvidia.com>
12
13properties:
14  compatible:
15    enum:
16      - nvidia,tegra124-ahci
17      - nvidia,tegra132-ahci
18      - nvidia,tegra210-ahci
19      - nvidia,tegra186-ahci
20
21  reg:
22    minItems: 2
23    maxItems: 3
24    items:
25      - description: AHCI registers
26      - description: SATA configuration and IPFS registers
27      - description: SATA AUX registers
28
29  interrupts:
30    maxItems: 1
31
32  clock-names:
33    items:
34      - const: sata
35      - const: sata-oob
36
37  clocks:
38    maxItems: 2
39
40  reset-names:
41    minItems: 2
42    items:
43      - const: sata
44      - const: sata-cold
45      - const: sata-oob
46
47  resets:
48    minItems: 2
49    maxItems: 3
50
51  iommus:
52    maxItems: 1
53
54  interconnect-names:
55    items:
56      - const: dma-mem
57      - const: write
58
59  interconnects:
60    maxItems: 2
61
62  power-domains:
63    items:
64      - description: SAX power-domain
65
66  phy-names:
67    items:
68      - const: sata-0
69
70  phys:
71    maxItems: 1
72
73  hvdd-supply:
74    description: SATA HVDD regulator supply.
75
76  vddio-supply:
77    description: SATA VDDIO regulator supply.
78
79  avdd-supply:
80    description: SATA AVDD regulator supply.
81
82  target-5v-supply:
83    description: SATA 5V power regulator supply.
84
85  target-12v-supply:
86    description: SATA 12V power regulator supply.
87
88required:
89  - compatible
90  - reg
91  - interrupts
92  - clock-names
93  - clocks
94  - reset-names
95  - resets
96
97allOf:
98  - if:
99      properties:
100        compatible:
101          contains:
102            enum:
103              - nvidia,tegra124-ahci
104              - nvidia,tegra132-ahci
105    then:
106      properties:
107        reg:
108          maxItems: 2
109        reset-names:
110          minItems: 3
111        resets:
112          minItems: 3
113      required:
114        - phys
115        - phy-names
116        - hvdd-supply
117        - vddio-supply
118        - avdd-supply
119
120  - if:
121      properties:
122        compatible:
123          contains:
124            enum:
125              - nvidia,tegra210-ahci
126    then:
127      properties:
128        reg:
129          minItems: 3
130        reset-names:
131          minItems: 3
132        resets:
133          minItems: 3
134
135  - if:
136      properties:
137        compatible:
138          contains:
139            enum:
140              - nvidia,tegra186-ahci
141    then:
142      properties:
143        reg:
144          minItems: 3
145        reset-names:
146          maxItems: 2
147        resets:
148          maxItems: 2
149      required:
150        - iommus
151        - interconnect-names
152        - interconnects
153        - power-domains
154
155additionalProperties: true
156
157examples:
158  - |
159    #include <dt-bindings/clock/tegra210-car.h>
160    #include <dt-bindings/reset/tegra210-car.h>
161    #include <dt-bindings/interrupt-controller/arm-gic.h>
162
163    sata@70020000 {
164            compatible = "nvidia,tegra210-ahci";
165            reg = <0x70027000 0x00002000>, /* AHCI */
166                  <0x70020000 0x00007000>, /* SATA */
167                  <0x70001100 0x00010000>; /* SATA AUX */
168            interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
169            clocks = <&tegra_car TEGRA210_CLK_SATA>,
170                     <&tegra_car TEGRA210_CLK_SATA_OOB>;
171            clock-names = "sata", "sata-oob";
172            resets = <&tegra_car 124>,
173                     <&tegra_car 129>,
174                     <&tegra_car 123>;
175            reset-names = "sata", "sata-cold", "sata-oob";
176    };
177