RE: [PATCH v2 0/1] Add StarFive JH8100 dwmac support
From: ChunHau Tan
Date: Thu Jan 11 2024 - 05:01:20 EST
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> Sent: Thursday, 11 January, 2024 4:03 PM
> To: ChunHau Tan <chunhau.tan@xxxxxxxxxxxxxxxx>; David S . Miller
> <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub
> Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Rob Herring
> <robh+dt@xxxxxxxxxx>; Emil Renner Berthing <kernel@xxxxxxxx>; Rob Herring
> <robh@xxxxxxxxxx>; Krzysztof Kozlowski <krzysztof.kozlowski+dt@xxxxxxxxxx>;
> Conor Dooley <conor+dt@xxxxxxxxxx>; Maxime Coquelin
> <mcoquelin.stm32@xxxxxxxxx>; Alexandre Torgue
> <alexandre.torgue@xxxxxxxxxxx>; Simon Horman <horms@xxxxxxxxxx>; Bartosz
> Golaszewski <bartosz.golaszewski@xxxxxxxxxx>; Andrew Halaney
> <ahalaney@xxxxxxxxxx>; Jisheng Zhang <jszhang@xxxxxxxxxx>; Uwe
> Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>; Russell King
> <rmk+kernel@xxxxxxxxxxxxxxx>
> Cc: Leyfoon Tan <leyfoon.tan@xxxxxxxxxxxxxxxx>; JeeHeng Sia
> <jeeheng.sia@xxxxxxxxxxxxxxxx>; netdev@xxxxxxxxxxxxxxx;
> devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx;
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-riscv@xxxxxxxxxxxxxxxxxxx
> 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