* [PATCH v2 0/1] Add StarFive JH8100 dwmac support
@ 2024-01-11 2:55 Tan Chun Hau
2024-01-11 2:55 ` [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support Tan Chun Hau
2024-01-11 8:02 ` [PATCH v2 0/1] Add StarFive JH8100 dwmac support Krzysztof Kozlowski
0 siblings, 2 replies; 9+ messages in thread
From: Tan Chun Hau @ 2024-01-11 2:55 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Emil Renner Berthing, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Simon Horman, Bartosz Golaszewski,
Andrew Halaney, Jisheng Zhang, Uwe Kleine-König,
Russell King
Cc: Ley Foon Tan, Jee Heng Sia, netdev, devicetree, linux-kernel,
linux-stm32, linux-arm-kernel, linux-riscv
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support
2024-01-11 2:55 [PATCH v2 0/1] Add StarFive JH8100 dwmac support Tan Chun Hau
@ 2024-01-11 2:55 ` Tan Chun Hau
2024-01-11 8:04 ` Krzysztof Kozlowski
2024-01-11 18:07 ` Cristian Ciocaltea
2024-01-11 8:02 ` [PATCH v2 0/1] Add StarFive JH8100 dwmac support Krzysztof Kozlowski
1 sibling, 2 replies; 9+ messages in thread
From: Tan Chun Hau @ 2024-01-11 2:55 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Emil Renner Berthing, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Simon Horman, Bartosz Golaszewski,
Andrew Halaney, Jisheng Zhang, Uwe Kleine-König,
Russell King
Cc: Ley Foon Tan, Jee Heng Sia, netdev, devicetree, linux-kernel,
linux-stm32, linux-arm-kernel, linux-riscv
Add StarFive JH8100 dwmac support.
JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.
Signed-off-by: Tan Chun Hau <chunhau.tan@starfivetech.com>
---
.../devicetree/bindings/net/snps,dwmac.yaml | 1 +
.../bindings/net/starfive,jh7110-dwmac.yaml | 50 +++++++++++++------
2 files changed, 37 insertions(+), 14 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 5c2769dc689a..350b3d76630f 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -96,6 +96,7 @@ properties:
- snps,dwxgmac
- snps,dwxgmac-2.10
- starfive,jh7110-dwmac
+ - starfive,jh8100-dwmac
reg:
minItems: 1
diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
index 5e7cfbbebce6..7e4547961bab 100644
--- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
@@ -17,15 +17,23 @@ select:
contains:
enum:
- starfive,jh7110-dwmac
+ - starfive,jh8100-dwmac
required:
- compatible
properties:
compatible:
- items:
- - enum:
- - starfive,jh7110-dwmac
- - const: snps,dwmac-5.20
+ oneOf:
+ - items:
+ - enum:
+ - starfive,jh7110-dwmac
+ - const: snps,dwmac-5.20
+
+ - items:
+ - enum:
+ - starfive,jh8100-dwmac
+ - const: starfive,jh7110-dwmac
+ - const: snps,dwmac-5.20
reg:
maxItems: 1
@@ -54,16 +62,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 +91,30 @@ required:
allOf:
- $ref: snps,dwmac.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - starfive,jh8100-dwmac
+ then:
+ properties:
+ resets:
+ items:
+ - description: MAC Reset signal.
+ resets-names:
+ items:
+ - const: stmmaceth
+ else:
+ properties:
+ resets:
+ items:
+ - description: MAC Reset signal.
+ - description: AHB Reset signal.
+ resets-names:
+ items:
+ - const: stmmaceth
+ - const: ahb
unevaluatedProperties: false
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 0/1] Add StarFive JH8100 dwmac support
2024-01-11 2:55 [PATCH v2 0/1] Add StarFive JH8100 dwmac support Tan Chun Hau
2024-01-11 2:55 ` [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support Tan Chun Hau
@ 2024-01-11 8:02 ` Krzysztof Kozlowski
2024-01-11 8:03 ` Krzysztof Kozlowski
1 sibling, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-11 8:02 UTC (permalink / raw)
To: Tan Chun Hau, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rob Herring, Emil Renner Berthing, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Simon Horman, Bartosz Golaszewski,
Andrew Halaney, Jisheng Zhang, Uwe Kleine-König,
Russell King
Cc: Ley Foon Tan, Jee Heng Sia, netdev, devicetree, linux-kernel,
linux-stm32, linux-arm-kernel, linux-riscv
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 0/1] Add StarFive JH8100 dwmac support
2024-01-11 8:02 ` [PATCH v2 0/1] Add StarFive JH8100 dwmac support Krzysztof Kozlowski
@ 2024-01-11 8:03 ` Krzysztof Kozlowski
2024-01-11 10:00 ` ChunHau Tan
0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-11 8:03 UTC (permalink / raw)
To: Tan Chun Hau, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rob Herring, Emil Renner Berthing, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Simon Horman, Bartosz Golaszewski,
Andrew Halaney, Jisheng Zhang, Uwe Kleine-König,
Russell King
Cc: Ley Foon Tan, Jee Heng Sia, netdev, devicetree, linux-kernel,
linux-stm32, linux-arm-kernel, linux-riscv
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support
2024-01-11 2:55 ` [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support Tan Chun Hau
@ 2024-01-11 8:04 ` Krzysztof Kozlowski
2024-01-11 18:07 ` Cristian Ciocaltea
1 sibling, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-11 8:04 UTC (permalink / raw)
To: Tan Chun Hau, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rob Herring, Emil Renner Berthing, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Simon Horman, Bartosz Golaszewski,
Andrew Halaney, Jisheng Zhang, Uwe Kleine-König,
Russell King
Cc: Ley Foon Tan, Jee Heng Sia, netdev, devicetree, linux-kernel,
linux-stm32, linux-arm-kernel, linux-riscv
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.
>
> Signed-off-by: Tan Chun Hau <chunhau.tan@starfivetech.com>
> ---
> .../devicetree/bindings/net/snps,dwmac.yaml | 1 +
> .../bindings/net/starfive,jh7110-dwmac.yaml | 50 +++++++++++++------
> 2 files changed, 37 insertions(+), 14 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> index 5c2769dc689a..350b3d76630f 100644
> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> @@ -96,6 +96,7 @@ properties:
> - snps,dwxgmac
> - snps,dwxgmac-2.10
> - starfive,jh7110-dwmac
> + - starfive,jh8100-dwmac
Drop, not needed.
>
> reg:
> minItems: 1
> diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> index 5e7cfbbebce6..7e4547961bab 100644
> --- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> @@ -17,15 +17,23 @@ select:
> contains:
> enum:
> - starfive,jh7110-dwmac
> + - starfive,jh8100-dwmac
Drop, not needed.
> required:
> - compatible
>
> properties:
> compatible:
> - items:
> - - enum:
> - - starfive,jh7110-dwmac
> - - const: snps,dwmac-5.20
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH v2 0/1] Add StarFive JH8100 dwmac support
2024-01-11 8:03 ` Krzysztof Kozlowski
@ 2024-01-11 10:00 ` ChunHau Tan
0 siblings, 0 replies; 9+ messages in thread
From: ChunHau Tan @ 2024-01-11 10:00 UTC (permalink / raw)
To: Krzysztof Kozlowski, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Emil Renner Berthing,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Simon Horman, Bartosz Golaszewski,
Andrew Halaney, Jisheng Zhang, Uwe Kleine-König,
Russell King
Cc: Leyfoon Tan, JeeHeng Sia, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Thursday, 11 January, 2024 4:03 PM
> To: ChunHau Tan <chunhau.tan@starfivetech.com>; David S . Miller
> <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub
> Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Rob Herring
> <robh+dt@kernel.org>; Emil Renner Berthing <kernel@esmil.dk>; Rob Herring
> <robh@kernel.org>; Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>;
> Conor Dooley <conor+dt@kernel.org>; Maxime Coquelin
> <mcoquelin.stm32@gmail.com>; Alexandre Torgue
> <alexandre.torgue@foss.st.com>; Simon Horman <horms@kernel.org>; Bartosz
> Golaszewski <bartosz.golaszewski@linaro.org>; Andrew Halaney
> <ahalaney@redhat.com>; Jisheng Zhang <jszhang@kernel.org>; Uwe
> Kleine-König <u.kleine-koenig@pengutronix.de>; Russell King
> <rmk+kernel@armlinux.org.uk>
> Cc: Leyfoon Tan <leyfoon.tan@starfivetech.com>; JeeHeng Sia
> <jeeheng.sia@starfivetech.com>; netdev@vger.kernel.org;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-stm32@st-md-mailman.stormreply.com;
> linux-arm-kernel@lists.infradead.org; linux-riscv@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@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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support
2024-01-11 2:55 ` [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support Tan Chun Hau
2024-01-11 8:04 ` Krzysztof Kozlowski
@ 2024-01-11 18:07 ` Cristian Ciocaltea
2024-01-11 18:15 ` Krzysztof Kozlowski
1 sibling, 1 reply; 9+ messages in thread
From: Cristian Ciocaltea @ 2024-01-11 18:07 UTC (permalink / raw)
To: Tan Chun Hau, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rob Herring, Emil Renner Berthing, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Simon Horman, Bartosz Golaszewski,
Andrew Halaney, Jisheng Zhang, Uwe Kleine-König,
Russell King
Cc: Ley Foon Tan, Jee Heng Sia, netdev, devicetree, linux-kernel,
linux-stm32, linux-arm-kernel, linux-riscv
On 1/11/24 04:55, 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 <chunhau.tan@starfivetech.com>
> ---
> .../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/20231222101001.2541758-2-cristian.ciocaltea@collabora.com/
Regards,
Cristian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support
2024-01-11 18:07 ` Cristian Ciocaltea
@ 2024-01-11 18:15 ` Krzysztof Kozlowski
2024-01-11 18:19 ` Cristian Ciocaltea
0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-11 18:15 UTC (permalink / raw)
To: Cristian Ciocaltea, Tan Chun Hau, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Emil Renner Berthing,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Simon Horman, Bartosz Golaszewski,
Andrew Halaney, Jisheng Zhang, Uwe Kleine-König,
Russell King
Cc: Ley Foon Tan, Jee Heng Sia, netdev, devicetree, linux-kernel,
linux-stm32, linux-arm-kernel, linux-riscv
On 11/01/2024 19:07, Cristian Ciocaltea wrote:
> On 1/11/24 04:55, 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 <chunhau.tan@starfivetech.com>
>> ---
>> .../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
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support
2024-01-11 18:15 ` Krzysztof Kozlowski
@ 2024-01-11 18:19 ` Cristian Ciocaltea
0 siblings, 0 replies; 9+ messages in thread
From: Cristian Ciocaltea @ 2024-01-11 18:19 UTC (permalink / raw)
To: Krzysztof Kozlowski, Tan Chun Hau, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Emil Renner Berthing,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Simon Horman, Bartosz Golaszewski,
Andrew Halaney, Jisheng Zhang, Uwe Kleine-König,
Russell King
Cc: Ley Foon Tan, Jee Heng Sia, netdev, devicetree, linux-kernel,
linux-stm32, linux-arm-kernel, linux-riscv
On 1/11/24 20:15, Krzysztof Kozlowski wrote:
> On 11/01/2024 19:07, Cristian Ciocaltea wrote:
>> On 1/11/24 04:55, 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 <chunhau.tan@starfivetech.com>
>>> ---
>>> .../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
>
> 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.
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-01-11 18:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-11 2:55 [PATCH v2 0/1] Add StarFive JH8100 dwmac support Tan Chun Hau
2024-01-11 2:55 ` [PATCH v2 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support Tan Chun Hau
2024-01-11 8:04 ` Krzysztof Kozlowski
2024-01-11 18:07 ` Cristian Ciocaltea
2024-01-11 18:15 ` Krzysztof Kozlowski
2024-01-11 18:19 ` Cristian Ciocaltea
2024-01-11 8:02 ` [PATCH v2 0/1] Add StarFive JH8100 dwmac support Krzysztof Kozlowski
2024-01-11 8:03 ` Krzysztof Kozlowski
2024-01-11 10:00 ` ChunHau Tan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).