All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH] arm: mvebu: a38x: Configurable USB2 high-speed impedance threshold
Date: Fri, 6 Nov 2020 08:28:40 +0100	[thread overview]
Message-ID: <815903c3-2c14-295f-86b1-0d7d2c3b4509@denx.de> (raw)
In-Reply-To: <20201106040806.11042-1-joshua.scott@alliedtelesis.co.nz>

On 06.11.20 05:08, Joshua Scott wrote:
> Hardware testing of a board using the Armada 385 has shown that an
> impedance threshold setting of 0x7 performs better in an eye-diagram
> test than with Marvell's recommended value 0x6.
> 
> As other boards may still perform better with Marvell's reccomended value,
> a configuration option is added with a default value of 0x6.
> 
> Signed-off-by: Joshua Scott <joshua.scott@alliedtelesis.co.nz>
> Cc: Stefan Roese <sr@denx.de.in>
> ---
>   arch/arm/mach-mvebu/Kconfig                           | 5 +++++
>   arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c | 6 +++---
>   2 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
> index 0d8e0922a2..bec011e584 100644
> --- a/arch/arm/mach-mvebu/Kconfig
> +++ b/arch/arm/mach-mvebu/Kconfig
> @@ -30,6 +30,11 @@ config ARMADA_38X
>   	select ARMADA_32BIT
>   	select HAVE_MVEBU_EFUSE
>   
> +config ARMADA_38X_HS_IMPEDANCE_THRESH
> +	hex  "Armada 38x USB 2.0 High-Speed Impedance Threshold (0x0 - 0x7)"
> +	depends on ARMADA_38X
> +	default 0x6
> +

Please add "range" here (range 0 7), so that no unsupported values can
be chosen here.

Other than that:

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

>   config ARMADA_XP
>   	bool
>   	select ARMADA_32BIT
> diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
> index 2454730e6d..ae2a361104 100644
> --- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
> +++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
> @@ -677,9 +677,9 @@ struct op_params usb2_power_up_params[] = {
>   	{0xc200c, 0x0 /*NA*/, 0xf000, {0x1000}, 0, 0},
>   	{0xc400c, 0x0 /*NA*/, 0xf000, {0x1000}, 0, 0},
>   	/* Change the High speed impedance threshold */
> -	{0xc0008, 0x0 /*NA*/, 0x700, {0x600}, 0, 0},
> -	{0xc2008, 0x0 /*NA*/, 0x700, {0x600}, 0, 0},
> -	{0xc4008, 0x0 /*NA*/, 0x700, {0x600}, 0, 0},
> +	{0xc0008, 0x0 /*NA*/, 0x700, {CONFIG_ARMADA_38X_HS_IMPEDANCE_THRESH << 8}, 0, 0},
> +	{0xc2008, 0x0 /*NA*/, 0x700, {CONFIG_ARMADA_38X_HS_IMPEDANCE_THRESH << 8}, 0, 0},
> +	{0xc4008, 0x0 /*NA*/, 0x700, {CONFIG_ARMADA_38X_HS_IMPEDANCE_THRESH << 8}, 0, 0},
>   	/* Change the squelch level of the receiver to meet the receiver electrical measurements (squelch and receiver sensitivity tests) */
>   	{0xc0014, 0x0 /*NA*/, 0xf, {0x8}, 0, 0},
>   	{0xc2014, 0x0 /*NA*/, 0xf, {0x8}, 0, 0},
> 


Viele Gr??e,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de

      reply	other threads:[~2020-11-06  7:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06  4:08 [PATCH] arm: mvebu: a38x: Configurable USB2 high-speed impedance threshold Joshua Scott
2020-11-06  7:28 ` Stefan Roese [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=815903c3-2c14-295f-86b1-0d7d2c3b4509@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.