Message ID | 20220321165049.35985-3-sven@svenpeter.dev (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Apple M1 (Pro/Max) NVMe driver | expand |
On 21/03/2022 17:50, Sven Peter wrote: > Apple SoCs such as the M1 come with an embedded NVMe coprocessor called > ANS2. > > Signed-off-by: Sven Peter <sven@svenpeter.dev> > --- > .../bindings/soc/apple/apple,nvme-ans.yaml | 75 +++++++++++++++++++ > 1 file changed, 75 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml > > diff --git a/Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml b/Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml > new file mode 100644 > index 000000000000..e1f4c1c572aa > --- /dev/null > +++ b/Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml > @@ -0,0 +1,75 @@ > +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/soc/apple/apple,nvme-ans.yaml# Do not drop all code in soc/apple, but please use respective subsystems. Apple is not a subsystem, is not special. > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Apple ANS NVM Express host controller > + > +maintainers: > + - Sven Peter <sven@svenpeter.dev> > + > +properties: > + compatible: > + items: > + - enum: > + - apple,t8103-nvme-ans2 > + - apple,t6000-nvme-ans2 > + - const: apple,nvme-ans2 > + > + reg: > + items: > + - description: NVMe and NVMMU registers > + - description: ANS2 co-processor control registers > + > + reg-names: > + items: > + - const: nvme > + - const: ans > + > + resets: > + maxItems: 1 > + > + power-domains: true maxItems Best regards, Krzysztof
Hi, thanks for the review! On Wed, Mar 23, 2022, at 12:14, Krzysztof Kozlowski wrote: > On 21/03/2022 17:50, Sven Peter wrote: >> Apple SoCs such as the M1 come with an embedded NVMe coprocessor called >> ANS2. >> >> Signed-off-by: Sven Peter <sven@svenpeter.dev> >> --- >> .../bindings/soc/apple/apple,nvme-ans.yaml | 75 +++++++++++++++++++ >> 1 file changed, 75 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml >> >> diff --git a/Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml b/Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml >> new file mode 100644 >> index 000000000000..e1f4c1c572aa >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml >> @@ -0,0 +1,75 @@ >> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/soc/apple/apple,nvme-ans.yaml# > > Do not drop all code in soc/apple, but please use respective subsystems. > Apple is not a subsystem, is not special. > Sure, the code is already inside drivers/nvme/host but I'll also create Documentation/devicetree/bindings/nvme and put the bindings in there as well. >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Apple ANS NVM Express host controller >> + >> +maintainers: >> + - Sven Peter <sven@svenpeter.dev> >> + >> +properties: >> + compatible: >> + items: >> + - enum: >> + - apple,t8103-nvme-ans2 >> + - apple,t6000-nvme-ans2 >> + - const: apple,nvme-ans2 >> + >> + reg: >> + items: >> + - description: NVMe and NVMMU registers >> + - description: ANS2 co-processor control registers >> + >> + reg-names: >> + items: >> + - const: nvme >> + - const: ans >> + >> + resets: >> + maxItems: 1 >> + >> + power-domains: true > > maxItems Ok, I guess I can just use the max number of domains in the HW released so far and we can always increase it when Apple releases a new SoC that requires more power domains then. Thanks, Sven
On 02/04/2022 15:05, Sven Peter wrote: > Hi, > > thanks for the review! > > On Wed, Mar 23, 2022, at 12:14, Krzysztof Kozlowski wrote: >> On 21/03/2022 17:50, Sven Peter wrote: >>> Apple SoCs such as the M1 come with an embedded NVMe coprocessor called >>> ANS2. >>> >>> Signed-off-by: Sven Peter <sven@svenpeter.dev> >>> --- >>> .../bindings/soc/apple/apple,nvme-ans.yaml | 75 +++++++++++++++++++ >>> 1 file changed, 75 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml >>> >>> diff --git a/Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml b/Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml >>> new file mode 100644 >>> index 000000000000..e1f4c1c572aa >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml >>> @@ -0,0 +1,75 @@ >>> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/soc/apple/apple,nvme-ans.yaml# >> >> Do not drop all code in soc/apple, but please use respective subsystems. >> Apple is not a subsystem, is not special. >> > > Sure, the code is already inside drivers/nvme/host but I'll also create > Documentation/devicetree/bindings/nvme and put the bindings in there as > well. Yes, please. We have also Documentation/devicetree/bindings/nvmem/ but it seems its entirely different stuff. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml b/Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml new file mode 100644 index 000000000000..e1f4c1c572aa --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/apple/apple,nvme-ans.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple ANS NVM Express host controller + +maintainers: + - Sven Peter <sven@svenpeter.dev> + +properties: + compatible: + items: + - enum: + - apple,t8103-nvme-ans2 + - apple,t6000-nvme-ans2 + - const: apple,nvme-ans2 + + reg: + items: + - description: NVMe and NVMMU registers + - description: ANS2 co-processor control registers + + reg-names: + items: + - const: nvme + - const: ans + + resets: + maxItems: 1 + + power-domains: true + + mboxes: + maxItems: 1 + description: Mailbox of the ANS2 co-processor + + interrupts: + maxItems: 1 + + apple,sart: + maxItems: 1 + $ref: /schemas/types.yaml#/definitions/phandle + description: | + Reference to the SART address filter. + + The SART address filter is documented in apple,sart.yaml. + +required: + - compatible + - reg + - reg-names + - resets + - mboxes + - interrupts + - apple,sart + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/apple-aic.h> + #include <dt-bindings/interrupt-controller/irq.h> + + nvme@7bcc0000 { + compatible = "apple,t8103-nvme-ans2", "apple,nvme-ans2"; + reg = <0x7bcc0000 0x40000>, <0x77400000 0x4000>; + reg-names = "nvme", "ans"; + interrupts = <AIC_IRQ 590 IRQ_TYPE_LEVEL_HIGH>; + mboxes = <&ans>; + apple,sart = <&sart>; + power-domains = <&ps_ans2>; + resets = <&ps_ans2>; + };
Apple SoCs such as the M1 come with an embedded NVMe coprocessor called ANS2. Signed-off-by: Sven Peter <sven@svenpeter.dev> --- .../bindings/soc/apple/apple,nvme-ans.yaml | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/apple/apple,nvme-ans.yaml