Skip to contentSkip to conversation

msm8994-huawei-angler and msm8992-lg-bullhead sdhc1 fixes

PATCH Applied Petr Vorel 4 participants 15 messages Jan 13, 2022 – Feb 1, 2022

Subsystems (4)
lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

cover msm8994-huawei-angler and msm8992-lg-bullhead sdhc1 fixes

Hi,

Besides fixing sdhc1 for msm8994-huawei-angler and msm8992-lg-bullhead I also rebased and reposted Jean's patches (Makefile didn't apply on current for-next) and also rename angler's DTS.

sdhc1 (i.e. mmc0) is working on both, but there are overclocking warnings. I suspected issue similar to using clk_rcg2_ops instead of clk_rcg2_floor_ops (i.e. 3f905469c8ce ("clk: qcom: gcc: Use floor ops for SDCC clocks") or 148ddaa89d4a ("clk: qcom: gcc-sc7180: Use floor ops for the correct sdcc1 clk"), but it looks to be correct for gcc-msm8994.c.

Kind regards,
Petr

* angler
angler downstream
qcom,bus-speed-mode = "HS400_1p8v", "HS200_1p8v", "DDR_1p8v";
[90] SDHC Running in DDR mode

[    8.837072] sdhci: Secure Digital Host Controller Interface driver
[    8.843203] sdhci: Copyright(c) Pierre Ossman
[    8.847536] sdhci-pltfm: SDHCI platform and OF driver helper
[    8.858043] mmc0: no vqmmc regulator found
[    8.861168] mmc0: no vmmc regulator found
[    8.865359] mmc0: SDHCI controller on f9824900.sdhci [f9824900.sdhci] using 32-bit ADMA
[    8.920815] mmc1: no vqmmc regulator found
[    8.923917] mmc1: no vmmc regulator found
[    8.928123] mmc1: SDHCI controller on f98a4900.sdhci [f98a4900.sdhci] using 32-bit ADMA
[    9.018117] mmc0: BKOPS_EN bit = 0
[    9.039550] mmc0: new HS400 MMC card at address 0001
[    9.043971] mmcblk0: mmc0:0001 064G70 58.2 GiB
[    9.048185] mmcblk0rpmb: mmc0:0001 064G70 partition 3 4.00 MiB
[    9.056974] GPT:partition_entry_array_crc32 values don't match: 0x4aa75f3b != 0xe3345ddf
[    9.064044] GPT: Use GNU Parted to correct GPT errors.
[    9.069247]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p31 p32 p33 p34 p35 p36 p37 p38 p39 p40 p41 p42 p43 p44

angler mainline (with this patchset)
using mmc-hs400-1_8v (this patchset)

[    1.825962] mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
[    1.826043] mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
[    1.839502] mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
[    1.840203] mmc0: Card appears overclocked; req 400000000 Hz, actual 768000000 Hz
Trying to mount subpartitions for 10 seconds...[    1.855276] mmc0: Card appears overclocked; req 400000000 Hz, actual 768000000 Hz
[    1.860454] mmc0: new HS400 MMC card at address 0001
[    1.878747] mmcblk0: mmc0:0001 064G70 58.2 GiB
[    1.883175] GPT:partition_entry_array_crc32 values don't match: 0x4aa75f3b != 0xe3345ddf
[    1.883234] GPT: Use GNU Parted to correct GPT errors.
[    1.894514]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p31 p32 p33 p34 p35 p36 p37 p38 p39 p40 p41 p42 p43 p44
[    1.905939] mmcblk0boot0: mmc0:0001 064G70 4.00 MiB
[    1.926200] mmcblk0boot1: mmc0:0001 064G70 4.00 MiB
[    1.928880] mmcblk0rpmb: mmc0:0001 064G70 4.00 MiB, chardev (234:0)

using mmc-ddr-1_8v (and mmc-hs200-1_8v)

[    1.825991] mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
[    1.826071] mmc0: Card appears overclocked; req 200000000 Hz, actual 384000000 Hz
[    1.837905] mmc0: new HS200 MMC card at address 0001
[    1.846269] mmcblk0: mmc0:0001 064G70 58.2 GiB
[    1.850916] GPT:partition_entry_array_crc32 values don't match: 0x4aa75f3b != 0xe3345ddf
[    1.850976] GPT: Use GNU Parted to correct GPT errors.
Trying to mount subpartitions for 10 seconds...[    1.863540]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p31 p32 p33 p34 p35 p36 p37 p38 p39 p40 p41 p42 p43 p44
[    1.879858] mmcblk0boot0: mmc0:0001 064G70 4.00 MiB
[    1.894920] mmcblk0boot1: mmc0:0001 064G70 4.00 MiB
[    1.899991] mmcblk0rpmb: mmc0:0001 064G70 4.00 MiB, chardev (234:0)

* bullhead 1.01
bullhead downstream
[70] SDHC Running in HS400 mode

[    7.069617] sdhci: Secure Digital Host Controller Interface driver
[    7.075741] sdhci: Copyright(c) Pierre Ossman
[    7.080081] sdhci-pltfm: SDHCI platform and OF driver helper
[    7.091419] mmc0: no vqmmc regulator found
[    7.094508] mmc0: no vmmc regulator found
[    7.098731] mmc0: SDHCI controller on f9824900.sdhci [f9824900.sdhci] using 32-bit ADMA
[    7.250588] mmc0: BKOPS_EN bit = 0
[    7.269765] mmc0: new HS400 MMC card at address 0001
[    7.274242] mmcblk0: mmc0:0001 032G74 29.1 GiB
[    7.278448] mmcblk0rpmb: mmc0:0001 032G74 partition 3 4.00 MiB
[    7.286719]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p31 p32 p33 p34 p35 p36 p37 p38 p39 p40 p41 p42 p43 p44 p45 p46

bullhead mainline (with this patchset)

[    1.961228] mmc0: Card appears overclocked; req 200000000 Hz, actual 343999999 Hz
[    1.961312] mmc0: Card appears overclocked; req 200000000 Hz, actual 343999999 Hz
[    1.968060] mmc0: Card appears overclocked; req 400000000 Hz, actual 687999999 Hz
Configuring kernel firmware image search path
/init: line 56: can't create /proc/sys/kernel/hotplug: nonexistent directory
[    1.988240] mmc0: Card appears overclocked; req 200000000 Hz, actual 343999999 Hz
[    1.998602] mmc0: Card appears overclocked; req 400000000 Hz, actual 687999999 Hz
[    2.001919] mmc0: Card appears overclocked; req 400000000 Hz, actual 687999999 Hz
[    2.018628] mmc0: new HS400 MMC card at address 0001

Jean THOMAS (2):
arm64: dts: qcom: msm8992-lg-bullhead: Place LG Bullhead generic code
into a DTSI file
arm64: dts: qcom: msm8992-lg-bullhead: Add support for LG Bullhead rev

    1.0

Petr Vorel (4):
arm64: dts: qcom: msm8994: Provide missing "xo_board" and "sleep_clk"
to GCC
arm64: dts: qcom: msm8994-huawei-angler: Add vendor name huawei
arm64: dts: qcom: msm8994-huawei-angler: Add sdhc{1,2} definitions
arm64: dts: qcom: msm8992-lg-bullhead: Disable sdhc2

 arch/arm64/boot/dts/qcom/Makefile                |  5 +++--
 .../boot/dts/qcom/msm8992-lg-bullhead-rev-10.dts | 14 ++++++++++++++
 .../dts/qcom/msm8992-lg-bullhead-rev-101.dts     | 14 ++++++++++++++
 ...head-rev-101.dts => msm8992-lg-bullhead.dtsi} |  7 +++++--
 ...101.dts => msm8994-huawei-angler-rev-101.dts} | 16 ++++++++++++++++
 arch/arm64/boot/dts/qcom/msm8994.dtsi            |  3 +++
 6 files changed, 55 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-bullhead-rev-10.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-bullhead-rev-101.dts
 rename arch/arm64/boot/dts/qcom/{msm8992-bullhead-rev-101.dts => msm8992-lg-bullhead.dtsi} (98%)
 rename arch/arm64/boot/dts/qcom/{msm8994-angler-rev-101.dts => msm8994-huawei-angler-rev-101.dts} (75%)
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 1/6 arm64: dts: qcom: msm8992-lg-bullhead: Place LG Bullhead generic code into a DTSI file

