nbhw18: fixed sgmii link between cpu and ethernet switch
This commit is contained in:
parent
275706a797
commit
ff74317890
|
|
@ -176,6 +176,16 @@ int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count)
|
|||
}
|
||||
}
|
||||
|
||||
/* TODO: Something with the SERDES polarity seems to be strange
|
||||
on NBHW18 V1. Why do we have to swap polarity for
|
||||
SERDES0 & SERDES1 to get the SGMII link to the ethernet
|
||||
switch working? */
|
||||
board_serdes_map[0].swap_rx = 1;
|
||||
board_serdes_map[0].swap_tx = 1;
|
||||
|
||||
board_serdes_map[1].swap_rx = 1;
|
||||
board_serdes_map[1].swap_tx = 1;
|
||||
|
||||
*serdes_map_array = board_serdes_map;
|
||||
*count = ARRAY_SIZE(board_serdes_map);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#define MVSWITCH_GLOBAL2_REG_CMD (0x18)
|
||||
#define MVSWITCH_GLOBAL2_REG_DATA (0x19)
|
||||
|
||||
/* Temporary FPGA defines -> To be repaced by proper definitions
|
||||
/* Temporary FPGA defines -> To be replaced by proper definitions
|
||||
as soon as we have the register definition for NBHW18 V2
|
||||
*/
|
||||
|
||||
|
|
@ -314,17 +314,21 @@ void configure_mvswitch(void)
|
|||
mvswitch_mdio_write(i, 0x04, 0x000f);
|
||||
}
|
||||
|
||||
/* Setup port based VLAN to forward only between CPU port and external ports,
|
||||
but not between external ports. */
|
||||
mvswitch_mdio_write(0x15, 0x06, 0x001F);
|
||||
for (i = 0x11; i <= 0x14; i++) {
|
||||
/* Enable forwarding & flooding of unknown addresses on all ethernet ports */
|
||||
mvswitch_mdio_write(i, 0x06, 0x0020);
|
||||
}
|
||||
|
||||
/* Enable phys */
|
||||
/* TODO: Indirect phy access was used here before -> Should probably no longer be
|
||||
necessary as all access es are indirect anyway in multi chip mode -> Verify it. */
|
||||
/* Indirect phy access is needed to access phys (even in multi chip mode) */
|
||||
for (i = 0x11; i <= 0x14; i++) {
|
||||
unsigned short smi_value;
|
||||
|
||||
/* Select phy page 0 */
|
||||
mvswitch_mdio_write_indirect(i , 0x16, 0x0000);
|
||||
|
||||
if (mvswitch_mdio_read_indirect(i, 0x00, &smi_value) < 0)
|
||||
continue;
|
||||
smi_value &= ~0x0800;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
"eth1addr=00:11:22:33:44:55\0" \
|
||||
"eth2addr=00:11:22:33:44:56\0" \
|
||||
"eth3addr=00:11:22:33:44:57\0" \
|
||||
"ethact=ethernet@70000\0" \
|
||||
"ethact=ethernet@34000\0" \
|
||||
"add_sd_bootargs=setenv bootargs $bootargs root=/dev/mmcblk0p$root_part rootfstype=ext4 console=$consoledev,115200 rootwait loglevel=4\0" \
|
||||
"add_version_bootargs=setenv bootargs $bootargs\0" \
|
||||
"fdt_skip_update=yes\0" \
|
||||
|
|
|
|||
Loading…
Reference in New Issue