Lines Matching full:hdmi_phy
18 void mtk_hdmi_phy_clear_bits(struct mtk_hdmi_phy *hdmi_phy, u32 offset, in mtk_hdmi_phy_clear_bits() argument
21 void __iomem *reg = hdmi_phy->regs + offset; in mtk_hdmi_phy_clear_bits()
29 void mtk_hdmi_phy_set_bits(struct mtk_hdmi_phy *hdmi_phy, u32 offset, in mtk_hdmi_phy_set_bits() argument
32 void __iomem *reg = hdmi_phy->regs + offset; in mtk_hdmi_phy_set_bits()
40 void mtk_hdmi_phy_mask(struct mtk_hdmi_phy *hdmi_phy, u32 offset, in mtk_hdmi_phy_mask() argument
43 void __iomem *reg = hdmi_phy->regs + offset; in mtk_hdmi_phy_mask()
58 struct mtk_hdmi_phy *hdmi_phy = phy_get_drvdata(phy); in mtk_hdmi_phy_power_on() local
61 ret = clk_prepare_enable(hdmi_phy->pll); in mtk_hdmi_phy_power_on()
65 hdmi_phy->conf->hdmi_phy_enable_tmds(hdmi_phy); in mtk_hdmi_phy_power_on()
71 struct mtk_hdmi_phy *hdmi_phy = phy_get_drvdata(phy); in mtk_hdmi_phy_power_off() local
73 hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy); in mtk_hdmi_phy_power_off()
74 clk_disable_unprepare(hdmi_phy->pll); in mtk_hdmi_phy_power_off()
80 mtk_hdmi_phy_dev_get_ops(const struct mtk_hdmi_phy *hdmi_phy) in mtk_hdmi_phy_dev_get_ops() argument
82 if (hdmi_phy && hdmi_phy->conf && in mtk_hdmi_phy_dev_get_ops()
83 hdmi_phy->conf->hdmi_phy_enable_tmds && in mtk_hdmi_phy_dev_get_ops()
84 hdmi_phy->conf->hdmi_phy_disable_tmds) in mtk_hdmi_phy_dev_get_ops()
87 dev_err(hdmi_phy->dev, "Failed to get dev ops of phy\n"); in mtk_hdmi_phy_dev_get_ops()
91 static void mtk_hdmi_phy_clk_get_data(struct mtk_hdmi_phy *hdmi_phy, in mtk_hdmi_phy_clk_get_data() argument
94 clk_init->flags = hdmi_phy->conf->flags; in mtk_hdmi_phy_clk_get_data()
95 clk_init->ops = hdmi_phy->conf->hdmi_phy_clk_ops; in mtk_hdmi_phy_clk_get_data()
101 struct mtk_hdmi_phy *hdmi_phy; in mtk_hdmi_phy_probe() local
114 hdmi_phy = devm_kzalloc(dev, sizeof(*hdmi_phy), GFP_KERNEL); in mtk_hdmi_phy_probe()
115 if (!hdmi_phy) in mtk_hdmi_phy_probe()
119 hdmi_phy->regs = devm_ioremap_resource(dev, mem); in mtk_hdmi_phy_probe()
120 if (IS_ERR(hdmi_phy->regs)) { in mtk_hdmi_phy_probe()
121 ret = PTR_ERR(hdmi_phy->regs); in mtk_hdmi_phy_probe()
142 hdmi_phy->dev = dev; in mtk_hdmi_phy_probe()
143 hdmi_phy->conf = in mtk_hdmi_phy_probe()
145 mtk_hdmi_phy_clk_get_data(hdmi_phy, &clk_init); in mtk_hdmi_phy_probe()
146 hdmi_phy->pll_hw.init = &clk_init; in mtk_hdmi_phy_probe()
147 hdmi_phy->pll = devm_clk_register(dev, &hdmi_phy->pll_hw); in mtk_hdmi_phy_probe()
148 if (IS_ERR(hdmi_phy->pll)) { in mtk_hdmi_phy_probe()
149 ret = PTR_ERR(hdmi_phy->pll); in mtk_hdmi_phy_probe()
155 &hdmi_phy->ibias); in mtk_hdmi_phy_probe()
162 &hdmi_phy->ibias_up); in mtk_hdmi_phy_probe()
169 hdmi_phy->drv_imp_clk = 0x30; in mtk_hdmi_phy_probe()
170 hdmi_phy->drv_imp_d2 = 0x30; in mtk_hdmi_phy_probe()
171 hdmi_phy->drv_imp_d1 = 0x30; in mtk_hdmi_phy_probe()
172 hdmi_phy->drv_imp_d0 = 0x30; in mtk_hdmi_phy_probe()
174 phy = devm_phy_create(dev, NULL, mtk_hdmi_phy_dev_get_ops(hdmi_phy)); in mtk_hdmi_phy_probe()
179 phy_set_drvdata(phy, hdmi_phy); in mtk_hdmi_phy_probe()
187 if (hdmi_phy->conf->pll_default_off) in mtk_hdmi_phy_probe()
188 hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy); in mtk_hdmi_phy_probe()
191 hdmi_phy->pll); in mtk_hdmi_phy_probe()