From: Jean THOMAS <[email protected]>

This patch puts the generic code common across all hardware revisions into a DTSI file.

It also prefixes the DTS filename with the vendor name, to follow the naming convention used by other DTS files.

[ pvorel: rebased on current qcom/for-next ]
---
 arch/arm64/boot/dts/qcom/Makefile                  |  2 +-
 .../boot/dts/qcom/msm8992-lg-bullhead-rev-101.dts  | 14 ++++++++++++++
 ...llhead-rev-101.dts => msm8992-lg-bullhead.dtsi} |  2 --
 3 files changed, 15 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-bullhead-rev-101.dts
 rename arch/arm64/boot/dts/qcom/{msm8992-bullhead-rev-101.dts => msm8992-lg-bullhead.dtsi} (98%)
arch/arm64/boot/dts/qcom/Makefile +1 -1
index f7232052d286..ee8e81f1c449 100644
@@ -18,7 +18,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-a5u-eur.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-j5.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-serranove.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt88047.dtb
-dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-bullhead-rev-101.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-101.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-msft-lumia-octagon-talkman.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-xiaomi-libra.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-angler-rev-101.dtb
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead-rev-101.dts new file +14 -0
new file mode 100644
index 000000000000..e6a5ebd30e2f
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/* Copyright (c) Jean Thomas <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "msm8992-lg-bullhead.dtsi"
+
+/ {
+	model = "LG Nexus 5X rev 1.01";
+
+	/* required for bootloader to select correct board */
+	qcom,board-id = <0xb64 0>;
+};
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi renamed from arch/arm64/boot/dts/qcom/msm8992-bullhead-rev-101.dts +0 -2
similarity index 98%
rename from arch/arm64/boot/dts/qcom/msm8992-bullhead-rev-101.dts
rename to arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
index 4da6c44bf532..3b0cc85d6674 100644
@@ -18,9 +18,7 @@ / {
 	compatible = "lg,bullhead", "qcom,msm8992";
 	chassis-type = "handset";
 
-	/* required for bootloader to select correct board */
 	qcom,msm-id = <251 0>, <252 0>;
-	qcom,board-id = <0xb64 0>;
 	qcom,pmic-id = <0x10009 0x1000A 0x0 0x0>;
 
 	/* Bullhead firmware doesn't support PSCI */
Signature · 1 line
2.34.1
author
#2 lore raw

PATCH 2/6 arm64: dts: qcom: msm8992-lg-bullhead: Add support for LG Bullhead rev 1.0

In reply to Petr Vorel

From: Jean THOMAS <[email protected]>

This commit implements a DTS file for LG Bullhead (Nexus 5X) rev 1.0 with its matching "qcom,board-id" property.

[ pvorel: rebased on current qcom/for-next ]
---
 arch/arm64/boot/dts/qcom/Makefile                  |  1 +
 .../boot/dts/qcom/msm8992-lg-bullhead-rev-10.dts   | 14 ++++++++++++++
 2 files changed, 15 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-bullhead-rev-10.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index ee8e81f1c449..0f983400d60c 100644
@@ -18,6 +18,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-a5u-eur.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-j5.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-serranove.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt88047.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-10.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-101.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-msft-lumia-octagon-talkman.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-xiaomi-libra.dtb
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead-rev-10.dts new file +14 -0
new file mode 100644
index 000000000000..7e6bce4af441
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/* Copyright (c) Jean Thomas <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "msm8992-lg-bullhead.dtsi"
+
+/ {
+	model = "LG Nexus 5X rev 1.0";
+
+	/* required for bootloader to select correct board */
+	qcom,board-id = <0xa64 0>;
+};
Signature · 1 line
2.34.1
author
#3 lore raw

