rk3036 hdmi: hdmi display ok
authorhjc <hjc@rock-chips.com>
Sat, 12 Jul 2014 06:04:44 +0000 (14:04 +0800)
committerhjc <hjc@rock-chips.com>
Sat, 12 Jul 2014 06:06:05 +0000 (14:06 +0800)
arch/arm/boot/dts/rk3036-rk88.dts
arch/arm/boot/dts/rk3036-sdk.dts
arch/arm/configs/rk3036_defconfig
drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi.c
drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi_hw.c

index a4e063ddf16bf2bbb50aa15d2f3e242ebbff80de..56d2c9b2ba0d12577de989e2aafaf90ad8e49d3b 100755 (executable)
         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>;
+};
index 52e4b1356b368654320bbeb43d56860fffaf37bf..201e15a1d68451f2dc29adfa849e36eeced86de5 100755 (executable)
 };
 
 &tve {
+       status = "disabled";
+};
+
+&hdmi {
        status = "okay";
+       //rockchips,hdmi_audio_source = <0>;
 };
index cc3230499082050e1f5e45734cc84644e5d77910..d9a48044e96f67265e3922a2a83e2dac54fc340f 100644 (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
index 83bd233b8ac7f00541a49e627161706d0e801dd8..c58dec98908da9d5ef995ed1f016e8d5d8f2842e 100755 (executable)
@@ -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)
index f94a1a02ec3c1b66d552ce696781d19592a3fb44..fcc35e1a27f714f62e135971102527dbc343056d 100755 (executable)
@@ -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)