Skip to contentSkip to conversation

Add StarFive JH8100 dwmac support

PATCH Superseded Tan Chun Hau 3 participants 9 messages Jan 11, 2024

Subsystems (5)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add StarFive JH8100 dwmac support

Add StarFive JH8100 dwmac support.
JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.

Changes in v2:
- Drop driver patch.
- Add missing "starfive,jh8100-dwmac" to snps,dwmac
- Add handling resets for starfive,jh8100-dwmac and provide an else condition for others.

---
Tan Chun Hau (1):
dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support

 .../devicetree/bindings/net/snps,dwmac.yaml   |  1 +
 .../bindings/net/starfive,jh7110-dwmac.yaml   | 50 +++++++++++++------
 2 files changed, 37 insertions(+), 14 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/1 dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support

Add StarFive JH8100 dwmac support.
JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.

---
 .../devicetree/bindings/net/snps,dwmac.yaml   |  1 +
 .../bindings/net/starfive,jh7110-dwmac.yaml   | 50 +++++++++++++------
 2 files changed, 37 insertions(+), 14 deletions(-)
Documentation/devicetree/bindings/net/snps,dwmac.yaml +1 -0
index 5c2769dc689a..350b3d76630f 100644
@@ -96,6 +96,7 @@ properties:
         - snps,dwxgmac
         - snps,dwxgmac-2.10
         - starfive,jh7110-dwmac
+        - starfive,jh8100-dwmac
 
   reg:
     minItems: 1
Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml +36 -14

73 lines not on this page · raw message

Signature · 1 line
2.25.1
#6 lore raw
In reply to Tan Chun Hau
Quoted 5 lines · Tan Chun Hau

Add StarFive JH8100 dwmac support.
JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.

Changes in v2:
- Drop driver patch.

? But devices are not compatible, so how can it work?

Best regards,
Krzysztof

#7 lore raw
Quoted 8 lines · Krzysztof Kozlowski
Quoted 5 lines · Tan Chun Hau

Add StarFive JH8100 dwmac support.
JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.

Changes in v2:
- Drop driver patch.

? But devices are not compatible, so how can it work?

Wait, your select confused me... later you made them compatible.

Best regards,
Krzysztof

#2 lore raw

Re: [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support

In reply to Tan Chun Hau
Quoted 14 lines · Tan Chun Hau

Add StarFive JH8100 dwmac support.
JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.

---
 .../devicetree/bindings/net/snps,dwmac.yaml   |  1 +
 .../bindings/net/starfive,jh7110-dwmac.yaml   | 50 +++++++++++++------
 2 files changed, 37 insertions(+), 14 deletions(-)
Documentation/devicetree/bindings/net/snps,dwmac.yaml +0 -0
index 5c2769dc689a..350b3d76630f 100644

Documentation/devicetree/bindings/net/snps,dwmac.yaml properties: · line 99

Quoted 4 lines
Documentation/devicetree/bindings/net/snps,dwmac.yaml +1 -0
@@ -96,6 +96,7 @@ properties:
         - snps,dwxgmac
         - snps,dwxgmac-2.10
         - starfive,jh7110-dwmac
+        - starfive,jh8100-dwmac

Drop, not needed.

Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml select: · line 20

Quoted 12 lines
Documentation/devicetree/bindings/net/snps,dwmac.yaml +0 -0
   reg:
     minItems: 1
Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml +1 -0
index 5e7cfbbebce6..7e4547961bab 100644
@@ -17,15 +17,23 @@ select:
       contains:
         enum:
           - starfive,jh7110-dwmac
+          - starfive,jh8100-dwmac

Drop, not needed.

Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml select: · line 28

Quoted 9 lines
Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml +0 -4
   required:
     - compatible
 
 properties:
   compatible:
-    items:
-      - enum:
-          - starfive,jh7110-dwmac
-      - const: snps,dwmac-5.20

Best regards,
Krzysztof

#8 lore raw
In reply to Krzysztof Kozlowski
Quoted 29 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Thursday, 11 January, 2024 4:03 PM
To: ChunHau Tan <[email protected]>; David S . Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Rob Herring <[email protected]>; Emil Renner Berthing <[email protected]>; Rob Herring <[email protected]>; Krzysztof Kozlowski <[email protected]>; Conor Dooley <[email protected]>; Maxime Coquelin <[email protected]>; Alexandre Torgue <[email protected]>; Simon Horman <[email protected]>; Bartosz Golaszewski <[email protected]>; Andrew Halaney <[email protected]>; Jisheng Zhang <[email protected]>; Uwe Kleine-König <[email protected]>; Russell King <[email protected]>
Cc: Leyfoon Tan <[email protected]>; JeeHeng Sia <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2 0/1] Add StarFive JH8100 dwmac support

