All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] adv7604: Initialize drive strength to default when using DT
@ 2016-11-29 11:23 Lars-Peter Clausen
  2016-11-29 17:38 ` Laurent Pinchart
  2016-11-30 10:22 ` Niklas Söderlund
  0 siblings, 2 replies; 3+ messages in thread
From: Lars-Peter Clausen @ 2016-11-29 11:23 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Laurent Pinchart, linux-media, Lars-Peter Clausen

The adv7604 driver platform data contains fields for configuring the drive
strength of the output pins. When probing the driver through DT these
fields are not explicitly initialized, which means they are left at 0. This
is a reserved setting for the drive strength configuration though and can
cause signal integrity issues.

Whether these signal integrity issues are visible depends on the PCB
specifics (e.g. the higher the load capacitance for the output the more
visible the issue). But it has been observed on existing solutions at high
pixel clock rates.

Initialize the drive strength settings to the power-on-reset value of the
device when probing through devicetree to avoid this issue.

Fixes: 0e158be0162b ("adv7604: Add DT support")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/media/i2c/adv7604.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 5630eb2..a4dc64a 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -3132,6 +3132,9 @@ static int adv76xx_parse_dt(struct adv76xx_state *state)
 	state->pdata.blank_data = 1;
 	state->pdata.op_format_mode_sel = ADV7604_OP_FORMAT_MODE0;
 	state->pdata.bus_order = ADV7604_BUS_ORDER_RGB;
+	state->pdata.dr_str_data = ADV76XX_DR_STR_MEDIUM_HIGH;
+	state->pdata.dr_str_clk = ADV76XX_DR_STR_MEDIUM_HIGH;
+	state->pdata.dr_str_sync = ADV76XX_DR_STR_MEDIUM_HIGH;
 
 	return 0;
 }
-- 
2.1.4


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

* Re: [PATCH] [media] adv7604: Initialize drive strength to default when using DT
  2016-11-29 11:23 [PATCH] [media] adv7604: Initialize drive strength to default when using DT Lars-Peter Clausen
@ 2016-11-29 17:38 ` Laurent Pinchart
  2016-11-30 10:22 ` Niklas Söderlund
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2016-11-29 17:38 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Hans Verkuil, linux-media

Hi Lars,

Thank you for the patch.

On Tuesday 29 Nov 2016 12:23:48 Lars-Peter Clausen wrote:
> The adv7604 driver platform data contains fields for configuring the drive
> strength of the output pins. When probing the driver through DT these
> fields are not explicitly initialized, which means they are left at 0. This
> is a reserved setting for the drive strength configuration though and can
> cause signal integrity issues.
> 
> Whether these signal integrity issues are visible depends on the PCB
> specifics (e.g. the higher the load capacitance for the output the more
> visible the issue). But it has been observed on existing solutions at high
> pixel clock rates.
> 
> Initialize the drive strength settings to the power-on-reset value of the
> device when probing through devicetree to avoid this issue.
> 
> Fixes: 0e158be0162b ("adv7604: Add DT support")
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/i2c/adv7604.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
> index 5630eb2..a4dc64a 100644
> --- a/drivers/media/i2c/adv7604.c
> +++ b/drivers/media/i2c/adv7604.c
> @@ -3132,6 +3132,9 @@ static int adv76xx_parse_dt(struct adv76xx_state
> *state) state->pdata.blank_data = 1;
>  	state->pdata.op_format_mode_sel = ADV7604_OP_FORMAT_MODE0;
>  	state->pdata.bus_order = ADV7604_BUS_ORDER_RGB;
> +	state->pdata.dr_str_data = ADV76XX_DR_STR_MEDIUM_HIGH;
> +	state->pdata.dr_str_clk = ADV76XX_DR_STR_MEDIUM_HIGH;
> +	state->pdata.dr_str_sync = ADV76XX_DR_STR_MEDIUM_HIGH;
> 
>  	return 0;
>  }

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH] [media] adv7604: Initialize drive strength to default when using DT
  2016-11-29 11:23 [PATCH] [media] adv7604: Initialize drive strength to default when using DT Lars-Peter Clausen
  2016-11-29 17:38 ` Laurent Pinchart
@ 2016-11-30 10:22 ` Niklas Söderlund
  1 sibling, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2016-11-30 10:22 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Hans Verkuil, Laurent Pinchart, linux-media

Hi Lars,

On 2016-11-29 12:23:48 +0100, Lars-Peter Clausen wrote:
> The adv7604 driver platform data contains fields for configuring the drive
> strength of the output pins. When probing the driver through DT these
> fields are not explicitly initialized, which means they are left at 0. This
> is a reserved setting for the drive strength configuration though and can
> cause signal integrity issues.
> 
> Whether these signal integrity issues are visible depends on the PCB
> specifics (e.g. the higher the load capacitance for the output the more
> visible the issue). But it has been observed on existing solutions at high
> pixel clock rates.
> 
> Initialize the drive strength settings to the power-on-reset value of the
> device when probing through devicetree to avoid this issue.
> 
> Fixes: 0e158be0162b ("adv7604: Add DT support")
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

Tested on Renesas Koelsch board which uses a adv7612 for HDMI input.

Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/media/i2c/adv7604.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
> index 5630eb2..a4dc64a 100644
> --- a/drivers/media/i2c/adv7604.c
> +++ b/drivers/media/i2c/adv7604.c
> @@ -3132,6 +3132,9 @@ static int adv76xx_parse_dt(struct adv76xx_state *state)
>  	state->pdata.blank_data = 1;
>  	state->pdata.op_format_mode_sel = ADV7604_OP_FORMAT_MODE0;
>  	state->pdata.bus_order = ADV7604_BUS_ORDER_RGB;
> +	state->pdata.dr_str_data = ADV76XX_DR_STR_MEDIUM_HIGH;
> +	state->pdata.dr_str_clk = ADV76XX_DR_STR_MEDIUM_HIGH;
> +	state->pdata.dr_str_sync = ADV76XX_DR_STR_MEDIUM_HIGH;
>  
>  	return 0;
>  }
> -- 
> 2.1.4
> 

-- 
Regards,
Niklas Söderlund

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-29 11:23 [PATCH] [media] adv7604: Initialize drive strength to default when using DT Lars-Peter Clausen
2016-11-29 17:38 ` Laurent Pinchart
2016-11-30 10:22 ` Niklas Söderlund

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.