From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Abel Vesa <abel.vesa@linaro.org>,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-arm-msm@vger.kernel.org,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rajendra Nayak <quic_rjendra@quicinc.com>,
Sibi Sankar <quic_sibis@quicinc.com>,
Johan Hovold <johan@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Trilok Soni <quic_tsoni@quicinc.com>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v4 2/4] usb: typec: Add support for Parade PS8830 Type-C Retimer
Date: Mon, 4 Nov 2024 11:25:40 +0100 [thread overview]
Message-ID: <ef1d1796-b45a-4b1b-bb61-4a3c63d3c718@oss.qualcomm.com> (raw)
In-Reply-To: <ZyifBejZtb7x0Vyc@linaro.org>
On 4.11.2024 11:16 AM, Abel Vesa wrote:
> On 24-11-02 10:17:56, Konrad Dybcio wrote:
>> On 1.11.2024 5:29 PM, Abel Vesa wrote:
>>> The Parade PS8830 is a USB4, DisplayPort and Thunderbolt 4 retimer,
>>> controlled over I2C. It usually sits between a USB/DisplayPort PHY
>>> and the Type-C connector, and provides orientation and altmode handling.
>>>
>>> The boards that use this retimer are the ones featuring the Qualcomm
>>> Snapdragon X Elite SoCs.
>>>
>>> Add a driver with support for the following modes:
>>> - DisplayPort 4-lanes
>>> - DisplayPort 2-lanes + USB3
>>> - USB3
>>>
>>> There is another variant of this retimer which is called PS8833. It seems
>>> to be really similar to the PS8830, so future-proof this driver by
>>> naming it ps883x.
>>>
>>> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
>>> ---
>>
>> [...]
>>
>>> +static void ps883x_configure(struct ps883x_retimer *retimer, int cfg0, int cfg1, int cfg2)
>>> +{
>>> + regmap_write(retimer->regmap, 0x0, cfg0);
>>> + regmap_write(retimer->regmap, 0x1, cfg1);
>>> + regmap_write(retimer->regmap, 0x2, cfg2);
>>> +}
>>
>> Somewhere between introducing regcache and dropping it, you removed
>> muxing to a safe mode during _configure()
>
> Oh, yeah, I forgot to mention that in the change log, it seems.
>
> Configuring to safe mode is not needed since we always do that on
> unplug anyway.
>
>>
>> [...]
>>
>>> + /* skip resetting if already configured */
>>> + if (regmap_test_bits(retimer->regmap, 0x00, BIT(0)))
>>> + return 0;
>>
>> What is that register and what does BIT(0) mean?
>
> Looking at the documentation, the first register is
> REG_USB_PORT_CONN_STATUS and spans over the first 4 bytes.
>
> But it doesn't really help here.
>
> BIT(0) doesn't really have a name, it just says "Connection present".
Please define both then. STATUS_CONNECTION_PRESENT sounds good for the bit.
Konrad
next prev parent reply other threads:[~2024-11-04 10:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 16:29 [PATCH v4 0/4] usb: typec: Add new driver for Parade PS8830 Type-C Retimer Abel Vesa
2024-11-01 16:29 ` [PATCH v4 1/4] dt-bindings: usb: Add Parade PS8830 Type-C retimer bindings Abel Vesa
2024-11-02 8:58 ` Krzysztof Kozlowski
2024-11-04 10:38 ` Abel Vesa
2024-11-01 16:29 ` [PATCH v4 2/4] usb: typec: Add support for Parade PS8830 Type-C Retimer Abel Vesa
2024-11-01 16:56 ` Christophe JAILLET
2024-11-04 10:36 ` Abel Vesa
2024-11-02 9:17 ` Konrad Dybcio
2024-11-04 10:16 ` Abel Vesa
2024-11-04 10:25 ` Konrad Dybcio [this message]
2024-11-04 10:40 ` Abel Vesa
2024-11-01 16:29 ` [PATCH v4 3/4] arm64: dts: qcom: x1e80100-crd: Describe the Parade PS8830 retimers Abel Vesa
2024-11-01 16:29 ` [PATCH v4 4/4] arm64: dts: qcom: x1e80100-crd: Enable external DisplayPort support Abel Vesa
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=ef1d1796-b45a-4b1b-bb61-4a3c63d3c718@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=abel.vesa@linaro.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=johan@kernel.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-usb@vger.kernel.org \
--cc=quic_rjendra@quicinc.com \
--cc=quic_sibis@quicinc.com \
--cc=quic_tsoni@quicinc.com \
--cc=robh@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