netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name
@ 2023-04-06  8:01 arinc9.unal
  2023-04-06  8:01 ` [PATCH 2/7] dt-bindings: net: dsa: mediatek,mt7530: improve MCM and MT7988 information arinc9.unal
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: arinc9.unal @ 2023-04-06  8:01 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: Arınç ÜNAL, erkin.bozoglu, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

From: Arınç ÜNAL <arinc.unal@arinc9.com>

The brand name is MediaTek, change it to that.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 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 <arinc.unal@arinc9.com>
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 2/7] dt-bindings: net: dsa: mediatek,mt7530: improve MCM and MT7988 information
  2023-04-06  8:01 [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name arinc9.unal
@ 2023-04-06  8:01 ` arinc9.unal
  2023-04-06  9:46   ` Daniel Golle
  2023-04-06 19:00   ` Krzysztof Kozlowski
  2023-04-06  8:01 ` [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988 arinc9.unal
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 26+ messages in thread
From: arinc9.unal @ 2023-04-06  8:01 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: Arınç ÜNAL, erkin.bozoglu, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

From: Arınç ÜNAL <arinc.unal@arinc9.com>

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 <arinc.unal@arinc9.com>
---
 .../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 <arinc.unal@arinc9.com>
+  - Daniel Golle <daniel@makrotopia.org>
   - Landen Chao <Landen.Chao@mediatek.com>
   - DENG Qingfang <dqfext@gmail.com>
   - Sean Wang <sean.wang@mediatek.com>
-  - Daniel Golle <daniel@makrotopia.org>
 
 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


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988
  2023-04-06  8:01 [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name arinc9.unal
  2023-04-06  8:01 ` [PATCH 2/7] dt-bindings: net: dsa: mediatek,mt7530: improve MCM and MT7988 information arinc9.unal
@ 2023-04-06  8:01 ` arinc9.unal
  2023-04-06  9:46   ` Daniel Golle
  2023-04-06 19:07   ` Krzysztof Kozlowski
  2023-04-06  8:01 ` [PATCH 4/7] dt-bindings: net: dsa: mediatek,mt7530: allow delayed rgmii phy-modes arinc9.unal
                   ` (5 subsequent siblings)
  7 siblings, 2 replies; 26+ messages in thread
From: arinc9.unal @ 2023-04-06  8:01 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: Arınç ÜNAL, erkin.bozoglu, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

From: Arınç ÜNAL <arinc.unal@arinc9.com>

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 <arinc.unal@arinc9.com>
---
 .../bindings/net/dsa/mediatek,mt7530.yaml     | 63 ++++++++++++++-----
 1 file changed, 46 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 7045a98d9593..605888ce2bc6 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -160,22 +160,6 @@ 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 +170,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 +208,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 +243,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 +314,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


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 4/7] dt-bindings: net: dsa: mediatek,mt7530: allow delayed rgmii phy-modes
  2023-04-06  8:01 [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name arinc9.unal
  2023-04-06  8:01 ` [PATCH 2/7] dt-bindings: net: dsa: mediatek,mt7530: improve MCM and MT7988 information arinc9.unal
  2023-04-06  8:01 ` [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988 arinc9.unal
@ 2023-04-06  8:01 ` arinc9.unal
  2023-04-06  9:48   ` Daniel Golle
  2023-04-06  8:01 ` [PATCH 5/7] dt-bindings: net: dsa: mediatek,mt7530: disallow reset without mediatek,mcm arinc9.unal
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 26+ messages in thread
From: arinc9.unal @ 2023-04-06  8:01 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: Arınç ÜNAL, erkin.bozoglu, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

From: Arınç ÜNAL <arinc.unal@arinc9.com>

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 <arinc.unal@arinc9.com>
---
 .../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 605888ce2bc6..9d99f7303453 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -196,6 +196,9 @@ $defs:
                       - gmii
                       - mii
                       - rgmii
+                      - rgmii-id
+                      - rgmii-rxid
+                      - rgmii-txid
               else:
                 properties:
                   phy-mode:
@@ -234,6 +237,9 @@ $defs:
                       - 1000base-x
                       - 2500base-x
                       - rgmii