PATCH 3/6 arm64: dts: qcom: msm8994: Provide missing "xo_board" and "sleep_clk" to GCC

In reply to Petr Vorel

This is needed due changes in commit 0519d1d0bf33 ("clk: qcom:
gcc-msm8994: Modernize the driver"), which removed struct clk_fixed_factor. Preparation for next commit for enabling SD/eMMC. Inspired by 2c2f64ae36d9.

This is required for both msm8994-huawei-angler (sdhc1 will be enabled in next commit) and msm8992-lg-bullhead (where actually fixes sdhc1
- tested on bullhead rev 1.01).

Fixes 0519d1d0bf33 ("clk: qcom: gcc-msm8994: Modernize the driver")
---
 arch/arm64/boot/dts/qcom/msm8994.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/qcom/msm8994.dtsi +3 -0
index 5a9a5ed0565f..215f56daa26c 100644
@@ -713,6 +713,9 @@ gcc: clock-controller@fc400000 {
 			#reset-cells = <1>;
 			#power-domain-cells = <1>;
 			reg = <0xfc400000 0x2000>;
+
+			clock-names = "xo", "sleep_clk";
+			clocks = <&xo_board>, <&sleep_clk>;
 		};
 
 		rpm_msg_ram: sram@fc428000 {
Signature · 1 line
2.34.1
author
#4 lore raw

PATCH 4/6 arm64: dts: qcom: msm8994-huawei-angler: Add vendor name huawei

In reply to Petr Vorel

to follow the naming convention used by other DTS files.

---
 arch/arm64/boot/dts/qcom/Makefile                               | 2 +-
 ...994-angler-rev-101.dts => msm8994-huawei-angler-rev-101.dts} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename arch/arm64/boot/dts/qcom/{msm8994-angler-rev-101.dts => msm8994-huawei-angler-rev-101.dts} (100%)
arch/arm64/boot/dts/qcom/Makefile +1 -1
index 0f983400d60c..523fe9f63368 100644
@@ -22,7 +22,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-10.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-101.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-msft-lumia-octagon-talkman.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-xiaomi-libra.dtb
-dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-angler-rev-101.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-huawei-angler-rev-101.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-msft-lumia-octagon-cityman.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-sony-xperia-kitakami-ivy.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-sony-xperia-kitakami-karin.dtb
arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts renamed from arch/arm64/boot/dts/qcom/msm8994-angler-rev-101.dts +0 -0
similarity index 100%
rename from arch/arm64/boot/dts/qcom/msm8994-angler-rev-101.dts
rename to arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
Signature · 1 line
2.34.1
author
#5 lore raw

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

In reply to Petr Vorel

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.

---
 .../dts/qcom/msm8994-huawei-angler-rev-101.dts   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts +16 -0
index 0e3dd48f0dbf..5ce3dc169bb4 100644
@@ -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";
+};
Signature · 1 line
2.34.1
author
#6 lore raw

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

Hi all,

Quoted 39 lines

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.

---
 .../dts/qcom/msm8994-huawei-angler-rev-101.dts   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts +1 -0
index 0e3dd48f0dbf..5ce3dc169bb4 100644
@@ -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;

arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts serial@f991e000 { · line 49

Quoted 8 lines
arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts +5 -0
@@ -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

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts +10 -0
+&sdhc1 {
+	status = "okay";
+
+	mmc-hs400-1_8v;
+};
+
+/* Angler does not have SD card */
+&sdhc2 {
+	status = "disabled";
+};
author
#8 lore raw

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

Hi Konrad, all,

Quoted 1 line

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

Quoted 4 lines

Konrad

[1] https://patchwork.kernel.org/project/linux-arm-msm/patch/[email protected]/

[2] https://lore.kernel.org/linux-arm-msm/[email protected]/T/#u

#9 lore raw

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

Quoted 7 lines

Hi Konrad, all,

Quoted 1 line

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

Quoted 9 lines

Kind regards,
Petr

Quoted 3 lines

Konrad

[1] https://patchwork.kernel.org/project/linux-arm-msm/patch/[email protected]/

[2] https://lore.kernel.org/linux-arm-msm/[email protected]/T/#u

#10 lore raw

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

In reply to Petr Vorel
Quoted 45 lines · Petr Vorel

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.

---
 .../dts/qcom/msm8994-huawei-angler-rev-101.dts   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts +4 -0
index 0e3dd48f0dbf..5ce3dc169bb4 100644
@@ -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

arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts serial@f991e000 { · line 57

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts +10 -0
+ * 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

Quoted 5 lines
arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts +2 -0
+	status = "disabled";
+};
Signature · 1 line
2.34.1
author
#11 lore raw

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

Hi Bjorn,

Quoted 51 lines · Petr Vorel
Quoted 50 lines

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.

---
 .../dts/qcom/msm8994-huawei-angler-rev-101.dts   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts +8 -0
index 0e3dd48f0dbf..5ce3dc169bb4 100644
@@ -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";
Quoted 8 lines

arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts serial@f991e000 { · line 57

Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts +6 -0
+
+	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

Quoted 2 lines

Regards,
Bjorn

author
#12 lore raw

PATCH 6/6 arm64: dts: qcom: msm8992-lg-bullhead: Disable sdhc2

In reply to Petr Vorel

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

---
 arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +5 -0
index 3b0cc85d6674..b6633be30f68 100644
@@ -300,3 +300,8 @@ &sdhc1 {
 
 	mmc-hs400-1_8v;
 };
+
+/* Bullhead does not have SD card */
+&sdhc2 {
+	status = "disabled";
+};
Signature · 1 line
2.34.1
#13 lore raw
In reply to Petr Vorel
This series was applied to qcom/linux.git (for-next) by Bjorn Andersson <[email protected]>:

Hello:

This series was applied to qcom/linux.git (for-next) by Bjorn Andersson <[email protected]>:

Quoted 6 lines · On Fri, 14 Jan 2022 00:33:52 +0100 you wrote:

Hi,

Besides fixing sdhc1 for msm8994-huawei-angler and msm8992-lg-bullhead I also rebased and reposted Jean's patches (Makefile didn't apply on current for-next) and also rename angler's DTS.

Quoted 7 lines

sdhc1 (i.e. mmc0) is working on both, but there are overclocking warnings. I suspected issue similar to using clk_rcg2_ops instead of clk_rcg2_floor_ops (i.e. 3f905469c8ce ("clk: qcom: gcc: Use floor ops for SDCC clocks") or 148ddaa89d4a ("clk: qcom: gcc-sc7180: Use floor ops for the correct sdcc1 clk"), but it looks to be correct for gcc-msm8994.c.

[...]

Here is the summary with links:
- [1/6] arm64: dts: qcom: msm8992-lg-bullhead: Place LG Bullhead generic code into a DTSI file

    https://git.kernel.org/qcom/c/3f99518c6f65
  - [2/6] arm64: dts: qcom: msm8992-lg-bullhead: Add support for LG Bullhead rev 1.0
    https://git.kernel.org/qcom/c/cd4bd4704ec8

- [3/6] arm64: dts: qcom: msm8994: Provide missing "xo_board" and "sleep_clk" to GCC (no matching commit)
- [4/6] arm64: dts: qcom: msm8994-huawei-angler: Add vendor name huawei (no matching commit)
- [5/6] arm64: dts: qcom: msm8994-huawei-angler: Add sdhc{1,2} definitions (no matching commit)
- [6/6] arm64: dts: qcom: msm8992-lg-bullhead: Disable sdhc2
(no matching commit)

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
#14 lore raw

Re: (subset) [PATCH 0/6] msm8994-huawei-angler and msm8992-lg-bullhead sdhc1 fixes

In reply to Petr Vorel
Quoted 11 lines · Petr Vorel

Besides fixing sdhc1 for msm8994-huawei-angler and msm8992-lg-bullhead I also rebased and reposted Jean's patches (Makefile didn't apply on current for-next) and also rename angler's DTS.

sdhc1 (i.e. mmc0) is working on both, but there are overclocking warnings. I suspected issue similar to using clk_rcg2_ops instead of clk_rcg2_floor_ops (i.e. 3f905469c8ce ("clk: qcom: gcc: Use floor ops for SDCC clocks") or 148ddaa89d4a ("clk: qcom: gcc-sc7180: Use floor ops for the correct sdcc1 clk"), but it looks to be correct for gcc-msm8994.c.

[...]

Applied, thanks!

[3/6] arm64: dts: qcom: msm8994: Provide missing "xo_board" and "sleep_clk" to GCC

      commit: 4dd1ad6192748523878463a285346db408b34a02
[4/6] arm64: dts: qcom: msm8994-huawei-angler: Add vendor name huawei
      commit: 8af90d6daa36a7180a2cd6aad874136aade27412

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>