Skip to content

Commit 82b9655

Browse files
committed
dt-bindings: nvme: Add Apple ANS NVMe
Apple SoCs such as the M1 come with an embedded NVMe coprocessor called ANS2. Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Sven Peter <sven@svenpeter.dev>
1 parent b170143 commit 82b9655

File tree

2 files changed

+112
-0
lines changed

2 files changed

+112
-0
lines changed
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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+
maxItems: 1
59+
$ref: /schemas/types.yaml#/definitions/phandle
60+
description: |
61+
Reference to the SART address filter.
62+
63+
The SART address filter is documented in iommu/apple,sart.yaml.
64+
65+
if:
66+
properties:
67+
compatible:
68+
contains:
69+
const: apple,t8103-nvme-ans2
70+
then:
71+
properties:
72+
power-domains:
73+
maxItems: 2
74+
power-domain-names:
75+
maxItems: 2
76+
else:
77+
properties:
78+
power-domains:
79+
minItems: 3
80+
power-domain-names:
81+
minItems: 3
82+
83+
required:
84+
- compatible
85+
- reg
86+
- reg-names
87+
- resets
88+
- power-domains
89+
- power-domain-names
90+
- mboxes
91+
- interrupts
92+
- apple,sart
93+
94+
additionalProperties: false
95+
96+
examples:
97+
- |
98+
#include <dt-bindings/interrupt-controller/apple-aic.h>
99+
#include <dt-bindings/interrupt-controller/irq.h>
100+
101+
nvme@7bcc0000 {
102+
compatible = "apple,t8103-nvme-ans2", "apple,nvme-ans2";
103+
reg = <0x7bcc0000 0x40000>, <0x77400000 0x4000>;
104+
reg-names = "nvme", "ans";
105+
interrupts = <AIC_IRQ 590 IRQ_TYPE_LEVEL_HIGH>;
106+
mboxes = <&ans>;
107+
apple,sart = <&sart>;
108+
power-domains = <&ps_ans2>, <&ps_apcie_st>;
109+
power-domain-names = "ans", "apcie0";
110+
resets = <&ps_ans2>;
111+
};

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,6 +1838,7 @@ F: Documentation/devicetree/bindings/i2c/apple,i2c.yaml
18381838
F: Documentation/devicetree/bindings/interrupt-controller/apple,*
18391839
F: Documentation/devicetree/bindings/iommu/apple,sart.yaml
18401840
F: Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
1841+
F: Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml
18411842
F: Documentation/devicetree/bindings/pci/apple,pcie.yaml
18421843
F: Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
18431844
F: Documentation/devicetree/bindings/power/apple*

0 commit comments

Comments
 (0)