From: Johan Hovold <johan@kernel.org>
To: Luca Weiss <luca.weiss@fairphone.com>
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>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2 2/3] phy: qcom-qmp-combo: Add config for SM6350
Date: Fri, 25 Nov 2022 11:23:50 +0100 [thread overview]
Message-ID: <Y4CXtn/o3aNvBNh5@hovoldconsulting.com> (raw)
In-Reply-To: <COLAQH772WXW.P442ICY46TDR@otso>
On Fri, Nov 25, 2022 at 11:14:53AM +0100, Luca Weiss wrote:
> Hi Johan,
>
> On Fri Nov 25, 2022 at 11:01 AM CET, Johan Hovold wrote:
> > On Fri, Nov 25, 2022 at 10:27:48AM +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>
> > > ---
> > > @Johan Hovold, here I've added dp_txa & dp_txb, I believe otherwise
> > > qmp->dp_tx would be wrong. Is this different on sc8280xp or was this a
> > > mistake on your side? I think this should probably be split out to
> > > another patch to not mix things up too much.
> >
> > Yeah, that's a difference in sc8280xp which does not have dedicated TX
> > registers for DP.
>
> Good to know.
>
> >
> > This is probably best handled explicitly when parsing the DT by using
> > dp_txa/b if they are set and otherwise fallback to txa/txb (e.g.
> > instead of hiding it in the v5 table by using the same offset in two
> > places).
>
> Are you thinking about something like this?
>
> if (offs->dp_txa)
> qmp->dp_tx = base + offs->dp_txa
> else
> qmp->dp_tx = base + offs->txa;
>
> if (offs->dp_txb)
> qmp->dp_tx2 = base + offs->dp_txb;
> else
> qmp->dp_tx2 = base + offs->txb;
>
> This wouldn't handle ".dp_txa = 0x0000" but I don't think this should be
> a problem, right?
Yeah, that should be fine. I'd even merge the branches:
if (offs->dp_txa) {
qmp->dp_tx = base + offs->dp_txa;
qmp->dp_tx2 = base + offs->dp_txb;
} else {
qmp->dp_tx = base + offs->txa;
qmp->dp_tx2 = base + offs->txb;
}
Johan
WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <johan@kernel.org>
To: Luca Weiss <luca.weiss@fairphone.com>
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>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2 2/3] phy: qcom-qmp-combo: Add config for SM6350
Date: Fri, 25 Nov 2022 11:23:50 +0100 [thread overview]
Message-ID: <Y4CXtn/o3aNvBNh5@hovoldconsulting.com> (raw)
In-Reply-To: <COLAQH772WXW.P442ICY46TDR@otso>
On Fri, Nov 25, 2022 at 11:14:53AM +0100, Luca Weiss wrote:
> Hi Johan,
>
> On Fri Nov 25, 2022 at 11:01 AM CET, Johan Hovold wrote:
> > On Fri, Nov 25, 2022 at 10:27:48AM +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>
> > > ---
> > > @Johan Hovold, here I've added dp_txa & dp_txb, I believe otherwise
> > > qmp->dp_tx would be wrong. Is this different on sc8280xp or was this a
> > > mistake on your side? I think this should probably be split out to
> > > another patch to not mix things up too much.
> >
> > Yeah, that's a difference in sc8280xp which does not have dedicated TX
> > registers for DP.
>
> Good to know.
>
> >
> > This is probably best handled explicitly when parsing the DT by using
> > dp_txa/b if they are set and otherwise fallback to txa/txb (e.g.
> > instead of hiding it in the v5 table by using the same offset in two
> > places).
>
> Are you thinking about something like this?
>
> if (offs->dp_txa)
> qmp->dp_tx = base + offs->dp_txa
> else
> qmp->dp_tx = base + offs->txa;
>
> if (offs->dp_txb)
> qmp->dp_tx2 = base + offs->dp_txb;
> else
> qmp->dp_tx2 = base + offs->txb;
>
> This wouldn't handle ".dp_txa = 0x0000" but I don't think this should be
> a problem, right?
Yeah, that should be fine. I'd even merge the branches:
if (offs->dp_txa) {
qmp->dp_tx = base + offs->dp_txa;
qmp->dp_tx2 = base + offs->dp_txb;
} else {
qmp->dp_tx = base + offs->txa;
qmp->dp_tx2 = base + offs->txb;
}
Johan
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2022-11-25 10:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 9:27 [RFC PATCH v2 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Luca Weiss
2022-11-25 9:27 ` Luca Weiss
2022-11-25 9:27 ` [RFC PATCH v2 2/3] phy: qcom-qmp-combo: Add config for SM6350 Luca Weiss
2022-11-25 9:27 ` Luca Weiss
2022-11-25 10:01 ` Johan Hovold
2022-11-25 10:01 ` Johan Hovold
2022-11-25 10:14 ` Luca Weiss
2022-11-25 10:14 ` Luca Weiss
2022-11-25 10:23 ` Johan Hovold [this message]
2022-11-25 10:23 ` Johan Hovold
2022-11-25 9:27 ` [RFC PATCH v2 3/3] arm64: dts: qcom: sm6350: Use specific qmpphy compatible Luca Weiss
2022-11-25 10:11 ` Johan Hovold
2022-11-25 9:50 ` [RFC PATCH v2 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Johan Hovold
2022-11-25 9:50 ` Johan Hovold
2022-11-25 9:55 ` Luca Weiss
2022-11-25 9:55 ` Luca Weiss
2022-11-25 10:19 ` Johan Hovold
2022-11-25 10:19 ` Johan Hovold
2022-11-25 12:53 ` Luca Weiss
2022-11-25 12:53 ` Luca Weiss
2022-11-25 13:52 ` Johan Hovold
2022-11-25 13:52 ` Johan Hovold
2022-11-25 14:12 ` Luca Weiss
2022-11-25 14:12 ` Luca Weiss
2022-11-29 15:29 ` Johan Hovold
2022-11-29 15:29 ` 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=Y4CXtn/o3aNvBNh5@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=agross@kernel.org \
--cc=andersson@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=luca.weiss@fairphone.com \
--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.