GNU Linux-libre 6.1.90-gnu
[releases.git] / Documentation / devicetree / bindings / nvme / apple,nvme-ans.yaml
1 # SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/nvme/apple,nvme-ans.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Apple ANS NVM Express host controller
8
9 maintainers:
10   - Sven Peter <sven@svenpeter.dev>
11
12 properties:
13   compatible:
14     items:
15       - enum:
16           - apple,t8103-nvme-ans2
17           - apple,t6000-nvme-ans2
18       - const: apple,nvme-ans2
19
20   reg:
21     items:
22       - description: NVMe and NVMMU registers
23       - description: ANS2 co-processor control registers
24
25   reg-names:
26     items:
27       - const: nvme
28       - const: ans
29
30   resets:
31     maxItems: 1
32
33   power-domains:
34     # two domains for t8103, three for t6000
35     minItems: 2
36     items:
37       - description: power domain for the NVMe controller.
38       - description: power domain for the first PCIe bus connecting the NVMe
39           controller to the storage modules.
40       - description: optional power domain for the second PCIe bus
41           connecting the NVMe controller to the storage modules.
42
43   power-domain-names:
44     minItems: 2
45     items:
46       - const: ans
47       - const: apcie0
48       - const: apcie1
49
50   mboxes:
51     maxItems: 1
52     description: Mailbox of the ANS2 co-processor
53
54   interrupts:
55     maxItems: 1
56
57   apple,sart:
58     $ref: /schemas/types.yaml#/definitions/phandle
59     description: |
60       Reference to the SART address filter.
61
62       The SART address filter is documented in iommu/apple,sart.yaml.
63
64 if:
65   properties:
66     compatible:
67       contains:
68         const: apple,t8103-nvme-ans2
69 then:
70   properties:
71     power-domains:
72       maxItems: 2
73     power-domain-names:
74       maxItems: 2
75 else:
76   properties:
77     power-domains:
78       minItems: 3
79     power-domain-names:
80       minItems: 3
81
82 required:
83   - compatible
84   - reg
85   - reg-names
86   - resets
87   - power-domains
88   - power-domain-names
89   - mboxes
90   - interrupts
91   - apple,sart
92
93 additionalProperties: false
94
95 examples:
96   - |
97     #include <dt-bindings/interrupt-controller/apple-aic.h>
98     #include <dt-bindings/interrupt-controller/irq.h>
99
100     nvme@7bcc0000 {
101       compatible = "apple,t8103-nvme-ans2", "apple,nvme-ans2";
102       reg = <0x7bcc0000 0x40000>, <0x77400000 0x4000>;
103       reg-names = "nvme", "ans";
104       interrupts = <AIC_IRQ 590 IRQ_TYPE_LEVEL_HIGH>;
105       mboxes = <&ans>;
106       apple,sart = <&sart>;
107       power-domains = <&ps_ans2>, <&ps_apcie_st>;
108       power-domain-names = "ans", "apcie0";
109       resets = <&ps_ans2>;
110     };