Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9444974ybi; Wed, 24 Jul 2019 04:15:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXQQ60PnYRniaRtjaUQ6h2a1mB6aL+dbCigCmdok6vwH7RWeKJsUHJMYLQzsInbnflOekL X-Received: by 2002:a17:90a:db44:: with SMTP id u4mr87043284pjx.52.1563966919388; Wed, 24 Jul 2019 04:15:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563966919; cv=none; d=google.com; s=arc-20160816; b=ifUkcmffj5LvsGt5I8DXazQtlObYB7YUAGHxwty5kaPrKUNNAk9PLxfUPTCp51dk9b SaJNnC4FjIXEpWQ5wpUQJw2Ip1agwiM+X9h2naHnZu7ZXZMowfzCrCOZrP7/103GGPoH L2ozXuSevzVEspossfZOr8A2C8mONlfgcU6l0raJQUofC1F1Cq+jdZYHOBbYOD63zZ6C izZ0J2AUimljOrMITJ5NSNXqb3ZVuhALvGcz7qLyagwL7MXlMe9ZfcoRQX/GhAEgyJPK YdMD26DyV/ElML74W2rQr1LY3vsauR73/TPjYHWjo8c4ri3ZzH5dMezj/E5uLn5gspyy SnOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vSwpuxQ5OW8XEblN1884/W9Gw5TuXcDhr8zS2U/Q4CE=; b=Ozl2hVsfmUnvnUj7TsEJPryJIMsm5tT+cf2eB22sJezLa7o2X2yB+Xfqeui9+caHwK fcLRy9BAZ6hB1QaWdFuJ98T8ZChK/ooKMpyJ509MamPYcWH73P2ctZg1Ahq3l5Q58EiC HzoXj5izbJPwwvCUGdeudSGr4i8owtCqpTMutOPbfBlMzmsXLRR0w68eS2t6WvCpiz32 Lia/BsrkEIy5Y+cYuErzNHJdsmFNJ+WZkd/1oScvevIhSFo3Sa+iFN+C8w0tr/jUQb9y a+uNmJWbMtpE9bdxDIZQAfDGHSLXXUNXg/jelfQnBeuQkKEFfZMSY96SgJJSMANybGeS NI+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o63dKY7g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si13032937plh.56.2019.07.24.04.15.04; Wed, 24 Jul 2019 04:15:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o63dKY7g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727375AbfGXLNh (ORCPT + 99 others); Wed, 24 Jul 2019 07:13:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:38952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726960AbfGXLNg (ORCPT ); Wed, 24 Jul 2019 07:13:36 -0400 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6CA592190F; Wed, 24 Jul 2019 11:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563966814; bh=5/y1hhDYq8XOZKIhQOx1PKrERYltNYVDKnL3158aB6M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=o63dKY7gmPoLMlPwWmTjsaF0E6vvrfbRChrcIfn1uENGMU4qIVFHms765aBdgaQoN Ek64RM9AUVkKpj1sLpM7xJktKOfK63n46leGLUb2uG2q+mXl4LONpPlesGFf+eu9Dp u85dtwUxPiOiwToAk+we+sdyVkh81jiD17xSiaRo= Received: by mail-lf1-f41.google.com with SMTP id h28so31646617lfj.5; Wed, 24 Jul 2019 04:13:34 -0700 (PDT) X-Gm-Message-State: APjAAAUMQ3kAPYURZ+kLrqqmnmvt4lHiihO70auywBF2INNDoRSwtsUR YgFLYiV1bg5D+Ogc8MlXRYzUcNsiNpRZQuTBDnM= X-Received: by 2002:a19:48c5:: with SMTP id v188mr37332583lfa.69.1563966812710; Wed, 24 Jul 2019 04:13:32 -0700 (PDT) MIME-Version: 1.0 References: <20190722185938.9043-1-linux.amoon@gmail.com> <20190722185938.9043-5-linux.amoon@gmail.com> In-Reply-To: <20190722185938.9043-5-linux.amoon@gmail.com> From: Krzysztof Kozlowski Date: Wed, 24 Jul 2019 13:13:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC/RFT 4/5] phy: exynos5-usbdrd: PIPE3 tune signal To: Anand Moon Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "linux-samsung-soc@vger.kernel.org" , Kishon Vijay Abraham I , Kukjin Kim , Bartlomiej Zolnierkiewicz Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Jul 2019 at 20:59, Anand Moon wrote: > > Tune USB3.0 (PIPE3) PHY TX signal for high and supper > speed data transfer. > > Signed-off-by: Anand Moon > --- > drivers/phy/samsung/phy-exynos5-usbdrd.c | 18 +++++++++++++----- > 1 file changed, 13 insertions(+), 5 deletions(-) > > diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c > index 54a513ca15e4..4f16c4f82ae5 100644 > --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c > +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c > @@ -124,8 +124,10 @@ > > #define EXYNOS5_DRD_PHYPARAM1 0x20 > > -#define PHYPARAM1_PCS_TXDEEMPH_MASK (0x1f << 0) > -#define PHYPARAM1_PCS_TXDEEMPH (0x1c) > +#define PHYPARAM1_TX0_TERM_OFFSET(x) __set(x, 30, 26) > +#define PHYPARAM1_TX_SWING_FULL(x) __set(x, 18, 12) > +#define PHYPRAAM1_PCS_TX_DEEMPH_6DB(x) __set(x, 11, 6) > +#define PHYPRAAM1_PCS_TX_DEEMPH_3P5DB(x) __set(x, 5, 0) > > #define EXYNOS5_DRD_PHYTERM 0x24 > > @@ -360,10 +362,16 @@ static void exynos5_usbdrd_pipe3_init(struct exynos5_usbdrd_phy *phy_drd) > { > u32 reg; > > - reg = readl(phy_drd->reg_phy + EXYNOS5_DRD_PHYPARAM1); > /* Set Tx De-Emphasis level */ > - reg &= ~PHYPARAM1_PCS_TXDEEMPH_MASK; > - reg |= PHYPARAM1_PCS_TXDEEMPH; > + reg = readl(phy_drd->reg_phy + EXYNOS5_DRD_PHYPARAM1); > + /* Transmitter Termination Offset */ > + reg |= PHYPARAM1_TX0_TERM_OFFSET(0x5) | > + /* Tx Amplitude (Full Swing mode) */ > + PHYPARAM1_TX_SWING_FULL(0x3F) | > + /* Tx De-Emphasis at 6 dB */ > + PHYPRAAM1_PCS_TX_DEEMPH_6DB(0x20) | > + /* Tx De-Emphasis at 3.5 dB */ > + PHYPRAAM1_PCS_TX_DEEMPH_3P5DB(0x15); How did you get the value? Why you are changing existing values to default ones? Best regards, Krzysztof > writel(reg, phy_drd->reg_phy + EXYNOS5_DRD_PHYPARAM1); > > reg = readl(phy_drd->reg_phy + EXYNOS5_DRD_PHYTEST); > -- > 2.22.0 >