Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 99064C433F5 for ; Sat, 18 Dec 2021 08:41:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D003F83028; Sat, 18 Dec 2021 09:41:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1639816907; bh=kzbOobLgXv3g1qQTqrXHgLCj3ay4N6UEU8bSuUNz44w=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MPLVvlJgXO2yF8optIHxoffNuvRWea6QYH9GI/+xfDUFUxVrKInesvfuveLwOAI2y 3fMkGJC74s42bEeUJDDSPT9p3vfZbV6XRdUK7m6dnZUj4bfSXphVCm/oiveYZitLtd eSw3sRi5VkmxPDKpvOX1GHiwe8OZTPCVJQ7fkWAeQpuSY6c1FGHQsVQrlu1ybVTHQI L9UVc6Caqoqt3rmX6CdBZPf3k5+5/+ZEN8jHkB6XnOHeD9/pjH9s3CtcSSX+eZbL/g HUfPBBn9ToMB19Fpg8MdMXwEDOhRkmHFkVQ94wO04DSCYK+WH7qR9FcoqR1nH+LaBt Vq9zBE+kzLmsw== Received: by phobos.denx.de (Postfix, from userid 109) id F272B8303B; Sat, 18 Dec 2021 09:41:44 +0100 (CET) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [IPv6:2001:67c:2050:1::465:204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CE54481919 for ; Sat, 18 Dec 2021 09:41:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4JGK8P26pMzQlHC; Sat, 18 Dec 2021 09:41:41 +0100 (CET) Message-ID: <6e85abf7-3173-a2bf-080d-50d24cf43039@denx.de> Date: Sat, 18 Dec 2021 09:41:36 +0100 MIME-Version: 1.0 Subject: Re: [PATCH 1/2] arm: mvebu: a38x: serdes: fix serdes config for USB3 Content-Language: en-US To: Stefan Eichenberger , pali@kernel.org, marek.behun@nic.cz Cc: u-boot@lists.denx.de, =?UTF-8?Q?Ren=c3=a9_Straub?= References: <20211209101934.37823-1-eichest@gmail.com> <20211209101934.37823-2-eichest@gmail.com> From: Stefan Roese In-Reply-To: <20211209101934.37823-2-eichest@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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.103.2 at phobos.denx.de X-Virus-Status: Clean On 12/9/21 11:19, Stefan Eichenberger wrote: > The electrical serdes configuration for USB3 expects an array as data > argument. For USB3 the second value is used (see data_arr_idx = USB3 = > 1). However, because only one value is inside the array mv_seq_exec is > accessing an invalid element and the serdes is configured wrongly. > > This wrong initialization is leading to an unreliable detection > mechanism for some USB3 devices. We were able to reproduce the issue > regularly with an LTE modem from Sierra Wireless (SM7455) where it was > not detected as USB3 device in 1/3 of all tests. > > This commit fixes the issue by setting data_arr_idx to 0. This is the > same value as the original U-Boot from Marvell is using. There it is > called FIRST_CELL which is a define for 0. > See: https://github.com/MarvellEmbeddedProcessors/u-boot-marvell > commit 56f963ce4c ("fix: serdes: a38x, a39x: Fix USB3 serdes DB > initialization") > > Signed-off-by: Stefan Eichenberger > Signed-off-by: René Straub Reviewed-by: Stefan Roese Thanks, Stefan > --- > arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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 d2bc3ab25c..11b5824232 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 > @@ -1204,7 +1204,7 @@ int hws_serdes_seq_db_init(void) > sizeof(usb3_electrical_config_serdes_rev2_params) / > sizeof(struct op_params); > } > - serdes_seq_db[USB3_ELECTRICAL_CONFIG_SEQ].data_arr_idx = USB3; > + serdes_seq_db[USB3_ELECTRICAL_CONFIG_SEQ].data_arr_idx = 0; > > /* USB3_TX_CONFIG_SEQ sequence init */ > serdes_seq_db[USB3_TX_CONFIG_SEQ1].op_params_ptr = > Viele Grüße, Stefan Roese -- 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@denx.de