Skip to contentSkip to conversation

RB1 fixes

PATCH Applied Sumit Garg 3 participants 9 messages Apr 10, 2025 – Apr 11, 2025

Subsystems (2)
lore
Share & tools
lore

Sumit Garg

author
#0 lore raw

v2 cover RB1 fixes

The eMMC on RB1 boards supports HS200 mode but currently the msm_shdci driver in U-Boot is missing DLL configuration required for HS200 mode to work. Hence disable HS200 for now until proper support is in place.

Apart from that, add a fix for USB PHY power on sequence which got broken by recent addition for SM660 platform support.

Changes in v2:
- Drop DT override patch as Caleb fixed SD card and enable USB DT fixup via OF_LIVE here [1].
- Expand commit message for eMMC fix.
- Add a patch to fix USB PHY power on sequence.

[1] https://lore.kernel.org/u-boot/[email protected]/

Sumit Garg (2):
qcom_defconfig: Disable MMC HS200 mode support
phy: phy-qcom-qusb2: Fix USB PHY power on sequence

 configs/qcom_defconfig            | 1 -
 drivers/phy/qcom/phy-qcom-qusb2.c | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH v2 1/2 qcom_defconfig: Disable MMC HS200 mode support

From: Sumit Garg <[email protected]>

Currently the msm_sdhci doesn't yet support DLL configurations which are required to enable bus speeds greater that 100MHz. So disable HS200 mode support as of now as it requires bus speeds of 200MHz.

This should fix eMMC issues reported on RB1/RB2 although it should fix issues for all Qcom platforms but it's not seen there as mostly SD cards available don't support HS200 mode. The SD cards usually works in high speed mode whose performance remains unaffected by this change. It only affects RB1/RB2 as eMMC flash on these support HS200 mode but the U-Boot driver currently is incapable of supporting that.

---
 configs/qcom_defconfig | 1 -
 1 file changed, 1 deletion(-)
configs/qcom_defconfig +0 -1
index a2b54b95f19..537806450dc 100644
@@ -81,7 +81,6 @@ CONFIG_QCOM_HYP_SMMU=y
 CONFIG_MISC=y
 CONFIG_NVMEM=y
 CONFIG_I2C_EEPROM=y
-CONFIG_MMC_HS200_SUPPORT=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ADMA=y
 CONFIG_MMC_SDHCI_MSM=y
Signature · 1 line
2.43.0
reviewer Reviewed-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] qcom_defconfig: Disable MMC HS200 mode support

Quoted 24 lines · Sumit Garg

From: Sumit Garg <[email protected]>

Currently the msm_sdhci doesn't yet support DLL configurations which are required to enable bus speeds greater that 100MHz. So disable HS200 mode support as of now as it requires bus speeds of 200MHz.

This should fix eMMC issues reported on RB1/RB2 although it should fix issues for all Qcom platforms but it's not seen there as mostly SD cards available don't support HS200 mode. The SD cards usually works in high speed mode whose performance remains unaffected by this change. It only affects RB1/RB2 as eMMC flash on these support HS200 mode but the U-Boot driver currently is incapable of supporting that.

---
  configs/qcom_defconfig | 1 -
  1 file changed, 1 deletion(-)
configs/qcom_defconfig +0 -0
index a2b54b95f19..537806450dc 100644

configs/qcom_defconfig CONFIG_QCOM_HYP_SMMU=y · line 86

Quoted 7 lines
configs/qcom_defconfig +0 -1
@@ -81,7 +81,6 @@ CONFIG_QCOM_HYP_SMMU=y
  CONFIG_MISC=y
  CONFIG_NVMEM=y
  CONFIG_I2C_EEPROM=y
-CONFIG_MMC_HS200_SUPPORT=y
  CONFIG_MMC_SDHCI=y
  CONFIG_MMC_SDHCI_ADMA=y
  CONFIG_MMC_SDHCI_MSM=y
author
#3 lore raw

PATCH v2 2/2 phy: phy-qcom-qusb2: Fix USB PHY power on sequence

In reply to Sumit Garg

From: Sumit Garg <[email protected]>

Recent addition of support for SDM660 inadvertently broke USB PHY power on sequence on RB1/RB2 and others with following error:

starting USB...
Bus usb@4e00000: QUSB2PHY pll lock failed: status reg = 0 qcom-qusb2-phy phy@1613000: PHY: Failed to power on phy@1613000: -16. Can't power on PHY0
probe failed, error -16
No USB controllers found

The root cause was the addition of flag se_clk_scheme_default which was configured correctly for SDM660 but incorrect for all other supported SoC. Fix that by properly assignment as per upstream Linux driver.

