All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Wunderlich <linux@fw-web.de>
To: linux-rockchip@lists.infradead.org, linux-mediatek@lists.infradead.org
Cc: "Frank Wunderlich" <frank-w@public-files.de>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Landen Chao" <Landen.Chao@mediatek.com>,
	"DENG Qingfang" <dqfext@gmail.com>,
	"Peter Geis" <pgwipeout@gmail.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, "Greg Ungerer" <gerg@kernel.org>,
	"René van Dorst" <opensource@vdorst.com>,
	"Mauro Carvalho Chehab" <mchehab+samsung@kernel.org>
Subject: [PATCH v4 5/6] dt-bindings: net: dsa: make reset optional and add rgmii-mode to mt7531
Date: Fri, 10 Jun 2022 19:05:40 +0200	[thread overview]
Message-ID: <20220610170541.8643-6-linux@fw-web.de> (raw)
In-Reply-To: <20220610170541.8643-1-linux@fw-web.de>

From: Frank Wunderlich <frank-w@public-files.de>

A board may have no independent reset-line, so reset cannot be used
inside switch driver.

E.g. on Bananapi-R2 Pro switch and gmac are connected to same reset-line.

Resets should be acquired only to 1 device/driver. This prevents reset to
be bound to switch-driver if reset is already used for gmac. If reset is
only used by switch driver it resets the switch *and* the gmac after the
mdio bus comes up resulting in mdio bus goes down. It takes some time
until all is up again, switch driver tries to read from mdio, will fail
and defer the probe. On next try the reset does the same again.

Make reset optional for such boards.

Allow port 5 as cpu-port and phy-mode rgmii for mt7531.

- MT7530 supports RGMII on port 5 and RGMII/TRGMII on port 6.
- MT7531 supports on port 5 RGMII and SGMII (dual-sgmii) and
  SGMII on port 6.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
v4:
 - add port 5 as CPU-Port
 - change description
---
 .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml      | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 112cfaa7e3f6..a3bf432960d8 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -55,6 +55,7 @@ description: |
     On mt7531:
       - "1000base-x"
       - "2500base-x"
+      - "rgmii"
       - "sgmii"
 
 
@@ -124,8 +125,8 @@ patternProperties:
         properties:
           reg:
             description:
-              Port address described must be 6 for CPU port and from 0 to
-              5 for user ports.
+              Port address described must be 5 or 6 for CPU port and from 0
+              to 5 for user ports.
 
         allOf:
           - $ref: dsa-port.yaml#
@@ -152,9 +153,6 @@ allOf:
       required:
         - resets
         - reset-names
-    else:
-      required:
-        - reset-gpios
 
   - dependencies:
       interrupt-controller: [ interrupts ]
-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Frank Wunderlich <linux@fw-web.de>
To: linux-rockchip@lists.infradead.org, linux-mediatek@lists.infradead.org
Cc: "Andrew Lunn" <andrew@lunn.ch>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"René van Dorst" <opensource@vdorst.com>,
	"Eric Dumazet" <edumazet@google.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Mauro Carvalho Chehab" <mchehab+samsung@kernel.org>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Greg Ungerer" <gerg@kernel.org>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	devicetree@vger.kernel.org,
	"Landen Chao" <Landen.Chao@mediatek.com>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"DENG Qingfang" <dqfext@gmail.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Peter Geis" <pgwipeout@gmail.com>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: [PATCH v4 5/6] dt-bindings: net: dsa: make reset optional and add rgmii-mode to mt7531
Date: Fri, 10 Jun 2022 19:05:40 +0200	[thread overview]
Message-ID: <20220610170541.8643-6-linux@fw-web.de> (raw)
In-Reply-To: <20220610170541.8643-1-linux@fw-web.de>

From: Frank Wunderlich <frank-w@public-files.de>

A board may have no independent reset-line, so reset cannot be used
inside switch driver.

E.g. on Bananapi-R2 Pro switch and gmac are connected to same reset-line.

Resets should be acquired only to 1 device/driver. This prevents reset to
be bound to switch-driver if reset is already used for gmac. If reset is
only used by switch driver it resets the switch *and* the gmac after the
mdio bus comes up resulting in mdio bus goes down. It takes some time
until all is up again, switch driver tries to read from mdio, will fail
and defer the probe. On next try the reset does the same again.

Make reset optional for such boards.

Allow port 5 as cpu-port and phy-mode rgmii for mt7531.

- MT7530 supports RGMII on port 5 and RGMII/TRGMII on port 6.
- MT7531 supports on port 5 RGMII and SGMII (dual-sgmii) and
  SGMII on port 6.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
v4:
 - add port 5 as CPU-Port
 - change description
