val = 0x80008000;
writel_relaxed(val, RK_CRU_VIRT + 0x0d0);
+
rk32_edp_reset(edp);
rk32_edp_init_refclk(edp);
rk32_edp_init_interrupt(edp);
}
}
}
-
+ fb_edid_to_monspecs(edid, &edp->specs);
dev_err(edp->dev, "EDID Read success!\n");
return 0;
}
if (retval < 0)
return retval;
+ for (i=0 ;i < 12; i++)
+ dev_info(edp->dev, "%d:>>0x%02x\n", i, buf[i]);
/* Read EDID */
for (i = 0; i < 3; i++) {
retval = rk32_edp_read_edid(edp);
rk32_edp_init_edp(edp);
- /*ret = rk32_edp_handle_edid(edp);
+ ret = rk32_edp_handle_edid(edp);
if (ret) {
dev_err(edp->dev, "unable to handle edid\n");
//goto out;
dev_err(edp->dev, "unable to set enhanced mode\n");
//goto out;
}
- rk32_edp_enable_enhanced_mode(edp, 0);*/
+ rk32_edp_enable_enhanced_mode(edp, 0);
/* Link Training */
- ret = rk32_edp_set_link_train(edp, LANE_CNT4, LINK_RATE_2_70GBPS);
+ ret = rk32_edp_set_link_train(edp, LANE_CNT4, LINK_RATE_1_62GBPS);
if (ret) {
dev_err(edp->dev, "link train failed\n");
//goto out;
#define DP_BIAS 0x124
#define PLL_REG_1 0xfc
-#define REF_CLK_24M (0x01 << 1)
+#define REF_CLK_24M (0x1 << 1)
#define REF_CLK_27M (0x0 << 1)
#define PLL_REG_2 0x9e4
struct link_train link_train;
struct video_info video_info;
struct rk_screen screen;
+ struct fb_monspecs specs;
int enabled;
};
val = SEL_24M;
writel(val, edp->regs + ANALOG_CTL_2);
-
+
val = REF_CLK_24M;
writel(val, edp->regs + PLL_REG_1);
writel(val, edp->regs + SSC_REG);
val = 0x87;
writel(val, edp->regs + TX_REG_COMMON);
- val = 0x03;
+ val = 0x13;
writel(val, edp->regs + DP_AUX);
val = 0x46;
writel(val, edp->regs + DP_BIAS);
u32 val;
//writel(RST_DP_TX, edp->regs + TX_SW_RST);
-
+ /*val = 0x80008000;
+ writel_relaxed(val, RK_CRU_VIRT + 0x01d0);
+ mdelay(12);
+ val = 0x80000000;
+ writel_relaxed(val, RK_CRU_VIRT + 0x01d0);
+ mdelay(12);*/
rk32_edp_stop_video(edp);
rk32_edp_enable_video_mute(edp, 0);
writel(val, edp->regs + DP_INT_STA);
val = readl(edp->regs + SYS_CTL_3);
- val &= ~(F_HPD | HPD_CTRL);
+ val |= (F_HPD | HPD_CTRL);
writel(val, edp->regs + SYS_CTL_3);
}
val = CHA_CRI(4) | CHA_CTRL;
writel(val, edp->regs + SYS_CTL_2);
- val = 0x0;
- writel(val, edp->regs + SYS_CTL_3);
+ //val = 0x0;
+ //writel(val, edp->regs + SYS_CTL_3);
val = VID_HRES_TH(2) | VID_VRES_TH(0);
writel(val, edp->regs + VIDEO_CTL_8);