Quoted 4 lines · Krzysztof Kozlowski
Quoted 3 lines · Tan Chun Hau

Add StarFive JH8100 dwmac support.
JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Changes in v2:
- Drop driver patch.

? But devices are not compatible, so how can it work?

Wait, your select confused me... later you made them compatible.

Sorry for confusing, let me try to explain in detail, For JH7110, there are two resets (stmmaceth & ahb) For JH8100, there are only a resets (stmmaceth) And both are using same driver code (dwmac-starfive.c), and
in the driver code acknowledges { .compatible = "starfive,jh7110-dwmac" }

In v2 patch, I try to make amend the yaml file by adding "starfive,jh8100-dwmac" and provide info regarding the differences in resets.

For loading the driver for JH8110,
Will including "starfive,jh7110-dwmac" in device tree file,

please refer to below example of JH7110 & JH8100 device tree file:

Example of JH7110:

gmac0: ethernet@16030000 {
			compatible = "starfive,jh7110-dwmac", "snps,dwmac-5.20";
			resets = <&aoncrg JH7110_AONRST_GMAC0_AXI>,
				 <&aoncrg JH7110_AONRST_GMAC0_AHB>;
			reset-names = "stmmaceth", "ahb";
		};

Example of JH8100:

gmac0: ethernet@16030000 {
			compatible = "starfive,jh8100-dwmac", "starfive,jh7110-dwmac","snps,dwmac-5.20";
			resets = <&aoncrg JH8100RST_GMAC0>,
			reset-names = "stmmaceth";
		};

Please share with me if you have any suggestions, thank you.

Quoted 3 lines

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support

In reply to Tan Chun Hau
Quoted 8 lines · Tan Chun Hau

Add StarFive JH8100 dwmac support.
JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.

---
 .../devicetree/bindings/net/snps,dwmac.yaml   |  1 +
 .../bindings/net/starfive,jh7110-dwmac.yaml   | 50 +++++++++++++------
 2 files changed, 37 insertions(+), 14 deletions(-)

[...]

Please note this is going to conflict with the about-to-be-merged changes in [1], so probably it makes sense to wait for that to be picked up before sending a new revision.

[1]: https://lore.kernel.org/lkml/[email protected]/

Regards,
Cristian

#4 lore raw

Re: [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support

Quoted 10 lines · Cristian Ciocaltea
Quoted 8 lines · Tan Chun Hau

Add StarFive JH8100 dwmac support.
JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.

---
 .../devicetree/bindings/net/snps,dwmac.yaml   |  1 +
 .../bindings/net/starfive,jh7110-dwmac.yaml   | 50 +++++++++++++------
 2 files changed, 37 insertions(+), 14 deletions(-)
Quoted 3 lines

[...]

Please note this is going to conflict with the about-to-be-merged changes

They weren't picked up, so how they can be merged? If you mean applied, then you suggest your patchset has some kind of preference, but this needs explanation why.

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support

Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines · Cristian Ciocaltea
Quoted 8 lines · Tan Chun Hau

Add StarFive JH8100 dwmac support.
JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.

---
 .../devicetree/bindings/net/snps,dwmac.yaml   |  1 +
 .../bindings/net/starfive,jh7110-dwmac.yaml   | 50 +++++++++++++------
 2 files changed, 37 insertions(+), 14 deletions(-)
Quoted 7 lines
Quoted 3 lines

[...]

Please note this is going to conflict with the about-to-be-merged changes

They weren't picked up, so how they can be merged? If you mean applied, then you suggest your patchset has some kind of preference, but this needs explanation why.

I just meant they got reviewed and should be ready to be applied.

Quoted 3 lines

Best regards,
Krzysztof