Lines Matching full:dphy
3 * StarFive JH7110 DPHY RX driver
75 struct stf_dphy *dphy = phy_get_drvdata(phy); in stf_dphy_configure() local
76 const struct stf_dphy_info *info = dphy->info; in stf_dphy_configure()
88 dphy->regs + STF_DPHY_APBCFGSAIF_SYSCFG(188)); in stf_dphy_configure()
93 dphy->regs + STF_DPHY_APBCFGSAIF_SYSCFG(192)); in stf_dphy_configure()
99 dphy->regs + STF_DPHY_APBCFGSAIF_SYSCFG(196)); in stf_dphy_configure()
102 dphy->regs + STF_DPHY_APBCFGSAIF_SYSCFG(200)); in stf_dphy_configure()
109 struct stf_dphy *dphy = phy_get_drvdata(phy); in stf_dphy_power_on() local
112 ret = pm_runtime_resume_and_get(dphy->dev); in stf_dphy_power_on()
116 ret = regulator_enable(dphy->mipi_0p9); in stf_dphy_power_on()
118 pm_runtime_put(dphy->dev); in stf_dphy_power_on()
122 clk_set_rate(dphy->cfg_clk, 99000000); in stf_dphy_power_on()
123 clk_set_rate(dphy->ref_clk, 49500000); in stf_dphy_power_on()
124 clk_set_rate(dphy->tx_clk, 19800000); in stf_dphy_power_on()
125 reset_control_deassert(dphy->rstc); in stf_dphy_power_on()
132 struct stf_dphy *dphy = phy_get_drvdata(phy); in stf_dphy_power_off() local
134 reset_control_assert(dphy->rstc); in stf_dphy_power_off()
136 regulator_disable(dphy->mipi_0p9); in stf_dphy_power_off()
138 pm_runtime_put_sync(dphy->dev); in stf_dphy_power_off()
152 struct stf_dphy *dphy; in stf_dphy_probe() local
154 dphy = devm_kzalloc(&pdev->dev, sizeof(*dphy), GFP_KERNEL); in stf_dphy_probe()
155 if (!dphy) in stf_dphy_probe()
158 dphy->info = of_device_get_match_data(&pdev->dev); in stf_dphy_probe()
160 dev_set_drvdata(&pdev->dev, dphy); in stf_dphy_probe()
161 dphy->dev = &pdev->dev; in stf_dphy_probe()
163 dphy->regs = devm_platform_ioremap_resource(pdev, 0); in stf_dphy_probe()
164 if (IS_ERR(dphy->regs)) in stf_dphy_probe()
165 return PTR_ERR(dphy->regs); in stf_dphy_probe()
167 dphy->cfg_clk = devm_clk_get(&pdev->dev, "cfg"); in stf_dphy_probe()
168 if (IS_ERR(dphy->cfg_clk)) in stf_dphy_probe()
169 return PTR_ERR(dphy->cfg_clk); in stf_dphy_probe()
171 dphy->ref_clk = devm_clk_get(&pdev->dev, "ref"); in stf_dphy_probe()
172 if (IS_ERR(dphy->ref_clk)) in stf_dphy_probe()
173 return PTR_ERR(dphy->ref_clk); in stf_dphy_probe()
175 dphy->tx_clk = devm_clk_get(&pdev->dev, "tx"); in stf_dphy_probe()
176 if (IS_ERR(dphy->tx_clk)) in stf_dphy_probe()
177 return PTR_ERR(dphy->tx_clk); in stf_dphy_probe()
179 dphy->rstc = devm_reset_control_array_get_exclusive(&pdev->dev); in stf_dphy_probe()
180 if (IS_ERR(dphy->rstc)) in stf_dphy_probe()
181 return PTR_ERR(dphy->rstc); in stf_dphy_probe()
183 dphy->mipi_0p9 = devm_regulator_get(&pdev->dev, "mipi_0p9"); in stf_dphy_probe()
184 if (IS_ERR(dphy->mipi_0p9)) in stf_dphy_probe()
185 return PTR_ERR(dphy->mipi_0p9); in stf_dphy_probe()
187 dphy->phy = devm_phy_create(&pdev->dev, NULL, &stf_dphy_ops); in stf_dphy_probe()
188 if (IS_ERR(dphy->phy)) { in stf_dphy_probe()
190 return PTR_ERR(dphy->phy); in stf_dphy_probe()
195 phy_set_drvdata(dphy->phy, dphy); in stf_dphy_probe()
208 .compatible = "starfive,jh7110-dphy-rx",
218 .name = "starfive-dphy-rx",
226 MODULE_DESCRIPTION("StarFive JH7110 DPHY RX driver");