Add StarFive JH8100 dwmac support.
JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.
Tan Chun Hau (2):
dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support
net: stmmac: Add StarFive JH8100 dwmac support
.../bindings/net/starfive,jh7110-dwmac.yaml | 28 ++++++++++++-------
.../ethernet/stmicro/stmmac/dwmac-starfive.c | 1 +
2 files changed, 19 insertions(+), 10 deletions(-)
--
2.25.1
Add StarFive JH8100 dwmac support.
JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.
Signed-off-by: Tan Chun Hau <[email protected]>
---
.../bindings/net/starfive,jh7110-dwmac.yaml | 28 ++++++++++++-------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
index 5e7cfbbebce6..3d0447726902 100644
--- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
@@ -17,6 +17,7 @@ select:
contains:
enum:
- starfive,jh7110-dwmac
+ - starfive,jh8100-dwmac
required:
- compatible
@@ -25,6 +26,7 @@ properties:
items:
- enum:
- starfive,jh7110-dwmac
+ - starfive,jh8100-dwmac
- const: snps,dwmac-5.20
reg:
@@ -54,16 +56,6 @@ properties:
minItems: 3
maxItems: 3
- resets:
- items:
- - description: MAC Reset signal.
- - description: AHB Reset signal.
-
- reset-names:
- items:
- - const: stmmaceth
- - const: ahb
-
starfive,tx-use-rgmii-clk:
description:
Tx clock is provided by external rgmii clock.
@@ -93,6 +85,22 @@ required:
allOf:
- $ref: snps,dwmac.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - starfive,jh7110-dwmac
+ then:
+ properties:
+ resets:
+ items:
+ - description: MAC Reset signal.
+ - description: AHB Reset signal.
+ resets-names:
+ items:
+ - const: stmmaceth
+ - const: ahb
unevaluatedProperties: false
--
2.25.1
Add JH8100 dwmac support.
Signed-off-by: Tan Chun Hau <[email protected]>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
index 5d630affb4d1..373714f6e382 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
@@ -146,6 +146,7 @@ static int starfive_dwmac_probe(struct platform_device *pdev)
static const struct of_device_id starfive_dwmac_match[] = {
{ .compatible = "starfive,jh7110-dwmac" },
+ { .compatible = "starfive,jh8100-dwmac" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, starfive_dwmac_match);
--
2.25.1
On 08/01/2024 08:58, Tan Chun Hau wrote:
> Add StarFive JH8100 dwmac support.
> JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.
>
> Signed-off-by: Tan Chun Hau <[email protected]>
> ---
> .../bindings/net/starfive,jh7110-dwmac.yaml | 28 ++++++++++++-------
> 1 file changed, 18 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> index 5e7cfbbebce6..3d0447726902 100644
> --- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> @@ -17,6 +17,7 @@ select:
> contains:
> enum:
> - starfive,jh7110-dwmac
> + - starfive,jh8100-dwmac
I have doubts that you tested it. Missing change to snps,dwmac.
> required:
> - compatible
>
> @@ -25,6 +26,7 @@ properties:
> items:
> - enum:
> - starfive,jh7110-dwmac
> + - starfive,jh8100-dwmac
> - const: snps,dwmac-5.20
>
> reg:
> @@ -54,16 +56,6 @@ properties:
> minItems: 3
> maxItems: 3
>
> - resets:
> - items:
> - - description: MAC Reset signal.
> - - description: AHB Reset signal.
> -
> - reset-names:
> - items:
> - - const: stmmaceth
> - - const: ahb
> -
> starfive,tx-use-rgmii-clk:
> description:
> Tx clock is provided by external rgmii clock.
> @@ -93,6 +85,22 @@ required:
>
> allOf:
> - $ref: snps,dwmac.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - starfive,jh7110-dwmac
> + then:
> + properties:
> + resets:
> + items:
> + - description: MAC Reset signal.
> + - description: AHB Reset signal.
> + resets-names:
> + items:
> + - const: stmmaceth
> + - const: ahb
Missing else: narrowing your jh8100.
Best regards,
Krzysztof
On 08/01/2024 08:58, Tan Chun Hau wrote:
> Add JH8100 dwmac support.
>
> Signed-off-by: Tan Chun Hau <[email protected]>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> index 5d630affb4d1..373714f6e382 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> @@ -146,6 +146,7 @@ static int starfive_dwmac_probe(struct platform_device *pdev)
>
> static const struct of_device_id starfive_dwmac_match[] = {
> { .compatible = "starfive,jh7110-dwmac" },
> + { .compatible = "starfive,jh8100-dwmac" },
No differences? Then why aren't the devices made compatible with each other?
Best regards,
Krzysztof
> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Monday, 8 January, 2024 5:07 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]
> Subject: Re: [PATCH 2/2] net: stmmac: Add StarFive JH8100 dwmac support
>
> On 08/01/2024 08:58, Tan Chun Hau wrote:
> > Add JH8100 dwmac support.
> >
> > Signed-off-by: Tan Chun Hau <[email protected]>
> > ---
> > drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > index 5d630affb4d1..373714f6e382 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > @@ -146,6 +146,7 @@ static int starfive_dwmac_probe(struct
> platform_device *pdev)
> >
> > static const struct of_device_id starfive_dwmac_match[] = {
> > { .compatible = "starfive,jh7110-dwmac" },
> > + { .compatible = "starfive,jh8100-dwmac" },
>
> No differences? Then why aren't the devices made compatible with each
> other?
There is a difference between JH7110 & JH8110,
JH7110 has two reset signals (ahb, stmmaceth),
while JH8110 has only one reset signal (stmmaceth),
this will be shown in device tree file.
>
> Best regards,
> Krzysztof
> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Monday, 8 January, 2024 4:28 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]
> Subject: Re: [PATCH 1/2] dt-bindings: net: starfive,jh7110-dwmac: Add
> StarFive JH8100 support
>
> On 08/01/2024 08:58, Tan Chun Hau wrote:
> > Add StarFive JH8100 dwmac support.
> > JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.
> >
> > Signed-off-by: Tan Chun Hau <[email protected]>
> > ---
> > .../bindings/net/starfive,jh7110-dwmac.yaml | 28 ++++++++++++-------
> > 1 file changed, 18 insertions(+), 10 deletions(-)
> >
> > diff --git
> a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> > index 5e7cfbbebce6..3d0447726902 100644
> > --- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> > +++
> b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> > @@ -17,6 +17,7 @@ select:
> > contains:
> > enum:
> > - starfive,jh7110-dwmac
> > + - starfive,jh8100-dwmac
>
> I have doubts that you tested it. Missing change to snps,dwmac.
Will fix in V2.
>
> > required:
> > - compatible
> >
> > @@ -25,6 +26,7 @@ properties:
> > items:
> > - enum:
> > - starfive,jh7110-dwmac
> > + - starfive,jh8100-dwmac
> > - const: snps,dwmac-5.20
> >
> > reg:
> > @@ -54,16 +56,6 @@ properties:
> > minItems: 3
> > maxItems: 3
> >
> > - resets:
> > - items:
> > - - description: MAC Reset signal.
> > - - description: AHB Reset signal.
> > -
> > - reset-names:
> > - items:
> > - - const: stmmaceth
> > - - const: ahb
> > -
> > starfive,tx-use-rgmii-clk:
> > description:
> > Tx clock is provided by external rgmii clock.
> > @@ -93,6 +85,22 @@ required:
> >
> > allOf:
> > - $ref: snps,dwmac.yaml#
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + enum:
> > + - starfive,jh7110-dwmac
> > + then:
> > + properties:
> > + resets:
> > + items:
> > + - description: MAC Reset signal.
> > + - description: AHB Reset signal.
> > + resets-names:
> > + items:
> > + - const: stmmaceth
> > + - const: ahb
>
> Missing else: narrowing your jh8100.
Will fix in V2.
>
> Best regards,
> Krzysztof
On 09/01/2024 08:25, ChunHau Tan wrote:
>
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <[email protected]>
>> Sent: Monday, 8 January, 2024 5:07 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]
>> Subject: Re: [PATCH 2/2] net: stmmac: Add StarFive JH8100 dwmac support
>>
>> On 08/01/2024 08:58, Tan Chun Hau wrote:
>>> Add JH8100 dwmac support.
>>>
>>> Signed-off-by: Tan Chun Hau <[email protected]>
>>> ---
>>> drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
>> b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
>>> index 5d630affb4d1..373714f6e382 100644
>>> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
>>> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
>>> @@ -146,6 +146,7 @@ static int starfive_dwmac_probe(struct
>> platform_device *pdev)
>>>
>>> static const struct of_device_id starfive_dwmac_match[] = {
>>> { .compatible = "starfive,jh7110-dwmac" },
>>> + { .compatible = "starfive,jh8100-dwmac" },
>>
>> No differences? Then why aren't the devices made compatible with each
>> other?
> There is a difference between JH7110 & JH8110,
> JH7110 has two reset signals (ahb, stmmaceth),
> while JH8110 has only one reset signal (stmmaceth),
> this will be shown in device tree file.
So if you are so picky then again: No differences in the driver? Then
use compatibility or provide real arguments. NAK.
Best regards,
Krzysztof
> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Tuesday, 9 January, 2024 3:59 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]
> Subject: Re: [PATCH 2/2] net: stmmac: Add StarFive JH8100 dwmac support
>
> On 09/01/2024 08:25, ChunHau Tan wrote:
> >
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <[email protected]>
> >> Sent: Monday, 8 January, 2024 5:07 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]
> >> Subject: Re: [PATCH 2/2] net: stmmac: Add StarFive JH8100 dwmac
> >> support
> >>
> >> On 08/01/2024 08:58, Tan Chun Hau wrote:
> >>> Add JH8100 dwmac support.
> >>>
> >>> Signed-off-by: Tan Chun Hau <[email protected]>
> >>> ---
> >>> drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c | 1 +
> >>> 1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> >> b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> >>> index 5d630affb4d1..373714f6e382 100644
> >>> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> >>> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> >>> @@ -146,6 +146,7 @@ static int starfive_dwmac_probe(struct
> >> platform_device *pdev)
> >>>
> >>> static const struct of_device_id starfive_dwmac_match[] = {
> >>> { .compatible = "starfive,jh7110-dwmac" },
> >>> + { .compatible = "starfive,jh8100-dwmac" },
> >>
> >> No differences? Then why aren't the devices made compatible with each
> >> other?
> > There is a difference between JH7110 & JH8110,
> > JH7110 has two reset signals (ahb, stmmaceth), while JH8110 has only
> > one reset signal (stmmaceth), this will be shown in device tree file.
>
> So if you are so picky then again: No differences in the driver? Then use
> compatibility or provide real arguments. NAK.
There are no differences in the driver.
Okay, the driver will remain the same, I will drop this change in V2.
Thank you for the feedback.
>
> Best regards,
> Krzysztof