rk3036 hdmi: hdmi display ok

This commit is contained in:
hjc
2014-07-12 14:04:44 +08:00
parent 1cda5a3a28
commit 422b8701e2
5 changed files with 40 additions and 12 deletions

View File

@@ -128,3 +128,20 @@
dma-names = "!tx", "!rx";
//pinctrl-0 = <&uart0_xfer &uart0_cts>;
};
&rk_screen {
display-timings = <&disp_timings>;
};
&lcdc {
status = "okay";
};
&tve {
status = "disabled";
};
&hdmi {
status = "okay";
//rockchips,hdmi_audio_source = <0>;
};

View File

@@ -161,5 +161,10 @@
};
&tve {
status = "okay";
status = "disabled";
};
&hdmi {
status = "okay";
//rockchips,hdmi_audio_source = <0>;
};

View File

@@ -5,7 +5,6 @@ CONFIG_AUDIT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_RCU_FAST_NO_HZ=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
CONFIG_CGROUP_FREEZER=y
@@ -355,6 +354,7 @@ CONFIG_BACKLIGHT_PWM=y
CONFIG_FB_ROCKCHIP=y
CONFIG_LCDC_RK3188=y
CONFIG_LCDC_RK3288=y
CONFIG_LCDC_RK3036=y
CONFIG_RK_TRSM=y
CONFIG_RK32_LVDS=y
CONFIG_DP_ANX6345=y

View File

@@ -249,7 +249,7 @@ static void __maybe_unused rk616_irq_work_func(struct work_struct *work)
dev_info(hdmi_drv->dev, "func: %s, enable_irq\n", __func__);
enable_irq(hdmi_drv->irq);
}
#if 0
static irqreturn_t rk616_hdmi_irq(int irq, void *dev_id)
{
struct work_struct *rk616_irq_work_struct;
@@ -271,7 +271,7 @@ static irqreturn_t rk616_hdmi_irq(int irq, void *dev_id)
}
return IRQ_HANDLED;
}
#endif
static int rk616_hdmi_drv_init(struct hdmi *hdmi_drv)
{
int ret = 0;
@@ -288,10 +288,12 @@ static int rk616_hdmi_drv_init(struct hdmi *hdmi_drv)
grf_writel(HDMI_SEL_LCDC(lcdc_id), RK3036_GRF_SOC_CON6);
#endif
*/
lcdc_id = 0;
if (lcdc_id == 0)
hdmi_drv->lcdc = rk_get_lcdc_drv("lcdc0");
else
hdmi_drv->lcdc = rk_get_lcdc_drv("lcdc1");
if (IS_ERR(hdmi_drv->lcdc)) {
dev_err(hdmi_drv->dev,
"can not connect to video source lcdc\n");
@@ -350,9 +352,6 @@ static int rk616_hdmi_probe(struct platform_device *pdev)
}
#endif
if (rk616_hdmi_drv_init(hdmi_drv))
goto err0;
#ifdef CONFIG_SWITCH
hdmi_drv->switch_hdmi.name = "hdmi";
switch_dev_register(&(hdmi_drv->switch_hdmi));
@@ -399,6 +398,7 @@ static int rk616_hdmi_probe(struct platform_device *pdev)
hdmi_drv->irq = 0;
} else {
/* request the IRQ */
#if 0
ret = devm_request_irq(hdmi_drv->dev, hdmi_drv->irq,
rk616_hdmi_irq, 0,
dev_name(hdmi_drv->dev), hdmi_drv);
@@ -407,6 +407,7 @@ static int rk616_hdmi_probe(struct platform_device *pdev)
ret);
goto err2;
}
#endif
}
#else
if (gpio_is_valid(hdmi_dev->rk616_drv->pdata->hdmi_irq)) {
@@ -445,6 +446,10 @@ static int rk616_hdmi_probe(struct platform_device *pdev)
}
#endif
if (rk616_hdmi_drv_init(hdmi_drv))
goto err0;
//rk616_hdmi_work(hdmi_drv);
#if defined(CONFIG_DEBUG_FS)
if (hdmi_dev->rk616_drv && hdmi_dev->rk616_drv->debugfs_dir) {
@@ -467,6 +472,7 @@ static int rk616_hdmi_probe(struct platform_device *pdev)
queue_delayed_work(hdmi_drv->workqueue, &hdmi_dev->rk616_delay_work,
msecs_to_jiffies(0));
dev_info(hdmi_drv->dev, "rk616 hdmi probe success.\n");
return 0;
#if defined(CONFIG_ARCH_RK3026) || defined(SOC_CONFIG_RK3036)

View File

@@ -118,7 +118,7 @@ static void rk616_hdmi_set_pwr_mode(struct hdmi *hdmi_drv, int mode)
case NORMAL:
hdmi_dbg(hdmi_drv->dev,
"%s change pwr_mode NORMAL pwr_mode = %d, mode = %d\n",
__func__, hdmi->pwr_mode, mode);
__func__, hdmi_drv->pwr_mode, mode);
rk616_hdmi_sys_power(hdmi_drv, false);
if (!(hdmi_drv->set_vif)
&& (hdmi_drv->vic == HDMI_1920x1080p_60Hz
@@ -149,7 +149,7 @@ static void rk616_hdmi_set_pwr_mode(struct hdmi *hdmi_drv, int mode)
case LOWER_PWR:
hdmi_dbg(hdmi_drv->dev,
"%s change pwr_mode LOWER_PWR pwr_mode = %d, mode = %d\n",
__func__, hdmi->pwr_mode, mode);
__func__, hdmi_drv->pwr_mode, mode);
rk616_hdmi_av_mute(hdmi_drv, 0);
rk616_hdmi_sys_power(hdmi_drv, false);
hdmi_writel(hdmi_dev, PHY_DRIVER, 0x00);
@@ -419,9 +419,9 @@ static int rk616_hdmi_config_video(struct hdmi *hdmi_drv,
if (vpara->output_mode == OUTPUT_HDMI) {
rk616_hdmi_config_avi(hdmi_drv, vpara->vic,
vpara->output_color);
hdmi_dbg(hdmi->dev, "[%s] sucess output HDMI.\n", __func__);
hdmi_dbg(hdmi_drv->dev, "[%s] sucess output HDMI.\n", __func__);
} else {
hdmi_dbg(hdmi->dev, "[%s] sucess output DVI.\n", __func__);
hdmi_dbg(hdmi_drv->dev, "[%s] sucess output DVI.\n", __func__);
}
if (hdmi_drv->set_vif) {
@@ -635,7 +635,7 @@ static void rk616_hdmi_reset(struct hdmi *hdmi_drv)
#else
hdmi_writel(hdmi_dev, INTERRUPT_MASK1, m_INT_HOTPLUG);
#endif
rk616_hdmi_set_pwr_mode(hdmi_drv, LOWER_PWR);
//rk616_hdmi_set_pwr_mode(hdmi_drv, LOWER_PWR); // hjc delete for audis
}
int rk616_hdmi_initial(struct hdmi *hdmi_drv)