From: Vignesh R Date: Tue, 10 Mar 2015 20:41:23 +0530 Subject: [U-Boot] [U-Boot PATCH 3/3] ARM: DRA7-EVM: switch cpsw to use slave0 In-Reply-To: <1426000283-21818-1-git-send-email-vigneshr@ti.com> References: <1426000283-21818-1-git-send-email-vigneshr@ti.com> Message-ID: <1426000283-21818-4-git-send-email-vigneshr@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On DRA72 EVM cpsw slave1 is muxed with VIN, therefore switch cpsw to use slave0 using pcf driver. DRA72 has only one cpsw phy(phy#3). Hence, set phy_id to 3 for slave0, in case of DRA72 EVM. Signed-off-by: Vignesh R --- board/ti/dra7xx/evm.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 65222419ebbd..cc391cb0a065 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "mux_data.h" @@ -31,6 +32,10 @@ DECLARE_GLOBAL_DATA_PTR; /* GPIO 7_11 */ #define GPIO_DDR_VTT_EN 203 +/* pcf chip address enet_mux_s0 */ +#define PCF_ENET_MUX_ADDR 0x21 +#define PCF_SEL_ENET_MUX_S0 4 + const struct omap_sysinfo sysinfo = { "Board: DRA7xx\n" }; @@ -254,8 +259,12 @@ 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; + if (*omap_si_rev == DRA722_ES1_0) { + cpsw_data.active_slave = 0; + cpsw_data.slave_data[0].phy_addr = 3; + pcf8575_output(PCF_ENET_MUX_ADDR, PCF_SEL_ENET_MUX_S0, + PCF8575_OUT_LOW); + } ret = cpsw_register(&cpsw_data); if (ret < 0) -- 1.9.1