mvsw61xx: enable SerDes on 6176 if required
[openwrt/openwrt.git] / target / linux / generic / files / drivers / net / phy / mvsw61xx.h
index 64db6d3aab47cbfba4687abddc00a6bab6a4fa5c..1c451896895ccc37bcefcf7c03c7e275b8610945 100644 (file)
@@ -48,6 +48,14 @@ enum {
        MV_PORT_STATUS_LINK             = (1 << 11),
 };
 
+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,
@@ -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;