All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Wesley Cheng <quic_wcheng@quicinc.com>,
	Vinod Koul <vkoul@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Christian Marangi <ansuelsmth@gmail.com>,
	Andy Gross <agross@codeaurora.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-phy@lists.infradead.org
Subject: Re: [PATCH 06/10] phy: qcom-ipq806x-usb: fix the PHY_PARAM_CTRL1 field masks
Date: Tue, 18 Aug 2026 10:59:34 +0200	[thread overview]
Message-ID: <e5cef6f2-3953-43fd-be4e-db526840a344@oss.qualcomm.com> (raw)
In-Reply-To: <20260810-msm8974-usb3-v1-6-1a47e1185524@oss.qualcomm.com>

On 8/10/26 1:42 PM, Dmitry Baryshkov wrote:
> Each of the PHY_PARAM_CTRL1 field masks extends one bit below its
> documented field: TX_FULL_SWING [26:20] is coded as GENMASK(26, 19),
> TX_DEEMPH_6DB [19:14] as GENMASK(19, 13), TX_DEEMPH_3_5DB [13:8] as
> GENMASK(13, 7) and LOS_BIAS [7:3] as GENMASK(7, 2). Also, the field
> described as LOS_BIAS in reality is called LOS_LEVEL. FIELD_PREP against
> these masks places every value one bit short of its field, so the
> programmed swing/de-emphasis/LOS parameters land shifted and the
> neighbouring fields are corrupted; the masked write-readback in the SS
> PHY init reports 'write: ... to QSCRATCH: 4 FAILED'.
> 
> Align the masks with the documented field positions.
> 
> Fixes: ef19b117b834 ("phy: qualcomm: add qcom ipq806x dwc usb phy driver")
> Assisted-by: Claude:claude-fable-5
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---

[...]

> @@ -436,7 +440,8 @@ static int qcom_ipq806x_usb_ss_phy_init(struct phy *phy)
>  	data |= PHY_PARAM_CTRL1_TX_FULL_SWING(0x6e) |
>  		PHY_PARAM_CTRL1_TX_DEEMPH_6DB(0x20) |
>  		PHY_PARAM_CTRL1_TX_DEEMPH_3_5DB(phy_dwc3->tx_deamp_3_5db) |
> -		PHY_PARAM_CTRL1_LOS_BIAS(0x9);
> +		PHY_PARAM_CTRL1_LOS_LEVEL(0x9) |
> +		PHY_PARAM_CTRL1_LOS_BIAS(0x0);

lgtm except the POR value of BIAS is 2 on 8974 and 0 on ipq806x

Konrad

WARNING: multiple messages have this Message-ID (diff)
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Wesley Cheng <quic_wcheng@quicinc.com>,
	Vinod Koul <vkoul@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Christian Marangi <ansuelsmth@gmail.com>,
	Andy Gross <agross@codeaurora.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-phy@lists.infradead.org
Subject: Re: [PATCH 06/10] phy: qcom-ipq806x-usb: fix the PHY_PARAM_CTRL1 field masks
Date: Tue, 18 Aug 2026 10:59:34 +0200	[thread overview]
Message-ID: <e5cef6f2-3953-43fd-be4e-db526840a344@oss.qualcomm.com> (raw)
In-Reply-To: <20260810-msm8974-usb3-v1-6-1a47e1185524@oss.qualcomm.com>

On 8/10/26 1:42 PM, Dmitry Baryshkov wrote:
> Each of the PHY_PARAM_CTRL1 field masks extends one bit below its
> documented field: TX_FULL_SWING [26:20] is coded as GENMASK(26, 19),
> TX_DEEMPH_6DB [19:14] as GENMASK(19, 13), TX_DEEMPH_3_5DB [13:8] as
> GENMASK(13, 7) and LOS_BIAS [7:3] as GENMASK(7, 2). Also, the field
> described as LOS_BIAS in reality is called LOS_LEVEL. FIELD_PREP against
> these masks places every value one bit short of its field, so the
> programmed swing/de-emphasis/LOS parameters land shifted and the
> neighbouring fields are corrupted; the masked write-readback in the SS
> PHY init reports 'write: ... to QSCRATCH: 4 FAILED'.
> 
> Align the masks with the documented field positions.
> 
> Fixes: ef19b117b834 ("phy: qualcomm: add qcom ipq806x dwc usb phy driver")
> Assisted-by: Claude:claude-fable-5
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---

[...]

> @@ -436,7 +440,8 @@ static int qcom_ipq806x_usb_ss_phy_init(struct phy *phy)
>  	data |= PHY_PARAM_CTRL1_TX_FULL_SWING(0x6e) |
>  		PHY_PARAM_CTRL1_TX_DEEMPH_6DB(0x20) |
>  		PHY_PARAM_CTRL1_TX_DEEMPH_3_5DB(phy_dwc3->tx_deamp_3_5db) |
> -		PHY_PARAM_CTRL1_LOS_BIAS(0x9);
> +		PHY_PARAM_CTRL1_LOS_LEVEL(0x9) |
> +		PHY_PARAM_CTRL1_LOS_BIAS(0x0);

lgtm except the POR value of BIAS is 2 on 8974 and 0 on ipq806x

Konrad

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  parent reply	other threads:[~2026-08-18  8:59 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10 11:42 [PATCH 00/10] ARM: qcom: enable USB3 (DWC3) controller on MSM8974 platform Dmitry Baryshkov
2026-08-10 11:42 ` Dmitry Baryshkov
2026-08-10 11:42 ` [PATCH 01/10] dt-bindings: usb: qcom,snps-dwc3: document the MSM8974 controller Dmitry Baryshkov
2026-08-10 11:42   ` Dmitry Baryshkov
2026-08-20  6:24   ` Krzysztof Kozlowski
2026-08-20  6:24     ` Krzysztof Kozlowski
2026-08-10 11:42 ` [PATCH 02/10] dt-bindings: phy: qcom,ipq806x-usb-phy-hs: document the MSM8974 HS PHY Dmitry Baryshkov
2026-08-10 11:42   ` Dmitry Baryshkov
2026-08-20  6:28   ` Krzysztof Kozlowski
2026-08-20  6:28     ` Krzysztof Kozlowski
2026-08-10 11:42 ` [PATCH 03/10] dt-bindings: phy: qcom,ipq806x-usb-phy-ss: add MSM8974 SS PHY Dmitry Baryshkov
2026-08-10 11:42   ` Dmitry Baryshkov
2026-08-10 11:54   ` sashiko-bot
2026-08-10 11:54     ` sashiko-bot
2026-08-10 13:05   ` Rob Herring (Arm)
2026-08-10 13:05     ` Rob Herring (Arm)
2026-08-20  6:31   ` Krzysztof Kozlowski
2026-08-20  6:31     ` Krzysztof Kozlowski
2026-08-10 11:42 ` [PATCH 04/10] phy: qcom-ipq806x-usb: add MSM8974 HS PHY support Dmitry Baryshkov
2026-08-10 11:42   ` Dmitry Baryshkov
2026-08-10 11:51   ` sashiko-bot
2026-08-10 11:51     ` sashiko-bot
2026-08-18  8:55   ` Konrad Dybcio
2026-08-18  8:55     ` Konrad Dybcio
2026-08-10 11:42 ` [PATCH 05/10] phy: qcom-ipq806x-usb: fix the SS PHY TEST_POWERDOWN bit Dmitry Baryshkov
2026-08-10 11:42   ` Dmitry Baryshkov
2026-08-10 11:53   ` sashiko-bot
2026-08-10 11:53     ` sashiko-bot
2026-08-18  8:57   ` Konrad Dybcio
2026-08-18  8:57     ` Konrad Dybcio
2026-08-10 11:42 ` [PATCH 06/10] phy: qcom-ipq806x-usb: fix the PHY_PARAM_CTRL1 field masks Dmitry Baryshkov
2026-08-10 11:42   ` Dmitry Baryshkov
2026-08-10 11:57   ` sashiko-bot
2026-08-10 11:57     ` sashiko-bot
2026-08-18  8:59   ` Konrad Dybcio [this message]
2026-08-18  8:59     ` Konrad Dybcio
2026-08-10 11:42 ` [PATCH 07/10] phy: qcom-ipq806x-usb: parse the tx-deamp-3_5db property as documented Dmitry Baryshkov
2026-08-10 11:42   ` Dmitry Baryshkov
2026-08-10 11:49   ` sashiko-bot
2026-08-10 11:49     ` sashiko-bot
2026-08-18  9:00   ` Konrad Dybcio
2026-08-18  9:00     ` Konrad Dybcio
2026-08-10 11:42 ` [PATCH 08/10] phy: qcom-ipq806x-usb: support the MSM8974 SS PHY parameters Dmitry Baryshkov
2026-08-10 11:42   ` Dmitry Baryshkov
2026-08-10 11:56   ` sashiko-bot
2026-08-10 11:56     ` sashiko-bot
2026-08-18  9:01   ` Konrad Dybcio
2026-08-18  9:01     ` Konrad Dybcio
2026-08-10 11:42 ` [PATCH 09/10] ARM: dts: qcom: msm8974: add the USB3 controller and its PHYs Dmitry Baryshkov
2026-08-10 11:42   ` Dmitry Baryshkov
2026-08-10 12:04   ` sashiko-bot
2026-08-10 12:04     ` sashiko-bot
2026-08-18  9:05   ` Konrad Dybcio
2026-08-18  9:05     ` Konrad Dybcio
2026-08-10 11:42 ` [PATCH 10/10] ARM: dts: qcom: apq8074-dragonboard: enable the USB3 host Dmitry Baryshkov
2026-08-10 11:42   ` Dmitry Baryshkov
2026-08-10 12:07   ` sashiko-bot
2026-08-10 12:07     ` sashiko-bot
2026-08-18  9:06   ` Konrad Dybcio
2026-08-18  9:06     ` Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e5cef6f2-3953-43fd-be4e-db526840a344@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=agross@codeaurora.org \
    --cc=andersson@kernel.org \
    --cc=ansuelsmth@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_wcheng@quicinc.com \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.