tphy 318 drivers/phy/mediatek/phy-mtk-tphy.c static void hs_slew_rate_calibrate(struct mtk_tphy *tphy, tphy 347 drivers/phy/mediatek/phy-mtk-tphy.c if (tphy->pdata->version == MTK_PHY_V1) tphy 375 drivers/phy/mediatek/phy-mtk-tphy.c tmp = tphy->src_ref_clk * tphy->src_coef; tphy 382 drivers/phy/mediatek/phy-mtk-tphy.c dev_dbg(tphy->dev, "phy:%d, fm_out:%d, calib:%d (clk:%d, coef:%d)\n", tphy 384 drivers/phy/mediatek/phy-mtk-tphy.c tphy->src_ref_clk, tphy->src_coef); tphy 398 drivers/phy/mediatek/phy-mtk-tphy.c static void u3_phy_instance_init(struct mtk_tphy *tphy, tphy 445 drivers/phy/mediatek/phy-mtk-tphy.c dev_dbg(tphy->dev, "%s(%d)\n", __func__, instance->index); tphy 448 drivers/phy/mediatek/phy-mtk-tphy.c static void u2_phy_instance_init(struct mtk_tphy *tphy, tphy 481 drivers/phy/mediatek/phy-mtk-tphy.c if (tphy->pdata->avoid_rx_sen_degradation) { tphy 507 drivers/phy/mediatek/phy-mtk-tphy.c dev_dbg(tphy->dev, "%s(%d)\n", __func__, index); tphy 510 drivers/phy/mediatek/phy-mtk-tphy.c static void u2_phy_instance_power_on(struct mtk_tphy *tphy, tphy 532 drivers/phy/mediatek/phy-mtk-tphy.c if (tphy->pdata->avoid_rx_sen_degradation && index) { tphy 541 drivers/phy/mediatek/phy-mtk-tphy.c dev_dbg(tphy->dev, "%s(%d)\n", __func__, index); tphy 544 drivers/phy/mediatek/phy-mtk-tphy.c static void u2_phy_instance_power_off(struct mtk_tphy *tphy, tphy 566 drivers/phy/mediatek/phy-mtk-tphy.c if (tphy->pdata->avoid_rx_sen_degradation && index) { tphy 576 drivers/phy/mediatek/phy-mtk-tphy.c dev_dbg(tphy->dev, "%s(%d)\n", __func__, index); tphy 579 drivers/phy/mediatek/phy-mtk-tphy.c static void u2_phy_instance_exit(struct mtk_tphy *tphy, tphy 587 drivers/phy/mediatek/phy-mtk-tphy.c if (tphy->pdata->avoid_rx_sen_degradation && index) { tphy 598 drivers/phy/mediatek/phy-mtk-tphy.c static void u2_phy_instance_set_mode(struct mtk_tphy *tphy, tphy 623 drivers/phy/mediatek/phy-mtk-tphy.c static void pcie_phy_instance_init(struct mtk_tphy *tphy, tphy 629 drivers/phy/mediatek/phy-mtk-tphy.c if (tphy->pdata->version != MTK_PHY_V1) tphy 693 drivers/phy/mediatek/phy-mtk-tphy.c dev_dbg(tphy->dev, "%s(%d)\n", __func__, instance->index); tphy 696 drivers/phy/mediatek/phy-mtk-tphy.c static void pcie_phy_instance_power_on(struct mtk_tphy *tphy, tphy 711 drivers/phy/mediatek/phy-mtk-tphy.c static void pcie_phy_instance_power_off(struct mtk_tphy *tphy, tphy 727 drivers/phy/mediatek/phy-mtk-tphy.c static void sata_phy_instance_init(struct mtk_tphy *tphy, tphy 782 drivers/phy/mediatek/phy-mtk-tphy.c dev_dbg(tphy->dev, "%s(%d)\n", __func__, instance->index); tphy 785 drivers/phy/mediatek/phy-mtk-tphy.c static void phy_v1_banks_init(struct mtk_tphy *tphy, tphy 794 drivers/phy/mediatek/phy-mtk-tphy.c u2_banks->fmreg = tphy->sif_base + SSUSB_SIFSLV_V1_U2FREQ; tphy 799 drivers/phy/mediatek/phy-mtk-tphy.c u3_banks->spllc = tphy->sif_base + SSUSB_SIFSLV_V1_SPLLC; tphy 800 drivers/phy/mediatek/phy-mtk-tphy.c u3_banks->chip = tphy->sif_base + SSUSB_SIFSLV_V1_CHIP; tphy 808 drivers/phy/mediatek/phy-mtk-tphy.c dev_err(tphy->dev, "incompatible PHY type\n"); tphy 813 drivers/phy/mediatek/phy-mtk-tphy.c static void phy_v2_banks_init(struct mtk_tphy *tphy, tphy 833 drivers/phy/mediatek/phy-mtk-tphy.c dev_err(tphy->dev, "incompatible PHY type\n"); tphy 838 drivers/phy/mediatek/phy-mtk-tphy.c static void phy_parse_property(struct mtk_tphy *tphy, tphy 858 drivers/phy/mediatek/phy-mtk-tphy.c static void u2_phy_props_set(struct mtk_tphy *tphy, tphy 896 drivers/phy/mediatek/phy-mtk-tphy.c struct mtk_tphy *tphy = dev_get_drvdata(phy->dev.parent); tphy 899 drivers/phy/mediatek/phy-mtk-tphy.c ret = clk_prepare_enable(tphy->u3phya_ref); tphy 901 drivers/phy/mediatek/phy-mtk-tphy.c dev_err(tphy->dev, "failed to enable u3phya_ref\n"); tphy 907 drivers/phy/mediatek/phy-mtk-tphy.c dev_err(tphy->dev, "failed to enable ref_clk\n"); tphy 913 drivers/phy/mediatek/phy-mtk-tphy.c u2_phy_instance_init(tphy, instance); tphy 914 drivers/phy/mediatek/phy-mtk-tphy.c u2_phy_props_set(tphy, instance); tphy 917 drivers/phy/mediatek/phy-mtk-tphy.c u3_phy_instance_init(tphy, instance); tphy 920 drivers/phy/mediatek/phy-mtk-tphy.c pcie_phy_instance_init(tphy, instance); tphy 923 drivers/phy/mediatek/phy-mtk-tphy.c sata_phy_instance_init(tphy, instance); tphy 926 drivers/phy/mediatek/phy-mtk-tphy.c dev_err(tphy->dev, "incompatible PHY type\n"); tphy 936 drivers/phy/mediatek/phy-mtk-tphy.c struct mtk_tphy *tphy = dev_get_drvdata(phy->dev.parent); tphy 939 drivers/phy/mediatek/phy-mtk-tphy.c u2_phy_instance_power_on(tphy, instance); tphy 940 drivers/phy/mediatek/phy-mtk-tphy.c hs_slew_rate_calibrate(tphy, instance); tphy 942 drivers/phy/mediatek/phy-mtk-tphy.c pcie_phy_instance_power_on(tphy, instance); tphy 951 drivers/phy/mediatek/phy-mtk-tphy.c struct mtk_tphy *tphy = dev_get_drvdata(phy->dev.parent); tphy 954 drivers/phy/mediatek/phy-mtk-tphy.c u2_phy_instance_power_off(tphy, instance); tphy 956 drivers/phy/mediatek/phy-mtk-tphy.c pcie_phy_instance_power_off(tphy, instance); tphy 964 drivers/phy/mediatek/phy-mtk-tphy.c struct mtk_tphy *tphy = dev_get_drvdata(phy->dev.parent); tphy 967 drivers/phy/mediatek/phy-mtk-tphy.c u2_phy_instance_exit(tphy, instance); tphy 970 drivers/phy/mediatek/phy-mtk-tphy.c clk_disable_unprepare(tphy->u3phya_ref); tphy 977 drivers/phy/mediatek/phy-mtk-tphy.c struct mtk_tphy *tphy = dev_get_drvdata(phy->dev.parent); tphy 980 drivers/phy/mediatek/phy-mtk-tphy.c u2_phy_instance_set_mode(tphy, instance, mode); tphy 988 drivers/phy/mediatek/phy-mtk-tphy.c struct mtk_tphy *tphy = dev_get_drvdata(dev); tphy 998 drivers/phy/mediatek/phy-mtk-tphy.c for (index = 0; index < tphy->nphys; index++) tphy 999 drivers/phy/mediatek/phy-mtk-tphy.c if (phy_np == tphy->phys[index]->phy->dev.of_node) { tphy 1000 drivers/phy/mediatek/phy-mtk-tphy.c instance = tphy->phys[index]; tphy 1018 drivers/phy/mediatek/phy-mtk-tphy.c if (tphy->pdata->version == MTK_PHY_V1) { tphy 1019 drivers/phy/mediatek/phy-mtk-tphy.c phy_v1_banks_init(tphy, instance); tphy 1020 drivers/phy/mediatek/phy-mtk-tphy.c } else if (tphy->pdata->version == MTK_PHY_V2) { tphy 1021 drivers/phy/mediatek/phy-mtk-tphy.c phy_v2_banks_init(tphy, instance); tphy 1027 drivers/phy/mediatek/phy-mtk-tphy.c phy_parse_property(tphy, instance); tphy 1073 drivers/phy/mediatek/phy-mtk-tphy.c struct mtk_tphy *tphy; tphy 1077 drivers/phy/mediatek/phy-mtk-tphy.c tphy = devm_kzalloc(dev, sizeof(*tphy), GFP_KERNEL); tphy 1078 drivers/phy/mediatek/phy-mtk-tphy.c if (!tphy) tphy 1081 drivers/phy/mediatek/phy-mtk-tphy.c tphy->pdata = of_device_get_match_data(dev); tphy 1082 drivers/phy/mediatek/phy-mtk-tphy.c if (!tphy->pdata) tphy 1085 drivers/phy/mediatek/phy-mtk-tphy.c tphy->nphys = of_get_child_count(np); tphy 1086 drivers/phy/mediatek/phy-mtk-tphy.c tphy->phys = devm_kcalloc(dev, tphy->nphys, tphy 1087 drivers/phy/mediatek/phy-mtk-tphy.c sizeof(*tphy->phys), GFP_KERNEL); tphy 1088 drivers/phy/mediatek/phy-mtk-tphy.c if (!tphy->phys) tphy 1091 drivers/phy/mediatek/phy-mtk-tphy.c tphy->dev = dev; tphy 1092 drivers/phy/mediatek/phy-mtk-tphy.c platform_set_drvdata(pdev, tphy); tphy 1096 drivers/phy/mediatek/phy-mtk-tphy.c if (sif_res && tphy->pdata->version == MTK_PHY_V1) { tphy 1098 drivers/phy/mediatek/phy-mtk-tphy.c tphy->sif_base = devm_ioremap_resource(dev, sif_res); tphy 1099 drivers/phy/mediatek/phy-mtk-tphy.c if (IS_ERR(tphy->sif_base)) { tphy 1101 drivers/phy/mediatek/phy-mtk-tphy.c return PTR_ERR(tphy->sif_base); tphy 1106 drivers/phy/mediatek/phy-mtk-tphy.c tphy->u3phya_ref = devm_clk_get_optional(dev, "u3phya_ref"); tphy 1107 drivers/phy/mediatek/phy-mtk-tphy.c if (IS_ERR(tphy->u3phya_ref)) tphy 1108 drivers/phy/mediatek/phy-mtk-tphy.c return PTR_ERR(tphy->u3phya_ref); tphy 1110 drivers/phy/mediatek/phy-mtk-tphy.c tphy->src_ref_clk = U3P_REF_CLK; tphy 1111 drivers/phy/mediatek/phy-mtk-tphy.c tphy->src_coef = U3P_SLEW_RATE_COEF; tphy 1114 drivers/phy/mediatek/phy-mtk-tphy.c &tphy->src_ref_clk); tphy 1115 drivers/phy/mediatek/phy-mtk-tphy.c device_property_read_u32(dev, "mediatek,src-coef", &tphy->src_coef); tphy 1128 drivers/phy/mediatek/phy-mtk-tphy.c tphy->phys[port] = instance; tphy 1157 drivers/phy/mediatek/phy-mtk-tphy.c if (tphy->u3phya_ref)