+                      - rgmii-id
+                      - rgmii-rxid
+                      - rgmii-txid
                       - sgmii
               else:
                 properties:
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 5/7] dt-bindings: net: dsa: mediatek,mt7530: disallow reset without mediatek,mcm
  2023-04-06  8:01 [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name arinc9.unal
                   ` (2 preceding siblings ...)
  2023-04-06  8:01 ` [PATCH 4/7] dt-bindings: net: dsa: mediatek,mt7530: allow delayed rgmii phy-modes arinc9.unal
@ 2023-04-06  8:01 ` arinc9.unal
  2023-04-06  9:48   ` Daniel Golle
  2023-04-06 19:08   ` Krzysztof Kozlowski
  2023-04-06  8:01 ` [PATCH 6/7] dt-bindings: net: dsa: mediatek,mt7530: disallow core-supply and io-supply arinc9.unal
                   ` (3 subsequent siblings)
  7 siblings, 2 replies; 26+ messages in thread
From: arinc9.unal @ 2023-04-06  8:01 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: Arınç ÜNAL, erkin.bozoglu, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

From: Arınç ÜNAL <arinc.unal@arinc9.com>

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 <arinc.unal@arinc9.com>
---
 .../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 9d99f7303453..3fd953b1453e 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -282,6 +282,10 @@ allOf:
       required:
         - resets
         - reset-names
+    else:
+      properties:
+        resets: false
+        reset-names: false
 
   - dependencies:
       interrupt-controller: [ interrupts ]
@@ -324,7 +328,6 @@ allOf:
       properties:
         gpio-controller: false
         mediatek,mcm: false
-        reset-names: false
 
 unevaluatedProperties: false
 
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 6/7] dt-bindings: net: dsa: mediatek,mt7530: disallow core-supply and io-supply
  2023-04-06  8:01 [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name arinc9.unal
                   ` (3 preceding siblings ...)
  2023-04-06  8:01 ` [PATCH 5/7] dt-bindings: net: dsa: mediatek,mt7530: disallow reset without mediatek,mcm arinc9.unal
@ 2023-04-06  8:01 ` arinc9.unal
  2023-04-06  9:49   ` Daniel Golle
  2023-04-06  8:01 ` [PATCH 7/7] dt-bindings: net: dsa: mediatek,mt7530: allow mediatek,mcm on MT7531 arinc9.unal
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 26+ messages in thread
From: arinc9.unal @ 2023-04-06  8:01 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: Arınç ÜNAL, erkin.bozoglu, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

From: Arınç ÜNAL <arinc.unal@arinc9.com>

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 <arinc.unal@arinc9.com>
---
 .../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 3fd953b1453e..0095b7fcef72 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -299,6 +299,10 @@ allOf:
       required:
         - core-supply
         - io-supply
+    else:
+      properties:
+        core-supply: false
+        io-supply: false
 
   - if:
       properties:
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 7/7] dt-bindings: net: dsa: mediatek,mt7530: allow mediatek,mcm on MT7531
  2023-04-06  8:01 [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name arinc9.unal
                   ` (4 preceding siblings ...)
  2023-04-06  8:01 ` [PATCH 6/7] dt-bindings: net: dsa: mediatek,mt7530: disallow core-supply and io-supply arinc9.unal
@ 2023-04-06  8:01 ` arinc9.unal
  2023-04-06  9:49   ` Daniel Golle
  2023-04-06  9:46 ` [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name Daniel Golle
  2023-04-06 19:00 ` Krzysztof Kozlowski
  7 siblings, 1 reply; 26+ messages in thread
From: arinc9.unal @ 2023-04-06  8:01 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: Arınç ÜNAL, erkin.bozoglu, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

From: Arınç ÜNAL <arinc.unal@arinc9.com>

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 <arinc.unal@arinc9.com>
---
 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 0095b7fcef72..b1dc1600f0dc 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -312,7 +312,6 @@ allOf:
       $ref: "#/$defs/mt7531-dsa-port"
       properties:
         gpio-controller: false
-        mediatek,mcm: false
 
   - if:
       properties:
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name
  2023-04-06  8:01 [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name arinc9.unal
                   ` (5 preceding siblings ...)
  2023-04-06  8:01 ` [PATCH 7/7] dt-bindings: net: dsa: mediatek,mt7530: allow mediatek,mcm on MT7531 arinc9.unal
@ 2023-04-06  9:46 ` Daniel Golle
  2023-04-06 19:00 ` Krzysztof Kozlowski
  7 siblings, 0 replies; 26+ messages in thread
From: Daniel Golle @ 2023-04-06  9:46 UTC (permalink / raw)
  To: arinc9.unal
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Landen Chao, DENG Qingfang,
	Sean Wang, Arınç ÜNAL, erkin.bozoglu, netdev,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, Apr 06, 2023 at 11:01:35AM +0300, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> The brand name is MediaTek, change it to that.
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

Acked-by: Daniel Golle <daniel@makrotopia.org>

> ---
>  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 <arinc.unal@arinc9.com>
> -- 
> 2.37.2
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 2/7] dt-bindings: net: dsa: mediatek,mt7530: improve MCM and MT7988 information
  2023-04-06  8:01 ` [PATCH 2/7] dt-bindings: net: dsa: mediatek,mt7530: improve MCM and MT7988 information arinc9.unal
@ 2023-04-06  9:46   ` Daniel Golle
  2023-04-06 19:00   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 26+ messages in thread
From: Daniel Golle @ 2023-04-06  9:46 UTC (permalink / raw)
  To: arinc9.unal
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Landen Chao, DENG Qingfang,
	Sean Wang, Arınç ÜNAL, erkin.bozoglu, netdev,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, Apr 06, 2023 at 11:01:36AM +0300, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> 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 <arinc.unal@arinc9.com>

Acked-by: Daniel Golle <daniel@makrotopia.org>

> ---
>  .../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 <arinc.unal@arinc9.com>
> +  - Daniel Golle <daniel@makrotopia.org>
>    - Landen Chao <Landen.Chao@mediatek.com>
>    - DENG Qingfang <dqfext@gmail.com>
>    - Sean Wang <sean.wang@mediatek.com>
> -  - Daniel Golle <daniel@makrotopia.org>
>  
>  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
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988
  2023-04-06  8:01 ` [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988 arinc9.unal
@ 2023-04-06  9:46   ` Daniel Golle
  2023-04-06 19:07   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 26+ messages in thread
From: Daniel Golle @ 2023-04-06  9:46 UTC (permalink / raw)
  To: arinc9.unal
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Landen Chao, DENG Qingfang,
	Sean Wang, Arınç ÜNAL, erkin.bozoglu, netdev,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, Apr 06, 2023 at 11:01:37AM +0300, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> 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 <arinc.unal@arinc9.com>

Acked-by: Daniel Golle <daniel@makrotopia.org>

> ---
>  .../bindings/net/dsa/mediatek,mt7530.yaml     | 63 ++++++++++++++-----
>  1 file changed, 46 insertions(+), 17 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> index 7045a98d9593..605888ce2bc6 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> @@ -160,22 +160,6 @@ 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 +170,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 +208,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 +243,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 +314,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
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 4/7] dt-bindings: net: dsa: mediatek,mt7530: allow delayed rgmii phy-modes
  2023-04-06  8:01 ` [PATCH 4/7] dt-bindings: net: dsa: mediatek,mt7530: allow delayed rgmii phy-modes arinc9.unal
@ 2023-04-06  9:48   ` Daniel Golle
  0 siblings, 0 replies; 26+ messages in thread
From: Daniel Golle @ 2023-04-06  9:48 UTC (permalink / raw)
  To: arinc9.unal
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Landen Chao, DENG Qingfang,
	Sean Wang, Arınç ÜNAL, erkin.bozoglu, netdev,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, Apr 06, 2023 at 11:01:38AM +0300, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> 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 <arinc.unal@arinc9.com>

Acked-by: Daniel Golle <daniel@makrotopia.org>

> ---
>  .../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 605888ce2bc6..9d99f7303453 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> @@ -196,6 +196,9 @@ $defs:
>                        - gmii
>                        - mii
>                        - rgmii
> +                      - rgmii-id
> +                      - rgmii-rxid
> +                      - rgmii-txid
>                else:
>                  properties:
>                    phy-mode:
> @@ -234,6 +237,9 @@ $defs:
>                        - 1000base-x
>                        - 2500base-x
>                        - rgmii
> +                      - rgmii-id
> +                      - rgmii-rxid
> +                      - rgmii-txid
>                        - sgmii
>                else:
>                  properties:
> -- 
> 2.37.2
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 5/7] dt-bindings: net: dsa: mediatek,mt7530: disallow reset without mediatek,mcm
  2023-04-06  8:01 ` [PATCH 5/7] dt-bindings: net: dsa: mediatek,mt7530: disallow reset without mediatek,mcm arinc9.unal
@ 2023-04-06  9:48   ` Daniel Golle
  2023-04-06 19:08   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 26+ messages in thread
From: Daniel Golle @ 2023-04-06  9:48 UTC (permalink / raw)
  To: arinc9.unal
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Landen Chao, DENG Qingfang,
	Sean Wang, Arınç ÜNAL, erkin.bozoglu, netdev,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, Apr 06, 2023 at 11:01:39AM +0300, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> 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 <arinc.unal@arinc9.com>

Acked-by: Daniel Golle <daniel@makrotopia.org>

