Lines Matching full:grf

80 	struct regmap *grf;  member
106 if (IS_ERR(bsp_priv->grf)) { in px30_set_to_rmii()
107 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in px30_set_to_rmii()
111 regmap_write(bsp_priv->grf, PX30_GRF_GMAC_CON1, in px30_set_to_rmii()
127 regmap_write(bsp_priv->grf, PX30_GRF_GMAC_CON1, in px30_set_rmii_speed()
135 regmap_write(bsp_priv->grf, PX30_GRF_GMAC_CON1, in px30_set_rmii_speed()
186 if (IS_ERR(bsp_priv->grf)) { in rk3128_set_to_rgmii()
187 dev_err(dev, "Missing rockchip,grf property\n"); in rk3128_set_to_rgmii()
191 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_to_rgmii()
194 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON0, in rk3128_set_to_rgmii()
204 if (IS_ERR(bsp_priv->grf)) { in rk3128_set_to_rmii()
205 dev_err(dev, "Missing rockchip,grf property\n"); in rk3128_set_to_rmii()
209 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_to_rmii()
217 if (IS_ERR(bsp_priv->grf)) { in rk3128_set_rgmii_speed()
218 dev_err(dev, "Missing rockchip,grf property\n"); in rk3128_set_rgmii_speed()
223 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_rgmii_speed()
226 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_rgmii_speed()
229 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_rgmii_speed()
239 if (IS_ERR(bsp_priv->grf)) { in rk3128_set_rmii_speed()
240 dev_err(dev, "Missing rockchip,grf property\n"); in rk3128_set_rmii_speed()
245 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_rmii_speed()
249 regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1, in rk3128_set_rmii_speed()
302 if (IS_ERR(bsp_priv->grf)) { in rk3228_set_to_rgmii()
303 dev_err(dev, "Missing rockchip,grf property\n"); in rk3228_set_to_rgmii()
307 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_to_rgmii()
312 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON0, in rk3228_set_to_rgmii()
321 if (IS_ERR(bsp_priv->grf)) { in rk3228_set_to_rmii()
322 dev_err(dev, "Missing rockchip,grf property\n"); in rk3228_set_to_rmii()
326 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_to_rmii()
331 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, GRF_BIT(11)); in rk3228_set_to_rmii()
338 if (IS_ERR(bsp_priv->grf)) { in rk3228_set_rgmii_speed()
339 dev_err(dev, "Missing rockchip,grf property\n"); in rk3228_set_rgmii_speed()
344 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_rgmii_speed()
347 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_rgmii_speed()
350 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_rgmii_speed()
360 if (IS_ERR(bsp_priv->grf)) { in rk3228_set_rmii_speed()
361 dev_err(dev, "Missing rockchip,grf property\n"); in rk3228_set_rmii_speed()
366 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_rmii_speed()
370 regmap_write(bsp_priv->grf, RK3228_GRF_MAC_CON1, in rk3228_set_rmii_speed()
379 regmap_write(priv->grf, RK3228_GRF_CON_MUX, in rk3228_integrated_phy_powerup()
424 if (IS_ERR(bsp_priv->grf)) { in rk3288_set_to_rgmii()
425 dev_err(dev, "Missing rockchip,grf property\n"); in rk3288_set_to_rgmii()
429 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_to_rgmii()
432 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON3, in rk3288_set_to_rgmii()
442 if (IS_ERR(bsp_priv->grf)) { in rk3288_set_to_rmii()
443 dev_err(dev, "Missing rockchip,grf property\n"); in rk3288_set_to_rmii()
447 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_to_rmii()
455 if (IS_ERR(bsp_priv->grf)) { in rk3288_set_rgmii_speed()
456 dev_err(dev, "Missing rockchip,grf property\n"); in rk3288_set_rgmii_speed()
461 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_rgmii_speed()
464 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_rgmii_speed()
467 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_rgmii_speed()
477 if (IS_ERR(bsp_priv->grf)) { in rk3288_set_rmii_speed()
478 dev_err(dev, "Missing rockchip,grf property\n"); in rk3288_set_rmii_speed()
483 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_rmii_speed()
487 regmap_write(bsp_priv->grf, RK3288_GRF_SOC_CON1, in rk3288_set_rmii_speed()
516 if (IS_ERR(bsp_priv->grf)) { in rk3308_set_to_rmii()
517 dev_err(dev, "Missing rockchip,grf property\n"); in rk3308_set_to_rmii()
521 regmap_write(bsp_priv->grf, RK3308_GRF_MAC_CON0, in rk3308_set_to_rmii()
529 if (IS_ERR(bsp_priv->grf)) { in rk3308_set_rmii_speed()
530 dev_err(dev, "Missing rockchip,grf property\n"); in rk3308_set_rmii_speed()
535 regmap_write(bsp_priv->grf, RK3308_GRF_MAC_CON0, in rk3308_set_rmii_speed()
538 regmap_write(bsp_priv->grf, RK3308_GRF_MAC_CON0, in rk3308_set_rmii_speed()
588 if (IS_ERR(bsp_priv->grf)) { in rk3328_set_to_rgmii()
589 dev_err(dev, "Missing rockchip,grf property\n"); in rk3328_set_to_rgmii()
593 regmap_write(bsp_priv->grf, RK3328_GRF_MAC_CON1, in rk3328_set_to_rgmii()
599 regmap_write(bsp_priv->grf, RK3328_GRF_MAC_CON0, in rk3328_set_to_rgmii()
609 if (IS_ERR(bsp_priv->grf)) { in rk3328_set_to_rmii()
610 dev_err(dev, "Missing rockchip,grf property\n"); in rk3328_set_to_rmii()
617 regmap_write(bsp_priv->grf, reg, in rk3328_set_to_rmii()
626 if (IS_ERR(bsp_priv->grf)) { in rk3328_set_rgmii_speed()
627 dev_err(dev, "Missing rockchip,grf property\n"); in rk3328_set_rgmii_speed()
632 regmap_write(bsp_priv->grf, RK3328_GRF_MAC_CON1, in rk3328_set_rgmii_speed()
635 regmap_write(bsp_priv->grf, RK3328_GRF_MAC_CON1, in rk3328_set_rgmii_speed()
638 regmap_write(bsp_priv->grf, RK3328_GRF_MAC_CON1, in rk3328_set_rgmii_speed()
649 if (IS_ERR(bsp_priv->grf)) { in rk3328_set_rmii_speed()
650 dev_err(dev, "Missing rockchip,grf property\n"); in rk3328_set_rmii_speed()
658 regmap_write(bsp_priv->grf, reg, in rk3328_set_rmii_speed()
662 regmap_write(bsp_priv->grf, reg, in rk3328_set_rmii_speed()
671 regmap_write(priv->grf, RK3328_GRF_MACPHY_CON1, in rk3328_integrated_phy_powerup()
716 if (IS_ERR(bsp_priv->grf)) { in rk3366_set_to_rgmii()
717 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3366_set_to_rgmii()
721 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_to_rgmii()
724 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON7, in rk3366_set_to_rgmii()
734 if (IS_ERR(bsp_priv->grf)) { in rk3366_set_to_rmii()
735 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3366_set_to_rmii()
739 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_to_rmii()
747 if (IS_ERR(bsp_priv->grf)) { in rk3366_set_rgmii_speed()
748 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3366_set_rgmii_speed()
753 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_rgmii_speed()
756 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_rgmii_speed()
759 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_rgmii_speed()
769 if (IS_ERR(bsp_priv->grf)) { in rk3366_set_rmii_speed()
770 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3366_set_rmii_speed()
775 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_rmii_speed()
779 regmap_write(bsp_priv->grf, RK3366_GRF_SOC_CON6, in rk3366_set_rmii_speed()
827 if (IS_ERR(bsp_priv->grf)) { in rk3368_set_to_rgmii()
828 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3368_set_to_rgmii()
832 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_to_rgmii()
835 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON16, in rk3368_set_to_rgmii()
845 if (IS_ERR(bsp_priv->grf)) { in rk3368_set_to_rmii()
846 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3368_set_to_rmii()
850 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_to_rmii()
858 if (IS_ERR(bsp_priv->grf)) { in rk3368_set_rgmii_speed()
859 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3368_set_rgmii_speed()
864 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_rgmii_speed()
867 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_rgmii_speed()
870 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_rgmii_speed()
880 if (IS_ERR(bsp_priv->grf)) { in rk3368_set_rmii_speed()
881 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3368_set_rmii_speed()
886 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_rmii_speed()
890 regmap_write(bsp_priv->grf, RK3368_GRF_SOC_CON15, in rk3368_set_rmii_speed()
938 if (IS_ERR(bsp_priv->grf)) { in rk3399_set_to_rgmii()
939 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3399_set_to_rgmii()
943 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_to_rgmii()
946 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON6, in rk3399_set_to_rgmii()
956 if (IS_ERR(bsp_priv->grf)) { in rk3399_set_to_rmii()
957 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3399_set_to_rmii()
961 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_to_rmii()
969 if (IS_ERR(bsp_priv->grf)) { in rk3399_set_rgmii_speed()
970 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3399_set_rgmii_speed()
975 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_rgmii_speed()
978 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_rgmii_speed()
981 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_rgmii_speed()
991 if (IS_ERR(bsp_priv->grf)) { in rk3399_set_rmii_speed()
992 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3399_set_rmii_speed()
997 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_rmii_speed()
1001 regmap_write(bsp_priv->grf, RK3399_GRF_SOC_CON5, in rk3399_set_rmii_speed()
1043 if (IS_ERR(bsp_priv->grf)) { in rk3568_set_to_rgmii()
1044 dev_err(dev, "Missing rockchip,grf property\n"); in rk3568_set_to_rgmii()
1053 regmap_write(bsp_priv->grf, con0, in rk3568_set_to_rgmii()
1057 regmap_write(bsp_priv->grf, con1, in rk3568_set_to_rgmii()
1068 if (IS_ERR(bsp_priv->grf)) { in rk3568_set_to_rmii()
1069 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3568_set_to_rmii()
1075 regmap_write(bsp_priv->grf, con1, RK3568_GMAC_PHY_INTF_SEL_RMII); in rk3568_set_to_rmii()
1162 if (IS_ERR(bsp_priv->grf) || IS_ERR(bsp_priv->php_grf)) { in rk3576_set_to_rgmii()
1163 dev_err(dev, "Missing rockchip,grf or rockchip,php-grf property\n"); in rk3576_set_to_rgmii()
1170 regmap_write(bsp_priv->grf, offset_con, RK3576_GMAC_RGMII_MODE); in rk3576_set_to_rgmii()
1195 if (IS_ERR(bsp_priv->grf)) { in rk3576_set_to_rmii()
1196 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rk3576_set_to_rmii()
1203 regmap_write(bsp_priv->grf, offset_con, RK3576_GMAC_RMII_MODE); in rk3576_set_to_rmii()
1237 regmap_write(bsp_priv->grf, offset_con, val); in rk3576_set_gmac_speed()
1257 regmap_write(bsp_priv->grf, offset_con, val); in rk3576_set_clock_selection()
1321 if (IS_ERR(bsp_priv->grf) || IS_ERR(bsp_priv->php_grf)) { in rk3588_set_to_rgmii()
1322 dev_err(dev, "Missing rockchip,grf or rockchip,php_grf property\n"); in rk3588_set_to_rgmii()
1335 regmap_write(bsp_priv->grf, RK3588_GRF_GMAC_CON7, in rk3588_set_to_rgmii()
1339 regmap_write(bsp_priv->grf, offset_con, in rk3588_set_to_rgmii()
1437 if (IS_ERR(bsp_priv->grf)) { in rv1108_set_to_rmii()
1438 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rv1108_set_to_rmii()
1442 regmap_write(bsp_priv->grf, RV1108_GRF_GMAC_CON0, in rv1108_set_to_rmii()
1450 if (IS_ERR(bsp_priv->grf)) { in rv1108_set_rmii_speed()
1451 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rv1108_set_rmii_speed()
1456 regmap_write(bsp_priv->grf, RV1108_GRF_GMAC_CON0, in rv1108_set_rmii_speed()
1460 regmap_write(bsp_priv->grf, RV1108_GRF_GMAC_CON0, in rv1108_set_rmii_speed()
1505 if (IS_ERR(bsp_priv->grf)) { in rv1126_set_to_rgmii()
1506 dev_err(dev, "Missing rockchip,grf property\n"); in rv1126_set_to_rgmii()
1510 regmap_write(bsp_priv->grf, RV1126_GRF_GMAC_CON0, in rv1126_set_to_rgmii()
1517 regmap_write(bsp_priv->grf, RV1126_GRF_GMAC_CON1, in rv1126_set_to_rgmii()
1521 regmap_write(bsp_priv->grf, RV1126_GRF_GMAC_CON2, in rv1126_set_to_rgmii()
1530 if (IS_ERR(bsp_priv->grf)) { in rv1126_set_to_rmii()
1531 dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); in rv1126_set_to_rmii()
1535 regmap_write(bsp_priv->grf, RV1126_GRF_GMAC_CON0, in rv1126_set_to_rmii()
1616 regmap_write(priv->grf, RK_GRF_MACPHY_CON0, RK_MACPHY_CFG_CLK_50M); in rk_gmac_integrated_phy_powerup()
1617 regmap_write(priv->grf, RK_GRF_MACPHY_CON0, RK_GMAC2PHY_RMII_MODE); in rk_gmac_integrated_phy_powerup()
1619 regmap_write(priv->grf, RK_GRF_MACPHY_CON2, RK_GRF_CON2_MACPHY_ID); in rk_gmac_integrated_phy_powerup()
1620 regmap_write(priv->grf, RK_GRF_MACPHY_CON3, RK_GRF_CON3_MACPHY_ID); in rk_gmac_integrated_phy_powerup()
1624 regmap_write(priv->grf, RK_GRF_MACPHY_CON0, RK_MACPHY_DISABLE); in rk_gmac_integrated_phy_powerup()
1631 regmap_write(priv->grf, RK_GRF_MACPHY_CON0, RK_MACPHY_ENABLE); in rk_gmac_integrated_phy_powerup()
1638 regmap_write(priv->grf, RK_GRF_MACPHY_CON0, RK_MACPHY_DISABLE); in rk_gmac_integrated_phy_powerdown()
1831 bsp_priv->grf = syscon_regmap_lookup_by_phandle(dev->of_node, in rk_gmac_setup()
1832 "rockchip,grf"); in rk_gmac_setup()
1834 "rockchip,php-grf"); in rk_gmac_setup()