182b96552SSven Peter# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
282b96552SSven Peter%YAML 1.2
382b96552SSven Peter---
482b96552SSven Peter$id: http://devicetree.org/schemas/nvme/apple,nvme-ans.yaml#
582b96552SSven Peter$schema: http://devicetree.org/meta-schemas/core.yaml#
682b96552SSven Peter
782b96552SSven Petertitle: Apple ANS NVM Express host controller
882b96552SSven Peter
982b96552SSven Petermaintainers:
1082b96552SSven Peter  - Sven Peter <sven@svenpeter.dev>
1182b96552SSven Peter
1282b96552SSven Peterproperties:
1382b96552SSven Peter  compatible:
1482b96552SSven Peter    items:
1582b96552SSven Peter      - enum:
1682b96552SSven Peter          - apple,t8103-nvme-ans2
17*20fa978cSJanne Grunau          - apple,t8112-nvme-ans2
1882b96552SSven Peter          - apple,t6000-nvme-ans2
1982b96552SSven Peter      - const: apple,nvme-ans2
2082b96552SSven Peter
2182b96552SSven Peter  reg:
2282b96552SSven Peter    items:
2382b96552SSven Peter      - description: NVMe and NVMMU registers
2482b96552SSven Peter      - description: ANS2 co-processor control registers
2582b96552SSven Peter
2682b96552SSven Peter  reg-names:
2782b96552SSven Peter    items:
2882b96552SSven Peter      - const: nvme
2982b96552SSven Peter      - const: ans
3082b96552SSven Peter
3182b96552SSven Peter  resets:
3282b96552SSven Peter    maxItems: 1
3382b96552SSven Peter
3482b96552SSven Peter  power-domains:
3582b96552SSven Peter    # two domains for t8103, three for t6000
3682b96552SSven Peter    minItems: 2
3782b96552SSven Peter    items:
3882b96552SSven Peter      - description: power domain for the NVMe controller.
3982b96552SSven Peter      - description: power domain for the first PCIe bus connecting the NVMe
4082b96552SSven Peter          controller to the storage modules.
4182b96552SSven Peter      - description: optional power domain for the second PCIe bus
4282b96552SSven Peter          connecting the NVMe controller to the storage modules.
4382b96552SSven Peter
4482b96552SSven Peter  power-domain-names:
4582b96552SSven Peter    minItems: 2
4682b96552SSven Peter    items:
4782b96552SSven Peter      - const: ans
4882b96552SSven Peter      - const: apcie0
4982b96552SSven Peter      - const: apcie1
5082b96552SSven Peter
5182b96552SSven Peter  mboxes:
5282b96552SSven Peter    maxItems: 1
5382b96552SSven Peter    description: Mailbox of the ANS2 co-processor
5482b96552SSven Peter
5582b96552SSven Peter  interrupts:
5682b96552SSven Peter    maxItems: 1
5782b96552SSven Peter
5882b96552SSven Peter  apple,sart:
5982b96552SSven Peter    $ref: /schemas/types.yaml#/definitions/phandle
6082b96552SSven Peter    description: |
6182b96552SSven Peter      Reference to the SART address filter.
6282b96552SSven Peter
6382b96552SSven Peter      The SART address filter is documented in iommu/apple,sart.yaml.
6482b96552SSven Peter
6582b96552SSven Peterif:
6682b96552SSven Peter  properties:
6782b96552SSven Peter    compatible:
6882b96552SSven Peter      contains:
69*20fa978cSJanne Grunau        enum:
70*20fa978cSJanne Grunau          - apple,t8103-nvme-ans2
71*20fa978cSJanne Grunau          - apple,t8112-nvme-ans2
7282b96552SSven Peterthen:
7382b96552SSven Peter  properties:
7482b96552SSven Peter    power-domains:
7582b96552SSven Peter      maxItems: 2
7682b96552SSven Peter    power-domain-names:
7782b96552SSven Peter      maxItems: 2
7882b96552SSven Peterelse:
7982b96552SSven Peter  properties:
8082b96552SSven Peter    power-domains:
8182b96552SSven Peter      minItems: 3
8282b96552SSven Peter    power-domain-names:
8382b96552SSven Peter      minItems: 3
8482b96552SSven Peter
8582b96552SSven Peterrequired:
8682b96552SSven Peter  - compatible
8782b96552SSven Peter  - reg
8882b96552SSven Peter  - reg-names
8982b96552SSven Peter  - resets
9082b96552SSven Peter  - power-domains
9182b96552SSven Peter  - power-domain-names
9282b96552SSven Peter  - mboxes
9382b96552SSven Peter  - interrupts
9482b96552SSven Peter  - apple,sart
9582b96552SSven Peter
9682b96552SSven PeteradditionalProperties: false
9782b96552SSven Peter
9882b96552SSven Peterexamples:
9982b96552SSven Peter  - |
10082b96552SSven Peter    #include <dt-bindings/interrupt-controller/apple-aic.h>
10182b96552SSven Peter    #include <dt-bindings/interrupt-controller/irq.h>
10282b96552SSven Peter
10382b96552SSven Peter    nvme@7bcc0000 {
10482b96552SSven Peter      compatible = "apple,t8103-nvme-ans2", "apple,nvme-ans2";
10582b96552SSven Peter      reg = <0x7bcc0000 0x40000>, <0x77400000 0x4000>;
10682b96552SSven Peter      reg-names = "nvme", "ans";
10782b96552SSven Peter      interrupts = <AIC_IRQ 590 IRQ_TYPE_LEVEL_HIGH>;
10882b96552SSven Peter      mboxes = <&ans>;
10982b96552SSven Peter      apple,sart = <&sart>;
11082b96552SSven Peter      power-domains = <&ps_ans2>, <&ps_apcie_st>;
11182b96552SSven Peter      power-domain-names = "ans", "apcie0";
11282b96552SSven Peter      resets = <&ps_ans2>;
11382b96552SSven Peter    };
114