drivers: net: cpsw: add support to have phy address from cpsw platform data
Subsystems (2)
PATCH 1/10 drivers: net: cpsw: add support to have phy address from cpsw platform data
From: Mugunthan V N <[email protected]>
Some platforms like AM437x have different EVMs with different phy addresses, so this patch adds support for passing phy address via cpsw plaform data. Also renamed phy_id to phy_addr so better understanding of the code.
--- board/compulab/cm_t335/cm_t335.c | 2 +- board/isee/igep0033/board.c | 2 +- board/phytec/pcm051/board.c | 4 ++-- board/siemens/dxr2/board.c | 2 +- board/siemens/pxm2/board.c | 4 ++-- board/siemens/rut/board.c | 4 ++-- board/ti/am335x/board.c | 4 ++-- board/ti/dra7xx/evm.c | 4 ++-- board/ti/ti814x/evm.c | 4 ++-- drivers/net/cpsw.c | 4 ++-- include/configs/am335x_evm.h | 1 - include/configs/am335x_igep0033.h | 1 - include/configs/cm_t335.h | 1 - include/configs/dra7xx_evm.h | 1 - include/configs/dxr2.h | 1 - include/configs/pcm051.h | 1 - include/configs/pxm2.h | 1 - include/configs/rut.h | 1 - include/configs/ti814x_evm.h | 1 - include/cpsw.h | 2 +- 20 files changed, 18 insertions(+), 27 deletions(-)
board/compulab/cm_t335/cm_t335.c +1 -1
@@ -47,7 +47,7 @@ static void cpsw_control(int enabled)static struct cpsw_slave_data cpsw_slave = { .slave_reg_ofs =0x208 , .sliver_reg_ofs =0xd80 , - .phy_id =0 , + .phy_addr =0 , .phy_if =PHY_INTERFACE_MODE_RGMII , };
board/isee/igep0033/board.c +1 -1
@@ -116,7 +116,7 @@ static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x208, .sliver_reg_ofs = 0xd80, - .phy_id = 0, + .phy_addr = 0, .phy_if = PHY_INTERFACE_MODE_RMII, }, };
board/phytec/pcm051/board.c +2 -2
@@ -176,13 +176,13 @@ static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x208, .sliver_reg_ofs = 0xd80, - .phy_id = 0, + .phy_addr = 0, .phy_if = PHY_INTERFACE_MODE_RGMII, }, { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, - .phy_id = 1, + .phy_addr = 1, .phy_if = PHY_INTERFACE_MODE_RGMII, }, };
board/siemens/dxr2/board.c +1 -1
@@ -198,7 +198,7 @@ static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x208, .sliver_reg_ofs = 0xd80, - .phy_id = 0, + .phy_addr = 0, .phy_if = PHY_INTERFACE_MODE_MII, }, };
board/siemens/pxm2/board.c +2 -2
@@ -181,13 +181,13 @@ static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x208, .sliver_reg_ofs = 0xd80, - .phy_id = 0, + .phy_addr = 0, .phy_if = PHY_INTERFACE_MODE_RMII, }, { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, - .phy_id = 1, + .phy_addr = 1, .phy_if = PHY_INTERFACE_MODE_RMII, }, };
board/siemens/rut/board.c +2 -2
@@ -143,13 +143,13 @@ static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x208, .sliver_reg_ofs = 0xd80, - .phy_id = 1, + .phy_addr = 1, .phy_if = PHY_INTERFACE_MODE_RMII, }, { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, - .phy_id = 0, + .phy_addr = 0, .phy_if = PHY_INTERFACE_MODE_RMII, }, };
board/ti/am335x/board.c +2 -2
@@ -544,12 +544,12 @@ static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x208, .sliver_reg_ofs = 0xd80, - .phy_id = 0, + .phy_addr = 0, }, { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, - .phy_id = 1, + .phy_addr = 1, }, };
board/ti/dra7xx/evm.c +2 -2
@@ -148,12 +148,12 @@ static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x208, .sliver_reg_ofs = 0xd80, - .phy_id = 0, + .phy_addr = 2, }, { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, - .phy_id = 1, + .phy_addr = 3, }, };
board/ti/ti814x/evm.c +2 -2
@@ -132,12 +132,12 @@ static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x50, .sliver_reg_ofs = 0x700, - .phy_id = 1, + .phy_addr = 1, }, { .slave_reg_ofs = 0x90, .sliver_reg_ofs = 0x740, - .phy_id = 0, + .phy_addr = 0, }, };
drivers/net/cpsw.c +2 -2
@@ -656,7 +656,7 @@ static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv)cpsw_ale_add_mcast (priv, NetBcastAddr,1 << slave_port); - priv->phy_mask |=1 << slave->data->phy_id; + priv->phy_mask |=1 << slave->data->phy_addr; }static struct cpdma_desc *cpdma_desc_alloc (struct cpsw_priv *priv)
@@ -948,7 +948,7 @@ static int cpsw_phy_init(struct eth_device *dev, struct cpsw_slave *slave) SUPPORTED_1000baseT_Full); phydev =phy_connect (priv->bus, -CONFIG_PHY_ADDR , + slave->data->phy_addr, dev, slave->data->phy_if);
include/configs/am335x_evm.h +0 -1
@@ -385,7 +385,6 @@/* Network. */ #define CONFIG_PHY_GIGE #define CONFIG_PHYLIB -#define CONFIG_PHY_ADDR 0#define CONFIG_PHY_SMSC /* NAND support */
include/configs/am335x_igep0033.h +0 -1
@@ -181,7 +181,6 @@#define CONFIG_NET_RETRY_COUNT 10#define CONFIG_NET_MULTI #define CONFIG_PHYLIB -#define CONFIG_PHY_ADDR 0#define CONFIG_PHY_SMSC /* NAND support */
include/configs/cm_t335.h +0 -1
@@ -114,7 +114,6 @@/* Network. */ #define CONFIG_PHY_GIGE #define CONFIG_PHYLIB -#define CONFIG_PHY_ADDR 0#define CONFIG_PHY_ATHEROS /* NAND support */
include/configs/dra7xx_evm.h +0 -1
@@ -51,7 +51,6 @@#define CONFIG_MII /* Required in net/eth.c */ #define CONFIG_PHY_GIGE /* per-board part of CPSW */ #define CONFIG_PHYLIB -#define CONFIG_PHY_ADDR 2/* SPI */ #undef CONFIG_OMAP3_SPI
include/configs/dxr2.h +0 -1
@@ -49,7 +49,6 @@#undef CONFIG_MII#undef CONFIG_PHY_GIGE -#define CONFIG_PHY_ADDR 0#define CONFIG_PHY_SMSC #define CONFIG_FACTORYSET
include/configs/pcm051.h +0 -1
@@ -297,7 +297,6 @@#define CONFIG_NET_MULTI #define CONFIG_PHY_GIGE #define CONFIG_PHYLIB -#define CONFIG_PHY_ADDR 0#define CONFIG_PHY_SMSC #endif /* ! __CONFIG_PCM051_H */
include/configs/pxm2.h +0 -1
@@ -44,7 +44,6 @@#undef CONFIG_SPL_NET_VCI_STRING#undef CONFIG_SPL_ETH_SUPPORT -#define CONFIG_PHY_ADDR 0#define CONFIG_PHY_ATHEROS #define CONFIG_FACTORYSET
include/configs/rut.h +0 -1
@@ -41,7 +41,6 @@#undef CONFIG_SPL_NET_VCI_STRING#undef CONFIG_SPL_ETH_SUPPORT -#define CONFIG_PHY_ADDR 1#define CONFIG_PHY_NATSEMI #define CONFIG_FACTORYSET
include/configs/ti814x_evm.h +0 -1
@@ -233,7 +233,6 @@#define CONFIG_NET_MULTI #define CONFIG_PHY_GIGE #define CONFIG_PHYLIB -#define CONFIG_PHY_ADDR 1#define CONFIG_PHY_ET1011C #define CONFIG_PHY_ET1011C_TX_CLK_FIX
include/cpsw.h +1 -1
@@ -19,7 +19,7 @@struct cpsw_slave_data {u32 slave_reg_ofs;u32 sliver_reg_ofs; -int phy_id; +int phy_addr;int phy_if; };
Signature · 1 line
1.7.9.5
PATCH 2/10 ARM: AM43xx: clocks: Enable CPGMAC clock control
From: Mugunthan V N <[email protected]>
Enable CPGMAC clock control for AM43xx to use ethernet in U-Boot
--- arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/cpu/armv7/am33xx/clock_am43xx.c +1 -0
@@ -97,6 +97,7 @@ void enable_basic_clocks(void) &cmper->gpio4clkctrl, &cmper->gpio5clkctrl, &cmper->i2c1clkctrl, + &cmper->cpgmac0clkctrl, &cmper->emiffwclkctrl, &cmper->emifclkctrl, &cmper->otfaemifclkctrl,
Signature · 1 line
1.7.9.5
PATCH 2/10 ARM: AM43xx: clocks: Enable CPGMAC clock control
Quoted 5 lines · Tom Rini
From: Mugunthan V N <[email protected]>
Enable CPGMAC clock control for AM43xx to use ethernet in U-Boot
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/20140304/18835800/attachment.pgp>
PATCH 3/10 ARM: AM43xx: Add CPSW support to AM43xx EPOS and GP EVM
In reply to Tom RiniFrom: Mugunthan V N <[email protected]>
Adding support for CPSW to AM43xx EPOS nad GP EVM which is connected to RMII and RGMII phy respectively and enable cpsw in config.
--- board/ti/am43xx/board.c | 100 ++++++++++++++++++++++++++++++++++++++++++ board/ti/am43xx/mux.c | 41 ++++++++++++++++- include/configs/am43xx_evm.h | 20 +++++++++ 3 files changed, 160 insertions(+), 1 deletion(-)
board/ti/am43xx/board.c +100 -0
@@ -19,9 +19,15 @@#include <asm/arch/gpio.h> #include <asm/emif.h> #include "board.h" +#include <miiphy.h> +#include <cpsw.h> DECLARE_GLOBAL_DATA_PTR ; +#ifndef CONFIG_SPL_BUILD +static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE ; +#endif +/* * Read header information from EEPROM into global structure. */
@@ -402,3 +408,97 @@ int board_late_init(void)return 0 ; }#endif + +#ifdef CONFIG_DRIVER_TI_CPSW + +static void cpsw_control (int enabled) +{ +/* Additional controls can be added here */ +return ; +} + +static struct cpsw_slave_data cpsw_slaves[] = { + { + .slave_reg_ofs =0x208 , + .sliver_reg_ofs =0xd80 , + .phy_addr =16 , + }, + { + .slave_reg_ofs =0x308 , + .sliver_reg_ofs =0xdc0 , + .phy_addr =1 , + }, +}; + +static struct cpsw_platform_data cpsw_data = { + .mdio_base =CPSW_MDIO_BASE , + .cpsw_base =CPSW_BASE , + .mdio_div =0xff , + .channels =8 , + .cpdma_reg_ofs =0x800 , + .slaves =1 , + .slave_data = cpsw_slaves, + .ale_reg_ofs =0xd00 , + .ale_entries =1024 , + .host_port_reg_ofs =0x108 , + .hw_stats_reg_ofs =0x900 , + .bd_ram_ofs =0x2000 , + .mac_control = (1 <<5 ), + .control = cpsw_control, + .host_port_num =0 , + .version =CPSW_CTRL_VERSION_2 , +}; + +int board_eth_init (bd_t *bis) +{ +int rv; +uint8_t mac_addr[6 ]; +uint32_t mac_hi, mac_lo; + +/* try reading mac address from efuse */ + mac_lo =readl (&cdev->macid0l); + mac_hi =readl (&cdev->macid0h); + mac_addr[0 ] = mac_hi &0xFF ; + mac_addr[1 ] = (mac_hi &0xFF00 ) >>8 ; + mac_addr[2 ] = (mac_hi &0xFF0000 ) >>16 ; + mac_addr[3 ] = (mac_hi &0xFF000000 ) >>24 ; + mac_addr[4 ] = mac_lo &0xFF ; + mac_addr[5 ] = (mac_lo &0xFF00 ) >>8 ; + +if (!getenv ("ethaddr" )) { +puts ("<ethaddr> not set. Validating first E-fuse MAC\n" ); +if (is_valid_ether_addr (mac_addr)) +eth_setenv_enetaddr ("ethaddr" , mac_addr); + } + + mac_lo =readl (&cdev->macid1l); + mac_hi =readl (&cdev->macid1h); + mac_addr[0 ] = mac_hi &0xFF ; + mac_addr[1 ] = (mac_hi &0xFF00 ) >>8 ; + mac_addr[2 ] = (mac_hi &0xFF0000 ) >>16 ; + mac_addr[3 ] = (mac_hi &0xFF000000 ) >>24 ; + mac_addr[4 ] = mac_lo &0xFF ; + mac_addr[5 ] = (mac_lo &0xFF00 ) >>8 ; + +if (!getenv ("eth1addr" )) { +if (is_valid_ether_addr (mac_addr)) +eth_setenv_enetaddr ("eth1addr" , mac_addr); + } + +if (board_is_eposevm ()) { +writel (RMII_MODE_ENABLE |RMII_CHIPCKL_ENABLE , &cdev->miisel); + cpsw_slaves[0 ].phy_if =PHY_INTERFACE_MODE_RMII ; + cpsw_slaves[0 ].phy_addr =16 ; + }else { +writel (RGMII_MODE_ENABLE , &cdev->miisel); + cpsw_slaves[0 ].phy_if =PHY_INTERFACE_MODE_RGMII ; + cpsw_slaves[0 ].phy_addr =0 ; + } + + rv =cpsw_register (&cpsw_data); +if (rv <0 ) +printf ("Error %d registering CPSW switch\n" , rv); + +return rv; +} +#endif
board/ti/am43xx/mux.c +40 -1
55 lines not on this page · raw message
include/configs/am43xx_evm.h +20 -0
@@ -175,5 +175,25 @@"run mmcboot;" \"run usbboot;" +/* CPSW Ethernet */ +#define CONFIG_CMD_NET +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_PING +#define CONFIG_CMD_MII +#define CONFIG_DRIVER_TI_CPSW +#define CONFIG_MII +#define CONFIG_BOOTP_DEFAULT +#define CONFIG_BOOTP_DNS +#define CONFIG_BOOTP_DNS2 +#define CONFIG_BOOTP_SEND_HOSTNAME +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_SUBNETMASK +#define CONFIG_NET_RETRY_COUNT 10 +#define CONFIG_NET_MULTI +#define CONFIG_PHY_GIGE +#define CONFIG_PHYLIB +#define CONFIG_SYS_RX_ETH_BUFFER 64 +#define CONFIG_PHY_ADDR 16 +#endif #endif /* __CONFIG_AM43XX_EVM_H */
Signature · 1 line
1.7.9.5
PATCH 3/10 ARM: AM43xx: Add CPSW support to AM43xx EPOS and GP EVM
Quoted 7 lines · Tom Rini
From: Mugunthan V N <[email protected]>
Adding support for CPSW to AM43xx EPOS nad GP EVM which is connected to RMII and RGMII phy respectively and enable cpsw in config.
Reviewed-by Felipe Balbi <[email protected]>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/20140304/7829afca/attachment.pgp>
PATCH 4/10 ARM: AM335x: add support for reading cpsw 2nd mac address from efuse
In reply to Tom RiniFrom: Mugunthan V N <[email protected]>
Adding support for reading cpsw 2nd mac address from efuse and pass it to kernel via dtb which will be used in dual emac mode of cpsw. Also adding mii command support to am335x common config.
--- board/ti/am335x/board.c | 15 +++++++++++++++ include/configs/ti_am335x_common.h | 1 + 2 files changed, 16 insertions(+)
board/ti/am335x/board.c +15 -0
@@ -602,6 +602,21 @@ int board_eth_init(bd_t *bis) }#ifdef CONFIG_DRIVER_TI_CPSW + + mac_lo =readl (&cdev->macid1l); + mac_hi =readl (&cdev->macid1h); + mac_addr[0 ] = mac_hi &0xFF ; + mac_addr[1 ] = (mac_hi &0xFF00 ) >>8 ; + mac_addr[2 ] = (mac_hi &0xFF0000 ) >>16 ; + mac_addr[3 ] = (mac_hi &0xFF000000 ) >>24 ; + mac_addr[4 ] = mac_lo &0xFF ; + mac_addr[5 ] = (mac_lo &0xFF00 ) >>8 ; + +if (!getenv ("eth1addr" )) { +if (is_valid_ether_addr (mac_addr)) +eth_setenv_enetaddr ("eth1addr" , mac_addr); + } +if (read_eeprom (&header) <0 )puts ("Could not get board ID.\n" );
include/configs/ti_am335x_common.h +1 -0
@@ -31,6 +31,7 @@/* Network defines. */ #define CONFIG_CMD_NET /* 'bootp' and 'tftp' */ #define CONFIG_CMD_DHCP +#define CONFIG_CMD_MII #define CONFIG_BOOTP_DNS /* Configurable parts of CMD_DHCP */ #define CONFIG_BOOTP_DNS2 #define CONFIG_BOOTP_SEND_HOSTNAME
Signature · 1 line
1.7.9.5
PATCH 4/10 ARM: AM335x: add support for reading cpsw 2nd mac address from efuse
Quoted 8 lines · Tom Rini
From: Mugunthan V N <[email protected]>
Adding support for reading cpsw 2nd mac address from efuse and pass it to kernel via dtb which will be used in dual emac mode of cpsw. Also adding mii command support to am335x common config.
Acked-by Tom Rini <[email protected]>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/20140304/899ab58c/attachment.pgp>
PATCH 5/10 ARM: DRA7xx: add support for reading cpsw 2nd mac from efuse
In reply to Tom RiniFrom: Mugunthan V N <[email protected]>
Adding support for reading cpsw 2nd mac address from efuse and pass it to kernel via dtb which will be used in dual emac mode of cpsw. Also correct the bit masking of mac id read from the efuse.
--- board/ti/dra7xx/evm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
board/ti/dra7xx/evm.c +15 -0
@@ -215,6 +215,21 @@ int board_eth_init(bd_t *bis)if (is_valid_ether_addr (mac_addr))eth_setenv_enetaddr ("ethaddr" , mac_addr); } + + mac_lo =readl ((*ctrl)->control_core_mac_id_1_lo); + mac_hi =readl ((*ctrl)->control_core_mac_id_1_hi); + mac_addr[0 ] = (mac_hi &0xFF0000 ) >>16 ; + mac_addr[1 ] = (mac_hi &0xFF00 ) >>8 ; + mac_addr[2 ] = mac_hi &0xFF ; + mac_addr[3 ] = (mac_lo &0xFF0000 ) >>16 ; + mac_addr[4 ] = (mac_lo &0xFF00 ) >>8 ; + mac_addr[5 ] = mac_lo &0xFF ; + +if (!getenv ("eth1addr" )) { +if (is_valid_ether_addr (mac_addr)) +eth_setenv_enetaddr ("eth1addr" , mac_addr); + } + ctrl_val =readl ((*ctrl)->control_core_control_io1) & (~0x33 ); ctrl_val |=0x22 ;writel (ctrl_val, (*ctrl)->control_core_control_io1);
Signature · 1 line
1.7.9.5
PATCH 5/10 ARM: DRA7xx: add support for reading cpsw 2nd mac from efuse
Quoted 8 lines · Tom Rini
From: Mugunthan V N <[email protected]>
Adding support for reading cpsw 2nd mac address from efuse and pass it to kernel via dtb which will be used in dual emac mode of cpsw. Also correct the bit masking of mac id read from the efuse.
Acked-by Tom Rini <[email protected]>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/20140304/23601278/attachment.pgp>
PATCH 6/10 ARM: AM4372: Update EMIF registers for DDR3
In reply to Tom RiniFrom: Lokesh Vutla <[email protected]>
Updating EMIF_PHY_CTRL and adding EMIF_READ_WRITE_EXECUTION_THRESHOLD registers.
In EMIF_PHY_CTRL:
Updating [4:0]READ_LATENCY to 8, because at higher frequencies like 400MHz the read latency expected will be CL+3 as per tests from HW folks.
Clearing [19]PHY_DIS_CALIB_RST bit as this is used onl for debug purpose. With out this resume is not working(Still waiting for PHY team to come back for better explanation).
--- board/ti/am43xx/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/ti/am43xx/board.c +1 -1
@@ -206,7 +206,7 @@ const struct emif_regs ddr3_emif_regs_400Mhz = { .read_idle_ctrl = 0x00050000, .zq_config = 0x50074BE4, .temp_alert_config = 0x0, - .emif_ddr_phy_ctlr_1 = 0x0E084008, + .emif_ddr_phy_ctlr_1 = 0x0E004008, .emif_ddr_ext_phy_ctrl_1 = 0x08020080, .emif_ddr_ext_phy_ctrl_2 = 0x00400040, .emif_ddr_ext_phy_ctrl_3 = 0x00400040,
Signature · 1 line
1.7.9.5
PATCH 6/10 ARM: AM4372: Update EMIF registers for DDR3
Quoted 12 lines · Tom Rini
From: Lokesh Vutla <[email protected]>
Updating
EMIF_PHY_CTRLand addingEMIF_READ_WRITE_EXECUTION_THRESHOLDregisters.
InEMIF_PHY_CTRL:
Updating [4:0]READ_LATENCY to 8, because at higher frequencies like 400MHz the read latency expected will be CL+3 as per tests from HW folks.
Clearing [19]PHY_DIS_CALIB_RST bit as this is used onl for debug purpose. With out this resume is not working(Still waiting for PHY team to come back for better explanation).
Quoted 1 line
Signed-off-by Lokesh Vutla <[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/20140304/b0670d58/attachment.pgp>
PATCH 7/10 ARM: AM43xx: Add Ethernet boot support to SPL
In reply to Tom RiniFrom: Mugunthan V N <[email protected]>
Add Ethernet Boot support to SPL
--- board/ti/am43xx/board.c | 2 -- include/configs/am43xx_evm.h | 10 ++++++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
board/ti/am43xx/board.c +0 -2
@@ -24,9 +24,7 @@DECLARE_GLOBAL_DATA_PTR ; -#ifndef CONFIG_SPL_BUILD static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE ; -#endif /* * Read header information from EEPROM into global structure.
include/configs/am43xx_evm.h +8 -2
@@ -175,6 +175,8 @@"run mmcboot;" \ "run usbboot;" +#endif +/* CPSW Ethernet */ #define CONFIG_CMD_NET #define CONFIG_CMD_DHCP
@@ -192,8 +194,12 @@#define CONFIG_NET_MULTI #define CONFIG_PHY_GIGE #define CONFIG_PHYLIB + +#define CONFIG_SPL_ENV_SUPPORT +#define CONFIG_SPL_NET_VCI_STRING "AM43xx U-Boot SPL" + +#define CONFIG_SPL_ETH_SUPPORT +#define CONFIG_SPL_NET_SUPPORT #define CONFIG_SYS_RX_ETH_BUFFER 64 -#define CONFIG_PHY_ADDR 16 -#endif #endif /* __CONFIG_AM43XX_EVM_H */
Signature · 1 line
1.7.9.5
PATCH 7/10 ARM: AM43xx: Add Ethernet boot support to SPL
Quoted 6 lines · Tom Rini
From: Mugunthan V N <[email protected]>
Add Ethernet Boot support to SPL
Acked-by Tom Rini <[email protected]>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/20140304/666a34fa/attachment.pgp>
PATCH 8/10 ARM: AM43xx: EMIF: configure self-refresh entry delay
In reply to Tom RiniFrom: Dave Gerlach <[email protected]>
Per a suggestion from the hardware team, program the emif_pwr_mgmt_ctrl and emif_pwr_mgmt_ctrl_shdw registers within the EMIF to hold the desired delay in cycles that the EMIF waits without an access to enter self-refresh, in this case 8192 cycles. With this, code desiring to enter self refresh only has to toggle one bit to enable it.
--- arch/arm/cpu/armv7/am33xx/ddr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/am33xx/ddr.c +2 -2
@@ -80,8 +80,8 @@ static void configure_mr(int nr, u32 cs)*/ void config_sdram_emif4d5 (const struct emif_regs *regs,int nr) { -writel (0x0 , &emif_reg[nr]->emif_pwr_mgmt_ctrl); -writel (0x0 , &emif_reg[nr]->emif_pwr_mgmt_ctrl_shdw); +writel (0xA0 , &emif_reg[nr]->emif_pwr_mgmt_ctrl); +writel (0xA0 , &emif_reg[nr]->emif_pwr_mgmt_ctrl_shdw);writel (0x1 , &emif_reg[nr]->emif_iodft_tlgc);writel (regs->zq_config, &emif_reg[nr]->emif_zq_config);
Signature · 1 line
1.7.9.5
PATCH 8/10 ARM: AM43xx: EMIF: configure self-refresh entry delay
Quoted 9 lines · Tom Rini
From: Dave Gerlach <[email protected]>
Per a suggestion from the hardware team, program the
emif_pwr_mgmt_ctrlandemif_pwr_mgmt_ctrl_shdwregisters within the EMIF to hold the desired delay in cycles that the EMIF waits without an access to enter self-refresh, in this case 8192 cycles. With this, code desiring to enter self refresh only has to toggle one bit to enable it.Signed-off-by Dave Gerlach <[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/20140304/243b28f1/attachment.pgp>
PATCH 9/10 ARM: AM43xx: Write sdram_config to secure_emif_sdram_config
In reply to Tom RiniFrom: Dave Gerlach <[email protected]>
The register secure_emif_sdram_config in control module is copied to the EMIF sdram_config register when it is coming out of DeepSleep0 in order to ensure that the EMIF comes up for the correct type of DDR. Without this, resume can hang from within the kernel.
--- arch/arm/cpu/armv7/am33xx/ddr.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/cpu/armv7/am33xx/ddr.c +1 -0
@@ -96,6 +96,7 @@ void config_sdram_emif4d5(const struct emif_regs *regs, int nr)writel (regs->ref_ctrl, &emif_reg[nr]->emif_sdram_ref_ctrl);writel (regs->sdram_config, &emif_reg[nr]->emif_sdram_config); +writel (regs->sdram_config, &cstat->secure_emif_sdram_config);if (emif_sdram_type () ==EMIF_SDRAM_TYPE_LPDDR2 ) {configure_mr (nr,0 );
Signature · 1 line
1.7.9.5
PATCH 9/10 ARM: AM43xx: Write sdram_config to secure_emif_sdram_config
Quoted 8 lines · Tom Rini
From: Dave Gerlach <[email protected]>
The register
secure_emif_sdram_configin control module is copied to the EMIFsdram_configregister when it is coming out of DeepSleep0 in order to ensure that the EMIF comes up for the correct type of DDR. Without this, resume can hang from within the kernel.Signed-off-by Dave Gerlach <[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/20140304/c8e548fe/attachment.pgp>
PATCH 10/10 ARM: AM43xx: Change DDR3 Reset Value
In reply to Tom RiniFrom: Dave Gerlach <[email protected]>
The bit DDR3_RST_DEF_VAL inside CTRL_DDR_IO represents the default value of the ddr reset value for DDR3 before the EMIF takes over. We must have this bit set high so that on exit from DeepSleep0 within the kernel the reset line has the proper value.
--- arch/arm/cpu/armv7/am33xx/emif4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv7/am33xx/emif4.c +1 -1
@@ -113,7 +113,7 @@ void config_ddr(unsigned int pll, const struct ctrl_ioregs *ioregs,writel (readl (&cm_device->cm_dll_ctrl) & ~0x1 , &cm_device->cm_dll_ctrl);while ((readl (&cm_device->cm_dll_ctrl) &&CM_DLL_READYST ) ==0 ) ; -writel (0x0 , &ddrctrl->ddrioctrl); +writel (0x80000000 , &ddrctrl->ddrioctrl);config_io_ctrl (ioregs);
Signature · 1 line
1.7.9.5
PATCH 10/10 ARM: AM43xx: Change DDR3 Reset Value
Quoted 8 lines · Tom Rini
From: Dave Gerlach <[email protected]>
The bit
DDR3_RST_DEF_VALinsideCTRL_DDR_IOrepresents the default value of the ddr reset value for DDR3 before the EMIF takes over. We must have this bit set high so that on exit from DeepSleep0 within the kernel the reset line has the proper value.Signed-off-by Dave Gerlach <[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/20140304/e1bbdcfe/attachment.pgp>
PATCH 1/10 drivers: net: cpsw: add support to have phy address from cpsw platform data
In reply to Tom RiniQuoted 11 lines · Tom Rini
From: Mugunthan V N <[email protected]>
Some platforms like AM437x have different EVMs with different phy addresses, so this patch adds support for passing phy address via cpsw plaform data. Also renamed
phy_idtophy_addrso better understanding of the code.Reviewed-by Felipe Balbi <[email protected]>Signed-off-by Mugunthan V N <[email protected]>[trini: Update BuR
am335x_igep0033pcm051_rev3pcm051_rev1cm_t335pengwyn boards]Signed-off-by Tom Rini <[email protected]>
Applied to u-boot-ti/master, thanks!
Hannes, can you check the BuR boards please? I'm fairly sure I did the conversion correctly here.
Signature · 1 line
Tom