Fixes 475497dc3c15 ("phy: Add SDM660 support to Qualcomm QUSB2 phy")
---
 drivers/phy/qcom/phy-qcom-qusb2.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/phy/qcom/phy-qcom-qusb2.c +2 -0
index cabd05bf5a6..d98f6108e69 100644
@@ -230,6 +230,7 @@ static const struct qusb2_phy_cfg sm6115_phy_cfg = {
 	.regs = sm6115_regs_layout,
 
 	.has_pll_test = true,
+	.se_clk_scheme_default = true,
 	.disable_ctrl = (CLAMP_N_EN | FREEZIO_N | POWER_DOWN),
 	.mask_core_ready = PLL_LOCKED,
 	.autoresume_en = BIT(3),
@@ -256,6 +257,7 @@ static const struct qusb2_phy_cfg qusb2_v2_phy_cfg = {
 			 POWER_DOWN),
 	.mask_core_ready = CORE_READY_STATUS,
 	.has_pll_override = true,
+	.se_clk_scheme_default = true,
 	.autoresume_en = BIT(0),
 	.update_tune1_with_efuse = true,
 };
Signature · 1 line
2.43.0
reviewer Reviewed-by on v2 2/2
#4 lore raw

Re: [PATCH v2 2/2] phy: phy-qcom-qusb2: Fix USB PHY power on sequence

Quoted 35 lines · Sumit Garg

From: Sumit Garg <[email protected]>

Recent addition of support for SDM660 inadvertently broke USB PHY power on sequence on RB1/RB2 and others with following error:

starting USB...
Bus usb@4e00000: QUSB2PHY pll lock failed: status reg = 0 qcom-qusb2-phy phy@1613000: PHY: Failed to power on phy@1613000: -16. Can't power on PHY0
probe failed, error -16
No USB controllers found

The root cause was the addition of flag se_clk_scheme_default which was configured correctly for SDM660 but incorrect for all other supported SoC. Fix that by properly assignment as per upstream Linux driver.

Fixes 475497dc3c15 ("phy: Add SDM660 support to Qualcomm QUSB2 phy")
---
  drivers/phy/qcom/phy-qcom-qusb2.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/phy/qcom/phy-qcom-qusb2.c +1 -0
