Message ID | 20230202-asahi-t8112-dt-v1-5-cb5442d1c229@jannau.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Device trees for Apple M2 (t8112) based devices | expand |
On Sun, 12 Feb 2023 15:41:15 +0000, Janne Grunau <j@jannau.net> wrote: > > The Apple M2 SoC uses AICv2 and is compatible with the existing driver. > Add its per-SoC compatible. > Since multi-die versions of the M2 are not expected decrease > '#interrupt-cells' to 3 for apple,t8112-aic. This is seamlessly handled > inside the driver. > > Signed-off-by: Janne Grunau <j@jannau.net> Acked-by: Marc Zyngier <maz@kernel.org> M.
On 12/02/2023 16:41, Janne Grunau wrote: > The Apple M2 SoC uses AICv2 and is compatible with the existing driver. > Add its per-SoC compatible. > Since multi-die versions of the M2 are not expected decrease > '#interrupt-cells' to 3 for apple,t8112-aic. This is seamlessly handled > inside the driver. > > Signed-off-by: Janne Grunau <j@jannau.net> > > --- > This trivial dt-bindings update should be merged through the asahi-soc > tree to ensure validation of the Apple M2 (t8112) devicetrees in this > series. > --- > .../bindings/interrupt-controller/apple,aic2.yaml | 23 +++++++++++++++++++--- > 1 file changed, 20 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml b/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml > index 06948c0e36a5..120e23ff668c 100644 > --- a/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml > +++ b/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml > @@ -31,19 +31,22 @@ description: | > properties: > compatible: > items: > - - const: apple,t6000-aic > + - enum: > + - apple,t8112-aic > + - apple,t6000-aic > - const: apple,aic2 > > interrupt-controller: true > > '#interrupt-cells': > - const: 4 > + minimum: 3 > + maximum: 4 > description: | > The 1st cell contains the interrupt type: > - 0: Hardware IRQ > - 1: FIQ > > - The 2nd cell contains the die ID. > + The 2nd cell contains the die ID (optional). > > The next cell contains the interrupt number. > - HW IRQs: interrupt number > @@ -98,6 +101,20 @@ properties: > - apple,fiq-index > - cpus > > +if: Put it under allOf. After "required:", just like example-schema asks for. > + properties: > + compatible: > + contains: > + const: apple,t8112-aic > +then: > + properties: > + '#interrupt-cells': > + maximum: 3 Shouldn't this be: const: 3 > +else: > + properties: > + '#interrupt-cells': > + minimum: 4 const: 4 Best regards, Krzysztof
On 2023-02-13 12:12:25 +0100, Krzysztof Kozlowski wrote: > On 12/02/2023 16:41, Janne Grunau wrote: > > The Apple M2 SoC uses AICv2 and is compatible with the existing driver. > > Add its per-SoC compatible. > > Since multi-die versions of the M2 are not expected decrease > > '#interrupt-cells' to 3 for apple,t8112-aic. This is seamlessly handled > > inside the driver. > > > > Signed-off-by: Janne Grunau <j@jannau.net> > > > > --- > > This trivial dt-bindings update should be merged through the asahi-soc > > tree to ensure validation of the Apple M2 (t8112) devicetrees in this > > series. > > --- > > .../bindings/interrupt-controller/apple,aic2.yaml | 23 +++++++++++++++++++--- > > 1 file changed, 20 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml b/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml > > index 06948c0e36a5..120e23ff668c 100644 > > --- a/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml > > +++ b/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml > > @@ -31,19 +31,22 @@ description: | > > properties: > > compatible: > > items: > > - - const: apple,t6000-aic > > + - enum: > > + - apple,t8112-aic > > + - apple,t6000-aic > > - const: apple,aic2 > > > > interrupt-controller: true > > > > '#interrupt-cells': > > - const: 4 > > + minimum: 3 > > + maximum: 4 > > description: | > > The 1st cell contains the interrupt type: > > - 0: Hardware IRQ > > - 1: FIQ > > > > - The 2nd cell contains the die ID. > > + The 2nd cell contains the die ID (optional). > > > > The next cell contains the interrupt number. > > - HW IRQs: interrupt number > > @@ -98,6 +101,20 @@ properties: > > - apple,fiq-index > > - cpus > > > > +if: > > Put it under allOf. After "required:", just like example-schema asks for. moved > > + properties: > > + compatible: > > + contains: > > + const: apple,t8112-aic > > +then: > > + properties: > > + '#interrupt-cells': > > + maximum: 3 > > Shouldn't this be: > const: 3 same effect but more explicit, bot changed > > +else: > > + properties: > > + '#interrupt-cells': > > + minimum: 4 > > const: 4 thanks Janne
diff --git a/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml b/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml index 06948c0e36a5..120e23ff668c 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml @@ -31,19 +31,22 @@ description: | properties: compatible: items: - - const: apple,t6000-aic + - enum: + - apple,t8112-aic + - apple,t6000-aic - const: apple,aic2 interrupt-controller: true '#interrupt-cells': - const: 4 + minimum: 3 + maximum: 4 description: | The 1st cell contains the interrupt type: - 0: Hardware IRQ - 1: FIQ - The 2nd cell contains the die ID. + The 2nd cell contains the die ID (optional). The next cell contains the interrupt number. - HW IRQs: interrupt number @@ -98,6 +101,20 @@ properties: - apple,fiq-index - cpus +if: + properties: + compatible: + contains: + const: apple,t8112-aic +then: + properties: + '#interrupt-cells': + maximum: 3 +else: + properties: + '#interrupt-cells': + minimum: 4 + required: - compatible - '#interrupt-cells'
The Apple M2 SoC uses AICv2 and is compatible with the existing driver. Add its per-SoC compatible. Since multi-die versions of the M2 are not expected decrease '#interrupt-cells' to 3 for apple,t8112-aic. This is seamlessly handled inside the driver. Signed-off-by: Janne Grunau <j@jannau.net> --- This trivial dt-bindings update should be merged through the asahi-soc tree to ensure validation of the Apple M2 (t8112) devicetrees in this series. --- .../bindings/interrupt-controller/apple,aic2.yaml | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-)