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:
Jianwei Fan
2024-03-29 15:51:56 +08:00
committed by Tao Huang
parent 71aaf6009f
commit 9c4b50cda3
4 changed files with 5 additions and 1 deletions

View File

@@ -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)

View File

@@ -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);

View File

@@ -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)

View File

@@ -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);