diff options
author | Jonas Gorski <jonas.gorski@gmail.com> | 2016-09-24 21:00:14 +0200 |
---|---|---|
committer | Jonas Gorski <jonas.gorski@gmail.com> | 2016-09-26 13:04:04 +0200 |
commit | 167763837bc4df4d6561e3d1cda86978f0882fc7 (patch) | |
tree | d0c396b54464cbdbc522d2f3db2c417f01d439d7 /target/linux/generic/files/drivers/net/phy/mvsw61xx.h | |
parent | 92dcaecee3ee1d05aa2c174fe7b159fcb4d97726 (diff) | |
download | upstream-167763837bc4df4d6561e3d1cda86978f0882fc7.tar.gz upstream-167763837bc4df4d6561e3d1cda86978f0882fc7.tar.bz2 upstream-167763837bc4df4d6561e3d1cda86978f0882fc7.zip |
mvsw61xx: enable SerDes on 6176 if required
If the cpu port is connected through SGMII we need to enable SerDes for
it to work.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Acked-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/mvsw61xx.h')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/mvsw61xx.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/mvsw61xx.h b/target/linux/generic/files/drivers/net/phy/mvsw61xx.h index 64db6d3aab..1c45189689 100644 --- a/target/linux/generic/files/drivers/net/phy/mvsw61xx.h +++ b/target/linux/generic/files/drivers/net/phy/mvsw61xx.h @@ -49,6 +49,14 @@ enum { }; enum { + MV_PORT_STATUS_CMODE_100BASE_X = 0x8, + MV_PORT_STATUS_CMODE_1000BASE_X = 0x9, + MV_PORT_STATUS_CMODE_SGMII = 0xa, +}; + +#define MV_PORT_STATUS_CMODE_MASK 0xf + +enum { MV_PORT_STATUS_SPEED_10 = 0x00, MV_PORT_STATUS_SPEED_100 = 0x01, MV_PORT_STATUS_SPEED_1000 = 0x02, @@ -239,6 +247,11 @@ enum { MV_SPEC_DOWNSHIFT_COUNTER = (0x3 << 12), }; +#define MII_MV_PAGE 22 + +#define MV_REG_FIBER_SERDES 0xf +#define MV_PAGE_FIBER_SERDES 0x1 + struct mvsw61xx_state { struct switch_dev dev; struct mii_bus *bus; |