Lines Matching refs:grf
82 struct regmap *grf; member
108 if (IS_ERR(bsp_priv->grf)) { in px30_set_to_rmii()
113 regmap_write(bsp_priv->grf, PX30_GRF_GMAC_CON1, in px30_set_to_rmii()
129 regmap_write(bsp_priv->grf, PX30_GRF_GMAC_CON1, in px30_set_rmii_speed()
137 regmap_write(bsp_priv->grf, PX30_GRF_GMAC_CON1, in px30_set_rmii_speed()
188 if (IS_ERR(bsp_priv->grf)) { in rk3128_set_to_rgmii()
193 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_to_rgmii()
196 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON0, in rk3128_set_to_rgmii()
206 if (IS_ERR(bsp_priv->grf)) { in rk3128_set_to_rmii()
211 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_to_rmii()
219 if (IS_ERR(bsp_priv->grf)) { in rk3128_set_rgmii_speed()
225 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_rgmii_speed()
228 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_rgmii_speed()
231 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_rgmii_speed()
241 if (IS_ERR(bsp_priv->grf)) { in rk3128_set_rmii_speed()
247 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_rmii_speed()
251 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_rmii_speed()
304 if (IS_ERR(bsp_priv->grf)) { in rk3228_set_to_rgmii()
309 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_to_rgmii()
314 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON0, in rk3228_set_to_rgmii()
323 if (IS_ERR(bsp_priv->grf)) { in rk3228_set_to_rmii()
328 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_to_rmii()
333 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, GRF_BIT(11)); in rk3228_set_to_rmii()
340 if (IS_ERR(bsp_priv->grf)) { in rk3228_set_rgmii_speed()
346 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_rgmii_speed()
349 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_rgmii_speed()
352 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_rgmii_speed()
362 if (IS_ERR(bsp_priv->grf)) { in rk3228_set_rmii_speed()
368 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_rmii_speed()
372 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_rmii_speed()
381 regmap_write(priv->grf, RK3228_GRF_CON_MUX, in rk3228_integrated_phy_powerup()
426 if (IS_ERR(bsp_priv->grf)) { in rk3288_set_to_rgmii()
431 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_to_rgmii()
434 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON3, in rk3288_set_to_rgmii()
444 if (IS_ERR(bsp_priv->grf)) { in rk3288_set_to_rmii()
449 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_to_rmii()
457 if (IS_ERR(bsp_priv->grf)) { in rk3288_set_rgmii_speed()
463 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_rgmii_speed()
466 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_rgmii_speed()
469 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_rgmii_speed()
479 if (IS_ERR(bsp_priv->grf)) { in rk3288_set_rmii_speed()
485 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_rmii_speed()
489 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_rmii_speed()
518 if (IS_ERR(bsp_priv->grf)) { in rk3308_set_to_rmii()
523 regmap_write(bsp_priv->grf, RK3308_GRF_MAC_CON0, in rk3308_set_to_rmii()
531 if (IS_ERR(bsp_priv->grf)) { in rk3308_set_rmii_speed()
537 regmap_write(bsp_priv->grf, RK3308_GRF_MAC_CON0, in rk3308_set_rmii_speed()
540 regmap_write(bsp_priv->grf, RK3308_GRF_MAC_CON0, in rk3308_set_rmii_speed()
590 if (IS_ERR(bsp_priv->grf)) { in rk3328_set_to_rgmii()
595 regmap_write(bsp_priv->grf, RK3328_GRF_MAC_CON1, in rk3328_set_to_rgmii()
601 regmap_write(bsp_priv->grf, RK3328_GRF_MAC_CON0, in rk3328_set_to_rgmii()
611 if (IS_ERR(bsp_priv->grf)) { in rk3328_set_to_rmii()
619 regmap_write(bsp_priv->grf, reg, in rk3328_set_to_rmii()
628 if (IS_ERR(bsp_priv->grf)) { in rk3328_set_rgmii_speed()
634 regmap_write(bsp_priv->grf, RK3328_GRF_MAC_CON1, in rk3328_set_rgmii_speed()
637 regmap_write(bsp_priv->grf, RK3328_GRF_MAC_CON1, in rk3328_set_rgmii_speed()
640 regmap_write(bsp_priv->grf, RK3328_GRF_MAC_CON1, in rk3328_set_rgmii_speed()
651 if (IS_ERR(bsp_priv->grf)) { in rk3328_set_rmii_speed()
660 regmap_write(bsp_priv->grf, reg, in rk3328_set_rmii_speed()
664 regmap_write(bsp_priv->grf, reg, in rk3328_set_rmii_speed()
673 regmap_write(priv->grf, RK3328_GRF_MACPHY_CON1, in rk3328_integrated_phy_powerup()
718 if (IS_ERR(bsp_priv->grf)) { in rk3366_set_to_rgmii()
723 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_to_rgmii()
726 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON7, in rk3366_set_to_rgmii()
736 if (IS_ERR(bsp_priv->grf)) { in rk3366_set_to_rmii()
741 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_to_rmii()
749 if (IS_ERR(bsp_priv->grf)) { in rk3366_set_rgmii_speed()
755 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_rgmii_speed()
758 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_rgmii_speed()
761 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_rgmii_speed()
771 if (IS_ERR(bsp_priv->grf)) { in rk3366_set_rmii_speed()
777 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_rmii_speed()
781 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_rmii_speed()
829 if (IS_ERR(bsp_priv->grf)) { in rk3368_set_to_rgmii()
834 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_to_rgmii()
837 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON16, in rk3368_set_to_rgmii()
847 if (IS_ERR(bsp_priv->grf)) { in rk3368_set_to_rmii()
852 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_to_rmii()
860 if (IS_ERR(bsp_priv->grf)) { in rk3368_set_rgmii_speed()
866 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_rgmii_speed()
869 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_rgmii_speed()
872 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_rgmii_speed()
882 if (IS_ERR(bsp_priv->grf)) { in rk3368_set_rmii_speed()
888 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_rmii_speed()
892 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_rmii_speed()
940 if (IS_ERR(bsp_priv->grf)) { in rk3399_set_to_rgmii()
945 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_to_rgmii()
948 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON6, in rk3399_set_to_rgmii()
958 if (IS_ERR(bsp_priv->grf)) { in rk3399_set_to_rmii()
963 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_to_rmii()
971 if (IS_ERR(bsp_priv->grf)) { in rk3399_set_rgmii_speed()
977 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_rgmii_speed()
980 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_rgmii_speed()
983 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_rgmii_speed()
993 if (IS_ERR(bsp_priv->grf)) { in rk3399_set_rmii_speed()
999 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_rmii_speed()
1003 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_rmii_speed()
1045 if (IS_ERR(bsp_priv->grf)) { in rk3568_set_to_rgmii()
1055 regmap_write(bsp_priv->grf, con0, in rk3568_set_to_rgmii()
1059 regmap_write(bsp_priv->grf, con1, in rk3568_set_to_rgmii()
1070 if (IS_ERR(bsp_priv->grf)) { in rk3568_set_to_rmii()
1077 regmap_write(bsp_priv->grf, con1, RK3568_GMAC_PHY_INTF_SEL_RMII); in rk3568_set_to_rmii()
1168 if (IS_ERR(bsp_priv->grf) || IS_ERR(bsp_priv->php_grf)) { in rk3588_set_to_rgmii()
1182 regmap_write(bsp_priv->grf, RK3588_GRF_GMAC_CON7, in rk3588_set_to_rgmii()
1186 regmap_write(bsp_priv->grf, offset_con, in rk3588_set_to_rgmii()
1284 if (IS_ERR(bsp_priv->grf)) { in rv1108_set_to_rmii()
1289 regmap_write(bsp_priv->grf, RV1108_GRF_GMAC_CON0, in rv1108_set_to_rmii()
1297 if (IS_ERR(bsp_priv->grf)) { in rv1108_set_rmii_speed()
1303 regmap_write(bsp_priv->grf, RV1108_GRF_GMAC_CON0, in rv1108_set_rmii_speed()
1307 regmap_write(bsp_priv->grf, RV1108_GRF_GMAC_CON0, in rv1108_set_rmii_speed()
1352 if (IS_ERR(bsp_priv->grf)) { in rv1126_set_to_rgmii()
1357 regmap_write(bsp_priv->grf, RV1126_GRF_GMAC_CON0, in rv1126_set_to_rgmii()
1364 regmap_write(bsp_priv->grf, RV1126_GRF_GMAC_CON1, in rv1126_set_to_rgmii()
1368 regmap_write(bsp_priv->grf, RV1126_GRF_GMAC_CON2, in rv1126_set_to_rgmii()
1377 if (IS_ERR(bsp_priv->grf)) { in rv1126_set_to_rmii()
1382 regmap_write(bsp_priv->grf, RV1126_GRF_GMAC_CON0, in rv1126_set_to_rmii()
1463 regmap_write(priv->grf, RK_GRF_MACPHY_CON0, RK_MACPHY_CFG_CLK_50M); in rk_gmac_integrated_phy_powerup()
1464 regmap_write(priv->grf, RK_GRF_MACPHY_CON0, RK_GMAC2PHY_RMII_MODE); in rk_gmac_integrated_phy_powerup()
1466 regmap_write(priv->grf, RK_GRF_MACPHY_CON2, RK_GRF_CON2_MACPHY_ID); in rk_gmac_integrated_phy_powerup()
1467 regmap_write(priv->grf, RK_GRF_MACPHY_CON3, RK_GRF_CON3_MACPHY_ID); in rk_gmac_integrated_phy_powerup()
1471 regmap_write(priv->grf, RK_GRF_MACPHY_CON0, RK_MACPHY_DISABLE); in rk_gmac_integrated_phy_powerup()
1478 regmap_write(priv->grf, RK_GRF_MACPHY_CON0, RK_MACPHY_ENABLE); in rk_gmac_integrated_phy_powerup()
1485 regmap_write(priv->grf, RK_GRF_MACPHY_CON0, RK_MACPHY_DISABLE); in rk_gmac_integrated_phy_powerdown()
1678 bsp_priv->grf = syscon_regmap_lookup_by_phandle(dev->of_node, in rk_gmac_setup()