---
 .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml      | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 112cfaa7e3f6..a3bf432960d8 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -55,6 +55,7 @@ description: |
     On mt7531:
       - "1000base-x"
       - "2500base-x"
+      - "rgmii"
       - "sgmii"
 
 
@@ -124,8 +125,8 @@ patternProperties:
         properties:
           reg:
             description:
-              Port address described must be 6 for CPU port and from 0 to
-              5 for user ports.
+              Port address described must be 5 or 6 for CPU port and from 0
+              to 5 for user ports.
 
         allOf:
           - $ref: dsa-port.yaml#
@@ -152,9 +153,6 @@ allOf:
       required:
         - resets
         - reset-names
-    else:
-      required:
-        - reset-gpios
 
   - dependencies:
       interrupt-controller: [ interrupts ]
-- 
2.34.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Frank Wunderlich <linux@fw-web.de>
To: linux-rockchip@lists.infradead.org, linux-mediatek@lists.infradead.org
Cc: "Frank Wunderlich" <frank-w@public-files.de>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Landen Chao" <Landen.Chao@mediatek.com>,
	"DENG Qingfang" <dqfext@gmail.com>,
	"Peter Geis" <pgwipeout@gmail.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, "Greg Ungerer" <gerg@kernel.org>,
	"René van Dorst" <opensource@vdorst.com>,
	"Mauro Carvalho Chehab" <mchehab+samsung@kernel.org>
Subject: [PATCH v4 5/6] dt-bindings: net: dsa: make reset optional and add rgmii-mode to mt7531
Date: Fri, 10 Jun 2022 19:05:40 +0200	[thread overview]
Message-ID: <20220610170541.8643-6-linux@fw-web.de> (raw)
In-Reply-To: <20220610170541.8643-1-linux@fw-web.de>

From: Frank Wunderlich <frank-w@public-files.de>

A board may have no independent reset-line, so reset cannot be used
inside switch driver.

E.g. on Bananapi-R2 Pro switch and gmac are connected to same reset-line.

Resets should be acquired only to 1 device/driver. This prevents reset to
be bound to switch-driver if reset is already used for gmac. If reset is
only used by switch driver it resets the switch *and* the gmac after the
mdio bus comes up resulting in mdio bus goes down. It takes some time
until all is up again, switch driver tries to read from mdio, will fail
and defer the probe. On next try the reset does the same again.

Make reset optional for such boards.

Allow port 5 as cpu-port and phy-mode rgmii for mt7531.

- MT7530 supports RGMII on port 5 and RGMII/TRGMII on port 6.
- MT7531 supports on port 5 RGMII and SGMII (dual-sgmii) and
  SGMII on port 6.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
v4:
 - add port 5 as CPU-Port
 - change description
---
 .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml      | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 112cfaa7e3f6..a3bf432960d8 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -55,6 +55,7 @@ description: |
     On mt7531:
       - "1000base-x"
       - "2500base-x"
+      - "rgmii"
       - "sgmii"
 
 
@@ -124,8 +125,8 @@ patternProperties:
         properties:
           reg:
             description:
-              Port address described must be 6 for CPU port and from 0 to
-              5 for user ports.
+              Port address described must be 5 or 6 for CPU port and from 0
+              to 5 for user ports.
 
         allOf:
           - $ref: dsa-port.yaml#
@@ -152,9 +153,6 @@ allOf:
       required:
         - resets
         - reset-names
-    else:
-      required:
-        - reset-gpios
 
   - dependencies:
       interrupt-controller: [ interrupts ]
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Frank Wunderlich <linux@fw-web.de>
To: linux-rockchip@lists.infradead.org, linux-mediatek@lists.infradead.org
Cc: "Frank Wunderlich" <frank-w@public-files.de>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Landen Chao" <Landen.Chao@mediatek.com>,
	"DENG Qingfang" <dqfext@gmail.com>,
	"Peter Geis" <pgwipeout@gmail.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, "Greg Ungerer" <gerg@kernel.org>,
	"René van Dorst" <opensource@vdorst.com>,
	"Mauro Carvalho Chehab" <mchehab+samsung@kernel.org>
Subject: [PATCH v4 5/6] dt-bindings: net: dsa: make reset optional and add rgmii-mode to mt7531
Date: Fri, 10 Jun 2022 19:05:40 +0200	[thread overview]
Message-ID: <20220610170541.8643-6-linux@fw-web.de> (raw)
In-Reply-To: <20220610170541.8643-1-linux@fw-web.de>

From: Frank Wunderlich <frank-w@public-files.de>

A board may have no independent reset-line, so reset cannot be used
inside switch driver.

E.g. on Bananapi-R2 Pro switch and gmac are connected to same reset-line.

Resets should be acquired only to 1 device/driver. This prevents reset to
be bound to switch-driver if reset is already used for gmac. If reset is
only used by switch driver it resets the switch *and* the gmac after the
mdio bus comes up resulting in mdio bus goes down. It takes some time
until all is up again, switch driver tries to read from mdio, will fail
and defer the probe. On next try the reset does the same again.

Make reset optional for such boards.

Allow port 5 as cpu-port and phy-mode rgmii for mt7531.

- MT7530 supports RGMII on port 5 and RGMII/TRGMII on port 6.
- MT7531 supports on port 5 RGMII and SGMII (dual-sgmii) and
  SGMII on port 6.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
v4:
 - add port 5 as CPU-Port
 - change description
---
 .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml      | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 112cfaa7e3f6..a3bf432960d8 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -55,6 +55,7 @@ description: |
     On mt7531:
       - "1000base-x"
       - "2500base-x"
+      - "rgmii"
       - "sgmii"
 
 
@@ -124,8 +125,8 @@ patternProperties:
         properties:
           reg:
             description:
-              Port address described must be 6 for CPU port and from 0 to
-              5 for user ports.
+              Port address described must be 5 or 6 for CPU port and from 0
+              to 5 for user ports.
 
         allOf:
           - $ref: dsa-port.yaml#
@@ -152,9 +153,6 @@ allOf:
       required:
         - resets
         - reset-names
-    else:
-      required:
-        - reset-gpios
 
   - dependencies:
       interrupt-controller: [ interrupts ]
-- 
2.34.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2022-06-10 17:07 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 17:05 [PATCH v4 0/6] Support mt7531 on BPI-R2 Pro Frank Wunderlich
2022-06-10 17:05 ` Frank Wunderlich
2022-06-10 17:05 ` Frank Wunderlich
2022-06-10 17:05 ` Frank Wunderlich
2022-06-10 17:05 ` [PATCH v4 1/6] dt-bindings: net: dsa: convert binding for mediatek switches Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-14 22:32   ` Rob Herring
2022-06-14 22:32     ` Rob Herring
2022-06-14 22:32     ` Rob Herring
2022-06-14 22:32     ` Rob Herring
2022-06-10 17:05 ` [PATCH v4 2/6] net: dsa: mt7530: rework mt7530_hw_vlan_{add,del} Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-14 22:34   ` Florian Fainelli
2022-06-14 22:34     ` Florian Fainelli
2022-06-14 22:34     ` Florian Fainelli
2022-06-14 22:34     ` Florian Fainelli
2022-06-10 17:05 ` [PATCH v4 3/6] net: dsa: mt7530: rework mt753[01]_setup Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-14 22:35   ` Florian Fainelli
2022-06-14 22:35     ` Florian Fainelli
2022-06-14 22:35     ` Florian Fainelli
2022-06-14 22:35     ` Florian Fainelli
2022-06-10 17:05 ` [PATCH v4 4/6] net: dsa: mt7530: get cpu-port via dp->cpu_dp instead of constant Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-14 22:36   ` Florian Fainelli
2022-06-14 22:36     ` Florian Fainelli
2022-06-14 22:36     ` Florian Fainelli
2022-06-14 22:36     ` Florian Fainelli
2022-06-10 17:05 ` Frank Wunderlich [this message]
2022-06-10 17:05   ` [PATCH v4 5/6] dt-bindings: net: dsa: make reset optional and add rgmii-mode to mt7531 Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-14 22:34   ` Rob Herring
2022-06-14 22:34     ` Rob Herring
2022-06-14 22:34     ` Rob Herring
2022-06-14 22:34     ` Rob Herring
2022-06-10 17:05 ` [PATCH v4 6/6] arm64: dts: rockchip: Add mt7531 dsa node to BPI-R2-Pro board Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-10 17:05   ` Frank Wunderlich
2022-06-14 22:36   ` Florian Fainelli
2022-06-14 22:36     ` Florian Fainelli
2022-06-14 22:36     ` Florian Fainelli
2022-06-14 22:36     ` Florian Fainelli
2022-06-15  5:50 ` [PATCH v4 0/6] Support mt7531 on BPI-R2 Pro patchwork-bot+netdevbpf
2022-06-15  5:50   ` patchwork-bot+netdevbpf
2022-06-15  5:50   ` patchwork-bot+netdevbpf
2022-06-15  5:50   ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220610170541.8643-6-linux@fw-web.de \
    --to=linux@fw-web.de \
    --cc=Landen.Chao@mediatek.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=frank-w@public-files.de \
    --cc=gerg@kernel.org \
    --cc=heiko@sntech.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=opensource@vdorst.com \
    --cc=pabeni@redhat.com \
    --cc=pgwipeout@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.