mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
media: i2c: rk628: fix set CPLL if pixclk more than 594M
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com> Change-Id: I3faaed0e7efbdb0cb5b44454c931b48f41092592
This commit is contained in:
@@ -333,6 +333,7 @@ static void rk628_hdmirx_plugout(struct v4l2_subdev *sd)
|
||||
rk628_hdmirx_hpd_ctrl(sd, false);
|
||||
rk628_hdmirx_inno_phy_power_off(sd);
|
||||
rk628_hdmirx_controller_reset(bt1120->rk628);
|
||||
rk628_clk_set_rate(bt1120->rk628, CGU_CLK_CPLL, CPLL_REF_CLK);
|
||||
}
|
||||
|
||||
static void rk628_hdmirx_config_all(struct v4l2_subdev *sd)
|
||||
|
||||
@@ -195,6 +195,8 @@
|
||||
#define RGU_TXESC 30
|
||||
#define RGU_CSI1 31
|
||||
|
||||
#define CPLL_REF_CLK 1188000000
|
||||
|
||||
unsigned long rk628_clk_get_rate(struct rk628 *rk628, unsigned int id);
|
||||
int rk628_clk_set_rate(struct rk628 *rk628, unsigned int id,
|
||||
unsigned long rate);
|
||||
|
||||
@@ -465,6 +465,7 @@ static void rk628_hdmirx_plugout(struct v4l2_subdev *sd)
|
||||
rk628_hdmirx_hpd_ctrl(sd, false);
|
||||
rk628_hdmirx_inno_phy_power_off(sd);
|
||||
rk628_hdmirx_controller_reset(csi->rk628);
|
||||
rk628_clk_set_rate(csi->rk628, CGU_CLK_CPLL, CPLL_REF_CLK);
|
||||
}
|
||||
|
||||
static void rk628_hdmirx_config_all(struct v4l2_subdev *sd)
|
||||
|
||||
@@ -1499,7 +1499,7 @@ int rk628_hdmirx_get_timings(struct rk628 *rk628,
|
||||
if (rk628->version >= RK628F_VERSION) {
|
||||
val = DIV_ROUND_CLOSEST_ULL(1188000000, bt->pixelclock);
|
||||
val *= bt->pixelclock;
|
||||
if (val > 1188000000) {
|
||||
if (bt->pixelclock > 594000000) {
|
||||
/* set pll rate according hdmirx tmds clk */
|
||||
rk628_clk_set_rate(rk628, CGU_CLK_CPLL, val);
|
||||
dev_dbg(rk628->dev, "set CPLL to %d\n", val);
|
||||
|
||||
Reference in New Issue
Block a user