diff options
author | Chris Packham | 2018-06-03 16:21:27 +1200 |
---|---|---|
committer | Stefan Roese | 2018-06-05 07:29:09 +0200 |
commit | 54e3316ffa46bd81e55216cd5aa5f087e9de9f8f (patch) | |
tree | d877199099dd837553dc8676931ee05eb2a7fb4e | |
parent | 87a62bce28a61199f7e51a39ec7f441af5a313cc (diff) |
ARM: kirkwood: SBx81LIFKW: Enable network hardware
The SBx81LIFKW boards connect to the internal chassis management network
via a Marvell 88e6097 L2 switch. The chassis connections are direct
serdes on ports 8 and 9 with a RGMII interface on port 10 connected to
the CPU MAC.
For debugging purposes ports 0 and 1 are also taken out to headers on
the board. Because the debug interfaces are sometimes connected to with
straight ribbon cables we need to run them at 10Mbps.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
-rw-r--r-- | board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c | 14 | ||||
-rw-r--r-- | configs/SBx81LIFKW_defconfig | 6 | ||||
-rw-r--r-- | include/configs/SBx81LIFKW.h | 5 |
3 files changed, 18 insertions, 7 deletions
diff --git a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c index 3cacdc83723..e58bbf07ef1 100644 --- a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c +++ b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c @@ -164,16 +164,26 @@ int board_init(void) return 0; } -#ifdef CONFIG_MV88E61XX_SWITCH -/* Configure and enable Switch and PHY */ +#ifdef CONFIG_RESET_PHY_R +/* automatically defined by kirkwood config.h */ void reset_phy(void) { +} +#endif + +#ifdef CONFIG_MV88E61XX_SWITCH +int mv88e61xx_hw_reset(struct phy_device *phydev) +{ /* Ensure the 88e6097 gets at least 10ms Reset */ kw_gpio_set_value(MV88E6097_RESET, 0); mdelay(20); kw_gpio_set_value(MV88E6097_RESET, 1); mdelay(20); + + phydev->advertising = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full; + + return 0; } #endif diff --git a/configs/SBx81LIFKW_defconfig b/configs/SBx81LIFKW_defconfig index ec9df1ac691..348f861a143 100644 --- a/configs/SBx81LIFKW_defconfig +++ b/configs/SBx81LIFKW_defconfig @@ -14,6 +14,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_SF=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_NTPSERVER=y +CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_SNTP=y CONFIG_OF_CONTROL=y @@ -29,5 +30,10 @@ CONFIG_I2C_MUX_PCA954x=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set +CONFIG_PHYLIB=y +CONFIG_MV88E61XX_SWITCH=y +CONFIG_MV88E61XX_CPU_PORT=10 +CONFIG_MV88E61XX_PHY_PORTS=0x003 +CONFIG_MV88E61XX_FIXED_PORTS=0x300 CONFIG_SPI=y CONFIG_KIRKWOOD_SPI=y diff --git a/include/configs/SBx81LIFKW.h b/include/configs/SBx81LIFKW.h index 756eaa47fa9..bcc2c201d22 100644 --- a/include/configs/SBx81LIFKW.h +++ b/include/configs/SBx81LIFKW.h @@ -103,15 +103,10 @@ #define CONFIG_NETCONSOLE /* include NetConsole support */ #define CONFIG_NET_MULTI /* specify more that one ports available */ #define CONFIG_MII /* expose smi over miiphy interface */ -#define CONFIG_PHYLIB #define CONFIG_MVGBE /* Enable kirkwood Gbe Controller Driver */ #define CONFIG_MVGBE_PORTS {1, 0} /* enable a single port */ #define CONFIG_PHY_BASE_ADR 0x01 #define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */ -#define CONFIG_RESET_PHY_R /* use reset_phy() to init switch */ -#define CONFIG_MV88E61XX_SWITCH /* Enable MV88E61XX switch driver */ -#define CONFIG_MV88E61XX_PHY_PORTS 0x303 /* Pt0,1,8,9 */ -#define CONFIG_MV88E61XX_CPU_PORT 10 /* 10(CPU) */ #endif /* CONFIG_CMD_NET */ /* |