Lines Matching refs:ss
16 int mtk_sgmii_init(struct mtk_sgmii *ss, struct device_node *r, u32 ana_rgc3) in mtk_sgmii_init() argument
21 ss->ana_rgc3 = ana_rgc3; in mtk_sgmii_init()
28 ss->regmap[i] = syscon_node_to_regmap(np); in mtk_sgmii_init()
29 if (IS_ERR(ss->regmap[i])) in mtk_sgmii_init()
30 return PTR_ERR(ss->regmap[i]); in mtk_sgmii_init()
36 int mtk_sgmii_setup_mode_an(struct mtk_sgmii *ss, int id) in mtk_sgmii_setup_mode_an() argument
40 if (!ss->regmap[id]) in mtk_sgmii_setup_mode_an()
44 regmap_write(ss->regmap[id], SGMSYS_PCS_LINK_TIMER, in mtk_sgmii_setup_mode_an()
47 regmap_read(ss->regmap[id], SGMSYS_SGMII_MODE, &val); in mtk_sgmii_setup_mode_an()
49 regmap_write(ss->regmap[id], SGMSYS_SGMII_MODE, val); in mtk_sgmii_setup_mode_an()
51 regmap_read(ss->regmap[id], SGMSYS_PCS_CONTROL_1, &val); in mtk_sgmii_setup_mode_an()
53 regmap_write(ss->regmap[id], SGMSYS_PCS_CONTROL_1, val); in mtk_sgmii_setup_mode_an()
55 regmap_read(ss->regmap[id], SGMSYS_QPHY_PWR_STATE_CTRL, &val); in mtk_sgmii_setup_mode_an()
57 regmap_write(ss->regmap[id], SGMSYS_QPHY_PWR_STATE_CTRL, val); in mtk_sgmii_setup_mode_an()
62 int mtk_sgmii_setup_mode_force(struct mtk_sgmii *ss, int id, in mtk_sgmii_setup_mode_force() argument
67 if (!ss->regmap[id]) in mtk_sgmii_setup_mode_force()
70 regmap_read(ss->regmap[id], ss->ana_rgc3, &val); in mtk_sgmii_setup_mode_force()
74 regmap_write(ss->regmap[id], ss->ana_rgc3, val); in mtk_sgmii_setup_mode_force()
77 regmap_read(ss->regmap[id], SGMSYS_PCS_CONTROL_1, &val); in mtk_sgmii_setup_mode_force()
79 regmap_write(ss->regmap[id], SGMSYS_PCS_CONTROL_1, val); in mtk_sgmii_setup_mode_force()
82 regmap_read(ss->regmap[id], SGMSYS_SGMII_MODE, &val); in mtk_sgmii_setup_mode_force()
101 regmap_write(ss->regmap[id], SGMSYS_SGMII_MODE, val); in mtk_sgmii_setup_mode_force()
104 regmap_read(ss->regmap[id], SGMSYS_QPHY_PWR_STATE_CTRL, &val); in mtk_sgmii_setup_mode_force()
106 regmap_write(ss->regmap[id], SGMSYS_QPHY_PWR_STATE_CTRL, val); in mtk_sgmii_setup_mode_force()
113 struct mtk_sgmii *ss = eth->sgmii; in mtk_sgmii_restart_an() local
120 if (!ss->regmap[sid]) in mtk_sgmii_restart_an()
123 regmap_read(ss->regmap[sid], SGMSYS_PCS_CONTROL_1, &val); in mtk_sgmii_restart_an()
125 regmap_write(ss->regmap[sid], SGMSYS_PCS_CONTROL_1, val); in mtk_sgmii_restart_an()