From patchwork Wed Nov 6 10:26:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 178664 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp401207ilf; Wed, 6 Nov 2019 02:27:02 -0800 (PST) X-Google-Smtp-Source: APXvYqwY4m76UI7YixweXIBEFCgf/vDuORMfxXyEZOaYNVJw0OcCaWF9ion7AI6WxdfHcifQLVux X-Received: by 2002:a17:906:1812:: with SMTP id v18mr34141662eje.86.1573036021961; Wed, 06 Nov 2019 02:27:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573036021; cv=none; d=google.com; s=arc-20160816; b=fe6//CfBaxTaGN6cXvD7U+tTdOpGBlyE4eqgWJrduj8mVOsf1I5EMFvBlVrXzNnYQN QfYgaJ+UnfZduNO2ylJB0z854cnRi5nmQnIr2HPsOL+/e+5gmDQfwvirynMf0B+vGEPH jcDd0+5f7PPaS7aq1Mvmz0Gfq43sd6DUYTIcBKzYmswubUxdifXrcKRYpTFSQXiH5MqT UdFgZ49u3Ux2zZh1roqoiujHz7awdxxpGovvTFzTOPwG9GYnt+iWReihhUB+GtROSuue PaD0uEUFZNdH6JobOSpUsu2W0g3I2kYvjwKn+APV49ExoDOgPjU/FUY8pTTlJo8NOmtU XIqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=75vVAEqmXN7CrlXgI6/rHTXLaTCPGygl6BXxEPwWerc=; b=aAn2mWQe5BLlStdbm8LuzMZ4wKTnxu5MB3ZPpXXwdUdFx0hBAUCYJJoKZk08KFphSY jzVu6g56+/KD7UOmzRuwpNcMlrKlNit58e76EY2kea11AgSJzyh4WHNQIndKVgJqy25E Eq09fqmB96Zdy4o5z2bksxHsTPfTZWBWi/J2BrNg7aWLQSju/LrafWFE/FJxkh9N+5Bg CSgyyXbsNBrUVtj2koXkqtbJ8LIllzRvQ1B+NU4eA5toUKnpxouIQhAifhYxhG46Hqu7 7dESxZxlelZWCXpbseTrzCdHPybSeB03U4swX+3FdUxPOk2BEHDGlN09CHOkziJtPPT/ wARg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si12829381edf.36.2019.11.06.02.27.01; Wed, 06 Nov 2019 02:27:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731677AbfKFK1B (ORCPT + 8 others); Wed, 6 Nov 2019 05:27:01 -0500 Received: from mx.socionext.com ([202.248.49.38]:44295 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731418AbfKFK0x (ORCPT ); Wed, 6 Nov 2019 05:26:53 -0500 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 06 Nov 2019 19:26:51 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id 3DE4F180095; Wed, 6 Nov 2019 19:26:51 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 6 Nov 2019 19:26:57 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id D78D11A04FC; Wed, 6 Nov 2019 19:26:50 +0900 (JST) From: Kunihiko Hayashi To: Kishon Vijay Abraham I , Rob Herring , Mark Rutland , Masahiro Yamada Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Masami Hiramatsu , Jassi Brar , Kunihiko Hayashi Subject: [PATCH 5/6] phy: uniphier-usb3hs: Change Rx sync mode to avoid communication failure Date: Wed, 6 Nov 2019 19:26:18 +0900 Message-Id: <1573035979-32200-6-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573035979-32200-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1573035979-32200-1-git-send-email-hayashi.kunihiko@socionext.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In case of using default parameters, communication failure might occur in rare cases. This sets Rx sync mode parameter to avoid the issue. Signed-off-by: Kunihiko Hayashi --- drivers/phy/socionext/phy-uniphier-usb3hs.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/phy/socionext/phy-uniphier-usb3hs.c b/drivers/phy/socionext/phy-uniphier-usb3hs.c index bdf696e..a9bc741 100644 --- a/drivers/phy/socionext/phy-uniphier-usb3hs.c +++ b/drivers/phy/socionext/phy-uniphier-usb3hs.c @@ -41,10 +41,12 @@ #define PHY_F(regno, msb, lsb) { (regno), (msb), (lsb) } +#define RX_CHK_SYNC PHY_F(0, 5, 5) /* RX sync mode */ +#define RX_SYNC_SEL PHY_F(1, 1, 0) /* RX sync length */ #define LS_SLEW PHY_F(10, 6, 6) /* LS mode slew rate */ #define FS_LS_DRV PHY_F(10, 5, 5) /* FS/LS slew rate */ -#define MAX_PHY_PARAMS 2 +#define MAX_PHY_PARAMS 4 struct uniphier_u3hsphy_param { struct { @@ -395,13 +397,19 @@ static const struct uniphier_u3hsphy_soc_data uniphier_pro5_data = { static const struct uniphier_u3hsphy_soc_data uniphier_pxs2_data = { .is_legacy = false, - .nparams = 0, + .nparams = 2, + .param = { + { RX_CHK_SYNC, 1 }, + { RX_SYNC_SEL, 1 }, + }, }; static const struct uniphier_u3hsphy_soc_data uniphier_ld20_data = { .is_legacy = false, - .nparams = 2, + .nparams = 4, .param = { + { RX_CHK_SYNC, 1 }, + { RX_SYNC_SEL, 1 }, { LS_SLEW, 1 }, { FS_LS_DRV, 1 }, }, @@ -412,7 +420,11 @@ static const struct uniphier_u3hsphy_soc_data uniphier_ld20_data = { static const struct uniphier_u3hsphy_soc_data uniphier_pxs3_data = { .is_legacy = false, - .nparams = 0, + .nparams = 2, + .param = { + { RX_CHK_SYNC, 1 }, + { RX_SYNC_SEL, 1 }, + }, .trim_func = uniphier_u3hsphy_trim_ld20, .config0 = 0x92316680, .config1 = 0x00000106,