2021-01-15 19:33:01

by Grygorii Strashko

[permalink] [raw]
Subject: [net-next 0/6] net: ethernet: ti: am65-cpsw-nuss: introduce support for am64x cpsw3g

Hi

This series introduces basic support for recently introduced TI K3 AM642x SoC [1]
which contains 3 port (2 external ports) CPSW3g module. The CPSW3g integrated
in MAIN domain and can be configured in multi port or switch modes.
In this series only multi port mode is enabled. The initial version of switchdev
support was introduced by Vignesh Raghavendra [2] and work is in progress.

The overall functionality and DT bindings are similar to other K3 CPSWxg
versions, so DT binding changes are minimal and driver is mostly re-used for
TI K3 AM642x CPSW3g.

The main difference is that TI K3 AM642x SoC is not fully DMA coherent and
instead DMA coherency is supported per DMA channel.

Patches 1-2 - DT bindings update
Patches 3-4 - Update driver to support changed DMA coherency model
Patches 5-6 - adds TI K3 AM642x SoC platform data and so enable CPSW3g

[1] https://www.ti.com/lit/pdf/spruim2
[2] https://patchwork.ozlabs.org/project/netdev/cover/[email protected]/

Grygorii Strashko (2):
dt-binding: ti: am65x-cpts: add assigned-clock and power-domains props
dt-binding: net: ti: k3-am654-cpsw-nuss: update bindings for am64x cpsw3g

Peter Ujfalusi (2):
net: ethernet: ti: am65-cpsw-nuss: Use DMA device for DMA API
net: ethernet: ti: am65-cpsw-nuss: Support for transparent ASEL
handling

Vignesh Raghavendra (2):
net: ti: cpsw_ale: add driver data for AM64 CPSW3g
net: ethernet: ti: am65-cpsw: add support for am64x cpsw3g

.../bindings/net/ti,k3-am654-cpsw-nuss.yaml | 50 ++++++----
.../bindings/net/ti,k3-am654-cpts.yaml | 7 ++
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 96 +++++++++++--------
drivers/net/ethernet/ti/am65-cpsw-nuss.h | 2 +
drivers/net/ethernet/ti/cpsw_ale.c | 7 ++
5 files changed, 101 insertions(+), 61 deletions(-)

--
2.17.1


2021-01-15 19:33:32

by Grygorii Strashko

[permalink] [raw]
Subject: [net-next 1/6] dt-binding: ti: am65x-cpts: add assigned-clock and power-domains props

The CPTS clock is usually a clk-mux which allows to select CPTS reference
clock by using 'assigned-clock-parents', 'assigned-clocks' DT properties.
Also depending on integration the power-domains has to be specified to
enable CPTS IP.

Hence add 'assigned-clock-parents', 'assigned-clocks' and 'power-domains'
properties to the CPTS DT bindings to avoid dtbs_check warnings:
cpts@310d0000: 'assigned-clock-parents', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+'
cpts@310d0000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Grygorii Strashko <[email protected]>
---
.../devicetree/bindings/net/ti,k3-am654-cpts.yaml | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml b/Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml
index 9b7117920d90..ce43a1c58a57 100644
--- a/Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml
+++ b/Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml
@@ -73,6 +73,13 @@ properties:
items:
- const: cpts

+ assigned-clock-parents: true
+
+ assigned-clocks: true
+
+ power-domains:
+ maxItems: 1
+
ti,cpts-ext-ts-inputs:
$ref: /schemas/types.yaml#/definitions/uint32
maximum: 8
--
2.17.1

2021-01-15 19:34:20

by Grygorii Strashko

[permalink] [raw]
Subject: [net-next 5/6] net: ti: cpsw_ale: add driver data for AM64 CPSW3g

From: Vignesh Raghavendra <[email protected]>

The AM642x CPSW3g is similar to j721e-cpswxg except its ALE table size is
512 entries. Add entry for the same.

