From patchwork Sun Nov 8 21:14:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joshua Scott X-Patchwork-Id: 1396399 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=alliedtelesis.co.nz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.a=rsa-sha256 header.s=mail181024 header.b=j5OWuSfU; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CTn3L1qL8z9sSs for ; Mon, 9 Nov 2020 08:15:33 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CA9EE82399; Sun, 8 Nov 2020 22:15:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=alliedtelesis.co.nz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b="j5OWuSfU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 59D598239B; Sun, 8 Nov 2020 22:15:07 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [202.36.163.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5FE588234E for ; Sun, 8 Nov 2020 22:14:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=alliedtelesis.co.nz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=joshuas@alliedtelesis.co.nz Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id CE5D2806AC; Mon, 9 Nov 2020 10:14:21 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1604870061; bh=uPl6WGovw0cfypqGuaBIk4w4TCLc31OPkXJa9fnOYH8=; h=From:To:Cc:Subject:Date; b=j5OWuSfUhpBRVxhWw8B34JFXbRKK8/G7SDuprLRaZBvwryJm1YsQA1eb1OS+AHote bpbo42d84h8bO+91NGtu35x4A8kDmAzb0QSEopMrnsjXkeGfWHR1rqTgd7P0QQegFv okdth+29DMfOBVvLIBth7c4iVt9/BJE5k5iEeCJmIcWkhkCNXNIX/WPlgbo3p6VbF0 pHttxRqSAFqdscheDrkxezQMeF67lUlE4QuX8j6VAMVpleVIiqhHmCUyfJdyxZGhJ4 xGrGt3lBhbtjt5+OBWMEa0v7Zr/87vPcwsVDzqLM/ChkFguzOylugG9rf/7pRijlW1 M8IyqYQbbBppg== Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7, 5, 8, 10121) id ; Mon, 09 Nov 2020 10:14:20 +1300 Received: from joshuas-dl.ws.atlnz.lc (joshuas-dl.ws.atlnz.lc [10.33.25.56]) by smtp (Postfix) with ESMTP id 75DBD13EE9F; Mon, 9 Nov 2020 10:14:18 +1300 (NZDT) Received: by joshuas-dl.ws.atlnz.lc (Postfix, from userid 1634) id 187DC360455; Mon, 9 Nov 2020 10:14:19 +1300 (NZDT) From: Joshua Scott To: u-boot Cc: Stefan Roese , Joshua Scott , Chris Packham , Simon Glass Subject: [PATCH v2] arm: mvebu: a38x: Configurable USB2 high-speed impedance threshold Date: Mon, 9 Nov 2020 10:14:08 +1300 Message-Id: <20201108211408.8954-1-joshua.scott@alliedtelesis.co.nz> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 x-atlnz-ls: pat X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean 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 Reviewed-by: Stefan Roese --- Changes for v2: - Added "range" to Kconfig to prevent invalid values from being selected. arch/arm/mach-mvebu/Kconfig | 6 ++++++ arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 0d8e0922a2..72aee8b3e5 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -30,6 +30,12 @@ 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 + range 0x0 0x7 + 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},