Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1241946rdb; Mon, 2 Oct 2023 03:56:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYrpXlPnYXRWEeSN1UADr9VagjeFe/lCUKlla82jYkAKHVPj56pEQmMWm7aliGRLAxrv8m X-Received: by 2002:a05:6808:198d:b0:3ae:1446:d48b with SMTP id bj13-20020a056808198d00b003ae1446d48bmr15145193oib.3.1696244167802; Mon, 02 Oct 2023 03:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696244167; cv=none; d=google.com; s=arc-20160816; b=nFwURn/Fb3A6KW5xzhaN9ULv9S0iQlJlo4DqsZ8TEECeJ/mkmz4mOIgclfTcL3Z34W j5Pzrj2dudHVCP/tuEvff5DZzQiHmaZNLxpYzWbW1QTAsHH7KFYG/WHh/XCzKRyhPGQY UXmltNZhMNGBs7pwyDHCIBB2Zz1ptYt/s+NPPsVnxZkAoRGcZXcOcuCD4ysVn5Jmjos3 tilGUgp/mId3Qax+0ZxI96dIMfBHmbbfCOItKDOSEO9P4JpGe9oFoN2G48BfsmjH3FRw JXIM3cV30+x8BgkhhkiYAMmglpAjXPkPxHmw3pP3J7k1ON6VvrECst8ssl/KBLKVB1wC iRHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=JLs1VktsLlk8jSlnRreaZgQ/QeUwdA55Dkd4Kqx1630=; fh=ulxlUWcE2DpD87CPp2o8Pd6w6w1+lL1ilVz/jlhZHcA=; b=pubSU1robFa+JWbCds2lKZUNJ+3PMCOlKKp59zuGjYQO31EYK4zwm2lh6vh2AFVmh2 cnOCj7iyONW/q+ImIuKxsJzZCar89hyvtLBVeSkTqRh90ujnmFGDiTfEbZxQ98o3vUCx ojJECXePmH3gYIX9aV5KFXvw+M1VrhYnFxvIgafA93COHpiIq2fIzTQN41IgRBOWgpER my1DP+t2y+yUKTtAJf6Knr/cEsMbkAQBXHhBL8ltEuDYL4x0+jxOy8rggMEyfVbLOhJR rxbsmOV3bPJjqALYG9DUtzQdoAgq8/gLWjdAB4JPsxDQPWrDfUY3CVCq/E3w4Zd7AeH9 S/tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BHtwBdkx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id n10-20020a17090a9f0a00b0027756e1f0c2si7426714pjp.7.2023.10.02.03.56.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 03:56:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BHtwBdkx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 6175B8075B0A; Mon, 2 Oct 2023 02:51:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236129AbjJBJve (ORCPT + 99 others); Mon, 2 Oct 2023 05:51:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231174AbjJBJvY (ORCPT ); Mon, 2 Oct 2023 05:51:24 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E58783 for ; Mon, 2 Oct 2023 02:51:21 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2c135cf2459so239694271fa.0 for ; Mon, 02 Oct 2023 02:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696240279; x=1696845079; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=JLs1VktsLlk8jSlnRreaZgQ/QeUwdA55Dkd4Kqx1630=; b=BHtwBdkxkL7W1WgGrLta0pVAoOEjgWTOWh+BBejwMR9JGzoGXydElJAZ43tN+KUYH+ H0Cd6l4UMBImAsIutTmywKSBWzScrylM2/pD+drsDMXucffDFJojuXu4ZNm3ozrqbeyL sB7KEZn+ULgUP3atPyknsMYt24lRXOszT0LfkXmBMRGlR1ElNPfkv10HfdTE3p2WpbbL ZDXqIW0i5sXgJqzczRFhw9T6btwcQStbn8S4C50OX7uTzoKmudPFI0aWIp1vf0+Nok5a +Ejj4JST8ps0svZ7Jen0igygXwXr+o0fIyIfsO/YklVAjMCXtqHpq9q3/x+y8Y1uUOyz w3NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696240279; x=1696845079; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JLs1VktsLlk8jSlnRreaZgQ/QeUwdA55Dkd4Kqx1630=; b=PDLIBbsVn04NGbF7pEkfKPnUxLrPzv1IIR2cMLuT2E2xXP14Ahr87IaomXapgtael7 zn+PBWr1EQyeN11s+Xphie3QfCeVy9SHj9BHCYfGwmGvPHMi8sYW3mycqqwq66aKAzx3 EhCSL5mCoIlGxk4brP2LCEfOEMqWKT5TlkKKM7ssgOjmUXQlwXvTvSq7O8rg0Izmpz5T /wByy2s4Ih0Ek74vHaouTe5PKYkxsoYDstmQZtfMCS/jlsYT1WPJBVzgZi63Hc82vf/A a+ucisYb4tK+RRitICphbFMD79n25j8VldyzqymuQ5IBOvhLa+ZJ2C0P5hwd+5fHb6sj JAEg== X-Gm-Message-State: AOJu0Yx1uh1ranvz3/4ea5rsXqB9dfhT4j72KaQ6ozEfh7yqmSS0sXj7 Q+SYSLiDYh3XgniVzC6J4aJGdw== X-Received: by 2002:a05:6512:23a4:b0:500:c765:bbe with SMTP id c36-20020a05651223a400b00500c7650bbemr11447285lfv.0.1696240279333; Mon, 02 Oct 2023 02:51:19 -0700 (PDT) Received: from [172.30.204.164] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id a16-20020a056512021000b0050315aa36fbsm4685416lfo.282.2023.10.02.02.51.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Oct 2023 02:51:18 -0700 (PDT) Message-ID: <5f3c8a66-aba3-cef0-8df9-f897487f1098@linaro.org> Date: Mon, 2 Oct 2023 11:51:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH 4/5] phy: qcom: edp: Introduce support for DisplayPort Content-Language: en-US To: Johan Hovold , 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, Abhinav Kumar , quic_jesszhan@quicinc.com References: <20220810040745.3582985-1-bjorn.andersson@linaro.org> <20220810040745.3582985-5-bjorn.andersson@linaro.org> From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Mon, 02 Oct 2023 02:51:43 -0700 (PDT) On 10/2/23 11:06, Johan Hovold wrote: > 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? +Abhinav, Jessica Konrad