ARM: DRA72x: Add CPSW Ethernet support for DRA72x SoC
cover ARM: DRA72x: Add CPSW Ethernet support for DRA72x SoC
CPSW Ethernet second port is pinned out as default Ethernet, so adding support for CPSW ethernet for downloading images via Ethernet.
Mugunthan V N (3):
drivers: net: cpsw: add support for using second port as ethernet
ARM: DRA7xx: Add cpsw second port pinmux
ARM: dra7_evm: Add Ethernet support for dra72x platform
board/ti/dra7xx/evm.c | 7 ++++++- board/ti/dra7xx/mux_data.h | 12 ++++++++++++ drivers/net/cpsw.c | 8 +++++--- include/cpsw.h | 1 + 4 files changed, 24 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.2.459.g68773ac
PATCH 1/3 drivers: net: cpsw: add support for using second port as ethernet
Add support for using the second slave port of cpsw to be used as primary ethernet.
--- drivers/net/cpsw.c | 8 +++++--- include/cpsw.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-)
drivers/net/cpsw.c +5 -3
@@ -211,6 +211,8 @@ struct cpdma_chan {#define chan_read (chan, fld) __raw_readl((chan)->fld)#define chan_read_ptr (chan, fld) ((void *)__raw_readl((chan)->fld)) +#define for_active_slave (slave, priv) \ + slave = (priv)->slaves + (priv)->data.active_slave; if (slave)#define for_each_slave (slave, priv) \ for (slave = (priv)->slaves; slave != (priv)->slaves + \ (priv)->data.slaves; slave++)
@@ -609,7 +611,7 @@ static int cpsw_update_link(struct cpsw_priv *priv)int link =0 ;struct cpsw_slave *slave; -for_each_slave (slave, priv) + for_active_slave(slave, priv)cpsw_slave_update_link (slave, priv, &link); priv->mdio_link =readl (&mdio_regs->link);return link;
@@ -785,7 +787,7 @@ static int cpsw_init(struct eth_device *dev, bd_t *bis) ALE_SECURE);cpsw_ale_add_mcast (priv, NetBcastAddr,1 << priv->host_port); -for_each_slave (slave, priv) + for_active_slave(slave, priv)cpsw_slave_init (slave, priv);cpsw_update_link (priv);
@@ -1013,7 +1015,7 @@ int cpsw_register(struct cpsw_platform_data *data)cpsw_mdio_init (dev->name, data->mdio_base, data->mdio_div); priv->bus =miiphy_get_dev_by_name (dev->name); -for_each_slave (slave, priv) + for_active_slave(slave, priv)cpsw_phy_init (dev, slave);return 1 ;
include/cpsw.h +1 -0
@@ -44,6 +44,7 @@ struct cpsw_platform_data {struct cpsw_slave_data *slave_data;void (*control)(int enabled);u32 host_port_num; +u32 active_slave;u8 version; };
Signature · 1 line
1.9.2.459.g68773ac
PATCH 1/3 drivers: net: cpsw: add support for using second port as ethernet
Quoted 4 lines · Mugunthan V N
Add support for using the second slave port of cpsw to be used as primary ethernet.
Signed-off-by Mugunthan V N <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140725/3bc415aa/attachment.pgp>
PATCH 2/3 ARM: DRA7xx: Add cpsw second port pinmux
In reply to Mugunthan V NAdd cpsw second slave port pinmux to use it as primary ethernet port
--- board/ti/dra7xx/mux_data.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
board/ti/dra7xx/mux_data.h +12 -0
@@ -51,6 +51,18 @@ const struct pad_conf_entry core_padconf_array_essential[] = { {RGMII0_RXD2, (IEN | M0) }, {RGMII0_RXD1, (IEN | M0) }, {RGMII0_RXD0, (IEN | M0) }, + {VIN2A_D12, (M3) }, + {VIN2A_D13, (M3) }, + {VIN2A_D14, (M3) }, + {VIN2A_D15, (M3) }, + {VIN2A_D16, (M3) }, + {VIN2A_D17, (M3) }, + {VIN2A_D18, (IEN | M3)}, + {VIN2A_D19, (IEN | M3)}, + {VIN2A_D20, (IEN | M3)}, + {VIN2A_D21, (IEN | M3)}, + {VIN2A_D22, (IEN | M3)}, + {VIN2A_D23, (IEN | M3)}, {GPMC_A13, (IEN | PDIS | M1)}, /* QSPI1_RTCLK */ {GPMC_A14, (IEN | PDIS | M1)}, /* QSPI1_D[3] */ {GPMC_A15, (IEN | PDIS | M1)}, /* QSPI1_D[2] */
Signature · 1 line
1.9.2.459.g68773ac
PATCH 2/3 ARM: DRA7xx: Add cpsw second port pinmux
Quoted 3 lines · Mugunthan V N
Add cpsw second slave port pinmux to use it as primary ethernet port
Signed-off-by Mugunthan V N <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140725/9e31813c/attachment.pgp>
PATCH 3/3 ARM: dra7_evm: Add Ethernet support for dra72x platform
In reply to Mugunthan V NSet the active_slave to 1 as slave 1 is pinned out in dra72x base board
--- board/ti/dra7xx/evm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
board/ti/dra7xx/evm.c +6 -1
@@ -157,6 +157,8 @@ int spl_start_uboot(void)#define VIN2A_D15_DLY_VAL ((0x4 << 5) + 0x0)#define VIN2A_D14_DLY_VAL ((0x4 << 5) + 0x0) +extern u32 *const omap_si_rev; +static void cpsw_control (int enabled) {/* VTP can be added here */
@@ -183,7 +185,7 @@ static struct cpsw_platform_data cpsw_data = { .mdio_div = 0xff, .channels = 8, .cpdma_reg_ofs = 0x800, - .slaves = 1, + .slaves = 2, .slave_data = cpsw_slaves, .ale_reg_ofs = 0xd00, .ale_entries = 1024,
@@ -254,6 +256,9 @@ int board_eth_init(bd_t *bis) ctrl_val |=0x22 ;writel (ctrl_val, (*ctrl)->control_core_control_io1); +if (*omap_si_rev ==DRA722_ES1_0 ) + cpsw_data.active_slave =1 ; + ret =cpsw_register (&cpsw_data);if (ret <0 )printf ("Error %d registering CPSW switch\n" , ret);
Signature · 1 line
1.9.2.459.g68773ac
PATCH 3/3 ARM: dra7_evm: Add Ethernet support for dra72x platform
Quoted 3 lines · Mugunthan V N
Set the
active_slaveto 1 as slave 1 is pinned out in dra72x base boardSigned-off-by Mugunthan V N <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140725/75b81a0d/attachment.pgp>
cover ARM: DRA72x: Add CPSW Ethernet support for DRA72x SoC
In reply to Mugunthan V NQuoted 8 lines · Mugunthan V N
CPSW Ethernet second port is pinned out as default Ethernet, so adding support for CPSW ethernet for downloading images via Ethernet.
Mugunthan V N (3):
drivers: net: cpsw: add support for using second port as ethernet
ARM: DRA7xx: Add cpsw second port pinmux
ARM:dra7_evm: Add Ethernet support for dra72x platform
Quoted 6 lines
board/ti/dra7xx/evm.c | 7 ++++++- board/ti/dra7xx/mux_data.h | 12 ++++++++++++ drivers/net/cpsw.c | 8 +++++--- include/cpsw.h | 1 + 4 files changed, 24 insertions(+), 4 deletions(-)
This patch series depends on the following patch set
http://lists.denx.de/pipermail/u-boot/2014-May/179549.html
Regards
Mugunthan V N
cover ARM: DRA72x: Add CPSW Ethernet support for DRA72x SoC
In reply to Mugunthan V NQuoted 7 lines · Mugunthan V N
CPSW Ethernet second port is pinned out as default Ethernet, so adding support for CPSW ethernet for downloading images via Ethernet.
Mugunthan V N (3):
drivers: net: cpsw: add support for using second port as ethernet
ARM: DRA7xx: Add cpsw second port pinmux
ARM:dra7_evm: Add Ethernet support for dra72x platform
Can we please update the driver to support both interfaces (cpsw for compat, cpsw1 for the second interface) and then we would just at runtime see if ethact was not set and if so, set it to cpsw1 on the dra72x evm? This would also make using boards which do have both ports a little less surprising as we do set both ethaddrs (so that we update the device tree and pass them along) but can only use one interface. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140522/050b00da/attachment.pgp>
cover ARM: DRA72x: Add CPSW Ethernet support for DRA72x SoC
In reply to Mugunthan V NQuoted 8 lines · Mugunthan V N
CPSW Ethernet second port is pinned out as default Ethernet, so adding support for CPSW ethernet for downloading images via Ethernet.
Mugunthan V N (3):
drivers: net: cpsw: add support for using second port as ethernet
ARM: DRA7xx: Add cpsw second port pinmux
ARM:dra7_evm: Add Ethernet support for dra72x platform
Quoted 5 lines
board/ti/dra7xx/evm.c | 7 ++++++- board/ti/dra7xx/mux_data.h | 12 ++++++++++++ drivers/net/cpsw.c | 8 +++++--- include/cpsw.h | 1 + 4 files changed, 24 insertions(+), 4 deletions(-)
I had previously rejected this as I was hoping to get 2nd port eth support work done. Mugunthan is working on this, but we're now also seeing more of the boards with this SoC out in the wild and we really do want eth working, so I'm going to take the series as-is as a bug-fix and we'll leave second port as a new feature to come in hopefully soon.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140725/0be952b7/attachment.pgp>