> ---
>  .../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 9d99f7303453..3fd953b1453e 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> @@ -282,6 +282,10 @@ allOf:
>        required:
>          - resets
>          - reset-names
> +    else:
> +      properties:
> +        resets: false
> +        reset-names: false
>  
>    - dependencies:
>        interrupt-controller: [ interrupts ]
> @@ -324,7 +328,6 @@ allOf:
>        properties:
>          gpio-controller: false
>          mediatek,mcm: false
> -        reset-names: false
>  
>  unevaluatedProperties: false
>  
> -- 
> 2.37.2
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 6/7] dt-bindings: net: dsa: mediatek,mt7530: disallow core-supply and io-supply
  2023-04-06  8:01 ` [PATCH 6/7] dt-bindings: net: dsa: mediatek,mt7530: disallow core-supply and io-supply arinc9.unal
@ 2023-04-06  9:49   ` Daniel Golle
  0 siblings, 0 replies; 26+ messages in thread
From: Daniel Golle @ 2023-04-06  9:49 UTC (permalink / raw)
  To: arinc9.unal
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Landen Chao, DENG Qingfang,
	Sean Wang, Arınç ÜNAL, erkin.bozoglu, netdev,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, Apr 06, 2023 at 11:01:40AM +0300, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> 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 <arinc.unal@arinc9.com>

Acked-by: Daniel Golle <daniel@makrotopia.org>

> ---
>  .../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 3fd953b1453e..0095b7fcef72 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> @@ -299,6 +299,10 @@ allOf:
>        required:
>          - core-supply
>          - io-supply
> +    else:
> +      properties:
> +        core-supply: false
> +        io-supply: false
>  
>    - if:
>        properties:
> -- 
> 2.37.2
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 7/7] dt-bindings: net: dsa: mediatek,mt7530: allow mediatek,mcm on MT7531
  2023-04-06  8:01 ` [PATCH 7/7] dt-bindings: net: dsa: mediatek,mt7530: allow mediatek,mcm on MT7531 arinc9.unal
@ 2023-04-06  9:49   ` Daniel Golle
  0 siblings, 0 replies; 26+ messages in thread
From: Daniel Golle @ 2023-04-06  9:49 UTC (permalink / raw)
  To: arinc9.unal
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Landen Chao, DENG Qingfang,
	Sean Wang, Arınç ÜNAL, erkin.bozoglu, netdev,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, Apr 06, 2023 at 11:01:41AM +0300, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> 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 <arinc.unal@arinc9.com>

Acked-by: Daniel Golle <daniel@makrotopia.org>

> ---
>  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 0095b7fcef72..b1dc1600f0dc 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> @@ -312,7 +312,6 @@ allOf:
>        $ref: "#/$defs/mt7531-dsa-port"
>        properties:
>          gpio-controller: false
> -        mediatek,mcm: false
>  
>    - if:
>        properties:
> -- 
> 2.37.2
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name
  2023-04-06  8:01 [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name arinc9.unal
                   ` (6 preceding siblings ...)
  2023-04-06  9:46 ` [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name Daniel Golle
@ 2023-04-06 19:00 ` Krzysztof Kozlowski
  2023-04-06 19:23   ` Arınç ÜNAL
  7 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-06 19:00 UTC (permalink / raw)
  To: arinc9.unal, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: Arınç ÜNAL, erkin.bozoglu, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

On 06/04/2023 10:01, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> The brand name is MediaTek, change it to that.
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 2 +-


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

although maybe this would be a lot of churn if done per-file.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 2/7] dt-bindings: net: dsa: mediatek,mt7530: improve MCM and MT7988 information
  2023-04-06  8:01 ` [PATCH 2/7] dt-bindings: net: dsa: mediatek,mt7530: improve MCM and MT7988 information arinc9.unal
  2023-04-06  9:46   ` Daniel Golle
@ 2023-04-06 19:00   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-06 19:00 UTC (permalink / raw)
  To: arinc9.unal, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: Arınç ÜNAL, erkin.bozoglu, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

On 06/04/2023 10:01, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> 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 <arinc.unal@arinc9.com>
> ---


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988
  2023-04-06  8:01 ` [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988 arinc9.unal
  2023-04-06  9:46   ` Daniel Golle
@ 2023-04-06 19:07   ` Krzysztof Kozlowski
  2023-04-06 19:18     ` Arınç ÜNAL
  1 sibling, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-06 19:07 UTC (permalink / raw)
  To: arinc9.unal, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: Arınç ÜNAL, erkin.bozoglu, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

On 06/04/2023 10:01, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> 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 <arinc.unal@arinc9.com>
> ---
>  .../bindings/net/dsa/mediatek,mt7530.yaml     | 63 ++++++++++++++-----
>  1 file changed, 46 insertions(+), 17 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> index 7045a98d9593..605888ce2bc6 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> @@ -160,22 +160,6 @@ 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
> -

I have doubts that the binding is still maintainable/reviewable. First,
why do you need all above patterns after removal of entire contents?

Second, amount of if-then-if-then located in existing blocks (not
top-level) is quite big. I counted if-then-using defs, where defs has
patternProps-patternProps-if-then-if-then-properties.... OMG. :)

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 5/7] dt-bindings: net: dsa: mediatek,mt7530: disallow reset without mediatek,mcm
  2023-04-06  8:01 ` [PATCH 5/7] dt-bindings: net: dsa: mediatek,mt7530: disallow reset without mediatek,mcm arinc9.unal
  2023-04-06  9:48   ` Daniel Golle
