All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/exynos: support exynos5422 mipi-dsi
@ 2016-01-30 14:11 Chanho Park
  2016-02-10  9:03 ` Andrzej Hajda
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chanho Park @ 2016-01-30 14:11 UTC (permalink / raw)
  To: inki.dae
  Cc: dri-devel, linux-samsung-soc, Chanho Park, Joonyoung Shim, Seung-Woo Kim

From: Chanho Park <chanho61.park@samsung.com>

This patch supports mipi dsi for exynos5422. The dsi register
offsets of the exynos5422 are similar with exynos5433. However,
the values of the registers are quite different from the
exynos5433. For example, the exynos5422 uses sw reset like
previous chips.

Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
 .../bindings/display/exynos/exynos_dsim.txt        |  1 +
 drivers/gpu/drm/exynos/exynos_drm_dsi.c            | 31 ++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt b/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt
index 0e6f0c0..22756b3 100644
--- a/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt
+++ b/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt
@@ -6,6 +6,7 @@ Required properties:
 		"samsung,exynos4210-mipi-dsi" /* for Exynos4 SoCs */
 		"samsung,exynos4415-mipi-dsi" /* for Exynos4415 SoC */
 		"samsung,exynos5410-mipi-dsi" /* for Exynos5410/5420/5440 SoCs */
+		"samsung,exynos5422-mipi-dsi" /* for Exynos5422/5800 SoCs */
 		"samsung,exynos5433-mipi-dsi" /* for Exynos5433 SoCs */
   - reg: physical base address and length of the registers set for the device
   - interrupts: should contain DSI interrupt
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index d84a498..3eff6bf 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -408,6 +408,24 @@ static unsigned int reg_values[] = {
 	[PHYTIMING_HS_TRAIL] = DSIM_PHYTIMING2_HS_TRAIL(0x0b),
 };
 
+static unsigned int exynos5422_reg_values[] = {
+	[RESET_TYPE] = DSIM_SWRST,
+	[PLL_TIMER] = 500,
+	[STOP_STATE_CNT] = 0xf,
+	[PHYCTRL_ULPS_EXIT] = DSIM_PHYCTRL_ULPS_EXIT(0xaf),
+	[PHYCTRL_VREG_LP] = 0,
+	[PHYCTRL_SLEW_UP] = 0,
+	[PHYTIMING_LPX] = DSIM_PHYTIMING_LPX(0x08),
+	[PHYTIMING_HS_EXIT] = DSIM_PHYTIMING_HS_EXIT(0x0d),
+	[PHYTIMING_CLK_PREPARE] = DSIM_PHYTIMING1_CLK_PREPARE(0x09),
+	[PHYTIMING_CLK_ZERO] = DSIM_PHYTIMING1_CLK_ZERO(0x30),
+	[PHYTIMING_CLK_POST] = DSIM_PHYTIMING1_CLK_POST(0x0e),
+	[PHYTIMING_CLK_TRAIL] = DSIM_PHYTIMING1_CLK_TRAIL(0x0a),
+	[PHYTIMING_HS_PREPARE] = DSIM_PHYTIMING2_HS_PREPARE(0x0c),
+	[PHYTIMING_HS_ZERO] = DSIM_PHYTIMING2_HS_ZERO(0x11),
+	[PHYTIMING_HS_TRAIL] = DSIM_PHYTIMING2_HS_TRAIL(0x0d),
+};
+
 static unsigned int exynos5433_reg_values[] = {
 	[RESET_TYPE] = DSIM_FUNCRST,
 	[PLL_TIMER] = 22200,
@@ -482,6 +500,17 @@ static struct exynos_dsi_driver_data exynos5433_dsi_driver_data = {
 	.reg_values = exynos5433_reg_values,
 };
 
+static struct exynos_dsi_driver_data exynos5422_dsi_driver_data = {
+	.reg_ofs = exynos5433_reg_ofs,
+	.plltmr_reg = 0xa0,
+	.has_clklane_stop = 1,
+	.num_clks = 2,
+	.max_freq = 1500,
+	.wait_for_reset = 1,
+	.num_bits_resol = 12,
+	.reg_values = exynos5422_reg_values,
+};
+
 static struct of_device_id exynos_dsi_of_match[] = {
 	{ .compatible = "samsung,exynos3250-mipi-dsi",
 	  .data = &exynos3_dsi_driver_data },
@@ -491,6 +520,8 @@ static struct of_device_id exynos_dsi_of_match[] = {
 	  .data = &exynos4415_dsi_driver_data },
 	{ .compatible = "samsung,exynos5410-mipi-dsi",
 	  .data = &exynos5_dsi_driver_data },
+	{ .compatible = "samsung,exynos5422-mipi-dsi",
+	  .data = &exynos5422_dsi_driver_data },
 	{ .compatible = "samsung,exynos5433-mipi-dsi",
 	  .data = &exynos5433_dsi_driver_data },
 	{ }
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/exynos: support exynos5422 mipi-dsi
  2016-01-30 14:11 [PATCH] drm/exynos: support exynos5422 mipi-dsi Chanho Park
@ 2016-02-10  9:03 ` Andrzej Hajda
  2016-02-10 12:34 ` Emil Velikov
  2016-02-11 11:07 ` Inki Dae
  2 siblings, 0 replies; 5+ messages in thread
