net: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver
Subsystems (2)
v5 cover net: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver
Add new driver for the TI AM65x SoC Gigabit Ethernet Switch subsystem (CPSW NUSS). It has two ports and provides Ethernet packet communication for the device and can be configured as an Ethernet switch. CPSW NUSS features: the Reduced Gigabit Media Independent Interface (RGMII), Reduced Media Independent Interface (RMII), and the Management Data Input/Output (MDIO) interface for physical layer device (PHY) management. The TI AM65x SoC has integrated two-port Gigabit Ethernet Switch subsystem into device MCU domain named MCU_CPSW0. One Ethernet port (port 1) with selectable RGMII and RMII interfaces and an internal Communications Port Programming Interface (CPPI) port (Host port 0).
Host Port 0 CPPI Packet Streaming Interface interface supports 8 TX channels and on RX channels operating by TI am654 NAVSS Unified DMA Peripheral Root Complex (UDMA-P) controller.
Tested for tftp and booting to kernel on am654-evm.
Changes in v5:
* Rebased to latest which meant adapting to pinmux macro change.
Changes in v4:
* Patch1 caused dra7 config build warnings corrected them.
Grygorii Strashko (4):
net: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver
arm64: dts: ti: k3-am65: add mcu cpsw node
arm64: dts: k3-am654-base-board: add mcu cpsw nuss pinmux and phy defs
configs: am65x_evm_a53: enable networking
Keerthy (1):
driver: net: ti: cpsw-mdio: use phys_addr_t for mdio_base addr
arch/arm/dts/k3-am65.dtsi | 2 + arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 170 ++++ configs/am65x_evm_a53_defconfig | 7 + drivers/net/ti/Kconfig | 8 + drivers/net/ti/Makefile | 1 + drivers/net/ti/am65-cpsw-nuss.c | 794 +++++++++++++++++++ drivers/net/ti/cpsw_mdio.c | 4 +- drivers/net/ti/cpsw_mdio.h | 2 +- 8 files changed, 985 insertions(+), 3 deletions(-) create mode 100644 drivers/net/ti/am65-cpsw-nuss.c
Signature · 1 line
2.17.1
PATCH v5 1/5 driver: net: ti: cpsw-mdio: use phys_addr_t for mdio_base addr
Use phys_addr_t for mdio_base address to avoid build warnings on arm64 and dra7. Cast it to uintprt_t before assigning to regs.
--- drivers/net/ti/cpsw_mdio.c | 4 ++-- drivers/net/ti/cpsw_mdio.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ti/cpsw_mdio.c +2 -2
@@ -125,7 +125,7 @@ u32 cpsw_mdio_get_alive(struct mii_dev *bus)return val &GENMASK (15 ,0 ); } -struct mii_dev *cpsw_mdio_init (const char *name,u32 mdio_base, +struct mii_dev *cpsw_mdio_init (const char *name,phys_addr_t mdio_base,u32 bus_freq,int fck_freq) {struct cpsw_mdio *cpsw_mdio;
@@ -144,7 +144,7 @@ struct mii_dev *cpsw_mdio_init(const char *name, u32 mdio_base,return NULL ; } - cpsw_mdio->regs = (struct cpsw_mdio_regs *)mdio_base; + cpsw_mdio->regs = (struct cpsw_mdio_regs *)(uintptr_t )mdio_base;if (!bus_freq || !fck_freq) cpsw_mdio->div =CPSW_MDIO_DIV_DEF ;
drivers/net/ti/cpsw_mdio.h +1 -1
@@ -10,7 +10,7 @@struct cpsw_mdio ; -struct mii_dev *cpsw_mdio_init (const char *name,u32 mdio_base, +struct mii_dev *cpsw_mdio_init (const char *name,phys_addr_t mdio_base,u32 bus_freq,int fck_freq);void cpsw_mdio_free (struct mii_dev *bus);u32 cpsw_mdio_get_alive (struct mii_dev *bus);
Signature · 1 line
2.17.1
PATCH v5 1/5 driver: net: ti: cpsw-mdio: use phys_addr_t for mdio_base addr
Quoted 8 lines · Keerthy
Use
phys_addr_tformdio_baseaddress to avoid build warnings on arm64 and dra7. Cast it touintprt_tbefore assigning to regs.Signed-off-by Grygorii Strashko <[email protected]>Signed-off-by Keerthy <[email protected]>Reviewed-by Tom Rini <[email protected]>
PATCH v5 2/5 net: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver
In reply to KeerthyFrom: Grygorii Strashko <[email protected]>
Add new driver for the TI AM65x SoC Gigabit Ethernet Switch subsystem (CPSW NUSS). It has two ports and provides Ethernet packet communication for the device and can be configured as an Ethernet switch. CPSW NUSS features: the Reduced Gigabit Media Independent Interface (RGMII), Reduced Media Independent Interface (RMII), and the Management Data Input/Output (MDIO) interface for physical layer device (PHY) management. The TI AM65x SoC has integrated two-port Gigabit Ethernet Switch subsystem into device MCU domain named MCU_CPSW0. One Ethernet port (port 1) with selectable RGMII and RMII interfaces and an internal Communications Port Programming Interface (CPPI) port (Host port 0).
Host Port 0 CPPI Packet Streaming Interface interface supports 8 TX channels and on RX channels operating by TI am654 NAVSS Unified DMA Peripheral Root Complex (UDMA-P) controller.
--- drivers/net/ti/Kconfig | 8 + drivers/net/ti/Makefile | 1 + drivers/net/ti/am65-cpsw-nuss.c | 794 ++++++++++++++++++++++++++++++++ 3 files changed, 803 insertions(+) create mode 100644 drivers/net/ti/am65-cpsw-nuss.c
drivers/net/ti/Kconfig +8 -0
@@ -18,3 +18,11 @@ config DRIVER_TI_KEYSTONE_NET bool "TI Keystone 2 Ethernet" help This driver supports the TI Keystone 2 Ethernet subsystem + +config TI_AM65_CPSW_NUSS + bool "TI K3 AM65x MCU CPSW Nuss Ethernet controller driver" + depends on ARCH_K3 + select PHYLIB + help + This driver supports TI K3 MCU CPSW Nuss Ethernet controller + in Texas Instruments K3 AM65x SoCs.
drivers/net/ti/Makefile +1 -0
@@ -5,3 +5,4 @@ obj-$(CONFIG_DRIVER_TI_CPSW) += cpsw.o cpsw-common.o cpsw_mdio.o obj-$(CONFIG_DRIVER_TI_EMAC) += davinci_emac.o obj-$(CONFIG_DRIVER_TI_KEYSTONE_NET) += keystone_net.o cpsw_mdio.o +obj-$(CONFIG_TI_AM65_CPSW_NUSS) += am65-cpsw-nuss.o cpsw_mdio.o
drivers/net/ti/am65-cpsw-nuss.c new file +794 -0
794 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v5 2/5 net: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver
Quoted 57 lines · Keerthy
From: Grygorii Strashko <[email protected]>
Add new driver for the TI AM65x SoC Gigabit Ethernet Switch subsystem (CPSW NUSS). It has two ports and provides Ethernet packet communication for the device and can be configured as an Ethernet switch. CPSW NUSS features: the Reduced Gigabit Media Independent Interface (RGMII), Reduced Media Independent Interface (RMII), and the Management Data Input/Output (MDIO) interface for physical layer device (PHY) management. The TI AM65x SoC has integrated two-port Gigabit Ethernet Switch subsystem into device MCU domain named
MCU_CPSW0. One Ethernet port (port 1) with selectable RGMII and RMII interfaces and an internal Communications Port Programming Interface (CPPI) port (Host port 0).Host Port 0 CPPI Packet Streaming Interface interface supports 8 TX channels and on RX channels operating by TI am654 NAVSS Unified DMA Peripheral Root Complex (UDMA-P) controller.
Signed-off-by Grygorii Strashko <[email protected]>Signed-off-by Keerthy <[email protected]>--- drivers/net/ti/Kconfig | 8 + drivers/net/ti/Makefile | 1 + drivers/net/ti/am65-cpsw-nuss.c | 794 ++++++++++++++++++++++++++++++++ 3 files changed, 803 insertions(+) create mode 100644 drivers/net/ti/am65-cpsw-nuss.cdrivers/net/ti/Kconfig +8
-0@@ -18,3 +18,11 @@ config DRIVER_TI_KEYSTONE_NET bool "TI Keystone 2 Ethernet" help This driver supports the TI Keystone 2 Ethernet subsystem + +config TI_AM65_CPSW_NUSS + bool "TI K3 AM65x MCU CPSW Nuss Ethernet controller driver" + depends on ARCH_K3 + select PHYLIB + help + This driver supports TI K3 MCU CPSW Nuss Ethernet controller + in Texas Instruments K3 AM65x SoCs.drivers/net/ti/Makefile +1
-0@@ -5,3 +5,4 @@ obj-$(CONFIG_DRIVER_TI_CPSW) += cpsw.o cpsw-common.o cpsw_mdio.o obj-$(CONFIG_DRIVER_TI_EMAC) += davinci_emac.o obj-$(CONFIG_DRIVER_TI_KEYSTONE_NET) += keystone_net.o cpsw_mdio.o +obj-$(CONFIG_TI_AM65_CPSW_NUSS) += am65-cpsw-nuss.o cpsw_mdio.odrivers/net/ti/am65-cpsw-nuss.c new file +0
-0
[ ... ]
drivers/net/ti/am65-cpsw-nuss.c line 524
Quoted 7 lines
drivers/net/ti/am65-cpsw-nuss.c new file +7
-0+static const struct eth_ops am65_cpsw_ops = { + .start = am65_cpsw_start, + .send = am65_cpsw_send, + .recv = am65_cpsw_recv, + .free_pkt = am65_cpsw_free_pkt, + .stop = am65_cpsw_stop, + .read_rom_hwaddr = am65_cpsw_read_rom_hwaddr,
I'm surprised that write_hwaddr is not included.
Quoted 38 lines
drivers/net/ti/am65-cpsw-nuss.c new file +38
-0+}; + +static int am65_cpsw_mdio_init (struct udevice *dev) +{ +struct am65_cpsw_priv *priv =dev_get_priv (dev); +struct am65_cpsw_common *cpsw_common = priv->cpsw_common; + +if (!priv->has_phy || cpsw_common->bus) +return 0 ; + + cpsw_common->bus =cpsw_mdio_init (dev->name, + cpsw_common->mdio_base, + cpsw_common->bus_freq, +clk_get_rate (&cpsw_common->fclk)); +if (!cpsw_common->bus) +return -EFAULT ; + +return 0 ; +} + +static int am65_cpsw_phy_init (struct udevice *dev) +{ +struct am65_cpsw_priv *priv =dev_get_priv (dev); +struct am65_cpsw_common *cpsw_common = priv->cpsw_common; +struct eth_pdata *pdata =dev_get_platdata (dev); +struct phy_device *phydev; +u32 supported =PHY_GBIT_FEATURES ; +int ret; + + phydev =phy_connect (cpsw_common->bus, + priv->phy_addr, + priv->dev, + pdata->phy_interface); + +if (!phydev) { +dev_err (dev,"phy_connect() failed\n" ); +return -ENODEV ; + }
drivers/net/ti/am65-cpsw-nuss.c line 572
Quoted 10 lines
drivers/net/ti/am65-cpsw-nuss.c new file +10
-0+ + phydev->supported &= supported; +if (pdata->max_speed) { + ret =phy_set_supported (phydev, pdata->max_speed); +if (ret) +return ret; + } + phydev->advertising = phydev->supported; + +#ifdef CONFIG_DM_ETH
Why is this needed? I would expect this to already be assumed.
Quoted 152 lines
drivers/net/ti/am65-cpsw-nuss.c new file +152
-0+if (ofnode_valid (priv->phy_node)) + phydev->node = priv->phy_node; +#endif + + priv->phydev = phydev; + ret =phy_config (phydev); +if (ret <0 ) +pr_err ("phy_config() failed: %d" , ret); + +return ret; +} + +static int am65_cpsw_ofdata_parse_phy (struct udevice *dev,ofnode port_np) +{ +struct eth_pdata *pdata =dev_get_platdata (dev); +struct am65_cpsw_priv *priv =dev_get_priv (dev); +struct ofnode_phandle_args out_args; +const char *phy_mode; +int ret =0 ; + + phy_mode =ofnode_read_string (port_np,"phy-mode" ); +if (phy_mode) { + pdata->phy_interface = +phy_get_interface_by_name (phy_mode); +if (pdata->phy_interface ==-1 ) { +dev_err (dev,"Invalid PHY mode '%s', port %u\n" , + phy_mode, priv->port_id); + ret = -EINVAL ; + goto out; + } + } + +ofnode_read_u32 (port_np,"max-speed" , (u32 *)&pdata->max_speed); +if (pdata->max_speed) +dev_err (dev,"Port %u speed froced to %uMbit\n" , + priv->port_id, pdata->max_speed); + + priv->has_phy = true; + ret =ofnode_parse_phandle_with_args (port_np,"phy-handle" , +NULL ,0 ,0 , &out_args); +if (ret) { +dev_err (dev,"can't parse phy-handle port %u (%d)\n" , + priv->port_id, ret); + priv->has_phy = false; + ret =0 ; + } + + priv->phy_node = out_args.node; +if (priv->has_phy) { + ret =ofnode_read_u32 (priv->phy_node,"reg" , &priv->phy_addr); +if (ret) { +dev_err (dev,"failed to get phy_addr port %u (%d)\n" , + priv->port_id, ret); + goto out; + } + } + +out: +return ret; +} + +static int am65_cpsw_probe_cpsw (struct udevice *dev) +{ +struct am65_cpsw_priv *priv =dev_get_priv (dev); +struct eth_pdata *pdata =dev_get_platdata (dev); +struct am65_cpsw_common *cpsw_common; +ofnode ports_np, node; +int ret, i; + + priv->dev = dev; + + cpsw_common =calloc (1 ,sizeof (*priv->cpsw_common)); +if (!cpsw_common) +return -ENOMEM ; + priv->cpsw_common = cpsw_common; + + cpsw_common->dev = dev; + cpsw_common->ss_base =dev_read_addr (dev); +if (cpsw_common->ss_base ==FDT_ADDR_T_NONE ) +return -EINVAL ; + cpsw_common->mac_efuse =devfdt_get_addr_name (dev,"mac_efuse" ); +/* no err check - optional */ + + ret =power_domain_get_by_index (dev, &cpsw_common->pwrdmn,0 ); +if (ret) { +dev_err (dev,"failed to get pwrdmn: %d\n" , ret); +return ret; + } + + ret =clk_get_by_name (dev,"fck" , &cpsw_common->fclk); +if (ret) { +power_domain_free (&cpsw_common->pwrdmn); +dev_err (dev,"failed to get clock %d\n" , ret); +return ret; + } + + cpsw_common->cpsw_base = cpsw_common->ss_base +AM65_CPSW_CPSW_NU_BASE ; + cpsw_common->ale_base = cpsw_common->cpsw_base + +AM65_CPSW_CPSW_NU_ALE_BASE ; + cpsw_common->mdio_base = cpsw_common->ss_base +AM65_CPSW_MDIO_BASE ; + + cpsw_common->rflow_id_base =0 ; + cpsw_common->rflow_id_base = +dev_read_u32_default (dev,"ti,rx-flow-id-base" , + cpsw_common->rflow_id_base); + + ports_np =dev_read_subnode (dev,"ports" ); +if (!ofnode_valid (ports_np)) { + ret = -ENOENT ; + goto out; + } + +ofnode_for_each_subnode (node, ports_np) { +const char *node_name; +u32 port_id; +bool disabled; + + node_name =ofnode_get_name (node); + + disabled = !ofnode_is_available (node); + + ret =ofnode_read_u32 (node,"reg" , &port_id); +if (ret) { +dev_err (dev,"%s: failed to get port_id (%d)\n" , + node_name, ret); + goto out; + } + +if (port_id >=AM65_CPSW_CPSWNU_MAX_PORTS ) { +dev_err (dev,"%s: invalid port_id (%d)\n" , + node_name, port_id); + ret = -EINVAL ; + goto out; + } + cpsw_common->port_num++; + +if (!port_id) +continue ; + + priv->port_id = port_id; + cpsw_common->ports[port_id].disabled = disabled; +if (disabled) +continue ; + + ret =am65_cpsw_ofdata_parse_phy (dev, node); +if (ret) + goto out; + } + +for (i =0 ; i <AM65_CPSW_CPSWNU_MAX_PORTS ; i++) { +struct am65_cpsw_port *port = &cpsw_common->ports[i]; +
drivers/net/ti/am65-cpsw-nuss.c line 734
Quoted 10 lines
drivers/net/ti/am65-cpsw-nuss.c new file +10
-0+ port->port_base = cpsw_common->cpsw_base + +AM65_CPSW_CPSW_NU_PORTS_OFFSET + + (i *AM65_CPSW_CPSW_NU_PORTS_OFFSET ); + port->macsl_base = port->port_base + +AM65_CPSW_CPSW_NU_PORT_MACSL_OFFSET ; + } + + node =dev_read_subnode (dev,"cpsw-phy-sel" ); +if (!ofnode_valid (node)) { +dev_err (dev,"can't find cpsw-phy-se\n" );
cpsw-phy-se -> cpsw-phy-sel
Quoted 67 lines
drivers/net/ti/am65-cpsw-nuss.c new file +60
-1+ ret = -ENOENT ; + goto out; + } + + cpsw_common->gmii_sel =ofnode_get_addr (node); +if (cpsw_common->gmii_sel ==FDT_ADDR_T_NONE ) { +dev_err (dev,"failed to get gmii_sel base\n" ); + goto out; + } + + node =dev_read_subnode (dev,"mdio" ); +if (!ofnode_valid (node)) { +dev_err (dev,"can't find mdio\n" ); + ret = -ENOENT ; + goto out; + } + + cpsw_common->bus_freq = +dev_read_u32_default (dev,"bus_freq" , +AM65_CPSW_MDIO_BUS_FREQ_DEF ); + +am65_cpsw_gmii_sel_k3 (priv, pdata->phy_interface, priv->port_id); + + ret =am65_cpsw_mdio_init (dev); +if (ret) + goto out; + + ret =am65_cpsw_phy_init (dev); +if (ret) + goto out; + +dev_info (dev,"K3 CPSW: nuss_ver: 0x%08X cpsw_ver: 0x%08X ale_ver: 0x%08X Ports:%u rflow_id_base:%u mdio_freq:%u\n" , +readl (cpsw_common->ss_base), +readl (cpsw_common->cpsw_base), +readl (cpsw_common->ale_base), + cpsw_common->port_num, + cpsw_common->rflow_id_base, + cpsw_common->bus_freq); + +out: +clk_free (&cpsw_common->fclk); +power_domain_free (&cpsw_common->pwrdmn); +return ret; +} + +static const struct udevice_id am65_cpsw_nuss_ids[] = { + { .compatible ="ti,am654-cpsw-nuss" }, + { } +}; + +U_BOOT_DRIVER (am65_cpsw_nuss_slave) = { + .name ="am65_cpsw_nuss_slave" , + .id =UCLASS_ETH , + .of_match = am65_cpsw_nuss_ids, + .probe = am65_cpsw_probe_cpsw, + .ops = &am65_cpsw_ops, + .priv_auto_alloc_size =sizeof (struct am65_cpsw_priv ), + .platdata_auto_alloc_size =sizeof (struct eth_pdata ), + .flags =DM_FLAG_ALLOC_PRIV_DMA , +}; --2.17.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH v5 2/5 net: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver
Quoted 69 lines · Joe Hershberger
Quoted 57 lines · Keerthy
From: Grygorii Strashko <[email protected]>
Add new driver for the TI AM65x SoC Gigabit Ethernet Switch subsystem (CPSW NUSS). It has two ports and provides Ethernet packet communication for the device and can be configured as an Ethernet switch. CPSW NUSS features: the Reduced Gigabit Media Independent Interface (RGMII), Reduced Media Independent Interface (RMII), and the Management Data Input/Output (MDIO) interface for physical layer device (PHY) management. The TI AM65x SoC has integrated two-port Gigabit Ethernet Switch subsystem into device MCU domain named
MCU_CPSW0. One Ethernet port (port 1) with selectable RGMII and RMII interfaces and an internal Communications Port Programming Interface (CPPI) port (Host port 0).Host Port 0 CPPI Packet Streaming Interface interface supports 8 TX channels and on RX channels operating by TI am654 NAVSS Unified DMA Peripheral Root Complex (UDMA-P) controller.
Signed-off-by Grygorii Strashko <[email protected]>Signed-off-by Keerthy <[email protected]>--- drivers/net/ti/Kconfig | 8 + drivers/net/ti/Makefile | 1 + drivers/net/ti/am65-cpsw-nuss.c | 794 ++++++++++++++++++++++++++++++++ 3 files changed, 803 insertions(+)create mode 100644
drivers/net/ti/am65-cpsw-nuss.cdrivers/net/ti/Kconfig +8
-0@@ -18,3 +18,11 @@ config DRIVER_TI_KEYSTONE_NET bool "TI Keystone 2 Ethernet" help This driver supports the TI Keystone 2 Ethernet subsystem + +config TI_AM65_CPSW_NUSS + bool "TI K3 AM65x MCU CPSW Nuss Ethernet controller driver" + depends on ARCH_K3 + select PHYLIB + help + This driver supports TI K3 MCU CPSW Nuss Ethernet controller + in Texas Instruments K3 AM65x SoCs.drivers/net/ti/Makefile +1
-0@@ -5,3 +5,4 @@ obj-$(CONFIG_DRIVER_TI_CPSW) += cpsw.o cpsw-common.o cpsw_mdio.o obj-$(CONFIG_DRIVER_TI_EMAC) += davinci_emac.o obj-$(CONFIG_DRIVER_TI_KEYSTONE_NET) += keystone_net.o cpsw_mdio.o +obj-$(CONFIG_TI_AM65_CPSW_NUSS) += am65-cpsw-nuss.o cpsw_mdio.odrivers/net/ti/am65-cpsw-nuss.c new file +0
-0[ ... ]
drivers/net/ti/am65-cpsw-nuss.c line 524
Quoted 7 lines
drivers/net/ti/am65-cpsw-nuss.c new file +7
-0+static const struct eth_ops am65_cpsw_ops = { + .start = am65_cpsw_start, + .send = am65_cpsw_send, + .recv = am65_cpsw_recv, + .free_pkt = am65_cpsw_free_pkt, + .stop = am65_cpsw_stop, + .read_rom_hwaddr = am65_cpsw_read_rom_hwaddr,
Quoted 1 line
I'm surprised that
write_hwaddris not included.
This driver is pretty much based on cpsw.c under drivers/net/ti. I believe there is no mandate to write the hw mac address to specific IP register.
Quoted 43 lines
Quoted 43 lines
drivers/net/ti/am65-cpsw-nuss.c new file +42
-0+}; + +static int am65_cpsw_mdio_init (struct udevice *dev) +{ +struct am65_cpsw_priv *priv =dev_get_priv (dev); +struct am65_cpsw_common *cpsw_common = priv->cpsw_common; + +if (!priv->has_phy || cpsw_common->bus) +return 0 ; + + cpsw_common->bus =cpsw_mdio_init (dev->name, + cpsw_common->mdio_base, + cpsw_common->bus_freq, +clk_get_rate (&cpsw_common->fclk)); +if (!cpsw_common->bus) +return -EFAULT ; + +return 0 ; +} + +static int am65_cpsw_phy_init (struct udevice *dev) +{ +struct am65_cpsw_priv *priv =dev_get_priv (dev); +struct am65_cpsw_common *cpsw_common = priv->cpsw_common; +struct eth_pdata *pdata =dev_get_platdata (dev); +struct phy_device *phydev; +u32 supported =PHY_GBIT_FEATURES ; +int ret; + + phydev =phy_connect (cpsw_common->bus, + priv->phy_addr, + priv->dev, + pdata->phy_interface); + +if (!phydev) { +dev_err (dev,"phy_connect() failed\n" ); +return -ENODEV ; + } + + phydev->supported &= supported; +if (pdata->max_speed) { + ret =phy_set_supported (phydev, pdata->max_speed);
Quoted 8 lines
drivers/net/ti/am65-cpsw-nuss.c line 572
Quoted 6 lines
drivers/net/ti/am65-cpsw-nuss.c new file +6
-0+if (ret) +return ret; + } + phydev->advertising = phydev->supported; + +#ifdef CONFIG_DM_ETH Why is this needed? I would expect this to already be assumed.
Yes. This is redundant.
Quoted 157 lines
Quoted 157 lines
drivers/net/ti/am65-cpsw-nuss.c new file +156
-0+if (ofnode_valid (priv->phy_node)) + phydev->node = priv->phy_node; +#endif + + priv->phydev = phydev; + ret =phy_config (phydev); +if (ret <0 ) +pr_err ("phy_config() failed: %d" , ret); + +return ret; +} + +static int am65_cpsw_ofdata_parse_phy (struct udevice *dev,ofnode port_np) +{ +struct eth_pdata *pdata =dev_get_platdata (dev); +struct am65_cpsw_priv *priv =dev_get_priv (dev); +struct ofnode_phandle_args out_args; +const char *phy_mode; +int ret =0 ; + + phy_mode =ofnode_read_string (port_np,"phy-mode" ); +if (phy_mode) { + pdata->phy_interface = +phy_get_interface_by_name (phy_mode); +if (pdata->phy_interface ==-1 ) { +dev_err (dev,"Invalid PHY mode '%s', port %u\n" , + phy_mode, priv->port_id); + ret = -EINVAL ; + goto out; + } + } + +ofnode_read_u32 (port_np,"max-speed" , (u32 *)&pdata->max_speed); +if (pdata->max_speed) +dev_err (dev,"Port %u speed froced to %uMbit\n" , + priv->port_id, pdata->max_speed); + + priv->has_phy = true; + ret =ofnode_parse_phandle_with_args (port_np,"phy-handle" , +NULL ,0 ,0 , &out_args); +if (ret) { +dev_err (dev,"can't parse phy-handle port %u (%d)\n" , + priv->port_id, ret); + priv->has_phy = false; + ret =0 ; + } + + priv->phy_node = out_args.node; +if (priv->has_phy) { + ret =ofnode_read_u32 (priv->phy_node,"reg" , &priv->phy_addr); +if (ret) { +dev_err (dev,"failed to get phy_addr port %u (%d)\n" , + priv->port_id, ret); + goto out; + } + } + +out: +return ret; +} + +static int am65_cpsw_probe_cpsw (struct udevice *dev) +{ +struct am65_cpsw_priv *priv =dev_get_priv (dev); +struct eth_pdata *pdata =dev_get_platdata (dev); +struct am65_cpsw_common *cpsw_common; +ofnode ports_np, node; +int ret, i; + + priv->dev = dev; + + cpsw_common =calloc (1 ,sizeof (*priv->cpsw_common)); +if (!cpsw_common) +return -ENOMEM ; + priv->cpsw_common = cpsw_common; + + cpsw_common->dev = dev; + cpsw_common->ss_base =dev_read_addr (dev); +if (cpsw_common->ss_base ==FDT_ADDR_T_NONE ) +return -EINVAL ; + cpsw_common->mac_efuse =devfdt_get_addr_name (dev,"mac_efuse" ); +/* no err check - optional */ + + ret =power_domain_get_by_index (dev, &cpsw_common->pwrdmn,0 ); +if (ret) { +dev_err (dev,"failed to get pwrdmn: %d\n" , ret); +return ret; + } + + ret =clk_get_by_name (dev,"fck" , &cpsw_common->fclk); +if (ret) { +power_domain_free (&cpsw_common->pwrdmn); +dev_err (dev,"failed to get clock %d\n" , ret); +return ret; + } + + cpsw_common->cpsw_base = cpsw_common->ss_base +AM65_CPSW_CPSW_NU_BASE ; + cpsw_common->ale_base = cpsw_common->cpsw_base + +AM65_CPSW_CPSW_NU_ALE_BASE ; + cpsw_common->mdio_base = cpsw_common->ss_base +AM65_CPSW_MDIO_BASE ; + + cpsw_common->rflow_id_base =0 ; + cpsw_common->rflow_id_base = +dev_read_u32_default (dev,"ti,rx-flow-id-base" , + cpsw_common->rflow_id_base); + + ports_np =dev_read_subnode (dev,"ports" ); +if (!ofnode_valid (ports_np)) { + ret = -ENOENT ; + goto out; + } + +ofnode_for_each_subnode (node, ports_np) { +const char *node_name; +u32 port_id; +bool disabled; + + node_name =ofnode_get_name (node); + + disabled = !ofnode_is_available (node); + + ret =ofnode_read_u32 (node,"reg" , &port_id); +if (ret) { +dev_err (dev,"%s: failed to get port_id (%d)\n" , + node_name, ret); + goto out; + } + +if (port_id >=AM65_CPSW_CPSWNU_MAX_PORTS ) { +dev_err (dev,"%s: invalid port_id (%d)\n" , + node_name, port_id); + ret = -EINVAL ; + goto out; + } + cpsw_common->port_num++; + +if (!port_id) +continue ; + + priv->port_id = port_id; + cpsw_common->ports[port_id].disabled = disabled; +if (disabled) +continue ; + + ret =am65_cpsw_ofdata_parse_phy (dev, node); +if (ret) + goto out; + } + +for (i =0 ; i <AM65_CPSW_CPSWNU_MAX_PORTS ; i++) { +struct am65_cpsw_port *port = &cpsw_common->ports[i]; + + port->port_base = cpsw_common->cpsw_base + +AM65_CPSW_CPSW_NU_PORTS_OFFSET + + (i *AM65_CPSW_CPSW_NU_PORTS_OFFSET ); + port->macsl_base = port->port_base +
Quoted 8 lines
drivers/net/ti/am65-cpsw-nuss.c line 734
Quoted 6 lines
drivers/net/ti/am65-cpsw-nuss.c new file +6
-0+AM65_CPSW_CPSW_NU_PORT_MACSL_OFFSET ; + } + + node =dev_read_subnode (dev,"cpsw-phy-sel" ); +if (!ofnode_valid (node)) { +dev_err (dev,"can't find cpsw-phy-se\n" );cpsw-phy-se -> cpsw-phy-sel
okay. Will correct this.
Quoted 68 lines
Quoted 68 lines
drivers/net/ti/am65-cpsw-nuss.c new file +60
-1+ ret = -ENOENT ; + goto out; + } + + cpsw_common->gmii_sel =ofnode_get_addr (node); +if (cpsw_common->gmii_sel ==FDT_ADDR_T_NONE ) { +dev_err (dev,"failed to get gmii_sel base\n" ); + goto out; + } + + node =dev_read_subnode (dev,"mdio" ); +if (!ofnode_valid (node)) { +dev_err (dev,"can't find mdio\n" ); + ret = -ENOENT ; + goto out; + } + + cpsw_common->bus_freq = +dev_read_u32_default (dev,"bus_freq" , +AM65_CPSW_MDIO_BUS_FREQ_DEF ); + +am65_cpsw_gmii_sel_k3 (priv, pdata->phy_interface, priv->port_id); + + ret =am65_cpsw_mdio_init (dev); +if (ret) + goto out; + + ret =am65_cpsw_phy_init (dev); +if (ret) + goto out; + +dev_info (dev,"K3 CPSW: nuss_ver: 0x%08X cpsw_ver: 0x%08X ale_ver: 0x%08X Ports:%u rflow_id_base:%u mdio_freq:%u\n" , +readl (cpsw_common->ss_base), +readl (cpsw_common->cpsw_base), +readl (cpsw_common->ale_base), + cpsw_common->port_num, + cpsw_common->rflow_id_base, + cpsw_common->bus_freq); + +out: +clk_free (&cpsw_common->fclk); +power_domain_free (&cpsw_common->pwrdmn); +return ret; +} + +static const struct udevice_id am65_cpsw_nuss_ids[] = { + { .compatible ="ti,am654-cpsw-nuss" }, + { } +}; + +U_BOOT_DRIVER (am65_cpsw_nuss_slave) = { + .name ="am65_cpsw_nuss_slave" , + .id =UCLASS_ETH , + .of_match = am65_cpsw_nuss_ids, + .probe = am65_cpsw_probe_cpsw, + .ops = &am65_cpsw_ops, + .priv_auto_alloc_size =sizeof (struct am65_cpsw_priv ), + .platdata_auto_alloc_size =sizeof (struct eth_pdata ), + .flags =DM_FLAG_ALLOC_PRIV_DMA , +}; --2.17.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH v5 3/5 arm64: dts: ti: k3-am65: add mcu cpsw node
In reply to KeerthyFrom: Grygorii Strashko <[email protected]>
Add mcu cpsw and its components along with scm_conf node to have ethernet functional.
--- arch/arm/dts/k3-am65.dtsi | 2 + arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 111 +++++++++++++++++++ 2 files changed, 113 insertions(+)
arch/arm/dts/k3-am65.dtsi +2 -0
@@ -64,6 +64,7 @@ /* MCUSS Range */ <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>, <0x00 0x40200000 0x00 0x40200000 0x00 0x00900100>, + <0x00 0x40f00000 0x00 0x40f00000 0x00 0x00020000>, <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>, <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>, <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>,
@@ -75,6 +76,7 @@ #size-cells = <2>; ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>, /* MCU NAVSS*/ <0x00 0x40200000 0x00 0x40200000 0x00 0x00900100>, /* First peripheral window */ + <0x00 0x40f00000 0x00 0x40f00000 0x00 0x00020000>, /* CTRL_MMR0 */ <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>, /* WKUP */ <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>, /* MMRs, remaining NAVSS */ <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>, /* CPSW */
arch/arm/dts/k3-am654-base-board-u-boot.dtsi +111 -0
123 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v5 3/5 arm64: dts: ti: k3-am65: add mcu cpsw node
Quoted 9 lines · Keerthy
From: Grygorii Strashko <[email protected]>
Add mcu cpsw and its components along with
scm_confnode to have ethernet functional.Signed-off-by Grygorii Strashko <[email protected]>Signed-off-by Keerthy <[email protected]>Reviewed-by Tom Rini <[email protected]>
PATCH v5 4/5 arm64: dts: k3-am654-base-board: add mcu cpsw nuss pinmux and phy defs
In reply to KeerthyFrom: Grygorii Strashko <[email protected]>
Add mcu cpsw nuss pinmux and phy defs required by cpsw.
--- arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 59 ++++++++++++++++++++ 1 file changed, 59 insertions(+)
arch/arm/dts/k3-am654-base-board-u-boot.dtsi +59 -0
@@ -5,6 +5,7 @@ #include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/dma/k3-udma.h> +#include <dt-bindings/net/ti-dp83867.h> / { chosen {
@@ -300,6 +301,32 @@ u-boot,dm-spl; }; +&wkup_pmx0 { + mcu_cpsw_pins_default: mcu_cpsw_pins_default { + pinctrl-single,pins = < + AM65X_WKUP_IOPAD(0x0058, PIN_OUTPUT, 0) /* (N4) MCU_RGMII1_TX_CTL */ + AM65X_WKUP_IOPAD(0x005c, PIN_INPUT, 0) /* (N5) MCU_RGMII1_RX_CTL */ + AM65X_WKUP_IOPAD(0x0060, PIN_OUTPUT, 0) /* (M2) MCU_RGMII1_TD3 */ + AM65X_WKUP_IOPAD(0x0064, PIN_OUTPUT, 0) /* (M3) MCU_RGMII1_TD2 */ + AM65X_WKUP_IOPAD(0x0068, PIN_OUTPUT, 0) /* (M4) MCU_RGMII1_TD1 */ + AM65X_WKUP_IOPAD(0x006c, PIN_OUTPUT, 0) /* (M5) MCU_RGMII1_TD0 */ + AM65X_WKUP_IOPAD(0x0078, PIN_INPUT, 0) /* (L2) MCU_RGMII1_RD3 */ + AM65X_WKUP_IOPAD(0x007c, PIN_INPUT, 0) /* (L5) MCU_RGMII1_RD2 */ + AM65X_WKUP_IOPAD(0x0080, PIN_INPUT, 0) /* (M6) MCU_RGMII1_RD1 */ + AM65X_WKUP_IOPAD(0x0084, PIN_INPUT, 0) /* (L6) MCU_RGMII1_RD0 */ + AM65X_WKUP_IOPAD(0x0070, PIN_INPUT, 0) /* (N1) MCU_RGMII1_TXC */ + AM65X_WKUP_IOPAD(0x0074, PIN_INPUT, 0) /* (M1) MCU_RGMII1_RXC */ + >; + }; + + mcu_mdio_pins_default: mcu_mdio1_pins_default { + pinctrl-single,pins = < + AM65X_WKUP_IOPAD(0x008c, PIN_OUTPUT, 0) /* (L1) MCU_MDIO0_MDC */ + AM65X_WKUP_IOPAD(0x0088, PIN_INPUT, 0) /* (L4) MCU_MDIO0_MDIO */ + >; + }; +}; + &main_uart0 { u-boot,dm-spl; pinctrl-names = "default";
@@ -323,3 +350,35 @@ pinctrl-0 = <&main_mmc1_pins_default>; sdhci-caps-mask = <0x7 0x0>; }; + +&mcu_cpsw { + pinctrl-names = "default"; + pinctrl-0 = <&mcu_cpsw_pins_default &mcu_mdio_pins_default>; +}; + +&davinci_mdio { + phy0: ethernet-phy at 0 { + reg = <0>; + /* TODO: phy reset: TCA9555RTWR(i2c:0x21)[p04].GPIO_MCU_RGMII_RSTN */ + ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; + ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; + ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; + }; +}; + +&cpsw_port1 { + phy-mode = "rgmii-id"; + phy-handle = <&phy0>; +}; + +&mcu_cpsw { + reg = <0x0 0x46000000 0x0 0x200000>, + <0x0 0x40f00200 0x0 0x2>; + reg-names = "cpsw_nuss", "mac_efuse"; + + cpsw-phy-sel at 40f04040 { + compatible = "ti,am654-cpsw-phy-sel"; + reg= <0x0 0x40f04040 0x0 0x4>; + reg-names = "gmii-sel"; + }; +};
Signature · 1 line
2.17.1
PATCH v5 4/5 arm64: dts: k3-am654-base-board: add mcu cpsw nuss pinmux and phy defs
Quoted 8 lines · Keerthy
From: Grygorii Strashko <[email protected]>
Add mcu cpsw nuss pinmux and phy defs required by cpsw.
Signed-off-by Grygorii Strashko <[email protected]>Signed-off-by Keerthy <[email protected]>Reviewed-by Tom Rini <[email protected]>
PATCH v5 5/5 configs: am65x_evm_a53: enable networking
In reply to KeerthyFrom: Grygorii Strashko <[email protected]>
Enable TI K3 AM65x CPSW NUSS driver.
--- configs/am65x_evm_a53_defconfig | 7 +++++++ 1 file changed, 7 insertions(+)
configs/am65x_evm_a53_defconfig +7 -0
@@ -44,6 +44,7 @@ CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y CONFIG_ENV_IS_IN_FAT=y CONFIG_ENV_FAT_INTERFACE="mmc" CONFIG_ENV_FAT_DEVICE_AND_PART="1:1" +CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y
@@ -58,6 +59,11 @@ CONFIG_K3_SEC_PROXY=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_K3_ARASAN=y +CONFIG_PHY_TI=y +CONFIG_PHY_FIXED=y +CONFIG_DM_ETH=y +CONFIG_TI_AM65_CPSW_NUSS=y +CONFIG_PHY=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set CONFIG_SPL_PINCTRL=y
@@ -74,3 +80,4 @@ CONFIG_SOC_TI=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_TI_SCI=y +CONFIG_HEXDUMP=y
Signature · 1 line
2.17.1
PATCH v5 5/5 configs: am65x_evm_a53: enable networking
Quoted 8 lines · Keerthy
From: Grygorii Strashko <[email protected]>
Enable TI K3 AM65x CPSW NUSS driver.
Signed-off-by Grygorii Strashko <[email protected]>Signed-off-by Keerthy <[email protected]>Reviewed-by Tom Rini <[email protected]>
Question below, but...
Quoted 29 lines
--- configs/am65x_evm_a53_defconfig | 7 +++++++ 1 file changed, 7 insertions(+)configs/am65x_evm_a53_defconfig +6
-0@@ -44,6 +44,7 @@ CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y CONFIG_ENV_IS_IN_FAT=y CONFIG_ENV_FAT_INTERFACE="mmc" CONFIG_ENV_FAT_DEVICE_AND_PART="1:1" +CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y@@ -58,6 +59,11 @@ CONFIG_K3_SEC_PROXY=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_K3_ARASAN=y +CONFIG_PHY_TI=y +CONFIG_PHY_FIXED=y +CONFIG_DM_ETH=y +CONFIG_TI_AM65_CPSW_NUSS=y +CONFIG_PHY=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set CONFIG_SPL_PINCTRL=y
configs/am65x_evm_a53_defconfig CONFIG_SOC_TI=y · line 83
Quoted 4 lines
configs/am65x_evm_a53_defconfig +1
-0@@ -74,3 +80,4 @@ CONFIG_SOC_TI=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_TI_SCI=y +CONFIG_HEXDUMP=y
Why is this needed?
Quoted 7 lines
--
2.17.1_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH v5 5/5 configs: am65x_evm_a53: enable networking
Quoted 41 lines · Joe Hershberger
Quoted 8 lines · Keerthy
From: Grygorii Strashko <[email protected]>
Enable TI K3 AM65x CPSW NUSS driver.
Signed-off-by Grygorii Strashko <[email protected]>Signed-off-by Keerthy <[email protected]>Reviewed-by Tom Rini <[email protected]>Question below, but...
Acked-by Joe Hershberger <[email protected]>Quoted 27 lines
--- configs/am65x_evm_a53_defconfig | 7 +++++++ 1 file changed, 7 insertions(+)configs/am65x_evm_a53_defconfig +6
-0@@ -44,6 +44,7 @@ CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y CONFIG_ENV_IS_IN_FAT=y CONFIG_ENV_FAT_INTERFACE="mmc" CONFIG_ENV_FAT_DEVICE_AND_PART="1:1" +CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y@@ -58,6 +59,11 @@ CONFIG_K3_SEC_PROXY=y CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_K3_ARASAN=y +CONFIG_PHY_TI=y +CONFIG_PHY_FIXED=y +CONFIG_DM_ETH=y +CONFIG_TI_AM65_CPSW_NUSS=y +CONFIG_PHY=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set
Quoted 8 lines
configs/am65x_evm_a53_defconfig CONFIG_SOC_TI=y · line 83
Quoted 6 lines
configs/am65x_evm_a53_defconfig +1
-0CONFIG_SPL_PINCTRL=y@@ -74,3 +80,4 @@ CONFIG_SOC_TI=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_TI_SCI=y +CONFIG_HEXDUMP=yWhy is this needed?
Ah this was needed when some debug prints were enabled in prior versions. I will remove this in v6.
Thanks for the review.
Best Regards,
Keerthy
Quoted 8 lines
Quoted 8 lines
--
2.17.1_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
v5 cover net: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver
In reply to KeerthyQuoted 11 lines · Keerthy
Add new driver for the TI AM65x SoC Gigabit Ethernet Switch subsystem (CPSW NUSS). It has two ports and provides Ethernet packet communication for the device and can be configured as an Ethernet switch. CPSW NUSS features: the Reduced Gigabit Media Independent Interface (RGMII), Reduced Media Independent Interface (RMII), and the Management Data Input/Output (MDIO) interface for physical layer device (PHY) management. The TI AM65x SoC has integrated two-port Gigabit Ethernet Switch subsystem into device MCU domain named
MCU_CPSW0. One Ethernet port (port 1) with selectable RGMII and RMII interfaces and an internal Communications Port Programming Interface (CPPI) port (Host port 0).
Quoted 5 lines
Host Port 0 CPPI Packet Streaming Interface interface supports 8 TX channels and on RX channels operating by TI am654 NAVSS Unified DMA Peripheral Root Complex (UDMA-P) controller.
Tested for tftp and booting to kernel on am654-evm.
Tom,
Please pull this series. If there are no further comments.
- Keerthy
Quoted 29 lines
Changes in v5:
* Rebased to latest which meant adapting to pinmux macro change.Changes in v4:
* Patch1 caused dra7 config build warnings corrected them.
Grygorii Strashko (4):
net: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver
arm64: dts: ti: k3-am65: add mcu cpsw node
arm64: dts: k3-am654-base-board: add mcu cpsw nuss pinmux and phy defs
configs:am65x_evm_a53: enable networkingKeerthy (1):
driver: net: ti: cpsw-mdio: usephys_addr_tformdio_baseaddrarch/arm/dts/k3-am65.dtsi | 2 + arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 170 ++++ configs/am65x_evm_a53_defconfig | 7 + drivers/net/ti/Kconfig | 8 + drivers/net/ti/Makefile | 1 + drivers/net/ti/am65-cpsw-nuss.c | 794 +++++++++++++++++++ drivers/net/ti/cpsw_mdio.c | 4 +- drivers/net/ti/cpsw_mdio.h | 2 +- 8 files changed, 985 insertions(+), 3 deletions(-)create mode 100644
drivers/net/ti/am65-cpsw-nuss.c
v5 cover net: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver
Quoted 19 lines · Keerthy
Quoted 15 lines · Keerthy
Add new driver for the TI AM65x SoC Gigabit Ethernet Switch subsystem (CPSW NUSS). It has two ports and provides Ethernet packet communication for the device and can be configured as an Ethernet switch. CPSW NUSS features: the Reduced Gigabit Media Independent Interface (RGMII), Reduced Media Independent Interface (RMII), and the Management Data Input/Output (MDIO) interface for physical layer device (PHY) management. The TI AM65x SoC has integrated two-port Gigabit Ethernet Switch subsystem into device MCU domain named
MCU_CPSW0. One Ethernet port (port 1) with selectable RGMII and RMII interfaces and an internal Communications Port Programming Interface (CPPI) port (Host port 0).Host Port 0 CPPI Packet Streaming Interface interface supports 8 TX channels and on RX channels operating by TI am654 NAVSS Unified DMA Peripheral Root Complex (UDMA-P) controller.
Quoted 5 lines
Quoted 1 line
Tested for tftp and booting to kernel on am654-evm.
Tom,
Please pull this series. If there are no further comments.
This is next on my list to review.
Thanks,
-Joe
Quoted 35 lines
- Keerthy
Quoted 27 lines
Changes in v5:
* Rebased to latest which meant adapting to pinmux macro change.Changes in v4:
* Patch1 caused dra7 config build warnings corrected them.
Grygorii Strashko (4):
net: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver
arm64: dts: ti: k3-am65: add mcu cpsw node
arm64: dts: k3-am654-base-board: add mcu cpsw nuss pinmux and phy defs
configs:am65x_evm_a53: enable networkingKeerthy (1):
driver: net: ti: cpsw-mdio: usephys_addr_tformdio_baseaddrarch/arm/dts/k3-am65.dtsi | 2 + arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 170 ++++ configs/am65x_evm_a53_defconfig | 7 + drivers/net/ti/Kconfig | 8 + drivers/net/ti/Makefile | 1 + drivers/net/ti/am65-cpsw-nuss.c | 794 +++++++++++++++++++ drivers/net/ti/cpsw_mdio.c | 4 +- drivers/net/ti/cpsw_mdio.h | 2 +- 8 files changed, 985 insertions(+), 3 deletions(-)Quoted 2 lines
create mode 100644
drivers/net/ti/am65-cpsw-nuss.c_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot