Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7712827ybi; Mon, 22 Jul 2019 19:09:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyg58ryQYl98DeT0aNblZkdcGCi00LVxVbD0eUWmoo1F/WJwjvxY/6k5Kwjax9n/pFWLlhk X-Received: by 2002:a63:1918:: with SMTP id z24mr71160968pgl.94.1563847773968; Mon, 22 Jul 2019 19:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563847773; cv=none; d=google.com; s=arc-20160816; b=C7ZNjjXTy5L9IsanumK+W+vddBX9HIvYCc45o8dM92IRjGzXJUuOP/52O2esrzkaJR SeCT+Sq1ILwkTJp2KtH/jKaD5nbLL87TUCaxcUHEi222NX+7Z/+K8DjtSJkGfipjG6ux pGzKhfTZyjLsGf1fuwkbbfaOrQkqShre4xEfgyqllP3PC/pGjtbvzWA3gP6Vv9LWES4Q s3K25H1SL+69CBSmRPy0vQyEjSNnQTQyFhGarT7MaHPYZ8naNbWDihWrv8s3HgpB/q1M ZFhj5pj0QGDDaAsqdWahGQwMo+263M2bGJba5t81mJQX+PlAqU283+wqTL7/fdlTwmAE IABw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zz5vAjKnwObHWdgiR69vnrMUFdCw0YpjqKvOUe5J6MQ=; b=wfdqtOr5C7cPygpn4wbeYN6ruQ+E3TfGFpv1Sm+v6B2NaEZ933ilQ8gB7MqTkQI8Mi PsvJAicqJaxCt7zw97sqFGrkKxcJIPBChNrW1MxCAt/FoCbr2wfjYkKWRZHTG5hroNgo +qx+0E6N9LusmQsRLu7xstzczkss4E6lmkCa5aEot376RYtjyOAw+0c1SlO0rJ8vOCPI +4iEIme9Dx5eOoB43bBfC0HQS43XcjLJfK8/dHiG7ZqZYnECiflrZg/YgDKK6DZph+zd aPOo6LJ2IMVDzKpjJiE3RgLQcM1IBXi9BpQH2C90cRYOM24uFW+S3nK3PL1glYPCAEdc Ng+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d6MMjgcg; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si11065790pfe.271.2019.07.22.19.09.18; Mon, 22 Jul 2019 19:09:33 -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=@gmail.com header.s=20161025 header.b=d6MMjgcg; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728048AbfGVTAB (ORCPT + 99 others); Mon, 22 Jul 2019 15:00:01 -0400 Received: from mail-pl1-f175.google.com ([209.85.214.175]:46260 "EHLO mail-pl1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727721AbfGVS77 (ORCPT ); Mon, 22 Jul 2019 14:59:59 -0400 Received: by mail-pl1-f175.google.com with SMTP id c2so19537648plz.13; Mon, 22 Jul 2019 11:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zz5vAjKnwObHWdgiR69vnrMUFdCw0YpjqKvOUe5J6MQ=; b=d6MMjgcgq7A5Ok7sC1mvq8Y7Wf/C/AbAtJI0wx9bGY4LJJDTTd0vQVHuitO2plMEyq s651WhX3usFjBAenymrYvEPR3lbhKenTx0jmJU6miKE7/atUIiKfrBoNG2ef4g9tLLVE LheTn+WTo/fecBYSmVujWJvETdofqQuuS9X6FH2EzkWgzBV5HCJ7zylD6lSW8IO5VgUr nha9fg8eP8GlVrc3Fw6sjREvttunn9yPpGeTarp9+jV48N58mLUDgtUXRvotX5TGYvOS vSXYtNoIDim5DoM834ci3JXYBNtu0sOWTuYlom0yBD34s/1T3PNVEIu+63qEV0ddOA+j Khew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zz5vAjKnwObHWdgiR69vnrMUFdCw0YpjqKvOUe5J6MQ=; b=KBztWVrTzfUYukMK7e/OT72/i+b7g0bDtGUcOSQMo5tYVm+AdWOXlebOO1jmt3rui9 p1w32jNA3l9EECIVCg4QL5DYjKG0OGVenry1iPPTfNGcudh7DeZ1sg2w7/xa0qAYsIl4 wnwByiFekF0jUFNTXCv9GnYNn9jEvBPIv+BOt6yZtjsiIuyoqcHwmC49HJIydskQRBtt sVVq26aA2g4rv4niMzsETxvMBU94hN1yDDKxz+1sLUg7xLOzzSrnaQyr5LLpa2gYbBVY 9IPcbhOOIgNI7G9BbzYjkMAwCYkU3E26a2d3axKl12Khuo7Q1UUlImjhuUo/2f2wuxap g14A== X-Gm-Message-State: APjAAAXt52RwmfMOwaPs3T/jsVNDmAqeAYJMcFiVObqp5HHIU0aNZony cyIlPApCXQQdzT14CGMZN0nrCJvrr/Y= X-Received: by 2002:a17:902:2865:: with SMTP id e92mr37369159plb.264.1563821998707; Mon, 22 Jul 2019 11:59:58 -0700 (PDT) Received: from localhost.localdomain ([103.51.73.174]) by smtp.gmail.com with ESMTPSA id h1sm30777675pgv.93.2019.07.22.11.59.55 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 11:59:58 -0700 (PDT) From: Anand Moon To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: Kishon Vijay Abraham I , Kukjin Kim , Krzysztof Kozlowski , Anand Moon , Bartlomiej Zolnierkiewicz Subject: [RFC/RFT 4/5] phy: exynos5-usbdrd: PIPE3 tune signal Date: Tue, 23 Jul 2019 00:29:37 +0530 Message-Id: <20190722185938.9043-5-linux.amoon@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190722185938.9043-1-linux.amoon@gmail.com> References: <20190722185938.9043-1-linux.amoon@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); writel(reg, phy_drd->reg_phy + EXYNOS5_DRD_PHYPARAM1); reg = readl(phy_drd->reg_phy + EXYNOS5_DRD_PHYTEST); -- 2.22.0