index cabd05bf5a6..d98f6108e69 100644
@@ -230,6 +230,7 @@ static const struct qusb2_phy_cfg sm6115_phy_cfg = {
  	.regs = sm6115_regs_layout,
 
  	.has_pll_test = true,
+	.se_clk_scheme_default = true,
  	.disable_ctrl = (CLAMP_N_EN | FREEZIO_N | POWER_DOWN),
  	.mask_core_ready = PLL_LOCKED,
  	.autoresume_en = BIT(3),

drivers/phy/qcom/phy-qcom-qusb2.c static const struct qusb2_phy_cfg qusb2_v2_phy_cfg = { · line 263

Quoted 7 lines
drivers/phy/qcom/phy-qcom-qusb2.c +1 -0
@@ -256,6 +257,7 @@ static const struct qusb2_phy_cfg qusb2_v2_phy_cfg = {
  			 POWER_DOWN),
  	.mask_core_ready = CORE_READY_STATUS,
  	.has_pll_override = true,
+	.se_clk_scheme_default = true,
  	.autoresume_en = BIT(0),
  	.update_tune1_with_efuse = true,
  };
reviewer Reviewed-by on v2 2/2
#5 lore raw

Re: [PATCH v2 2/2] phy: phy-qcom-qusb2: Fix USB PHY power on sequence

In reply to Sumit Garg
Quoted 35 lines · Sumit Garg

From: Sumit Garg <[email protected]>

Recent addition of support for SDM660 inadvertently broke USB PHY power on sequence on RB1/RB2 and others with following error:

starting USB...
Bus usb@4e00000: QUSB2PHY pll lock failed: status reg = 0 qcom-qusb2-phy phy@1613000: PHY: Failed to power on phy@1613000: -16. Can't power on PHY0
probe failed, error -16
No USB controllers found

The root cause was the addition of flag se_clk_scheme_default which was configured correctly for SDM660 but incorrect for all other supported SoC. Fix that by properly assignment as per upstream Linux driver.

Fixes 475497dc3c15 ("phy: Add SDM660 support to Qualcomm QUSB2 phy")
---
  drivers/phy/qcom/phy-qcom-qusb2.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/phy/qcom/phy-qcom-qusb2.c +1 -0
index cabd05bf5a6..d98f6108e69 100644
@@ -230,6 +230,7 @@ static const struct qusb2_phy_cfg sm6115_phy_cfg = {
  	.regs = sm6115_regs_layout,
 
  	.has_pll_test = true,
+	.se_clk_scheme_default = true,
  	.disable_ctrl = (CLAMP_N_EN | FREEZIO_N | POWER_DOWN),
  	.mask_core_ready = PLL_LOCKED,
  	.autoresume_en = BIT(3),

drivers/phy/qcom/phy-qcom-qusb2.c static const struct qusb2_phy_cfg qusb2_v2_phy_cfg = { · line 263

Quoted 7 lines
drivers/phy/qcom/phy-qcom-qusb2.c +1 -0
@@ -256,6 +257,7 @@ static const struct qusb2_phy_cfg qusb2_v2_phy_cfg = {
  			 POWER_DOWN),
  	.mask_core_ready = CORE_READY_STATUS,
  	.has_pll_override = true,
+	.se_clk_scheme_default = true,
  	.autoresume_en = BIT(0),
  	.update_tune1_with_efuse = true,
  };
Reviewed-by on v2 2/2
#6 lore raw

Re: [PATCH v2 2/2] phy: phy-qcom-qusb2: Fix USB PHY power on sequence

In reply to Sumit Garg
Quoted 12 lines · Sumit Garg

From: Sumit Garg <[email protected]>

Recent addition of support for SDM660 inadvertently broke USB PHY power on sequence on RB1/RB2 and others with following error:

starting USB...
Bus usb@4e00000: QUSB2PHY pll lock failed: status reg = 0 qcom-qusb2-phy phy@1613000: PHY: Failed to power on phy@1613000: -16. Can't power on PHY0
probe failed, error -16
No USB controllers found

Quoted 6 lines

The root cause was the addition of flag se_clk_scheme_default which was configured correctly for SDM660 but incorrect for all other supported SoC. Fix that by properly assignment as per upstream Linux driver.

Fixes 475497dc3c15 ("phy: Add SDM660 support to Qualcomm QUSB2 phy")

Nice find! Thanks.

Quoted 23 lines
  drivers/phy/qcom/phy-qcom-qusb2.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/phy/qcom/phy-qcom-qusb2.c +2 -0
index cabd05bf5a6..d98f6108e69 100644
@@ -230,6 +230,7 @@ static const struct qusb2_phy_cfg sm6115_phy_cfg = {
  	.regs = sm6115_regs_layout,
 
  	.has_pll_test = true,
+	.se_clk_scheme_default = true,
  	.disable_ctrl = (CLAMP_N_EN | FREEZIO_N | POWER_DOWN),
  	.mask_core_ready = PLL_LOCKED,
  	.autoresume_en = BIT(3),
@@ -256,6 +257,7 @@ static const struct qusb2_phy_cfg qusb2_v2_phy_cfg = {
  			 POWER_DOWN),
  	.mask_core_ready = CORE_READY_STATUS,
  	.has_pll_override = true,
+	.se_clk_scheme_default = true,
  	.autoresume_en = BIT(0),
  	.update_tune1_with_efuse = true,
  };
Signature · 1 line
Caleb (they/them)
#7 lore raw
In reply to Sumit Garg
Quoted 8 lines · Sumit Garg

The eMMC on RB1 boards supports HS200 mode but currently the msm_shdci driver in U-Boot is missing DLL configuration required for HS200 mode to work. Hence disable HS200 for now until proper support is in place.

Apart from that, add a fix for USB PHY power on sequence which got broken by recent addition for SM660 platform support.

[...]

Applied, thanks!

[1/2] qcom_defconfig: Disable MMC HS200 mode support

      https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/01445f10cd58
[2/2] phy: phy-qcom-qusb2: Fix USB PHY power on sequence
      https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/cd5799caf491

Best regards,

Signature · 1 line
Caleb Connolly <[email protected]>
#8 lore raw
In reply to Sumit Garg
Quoted 8 lines · Sumit Garg

The eMMC on RB1 boards supports HS200 mode but currently the msm_shdci driver in U-Boot is missing DLL configuration required for HS200 mode to work. Hence disable HS200 for now until proper support is in place.

Apart from that, add a fix for USB PHY power on sequence which got broken by recent addition for SM660 platform support.

[...]

Applied, thanks!

[1/2] qcom_defconfig: Disable MMC HS200 mode support

      https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/49cf3b29134c

[2/2] phy: phy-qcom-qusb2: Fix USB PHY power on sequence
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/45acd9d2d4ec

Best regards,

Signature · 1 line
Caleb Connolly <[email protected]>