HDMI: modify dts file and add hdmi pclk

This commit is contained in:
zwl
2014-03-18 10:24:34 +08:00
parent d789a5d925
commit 3b6c6e3bb9
5 changed files with 19 additions and 9 deletions

View File

@@ -567,3 +567,8 @@
&lcdc1 {
status = "disable";
};
&hdmi {
status = "okay";
rockchips,hdmi_audio_source = <0>;
};

View File

@@ -226,6 +226,10 @@
status = "okay";
};
&hdmi {
status = "okay";
rockchips,hdmi_audio_source = <0>;
};
&adc {
status = "okay";

View File

@@ -412,10 +412,11 @@
compatible = "rockchip,rk3288-hdmi";
reg = <0xff980000 0x20000>;
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
rockchip,hdmi_lcdc_source = <1>;
pinctrl-names = "default", "gpio";
pinctrl-0 = <&i2c5_sda &i2c5_scl>;
pinctrl-1 = <&i2c5_gpio>;
clocks = <&clk_gates16 9>;
clock-names = "pclk_hdmi";
status = "disabled";
};

View File

@@ -214,14 +214,14 @@ static int rk3288_hdmi_probe(struct platform_device *pdev)
rk3288_hdmi_parse_dt(hdmi_dev);
//TODO Daisen wait to add cec iomux
/*enable hclk*/
hdmi_dev->hclk = devm_clk_get(hdmi_dev->dev,"hclk_hdmi"); //TODO Daisen wait to modify
if(IS_ERR(hdmi_dev->hclk)) {
dev_err(hdmi_dev->dev, "Unable to get hdmi hclk\n");
/*enable pclk*/
hdmi_dev->pclk = devm_clk_get(hdmi_dev->dev, "pclk_hdmi");
if(IS_ERR(hdmi_dev->pclk)) {
dev_err(hdmi_dev->dev, "Unable to get hdmi pclk\n");
ret = -ENXIO;
goto err0;
}
clk_prepare_enable(hdmi_dev->hclk);
clk_prepare_enable(hdmi_dev->pclk);
/*request and remap iomem*/
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -291,7 +291,7 @@ err2:
//iounmap((void*)hdmi_dev->regbase);
err1:
//release_mem_region(res->start,hdmi_dev->regsize_phy);
clk_disable_unprepare(hdmi_dev->hclk);
clk_disable_unprepare(hdmi_dev->pclk);
err0:
dev_info(hdmi_dev->dev, "rk3288 hdmi probe error.\n");
kfree(hdmi_dev);
@@ -322,7 +322,7 @@ static int rk3288_hdmi_remove(struct platform_device *pdev)
//iounmap((void*)hdmi_drv->regbase);
//release_mem_region(hdmi_drv->regbase_phy, hdmi_drv->regsize_phy);
clk_disable_unprepare(hdmi_dev->hclk);
clk_disable_unprepare(hdmi_dev->pclk);
fb_destroy_modelist(&hdmi_drv->edid.modelist);
if(hdmi_drv->edid.audio)
kfree(hdmi_drv->edid.audio);

View File

@@ -1376,7 +1376,7 @@ struct rk3288_hdmi_device {
int phy_i2cm_int;
struct mutex int_mutex;
struct device *dev;
struct clk *hclk; //HDMI AHP clk
struct clk *pclk; //HDMI AHP clk
struct hdmi driver;
struct dentry *debugfs_dir;
};