From: Andrzej Hajda @ 2016-02-10  9:03 UTC (permalink / raw)
  To: Chanho Park, inki.dae
  Cc: Chanho Park, linux-samsung-soc, Seung-Woo Kim, dri-devel

On 01/30/2016 03:11 PM, Chanho Park wrote:
> From: Chanho Park <chanho61.park@samsung.com>
> 
> This patch supports mipi dsi for exynos5422. The dsi register
> offsets of the exynos5422 are similar with exynos5433. However,
> the values of the registers are quite different from the
> exynos5433. For example, the exynos5422 uses sw reset like
> previous chips.
> 
> Cc: Inki Dae <inki.dae@samsung.com>
> Cc: Joonyoung Shim <jy0922.shim@samsung.com>
> Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
--
Regards
Andrzej

> ---
>  .../bindings/display/exynos/exynos_dsim.txt        |  1 +
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c            | 31 ++++++++++++++++++++++
>  2 files changed, 32 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt b/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt
> index 0e6f0c0..22756b3 100644
> --- a/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt
> +++ b/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt
> @@ -6,6 +6,7 @@ Required properties:
>  		"samsung,exynos4210-mipi-dsi" /* for Exynos4 SoCs */
>  		"samsung,exynos4415-mipi-dsi" /* for Exynos4415 SoC */
>  		"samsung,exynos5410-mipi-dsi" /* for Exynos5410/5420/5440 SoCs */
> +		"samsung,exynos5422-mipi-dsi" /* for Exynos5422/5800 SoCs */
>  		"samsung,exynos5433-mipi-dsi" /* for Exynos5433 SoCs */
>    - reg: physical base address and length of the registers set for the device
>    - interrupts: should contain DSI interrupt
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index d84a498..3eff6bf 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -408,6 +408,24 @@ static unsigned int reg_values[] = {
>  	[PHYTIMING_HS_TRAIL] = DSIM_PHYTIMING2_HS_TRAIL(0x0b),
>  };
>  
> +static unsigned int exynos5422_reg_values[] = {
> +	[RESET_TYPE] = DSIM_SWRST,
> +	[PLL_TIMER] = 500,
> +	[STOP_STATE_CNT] = 0xf,
> +	[PHYCTRL_ULPS_EXIT] = DSIM_PHYCTRL_ULPS_EXIT(0xaf),
> +	[PHYCTRL_VREG_LP] = 0,
> +	[PHYCTRL_SLEW_UP] = 0,
> +	[PHYTIMING_LPX] = DSIM_PHYTIMING_LPX(0x08),
> +	[PHYTIMING_HS_EXIT] = DSIM_PHYTIMING_HS_EXIT(0x0d),
> +	[PHYTIMING_CLK_PREPARE] = DSIM_PHYTIMING1_CLK_PREPARE(0x09),
> +	[PHYTIMING_CLK_ZERO] = DSIM_PHYTIMING1_CLK_ZERO(0x30),
> +	[PHYTIMING_CLK_POST] = DSIM_PHYTIMING1_CLK_POST(0x0e),
> +	[PHYTIMING_CLK_TRAIL] = DSIM_PHYTIMING1_CLK_TRAIL(0x0a),
> +	[PHYTIMING_HS_PREPARE] = DSIM_PHYTIMING2_HS_PREPARE(0x0c),
> +	[PHYTIMING_HS_ZERO] = DSIM_PHYTIMING2_HS_ZERO(0x11),
> +	[PHYTIMING_HS_TRAIL] = DSIM_PHYTIMING2_HS_TRAIL(0x0d),
> +};
> +
>  static unsigned int exynos5433_reg_values[] = {
>  	[RESET_TYPE] = DSIM_FUNCRST,
>  	[PLL_TIMER] = 22200,
> @@ -482,6 +500,17 @@ static struct exynos_dsi_driver_data exynos5433_dsi_driver_data = {
>  	.reg_values = exynos5433_reg_values,
>  };
>  
> +static struct exynos_dsi_driver_data exynos5422_dsi_driver_data = {
> +	.reg_ofs = exynos5433_reg_ofs,
> +	.plltmr_reg = 0xa0,
> +	.has_clklane_stop = 1,
> +	.num_clks = 2,
> +	.max_freq = 1500,
> +	.wait_for_reset = 1,
> +	.num_bits_resol = 12,
> +	.reg_values = exynos5422_reg_values,
> +};
> +
>  static struct of_device_id exynos_dsi_of_match[] = {
>  	{ .compatible = "samsung,exynos3250-mipi-dsi",
>  	  .data = &exynos3_dsi_driver_data },
> @@ -491,6 +520,8 @@ static struct of_device_id exynos_dsi_of_match[] = {
>  	  .data = &exynos4415_dsi_driver_data },
>  	{ .compatible = "samsung,exynos5410-mipi-dsi",
>  	  .data = &exynos5_dsi_driver_data },
> +	{ .compatible = "samsung,exynos5422-mipi-dsi",
> +	  .data = &exynos5422_dsi_driver_data },
>  	{ .compatible = "samsung,exynos5433-mipi-dsi",
>  	  .data = &exynos5433_dsi_driver_data },
>  	{ }
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/exynos: support exynos5422 mipi-dsi
  2016-01-30 14:11 [PATCH] drm/exynos: support exynos5422 mipi-dsi Chanho Park
  2016-02-10  9:03 ` Andrzej Hajda
@ 2016-02-10 12:34 ` Emil Velikov
  2016-02-11 14:10   ` Chanho Park
  2016-02-11 11:07 ` Inki Dae
  2 siblings, 1 reply; 5+ messages in thread
From: Emil Velikov @ 2016-02-10 12:34 UTC (permalink / raw)
  To: Chanho Park
  Cc: Inki Dae, Chanho Park, moderated list:ARM/S5P EXYNOS AR...,
	Seung-Woo Kim, ML dri-devel

Hi Chanho Park

On 30 January 2016 at 14:11, Chanho Park <parkch98@gmail.com> wrote:
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c

>  static struct of_device_id exynos_dsi_of_match[] = {

If you feel extra gracious you can constify the array and all of it's
entries, for good measure.
Likely in another patch of course :-)

Regards,
Emil

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/exynos: support exynos5422 mipi-dsi
  2016-01-30 14:11 [PATCH] drm/exynos: support exynos5422 mipi-dsi Chanho Park
  2016-02-10  9:03 ` Andrzej Hajda
  2016-02-10 12:34 ` Emil Velikov
@ 2016-02-11 11:07 ` Inki Dae
  2 siblings, 0 replies; 5+ messages in thread
From: Inki Dae @ 2016-02-11 11:07 UTC (permalink / raw)
  To: Chanho Park
  Cc: dri-devel, linux-samsung-soc, Chanho Park, Joonyoung Shim, Seung-Woo Kim

Hi Chanho,

2016년 01월 30일 23:11에 Chanho Park 이(가) 쓴 글:
> From: Chanho Park <chanho61.park@samsung.com>
> 
> This patch supports mipi dsi for exynos5422. The dsi register
> offsets of the exynos5422 are similar with exynos5433. However,
> the values of the registers are quite different from the
> exynos5433. For example, the exynos5422 uses sw reset like
> previous chips.

Picked it up.

Thanks,
Inki Dae

> 
> Cc: Inki Dae <inki.dae@samsung.com>
> Cc: Joonyoung Shim <jy0922.shim@samsung.com>
> Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> ---
>  .../bindings/display/exynos/exynos_dsim.txt        |  1 +
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c            | 31 ++++++++++++++++++++++
>  2 files changed, 32 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt b/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt
> index 0e6f0c0..22756b3 100644
> --- a/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt
> +++ b/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt
> @@ -6,6 +6,7 @@ Required properties:
>  		"samsung,exynos4210-mipi-dsi" /* for Exynos4 SoCs */
>  		"samsung,exynos4415-mipi-dsi" /* for Exynos4415 SoC */
>  		"samsung,exynos5410-mipi-dsi" /* for Exynos5410/5420/5440 SoCs */
> +		"samsung,exynos5422-mipi-dsi" /* for Exynos5422/5800 SoCs */
>  		"samsung,exynos5433-mipi-dsi" /* for Exynos5433 SoCs */
>    - reg: physical base address and length of the registers set for the device
>    - interrupts: should contain DSI interrupt
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index d84a498..3eff6bf 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -408,6 +408,24 @@ static unsigned int reg_values[] = {
>  	[PHYTIMING_HS_TRAIL] = DSIM_PHYTIMING2_HS_TRAIL(0x0b),
>  };
>  
> +static unsigned int exynos5422_reg_values[] = {
> +	[RESET_TYPE] = DSIM_SWRST,
> +	[PLL_TIMER] = 500,
> +	[STOP_STATE_CNT] = 0xf,
> +	[PHYCTRL_ULPS_EXIT] = DSIM_PHYCTRL_ULPS_EXIT(0xaf),
> +	[PHYCTRL_VREG_LP] = 0,
> +	[PHYCTRL_SLEW_UP] = 0,
> +	[PHYTIMING_LPX] = DSIM_PHYTIMING_LPX(0x08),
> +	[PHYTIMING_HS_EXIT] = DSIM_PHYTIMING_HS_EXIT(0x0d),
> +	[PHYTIMING_CLK_PREPARE] = DSIM_PHYTIMING1_CLK_PREPARE(0x09),
> +	[PHYTIMING_CLK_ZERO] = DSIM_PHYTIMING1_CLK_ZERO(0x30),
> +	[PHYTIMING_CLK_POST] = DSIM_PHYTIMING1_CLK_POST(0x0e),
> +	[PHYTIMING_CLK_TRAIL] = DSIM_PHYTIMING1_CLK_TRAIL(0x0a),
> +	[PHYTIMING_HS_PREPARE] = DSIM_PHYTIMING2_HS_PREPARE(0x0c),
> +	[PHYTIMING_HS_ZERO] = DSIM_PHYTIMING2_HS_ZERO(0x11),
> +	[PHYTIMING_HS_TRAIL] = DSIM_PHYTIMING2_HS_TRAIL(0x0d),
> +};
> +
>  static unsigned int exynos5433_reg_values[] = {
>  	[RESET_TYPE] = DSIM_FUNCRST,
>  	[PLL_TIMER] = 22200,
> @@ -482,6 +500,17 @@ static struct exynos_dsi_driver_data exynos5433_dsi_driver_data = {
>  	.reg_values = exynos5433_reg_values,
>  };
>  
> +static struct exynos_dsi_driver_data exynos5422_dsi_driver_data = {
> +	.reg_ofs = exynos5433_reg_ofs,
> +	.plltmr_reg = 0xa0,
> +	.has_clklane_stop = 1,
> +	.num_clks = 2,
> +	.max_freq = 1500,
> +	.wait_for_reset = 1,
> +	.num_bits_resol = 12,
> +	.reg_values = exynos5422_reg_values,
> +};
> +
>  static struct of_device_id exynos_dsi_of_match[] = {
>  	{ .compatible = "samsung,exynos3250-mipi-dsi",
>  	  .data = &exynos3_dsi_driver_data },
> @@ -491,6 +520,8 @@ static struct of_device_id exynos_dsi_of_match[] = {
>  	  .data = &exynos4415_dsi_driver_data },
>  	{ .compatible = "samsung,exynos5410-mipi-dsi",
>  	  .data = &exynos5_dsi_driver_data },
> +	{ .compatible = "samsung,exynos5422-mipi-dsi",
> +	  .data = &exynos5422_dsi_driver_data },
>  	{ .compatible = "samsung,exynos5433-mipi-dsi",
>  	  .data = &exynos5433_dsi_driver_data },
>  	{ }
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/exynos: support exynos5422 mipi-dsi
  2016-02-10 12:34 ` Emil Velikov
@ 2016-02-11 14:10   ` Chanho Park
  0 siblings, 0 replies; 5+ messages in thread
From: Chanho Park @ 2016-02-11 14:10 UTC (permalink / raw)
  To: Emil Velikov
  Cc: Inki Dae, moderated list:ARM/S5P EXYNOS AR...,
	Seung-Woo Kim, ML dri-devel

Hi Emil,

On Wed, Feb 10, 2016 at 9:34 PM, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> Hi Chanho Park
>
> On 30 January 2016 at 14:11, Chanho Park <parkch98@gmail.com> wrote:
>> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>
>>  static struct of_device_id exynos_dsi_of_match[] = {
>
> If you feel extra gracious you can constify the array and all of it's
> entries, for good measure.
> Likely in another patch of course :-)

Andrzej already made the patch[1] as pointed out from you.

[1]: http://www.spinics.net/lists/dri-devel/msg100246.html

-- 
Best Regards,
Chanho Park

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-11 14:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-30 14:11 [PATCH] drm/exynos: support exynos5422 mipi-dsi Chanho Park
2016-02-10  9:03 ` Andrzej Hajda
2016-02-10 12:34 ` Emil Velikov
2016-02-11 14:10   ` Chanho Park
2016-02-11 11:07 ` Inki Dae

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.