@ 2023-04-06 19:08   ` Krzysztof Kozlowski
  2023-04-06 19:19     ` Arınç ÜNAL
  1 sibling, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-06 19:08 UTC (permalink / raw)
  To: arinc9.unal, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: Arınç ÜNAL, erkin.bozoglu, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

On 06/04/2023 10:01, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> 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 <arinc.unal@arinc9.com>
> ---
>  .../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 9d99f7303453..3fd953b1453e 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> @@ -282,6 +282,10 @@ allOf:
>        required:
>          - resets
>          - reset-names
> +    else:
> +      properties:
> +        resets: false
> +        reset-names: false
>  
>    - dependencies:
>        interrupt-controller: [ interrupts ]
> @@ -324,7 +328,6 @@ allOf:
>        properties:
>          gpio-controller: false
>          mediatek,mcm: false
> -        reset-names: false

I don't see such hunk in linux-next.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988
  2023-04-06 19:07   ` Krzysztof Kozlowski
@ 2023-04-06 19:18     ` Arınç ÜNAL
  2023-04-07  9:07       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 26+ messages in thread
From: Arınç ÜNAL @ 2023-04-06 19:18 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andrew Lunn, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: erkin.bozoglu, netdev, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On 6.04.2023 22:07, Krzysztof Kozlowski wrote:
> On 06/04/2023 10:01, arinc9.unal@gmail.com wrote:
>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>>
>> 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 <arinc.unal@arinc9.com>
>> ---
>>   .../bindings/net/dsa/mediatek,mt7530.yaml     | 63 ++++++++++++++-----
>>   1 file changed, 46 insertions(+), 17 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>> index 7045a98d9593..605888ce2bc6 100644
>> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>> @@ -160,22 +160,6 @@ 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
>> -
> 
> I have doubts that the binding is still maintainable/reviewable. First,
> why do you need all above patterns after removal of entire contents?

The 'type: object' item is still globally used. I'd have to define that 
on each definitions, I suppose?

> 
> Second, amount of if-then-if-then located in existing blocks (not
> top-level) is quite big. I counted if-then-using defs, where defs has
> patternProps-patternProps-if-then-if-then-properties.... OMG. :)

Yup, not much to do if we want to keep the information. I'm still 
maintaining this though. ¯\_(ツ)_/¯

Arınç

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 5/7] dt-bindings: net: dsa: mediatek,mt7530: disallow reset without mediatek,mcm
  2023-04-06 19:08   ` Krzysztof Kozlowski
@ 2023-04-06 19:19     ` Arınç ÜNAL
  2023-04-07  9:07       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 26+ messages in thread
From: Arınç ÜNAL @ 2023-04-06 19:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski, arinc9.unal, Andrew Lunn, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: erkin.bozoglu, netdev, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On 6.04.2023 22:08, Krzysztof Kozlowski wrote:
> On 06/04/2023 10:01, arinc9.unal@gmail.com wrote:
>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>>
>> 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 <arinc.unal@arinc9.com>
>> ---
>>   .../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 9d99f7303453..3fd953b1453e 100644
>> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>> @@ -282,6 +282,10 @@ allOf:
>>         required:
>>           - resets
>>           - reset-names
>> +    else:
>> +      properties:
>> +        resets: false
>> +        reset-names: false
>>   
>>     - dependencies:
>>         interrupt-controller: [ interrupts ]
>> @@ -324,7 +328,6 @@ allOf:
>>         properties:
>>           gpio-controller: false
>>           mediatek,mcm: false
>> -        reset-names: false
> 
> I don't see such hunk in linux-next.

