From mboxrd@z Thu Jan 1 00:00:00 1970 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 5C940C433F5 for ; Thu, 9 Dec 2021 12:31:07 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 64721830A7; Thu, 9 Dec 2021 13:30:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="nwdCGm9g"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A42181FD5; Thu, 9 Dec 2021 11:20:08 +0100 (CET) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CA0B180F68 for ; Thu, 9 Dec 2021 11:20:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=eichest@gmail.com Received: by mail-wm1-x336.google.com with SMTP id 77-20020a1c0450000000b0033123de3425so6196972wme.0 for ; Thu, 09 Dec 2021 02:20:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QzOmpoujn25pIIBS71lj6JJFlM6k2ZTR9tF15Q+vebw=; b=nwdCGm9gTDPZYu61kXImT+bsJ3RZvx6RHZHBUHg1rBO7Qx82cBnxmmZfS4ZQEJTgbA EiKcBAISjMfmgE+iSCQDPC5C2O0aZotPCoSGiy5d0snG0QentSmGbefeB1l8QJEqr631 nqVZyVBC9/ui+dCEljVHJfhX/zl3fn7p6Sfy28H2+qBUXElISOEqgp3PfgA/MGzptksc DHc4EZe8buMxWB4aj2Q64XzIVbGKg5WXs0q6cUc2bruTX+F6x9pJjtacdYjW1uK3oFJs EDuY6vfmjsp2I2Q1RzGAOsCI5BiiA1dw3iYwRWLq1ya/exQBYZTSnj5oh/LDZvpMXztE ttgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QzOmpoujn25pIIBS71lj6JJFlM6k2ZTR9tF15Q+vebw=; b=8IQnWxh5kCQGLxiy4Ipy6HkrZjQCQd2J+qZOaezkYQwXWtKDpoMiy8/tgKe4AuFkPJ 9/gpUJtAUGQQRur7icGXxNGt80K07eHLzWctciAiV5RFdXPhBdGlLEiq2tOOZZFn/1+H AyQolSNDhCFUuBTEtPG3AhzyheaB5uEEoQjdsctA8cpRlmekxJFjXZOaWx4GX53PKp1z VEl6c5GN/gyaHHqSOrprKDO4k1cFQADlqf1wsO68S7mWDd1qg+u1wxKxXBg56nVHBcN4 XJfEVmpbF3cl/Cdv4VHazDb64wa2viCUa4I8zUT7OipWFpr1Z1mLT8R66MatbD146UgY g/9g== X-Gm-Message-State: AOAM531MY53kGZJKuMPf/FYE39CSzRZ2cPVecFPBzEI96ez0Z6qC7R1i 63aHnHiPtceam3OJpZu8Wr8= X-Google-Smtp-Source: ABdhPJz4yJb0UX7g24ok+KB5ev4ZhTWCCT1iHBXaMRhAhtbv0K41QD80wGesF3uz/7NgpJdLAMTZtw== X-Received: by 2002:a05:600c:4303:: with SMTP id p3mr6006625wme.128.1639045202381; Thu, 09 Dec 2021 02:20:02 -0800 (PST) Received: from eichest-laptop.netmodule.intranet (77-58-180-85.dclient.hispeed.ch. [77.58.180.85]) by smtp.gmail.com with ESMTPSA id l15sm5095757wme.47.2021.12.09.02.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 02:20:02 -0800 (PST) From: Stefan Eichenberger To: sr@denx.de, pali@kernel.org, marek.behun@nic.cz Cc: u-boot@lists.denx.de, =?UTF-8?q?Ren=C3=A9=20Straub?= Subject: [PATCH 1/2] arm: mvebu: a38x: serdes: fix serdes config for USB3 Date: Thu, 9 Dec 2021 11:19:33 +0100 Message-Id: <20211209101934.37823-2-eichest@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211209101934.37823-1-eichest@gmail.com> References: <20211209101934.37823-1-eichest@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 09 Dec 2021 13:30:37 +0100 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 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 --- 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 = -- 2.30.2