2023-04-07 12:50:55

by Arınç ÜNAL

[permalink] [raw]
Subject: [PATCH v2 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name

From: Arınç ÜNAL <[email protected]>

The brand name is MediaTek, change it to that.

Signed-off-by: Arınç ÜNAL <[email protected]>
Acked-by: Daniel Golle <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
---
Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index e532c6b795f4..6df995478275 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/net/dsa/mediatek,mt7530.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

-title: Mediatek MT7530 and MT7531 Ethernet Switches
+title: MediaTek MT7530 and MT7531 Ethernet Switches

maintainers:
- Arınç ÜNAL <[email protected]>
--
2.37.2


2023-04-07 12:51:07

by Arınç ÜNAL

[permalink] [raw]
Subject: [PATCH v2 2/7] dt-bindings: net: dsa: mediatek,mt7530: improve MCM and MT7988 information

From: Arınç ÜNAL <[email protected]>

Improve the description of the schema.

The MT7620 SoCs described are not part of the multi-chip module but rather
built into the SoC. Mention the MT7530 MMIO driver not supporting them.

Move information for the switch on the MT7988 SoC below MT7531, and improve
it.

List maintainers in alphabetical order by first name.

Signed-off-by: Arınç ÜNAL <[email protected]>
Acked-by: Daniel Golle <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/net/dsa/mediatek,mt7530.yaml | 25 ++++++++++---------
1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 6df995478275..7045a98d9593 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -8,29 +8,30 @@ title: MediaTek MT7530 and MT7531 Ethernet Switches

maintainers:
- Arınç ÜNAL <[email protected]>
+ - Daniel Golle <[email protected]>
- Landen Chao <[email protected]>
- DENG Qingfang <[email protected]>
- Sean Wang <[email protected]>
- - Daniel Golle <[email protected]>

description: |
- There are three versions of MT7530, standalone, in a multi-chip module and
- built-into a SoC.
+ There are three versions of MT7530, standalone, in a multi-chip module, and
+ built into an SoC.

- MT7530 is a part of the multi-chip module in MT7620AN, MT7620DA, MT7620DAN,
- MT7620NN, MT7621AT, MT7621DAT, MT7621ST and MT7623AI SoCs.
-
- The MT7988 SoC comes with a built-in switch similar to MT7531 as well as four
- Gigabit Ethernet PHYs. The switch registers are directly mapped into the SoC's
- memory map rather than using MDIO. The switch got an internally connected 10G
- CPU port and 4 user ports connected to the built-in Gigabit Ethernet PHYs.
+ MT7530 is a part of the multi-chip module in MT7621AT, MT7621DAT, MT7621ST and
+ MT7623AI SoCs.

MT7530 in MT7620AN, MT7620DA, MT7620DAN and MT7620NN SoCs has got 10/100 PHYs
- and the switch registers are directly mapped into SoC's memory map rather than
- using MDIO. The DSA driver currently doesn't support MT7620 variants.
+ and the switch registers are directly mapped into the SoC's memory map rather
+ than using MDIO. The MT7530 MMIO driver currently doesn't support these SoCs.

There is only the standalone version of MT7531.

+ The MT7988 SoC comes with a built-in switch with four Gigabit Ethernet PHYs.
+ The characteristics of the switch is similar to MT7531. The switch registers
+ are directly mapped into the SoC's memory map rather than using MDIO. The
+ switch has got an internally connected 10G CPU port and 4 user ports connected
+ to the built-in Gigabit Ethernet PHYs.
+
Port 5 on MT7530 has got various ways of configuration:

- Port 5 can be used as a CPU port.
--
2.37.2

2023-04-07 12:51:34

by Arınç ÜNAL

[permalink] [raw]
Subject: [PATCH v2 4/7] dt-bindings: net: dsa: mediatek,mt7530: allow delayed rgmii phy-modes

From: Arınç ÜNAL <[email protected]>

According to mt7530_mac_port_get_caps() and mt7531_mac_port_get_caps(), all
rgmii phy-modes on port 5 are supported. Add the remaining to
mt7530-dsa-ports and mt7531-dsa-ports definitions.

Signed-off-by: Arınç ÜNAL <[email protected]>
Acked-by: Daniel Golle <[email protected]>
---
.../devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 922865a2aabf..79ddd16e530b 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -188,6 +188,9 @@ $defs:
- gmii
- mii
- rgmii
+ - rgmii-id
+ - rgmii-rxid
+ - rgmii-txid
else:
properties:
phy-mode:
@@ -226,6 +229,9 @@ $defs:
- 1000base-x
- 2500base-x
- rgmii
+ - rgmii-id
+ - rgmii-rxid
+ - rgmii-txid
- sgmii
else:
properties:
--
2.37.2

2023-04-07 12:51:42

by Arınç ÜNAL

[permalink] [raw]
Subject: [PATCH v2 5/7] dt-bindings: net: dsa: mediatek,mt7530: disallow reset without mediatek,mcm

From: Arınç ÜNAL <[email protected]>

The resets and reset-names properties are used only if mediatek,mcm is
used. Set them to false if mediatek,mcm is not used.

Remove now unnecessary 'reset-names: false' from MT7988.

Signed-off-by: Arınç ÜNAL <[email protected]>
Acked-by: Daniel Golle <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 79ddd16e530b..b5db0f50aa59 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -274,6 +274,10 @@ allOf:
required:
- resets
- reset-names
+ else:
+ properties:
+ resets: false
+ reset-names: false

- dependencies:
interrupt-controller: [ interrupts ]
@@ -316,7 +320,6 @@ allOf:
properties:
gpio-controller: false
mediatek,mcm: false
- reset-names: false

unevaluatedProperties: false

--
2.37.2

2023-04-07 12:51:44

by Arınç ÜNAL

[permalink] [raw]
Subject: [PATCH v2 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988

From: Arınç ÜNAL <[email protected]>

The switch on MT7988 has got only port 6 as a CPU port. The only phy-mode
to be used is internal. Add this.

Some bindings are incorrect for this switch now, so move them to more
specific places.

Address the incorrect information of which ports can be used as a user
port. Any port can be used as a user port.

Signed-off-by: Arınç ÜNAL <[email protected]>
Acked-by: Daniel Golle <[email protected]>
---
.../bindings/net/dsa/mediatek,mt7530.yaml | 71 ++++++++++++-------
1 file changed, 46 insertions(+), 25 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 7045a98d9593..922865a2aabf 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -152,30 +152,6 @@ properties:
ethsys.
maxItems: 1

-patternProperties:
- "^(ethernet-)?ports$":
- type: object
-
- patternProperties:
- "^(ethernet-)?port@[0-9]+$":
- type: object
-
- properties:
- reg:
- description:
- Port address described must be 5 or 6 for CPU port and from 0 to 5
- for user ports.
-
- allOf:
- - if:
- required: [ ethernet ]
- then:
- properties:
- reg:
- enum:
- - 5
- - 6
-
required:
- compatible
- reg
@@ -186,9 +162,21 @@ $defs:
"^(ethernet-)?ports$":
patternProperties:
"^(ethernet-)?port@[0-9]+$":
+ properties:
+ reg:
+ description:
+ Port address described must be 5 or 6 for the CPU port. User
+ ports can be 0 to 6.
+
if:
required: [ ethernet ]
then:
+ properties:
+ reg:
+ enum:
+ - 5
+ - 6
+
if:
properties:
reg:
@@ -212,9 +200,21 @@ $defs:
"^(ethernet-)?ports$":
patternProperties:
"^(ethernet-)?port@[0-9]+$":
+ properties:
+ reg:
+ description:
+ Port address described must be 5 or 6 for the CPU port. User
+ ports can be 0 to 6.
+
if:
required: [ ethernet ]
then:
+ properties:
+ reg:
+ enum:
+ - 5
+ - 6
+
if:
properties:
reg:
@@ -235,6 +235,27 @@ $defs:
- 2500base-x
- sgmii

+ mt7988-dsa-port:
+ patternProperties:
+ "^(ethernet-)?ports$":
+ patternProperties:
+ "^(ethernet-)?port@[0-9]+$":
+ properties:
+ reg:
+ description:
+ Port address described must be 6 for the CPU port. User ports
+ can be 0 to 3, and 6.
+
+ if:
+ required: [ ethernet ]
+ then:
+ properties:
+ reg:
+ const: 6
+
+ phy-mode:
+ const: internal
+
allOf:
- $ref: dsa.yaml#/$defs/ethernet-ports
- if:
@@ -285,7 +306,7 @@ allOf:
compatible:
const: mediatek,mt7988-switch
then:
- $ref: "#/$defs/mt7530-dsa-port"
+ $ref: "#/$defs/mt7988-dsa-port"
properties:
gpio-controller: false
mediatek,mcm: false
--
2.37.2

2023-04-07 12:52:00

by Arınç ÜNAL

[permalink] [raw]
Subject: [PATCH v2 6/7] dt-bindings: net: dsa: mediatek,mt7530: disallow core-supply and io-supply

From: Arınç ÜNAL <[email protected]>

The core-supply and io-supply properties are used only on hardware that
uses the mediatek,mt7530 compatible string. Set them to false if the
compatible string is not mediatek,mt7530.

Signed-off-by: Arınç ÜNAL <[email protected]>
Acked-by: Daniel Golle <[email protected]>
---
.../devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index b5db0f50aa59..3b85063d5b5a 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -291,6 +291,10 @@ allOf:
required:
- core-supply
- io-supply
+ else:
+ properties:
+ core-supply: false
+ io-supply: false

- if:
properties:
--
2.37.2

2023-04-07 12:52:41

by Arınç ÜNAL

[permalink] [raw]
Subject: [PATCH v2 7/7] dt-bindings: net: dsa: mediatek,mt7530: allow mediatek,mcm on MT7531

From: Arınç ÜNAL <[email protected]>

Allow mediatek,mcm on MT7531. There's code specific to MT7531 that checks
if the switch is part of an MCM.

Signed-off-by: Arınç ÜNAL <[email protected]>
Acked-by: Daniel Golle <[email protected]>
---
Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 1 -
1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 3b85063d5b5a..71ae431c61d1 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -304,7 +304,6 @@ allOf:
$ref: "#/$defs/mt7531-dsa-port"
properties:
gpio-controller: false
- mediatek,mcm: false

- if:
properties:
--
2.37.2

2023-04-12 00:16:12

by Vladimir Oltean

[permalink] [raw]
Subject: Re: [PATCH v2 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name

Hi Arınç,

On Fri, Apr 07, 2023 at 03:50:03PM +0300, [email protected] wrote:
> From: Arınç ÜNAL <[email protected]>
>
> The brand name is MediaTek, change it to that.
>
> Signed-off-by: Arınç ÜNAL <[email protected]>
> Acked-by: Daniel Golle <[email protected]>
> Acked-by: Krzysztof Kozlowski <[email protected]>
> ---

It is good practice for series larger than 2 patches to create a cover
letter, which gives the overview for the changes. Its contents gets used
as the merge commit description when the series is accepted.

2023-04-12 06:45:14

by Arınç ÜNAL

[permalink] [raw]
Subject: Re: [PATCH v2 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name

On 12.04.2023 02:57, Vladimir Oltean wrote:
> Hi Arınç,
>
> On Fri, Apr 07, 2023 at 03:50:03PM +0300, [email protected] wrote:
>> From: Arınç ÜNAL <[email protected]>
>>
>> The brand name is MediaTek, change it to that.
>>
>> Signed-off-by: Arınç ÜNAL <[email protected]>
>> Acked-by: Daniel Golle <[email protected]>
>> Acked-by: Krzysztof Kozlowski <[email protected]>
>> ---
>
> It is good practice for series larger than 2 patches to create a cover
> letter, which gives the overview for the changes. Its contents gets used
> as the merge commit description when the series is accepted.

Ok, will do on the next version. I'll also split the schema while at it.

Arınç

2023-04-12 11:21:45

by Vladimir Oltean

[permalink] [raw]
Subject: Re: [PATCH v2 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name

On Wed, Apr 12, 2023 at 09:36:32AM +0300, Arınç ÜNAL wrote:
> On 12.04.2023 02:57, Vladimir Oltean wrote:
> > Hi Arınç,
> >
> > On Fri, Apr 07, 2023 at 03:50:03PM +0300, [email protected] wrote:
> > > From: Arınç ÜNAL <[email protected]>
> > >
> > > The brand name is MediaTek, change it to that.
> > >
> > > Signed-off-by: Arınç ÜNAL <[email protected]>
> > > Acked-by: Daniel Golle <[email protected]>
> > > Acked-by: Krzysztof Kozlowski <[email protected]>
> > > ---
> >
> > It is good practice for series larger than 2 patches to create a cover
> > letter, which gives the overview for the changes. Its contents gets used
> > as the merge commit description when the series is accepted.
>
> Ok, will do on the next version. I'll also split the schema while at it.

Ok. I wasn't sure if you and Krzysztof were in agreement about that, so
this is why I didn't mention it. FWIW, it's also pretty unreviewable to
me too.

2023-04-12 11:51:13

by Arınç ÜNAL

[permalink] [raw]
Subject: Re: [PATCH v2 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name

On 12.04.2023 14:17, Vladimir Oltean wrote:
> On Wed, Apr 12, 2023 at 09:36:32AM +0300, Arınç ÜNAL wrote:
>> On 12.04.2023 02:57, Vladimir Oltean wrote:
>>> Hi Arınç,
>>>
>>> On Fri, Apr 07, 2023 at 03:50:03PM +0300, [email protected] wrote:
>>>> From: Arınç ÜNAL <[email protected]>
>>>>
>>>> The brand name is MediaTek, change it to that.
>>>>
>>>> Signed-off-by: Arınç ÜNAL <[email protected]>
>>>> Acked-by: Daniel Golle <[email protected]>
>>>> Acked-by: Krzysztof Kozlowski <[email protected]>
>>>> ---
>>>
>>> It is good practice for series larger than 2 patches to create a cover
>>> letter, which gives the overview for the changes. Its contents gets used
>>> as the merge commit description when the series is accepted.
>>
>> Ok, will do on the next version. I'll also split the schema while at it.
>
> Ok. I wasn't sure if you and Krzysztof were in agreement about that, so
> this is why I didn't mention it. FWIW, it's also pretty unreviewable to
> me too.

I already agreed but was planning to do that later. I prefer to divide
things into smaller parts so I improve progressively without being
overwhelmed. My RFC series for this driver along with this series are
growing which has become a bit overwhelming but I'll manage.

Arınç