2024-01-11 02:59:27

by ChunHau Tan

[permalink] [raw]
Subject: [PATCH v2 0/1] 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(-)

--
2.25.1



2024-01-11 08:02:58

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 0/1] Add StarFive JH8100 dwmac support

On 11/01/2024 03:55, Tan Chun Hau wrote:
> 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


2024-01-11 08:04:13

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 0/1] Add StarFive JH8100 dwmac support

On 11/01/2024 09:02, Krzysztof Kozlowski wrote:
> On 11/01/2024 03:55, Tan Chun Hau wrote:
>> 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


2024-01-11 10:01:20

by ChunHau Tan

[permalink] [raw]
Subject: RE: [PATCH v2 0/1] Add StarFive JH8100 dwmac support



> -----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
>
> On 11/01/2024 09:02, Krzysztof Kozlowski wrote:
> > On 11/01/2024 03:55, Tan Chun Hau wrote:
> >> 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.

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.
>
> Best regards,
> Krzysztof