From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Bhupesh Sharma <bhupesh.sharma@linaro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
agross@kernel.org, bhupesh.linux@gmail.com,
linux-kernel@vger.kernel.org, robh+dt@kernel.org,
andersson@kernel.org
Subject: Re: [PATCH 3/3] arm64: dts: qcom: sm6115: Add USB SS qmp phy node
Date: Wed, 14 Dec 2022 10:56:17 +0100 [thread overview]
Message-ID: <c428b894-6c6c-bd26-6815-ca8c091c6ac5@linaro.org> (raw)
In-Reply-To: <CAH=2NtynGaNH+wm-wavj=NsGFQrWVHqjYmivN2nuq-YSXFs0tw@mail.gmail.com>
On 14.12.2022 06:20, Bhupesh Sharma wrote:
> On Wed, 14 Dec 2022 at 00:29, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 13/12/2022 19:52, Bhupesh Sharma wrote:
>>> Hi Krzysztof,
>>>
>>> On Tue, 13 Dec 2022 at 18:26, Krzysztof Kozlowski
>>> <krzysztof.kozlowski@linaro.org> wrote:
>>>>
>>>> On 13/12/2022 13:38, Bhupesh Sharma wrote:
>>>>> Add USB superspeed qmp phy node to dtsi.
>>>>>
>>>>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
>>>>> ---
>>>>> arch/arm64/boot/dts/qcom/sm6115.dtsi | 38 ++++++++++++++++++++++++++--
>>>>> 1 file changed, 36 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
>>>>> index e4ce135264f3d..9c5c024919f92 100644
>>>>> --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
>>>>> +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
>>>>> @@ -579,6 +579,40 @@ usb_hsphy: phy@1613000 {
>>>>> status = "disabled";
>>>>> };
>>>>>
>>>>> + usb_qmpphy: phy@1615000 {
>>>>> + compatible = "qcom,sm6115-qmp-usb3-phy";
>>>>> + reg = <0x01615000 0x200>;
>>>>> + #clock-cells = <1>;
>>>>> + #address-cells = <1>;
>>>>> + #size-cells = <1>;
>>>>> + ranges;
>>>>> + clocks = <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>,
>>>>> + <&gcc GCC_USB3_PRIM_CLKREF_CLK>,
>>>>> + <&gcc GCC_AHB2PHY_USB_CLK>;
>>>>> + clock-names = "com_aux",
>>>>> + "ref",
>>>>> + "cfg_ahb";
>>>>> + resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>,
>>>>> + <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>;
>>>>> + reset-names = "phy", "phy_phy";
>>>>> + status = "disabled";
>>>>
>>>> Hm, you add a disabled PHY which is used by existing controller. The
>>>> controller is enabled in board DTS, but new PHY node isn't. Aren't you
>>>> now breaking it?
>>>
>>> The USB controller is connected to two PHYs - one is HS PHY and the other is SS
>>> QMP Phy. So while the exiting board dts describes and uses only the HS
>>> PHY, newer
>>> board dts files (which will soon be sent out as a separate patch),
>>
>> Then I miss how do you narrow the existing DTS to use only one PHY. I
>> don't see anything in this patchset.
>>
>>> will use both the HS and SS
>>> USB PHYs.
>>>
>>> So, this will not break the existing board dts files.
>>
>> I still think it will be. The board boots with USB with one phy enabled
>> and one disabled. The driver gets phys unconditionally and one of them
>> is disabled.
>>
>> Even if Linux implementation will work (devm_usb_get_phy_by_phandle will
>> return -ENXIO or -ENODEV for disabled node), it is still a bit confusing
>> and I wonder how other users of such DTS should behave. Although it will
>> affect only one board, so maybe there are no other users?
>
> Ah, now I get your point. So how does the following fix in
> sm4250-oneplus-billie2.dts look like. It allows the base dtsi to carry
> the usb nodes as exposed by the SoC and allows other board dts files
> to use both the USB2 and UBS3 PHYs.
>
> Please let me know.
>
> --- a/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts
> +++ b/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts
> @@ -232,6 +232,9 @@ &usb {
> &usb_dwc3 {
> maximum-speed = "high-speed";
> dr_mode = "peripheral";
> +
> + phys = <&usb_hsphy>;
> + phy-names = "usb2-phy";
> };
Looks good now!
Konrad
>
> Thanks.
prev parent reply other threads:[~2022-12-14 9:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 12:38 [PATCH 0/3] arm64: dts: sm6115: Add USB SS qmp phy node and perform some cleanups Bhupesh Sharma
2022-12-13 12:38 ` [PATCH 1/3] arm64: dts: qcom: sm6115: Cleanup USB node names Bhupesh Sharma
2022-12-13 12:39 ` Konrad Dybcio
2022-12-13 12:51 ` Krzysztof Kozlowski
2022-12-13 18:49 ` Bhupesh Sharma
2022-12-13 12:38 ` [PATCH 2/3] arm64: dts: qcom: sm6115: Move USB node's 'maximum-speed' and 'dr_mode' properties to dts Bhupesh Sharma
2022-12-13 12:39 ` Konrad Dybcio
2022-12-13 12:38 ` [PATCH 3/3] arm64: dts: qcom: sm6115: Add USB SS qmp phy node Bhupesh Sharma
2022-12-13 12:49 ` Konrad Dybcio
2022-12-13 22:18 ` Dmitry Baryshkov
2022-12-14 4:43 ` Bhupesh Sharma
2022-12-13 12:56 ` Krzysztof Kozlowski
2022-12-13 18:52 ` Bhupesh Sharma
2022-12-13 18:54 ` Konrad Dybcio
2022-12-13 18:59 ` Krzysztof Kozlowski
2022-12-14 5:20 ` Bhupesh Sharma
2022-12-14 9:56 ` Konrad Dybcio [this message]
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=c428b894-6c6c-bd26-6815-ca8c091c6ac5@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=bhupesh.linux@gmail.com \
--cc=bhupesh.sharma@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).