diff mbox series

[v4,5/6] dt-bindings: net: dsa: make reset optional and add rgmii-mode to mt7531

Message ID 20220610170541.8643-6-linux@fw-web.de (mailing list archive)
State Accepted
Commit ae07485d7a1d8dbabf5211043f21987a268c898b
Delegated to: Netdev Maintainers
Headers show
Series Support mt7531 on BPI-R2 Pro | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 18 of 18 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 26 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Frank Wunderlich June 10, 2022, 5:05 p.m. UTC
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(-)

Comments

Rob Herring June 14, 2022, 10:34 p.m. UTC | #1
On Fri, 10 Jun 2022 19:05:40 +0200, Frank Wunderlich wrote:
> 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(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

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 ]