Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp741333pxb; Fri, 3 Sep 2021 12:21:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjAWb+tecmpcLAg32Ct7D2AsDwInBp1/3D6oOG5YjP7pOxea8k8Xsvwd/gx1JMcDFiSOZY X-Received: by 2002:a6b:e410:: with SMTP id u16mr411300iog.38.1630696878386; Fri, 03 Sep 2021 12:21:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630696878; cv=none; d=google.com; s=arc-20160816; b=xS8FSYBCBOTc97pkdb5wMYP3R+fAk0PUJQfXD9WgciRxUyOjehb73U1JLNKkVa3ajv UPEb+kIRWspt9OHW1uF7FVfFutbyNGw5alyDZ0vHy0jUD7Iinzj+WJHL7EDcQk9mC3Zl +y4C/ICoUfSkr1eM4aRABhEHAHpi8chQvu2c+lCeL545cP5JqDGPZFhNbXUh5PyBDdxV xmR1tcBroueUOzPylDc9sLyz0BXuQ+loKgImv5W4jaMQXIBxcMPrrCqp4CATD3CgYF+S RcCjmdj67qDd4nGZZiRnPMHe4oXxe3cycmGovL1TcVRsG3pqjP7+mUbgAfRv+/TlgvNs YaGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=L/2apcW8mrsz6OK3ilemzV65I67pSLK0BxUTy23sO3E=; b=BJMT+RP0JT1kIK5QYtlOFf6/dV3DA0snGzDkPHygUXmvOOmvINDjjMDoKjrkUHlKg0 1iAxffdgVyinkC2PIPuDQ5SVhSyDCjOhfAWtnHfc38aOwURIr2SJKzY0dtIH5xUi22RC MgdStZXt3nWZrCKsUG1xlJGHZssVTcQM6EbNr1dBE9XJMhYESOHALw2Z2NCw3WAq7VCd PEYdORu9W8ftPhaqgYiYPgwhdxcuLGsaWCkKM3mpJ2fR7wNpEUJqVydEOBacZeiJORr1 Y2xi4M8I2lk6z4MSny21/UgXJaPRYt/ImeE3WKVUQpLwAvOjpEBb+mE7sO5UjjOk0zx6 QPjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WKQZrk6y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si228384ill.21.2021.09.03.12.21.07; Fri, 03 Sep 2021 12:21:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WKQZrk6y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244110AbhICTRj (ORCPT + 99 others); Fri, 3 Sep 2021 15:17:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350980AbhICTR3 (ORCPT ); Fri, 3 Sep 2021 15:17:29 -0400 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF15CC061764 for ; Fri, 3 Sep 2021 12:16:28 -0700 (PDT) Received: by mail-ot1-x32a.google.com with SMTP id i8-20020a056830402800b0051afc3e373aso266019ots.5 for ; Fri, 03 Sep 2021 12:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=L/2apcW8mrsz6OK3ilemzV65I67pSLK0BxUTy23sO3E=; b=WKQZrk6yltU3VyKmYhd5vG0mMGP/sJVUz/zftd7FGa0OxfST8O3CEhtI9sUdu1a2jv wfzLRo5HzKmq1GGXyS15IkB2T+5d8mWYilCkCGIVmPcCO9JTonM0qsBo3StvWz6q2xfA EnQGHVQDN9xrNbe755whrDgTDu9W+Fm8kboQE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=L/2apcW8mrsz6OK3ilemzV65I67pSLK0BxUTy23sO3E=; b=ip/MB6Cx+9+j/Re+NFshgot/RN/jFMt/v75XYtA3wL+HgsLT1rXkMJYAIEuMEHbZm9 7pcZFrVsbIMB47HBmjaV+/h4U97Bv49OVN0ijHcOaaiFtQkee7PjwmdvCGILJJbdF4Gc ykW8ZDba5CnQ5RiNbBkwpbl6w7Q6UDsuBH5IMLv8zypQVxV4bLEaM4HFxKDwaAV0knsA OFBhDasLBNP9HB82nmU2NJGCGpH2+zCaCBbIFzA9kODwI2AQkwaADfZ391ZReu7peqqK z5+sRxUF9EuP2Nm1GABYkAjuG40H0Hb6su8qHVGuuGowI1aEVik24Bl1G6HessSeUG7W 45LQ== X-Gm-Message-State: AOAM5302BjK0olVXcOkQ9a8fcdE70XblVQhJXq5nej5n4D1ZyH8exdBA n6RFHygrivKS+k7BssVhUgEF2LdiwXnhFYhUr5aG7A== X-Received: by 2002:a05:6830:719:: with SMTP id y25mr502893ots.77.1630696588117; Fri, 03 Sep 2021 12:16:28 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 3 Sep 2021 15:16:27 -0400 MIME-Version: 1.0 In-Reply-To: <72483937-8ccb-331b-e1af-8f30f6cefc07@linaro.org> References: <1630098658-23149-1-git-send-email-khsieh@codeaurora.org> <72483937-8ccb-331b-e1af-8f30f6cefc07@linaro.org> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Fri, 3 Sep 2021 15:16:27 -0400 Message-ID: Subject: Re: [PATCH v2] phy: qcom-qmp: add support for display port voltage and pre-emphasis swing To: Dmitry Baryshkov , Kuogee Hsieh , agross@kernel.org, bjorn.andersson@linaro.org, devicetree@vger.kernel.org, robdclark@gmail.com, robh+dt@kernel.org, sean@poorly.run, vkoul@kernel.org Cc: abhinavk@codeaurora.org, aravindh@codeaurora.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, kishon@ti.com, p.zabel@pengutronix.de Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Dmitry Baryshkov (2021-09-03 12:09:14) > On 28/08/2021 00:10, Kuogee Hsieh wrote: > > Both voltage and pre-emphasis swing level are set during link training > > negotiation between host and sink. There are totally four tables added. > > A voltage swing table for both hbr and hbr1, a voltage table for both > > hbr2 and hbr3, a pre-emphasis table for both hbr and hbr1 and a pre-emphasis > > table for both hbr2 and hbr3. In addition, write 0x0a to TX_TX_POL_INV is > > added to complete the sequence of configure dp phy base on HPG. > > > > Chnages in v2: > > -- revise commit test > > -- add Fixes tag > > -- replaced voltage_swing_cfg with voltage > > -- replaced pre_emphasis_cfg with emphasis > > -- delete drv_lvl_reg and emp_post_reg parameters from qcom_qmp_v4_phy_configure_dp_swing() > > -- delete drv_lvl_reg and emp_post_reg parameters from qcom_qmp_phy_configure_dp_swing() > > > > Fixes: aff188feb5e1 ("phy: qcom-qmp: add support for sm8250-usb3-dp phy") > > Signed-off-by: Kuogee Hsieh > > --- > > drivers/phy/qualcomm/phy-qcom-qmp.c | 117 ++++++++++++++++++++++++++---------- > > 1 file changed, 85 insertions(+), 32 deletions(-) > > > > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c > > index 31036aa..021cbb0 100644 > > --- a/drivers/phy/qualcomm/phy-qcom-qmp.c > > +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c > > @@ -3546,12 +3546,11 @@ static const u8 qmp_dp_v3_voltage_swing_hbr_rbr[4][4] = { > > { 0x1f, 0xff, 0xff, 0xff } > > }; > > > > -static int qcom_qmp_phy_configure_dp_swing(struct qmp_phy *qphy, > > - unsigned int drv_lvl_reg, unsigned int emp_post_reg) > > +static int qcom_qmp_phy_configure_dp_swing(struct qmp_phy *qphy) > > As this becomes a v3-only function, could you please rename it to > qcom_qmp_v3_phy_configure_dp_swing() Can it be combined with the v4 version instead? The code structure is essentially the same, modulo the tables used and the register offset written to.