[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZzRgB_U3qYtV7O0h@linaro.org>
Date: Wed, 13 Nov 2024 09:15:03 +0100
From: Stephan Gerhold <stephan.gerhold@...aro.org>
To: barnabas.czeman@...nlining.org
Cc: Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Amit Kucheria <amitk@...nel.org>,
Thara Gopinath <thara.gopinath@...il.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>,
Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-pm@...r.kernel.org, iommu@...ts.linux.dev,
Otto Pflüger <otto.pflueger@...cue.de>
Subject: Re: [PATCH v5 08/10] arm64: dts: qcom: Add initial support for
MSM8917
On Tue, Nov 12, 2024 at 06:38:04PM +0100, barnabas.czeman@...nlining.org wrote:
> On 2024-11-12 18:27, Stephan Gerhold wrote:
> > On Tue, Nov 12, 2024 at 04:49:38PM +0100, Barnabás Czémán wrote:
> > > From: Otto Pflüger <otto.pflueger@...cue.de>
> > >
> > > Add initial support for MSM8917 SoC.
> > >
> > > Signed-off-by: Otto Pflüger <otto.pflueger@...cue.de>
> > > [reword commit, rebase, fix schema errors]
> > > Signed-off-by: Barnabás Czémán <barnabas.czeman@...nlining.org>
> > > ---
> > > arch/arm64/boot/dts/qcom/msm8917.dtsi | 1974
> > > +++++++++++++++++++++++++++++++++
> > > 1 file changed, 1974 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/msm8917.dtsi
> > > b/arch/arm64/boot/dts/qcom/msm8917.dtsi
> > > new file mode 100644
> > > index 0000000000000000000000000000000000000000..cf0a0eec1141e11faca0ee9705d6348ab32a0f50
> > > --- /dev/null
> > > +++ b/arch/arm64/boot/dts/qcom/msm8917.dtsi
> > > @@ -0,0 +1,1974 @@
> [...]
> > > + sdc1_clk_on: sdc1-clk-on-state {
> > > + pins = "sdc1_clk";
> > > + bias-disable;
> > > + drive-strength = <16>;
> > > + };
> > > +
> > > + sdc1_clk_off: sdc1-clk-off-state {
> > > + pins = "sdc1_clk";
> > > + bias-disable;
> > > + drive-strength = <2>;
> > > + };
> > > +
> > > + sdc1_cmd_on: sdc1-cmd-on-state {
> > > + pins = "sdc1_cmd";
> > > + bias-disable;
> > > + drive-strength = <10>;
> > > + };
> > > +
> > > + sdc1_cmd_off: sdc1-cmd-off-state {
> > > + pins = "sdc1_cmd";
> > > + bias-disable;
> > > + drive-strength = <2>;
> > > + };
> > > +
> > > + sdc1_data_on: sdc1-data-on-state {
> > > + pins = "sdc1_data";
> > > + bias-pull-up;
> > > + drive-strength = <10>;
> > > + };
> > > +
> > > + sdc1_data_off: sdc1-data-off-state {
> > > + pins = "sdc1_data";
> > > + bias-pull-up;
> > > + drive-strength = <2>;
> > > + };
> > > +
> > > + sdc1_rclk_on: sdc1-rclk-on-state {
> > > + pins = "sdc1_rclk";
> > > + bias-pull-down;
> > > + };
> > > +
> > > + sdc1_rclk_off: sdc1-rclk-off-state {
> > > + pins = "sdc1_rclk";
> > > + bias-pull-down;
> > > + };
> > > +
> > > + sdc2_clk_on: sdc2-clk-on-state {
> > > + pins = "sdc2_clk";
> > > + drive-strength = <16>;
> > > + bias-disable;
> > > + };
> > > +
> > > + sdc2_clk_off: sdc2-clk-off-state {
> > > + pins = "sdc2_clk";
> > > + bias-disable;
> > > + drive-strength = <2>;
> > > + };
> > > +
> > > + sdc2_cmd_on: sdc2-cmd-on-state {
> > > + pins = "sdc2_cmd";
> > > + bias-pull-up;
> > > + drive-strength = <10>;
> > > + };
> > > +
> > > + sdc2_cmd_off: sdc2-cmd-off-state {
> > > + pins = "sdc2_cmd";
> > > + bias-pull-up;
> > > + drive-strength = <2>;
> > > + };
> >
> > These are not referenced anywhere? Not here in the sdhc_X nodes, and
> > also not in your msm8917-xiaomi-riva.dts. Would also recommend
> > consolidating these to a single node like in msm8916.dtsi, see commit
> > c943e4c58b2f ("arm64: dts: qcom: msm8916/39: Consolidate SDC pinctrl").
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c943e4c58b2ffb0dcd497f8b12f284f5e8fc477e
> >
> > > +
> > > + sdc2_cd_on: cd-on-state {
> > > + pins = "gpio67";
> > > + function = "gpio";
> > > + drive-strength = <2>;
> > > + bias-pull-up;
> > > + };
> > > +
> > > + sdc2_cd_off: cd-off-state {
> > > + pins = "gpio67";
> > > + function = "gpio";
> > > + drive-strength = <2>;
> > > + bias-disable;
> > > + };
> >
> > It does not make sense to have different on/off states for the card
> > detect (CD) pin of the SD card. It needs to work even when the SD card
> > is suspended so we can detect insertions/removals. Also should be placed
> > in the board-specific DT part.
> I have made these based on this https://git.codelinaro.org/clo/la/kernel/msm-4.9/-/blob/LA.UM.9.6.2.r1-04800-89xx.0/arch/arm64/boot/dts/qcom/msm8917-pinctrl.dtsi
Yes, msm8916-pinctrl.dtsi also has this in the downstream sources, but
as I explain in the commit linked below I don't think this is right. You
can probably just change it to bias-disable like I did for most of the
boards. There is usually external pull up that keeps it working even in
the "cd-off-state".
> >
> > See commit dfbda20dabaa ("arm64: dts: qcom: msm8916/39: Fix SD card
> > detect pinctrl").
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfbda20dabaa1f284abd550035db5887384c8e4c
> >
Thanks,
Stephan
Powered by blists - more mailing lists