This was added very recently so it's only on net-next at the moment.

Arınç

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name
  2023-04-06 19:00 ` Krzysztof Kozlowski
@ 2023-04-06 19:23   ` Arınç ÜNAL
  0 siblings, 0 replies; 26+ messages in thread
From: Arınç ÜNAL @ 2023-04-06 19:23 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andrew Lunn, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: erkin.bozoglu, netdev, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On 6.04.2023 22:00, Krzysztof Kozlowski wrote:
> On 06/04/2023 10:01, arinc9.unal@gmail.com wrote:
>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>>
>> The brand name is MediaTek, change it to that.
>>
>> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
>> ---
>>   Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 2 +-
> 
> 
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> although maybe this would be a lot of churn if done per-file.

I don't intend to. There's only this schema of MediaTek for DSA, and I 
happen to maintain it. Maybe I can do a treewide change for other 
schemas in the future.

Arınç

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988
  2023-04-06 19:18     ` Arınç ÜNAL
@ 2023-04-07  9:07       ` Krzysztof Kozlowski
  2023-04-07  9:46         ` Arınç ÜNAL
  0 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-07  9:07 UTC (permalink / raw)
  To: Arınç ÜNAL, Andrew Lunn, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: erkin.bozoglu, netdev, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On 06/04/2023 21:18, Arınç ÜNAL wrote:
> On 6.04.2023 22:07, Krzysztof Kozlowski wrote:
>> On 06/04/2023 10:01, arinc9.unal@gmail.com wrote:
>>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>>>
>>> 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 <arinc.unal@arinc9.com>
>>> ---
>>>   .../bindings/net/dsa/mediatek,mt7530.yaml     | 63 ++++++++++++++-----
>>>   1 file changed, 46 insertions(+), 17 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>> index 7045a98d9593..605888ce2bc6 100644
>>> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>> @@ -160,22 +160,6 @@ 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
>>> -
>>
>> I have doubts that the binding is still maintainable/reviewable. First,
>> why do you need all above patterns after removal of entire contents?
> 
> The 'type: object' item is still globally used. I'd have to define that 
> on each definitions, I suppose?

Doesn't it come from dsa.yaml/dsa-port.yaml schema?

> 
>>
>> Second, amount of if-then-if-then located in existing blocks (not
>> top-level) is quite big. I counted if-then-using defs, where defs has
>> patternProps-patternProps-if-then-if-then-properties.... OMG. :)
> 
> Yup, not much to do if we want to keep the information. I'm still 
> maintaining this though. ¯\_(ツ)_/¯

Maybe it should be split into few bindings sharing common part.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 5/7] dt-bindings: net: dsa: mediatek,mt7530: disallow reset without mediatek,mcm
  2023-04-06 19:19     ` Arınç ÜNAL
@ 2023-04-07  9:07       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-07  9:07 UTC (permalink / raw)
  To: Arınç ÜNAL, arinc9.unal, Andrew Lunn,
	Florian Fainelli, Vladimir Oltean, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Matthias Brugger, AngeloGioacchino Del Regno, Daniel Golle,
	Landen Chao, DENG Qingfang, Sean Wang
  Cc: erkin.bozoglu, netdev, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On 06/04/2023 21:19, Arınç ÜNAL wrote:
> On 6.04.2023 22:08, Krzysztof Kozlowski wrote:
>> On 06/04/2023 10:01, arinc9.unal@gmail.com wrote:
>>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>>>
>>> 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 <arinc.unal@arinc9.com>
>>> ---
>>>   .../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 9d99f7303453..3fd953b1453e 100644
>>> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>> @@ -282,6 +282,10 @@ allOf:
>>>         required:
>>>           - resets
>>>           - reset-names
>>> +    else:
>>> +      properties:
>>> +        resets: false
>>> +        reset-names: false
>>>   
>>>     - dependencies:
>>>         interrupt-controller: [ interrupts ]
>>> @@ -324,7 +328,6 @@ allOf:
>>>         properties:
>>>           gpio-controller: false
>>>           mediatek,mcm: false
>>> -        reset-names: false
>>
>> I don't see such hunk in linux-next.
> 
> This was added very recently so it's only on net-next at the moment.

