mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] clk: qcom: ipq8074: set BRANCH_HALT_VOTED flag for usb master clocks
@ 2026-09-10 10:00 Chukun Pan
  2026-09-10 10:06 ` Taniya Das
  0 siblings, 1 reply; 3+ messages in thread
From: Chukun Pan @ 2026-09-10 10:00 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Jerome Brunet, Brian Masney, Stephen Boyd, linux-arm-msm,
	linux-kernel, linux-clk, Chukun Pan

Currently, on some boards with older versions of U-Boot, attempting
to disable usb master clocks results in a "stuck at on" warning:

[    3.005088] gcc_usb1_master_clk status stuck at 'on'
[    3.187119] gcc_usb0_master_clk status stuck at 'on'

The USB master clocks of IPQ5332 and IPQ5424 have the BRANCH_HALT_VOTED
flag set, so let's do the same to fix the issue.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
These boards run a vendor-specific version of U-Boot, and upgrading to
a newer version could brick the device. Therefore, I think this should
be fixed within the Linux kernel.
---
 drivers/clk/qcom/gcc-ipq8074.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/qcom/gcc-ipq8074.c b/drivers/clk/qcom/gcc-ipq8074.c
index 1329ea28d703..10bd2f80010c 100644
--- a/drivers/clk/qcom/gcc-ipq8074.c
+++ b/drivers/clk/qcom/gcc-ipq8074.c
@@ -2612,6 +2612,7 @@ static struct clk_branch gcc_sys_noc_usb0_axi_clk = {
 
 static struct clk_branch gcc_usb0_master_clk = {
 	.halt_reg = 0x3e000,
+	.halt_check = BRANCH_HALT_VOTED,
 	.clkr = {
 		.enable_reg = 0x3e000,
 		.enable_mask = BIT(0),
@@ -2725,6 +2726,7 @@ static struct clk_branch gcc_sys_noc_usb1_axi_clk = {
 
 static struct clk_branch gcc_usb1_master_clk = {
 	.halt_reg = 0x3f000,
+	.halt_check = BRANCH_HALT_VOTED,
 	.clkr = {
 		.enable_reg = 0x3f000,
 		.enable_mask = BIT(0),
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] clk: qcom: ipq8074: set BRANCH_HALT_VOTED flag for usb master clocks
  2026-09-10 10:00 [PATCH 1/1] clk: qcom: ipq8074: set BRANCH_HALT_VOTED flag for usb master clocks Chukun Pan
@ 2026-09-10 10:06 ` Taniya Das
  2026-09-11  6:40   ` Chukun Pan
  0 siblings, 1 reply; 3+ messages in thread
From: Taniya Das @ 2026-09-10 10:06 UTC (permalink / raw)
  To: Chukun Pan, Bjorn Andersson
  Cc: Jerome Brunet, Brian Masney, Stephen Boyd, linux-arm-msm,
	linux-kernel, linux-clk



On 9/10/2026 3:30 PM, Chukun Pan wrote:
> Currently, on some boards with older versions of U-Boot, attempting
> to disable usb master clocks results in a "stuck at on" warning:
> 
> [    3.005088] gcc_usb1_master_clk status stuck at 'on'
> [    3.187119] gcc_usb0_master_clk status stuck at 'on'
> 
> The USB master clocks of IPQ5332 and IPQ5424 have the BRANCH_HALT_VOTED
> flag set, so let's do the same to fix the issue.
> 

Fixes tag?

> Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
> ---
> These boards run a vendor-specific version of U-Boot, and upgrading to
> a newer version could brick the device. Therefore, I think this should
> be fixed within the Linux kernel.
> ---
>  drivers/clk/qcom/gcc-ipq8074.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/clk/qcom/gcc-ipq8074.c b/drivers/clk/qcom/gcc-ipq8074.c
> index 1329ea28d703..10bd2f80010c 100644
> --- a/drivers/clk/qcom/gcc-ipq8074.c
> +++ b/drivers/clk/qcom/gcc-ipq8074.c
> @@ -2612,6 +2612,7 @@ static struct clk_branch gcc_sys_noc_usb0_axi_clk = {
>  
>  static struct clk_branch gcc_usb0_master_clk = {
>  	.halt_reg = 0x3e000,
> +	.halt_check = BRANCH_HALT_VOTED,

BRANCH_HALT didn't work?

>  	.clkr = {
>  		.enable_reg = 0x3e000,
>  		.enable_mask = BIT(0),
> @@ -2725,6 +2726,7 @@ static struct clk_branch gcc_sys_noc_usb1_axi_clk = {
>  
>  static struct clk_branch gcc_usb1_master_clk = {
>  	.halt_reg = 0x3f000,
> +	.halt_check = BRANCH_HALT_VOTED,

BRANCH_HALT didn't work?

>  	.clkr = {
>  		.enable_reg = 0x3f000,
>  		.enable_mask = BIT(0),

-- 
Thanks,
Taniya Das


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] clk: qcom: ipq8074: set BRANCH_HALT_VOTED flag for usb master clocks
  2026-09-10 10:06 ` Taniya Das
@ 2026-09-11  6:40   ` Chukun Pan
  0 siblings, 0 replies; 3+ messages in thread
From: Chukun Pan @ 2026-09-11  6:40 UTC (permalink / raw)
  To: taniya.das
  Cc: amadeus, andersson, bmasney+clk, jbrunet+clk, linux-arm-msm,
	linux-clk, linux-kernel, sboyd

Hi,

> Fixes tag?

This only occurs on a few devices, so I didn't add the Fixes tag.
Should I send a v2 patch with the Fixes tag?

> > +	.halt_check = BRANCH_HALT_VOTED,
>
> BRANCH_HALT didn't work?

I have tried these:

BRANCH_HALT - still has a status stuck at 'on' warning.
BRANCH_HALT_DELAY - No stuck warning, but EMI warning
may occur once: disabled by hub (EMI?), re-enabling...
BRANCH_HALT_VOTED - No warnings, USB working.

Thanks,
Chukun

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-11  6:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-10 10:00 [PATCH 1/1] clk: qcom: ipq8074: set BRANCH_HALT_VOTED flag for usb master clocks Chukun Pan
2026-09-10 10:06 ` Taniya Das
2026-09-11  6:40   ` Chukun Pan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®