Commit bfe4e84c authored by Inki Dae's avatar Inki Dae Committed by Inki Dae

drm/exynos: hdmi: consider APB PHY

This patch returns error in case of using APB PHY.

Exynos5420 SoC and maybe later would use APB PHY instead of
I2C PHY so such case should be considered.
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
parent 90672f92
...@@ -64,6 +64,11 @@ enum hdmi_type { ...@@ -64,6 +64,11 @@ enum hdmi_type {
HDMI_TYPE14, HDMI_TYPE14,
}; };
struct hdmi_driver_data {
unsigned int type;
unsigned int is_apb_phy:1;
};
struct hdmi_resources { struct hdmi_resources {
struct clk *hdmi; struct clk *hdmi;
struct clk *sclk_hdmi; struct clk *sclk_hdmi;
...@@ -199,6 +204,14 @@ struct hdmiphy_config { ...@@ -199,6 +204,14 @@ struct hdmiphy_config {
u8 conf[32]; u8 conf[32];
}; };
struct hdmi_driver_data exynos4212_hdmi_driver_data = {
.type = HDMI_TYPE14,
};
struct hdmi_driver_data exynos5_hdmi_driver_data = {
.type = HDMI_TYPE14,
};
/* list of phy config settings */ /* list of phy config settings */
static const struct hdmiphy_config hdmiphy_v13_configs[] = { static const struct hdmiphy_config hdmiphy_v13_configs[] = {
{ {
...@@ -2025,10 +2038,10 @@ static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata ...@@ -2025,10 +2038,10 @@ static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
static struct of_device_id hdmi_match_types[] = { static struct of_device_id hdmi_match_types[] = {
{ {
.compatible = "samsung,exynos5-hdmi", .compatible = "samsung,exynos5-hdmi",
.data = (void *)HDMI_TYPE14, .data = &exynos5_hdmi_driver_data,
}, { }, {
.compatible = "samsung,exynos4212-hdmi", .compatible = "samsung,exynos4212-hdmi",
.data = (void *)HDMI_TYPE14, .data = &exynos4212_hdmi_driver_data,
}, { }, {
/* end node */ /* end node */
} }
...@@ -2042,6 +2055,7 @@ static int hdmi_probe(struct platform_device *pdev) ...@@ -2042,6 +2055,7 @@ static int hdmi_probe(struct platform_device *pdev)
struct resource *res; struct resource *res;
const struct of_device_id *match; const struct of_device_id *match;
struct device_node *ddc_node, *phy_node; struct device_node *ddc_node, *phy_node;
struct hdmi_driver_data *drv_data;
int ret; int ret;
if (!dev->of_node) if (!dev->of_node)
...@@ -2062,7 +2076,9 @@ static int hdmi_probe(struct platform_device *pdev) ...@@ -2062,7 +2076,9 @@ static int hdmi_probe(struct platform_device *pdev)
match = of_match_node(hdmi_match_types, dev->of_node); match = of_match_node(hdmi_match_types, dev->of_node);
if (!match) if (!match)
return -ENODEV; return -ENODEV;
hdata->type = (enum hdmi_type)match->data;
drv_data = (struct hdmi_driver_data *)match->data;
hdata->type = drv_data->type;
hdata->hpd_gpio = pdata->hpd_gpio; hdata->hpd_gpio = pdata->hpd_gpio;
hdata->dev = dev; hdata->dev = dev;
...@@ -2096,6 +2112,10 @@ static int hdmi_probe(struct platform_device *pdev) ...@@ -2096,6 +2112,10 @@ static int hdmi_probe(struct platform_device *pdev)
return -ENODEV; return -ENODEV;
} }
/* Not support APB PHY yet. */
if (drv_data->is_apb_phy)
return -EPERM;
/* hdmiphy i2c driver */ /* hdmiphy i2c driver */
phy_node = of_parse_phandle(dev->of_node, "phy", 0); phy_node = of_parse_phandle(dev->of_node, "phy", 0);
if (!phy_node) { if (!phy_node) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment