[PATCH v2 0/1] Add StarFive JH8100 dwmac support

ChunHau Tan chunhau.tan at starfivetech.com
Thu Jan 11 02:00:54 PST 2024



> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
> Sent: Thursday, 11 January, 2024 4:03 PM
> To: ChunHau Tan <chunhau.tan at starfivetech.com>; David S . Miller
> <davem at davemloft.net>; Eric Dumazet <edumazet at google.com>; Jakub
> Kicinski <kuba at kernel.org>; Paolo Abeni <pabeni at redhat.com>; Rob Herring
> <robh+dt at kernel.org>; Emil Renner Berthing <kernel at esmil.dk>; Rob Herring
> <robh at kernel.org>; Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>;
> Conor Dooley <conor+dt at kernel.org>; Maxime Coquelin
> <mcoquelin.stm32 at gmail.com>; Alexandre Torgue
> <alexandre.torgue at foss.st.com>; Simon Horman <horms at kernel.org>; Bartosz
> Golaszewski <bartosz.golaszewski at linaro.org>; Andrew Halaney
> <ahalaney at redhat.com>; Jisheng Zhang <jszhang at kernel.org>; Uwe
> Kleine-König <u.kleine-koenig at pengutronix.de>; Russell King
> <rmk+kernel at armlinux.org.uk>
> Cc: Leyfoon Tan <leyfoon.tan at starfivetech.com>; JeeHeng Sia
> <jeeheng.sia at starfivetech.com>; netdev at vger.kernel.org;
> devicetree at vger.kernel.org; linux-kernel at vger.kernel.org;
> linux-stm32 at st-md-mailman.stormreply.com;
> linux-arm-kernel at lists.infradead.org; linux-riscv at lists.infradead.org
> 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 at 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 at 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



More information about the linux-arm-kernel mailing list