diff mbox

[3/7] video: exynos_mipi_dsim: Use the generic PHY driver

Message ID 1381940896-9355-4-git-send-email-kishon@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kishon Vijay Abraham I Oct. 16, 2013, 4:28 p.m. UTC
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>

Use the generic PHY API instead of the platform callback
for the MIPI DSIM DPHY enable/reset control.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Donghwa Lee <dh09.lee@samsung.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/video/exynos/Kconfig           |    1 +
 drivers/video/exynos/exynos_mipi_dsi.c |   19 ++++++++++---------
 include/video/exynos_mipi_dsim.h       |    5 ++---
 3 files changed, 13 insertions(+), 12 deletions(-)

Comments

Olof Johansson Oct. 24, 2013, 2:30 p.m. UTC | #1
Hi Kishon,

On Wed, Oct 16, 2013 at 9:28 AM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
> diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
> index 32e5406..00b3a52 100644
> --- a/drivers/video/exynos/exynos_mipi_dsi.c
> +++ b/drivers/video/exynos/exynos_mipi_dsi.c
> @@ -156,8 +157,7 @@ static int exynos_mipi_dsi_blank_mode(struct mipi_dsim_device *dsim, int power)
>                 exynos_mipi_regulator_enable(dsim);
>
>                 /* enable MIPI-DSI PHY. */
> -               if (dsim->pd->phy_enable)
> -                       dsim->pd->phy_enable(pdev, true);
> +               phy_power_on(dsim->phy);
>
>                 clk_enable(dsim->clock);
>

This introduces the below with exynos_defconfig:

../../drivers/video/exynos/exynos_mipi_dsi.c: In function
'exynos_mipi_dsi_blank_mode':
../../drivers/video/exynos/exynos_mipi_dsi.c:144:26: warning: unused
variable 'pdev' [-Wunused-variable]
  struct platform_device *pdev = to_platform_device(dsim->dev);


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sachin Kamat Oct. 24, 2013, 3:42 p.m. UTC | #2
Hi Olof,

On 24 October 2013 20:00, Olof Johansson <olof@lixom.net> wrote:
> Hi Kishon,
>
> On Wed, Oct 16, 2013 at 9:28 AM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
>> diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
>> index 32e5406..00b3a52 100644
>> --- a/drivers/video/exynos/exynos_mipi_dsi.c
>> +++ b/drivers/video/exynos/exynos_mipi_dsi.c
>> @@ -156,8 +157,7 @@ static int exynos_mipi_dsi_blank_mode(struct mipi_dsim_device *dsim, int power)
>>                 exynos_mipi_regulator_enable(dsim);
>>
>>                 /* enable MIPI-DSI PHY. */
>> -               if (dsim->pd->phy_enable)
>> -                       dsim->pd->phy_enable(pdev, true);
>> +               phy_power_on(dsim->phy);
>>
>>                 clk_enable(dsim->clock);
>>
>
> This introduces the below with exynos_defconfig:
>
> ../../drivers/video/exynos/exynos_mipi_dsi.c: In function
> 'exynos_mipi_dsi_blank_mode':
> ../../drivers/video/exynos/exynos_mipi_dsi.c:144:26: warning: unused
> variable 'pdev' [-Wunused-variable]
>   struct platform_device *pdev = to_platform_device(dsim->dev);
>

I have already submitted a patch to fix this [1]

[1] http://marc.info/?l=linux-fbdev&m=138233359617936&w=2
Kishon Vijay Abraham I Oct. 24, 2013, 3:57 p.m. UTC | #3
Hi,

On Thursday 24 October 2013 09:12 PM, Sachin Kamat wrote:
> Hi Olof,
> 
> On 24 October 2013 20:00, Olof Johansson <olof@lixom.net> wrote:
>> Hi Kishon,
>>
>> On Wed, Oct 16, 2013 at 9:28 AM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
>>> diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
>>> index 32e5406..00b3a52 100644
>>> --- a/drivers/video/exynos/exynos_mipi_dsi.c
>>> +++ b/drivers/video/exynos/exynos_mipi_dsi.c
>>> @@ -156,8 +157,7 @@ static int exynos_mipi_dsi_blank_mode(struct mipi_dsim_device *dsim, int power)
>>>                 exynos_mipi_regulator_enable(dsim);
>>>
>>>                 /* enable MIPI-DSI PHY. */
>>> -               if (dsim->pd->phy_enable)
>>> -                       dsim->pd->phy_enable(pdev, true);
>>> +               phy_power_on(dsim->phy);
>>>
>>>                 clk_enable(dsim->clock);
>>>
>>
>> This introduces the below with exynos_defconfig:
>>
>> ../../drivers/video/exynos/exynos_mipi_dsi.c: In function
>> 'exynos_mipi_dsi_blank_mode':
>> ../../drivers/video/exynos/exynos_mipi_dsi.c:144:26: warning: unused
>> variable 'pdev' [-Wunused-variable]
>>   struct platform_device *pdev = to_platform_device(dsim->dev);
>>
> 
> I have already submitted a patch to fix this [1]
> 
> [1] http://marc.info/?l=linux-fbdev&m=138233359617936&w=2

