diff mbox series

[5/6] arm64: dts: qcom: msm8994-huawei-angler: Add sdhc{1,2} definitions

Message ID 20220113233358.17972-6-petr.vorel@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series msm8994-huawei-angler and msm8992-lg-bullhead sdhc1 fixes | expand

Commit Message

Petr Vorel Jan. 13, 2022, 11:33 p.m. UTC
Although downstream supports HS400, there are overclocking warnings when
using mmc-hs400-1_8v:

mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
mmc0: Card appears overclocked; req 400000000 Hz, actual 768000000 Hz
mmc0: Card appears overclocked; req 400000000 Hz, actual 768000000 Hz
mmc0: new HS400 MMC card at address 0001

Using HS200 (i.e. mmc-hs200-1_8v or mmc-ddr-1_8v) would reduce them:

mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
mmc0: new HS200 MMC card at address 0001

But as the problem is probably elsewhere (bullhead behaves the same),
keep mmc-hs400-1_8v.

Angler does not have SD card, thus explicitly disable sdhc2.

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
 .../dts/qcom/msm8994-huawei-angler-rev-101.dts   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Petr Vorel Jan. 13, 2022, 11:40 p.m. UTC | #1
Hi all,

> Although downstream supports HS400, there are overclocking warnings when
> using mmc-hs400-1_8v:

> mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> mmc0: Card appears overclocked; req 400000000 Hz, actual 768000000 Hz
> mmc0: Card appears overclocked; req 400000000 Hz, actual 768000000 Hz
> mmc0: new HS400 MMC card at address 0001

> Using HS200 (i.e. mmc-hs200-1_8v or mmc-ddr-1_8v) would reduce them:

> mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> mmc0: new HS200 MMC card at address 0001

> But as the problem is probably elsewhere (bullhead behaves the same),
> keep mmc-hs400-1_8v.

> Angler does not have SD card, thus explicitly disable sdhc2.

> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> ---
>  .../dts/qcom/msm8994-huawei-angler-rev-101.dts   | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

> diff --git a/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts b/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
> index 0e3dd48f0dbf..5ce3dc169bb4 100644
> --- a/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
> +++ b/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
> @@ -7,6 +7,7 @@
>  /dts-v1/;

>  #include "msm8994.dtsi"
> +#include <dt-bindings/gpio/gpio.h>