OK, I was checking one few days old.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988
  2023-04-07  9:07       ` Krzysztof Kozlowski
@ 2023-04-07  9:46         ` Arınç ÜNAL
  2023-04-12 16:39           ` Krzysztof Kozlowski
  0 siblings, 1 reply; 26+ messages in thread
From: Arınç ÜNAL @ 2023-04-07  9:46 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andrew Lunn, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: erkin.bozoglu, netdev, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On 7.04.2023 12:07, Krzysztof Kozlowski wrote:
> On 06/04/2023 21:18, Arınç ÜNAL wrote:
>> On 6.04.2023 22:07, Krzysztof Kozlowski wrote:
>>> On 06/04/2023 10:01, arinc9.unal@gmail.com wrote:
>>>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>>>>
>>>> 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 <arinc.unal@arinc9.com>
>>>> ---
>>>>    .../bindings/net/dsa/mediatek,mt7530.yaml     | 63 ++++++++++++++-----
>>>>    1 file changed, 46 insertions(+), 17 deletions(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>>> index 7045a98d9593..605888ce2bc6 100644
>>>> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>>> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>>> @@ -160,22 +160,6 @@ 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
>>>> -
>>>
>>> I have doubts that the binding is still maintainable/reviewable. First,
>>> why do you need all above patterns after removal of entire contents?
>>
>> The 'type: object' item is still globally used. I'd have to define that
>> on each definitions, I suppose?
> 
> Doesn't it come from dsa.yaml/dsa-port.yaml schema?

It comes from dsa.yaml#/$defs/ethernet-ports which this schema already 
refers to. I'll remove the patterns above.

Though 'type: object' is not there for "^(ethernet-)?port@[0-9]+$". I 
think I should add it there as the dsa-port.yaml schema defines the 
properties of the DSA switch port object. So the value matching the 
"^(ethernet-)?port@[0-9]+$" regular expression is expected to be an 
object conforming to the structure defined in dsa-port.yaml.

Does that make sense?

> 
>>
>>>
>>> Second, amount of if-then-if-then located in existing blocks (not
>>> top-level) is quite big. I counted if-then-using defs, where defs has
>>> patternProps-patternProps-if-then-if-then-properties.... OMG. :)
>>
>> Yup, not much to do if we want to keep the information. I'm still
>> maintaining this though. ¯\_(ツ)_/¯
> 
> Maybe it should be split into few bindings sharing common part.

Agreed, I think it makes sense to split this to MT7530, MT7531, and 
MT7988. I will do this after this series.

Arınç

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988
  2023-04-07  9:46         ` Arınç ÜNAL
@ 2023-04-12 16:39           ` Krzysztof Kozlowski
  2023-04-12 17:44             ` Arınç ÜNAL
  0 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-12 16:39 UTC (permalink / raw)
  To: Arınç ÜNAL, Andrew Lunn, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: erkin.bozoglu, netdev, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On 07/04/2023 11:46, Arınç ÜNAL wrote:
> On 7.04.2023 12:07, Krzysztof Kozlowski wrote:
>> On 06/04/2023 21:18, Arınç ÜNAL wrote:
>>> On 6.04.2023 22:07, Krzysztof Kozlowski wrote:
>>>> On 06/04/2023 10:01, arinc9.unal@gmail.com wrote:
>>>>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>>>>>
>>>>> 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 <arinc.unal@arinc9.com>
>>>>> ---
>>>>>    .../bindings/net/dsa/mediatek,mt7530.yaml     | 63 ++++++++++++++-----
>>>>>    1 file changed, 46 insertions(+), 17 deletions(-)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>>>> index 7045a98d9593..605888ce2bc6 100644
>>>>> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>>>> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>>>> @@ -160,22 +160,6 @@ 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
>>>>> -
>>>>
>>>> I have doubts that the binding is still maintainable/reviewable. First,
>>>> why do you need all above patterns after removal of entire contents?
>>>
>>> The 'type: object' item is still globally used. I'd have to define that
>>> on each definitions, I suppose?
>>
>> Doesn't it come from dsa.yaml/dsa-port.yaml schema?
> 
> It comes from dsa.yaml#/$defs/ethernet-ports which this schema already 
> refers to. I'll remove the patterns above.
> 
> Though 'type: object' is not there for "^(ethernet-)?port@[0-9]+$". I 
> think I should add it there as the dsa-port.yaml schema defines the 
> properties of the DSA switch port object. 

It has ref, which is enough.

> So the value matching the 
> "^(ethernet-)?port@[0-9]+$" regular expression is expected to be an 
> object conforming to the structure defined in dsa-port.yaml.
> 
> Does that make sense?

Hm, no, sorry, I still do not see what exactly is missing from
dsa.yaml/port that you need to define here.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988
  2023-04-12 16:39           ` Krzysztof Kozlowski
@ 2023-04-12 17:44             ` Arınç ÜNAL
  0 siblings, 0 replies; 26+ messages in thread
