Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1201438rdb; Mon, 2 Oct 2023 02:13:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkLTDHzIpVy9SFr5KLHa1i0U2Thsteg2ugqqntyKAUYdLOLi6FaKzWwfDDgBJx/1mhCsHe X-Received: by 2002:a92:c541:0:b0:351:526a:4ac with SMTP id a1-20020a92c541000000b00351526a04acmr13849749ilj.2.1696238005548; Mon, 02 Oct 2023 02:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696238005; cv=none; d=google.com; s=arc-20160816; b=MznUaGTtlQPHZWB5/EjuVjfyojPihvN5HV8ROs5SItoUkgtmzkbqtemTSIGN2Y2MbP XyvO6AvKuLNnw6muegOV1XDgva/QIKNfwE8oVudigKnE7YjqhZ7KeAm2qtnNdENtnBfi MuyACcsCKqdv1+o/3Sj5Bd2oDxNXx7uPCMn04geylfr7GW+rEUlMistna/0BSuFBi3ob P6W/9xwyQvcnM7BR29mxXVpEu5eLKNYgnh3OmntMIkxZQtiqnbJJcoj1BVtqjsIo6Ba3 MdTqpBKUjjrBgQc3XrRxRm4ZdHw0ZrdshFj4HbrNIEzDqPyMm/sq4ncOqefbYUt33jdT 4XdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qYf4gK60ItexdCUAY9D5/wdC3C1xkbExJ14Uk8hjMFg=; fh=erZkdjeVBjK52vwDlq/oTF0nfC6RIk4scAZUAZGbkRQ=; b=aahDNWrUhJwNGNkCYstbebC/gbR4C4NQWpMPs/ze2FeGkbuMmVDKJKJX30iwWAcCId q9cLduj1lcutQGGCHYlItZ4+xDvKcku++jkmq80nOwup1w9HnYNcN8CEpA/mfXiUe2Gd t7i02Gs4kx7fRwavnlrcOZlHjmRFsry3BSFs2jGwiF9e/nb3NP4ybxoiE+lRjTEG5X/f AswnGUZDd2gGJDdwmzbqzyhczgWRu9APa9YCgqnWb5P6Z4zGnkqv8krLHEBI5IiFnHSl 6Lw3XXGrGtDRWzzTyHl3sZyYCizoteymrTrsfzlqm0QfCKp5EwQ2FNa5m1BQmVCHFQNj Fr4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i2fz6Ave; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id d2-20020a633602000000b00585a45417b3si7100363pga.129.2023.10.02.02.13.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 02:13:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i2fz6Ave; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 000DE8076014; Mon, 2 Oct 2023 02:06:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235984AbjJBJGh (ORCPT + 99 others); Mon, 2 Oct 2023 05:06:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235972AbjJBJGg (ORCPT ); Mon, 2 Oct 2023 05:06:36 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93E5B99; Mon, 2 Oct 2023 02:06:31 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30558C433C8; Mon, 2 Oct 2023 09:06:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696237591; bh=2diAPME2cCR6iA16Hgh40lXTEBhdoVmgO8i3mbpJqXE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i2fz6AveIUYh9hcYONkJFNzBTjUfjJAwyMB7DOHF/wl35uVUhFVZTMfh7aFMa9WNb /JzbgwlGq/C/rfcZBQIrS6VU3RMGhbN8S+v6FOSTxiWxV8HdnEzpCZ8FtOf0jEQvwr SZtXXhWnKBeN539sMl7i2FzA/nMVToO8KJpRYgiHd3sAtbh6vMjDJ5uiaw3/zb53+d FzancQsp5OsWEgpaTtyT1nQVo7qFC2vThrmnv6Dymj3EpYyVD0SRWgJRP6HFZBeWYl lV9dhvQAo41P6sPC7oDqBxJv073oe4HQSs8dZJz3rzO1kcSy8EJbv01EyZ6VeRj9RV qdqOrJuK9bCfw== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1qnEsv-0004eg-2W; Mon, 02 Oct 2023 11:06:38 +0200 Date: Mon, 2 Oct 2023 11:06:37 +0200 From: Johan Hovold To: Bjorn Andersson Cc: Vinod Koul , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio Subject: Re: [PATCH 4/5] phy: qcom: edp: Introduce support for DisplayPort Message-ID: References: <20220810040745.3582985-1-bjorn.andersson@linaro.org> <20220810040745.3582985-5-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220810040745.3582985-5-bjorn.andersson@linaro.org> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 02 Oct 2023 02:06:47 -0700 (PDT) On Tue, Aug 09, 2022 at 09:07:44PM -0700, Bjorn Andersson wrote: > The eDP phy can be used to drive either eDP or DP output, with some > minor variations in some of the configuration and seemingly a need for > implementing swing and pre_emphasis calibration. > > Introduce a config object, indicating if the phy is operating in eDP or > DP mode and swing/pre-emphasis calibration to support this. > > Signed-off-by: Bjorn Andersson > --- > drivers/phy/qualcomm/phy-qcom-edp.c | 80 +++++++++++++++++++++++++++-- > 1 file changed, 76 insertions(+), 4 deletions(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c > index 32614fb838b5..301ac422d2fe 100644 > --- a/drivers/phy/qualcomm/phy-qcom-edp.c > +++ b/drivers/phy/qualcomm/phy-qcom-edp.c > @@ -70,8 +70,19 @@ > > #define TXn_TRAN_DRVR_EMP_EN 0x0078 > > +struct qcom_edp_cfg { > + bool is_dp; > + > + /* DP PHY swing and pre_emphasis tables */ > + const u8 (*swing_hbr_rbr)[4][4]; > + const u8 (*swing_hbr3_hbr2)[4][4]; > + const u8 (*pre_emphasis_hbr_rbr)[4][4]; > + const u8 (*pre_emphasis_hbr3_hbr2)[4][4]; > +}; > static int qcom_edp_configure_ssc(const struct qcom_edp *edp) > @@ -315,7 +381,9 @@ static int qcom_edp_set_vco_div(const struct qcom_edp *edp) > static int qcom_edp_phy_power_on(struct phy *phy) > { > const struct qcom_edp *edp = phy_get_drvdata(phy); > + const struct qcom_edp_cfg *cfg = edp->cfg; > u32 bias0_en, drvr0_en, bias1_en, drvr1_en; > + u8 ldo_config; > int timeout; > int ret; > u32 val; > @@ -332,8 +400,11 @@ static int qcom_edp_phy_power_on(struct phy *phy) > if (timeout) > return timeout; > > - writel(0x01, edp->tx0 + TXn_LDO_CONFIG); > - writel(0x01, edp->tx1 + TXn_LDO_CONFIG); > + > + ldo_config = (cfg && cfg->is_dp) ? 0x1 : 0x0; > + > + writel(ldo_config, edp->tx0 + TXn_LDO_CONFIG); > + writel(ldo_config, edp->tx1 + TXn_LDO_CONFIG); When reviewing a patch from Konrad which will start using the eDP configuration on the X13s, I noticed that this patch inverted these bits for older SoCs (e.g. sc7280 and sc8180xp). They used to be set to 1, but after this patch they will be set to 0. Was that intentional even if it was never mentioned in the commit message? Or was it a mistake that should be fixed? Johan