From: Wesley Cheng <quic_wcheng@quicinc.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Melody Olvera <quic_molvera@quicinc.com>,
Vinod Koul <vkoul@kernel.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
Rob Herring <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Bjorn Andersson <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>
Cc: <linux-arm-msm@vger.kernel.org>, <linux-phy@lists.infradead.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-usb@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 6/9] phy: qcom: Add M31 based eUSB2 PHY driver
Date: Wed, 19 Mar 2025 12:03:00 -0700 [thread overview]
Message-ID: <1956a94e-b231-4458-a1c1-6d9f158da669@quicinc.com> (raw)
In-Reply-To: <69fa7f33-e957-4dac-93dc-6fd40167873c@oss.qualcomm.com>
Hi Konrad,
On 3/11/2025 4:19 AM, Konrad Dybcio wrote:
> On 3/4/25 10:56 PM, Melody Olvera wrote:
>> From: Wesley Cheng <quic_wcheng@quicinc.com>
>>
>> SM8750 utilizes an eUSB2 PHY from M31. Add the initialization
>> sequences to bring it out of reset and into an operational state. This
>> differs to the M31 USB driver, in that the M31 eUSB2 driver will
>> require a connection to an eUSB2 repeater. This PHY driver will handle
>> the initialization of the associated eUSB2 repeater when required.
>>
>> Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
>> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
>> ---
>
> [...]
>
>> +static int msm_m31_eusb2_write_readback(void __iomem *base, u32 offset,
>> + const u32 mask, u32 val)
>> +{
>> + u32 write_val;
>> + u32 tmp;
>> +
>> + tmp = readl_relaxed(base + offset);
>> + tmp &= ~mask;
>> + write_val = tmp | val;
>> +
>> + writel_relaxed(write_val, base + offset);
>> +
>> + tmp = readl_relaxed(base + offset);
>> + tmp &= mask;
>> +
>> + if (tmp != val) {
>> + pr_err("write: %x to offset: %x FAILED\n", val, offset);
>> + return -EINVAL;
>> + }
>> +
>> + return 0;
>
> Is there a reason we need to read back every write?
>
> Does this have to do with some funny write buffering?
>
Probably because its just a form of write synchronization, since we're
using the relaxed variants. If desired I can switch to just using writel
and remove the readback.
Thanks
Wesley Cheng
next prev parent reply other threads:[~2025-03-19 19:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 21:56 [PATCH v2 0/9] phy: qcom: Introduce USB support for SM8750 Melody Olvera
2025-03-04 21:56 ` [PATCH v2 1/9] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Add SM8750 to QMP PHY Melody Olvera
2025-03-04 21:56 ` [PATCH v2 2/9] dt-bindings: phy: Add the M31 based eUSB2 PHY bindings Melody Olvera
2025-03-05 7:32 ` Krzysztof Kozlowski
2025-03-04 21:56 ` [PATCH v2 3/9] dt-bindings: usb: qcom,dwc3: Add SM8750 compatible Melody Olvera
2025-03-04 21:56 ` [PATCH v2 4/9] phy: qcom: qmp-combo: Add new PHY sequences for SM8750 Melody Olvera
2025-03-05 2:37 ` Dmitry Baryshkov
2025-03-04 21:56 ` [PATCH v2 5/9] phy: qcom: Update description for QCOM based eUSB2 repeater Melody Olvera
2025-03-05 2:38 ` Dmitry Baryshkov
2025-03-08 14:33 ` Konrad Dybcio
2025-03-04 21:56 ` [PATCH v2 6/9] phy: qcom: Add M31 based eUSB2 PHY driver Melody Olvera
2025-03-05 2:45 ` Dmitry Baryshkov
2025-03-11 11:19 ` Konrad Dybcio
2025-03-19 19:03 ` Wesley Cheng [this message]
2025-03-26 13:53 ` Konrad Dybcio
2025-03-04 21:56 ` [PATCH v2 7/9] arm64: dts: qcom: sm8750: Add USB support to SM8750 SoCs Melody Olvera
2025-03-05 2:57 ` Dmitry Baryshkov
2025-03-08 15:07 ` Konrad Dybcio
2025-03-04 21:56 ` [PATCH v2 8/9] arm64: dts: qcom: sm8750: Add USB support for SM8750 MTP and QRD platforms Melody Olvera
2025-03-05 2:58 ` Dmitry Baryshkov
2025-03-08 15:05 ` Konrad Dybcio
2025-03-04 21:56 ` [PATCH v2 9/9] arm64: defconfig: Add M31 eUSB2 PHY config Melody Olvera
2025-03-05 2:59 ` Dmitry Baryshkov
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=1956a94e-b231-4458-a1c1-6d9f158da669@quicinc.com \
--to=quic_wcheng@quicinc.com \
--cc=andersson@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kishon@kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.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=p.zabel@pengutronix.de \
--cc=quic_molvera@quicinc.com \
--cc=robh@kernel.org \
--cc=vkoul@kernel.org \
--cc=will@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®