From: Arınç ÜNAL @ 2023-04-12 17:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andrew Lunn, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Daniel Golle, Landen Chao,
	DENG Qingfang, Sean Wang
  Cc: erkin.bozoglu, netdev, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On 12.04.2023 19:39, Krzysztof Kozlowski wrote:
> On 07/04/2023 11:46, Arınç ÜNAL wrote:
>> On 7.04.2023 12:07, Krzysztof Kozlowski wrote:
>>> On 06/04/2023 21:18, Arınç ÜNAL wrote:
>>>> On 6.04.2023 22:07, Krzysztof Kozlowski wrote:
>>>>> On 06/04/2023 10:01, arinc9.unal@gmail.com wrote:
>>>>>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>>>>>>
>>>>>> 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 <arinc.unal@arinc9.com>
>>>>>> ---
>>>>>>     .../bindings/net/dsa/mediatek,mt7530.yaml     | 63 ++++++++++++++-----
>>>>>>     1 file changed, 46 insertions(+), 17 deletions(-)
>>>>>>
>>>>>> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>>>>> index 7045a98d9593..605888ce2bc6 100644
>>>>>> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>>>>> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>>>>> @@ -160,22 +160,6 @@ 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
>>>>>> -
>>>>>
>>>>> I have doubts that the binding is still maintainable/reviewable. First,
>>>>> why do you need all above patterns after removal of entire contents?
>>>>
>>>> The 'type: object' item is still globally used. I'd have to define that
>>>> on each definitions, I suppose?
>>>
>>> Doesn't it come from dsa.yaml/dsa-port.yaml schema?
>>
>> It comes from dsa.yaml#/$defs/ethernet-ports which this schema already
>> refers to. I'll remove the patterns above.
>>
>> Though 'type: object' is not there for "^(ethernet-)?port@[0-9]+$". I
>> think I should add it there as the dsa-port.yaml schema defines the
>> properties of the DSA switch port object.
> 
> It has ref, which is enough.
> 
>> So the value matching the
>> "^(ethernet-)?port@[0-9]+$" regular expression is expected to be an
>> object conforming to the structure defined in dsa-port.yaml.
>>
>> Does that make sense?
> 
> Hm, no, sorry, I still do not see what exactly is missing from
> dsa.yaml/port that you need to define here.

Nothing, I forgot defining either ref or type is enough.

Arınç

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2023-04-12 17:45 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-06  8:01 [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name arinc9.unal
2023-04-06  8:01 ` [PATCH 2/7] dt-bindings: net: dsa: mediatek,mt7530: improve MCM and MT7988 information arinc9.unal
2023-04-06  9:46   ` Daniel Golle
2023-04-06 19:00   ` Krzysztof Kozlowski
2023-04-06  8:01 ` [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988 arinc9.unal
2023-04-06  9:46   ` Daniel Golle
2023-04-06 19:07   ` Krzysztof Kozlowski
2023-04-06 19:18     ` Arınç ÜNAL
2023-04-07  9:07       ` Krzysztof Kozlowski
2023-04-07  9:46         ` Arınç ÜNAL
2023-04-12 16:39           ` Krzysztof Kozlowski
2023-04-12 17:44             ` Arınç ÜNAL
2023-04-06  8:01 ` [PATCH 4/7] dt-bindings: net: dsa: mediatek,mt7530: allow delayed rgmii phy-modes arinc9.unal
2023-04-06  9:48   ` Daniel Golle
2023-04-06  8:01 ` [PATCH 5/7] dt-bindings: net: dsa: mediatek,mt7530: disallow reset without mediatek,mcm arinc9.unal
2023-04-06  9:48   ` Daniel Golle
2023-04-06 19:08   ` Krzysztof Kozlowski
2023-04-06 19:19     ` Arınç ÜNAL
2023-04-07  9:07       ` Krzysztof Kozlowski
2023-04-06  8:01 ` [PATCH 6/7] dt-bindings: net: dsa: mediatek,mt7530: disallow core-supply and io-supply arinc9.unal
2023-04-06  9:49   ` Daniel Golle
2023-04-06  8:01 ` [PATCH 7/7] dt-bindings: net: dsa: mediatek,mt7530: allow mediatek,mcm on MT7531 arinc9.unal
2023-04-06  9:49   ` Daniel Golle
2023-04-06  9:46 ` [PATCH 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name Daniel Golle
2023-04-06 19:00 ` Krzysztof Kozlowski
2023-04-06 19:23   ` Arınç ÜNAL

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).