- Fix description of mediatek,mcm. mediatek,mcm is not used on MT7623NI.
- Add description for reset-gpios.
- Invalidate reset-gpios if mediatek,mcm is used. We cannot use multiple
reset lines at the same time.
- Invalidate mediatek,mcm if the compatible device is mediatek,mt7531.
There is no multi-chip module version of mediatek,mt7531.
- Require mediatek,mcm for mediatek,mt7621 as the compatible string is only
used for the multi-chip module version of MT7530.
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
.../bindings/net/dsa/mediatek,mt7530.yaml | 31 +++++++++++++++++--
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index edf48e917173..4c99266ce82a 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -110,11 +110,15 @@ properties:
mediatek,mcm:
type: boolean
description:
- if defined, indicates that either MT7530 is the part on multi-chip
- module belong to MT7623A has or the remotely standalone chip as the
- function MT7623N reference board provided for.
+ Used for MT7621AT, MT7621DAT, MT7621ST and MT7623AI SoCs which the MT7530
+ switch is a part of the multi-chip module.
reset-gpios:
+ description:
+ GPIO to reset the switch. Use this if mediatek,mcm is not used.
+ This property is optional because some boards share the reset line with
+ other components which makes it impossible to probe the switch if the
+ reset line is used.
maxItems: 1
reset-names:
@@ -165,6 +169,9 @@ allOf:
required:
- mediatek,mcm
then:
+ properties:
+ reset-gpios: false
+
required:
- resets
- reset-names
@@ -182,6 +189,24 @@ allOf:
- core-supply
- io-supply
+ - if:
+ properties:
+ compatible:
+ items:
+ - const: mediatek,mt7531
+ then:
+ properties:
+ mediatek,mcm: false
+
+ - if:
+ properties:
+ compatible:
+ items:
+ - const: mediatek,mt7621
+ then:
+ required:
+ - mediatek,mcm
+
unevaluatedProperties: false
examples:
--
2.34.1
On 20/08/2022 11:07, Arınç ÜNAL wrote: > - Fix description of mediatek,mcm. mediatek,mcm is not used on MT7623NI. Separate commit. You are still doing here few things at a time. > - Add description for reset-gpios. > - Invalidate reset-gpios if mediatek,mcm is used. We cannot use multiple > reset lines at the same time. > - Invalidate mediatek,mcm if the compatible device is mediatek,mt7531. > There is no multi-chip module version of mediatek,mt7531. > - Require mediatek,mcm for mediatek,mt7621 as the compatible string is only > used for the multi-chip module version of MT7530. > > Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> > --- > .../bindings/net/dsa/mediatek,mt7530.yaml | 31 +++++++++++++++++-- > 1 file changed, 28 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > index edf48e917173..4c99266ce82a 100644 > --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > @@ -110,11 +110,15 @@ properties: > mediatek,mcm: > type: boolean > description: > - if defined, indicates that either MT7530 is the part on multi-chip > - module belong to MT7623A has or the remotely standalone chip as the > - function MT7623N reference board provided for. > + Used for MT7621AT, MT7621DAT, MT7621ST and MT7623AI SoCs which the MT7530 > + switch is a part of the multi-chip module. > > reset-gpios: > + description: > + GPIO to reset the switch. Use this if mediatek,mcm is not used. > + This property is optional because some boards share the reset line with > + other components which makes it impossible to probe the switch if the > + reset line is used. > maxItems: 1 > > reset-names: > @@ -165,6 +169,9 @@ allOf: > required: > - mediatek,mcm > then: > + properties: > + reset-gpios: false > + > required: > - resets > - reset-names > @@ -182,6 +189,24 @@ allOf: > - core-supply > - io-supply > > + - if: > + properties: > + compatible: > + items: Again, not items. This can be just const or enum. > + - const: mediatek,mt7531 > + then: > + properties: > + mediatek,mcm: false > + > + - if: > + properties: > + compatible: > + items: Ditto. > + - const: mediatek,mt7621 > + then: > + required: > + - mediatek,mcm > + > unevaluatedProperties: false > > examples: Best regards, Krzysztof
On 23.08.2022 13:44, Krzysztof Kozlowski wrote: > On 20/08/2022 11:07, Arınç ÜNAL wrote: >> - Fix description of mediatek,mcm. mediatek,mcm is not used on MT7623NI. > > Separate commit. You are still doing here few things at a time. Will split. > >> - Add description for reset-gpios. >> - Invalidate reset-gpios if mediatek,mcm is used. We cannot use multiple >> reset lines at the same time. >> - Invalidate mediatek,mcm if the compatible device is mediatek,mt7531. >> There is no multi-chip module version of mediatek,mt7531. >> - Require mediatek,mcm for mediatek,mt7621 as the compatible string is only >> used for the multi-chip module version of MT7530. >> >> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> >> --- >> .../bindings/net/dsa/mediatek,mt7530.yaml | 31 +++++++++++++++++-- >> 1 file changed, 28 insertions(+), 3 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml >> index edf48e917173..4c99266ce82a 100644 >> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml >> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml >> @@ -110,11 +110,15 @@ properties: >> mediatek,mcm: >> type: boolean >> description: >> - if defined, indicates that either MT7530 is the part on multi-chip >> - module belong to MT7623A has or the remotely standalone chip as the >> - function MT7623N reference board provided for. >> + Used for MT7621AT, MT7621DAT, MT7621ST and MT7623AI SoCs which the MT7530 >> + switch is a part of the multi-chip module. >> >> reset-gpios: >> + description: >> + GPIO to reset the switch. Use this if mediatek,mcm is not used. >> + This property is optional because some boards share the reset line with >> + other components which makes it impossible to probe the switch if the >> + reset line is used. >> maxItems: 1 >> >> reset-names: >> @@ -165,6 +169,9 @@ allOf: >> required: >> - mediatek,mcm >> then: >> + properties: >> + reset-gpios: false >> + >> required: >> - resets >> - reset-names >> @@ -182,6 +189,24 @@ allOf: >> - core-supply >> - io-supply >> >> + - if: >> + properties: >> + compatible: >> + items: > > Again, not items. This can be just const or enum. Will do. > >> + - const: mediatek,mt7531 >> + then: >> + properties: >> + mediatek,mcm: false >> + >> + - if: >> + properties: >> + compatible: >> + items: > > Ditto. Arınç
© 2016 - 2024 Red Hat, Inc.