Sorry, missed that :-(

Thanks
Kishon
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Olof Johansson Oct. 24, 2013, 5:06 p.m. UTC | #4
On Thu, Oct 24, 2013 at 8:42 AM, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> Hi Olof,
>
> On 24 October 2013 20:00, Olof Johansson <olof@lixom.net> wrote:
>> Hi Kishon,
>>
>> On Wed, Oct 16, 2013 at 9:28 AM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
>>> diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
>>> index 32e5406..00b3a52 100644
>>> --- a/drivers/video/exynos/exynos_mipi_dsi.c
>>> +++ b/drivers/video/exynos/exynos_mipi_dsi.c
>>> @@ -156,8 +157,7 @@ static int exynos_mipi_dsi_blank_mode(struct mipi_dsim_device *dsim, int power)
>>>                 exynos_mipi_regulator_enable(dsim);
>>>
>>>                 /* enable MIPI-DSI PHY. */
>>> -               if (dsim->pd->phy_enable)
>>> -                       dsim->pd->phy_enable(pdev, true);
>>> +               phy_power_on(dsim->phy);
>>>
>>>                 clk_enable(dsim->clock);
>>>
>>
>> This introduces the below with exynos_defconfig:
>>
>> ../../drivers/video/exynos/exynos_mipi_dsi.c: In function
>> 'exynos_mipi_dsi_blank_mode':
>> ../../drivers/video/exynos/exynos_mipi_dsi.c:144:26: warning: unused
>> variable 'pdev' [-Wunused-variable]
>>   struct platform_device *pdev = to_platform_device(dsim->dev);
>>
>
> I have already submitted a patch to fix this [1]
>
> [1] http://marc.info/?l=linux-fbdev&m=138233359617936&w=2

Ah, I'm not subscribed to the fbdev list. Next time it might be a good
idea to cc the same lists as the original patch. But thanks for fixing
it!


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sylwester Nawrocki Oct. 24, 2013, 9:57 p.m. UTC | #5
On 10/24/2013 05:57 PM, Kishon Vijay Abraham I wrote:
> On Thursday 24 October 2013 09:12 PM, Sachin Kamat wrote:
>> On 24 October 2013 20:00, Olof Johansson<olof@lixom.net>  wrote:
>>> On Wed, Oct 16, 2013 at 9:28 AM, Kishon Vijay Abraham I<kishon@ti.com>  wrote:
>>>> diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
>>>> index 32e5406..00b3a52 100644
>>>> --- a/drivers/video/exynos/exynos_mipi_dsi.c
>>>> +++ b/drivers/video/exynos/exynos_mipi_dsi.c
>>>> @@ -156,8 +157,7 @@ static int exynos_mipi_dsi_blank_mode(struct mipi_dsim_device *dsim, int power)
>>>>                  exynos_mipi_regulator_enable(dsim);
>>>>
>>>>                  /* enable MIPI-DSI PHY. */
>>>> -               if (dsim->pd->phy_enable)
>>>> -                       dsim->pd->phy_enable(pdev, true);
>>>> +               phy_power_on(dsim->phy);
>>>>
>>>>                  clk_enable(dsim->clock);
>>>>
>>>
>>> This introduces the below with exynos_defconfig:
>>>
>>> ../../drivers/video/exynos/exynos_mipi_dsi.c: In function
>>> 'exynos_mipi_dsi_blank_mode':
>>> ../../drivers/video/exynos/exynos_mipi_dsi.c:144:26: warning: unused
>>> variable 'pdev' [-Wunused-variable]
>>>    struct platform_device *pdev = to_platform_device(dsim->dev);

Sorry about missing that, I only noticed this warning recently and didn't
get around to submit a patch.

>> I have already submitted a patch to fix this [1]

Thanks a lot guys for fixing this.

>> [1] http://marc.info/?l=linux-fbdev&m=138233359617936&w=2
>
> Sorry, missed that :-(

This MIPI DSIM driver is affectively a dead code in the mainline now, once
Exynos become a dt-only platform. I guess it can be deleted for 3.14, once
S5P gets converted to the device tree. The new driver using CDF is basically
a complete rewrite. Or device tree support should be added to that driver,
but I believe it doesn't make sense without CDF.

--
Regards,
Sylwester
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Donghwa Lee Oct. 28, 2013, 6:12 a.m. UTC | #6
On Fri, OCT 25, 2013 06:57, Sylwester Nawrocki wrote:
> On 10/24/2013 05:57 PM, Kishon Vijay Abraham I wrote:
>> On Thursday 24 October 2013 09:12 PM, Sachin Kamat wrote:
>>> On 24 October 2013 20:00, Olof Johansson<olof@lixom.net>  wrote:
>>>> On Wed, Oct 16, 2013 at 9:28 AM, Kishon Vijay Abraham I<kishon@ti.com>  wrote:
>>>>> diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
>>>>> index 32e5406..00b3a52 100644
>>>>> --- a/drivers/video/exynos/exynos_mipi_dsi.c
>>>>> +++ b/drivers/video/exynos/exynos_mipi_dsi.c
>>>>> @@ -156,8 +157,7 @@ static int exynos_mipi_dsi_blank_mode(struct mipi_dsim_device *dsim, int power)
>>>>>                  exynos_mipi_regulator_enable(dsim);
>>>>>
>>>>>                  /* enable MIPI-DSI PHY. */
>>>>> -               if (dsim->pd->phy_enable)
>>>>> -                       dsim->pd->phy_enable(pdev, true);
>>>>> +               phy_power_on(dsim->phy);
>>>>>
>>>>>                  clk_enable(dsim->clock);
>>>>>
>>>>
>>>> This introduces the below with exynos_defconfig:
>>>>
>>>> ../../drivers/video/exynos/exynos_mipi_dsi.c: In function
>>>> 'exynos_mipi_dsi_blank_mode':
>>>> ../../drivers/video/exynos/exynos_mipi_dsi.c:144:26: warning: unused
>>>> variable 'pdev' [-Wunused-variable]
>>>>    struct platform_device *pdev = to_platform_device(dsim->dev);
>
> Sorry about missing that, I only noticed this warning recently and didn't
> get around to submit a patch.
>
>>> I have already submitted a patch to fix this [1]
>
> Thanks a lot guys for fixing this.
>
>>> [1] http://marc.info/?l=linux-fbdev&m=138233359617936&w=2
>>
>> Sorry, missed that :-(
>
> This MIPI DSIM driver is affectively a dead code in the mainline now, once
> Exynos become a dt-only platform. I guess it can be deleted for 3.14, once
> S5P gets converted to the device tree. The new driver using CDF is basically
> a complete rewrite. Or device tree support should be added to that driver,
> but I believe it doesn't make sense without CDF.
>

MIPI DSIM driver is not a dead code. There is a steady trickle of patches.
It's kind of late, but, I will update it as DT based drivers as soon as possible.
And Why do you think that DT support of existing MIPI DSIM is something less
than great?


> -- 
> Regards,
> Sylwester
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tomasz Figa Oct. 28, 2013, 12:24 p.m. UTC | #7
Hi Donghwa,

On Monday 28 of October 2013 15:12:08 Donghwa Lee wrote:
> On Fri, OCT 25, 2013 06:57, Sylwester Nawrocki wrote:
> > On 10/24/2013 05:57 PM, Kishon Vijay Abraham I wrote:
> >> On Thursday 24 October 2013 09:12 PM, Sachin Kamat wrote:
> >>> On 24 October 2013 20:00, Olof Johansson<olof@lixom.net>  wrote:
> >>>> On Wed, Oct 16, 2013 at 9:28 AM, Kishon Vijay Abraham I<kishon@ti.com>  wrote:
> >>>>> diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
> >>>>> index 32e5406..00b3a52 100644
> >>>>> --- a/drivers/video/exynos/exynos_mipi_dsi.c
> >>>>> +++ b/drivers/video/exynos/exynos_mipi_dsi.c
> >>>>> @@ -156,8 +157,7 @@ static int exynos_mipi_dsi_blank_mode(struct mipi_dsim_device *dsim, int power)
> >>>>>                  exynos_mipi_regulator_enable(dsim);
> >>>>>
> >>>>>                  /* enable MIPI-DSI PHY. */
> >>>>> -               if (dsim->pd->phy_enable)
> >>>>> -                       dsim->pd->phy_enable(pdev, true);
> >>>>> +               phy_power_on(dsim->phy);
> >>>>>
> >>>>>                  clk_enable(dsim->clock);
> >>>>>
> >>>>
> >>>> This introduces the below with exynos_defconfig:
> >>>>
> >>>> ../../drivers/video/exynos/exynos_mipi_dsi.c: In function
> >>>> 'exynos_mipi_dsi_blank_mode':
> >>>> ../../drivers/video/exynos/exynos_mipi_dsi.c:144:26: warning: unused
> >>>> variable 'pdev' [-Wunused-variable]
> >>>>    struct platform_device *pdev = to_platform_device(dsim->dev);
> >
> > Sorry about missing that, I only noticed this warning recently and didn't
> > get around to submit a patch.
> >
> >>> I have already submitted a patch to fix this [1]
> >
> > Thanks a lot guys for fixing this.
> >
> >>> [1] http://marc.info/?l=linux-fbdev&m=138233359617936&w=2
> >>
> >> Sorry, missed that :-(
> >
> > This MIPI DSIM driver is affectively a dead code in the mainline now, once
> > Exynos become a dt-only platform. I guess it can be deleted for 3.14, once
> > S5P gets converted to the device tree. The new driver using CDF is basically
> > a complete rewrite. Or device tree support should be added to that driver,
> > but I believe it doesn't make sense without CDF.
> >
> 
> MIPI DSIM driver is not a dead code. There is a steady trickle of patches.
> It's kind of late, but, I will update it as DT based drivers as soon as possible.
> And Why do you think that DT support of existing MIPI DSIM is something less
> than great?

First of all, the exynos_mipi_dsim driver has currently no users in
mainline kernel, so it is essentially dead code. In addition, on
a platform that is the primary candidate for using it, which is Exynos,
there is no way to use it, due to no DT support.

As for the driver itself, it is not really a great example of good code.
It contains a hacks, like calling msleep() without any clear reason and
also many coding style issues. I'd prefer to replace it with the new
exynos-dsi driver rewritten completely in SRPOL, when CDF is finished.

Best regards,
Tomasz

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Donghwa Lee Oct. 29, 2013, 8:38 a.m. UTC | #8
Hi Tomasz,
On Tue, OCT 28, 2013 21:24, Tomasz Figa wrote:
> Hi Donghwa,
>
> On Monday 28 of October 2013 15:12:08 Donghwa Lee wrote:
>> On Fri, OCT 25, 2013 06:57, Sylwester Nawrocki wrote:
>>> On 10/24/2013 05:57 PM, Kishon Vijay Abraham I wrote:
>>>> On Thursday 24 October 2013 09:12 PM, Sachin Kamat wrote:
>>>>> On 24 October 2013 20:00, Olof Johansson<olof@lixom.net>  wrote:
>>>>>> On Wed, Oct 16, 2013 at 9:28 AM, Kishon Vijay Abraham I<kishon@ti.com>  wrote:
>>>>>>> diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
>>>>>>> index 32e5406..00b3a52 100644
>>>>>>> --- a/drivers/video/exynos/exynos_mipi_dsi.c
>>>>>>> +++ b/drivers/video/exynos/exynos_mipi_dsi.c
>>>>>>> @@ -156,8 +157,7 @@ static int exynos_mipi_dsi_blank_mode(struct mipi_dsim_device *dsim, int power)
>>>>>>>                  exynos_mipi_regulator_enable(dsim);
>>>>>>>
>>>>>>>                  /* enable MIPI-DSI PHY. */
>>>>>>> -               if (dsim->pd->phy_enable)
>>>>>>> -                       dsim->pd->phy_enable(pdev, true);
>>>>>>> +               phy_power_on(dsim->phy);
>>>>>>>
>>>>>>>                  clk_enable(dsim->clock);
>>>>>>>
>>>>>> This introduces the below with exynos_defconfig:
>>>>>>
>>>>>> ../../drivers/video/exynos/exynos_mipi_dsi.c: In function
>>>>>> 'exynos_mipi_dsi_blank_mode':
>>>>>> ../../drivers/video/exynos/exynos_mipi_dsi.c:144:26: warning: unused
>>>>>> variable 'pdev' [-Wunused-variable]
>>>>>>    struct platform_device *pdev = to_platform_device(dsim->dev);
>>> Sorry about missing that, I only noticed this warning recently and didn't
>>> get around to submit a patch.
>>>
>>>>> I have already submitted a patch to fix this [1]
>>> Thanks a lot guys for fixing this.
>>>
>>>>> [1] http://marc.info/?l=linux-fbdev&m=138233359617936&w=2
>>>> Sorry, missed that :-(
>>> This MIPI DSIM driver is affectively a dead code in the mainline now, once
>>> Exynos become a dt-only platform. I guess it can be deleted for 3.14, once
>>> S5P gets converted to the device tree. The new driver using CDF is basically
>>> a complete rewrite. Or device tree support should be added to that driver,
>>> but I believe it doesn't make sense without CDF.
>>>
>> MIPI DSIM driver is not a dead code. There is a steady trickle of patches.
>> It's kind of late, but, I will update it as DT based drivers as soon as possible.
>> And Why do you think that DT support of existing MIPI DSIM is something less
>> than great?
> First of all, the exynos_mipi_dsim driver has currently no users in
> mainline kernel, so it is essentially dead code. In addition, on
> a platform that is the primary candidate for using it, which is Exynos,
> there is no way to use it, due to no DT support.
As I mentioned above, patches are submitted sometimes and I will update
this driver as soon as possible to support DT.
> As for the driver itself, it is not really a great example of good code.
> It contains a hacks, like calling msleep() without any clear reason and
> also many coding style issues. I'd prefer to replace it with the new
> exynos-dsi driver rewritten completely in SRPOL, when CDF is finished.

Yes, I know this drivers had been changed about only minor issues and
it is not really good code style. And CDF is more good and light.
But discussion for CDF is still remaining a kind of requests. If it is merged
into linux kernel and many users use it, existing MIPI DSI drivers will be
replaced with the new drivers naturally, isn't it?
Until that, I and quite a few users will update and code re-factory for
this drivers to be more better.

BR,
Donghwa Lee
> Best regards,
> Tomasz
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sylwester Nawrocki Oct. 30, 2013, 12:43 a.m. UTC | #9
On 10/29/2013 09:38 AM, Donghwa Lee wrote:
> On Tue, OCT 28, 2013 21:24, Tomasz Figa wrote:
>> On Monday 28 of October 2013 15:12:08 Donghwa Lee wrote:
[...]
>> First of all, the exynos_mipi_dsim driver has currently no users in
>> mainline kernel, so it is essentially dead code. In addition, on
>> a platform that is the primary candidate for using it, which is Exynos,
>> there is no way to use it, due to no DT support.
>
> As I mentioned above, patches are submitted sometimes and I will update
> this driver as soon as possible to support DT.
>
>> As for the driver itself, it is not really a great example of good code.
>> It contains a hacks, like calling msleep() without any clear reason and
>> also many coding style issues. I'd prefer to replace it with the new
>> exynos-dsi driver rewritten completely in SRPOL, when CDF is finished.
>
> Yes, I know this drivers had been changed about only minor issues and
> it is not really good code style. And CDF is more good and light.
> But discussion for CDF is still remaining a kind of requests. If it is merged
> into linux kernel and many users use it, existing MIPI DSI drivers will be
> replaced with the new drivers naturally, isn't it?

Not necessarily. Our goal should be to have fairly stable DT binding at the
SoC side so all available panels can possibly be used with any SoC without
problems.

Then please refrain for a while from pushing entirely vendor specific DT
bindings upstream. Let's focus instead on an as much as possible common
framework and the DT bindings. Whether the CDF will be part of DRM or not
the DT bindings are supposed to be generic, so they work with whatever
driver architecture.

I guess you could try to come up with an unstable DT binding for the
MIPI DSIM and display panels it is used with, but at this stage it seems
just a waste of time.
If there were no SoC specific panel drivers in the kernel there would be
now much less trouble with DT support.

--
Thanks,
Sylwester
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/video/exynos/Kconfig b/drivers/video/exynos/Kconfig
index 1b035b2..976594d 100644
--- a/drivers/video/exynos/Kconfig
+++ b/drivers/video/exynos/Kconfig
@@ -16,6 +16,7 @@  if EXYNOS_VIDEO
 config EXYNOS_MIPI_DSI
 	bool "EXYNOS MIPI DSI driver support."
 	depends on ARCH_S5PV210 || ARCH_EXYNOS
+	select GENERIC_PHY
 	help
 	  This enables support for MIPI-DSI device.
 
diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
index 32e5406..00b3a52 100644
--- a/drivers/video/exynos/exynos_mipi_dsi.c
+++ b/drivers/video/exynos/exynos_mipi_dsi.c
@@ -30,6 +30,7 @@ 
 #include <linux/interrupt.h>
 #include <linux/kthread.h>
 #include <linux/notifier.h>
+#include <linux/phy/phy.h>
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
 #include <linux/err.h>
@@ -156,8 +157,7 @@  static int exynos_mipi_dsi_blank_mode(struct mipi_dsim_device *dsim, int power)
 		exynos_mipi_regulator_enable(dsim);
 
 		/* enable MIPI-DSI PHY. */
-		if (dsim->pd->phy_enable)
-			dsim->pd->phy_enable(pdev, true);
+		phy_power_on(dsim->phy);
 
 		clk_enable(dsim->clock);
 
@@ -373,6 +373,10 @@  static int exynos_mipi_dsi_probe(struct platform_device *pdev)
 		return ret;
 	}
 
+	dsim->phy = devm_phy_get(&pdev->dev, "dsim");
+	if (IS_ERR(dsim->phy))
+		return PTR_ERR(dsim->phy);
+
 	dsim->clock = devm_clk_get(&pdev->dev, "dsim0");
 	if (IS_ERR(dsim->clock)) {
 		dev_err(&pdev->dev, "failed to get dsim clock source\n");
@@ -439,8 +443,7 @@  static int exynos_mipi_dsi_probe(struct platform_device *pdev)
 	exynos_mipi_regulator_enable(dsim);
 
 	/* enable MIPI-DSI PHY. */
-	if (dsim->pd->phy_enable)
-		dsim->pd->phy_enable(pdev, true);
+	phy_power_on(dsim->phy);
 
 	exynos_mipi_update_cfg(dsim);
 
@@ -504,9 +507,8 @@  static int exynos_mipi_dsi_suspend(struct device *dev)
 	if (client_drv && client_drv->suspend)
 		client_drv->suspend(client_dev);
 
-	/* enable MIPI-DSI PHY. */
-	if (dsim->pd->phy_enable)
-		dsim->pd->phy_enable(pdev, false);
+	/* disable MIPI-DSI PHY. */
+	phy_power_off(dsim->phy);
 
 	clk_disable(dsim->clock);
 
@@ -536,8 +538,7 @@  static int exynos_mipi_dsi_resume(struct device *dev)
 	exynos_mipi_regulator_enable(dsim);
 
 	/* enable MIPI-DSI PHY. */
-	if (dsim->pd->phy_enable)
-		dsim->pd->phy_enable(pdev, true);
+	phy_power_on(dsim->phy);
 
 	clk_enable(dsim->clock);
 
diff --git a/include/video/exynos_mipi_dsim.h b/include/video/exynos_mipi_dsim.h
index 89dc88a..6a578f8 100644
--- a/include/video/exynos_mipi_dsim.h
+++ b/include/video/exynos_mipi_dsim.h
@@ -216,6 +216,7 @@  struct mipi_dsim_config {
  *	automatically.
  * @e_clk_src: select byte clock source.
  * @pd: pointer to MIPI-DSI driver platform data.
+ * @phy: pointer to the MIPI-DSI PHY
  */
 struct mipi_dsim_device {
 	struct device			*dev;
@@ -236,6 +237,7 @@  struct mipi_dsim_device {
 	bool				suspended;
 
 	struct mipi_dsim_platform_data	*pd;
+	struct phy			*phy;
 };
 
 /*
@@ -248,7 +250,6 @@  struct mipi_dsim_device {
  * @enabled: indicate whether mipi controller got enabled or not.
  * @lcd_panel_info: pointer for lcd panel specific structure.
  *	this structure specifies width, height, timing and polarity and so on.
- * @phy_enable: pointer to a callback controlling D-PHY enable/reset
  */
 struct mipi_dsim_platform_data {
 	char				lcd_panel_name[PANEL_NAME_SIZE];
@@ -256,8 +257,6 @@  struct mipi_dsim_platform_data {
 	struct mipi_dsim_config		*dsim_config;
 	unsigned int			enabled;
 	void				*lcd_panel_info;
-
-	int (*phy_enable)(struct platform_device *pdev, bool on);
 };
 
 /*