Signed-off-by: Vignesh Raghavendra <[email protected]>
Signed-off-by: Grygorii Strashko <[email protected]>
---
drivers/net/ethernet/ti/cpsw_ale.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
index cdc308a2aa3e..d828f856237a 100644
--- a/drivers/net/ethernet/ti/cpsw_ale.c
+++ b/drivers/net/ethernet/ti/cpsw_ale.c
@@ -1256,6 +1256,13 @@ static const struct cpsw_ale_dev_id cpsw_ale_id_match[] = {
.major_ver_mask = 0x7,
.vlan_entry_tbl = vlan_entry_k3_cpswxg,
},
+ {
+ .dev_id = "am64-cpswxg",
+ .features = CPSW_ALE_F_STATUS_REG | CPSW_ALE_F_HW_AUTOAGING,
+ .major_ver_mask = 0x7,
+ .vlan_entry_tbl = vlan_entry_k3_cpswxg,
+ .tbl_entries = 512,
+ },
{ },
};

--
2.17.1

2021-01-15 19:34:35

by Grygorii Strashko

[permalink] [raw]
Subject: [net-next 2/6] dt-binding: net: ti: k3-am654-cpsw-nuss: update bindings for am64x cpsw3g

Update DT binding for recently introduced TI K3 AM642x SoC [1] which
contains 3 port (2 external ports) CPSW3g module. The CPSW3g integrated
in MAIN domain and can be configured in multi port or switch modes.

The overall functionality and DT bindings are similar to other K3 CPSWxg
versions, so DT binding changes are minimal:
- reword description
- add new compatible 'ti,am642-cpsw-nuss'
- allow 2 external ports child nodes
- add missed 'assigned-clock' props

[1] https://www.ti.com/lit/pdf/spruim2
Signed-off-by: Grygorii Strashko <[email protected]>
---
.../bindings/net/ti,k3-am654-cpsw-nuss.yaml | 50 +++++++++++--------
1 file changed, 30 insertions(+), 20 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml b/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml
index c47b58f3e3f6..3fae9a5f0c6a 100644
--- a/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml
+++ b/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/net/ti,k3-am654-cpsw-nuss.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

-title: The TI AM654x/J721E SoC Gigabit Ethernet MAC (Media Access Controller) Device Tree Bindings
+title: The TI AM654x/J721E/AM642x SoC Gigabit Ethernet MAC (Media Access Controller) Device Tree Bindings

maintainers:
- Grygorii Strashko <[email protected]>
@@ -13,19 +13,16 @@ maintainers:
description:
The TI AM654x/J721E SoC Gigabit Ethernet MAC (CPSW2G NUSS) has two ports
(one external) and provides Ethernet packet communication for the device.
- CPSW2G NUSS features - the Reduced Gigabit Media Independent Interface (RGMII),
- Reduced Media Independent Interface (RMII), the Management Data
- Input/Output (MDIO) interface for physical layer device (PHY) management,
- new version of Common Platform Time Sync (CPTS), updated Address Lookup
- Engine (ALE).
- One external Ethernet port (port 1) with selectable RGMII/RMII interfaces and
- an internal Communications Port Programming Interface (CPPI5) (Host port 0).
+ The TI AM642x SoC Gigabit Ethernet MAC (CPSW3G NUSS) has three ports
+ (two external) and provides Ethernet packet communication and switching.
+
+ The internal Communications Port Programming Interface (CPPI5) (Host port 0).
Host Port 0 CPPI Packet Streaming Interface interface supports 8 TX channels
- and one RX channels and operating by TI AM654x/J721E NAVSS Unified DMA
- Peripheral Root Complex (UDMA-P) controller.
- The CPSW2G NUSS is integrated into device MCU domain named MCU_CPSW0.
+ and one RX channels and operating by NAVSS Unified DMA Peripheral Root
+ Complex (UDMA-P) controller.

- Additional features
+ CPSWxG features
+ updated Address Lookup Engine (ALE).
priority level Quality Of Service (QOS) support (802.1p)
Support for Audio/Video Bridging (P802.1Qav/D6.0)
Support for IEEE 1588 Clock Synchronization (2008 Annex D, Annex E and Annex F)
@@ -38,10 +35,18 @@ description:
VLAN support, 802.1Q compliant, Auto add port VLAN for untagged frames on
ingress, Auto VLAN removal on egress and auto pad to minimum frame size.
RX/TX csum offload
+ Management Data Input/Output (MDIO) interface for PHYs management
+ RMII/RGMII Interfaces support
+ new version of Common Platform Time Sync (CPTS)
+
+ The CPSWxG NUSS is integrated into
+ device MCU domain named MCU_CPSW0 on AM654x/J721E SoC.
+ device MAIN domain named CPSW0 on AM642x SoC.

Specifications can be found at
- http://www.ti.com/lit/ug/spruid7e/spruid7e.pdf
- http://www.ti.com/lit/ug/spruil1a/spruil1a.pdf
+ https://www.ti.com/lit/pdf/spruid7
+ https://www.ti.com/lit/zip/spruil1
+ https://www.ti.com/lit/pdf/spruim2

properties:
"#address-cells": true
@@ -51,11 +56,12 @@ properties:
oneOf:
- const: ti,am654-cpsw-nuss
- const: ti,j721e-cpsw-nuss
+ - const: ti,am642-cpsw-nuss

reg:
maxItems: 1
description:
- The physical base address and size of full the CPSW2G NUSS IO range
+ The physical base address and size of full the CPSWxG NUSS IO range

reg-names:
items:
@@ -66,12 +72,16 @@ properties:
dma-coherent: true

clocks:
- description: CPSW2G NUSS functional clock
+ description: CPSWxG NUSS functional clock

clock-names:
items:
- const: fck

+ assigned-clock-parents: true
+
+ assigned-clocks: true
+
power-domains:
maxItems: 1

@@ -99,16 +109,16 @@ properties:
const: 0

patternProperties:
- port@1:
+ port@[1-2]:
type: object
- description: CPSW2G NUSS external ports
+ description: CPSWxG NUSS external ports

$ref: ethernet-controller.yaml#

properties:
reg:
- items:
- - const: 1
+ minimum: 1
+ maximum: 2
description: CPSW port number

phys:
--
2.17.1

2021-01-20 01:54:59

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [net-next 0/6] net: ethernet: ti: am65-cpsw-nuss: introduce support for am64x cpsw3g

Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Fri, 15 Jan 2021 21:28:47 +0200 you wrote:
> Hi
>
> This series introduces basic support for recently introduced TI K3 AM642x SoC [1]
> which contains 3 port (2 external ports) CPSW3g module. The CPSW3g integrated
> in MAIN domain and can be configured in multi port or switch modes.
> In this series only multi port mode is enabled. The initial version of switchdev
> support was introduced by Vignesh Raghavendra [2] and work is in progress.
>
> [...]

Here is the summary with links:
- [net-next,1/6] dt-binding: ti: am65x-cpts: add assigned-clock and power-domains props
https://git.kernel.org/netdev/net-next/c/b3228c74e0d2
- [net-next,2/6] dt-binding: net: ti: k3-am654-cpsw-nuss: update bindings for am64x cpsw3g
https://git.kernel.org/netdev/net-next/c/19d9a846d9fc
- [net-next,3/6] net: ethernet: ti: am65-cpsw-nuss: Use DMA device for DMA API
https://git.kernel.org/netdev/net-next/c/ed569ed9b30a
- [net-next,4/6] net: ethernet: ti: am65-cpsw-nuss: Support for transparent ASEL handling
https://git.kernel.org/netdev/net-next/c/39fd0547ee66
- [net-next,5/6] net: ti: cpsw_ale: add driver data for AM64 CPSW3g
https://git.kernel.org/netdev/net-next/c/1dd3841033b3
- [net-next,6/6] net: ethernet: ti: am65-cpsw: add support for am64x cpsw3g
https://git.kernel.org/netdev/net-next/c/4f7cce272403

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html