* [PATCH 0/4] Qualcomm: fix sdm845 clocks and enable fastboot
@ 2025-03-24 18:17 Caleb Connolly
2025-03-24 18:17 ` [PATCH 1/4] clk/stub: add sdm845 rpmh clock Caleb Connolly
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Caleb Connolly @ 2025-03-24 18:17 UTC (permalink / raw)
To: Lukasz Majewski, Sean Anderson, Tom Rini, Caleb Connolly,
Neil Armstrong, Sumit Garg, Rayagonda Kokatanur, Ramon Fried
Cc: u-boot, u-boot-qcom
Fix clock init failures for USB and UFS on SDM845 devices, stub the RPMh
clock controller, enable DM_USB_GADGET and fastboot support for all
Qualcomm platforms supported by qcom_defconfig.
Fastboot isn't super useful yet, but can be used for flashing MMC
(either internal or sdcard).
Depends on https://lore.kernel.org/u-boot/20250319-sdm845-usb-clocks-v1-1-ddea854f62ec@samcday.com
Depends on https://lore.kernel.org/u-boot/20250227094911.497219-2-rui.silva@linaro.org/
---
Caleb Connolly (4):
clk/stub: add sdm845 rpmh clock
clk/qcom: sdm845: add GCC_AGGRE_UFS_PHY_AXI_CLK
mach-snapdragon: enable DM_USB_GADGET by default
qcom_defconfig: enable fastboot
arch/arm/Kconfig | 1 +
configs/dragonboard410c_defconfig | 1 +
configs/qcom_defconfig | 5 +++++
drivers/clk/clk-stub.c | 1 +
drivers/clk/qcom/clock-sdm845.c | 1 +
5 files changed, 9 insertions(+)
---
base-commit: dcb6a5e7651f4a6cebfad4389119407e2a852783
Caleb Connolly <caleb.connolly@linaro.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] clk/stub: add sdm845 rpmh clock
2025-03-24 18:17 [PATCH 0/4] Qualcomm: fix sdm845 clocks and enable fastboot Caleb Connolly
@ 2025-03-24 18:17 ` Caleb Connolly
2025-03-25 7:27 ` Neil Armstrong
2025-03-24 18:17 ` [PATCH 2/4] clk/qcom: sdm845: add GCC_AGGRE_UFS_PHY_AXI_CLK Caleb Connolly
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Caleb Connolly @ 2025-03-24 18:17 UTC (permalink / raw)
To: Lukasz Majewski, Sean Anderson, Tom Rini, Caleb Connolly,
Neil Armstrong, Sumit Garg, Rayagonda Kokatanur, Ramon Fried
Cc: u-boot, u-boot-qcom
Necessary for UFS to successfully probe all clocks.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
drivers/clk/clk-stub.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/clk-stub.c b/drivers/clk/clk-stub.c
index 343fa5cd3fe1704c6bb15a8c9852b9b4e4990351..521ecfc5917b45f8ffaf2f25aabcc5abb4863cea 100644
--- a/drivers/clk/clk-stub.c
+++ b/drivers/clk/clk-stub.c
@@ -49,8 +49,9 @@ static struct clk_ops stub_clk_ops = {
};
static const struct udevice_id stub_clk_ids[] = {
{ .compatible = "qcom,rpmcc" },
+ { .compatible = "qcom,sdm845-rpmh-clk" },
{ .compatible = "qcom,sc7280-rpmh-clk" },
{ .compatible = "qcom,sm8150-rpmh-clk" },
{ .compatible = "qcom,sm8250-rpmh-clk" },
{ .compatible = "qcom,sm8550-rpmh-clk" },
--
2.49.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] clk/qcom: sdm845: add GCC_AGGRE_UFS_PHY_AXI_CLK
2025-03-24 18:17 [PATCH 0/4] Qualcomm: fix sdm845 clocks and enable fastboot Caleb Connolly
2025-03-24 18:17 ` [PATCH 1/4] clk/stub: add sdm845 rpmh clock Caleb Connolly
@ 2025-03-24 18:17 ` Caleb Connolly
2025-03-25 7:27 ` Neil Armstrong
2025-03-24 18:17 ` [PATCH 3/4] mach-snapdragon: enable DM_USB_GADGET by default Caleb Connolly
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Caleb Connolly @ 2025-03-24 18:17 UTC (permalink / raw)
To: Lukasz Majewski, Sean Anderson, Tom Rini, Caleb Connolly,
Neil Armstrong, Sumit Garg, Rayagonda Kokatanur, Ramon Fried
Cc: u-boot, u-boot-qcom
Missing for UFS.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
drivers/clk/qcom/clock-sdm845.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/qcom/clock-sdm845.c b/drivers/clk/qcom/clock-sdm845.c
index 7fd875e55d5443f170801172a373e0405041e1d1..5c8702ef2fe00a46a30dbdfddd6e649d20465006 100644
--- a/drivers/clk/qcom/clock-sdm845.c
+++ b/drivers/clk/qcom/clock-sdm845.c
@@ -113,8 +113,9 @@ static const struct gate_clk sdm845_clks[] = {
GATE_CLK(GCC_UFS_CARD_RX_SYMBOL_1_CLK, 0x750a8, 0x00000001),
GATE_CLK(GCC_UFS_CARD_TX_SYMBOL_0_CLK, 0x75014, 0x00000001),
GATE_CLK(GCC_UFS_CARD_UNIPRO_CORE_CLK, 0x75054, 0x00000001),
GATE_CLK(GCC_UFS_MEM_CLKREF_CLK, 0x8c000, 0x00000001),
+ GATE_CLK(GCC_AGGRE_UFS_PHY_AXI_CLK, 0x82024, 0x00000001),
GATE_CLK(GCC_UFS_PHY_AHB_CLK, 0x77010, 0x00000001),
GATE_CLK(GCC_UFS_PHY_AXI_CLK, 0x7700c, 0x00000001),
GATE_CLK(GCC_UFS_PHY_ICE_CORE_CLK, 0x77058, 0x00000001),
GATE_CLK(GCC_UFS_PHY_PHY_AUX_CLK, 0x7708c, 0x00000001),
--
2.49.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] mach-snapdragon: enable DM_USB_GADGET by default
2025-03-24 18:17 [PATCH 0/4] Qualcomm: fix sdm845 clocks and enable fastboot Caleb Connolly
2025-03-24 18:17 ` [PATCH 1/4] clk/stub: add sdm845 rpmh clock Caleb Connolly
2025-03-24 18:17 ` [PATCH 2/4] clk/qcom: sdm845: add GCC_AGGRE_UFS_PHY_AXI_CLK Caleb Connolly
@ 2025-03-24 18:17 ` Caleb Connolly
2025-03-24 18:17 ` [PATCH 4/4] qcom_defconfig: enable fastboot Caleb Connolly
2025-03-31 13:34 ` [PATCH 0/4] Qualcomm: fix sdm845 clocks and " Caleb Connolly
4 siblings, 0 replies; 9+ messages in thread
From: Caleb Connolly @ 2025-03-24 18:17 UTC (permalink / raw)
To: Lukasz Majewski, Sean Anderson, Tom Rini, Caleb Connolly,
Neil Armstrong, Sumit Garg, Rayagonda Kokatanur, Ramon Fried
Cc: u-boot, u-boot-qcom
This is required for gadget modes to work on most platforms. It must be
disabled for dragonboard410c since that doesn't use dwc3. USB on other
MSM8916 platforms isn't supported by qcom_defconfig anyway.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
arch/arm/Kconfig | 1 +
configs/dragonboard410c_defconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 32b80da9869a1647b7b295d3070964fa11f4fc65..63aefeda9575fec8fc57194358df0819397d088e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1120,8 +1120,9 @@ config ARCH_SNAPDRAGON
select SYSRESET
select SYSRESET_PSCI
imply OF_UPSTREAM
imply CMD_DM
+ imply DM_USB_GADGET
config ARCH_SOCFPGA
bool "Altera SOCFPGA family"
select ARCH_EARLY_INIT_R
diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig
index 967817f4f58e901fc827b4ed991ddd61d1167efa..5870aae83b4fc8d6897eb0f18cc4eb153d299c11 100644
--- a/configs/dragonboard410c_defconfig
+++ b/configs/dragonboard410c_defconfig
@@ -59,8 +59,9 @@ CONFIG_DM_PMIC=y
CONFIG_PMIC_QCOM=y
CONFIG_MSM_SERIAL=y
CONFIG_SPMI_MSM=y
CONFIG_USB=y
+# CONFIG_DM_USB_GADGET is not set
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_MSM=y
CONFIG_USB_ULPI_VIEWPORT=y
CONFIG_USB_ULPI=y
--
2.49.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] qcom_defconfig: enable fastboot
2025-03-24 18:17 [PATCH 0/4] Qualcomm: fix sdm845 clocks and enable fastboot Caleb Connolly
` (2 preceding siblings ...)
2025-03-24 18:17 ` [PATCH 3/4] mach-snapdragon: enable DM_USB_GADGET by default Caleb Connolly
@ 2025-03-24 18:17 ` Caleb Connolly
2025-03-25 7:28 ` Neil Armstrong
2025-03-31 13:34 ` [PATCH 0/4] Qualcomm: fix sdm845 clocks and " Caleb Connolly
4 siblings, 1 reply; 9+ messages in thread
From: Caleb Connolly @ 2025-03-24 18:17 UTC (permalink / raw)
To: Lukasz Majewski, Sean Anderson, Tom Rini, Caleb Connolly,
Neil Armstrong, Sumit Garg, Rayagonda Kokatanur, Ramon Fried
Cc: u-boot, u-boot-qcom
Enable fastboot support over USB, using MMC as the backend. This will be
the internal eMMC on devices that have it, or the sdcard slot on devices
with UFS (if available).
We don't use a fixed address for the fastboot buffer because it's
allocated at runtime per-board. Entering fastboot mode should be done by
executing "run fastboot" or manually running:
fastboot -l $fastboot_addr_r usb 0
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
configs/qcom_defconfig | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configs/qcom_defconfig b/configs/qcom_defconfig
index ba4d38d100e053e3708ee2623bf3530787b6b94f..f5c005d9c4093e4902b05213ab2f54c8ca70208a 100644
--- a/configs/qcom_defconfig
+++ b/configs/qcom_defconfig
@@ -61,8 +61,13 @@ CONFIG_CLK_QCOM_SC7280=y
CONFIG_CLK_QCOM_X1E80100=y
CONFIG_DFU_MMC=y
CONFIG_DFU_SCSI=y
CONFIG_SYS_DFU_DATA_BUF_SIZE=0x200000
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x0
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
CONFIG_MSM_GPIO=y
CONFIG_QCOM_PMIC_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_QUP=y
--
2.49.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/4] clk/qcom: sdm845: add GCC_AGGRE_UFS_PHY_AXI_CLK
2025-03-24 18:17 ` [PATCH 2/4] clk/qcom: sdm845: add GCC_AGGRE_UFS_PHY_AXI_CLK Caleb Connolly
@ 2025-03-25 7:27 ` Neil Armstrong
0 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2025-03-25 7:27 UTC (permalink / raw)
To: Caleb Connolly, Lukasz Majewski, Sean Anderson, Tom Rini,
Sumit Garg, Rayagonda Kokatanur, Ramon Fried
Cc: u-boot, u-boot-qcom
On 24/03/2025 19:17, Caleb Connolly wrote:
> Missing for UFS.
>
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
> drivers/clk/qcom/clock-sdm845.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/qcom/clock-sdm845.c b/drivers/clk/qcom/clock-sdm845.c
> index 7fd875e55d5443f170801172a373e0405041e1d1..5c8702ef2fe00a46a30dbdfddd6e649d20465006 100644
> --- a/drivers/clk/qcom/clock-sdm845.c
> +++ b/drivers/clk/qcom/clock-sdm845.c
> @@ -113,8 +113,9 @@ static const struct gate_clk sdm845_clks[] = {
> GATE_CLK(GCC_UFS_CARD_RX_SYMBOL_1_CLK, 0x750a8, 0x00000001),
> GATE_CLK(GCC_UFS_CARD_TX_SYMBOL_0_CLK, 0x75014, 0x00000001),
> GATE_CLK(GCC_UFS_CARD_UNIPRO_CORE_CLK, 0x75054, 0x00000001),
> GATE_CLK(GCC_UFS_MEM_CLKREF_CLK, 0x8c000, 0x00000001),
> + GATE_CLK(GCC_AGGRE_UFS_PHY_AXI_CLK, 0x82024, 0x00000001),
> GATE_CLK(GCC_UFS_PHY_AHB_CLK, 0x77010, 0x00000001),
> GATE_CLK(GCC_UFS_PHY_AXI_CLK, 0x7700c, 0x00000001),
> GATE_CLK(GCC_UFS_PHY_ICE_CORE_CLK, 0x77058, 0x00000001),
> GATE_CLK(GCC_UFS_PHY_PHY_AUX_CLK, 0x7708c, 0x00000001),
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] clk/stub: add sdm845 rpmh clock
2025-03-24 18:17 ` [PATCH 1/4] clk/stub: add sdm845 rpmh clock Caleb Connolly
@ 2025-03-25 7:27 ` Neil Armstrong
0 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2025-03-25 7:27 UTC (permalink / raw)
To: Caleb Connolly, Lukasz Majewski, Sean Anderson, Tom Rini,
Sumit Garg, Rayagonda Kokatanur, Ramon Fried
Cc: u-boot, u-boot-qcom
On 24/03/2025 19:17, Caleb Connolly wrote:
> Necessary for UFS to successfully probe all clocks.
>
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
> drivers/clk/clk-stub.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/clk-stub.c b/drivers/clk/clk-stub.c
> index 343fa5cd3fe1704c6bb15a8c9852b9b4e4990351..521ecfc5917b45f8ffaf2f25aabcc5abb4863cea 100644
> --- a/drivers/clk/clk-stub.c
> +++ b/drivers/clk/clk-stub.c
> @@ -49,8 +49,9 @@ static struct clk_ops stub_clk_ops = {
> };
>
> static const struct udevice_id stub_clk_ids[] = {
> { .compatible = "qcom,rpmcc" },
> + { .compatible = "qcom,sdm845-rpmh-clk" },
> { .compatible = "qcom,sc7280-rpmh-clk" },
> { .compatible = "qcom,sm8150-rpmh-clk" },
> { .compatible = "qcom,sm8250-rpmh-clk" },
> { .compatible = "qcom,sm8550-rpmh-clk" },
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] qcom_defconfig: enable fastboot
2025-03-24 18:17 ` [PATCH 4/4] qcom_defconfig: enable fastboot Caleb Connolly
@ 2025-03-25 7:28 ` Neil Armstrong
0 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2025-03-25 7:28 UTC (permalink / raw)
To: Caleb Connolly, Lukasz Majewski, Sean Anderson, Tom Rini,
Sumit Garg, Rayagonda Kokatanur, Ramon Fried
Cc: u-boot, u-boot-qcom
On 24/03/2025 19:17, Caleb Connolly wrote:
> Enable fastboot support over USB, using MMC as the backend. This will be
> the internal eMMC on devices that have it, or the sdcard slot on devices
> with UFS (if available).
>
> We don't use a fixed address for the fastboot buffer because it's
> allocated at runtime per-board. Entering fastboot mode should be done by
> executing "run fastboot" or manually running:
>
> fastboot -l $fastboot_addr_r usb 0
>
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
> configs/qcom_defconfig | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/configs/qcom_defconfig b/configs/qcom_defconfig
> index ba4d38d100e053e3708ee2623bf3530787b6b94f..f5c005d9c4093e4902b05213ab2f54c8ca70208a 100644
> --- a/configs/qcom_defconfig
> +++ b/configs/qcom_defconfig
> @@ -61,8 +61,13 @@ CONFIG_CLK_QCOM_SC7280=y
> CONFIG_CLK_QCOM_X1E80100=y
> CONFIG_DFU_MMC=y
> CONFIG_DFU_SCSI=y
> CONFIG_SYS_DFU_DATA_BUF_SIZE=0x200000
> +CONFIG_USB_FUNCTION_FASTBOOT=y
> +CONFIG_FASTBOOT_BUF_ADDR=0x0
> +CONFIG_FASTBOOT_FLASH=y
> +CONFIG_FASTBOOT_FLASH_MMC_DEV=0
> +CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
> CONFIG_MSM_GPIO=y
> CONFIG_QCOM_PMIC_GPIO=y
> CONFIG_DM_I2C=y
> CONFIG_SYS_I2C_QUP=y
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] Qualcomm: fix sdm845 clocks and enable fastboot
2025-03-24 18:17 [PATCH 0/4] Qualcomm: fix sdm845 clocks and enable fastboot Caleb Connolly
` (3 preceding siblings ...)
2025-03-24 18:17 ` [PATCH 4/4] qcom_defconfig: enable fastboot Caleb Connolly
@ 2025-03-31 13:34 ` Caleb Connolly
4 siblings, 0 replies; 9+ messages in thread
From: Caleb Connolly @ 2025-03-31 13:34 UTC (permalink / raw)
To: Lukasz Majewski, Sean Anderson, Tom Rini, Neil Armstrong,
Sumit Garg, Rayagonda Kokatanur, Ramon Fried, Caleb Connolly
Cc: u-boot, u-boot-qcom
On Mon, 24 Mar 2025 19:17:36 +0100, Caleb Connolly wrote:
> Fix clock init failures for USB and UFS on SDM845 devices, stub the RPMh
> clock controller, enable DM_USB_GADGET and fastboot support for all
> Qualcomm platforms supported by qcom_defconfig.
>
> Fastboot isn't super useful yet, but can be used for flashing MMC
> (either internal or sdcard).
>
> [...]
Applied, thanks!
[1/4] clk/stub: add sdm845 rpmh clock
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/f1db41b320b7
[2/4] clk/qcom: sdm845: add GCC_AGGRE_UFS_PHY_AXI_CLK
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/15cde58aaf5f
[3/4] mach-snapdragon: enable DM_USB_GADGET by default
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/7235dbedfce3
[4/4] qcom_defconfig: enable fastboot
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/af2bc4c21dd1
Best regards,
--
Caleb Connolly <caleb.connolly@linaro.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-03-31 13:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-24 18:17 [PATCH 0/4] Qualcomm: fix sdm845 clocks and enable fastboot Caleb Connolly
2025-03-24 18:17 ` [PATCH 1/4] clk/stub: add sdm845 rpmh clock Caleb Connolly
2025-03-25 7:27 ` Neil Armstrong
2025-03-24 18:17 ` [PATCH 2/4] clk/qcom: sdm845: add GCC_AGGRE_UFS_PHY_AXI_CLK Caleb Connolly
2025-03-25 7:27 ` Neil Armstrong
2025-03-24 18:17 ` [PATCH 3/4] mach-snapdragon: enable DM_USB_GADGET by default Caleb Connolly
2025-03-24 18:17 ` [PATCH 4/4] qcom_defconfig: enable fastboot Caleb Connolly
2025-03-25 7:28 ` Neil Armstrong
2025-03-31 13:34 ` [PATCH 0/4] Qualcomm: fix sdm845 clocks and " Caleb Connolly
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox