All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luca Weiss" <luca.weiss@fairphone.com>
To: "Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
	"Vinod Koul" <vkoul@kernel.org>,
	"Johan Hovold" <johan@kernel.org>
Cc: <linux-arm-msm@vger.kernel.org>,
	<~postmarketos/upstreaming@lists.sr.ht>,
	<phone-devel@vger.kernel.org>, "Andy Gross" <agross@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>,
	<linux-phy@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/3] phy: qcom-qmp-combo: Add config for SM6350
Date: Fri, 13 Jan 2023 13:44:34 +0100	[thread overview]
Message-ID: <CPR2LS3SJQ3I.Z7UY505COG3@otso> (raw)
In-Reply-To: <cf968a25-02f7-d402-530b-eb379b707e54@linaro.org>

Hi Dmitry,

On Thu Jan 12, 2023 at 8:33 PM CET, Dmitry Baryshkov wrote:
> On 12/01/2023 19:50, Vinod Koul wrote:
> > On 28-12-22, 15:17, Johan Hovold wrote:
> >> Luca, Vinod,
> >>
> >> On Wed, Nov 30, 2022 at 09:14:28AM +0100, Luca Weiss wrote:
> >>> Add the tables and config for the combo phy found on SM6350.
> >>>
> >>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> >>> ---
> >>> Changes since v2:
> >>> * Drop dp_txa/dp_txb changes, not required
> >>> * Fix dp_dp_phy offset
> >>>
> >>>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 126 ++++++++++++++++++++++
> >>>   1 file changed, 126 insertions(+)
> >>>
> >>> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> >>> index 77052c66cf70..6ac0c68269dc 100644
> >>> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> >>> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> >>
> >>> @@ -975,6 +1039,19 @@ static const char * const sc7180_usb3phy_reset_l[] = {
> >>>   	"phy",
> >>>   };
> >>>   
> >>> +static const struct qmp_combo_offsets qmp_combo_offsets_v3 = {
> >>> +	.com		= 0x0000,
> >>> +	.txa		= 0x1200,
> >>> +	.rxa		= 0x1400,
> >>> +	.txb		= 0x1600,
> >>> +	.rxb		= 0x1800,
> >>> +	.usb3_serdes	= 0x1000,
> >>> +	.usb3_pcs_misc	= 0x1a00,
> >>> +	.usb3_pcs	= 0x1c00,
> >>> +	.dp_serdes	= 0x1000,
> >>
> >> I would have expected this to be 0x2000 as that's what the older
> >> platforms have been using for the dp serdes table so far. Without access
> >> to any documentation it's hard to tell whether everyone's just been
> >> cargo-culting all along or if there's actually something there at offset
> >> 0x2000.
>
> usb3_serdes is 0x1000, so dp_serdes equal to 0x1000 is definitely an typo.
>
> Judging from the downstream dtsi, the DP PHY starts at offset 0x2000. So 
> dp_serdes is equal to 0x2000, dp_phy = 0x2a00, ln_tx1 = 0x2200, ln_tx2 = 
> 0x2600.

Can you share how you got to the 0x2000 offset? You can see my
(potentially wrong) reasoning for 0x1000 a few messages ago[0].

The only 0x2000-something I could find now while looking at it again is
"#define USB3_DP_PHY_DP_DP_PHY_PD_CTL 0x2a18" which becomes
USB3_DP_DP_PHY_PD_CTL in the driver but this is seemingly not used at
all in my msm-4.19 tree.

Also if you have any idea on how to test it at runtime without actually
having to get all the type-C functionality up I'd be happy to try that.
Unfortunately I believe there's still quite some bits missing to
actually get DP out via the USB-C port - which I imagine would trigger
the PHY setup.

[0] https://lore.kernel.org/linux-arm-msm/CPDIYQ3SSY3E.I0Y0NMIED0WO@otso/

Regards
Luca

>
> >>
> >> Vinod, could you shed some light on this as presumably you have access
> >> to some documentation?
> >>
> >>> +	.dp_dp_phy	= 0x2a00,
> > 
> > No sorry, I dont have access to this version...
> > 
>
> -- 
> With best wishes
> Dmitry


WARNING: multiple messages have this Message-ID (diff)
From: "Luca Weiss" <luca.weiss@fairphone.com>
To: "Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
	"Vinod Koul" <vkoul@kernel.org>,
	"Johan Hovold" <johan@kernel.org>
Cc: <linux-arm-msm@vger.kernel.org>,
	<~postmarketos/upstreaming@lists.sr.ht>,
	<phone-devel@vger.kernel.org>, "Andy Gross" <agross@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>,
	<linux-phy@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/3] phy: qcom-qmp-combo: Add config for SM6350
Date: Fri, 13 Jan 2023 13:44:34 +0100	[thread overview]
Message-ID: <CPR2LS3SJQ3I.Z7UY505COG3@otso> (raw)
In-Reply-To: <cf968a25-02f7-d402-530b-eb379b707e54@linaro.org>

Hi Dmitry,

On Thu Jan 12, 2023 at 8:33 PM CET, Dmitry Baryshkov wrote:
> On 12/01/2023 19:50, Vinod Koul wrote:
> > On 28-12-22, 15:17, Johan Hovold wrote:
> >> Luca, Vinod,
> >>
> >> On Wed, Nov 30, 2022 at 09:14:28AM +0100, Luca Weiss wrote:
> >>> Add the tables and config for the combo phy found on SM6350.
> >>>
> >>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> >>> ---
> >>> Changes since v2:
> >>> * Drop dp_txa/dp_txb changes, not required
> >>> * Fix dp_dp_phy offset
> >>>
> >>>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 126 ++++++++++++++++++++++
> >>>   1 file changed, 126 insertions(+)
> >>>
> >>> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> >>> index 77052c66cf70..6ac0c68269dc 100644
> >>> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> >>> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> >>
> >>> @@ -975,6 +1039,19 @@ static const char * const sc7180_usb3phy_reset_l[] = {
> >>>   	"phy",
> >>>   };
> >>>   
> >>> +static const struct qmp_combo_offsets qmp_combo_offsets_v3 = {
> >>> +	.com		= 0x0000,
> >>> +	.txa		= 0x1200,
> >>> +	.rxa		= 0x1400,
> >>> +	.txb		= 0x1600,
> >>> +	.rxb		= 0x1800,
> >>> +	.usb3_serdes	= 0x1000,
> >>> +	.usb3_pcs_misc	= 0x1a00,
> >>> +	.usb3_pcs	= 0x1c00,
> >>> +	.dp_serdes	= 0x1000,
> >>
> >> I would have expected this to be 0x2000 as that's what the older
> >> platforms have been using for the dp serdes table so far. Without access
> >> to any documentation it's hard to tell whether everyone's just been
> >> cargo-culting all along or if there's actually something there at offset
> >> 0x2000.
>
> usb3_serdes is 0x1000, so dp_serdes equal to 0x1000 is definitely an typo.
>
> Judging from the downstream dtsi, the DP PHY starts at offset 0x2000. So 
> dp_serdes is equal to 0x2000, dp_phy = 0x2a00, ln_tx1 = 0x2200, ln_tx2 = 
> 0x2600.

Can you share how you got to the 0x2000 offset? You can see my
(potentially wrong) reasoning for 0x1000 a few messages ago[0].

The only 0x2000-something I could find now while looking at it again is
"#define USB3_DP_PHY_DP_DP_PHY_PD_CTL 0x2a18" which becomes
USB3_DP_DP_PHY_PD_CTL in the driver but this is seemingly not used at
all in my msm-4.19 tree.

Also if you have any idea on how to test it at runtime without actually
having to get all the type-C functionality up I'd be happy to try that.
Unfortunately I believe there's still quite some bits missing to
actually get DP out via the USB-C port - which I imagine would trigger
the PHY setup.

[0] https://lore.kernel.org/linux-arm-msm/CPDIYQ3SSY3E.I0Y0NMIED0WO@otso/

Regards
Luca

>
> >>
> >> Vinod, could you shed some light on this as presumably you have access
> >> to some documentation?
> >>
> >>> +	.dp_dp_phy	= 0x2a00,
> > 
> > No sorry, I dont have access to this version...
> > 
>
> -- 
> With best wishes
> Dmitry


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

  reply	other threads:[~2023-01-13 12:57 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-30  8:14 [PATCH v3 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Luca Weiss
2022-11-30  8:14 ` Luca Weiss
2022-11-30  8:14 ` [PATCH v3 2/3] phy: qcom-qmp-combo: Add config for SM6350 Luca Weiss
2022-11-30  8:14   ` Luca Weiss
2022-12-28 14:17   ` Johan Hovold
2022-12-28 14:17     ` Johan Hovold
2022-12-28 14:36     ` Luca Weiss
2022-12-28 14:36       ` Luca Weiss
2023-01-12 17:50     ` Vinod Koul
2023-01-12 17:50       ` Vinod Koul
2023-01-12 19:33       ` Dmitry Baryshkov
2023-01-12 19:33         ` Dmitry Baryshkov
2023-01-13 12:44         ` Luca Weiss [this message]
2023-01-13 12:44           ` Luca Weiss
2023-01-13 13:01           ` Dmitry Baryshkov
2023-01-13 13:01             ` Dmitry Baryshkov
2023-01-20 14:13             ` Luca Weiss
2023-01-20 14:13               ` Luca Weiss
2023-01-23  9:43               ` Johan Hovold
2023-01-23  9:43                 ` Johan Hovold
2023-01-23 11:15                 ` Dmitry Baryshkov
2023-01-23 11:15                   ` Dmitry Baryshkov
2023-01-23 11:22                   ` Luca Weiss
2023-01-23 11:22                     ` Luca Weiss
2023-01-23 12:03                     ` Johan Hovold
2023-01-23 12:03                       ` Johan Hovold
2023-01-23 13:31                       ` Luca Weiss
2023-01-23 13:31                         ` Luca Weiss
2023-01-23 12:05                   ` Johan Hovold
2023-01-23 12:05                     ` Johan Hovold
2023-01-23 12:09                     ` Dmitry Baryshkov
2023-01-23 12:09                       ` Dmitry Baryshkov
2022-11-30  8:14 ` [PATCH v3 3/3] arm64: dts: qcom: sm6350: Use specific qmpphy compatible Luca Weiss
2022-12-28 14:23   ` Johan Hovold
2022-12-01 16:27 ` [PATCH v3 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Krzysztof Kozlowski
2022-12-01 16:27   ` Krzysztof Kozlowski
2022-12-28 14:11 ` Johan Hovold
2022-12-28 14:11   ` Johan Hovold

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=CPR2LS3SJQ3I.Z7UY505COG3@otso \
    --to=luca.weiss@fairphone.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=johan@kernel.org \
    --cc=kishon@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=vkoul@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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.