>  /* Angler's firmware does not report where the memory is allocated */
>  /delete-node/ &cont_splash_mem;
> @@ -41,3 +42,18 @@ serial@f991e000 {
>  &tlmm {
>  	gpio-reserved-ranges = <85 4>;
>  };
> +
> +/*
> + * Although downstream supports also HS400 there are fewer overclocking
> + * warnings when used DDR, also LK bootloader reports DDR mode.
> + */
This is a left over from experimenting with mmc-ddr-1_8v.
But maybe it can stay (unless I manage solve the problem).

Kind regards,
Petr

> +&sdhc1 {
> +	status = "okay";
> +
> +	mmc-hs400-1_8v;
> +};
> +
> +/* Angler does not have SD card */
> +&sdhc2 {
> +	status = "disabled";
> +};
Konrad Dybcio Jan. 14, 2022, 6:27 p.m. UTC | #2
Hi, please check if [1] can solve your clock issues, as it did for me.


Konrad


[1] https://patchwork.kernel.org/project/linux-arm-msm/patch/20211230023101.1122588-1-konrad.dybcio@somainline.org/
Petr Vorel Jan. 14, 2022, 9:16 p.m. UTC | #3
Hi Konrad, all,

> Hi, please check if [1] can solve your clock issues, as it did for me.
Thanks for info.  I still need my patch "arm64: dts: qcom: msm8994: Provide
missing "xo_board" and "sleep_clk" to GCC" [2] regardless I use "clk: qcom:
gcc-msm8994: Remove NoC clocks" [1] or not.

Kind regards,
Petr

> Konrad


> [1] https://patchwork.kernel.org/project/linux-arm-msm/patch/20211230023101.1122588-1-konrad.dybcio@somainline.org/
[2] https://lore.kernel.org/linux-arm-msm/20220113233358.17972-4-petr.vorel@gmail.com/T/#u
Konrad Dybcio Jan. 14, 2022, 9:19 p.m. UTC | #4
> Hi Konrad, all,
> 
>> Hi, please check if [1] can solve your clock issues, as it did for me.
> Thanks for info.  I still need my patch "arm64: dts: qcom: msm8994: Provide
> missing "xo_board" and "sleep_clk" to GCC" [2] regardless I use "clk: qcom:
> gcc-msm8994: Remove NoC clocks" [1] or not.
Yeah, that slipped my watchlist as well. I was supposed to send this (or have
sent in the past but then forgot to resubmit it? not sure tbf) before gcc changes
landed, but I forgot to. Providing the clocks is required.

Konrad

> 
> Kind regards,
> Petr
> 
>> Konrad
> 
>> [1] https://patchwork.kernel.org/project/linux-arm-msm/patch/20211230023101.1122588-1-konrad.dybcio@somainline.org/
> [2] https://lore.kernel.org/linux-arm-msm/20220113233358.17972-4-petr.vorel@gmail.com/T/#u
>
Bjorn Andersson Jan. 31, 2022, 10:43 p.m. UTC | #5
On Thu 13 Jan 17:33 CST 2022, Petr Vorel wrote:

> Although downstream supports HS400, there are overclocking warnings when
> using mmc-hs400-1_8v:
> 
> mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> mmc0: Card appears overclocked; req 400000000 Hz, actual 768000000 Hz
> mmc0: Card appears overclocked; req 400000000 Hz, actual 768000000 Hz
> mmc0: new HS400 MMC card at address 0001
> 
> Using HS200 (i.e. mmc-hs200-1_8v or mmc-ddr-1_8v) would reduce them:
> 
> mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> mmc0: new HS200 MMC card at address 0001
> 
> But as the problem is probably elsewhere (bullhead behaves the same),
> keep mmc-hs400-1_8v.
> 
> Angler does not have SD card, thus explicitly disable sdhc2.
> 
> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> ---
>  .../dts/qcom/msm8994-huawei-angler-rev-101.dts   | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts b/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
> index 0e3dd48f0dbf..5ce3dc169bb4 100644
> --- a/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
> +++ b/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
> @@ -7,6 +7,7 @@
>  /dts-v1/;
>  
>  #include "msm8994.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
>  
>  /* Angler's firmware does not report where the memory is allocated */
>  /delete-node/ &cont_splash_mem;
> @@ -41,3 +42,18 @@ serial@f991e000 {
>  &tlmm {
>  	gpio-reserved-ranges = <85 4>;
>  };
> +
> +/*
> + * Although downstream supports also HS400 there are fewer overclocking
> + * warnings when used DDR, also LK bootloader reports DDR mode.
> + */
> +&sdhc1 {
> +	status = "okay";
> +
> +	mmc-hs400-1_8v;
> +};
> +
> +/* Angler does not have SD card */
> +&sdhc2 {

But isn't &sdhc2 already disabled from msm8992.dtsi and msm8994.dtsi?

Regards,
Bjorn

> +	status = "disabled";
> +};
> -- 
> 2.34.1
>
Petr Vorel Jan. 31, 2022, 10:46 p.m. UTC | #6
Hi Bjorn,

> On Thu 13 Jan 17:33 CST 2022, Petr Vorel wrote:

> > Although downstream supports HS400, there are overclocking warnings when
> > using mmc-hs400-1_8v:

> > mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> > mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> > mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> > mmc0: Card appears overclocked; req 400000000 Hz, actual 768000000 Hz
> > mmc0: Card appears overclocked; req 400000000 Hz, actual 768000000 Hz
> > mmc0: new HS400 MMC card at address 0001

> > Using HS200 (i.e. mmc-hs200-1_8v or mmc-ddr-1_8v) would reduce them:

> > mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> > mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
> > mmc0: new HS200 MMC card at address 0001

> > But as the problem is probably elsewhere (bullhead behaves the same),
> > keep mmc-hs400-1_8v.

> > Angler does not have SD card, thus explicitly disable sdhc2.

> > Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> > ---
> >  .../dts/qcom/msm8994-huawei-angler-rev-101.dts   | 16 ++++++++++++++++
> >  1 file changed, 16 insertions(+)

> > diff --git a/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts b/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
> > index 0e3dd48f0dbf..5ce3dc169bb4 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
> > +++ b/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
> > @@ -7,6 +7,7 @@
> >  /dts-v1/;

> >  #include "msm8994.dtsi"
> > +#include <dt-bindings/gpio/gpio.h>

> >  /* Angler's firmware does not report where the memory is allocated */
> >  /delete-node/ &cont_splash_mem;
> > @@ -41,3 +42,18 @@ serial@f991e000 {
> >  &tlmm {
> >  	gpio-reserved-ranges = <85 4>;
> >  };
> > +
> > +/*
> > + * Although downstream supports also HS400 there are fewer overclocking
> > + * warnings when used DDR, also LK bootloader reports DDR mode.
> > + */
> > +&sdhc1 {
> > +	status = "okay";
> > +
> > +	mmc-hs400-1_8v;
> > +};
> > +
> > +/* Angler does not have SD card */
> > +&sdhc2 {

> But isn't &sdhc2 already disabled from msm8992.dtsi and msm8994.dtsi?

Yes it's disabled, thus this is not needed.
I'll send v2 of this, where I remove this.

Kind regards,
Petr

> Regards,
> Bjorn
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts b/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
index 0e3dd48f0dbf..5ce3dc169bb4 100644
--- a/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
+++ b/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
@@ -7,6 +7,7 @@ 
 /dts-v1/;
 
 #include "msm8994.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 /* Angler's firmware does not report where the memory is allocated */
 /delete-node/ &cont_splash_mem;
@@ -41,3 +42,18 @@  serial@f991e000 {
 &tlmm {
 	gpio-reserved-ranges = <85 4>;
 };
+
+/*
+ * Although downstream supports also HS400 there are fewer overclocking
+ * warnings when used DDR, also LK bootloader reports DDR mode.
+ */
+&sdhc1 {
+	status = "okay";
+
+	mmc-hs400-1_8v;
+};
+
+/* Angler does not have SD card */
+&sdhc2 {
+	status = "disabled";
+};