xsphy 116 drivers/phy/mediatek/phy-mtk-xsphy.c static void u2_phy_slew_rate_calibrate(struct mtk_xsphy *xsphy, xsphy 168 drivers/phy/mediatek/phy-mtk-xsphy.c tmp = xsphy->src_ref_clk * xsphy->src_coef; xsphy 175 drivers/phy/mediatek/phy-mtk-xsphy.c dev_dbg(xsphy->dev, "phy.%d, fm_out:%d, calib:%d (clk:%d, coef:%d)\n", xsphy 177 drivers/phy/mediatek/phy-mtk-xsphy.c xsphy->src_ref_clk, xsphy->src_coef); xsphy 191 drivers/phy/mediatek/phy-mtk-xsphy.c static void u2_phy_instance_init(struct mtk_xsphy *xsphy, xsphy 207 drivers/phy/mediatek/phy-mtk-xsphy.c static void u2_phy_instance_power_on(struct mtk_xsphy *xsphy, xsphy 223 drivers/phy/mediatek/phy-mtk-xsphy.c dev_dbg(xsphy->dev, "%s(%d)\n", __func__, index); xsphy 226 drivers/phy/mediatek/phy-mtk-xsphy.c static void u2_phy_instance_power_off(struct mtk_xsphy *xsphy, xsphy 242 drivers/phy/mediatek/phy-mtk-xsphy.c dev_dbg(xsphy->dev, "%s(%d)\n", __func__, index); xsphy 245 drivers/phy/mediatek/phy-mtk-xsphy.c static void u2_phy_instance_set_mode(struct mtk_xsphy *xsphy, xsphy 269 drivers/phy/mediatek/phy-mtk-xsphy.c static void phy_parse_property(struct mtk_xsphy *xsphy, xsphy 300 drivers/phy/mediatek/phy-mtk-xsphy.c dev_err(xsphy->dev, "incompatible phy type\n"); xsphy 305 drivers/phy/mediatek/phy-mtk-xsphy.c static void u2_phy_props_set(struct mtk_xsphy *xsphy, xsphy 340 drivers/phy/mediatek/phy-mtk-xsphy.c static void u3_phy_props_set(struct mtk_xsphy *xsphy, xsphy 347 drivers/phy/mediatek/phy-mtk-xsphy.c tmp = readl(xsphy->glb_base + SSPXTP_PHYA_GLB_00); xsphy 350 drivers/phy/mediatek/phy-mtk-xsphy.c writel(tmp, xsphy->glb_base + SSPXTP_PHYA_GLB_00); xsphy 371 drivers/phy/mediatek/phy-mtk-xsphy.c struct mtk_xsphy *xsphy = dev_get_drvdata(phy->dev.parent); xsphy 376 drivers/phy/mediatek/phy-mtk-xsphy.c dev_err(xsphy->dev, "failed to enable ref_clk\n"); xsphy 382 drivers/phy/mediatek/phy-mtk-xsphy.c u2_phy_instance_init(xsphy, inst); xsphy 383 drivers/phy/mediatek/phy-mtk-xsphy.c u2_phy_props_set(xsphy, inst); xsphy 386 drivers/phy/mediatek/phy-mtk-xsphy.c u3_phy_props_set(xsphy, inst); xsphy 389 drivers/phy/mediatek/phy-mtk-xsphy.c dev_err(xsphy->dev, "incompatible phy type\n"); xsphy 400 drivers/phy/mediatek/phy-mtk-xsphy.c struct mtk_xsphy *xsphy = dev_get_drvdata(phy->dev.parent); xsphy 403 drivers/phy/mediatek/phy-mtk-xsphy.c u2_phy_instance_power_on(xsphy, inst); xsphy 404 drivers/phy/mediatek/phy-mtk-xsphy.c u2_phy_slew_rate_calibrate(xsphy, inst); xsphy 413 drivers/phy/mediatek/phy-mtk-xsphy.c struct mtk_xsphy *xsphy = dev_get_drvdata(phy->dev.parent); xsphy 416 drivers/phy/mediatek/phy-mtk-xsphy.c u2_phy_instance_power_off(xsphy, inst); xsphy 432 drivers/phy/mediatek/phy-mtk-xsphy.c struct mtk_xsphy *xsphy = dev_get_drvdata(phy->dev.parent); xsphy 435 drivers/phy/mediatek/phy-mtk-xsphy.c u2_phy_instance_set_mode(xsphy, inst, mode); xsphy 443 drivers/phy/mediatek/phy-mtk-xsphy.c struct mtk_xsphy *xsphy = dev_get_drvdata(dev); xsphy 453 drivers/phy/mediatek/phy-mtk-xsphy.c for (index = 0; index < xsphy->nphys; index++) xsphy 454 drivers/phy/mediatek/phy-mtk-xsphy.c if (phy_np == xsphy->phys[index]->phy->dev.of_node) { xsphy 455 drivers/phy/mediatek/phy-mtk-xsphy.c inst = xsphy->phys[index]; xsphy 471 drivers/phy/mediatek/phy-mtk-xsphy.c phy_parse_property(xsphy, inst); xsphy 498 drivers/phy/mediatek/phy-mtk-xsphy.c struct mtk_xsphy *xsphy; xsphy 502 drivers/phy/mediatek/phy-mtk-xsphy.c xsphy = devm_kzalloc(dev, sizeof(*xsphy), GFP_KERNEL); xsphy 503 drivers/phy/mediatek/phy-mtk-xsphy.c if (!xsphy) xsphy 506 drivers/phy/mediatek/phy-mtk-xsphy.c xsphy->nphys = of_get_child_count(np); xsphy 507 drivers/phy/mediatek/phy-mtk-xsphy.c xsphy->phys = devm_kcalloc(dev, xsphy->nphys, xsphy 508 drivers/phy/mediatek/phy-mtk-xsphy.c sizeof(*xsphy->phys), GFP_KERNEL); xsphy 509 drivers/phy/mediatek/phy-mtk-xsphy.c if (!xsphy->phys) xsphy 512 drivers/phy/mediatek/phy-mtk-xsphy.c xsphy->dev = dev; xsphy 513 drivers/phy/mediatek/phy-mtk-xsphy.c platform_set_drvdata(pdev, xsphy); xsphy 519 drivers/phy/mediatek/phy-mtk-xsphy.c xsphy->glb_base = devm_ioremap_resource(dev, glb_res); xsphy 520 drivers/phy/mediatek/phy-mtk-xsphy.c if (IS_ERR(xsphy->glb_base)) { xsphy 522 drivers/phy/mediatek/phy-mtk-xsphy.c return PTR_ERR(xsphy->glb_base); xsphy 526 drivers/phy/mediatek/phy-mtk-xsphy.c xsphy->src_ref_clk = XSP_REF_CLK; xsphy 527 drivers/phy/mediatek/phy-mtk-xsphy.c xsphy->src_coef = XSP_SLEW_RATE_COEF; xsphy 530 drivers/phy/mediatek/phy-mtk-xsphy.c &xsphy->src_ref_clk); xsphy 531 drivers/phy/mediatek/phy-mtk-xsphy.c device_property_read_u32(dev, "mediatek,src-coef", &xsphy->src_coef); xsphy 544 drivers/phy/mediatek/phy-mtk-xsphy.c xsphy->phys[port] = inst;