* [RFC PATCH net-next 0/8] Add support for ICSSG-based Ethernet on SR1.0 devices
@ 2023-12-19 17:45 Diogo Ivo
2023-12-19 17:45 ` [RFC PATCH net-next 1/8] dt-bindings: net: Add support for AM65x SR1.0 in ICSSG Diogo Ivo
0 siblings, 1 reply; 4+ messages in thread
From: Diogo Ivo @ 2023-12-19 17:45 UTC (permalink / raw)
To: danishanwar, rogerq, davem, edumazet, kuba, pabeni, andrew,
dan.carpenter, grygorii.strashko, jacob.e.keller, robh, robh+dt,
krzysztof.kozlowski+dt, conor+dt, linux-arm-kernel, netdev,
devicetree
Cc: Diogo Ivo
Hello,
This series extends the current ICSSG-based Ethernet driver to support
Silicon Revision 1.0 devices.
Notable differences between the Silicon Revisions are that there is
no TX core in SR1.0 with this being handled by the firmware, requiring
extra DMA channels to communicate commands to the firmware (with the
firmware being different as well) and in the packet classifier.
The motivation behind it is that a significant number of Siemens
devices containing SR1.0 silicon have been deployed in the field
and need to be supported and updated to newer kernel versions
without losing functionality.
This series is based on TI's 5.10 SDK [1].
[1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-5.10.y
Diogo Ivo (7):
net: ti: icssg-config: add SR1.0-specific configuration bits
net: ti: icssg-prueth: add SR1.0-specific configuration bits
net: ti: icssg-classifier: Add support for SR1.0
net: ti: icssg-config: Add SR1.0 configuration functions
net: ti: icssg-ethtool: Adjust channel count for SR1.0
net: ti: iccsg-prueth: Add necessary functions for SR1.0 support
net: ti: icssg-prueth: Wire up support for SR1.0
Jan Kiszka (1):
dt-bindings: net: Add support for AM65x SR1.0 in ICSSG
.../bindings/net/ti,icssg-prueth.yaml | 62 +-
.../net/ethernet/ti/icssg/icssg_classifier.c | 113 +++-
drivers/net/ethernet/ti/icssg/icssg_config.c | 90 ++-
drivers/net/ethernet/ti/icssg/icssg_config.h | 61 +-
drivers/net/ethernet/ti/icssg/icssg_ethtool.c | 10 +-
drivers/net/ethernet/ti/icssg/icssg_prueth.c | 556 ++++++++++++++++--
drivers/net/ethernet/ti/icssg/icssg_prueth.h | 21 +-
7 files changed, 812 insertions(+), 101 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [RFC PATCH net-next 1/8] dt-bindings: net: Add support for AM65x SR1.0 in ICSSG
2023-12-19 17:45 [RFC PATCH net-next 0/8] Add support for ICSSG-based Ethernet on SR1.0 devices Diogo Ivo
@ 2023-12-19 17:45 ` Diogo Ivo
2023-12-21 9:32 ` Krzysztof Kozlowski
2023-12-21 12:27 ` Roger Quadros
0 siblings, 2 replies; 4+ messages in thread
From: Diogo Ivo @ 2023-12-19 17:45 UTC (permalink / raw)
To: danishanwar, rogerq, davem, edumazet, kuba, pabeni, robh+dt,
krzysztof.kozlowski+dt, conor+dt, linux-arm-kernel, netdev,
devicetree
Cc: Diogo Ivo, Jan Kiszka
Silicon Revision 1.0 of the AM65x came with a slightly different ICSSG
support: Only 2 PRUs per slice are available and instead 2 additional
DMA channels are used for management purposes. We have no restrictions
on specified PRUs, but the DMA channels need to be adjusted.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Diogo Ivo <diogo.ivo@siemens.com>
---
.../bindings/net/ti,icssg-prueth.yaml | 62 +++++++++++++------
1 file changed, 44 insertions(+), 18 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml b/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml
index 229c8f32019f..fbe51731854a 100644
--- a/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml
+++ b/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml
@@ -19,30 +19,15 @@ allOf:
properties:
compatible:
enum:
- - ti,am642-icssg-prueth # for AM64x SoC family
- - ti,am654-icssg-prueth # for AM65x SoC family
+ - ti,am642-icssg-prueth # for AM64x SoC family
+ - ti,am654-icssg-prueth # for AM65x SoC family, SR2.x
+ - ti,am654-icssg-prueth-sr1 # for AM65x SoC family, SR1.0
sram:
$ref: /schemas/types.yaml#/definitions/phandle
description:
phandle to MSMC SRAM node
- dmas:
- maxItems: 10
-
- dma-names:
- items:
- - const: tx0-0
- - const: tx0-1
- - const: tx0-2
- - const: tx0-3
- - const: tx1-0
- - const: tx1-1
- - const: tx1-2
- - const: tx1-3
- - const: rx0
- - const: rx1
-
ti,mii-g-rt:
$ref: /schemas/types.yaml#/definitions/phandle
description:
@@ -122,6 +107,47 @@ properties:
- required:
- port@1
+if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - ti,am654-icssg-prueth-sr1
+then:
+ properties:
+ dmas:
+ maxItems: 12
+ dma-names:
+ items:
+ - const: tx0-0
+ - const: tx0-1
+ - const: tx0-2
+ - const: tx0-3
+ - const: tx1-0
+ - const: tx1-1
+ - const: tx1-2
+ - const: tx1-3
+ - const: rx0
+ - const: rx1
+ - const: rxmgm0
+ - const: rxmgm1
+else:
+ properties:
+ dmas:
+ maxItems: 10
+ dma-names:
+ items:
+ - const: tx0-0
+ - const: tx0-1
+ - const: tx0-2
+ - const: tx0-3
+ - const: tx1-0
+ - const: tx1-1
+ - const: tx1-2
+ - const: tx1-3
+ - const: rx0
+ - const: rx1
+
required:
- compatible
- sram
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFC PATCH net-next 1/8] dt-bindings: net: Add support for AM65x SR1.0 in ICSSG
2023-12-19 17:45 ` [RFC PATCH net-next 1/8] dt-bindings: net: Add support for AM65x SR1.0 in ICSSG Diogo Ivo
@ 2023-12-21 9:32 ` Krzysztof Kozlowski
2023-12-21 12:27 ` Roger Quadros
1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-21 9:32 UTC (permalink / raw)
To: Diogo Ivo, danishanwar, rogerq, davem, edumazet, kuba, pabeni,
robh+dt, krzysztof.kozlowski+dt, conor+dt, linux-arm-kernel,
netdev, devicetree
Cc: Jan Kiszka
On 19/12/2023 18:45, Diogo Ivo wrote:
> Silicon Revision 1.0 of the AM65x came with a slightly different ICSSG
> support: Only 2 PRUs per slice are available and instead 2 additional
> DMA channels are used for management purposes. We have no restrictions
> on specified PRUs, but the DMA channels need to be adjusted.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> Signed-off-by: Diogo Ivo <diogo.ivo@siemens.com>
> ---
> .../bindings/net/ti,icssg-prueth.yaml | 62 +++++++++++++------
> 1 file changed, 44 insertions(+), 18 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml b/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml
> index 229c8f32019f..fbe51731854a 100644
> --- a/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml
> +++ b/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml
> @@ -19,30 +19,15 @@ allOf:
> properties:
> compatible:
> enum:
> - - ti,am642-icssg-prueth # for AM64x SoC family
> - - ti,am654-icssg-prueth # for AM65x SoC family
> + - ti,am642-icssg-prueth # for AM64x SoC family
> + - ti,am654-icssg-prueth # for AM65x SoC family, SR2.x
> + - ti,am654-icssg-prueth-sr1 # for AM65x SoC family, SR1.0
sr1 is revision of am654, so it should be added to SoC name, not at the
end of binding.
>
> sram:
> $ref: /schemas/types.yaml#/definitions/phandle
> description:
> phandle to MSMC SRAM node
>
> - dmas:
> - maxItems: 10
Why are you removing top-level properties? They must stay here in widest
constrains.
> -
> - dma-names:
> - items:
> - - const: tx0-0
> - - const: tx0-1
> - - const: tx0-2
> - - const: tx0-3
> - - const: tx1-0
> - - const: tx1-1
> - - const: tx1-2
> - - const: tx1-3
> - - const: rx0
> - - const: rx1
Grow it and use minItems.
> -
> ti,mii-g-rt:
> $ref: /schemas/types.yaml#/definitions/phandle
> description:
> @@ -122,6 +107,47 @@ properties:
> - required:
> - port@1
>
Missing allOf and then it goes after required block.
> +if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - ti,am654-icssg-prueth-sr1
> +then:
> + properties:
> + dmas:
minItems
> + maxItems: 12
> + dma-names:
> + items:
minItems instead
> + - const: tx0-0
> + - const: tx0-1
> + - const: tx0-2
> + - const: tx0-3
> + - const: tx1-0
> + - const: tx1-1
> + - const: tx1-2
> + - const: tx1-3
> + - const: rx0
> + - const: rx1
> + - const: rxmgm0
> + - const: rxmgm1
> +else:
> + properties:
> + dmas:
> + maxItems: 10
> + dma-names:
> + items:
maxItems instead
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC PATCH net-next 1/8] dt-bindings: net: Add support for AM65x SR1.0 in ICSSG
2023-12-19 17:45 ` [RFC PATCH net-next 1/8] dt-bindings: net: Add support for AM65x SR1.0 in ICSSG Diogo Ivo
2023-12-21 9:32 ` Krzysztof Kozlowski
@ 2023-12-21 12:27 ` Roger Quadros
1 sibling, 0 replies; 4+ messages in thread
From: Roger Quadros @ 2023-12-21 12:27 UTC (permalink / raw)
To: Diogo Ivo, danishanwar, davem, edumazet, kuba, pabeni, robh+dt,
krzysztof.kozlowski+dt, conor+dt, linux-arm-kernel, netdev,
devicetree
Cc: Jan Kiszka
Hi,
On 19/12/2023 19:45, Diogo Ivo wrote:
> Silicon Revision 1.0 of the AM65x came with a slightly different ICSSG
> support: Only 2 PRUs per slice are available and instead 2 additional
> DMA channels are used for management purposes. We have no restrictions
> on specified PRUs, but the DMA channels need to be adjusted.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> Signed-off-by: Diogo Ivo <diogo.ivo@siemens.com>
> ---
> .../bindings/net/ti,icssg-prueth.yaml | 62 +++++++++++++------
> 1 file changed, 44 insertions(+), 18 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml b/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml
> index 229c8f32019f..fbe51731854a 100644
> --- a/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml
> +++ b/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml
> @@ -19,30 +19,15 @@ allOf:
> properties:
> compatible:
> enum:
> - - ti,am642-icssg-prueth # for AM64x SoC family
> - - ti,am654-icssg-prueth # for AM65x SoC family
> + - ti,am642-icssg-prueth # for AM64x SoC family
> + - ti,am654-icssg-prueth # for AM65x SoC family, SR2.x
You don't need to explicitly mention SR2.x here and in the rest of the patches.
That way there are fewer changes.
> + - ti,am654-icssg-prueth-sr1 # for AM65x SoC family, SR1.0
>
> sram:
> $ref: /schemas/types.yaml#/definitions/phandle
> description:
> phandle to MSMC SRAM node
>
> - dmas:
> - maxItems: 10
> -
> - dma-names:
> - items:
> - - const: tx0-0
> - - const: tx0-1
> - - const: tx0-2
> - - const: tx0-3
> - - const: tx1-0
> - - const: tx1-1
> - - const: tx1-2
> - - const: tx1-3
> - - const: rx0
> - - const: rx1
> -
> ti,mii-g-rt:
> $ref: /schemas/types.yaml#/definitions/phandle
> description:
> @@ -122,6 +107,47 @@ properties:
> - required:
> - port@1
>
> +if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - ti,am654-icssg-prueth-sr1
> +then:
> + properties:
> + dmas:
> + maxItems: 12
> + dma-names:
> + items:
> + - const: tx0-0
> + - const: tx0-1
> + - const: tx0-2
> + - const: tx0-3
> + - const: tx1-0
> + - const: tx1-1
> + - const: tx1-2
> + - const: tx1-3
> + - const: rx0
> + - const: rx1
> + - const: rxmgm0
> + - const: rxmgm1
> +else:
> + properties:
> + dmas:
> + maxItems: 10
> + dma-names:
> + items:
> + - const: tx0-0
> + - const: tx0-1
> + - const: tx0-2
> + - const: tx0-3
> + - const: tx1-0
> + - const: tx1-1
> + - const: tx1-2
> + - const: tx1-3
> + - const: rx0
> + - const: rx1
> +
> required:
> - compatible
> - sram
--
cheers,
-roger
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-21 12:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-19 17:45 [RFC PATCH net-next 0/8] Add support for ICSSG-based Ethernet on SR1.0 devices Diogo Ivo
2023-12-19 17:45 ` [RFC PATCH net-next 1/8] dt-bindings: net: Add support for AM65x SR1.0 in ICSSG Diogo Ivo
2023-12-21 9:32 ` Krzysztof Kozlowski
2023-12-21 12:27 ` Roger Quadros
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).