* [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39)
@ 2026-07-06 15:02 Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 01/12] clk: qcom: gcc-msm8916: Fix enable_reg for gcc_blsp1_sleep_clk Stephan Gerhold
` (12 more replies)
0 siblings, 13 replies; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Konrad Dybcio,
Krzysztof Kozlowski
The gcc-mdm9607 driver was originally based on gcc-msm8916, with register
addresses/frequency tables - where available - replaced with the values
from the downstream clock-gcc-mdm9607 driver. Nowadays, gcc-msm8909 is a
much closer match, so comparing the two drivers revealed quite a few
mistakes inside the gcc-mdm9607 driver.
This series fixes them, together with a few other related bug fixes in
gcc-msm8916, gcc-msm8939 and the dt-bindings for qcom,gcc-mdm9607.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
Changes in v2:
- Pick up review tags (Konrad, Taniya, Krzysztof)
- clk: qcom: gcc-mdm9607: Fix BIMC PLL definition
- Replace with new commit that drops the BIMC PLL entirely, together with
all related consumer clocks. Similar to newer SoCs, we now define the
NoC-related clocks without parent. (Konrad, Taniya)
- clk: qcom: gcc-mdm9607: Drop incorrect apss_tcu_clk_src
- Drop now unused static gcc_xo_gpll0_gpll1_gpll2_map variables (Sashiko)
- Clarify commit message, looks like the apss_tcu_clk_src exists in the
hardware, but at a different address. We don't have any use for this
clock though, so leave the actual change as-is. (Konrad)
- clk: qcom: gcc-mdm9607: Drop incorrect system_noc_bfdcd_clk_src
- Clarify commit message, the system_noc_bfdcd_clk_src is really missing
in the hardware. (Konrad)
- dt-bindings: clock: qcom: gcc-mdm9607: Drop incorrect clocks
- Keep APSS_TCU_CLK_SRC since Konrad mentioned this clock exists in the
hardware. We don't use it in the driver, but the dt-bindings document
the hardware, not the driver.
- Link to v1: https://patch.msgid.link/20260609-qcom-clk-mdm9607-fixes-v1-0-5e9717faf842@linaro.org
---
Stephan Gerhold (12):
clk: qcom: gcc-msm8916: Fix enable_reg for gcc_blsp1_sleep_clk
clk: qcom: gcc-msm8939: Fix enable_reg for gcc_blsp1_sleep_clk
clk: qcom: gcc-mdm9607: Fix enable_reg for gcc_blsp1_sleep_clk
clk: qcom: gcc-mdm9607: Fix halt_reg for gcc_apss_axi_clk
clk: qcom: gcc-mdm9607: Increase delay for USB PHY reset
clk: qcom: gcc-mdm9607: Drop incorrect apss_tcu_clk_src
clk: qcom: gcc-mdm9607: Drop incorrect system_noc_bfdcd_clk_src
clk: qcom: gcc-mdm9607: Drop incorrect BIMC PLL and related clocks
dt-bindings: clock: qcom: gcc-mdm9607: Drop SYSTEM_NOC_BFDCD_CLK_SRC
dt-bindings: clock: qcom: gcc-mdm9607: Add missing "clocks" property
dt-bindings: clock: qcom: gcc-mdm9607: Use proper address in example
clk: qcom: gcc-mdm9607: Drop redundant register update during probe
.../bindings/clock/qcom,gcc-mdm9607.yaml | 18 +-
drivers/clk/qcom/gcc-mdm9607.c | 193 +--------------------
drivers/clk/qcom/gcc-msm8916.c | 5 +-
drivers/clk/qcom/gcc-msm8939.c | 5 +-
include/dt-bindings/clock/qcom,gcc-mdm9607.h | 1 -
5 files changed, 29 insertions(+), 193 deletions(-)
---
base-commit: 696bef37f7f22f894ffc2059bdf9ec76b309cf8f
change-id: 20260609-qcom-clk-mdm9607-fixes-81a8d11dbd80
Best regards,
--
Stephan Gerhold <stephan.gerhold@linaro.org>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 01/12] clk: qcom: gcc-msm8916: Fix enable_reg for gcc_blsp1_sleep_clk
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
@ 2026-07-06 15:02 ` Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 02/12] clk: qcom: gcc-msm8939: " Stephan Gerhold
` (11 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Konrad Dybcio
According to the APQ8016E TRM, the GCC_BLSP1_SLEEP_CBCR register is
read-only and only has the CLK_OFF bit to check if the clock is running.
This is a shared vote clock, the correct way to enable it is to vote for
BLSP1_SLEEP_CLK_ENA (BIT(9)) in GCC_APCS_CLOCK_BRANCH_ENA_VOTE (0x45004).
Cc: stable@vger.kernel.org
Fixes: 3966fab8b6ab ("clk: qcom: Add MSM8916 Global Clock Controller support")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
drivers/clk/qcom/gcc-msm8916.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/gcc-msm8916.c b/drivers/clk/qcom/gcc-msm8916.c
index 9c7c6b23ce32..e91406e6f527 100644
--- a/drivers/clk/qcom/gcc-msm8916.c
+++ b/drivers/clk/qcom/gcc-msm8916.c
@@ -1589,9 +1589,10 @@ static struct clk_branch gcc_blsp1_ahb_clk = {
static struct clk_branch gcc_blsp1_sleep_clk = {
.halt_reg = 0x01004,
+ .halt_check = BRANCH_HALT_VOTED,
.clkr = {
- .enable_reg = 0x01004,
- .enable_mask = BIT(0),
+ .enable_reg = 0x45004,
+ .enable_mask = BIT(9),
.hw.init = &(struct clk_init_data){
.name = "gcc_blsp1_sleep_clk",
.parent_data = &(const struct clk_parent_data){
--
2.54.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 02/12] clk: qcom: gcc-msm8939: Fix enable_reg for gcc_blsp1_sleep_clk
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 01/12] clk: qcom: gcc-msm8916: Fix enable_reg for gcc_blsp1_sleep_clk Stephan Gerhold
@ 2026-07-06 15:02 ` Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 03/12] clk: qcom: gcc-mdm9607: " Stephan Gerhold
` (10 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Konrad Dybcio
MSM8939 is similar to MSM8916, where the GCC_BLSP1_SLEEP_CBCR register is
read-only and only has the CLK_OFF bit to check if the clock is running.
This is a shared vote clock, the correct way to enable it is to vote for
BLSP1_SLEEP_CLK_ENA (BIT(9)) in GCC_APCS_CLOCK_BRANCH_ENA_VOTE (0x45004).
Cc: stable@vger.kernel.org
Fixes: 1664014e4679 ("clk: qcom: gcc-msm8939: Add MSM8939 Generic Clock Controller")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
drivers/clk/qcom/gcc-msm8939.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/gcc-msm8939.c b/drivers/clk/qcom/gcc-msm8939.c
index 45193b3d714b..ffd7f14fcbaf 100644
--- a/drivers/clk/qcom/gcc-msm8939.c
+++ b/drivers/clk/qcom/gcc-msm8939.c
@@ -1929,9 +1929,10 @@ static struct clk_branch gcc_blsp1_ahb_clk = {
static struct clk_branch gcc_blsp1_sleep_clk = {
.halt_reg = 0x01004,
+ .halt_check = BRANCH_HALT_VOTED,
.clkr = {
- .enable_reg = 0x01004,
- .enable_mask = BIT(0),
+ .enable_reg = 0x45004,
+ .enable_mask = BIT(9),
.hw.init = &(struct clk_init_data){
.name = "gcc_blsp1_sleep_clk",
.ops = &clk_branch2_ops,
--
2.54.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 03/12] clk: qcom: gcc-mdm9607: Fix enable_reg for gcc_blsp1_sleep_clk
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 01/12] clk: qcom: gcc-msm8916: Fix enable_reg for gcc_blsp1_sleep_clk Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 02/12] clk: qcom: gcc-msm8939: " Stephan Gerhold
@ 2026-07-06 15:02 ` Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 04/12] clk: qcom: gcc-mdm9607: Fix halt_reg for gcc_apss_axi_clk Stephan Gerhold
` (9 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Konrad Dybcio
From: Stephan Gerhold <stephan@gerhold.net>
MDM9607 is similar to MSM8909, where the GCC_BLSP1_SLEEP_CBCR register is
read-only and only has the CLK_OFF bit to check if the clock is running.
This is a shared vote clock, the correct way to enable it is to vote for
BLSP1_SLEEP_CLK_ENA (BIT(9)) in GCC_APCS_CLOCK_BRANCH_ENA_VOTE (0x45004).
Cc: stable@vger.kernel.org
Fixes: 48b7253264ea ("clk: qcom: Add MDM9607 GCC driver")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
drivers/clk/qcom/gcc-mdm9607.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/gcc-mdm9607.c b/drivers/clk/qcom/gcc-mdm9607.c
index 07f1b78d737a..499e0fbbfab9 100644
--- a/drivers/clk/qcom/gcc-mdm9607.c
+++ b/drivers/clk/qcom/gcc-mdm9607.c
@@ -790,9 +790,10 @@ static struct clk_branch gcc_blsp1_ahb_clk = {
static struct clk_branch gcc_blsp1_sleep_clk = {
.halt_reg = 0x1004,
+ .halt_check = BRANCH_HALT_VOTED,
.clkr = {
- .enable_reg = 0x1004,
- .enable_mask = BIT(0),
+ .enable_reg = 0x45004,
+ .enable_mask = BIT(9),
.hw.init = &(struct clk_init_data){
.name = "gcc_blsp1_sleep_clk",
.parent_data = &(const struct clk_parent_data){
--
2.54.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 04/12] clk: qcom: gcc-mdm9607: Fix halt_reg for gcc_apss_axi_clk
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
` (2 preceding siblings ...)
2026-07-06 15:02 ` [PATCH v2 03/12] clk: qcom: gcc-mdm9607: " Stephan Gerhold
@ 2026-07-06 15:02 ` Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 05/12] clk: qcom: gcc-mdm9607: Increase delay for USB PHY reset Stephan Gerhold
` (8 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Konrad Dybcio
gcc_apss_axi_clk specifies a halt_reg of 0x4601c, but this is already used
by gcc_apss_ahb_clk. The correct value according to the downstream driver
is 0x46020.
Cc: stable@vger.kernel.org
Fixes: 48b7253264ea ("clk: qcom: Add MDM9607 GCC driver")
Reviewed-by: Taniya Das <taniya.das@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
drivers/clk/qcom/gcc-mdm9607.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/gcc-mdm9607.c b/drivers/clk/qcom/gcc-mdm9607.c
index 499e0fbbfab9..feb91e1fca1f 100644
--- a/drivers/clk/qcom/gcc-mdm9607.c
+++ b/drivers/clk/qcom/gcc-mdm9607.c
@@ -1460,7 +1460,7 @@ static struct clk_branch gcc_apss_ahb_clk = {
};
static struct clk_branch gcc_apss_axi_clk = {
- .halt_reg = 0x4601c,
+ .halt_reg = 0x46020,
.halt_check = BRANCH_HALT_VOTED,
.clkr = {
.enable_reg = 0x45004,
--
2.54.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 05/12] clk: qcom: gcc-mdm9607: Increase delay for USB PHY reset
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
` (3 preceding siblings ...)
2026-07-06 15:02 ` [PATCH v2 04/12] clk: qcom: gcc-mdm9607: Fix halt_reg for gcc_apss_axi_clk Stephan Gerhold
@ 2026-07-06 15:02 ` Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 06/12] clk: qcom: gcc-mdm9607: Drop incorrect apss_tcu_clk_src Stephan Gerhold
` (7 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Konrad Dybcio
From: Stephan Gerhold <stephan@gerhold.net>
To conform to the specifications of the USB PHY, the reset signal should be
asserted for at least 10us. Guarantee that by increasing the delay for the
USB2_HS_PHY_ONLY_BCR reset control similar to commit dcc6c9fb7128 ("clk:
qcom: gcc-msm8909: Increase delay for USB PHY reset").
Cc: stable@vger.kernel.org
Fixes: 48b7253264ea ("clk: qcom: Add MDM9607 GCC driver")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
drivers/clk/qcom/gcc-mdm9607.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/gcc-mdm9607.c b/drivers/clk/qcom/gcc-mdm9607.c
index feb91e1fca1f..092076a5a0c9 100644
--- a/drivers/clk/qcom/gcc-mdm9607.c
+++ b/drivers/clk/qcom/gcc-mdm9607.c
@@ -1568,7 +1568,7 @@ static const struct qcom_reset_map gcc_mdm9607_resets[] = {
[USB_HS_HSIC_BCR] = { 0x3d05c },
[GCC_MSS_RESTART] = { 0x3e000 },
[USB_HS_BCR] = { 0x41000 },
- [USB2_HS_PHY_ONLY_BCR] = { 0x41034 },
+ [USB2_HS_PHY_ONLY_BCR] = { .reg = 0x41034, .udelay = 15 },
[QUSB2_PHY_BCR] = { 0x4103c },
};
--
2.54.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 06/12] clk: qcom: gcc-mdm9607: Drop incorrect apss_tcu_clk_src
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
` (4 preceding siblings ...)
2026-07-06 15:02 ` [PATCH v2 05/12] clk: qcom: gcc-mdm9607: Increase delay for USB PHY reset Stephan Gerhold
@ 2026-07-06 15:02 ` Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 07/12] clk: qcom: gcc-mdm9607: Drop incorrect system_noc_bfdcd_clk_src Stephan Gerhold
` (6 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Konrad Dybcio
From: Stephan Gerhold <stephan@gerhold.net>
This clock does not exist on the specified address on MDM9607.
Reading/writing the registers always results in 0 or crashes. The math in
the frequency table is also broken. GPLL2 on MDM9607 runs at 480 MHz, so:
- F(155000000, P_GPLL2, 6, 0, 0), // 480 MHz/6 = 80 MHz, not 155 MHz
- F(310000000, P_GPLL2, 3, 0, 0), // 480 MHz/3 = 160 MHz, not 310 MHz
Presumably, this definition was mistakenly copied as-is from gcc-msm8916
(which uses 930 MHz for GPLL2). There are no branch consumers of this root
clock inside gcc-mdm9607 (notably, gcc_apss_tcu_clk has bimc_ddr_clk_src as
parent instead of this clock), so we can just drop it.
It seems like this clock does exist on this SoC on a different address, but
since there is no user and reference code for it, it is still better to
drop it.
Cc: stable@vger.kernel.org
Fixes: 48b7253264ea ("clk: qcom: Add MDM9607 GCC driver")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
drivers/clk/qcom/gcc-mdm9607.c | 35 -----------------------------------
1 file changed, 35 deletions(-)
diff --git a/drivers/clk/qcom/gcc-mdm9607.c b/drivers/clk/qcom/gcc-mdm9607.c
index 092076a5a0c9..f9ed655513ef 100644
--- a/drivers/clk/qcom/gcc-mdm9607.c
+++ b/drivers/clk/qcom/gcc-mdm9607.c
@@ -158,20 +158,6 @@ static const struct clk_parent_data gcc_xo_gpll0_gpll2[] = {
{ .hw = &gpll2.clkr.hw },
};
-static const struct parent_map gcc_xo_gpll0_gpll1_gpll2_map[] = {
- { P_XO, 0 },
- { P_GPLL0, 1 },
- { P_GPLL1, 2 },
- { P_GPLL2, 3 },
-};
-
-static const struct clk_parent_data gcc_xo_gpll0_gpll1_gpll2[] = {
- { .fw_name = "xo" },
- { .hw = &gpll0.clkr.hw },
- { .hw = &gpll1_vote.hw },
- { .hw = &gpll2.clkr.hw },
-};
-
static const struct freq_tbl ftbl_apss_ahb_clk[] = {
F(19200000, P_XO, 1, 0, 0),
F(50000000, P_GPLL0, 16, 0, 0),
@@ -674,26 +660,6 @@ static struct clk_rcg2 sdcc2_apps_clk_src = {
},
};
-static const struct freq_tbl ftbl_gcc_apss_tcu_clk[] = {
- F(155000000, P_GPLL2, 6, 0, 0),
- F(310000000, P_GPLL2, 3, 0, 0),
- F(400000000, P_GPLL0, 2, 0, 0),
- { }
-};
-
-static struct clk_rcg2 apss_tcu_clk_src = {
- .cmd_rcgr = 0x1207c,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_gpll1_gpll2_map,
- .freq_tbl = ftbl_gcc_apss_tcu_clk,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "apss_tcu_clk_src",
- .parent_data = gcc_xo_gpll0_gpll1_gpll2,
- .num_parents = 4,
- .ops = &clk_rcg2_ops,
- },
-};
-
static const struct freq_tbl ftbl_gcc_usb_hs_system_clk[] = {
F(19200000, P_XO, 1, 0, 0),
F(57140000, P_GPLL0, 14, 0, 0),
@@ -1512,7 +1478,6 @@ static struct clk_regmap *gcc_mdm9607_clocks[] = {
[PDM2_CLK_SRC] = &pdm2_clk_src.clkr,
[SDCC1_APPS_CLK_SRC] = &sdcc1_apps_clk_src.clkr,
[SDCC2_APPS_CLK_SRC] = &sdcc2_apps_clk_src.clkr,
- [APSS_TCU_CLK_SRC] = &apss_tcu_clk_src.clkr,
[USB_HS_SYSTEM_CLK_SRC] = &usb_hs_system_clk_src.clkr,
[GCC_BLSP1_AHB_CLK] = &gcc_blsp1_ahb_clk.clkr,
[GCC_BLSP1_SLEEP_CLK] = &gcc_blsp1_sleep_clk.clkr,
--
2.54.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 07/12] clk: qcom: gcc-mdm9607: Drop incorrect system_noc_bfdcd_clk_src
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
` (5 preceding siblings ...)
2026-07-06 15:02 ` [PATCH v2 06/12] clk: qcom: gcc-mdm9607: Drop incorrect apss_tcu_clk_src Stephan Gerhold
@ 2026-07-06 15:02 ` Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 08/12] clk: qcom: gcc-mdm9607: Drop incorrect BIMC PLL and related clocks Stephan Gerhold
` (5 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Konrad Dybcio
From: Stephan Gerhold <stephan@gerhold.net>
This clock does not exist on MDM9607. Reading/writing the registers always
results in 0.
Presumably, this definition was mistakenly copied from gcc-msm8916. On
MSM8916, this root clock is used for multimedia subsystems (camera,
display, video). MDM9607 has none of that, so this clock was probably
omitted in the hardware.
There are no users inside gcc-mdm9607, so we can just drop it.
Cc: stable@vger.kernel.org
Fixes: 48b7253264ea ("clk: qcom: Add MDM9607 GCC driver")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
drivers/clk/qcom/gcc-mdm9607.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/drivers/clk/qcom/gcc-mdm9607.c b/drivers/clk/qcom/gcc-mdm9607.c
index f9ed655513ef..c6abe93ce2e8 100644
--- a/drivers/clk/qcom/gcc-mdm9607.c
+++ b/drivers/clk/qcom/gcc-mdm9607.c
@@ -240,18 +240,6 @@ static struct clk_rcg2 pcnoc_bfdcd_clk_src = {
},
};
-static struct clk_rcg2 system_noc_bfdcd_clk_src = {
- .cmd_rcgr = 0x26004,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_bimc_map,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "system_noc_bfdcd_clk_src",
- .parent_data = gcc_xo_gpll0_bimc,
- .num_parents = ARRAY_SIZE(gcc_xo_gpll0_bimc),
- .ops = &clk_rcg2_ops,
- },
-};
-
static const struct freq_tbl ftbl_gcc_blsp1_qup1_6_i2c_apps_clk[] = {
F(19200000, P_XO, 1, 0, 0),
F(50000000, P_GPLL0, 16, 0, 0),
@@ -1451,7 +1439,6 @@ static struct clk_regmap *gcc_mdm9607_clocks[] = {
[BIMC_PLL_VOTE] = &bimc_pll_vote,
[BIMC_DDR_CLK_SRC] = &bimc_ddr_clk_src.clkr,
[PCNOC_BFDCD_CLK_SRC] = &pcnoc_bfdcd_clk_src.clkr,
- [SYSTEM_NOC_BFDCD_CLK_SRC] = &system_noc_bfdcd_clk_src.clkr,
[APSS_AHB_CLK_SRC] = &apss_ahb_clk_src.clkr,
[BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr,
[BLSP1_QUP1_SPI_APPS_CLK_SRC] = &blsp1_qup1_spi_apps_clk_src.clkr,
--
2.54.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 08/12] clk: qcom: gcc-mdm9607: Drop incorrect BIMC PLL and related clocks
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
` (6 preceding siblings ...)
2026-07-06 15:02 ` [PATCH v2 07/12] clk: qcom: gcc-mdm9607: Drop incorrect system_noc_bfdcd_clk_src Stephan Gerhold
@ 2026-07-06 15:02 ` Stephan Gerhold
2026-07-06 15:35 ` Konrad Dybcio
2026-07-06 15:02 ` [PATCH v2 09/12] dt-bindings: clock: qcom: gcc-mdm9607: Drop SYSTEM_NOC_BFDCD_CLK_SRC Stephan Gerhold
` (4 subsequent siblings)
12 siblings, 1 reply; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree
The gcc-mdm9607 driver was originally based on gcc-msm8916, but a closer
match nowadays is gcc-msm8909. Looking at the differences between
gcc-mdm9607 and gcc-msm8909, there is quite some confusion around the
definitions for the BIMC PLL.
It turns out the BIMC PLL on MDM9607 is actually an Alpha PLL just like on
MSM8909. We can vote for it using BIT(2), which explains why BIT(3) was
used for GPLL2.
In practice, the BIMC PLL is exclusively controlled by the RPM firmware and
Linux should not touch it. So far, it was defined to model the full clock
hierarchy, but even in read-only mode with CLK_GET_RATE_NOCACHE this is
problematic since the RPM will silently change the clock parents without
notifying Linux about it. The clock framework reads the clock parent only
once during boot, so the resulting rates will still be often wrong.
Follow the example of more recent SoCs and drop the BIMC PLL and all
remaining related clocks to avoid reporting stale status data. This means
we cannot determine the rate of these clocks anymore. This is not a big
problem in practice, since these are NoC-related clocks that are
independently managed through the interconnect subsystem.
Cc: stable@vger.kernel.org
Fixes: 48b7253264ea ("clk: qcom: Add MDM9607 GCC driver")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
drivers/clk/qcom/gcc-mdm9607.c | 125 +----------------------------------------
1 file changed, 1 insertion(+), 124 deletions(-)
diff --git a/drivers/clk/qcom/gcc-mdm9607.c b/drivers/clk/qcom/gcc-mdm9607.c
index c6abe93ce2e8..4b749c99586b 100644
--- a/drivers/clk/qcom/gcc-mdm9607.c
+++ b/drivers/clk/qcom/gcc-mdm9607.c
@@ -26,7 +26,6 @@
enum {
P_XO,
- P_BIMC,
P_GPLL0,
P_GPLL1,
P_GPLL2,
@@ -121,7 +120,7 @@ static struct clk_alpha_pll gpll2_early = {
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
.clkr = {
.enable_reg = 0x45000,
- .enable_mask = BIT(3), /* Yeah, apparently it's not 2 */
+ .enable_mask = BIT(3), /* BIT(2) is used for BIMC PLL */
.hw.init = &(struct clk_init_data)
{
.name = "gpll2_early",
@@ -178,68 +177,6 @@ static struct clk_rcg2 apss_ahb_clk_src = {
},
};
-static struct clk_pll bimc_pll = {
- .l_reg = 0x23004,
- .m_reg = 0x23008,
- .n_reg = 0x2300c,
- .config_reg = 0x23010,
- .mode_reg = 0x23000,
- .status_reg = 0x2301c,
- .status_bit = 17,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "bimc_pll",
- .parent_data = &(const struct clk_parent_data){
- .fw_name = "xo",
- },
- .num_parents = 1,
- .ops = &clk_pll_ops,
- },
-};
-
-static struct clk_regmap bimc_pll_vote = {
- .enable_reg = 0x45000,
- .enable_mask = BIT(3),
- .hw.init = &(struct clk_init_data){
- .name = "bimc_pll_vote",
- .parent_hws = (const struct clk_hw *[]){ &bimc_pll.clkr.hw },
- .num_parents = 1,
- .ops = &clk_pll_vote_ops,
- },
-};
-
-static const struct parent_map gcc_xo_gpll0_bimc_map[] = {
- { P_XO, 0 },
- { P_GPLL0, 1 },
- { P_BIMC, 2 },
-};
-
-static const struct clk_parent_data gcc_xo_gpll0_bimc[] = {
- { .fw_name = "xo" },
- { .hw = &gpll0.clkr.hw },
- { .hw = &bimc_pll_vote.hw },
-};
-
-static const struct freq_tbl ftbl_pcnoc_bfdcd_clk_src[] = {
- F(19200000, P_XO, 1, 0, 0),
- F(50000000, P_GPLL0, 16, 0, 0),
- F(100000000, P_GPLL0, 8, 0, 0),
- { }
-};
-
-static struct clk_rcg2 pcnoc_bfdcd_clk_src = {
- .cmd_rcgr = 0x27000,
- .freq_tbl = ftbl_pcnoc_bfdcd_clk_src,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_bimc_map,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "pcnoc_bfdcd_clk_src",
- .parent_data = gcc_xo_gpll0_bimc,
- .num_parents = ARRAY_SIZE(gcc_xo_gpll0_bimc),
- .ops = &clk_rcg2_ops,
- .flags = CLK_IS_CRITICAL,
- },
-};
-
static const struct freq_tbl ftbl_gcc_blsp1_qup1_6_i2c_apps_clk[] = {
F(19200000, P_XO, 1, 0, 0),
F(50000000, P_GPLL0, 16, 0, 0),
@@ -735,8 +672,6 @@ static struct clk_branch gcc_blsp1_ahb_clk = {
.enable_mask = BIT(10),
.hw.init = &(struct clk_init_data){
.name = "gcc_blsp1_ahb_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
.ops = &clk_branch2_ops,
},
},
@@ -1038,8 +973,6 @@ static struct clk_branch gcc_boot_rom_ahb_clk = {
.enable_mask = BIT(7),
.hw.init = &(struct clk_init_data){
.name = "gcc_boot_rom_ahb_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
.ops = &clk_branch2_ops,
},
},
@@ -1053,9 +986,6 @@ static struct clk_branch gcc_crypto_ahb_clk = {
.enable_mask = BIT(0),
.hw.init = &(struct clk_init_data){
.name = "gcc_crypto_ahb_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
.ops = &clk_branch2_ops,
},
},
@@ -1069,9 +999,6 @@ static struct clk_branch gcc_crypto_axi_clk = {
.enable_mask = BIT(1),
.hw.init = &(struct clk_init_data){
.name = "gcc_crypto_axi_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
.ops = &clk_branch2_ops,
},
},
@@ -1145,9 +1072,6 @@ static struct clk_branch gcc_mss_cfg_ahb_clk = {
.enable_mask = BIT(0),
.hw.init = &(struct clk_init_data){
.name = "gcc_mss_cfg_ahb_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
.ops = &clk_branch2_ops,
},
},
@@ -1175,9 +1099,6 @@ static struct clk_branch gcc_pdm_ahb_clk = {
.enable_mask = BIT(0),
.hw.init = &(struct clk_init_data){
.name = "gcc_pdm_ahb_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
.ops = &clk_branch2_ops,
},
},
@@ -1191,9 +1112,6 @@ static struct clk_branch gcc_prng_ahb_clk = {
.enable_mask = BIT(8),
.hw.init = &(struct clk_init_data){
.name = "gcc_prng_ahb_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
.ops = &clk_branch2_ops,
},
},
@@ -1206,9 +1124,6 @@ static struct clk_branch gcc_sdcc1_ahb_clk = {
.enable_mask = BIT(0),
.hw.init = &(struct clk_init_data){
.name = "gcc_sdcc1_ahb_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
.ops = &clk_branch2_ops,
},
},
@@ -1236,9 +1151,6 @@ static struct clk_branch gcc_sdcc2_ahb_clk = {
.enable_mask = BIT(0),
.hw.init = &(struct clk_init_data){
.name = "gcc_sdcc2_ahb_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
.ops = &clk_branch2_ops,
},
},
@@ -1259,19 +1171,6 @@ static struct clk_branch gcc_sdcc2_apps_clk = {
},
};
-static struct clk_rcg2 bimc_ddr_clk_src = {
- .cmd_rcgr = 0x32004,
- .hid_width = 5,
- .parent_map = gcc_xo_gpll0_bimc_map,
- .clkr.hw.init = &(struct clk_init_data){
- .name = "bimc_ddr_clk_src",
- .parent_data = gcc_xo_gpll0_bimc,
- .num_parents = 3,
- .ops = &clk_rcg2_ops,
- .flags = CLK_GET_RATE_NOCACHE,
- },
-};
-
static struct clk_branch gcc_mss_q6_bimc_axi_clk = {
.halt_reg = 0x49004,
.clkr = {
@@ -1279,9 +1178,6 @@ static struct clk_branch gcc_mss_q6_bimc_axi_clk = {
.enable_mask = BIT(0),
.hw.init = &(struct clk_init_data){
.name = "gcc_mss_q6_bimc_axi_clk",
- .parent_hws = (const struct clk_hw *[]){ &bimc_ddr_clk_src.clkr.hw },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
.ops = &clk_branch2_ops,
},
},
@@ -1295,8 +1191,6 @@ static struct clk_branch gcc_apss_tcu_clk = {
.enable_mask = BIT(1),
.hw.init = &(struct clk_init_data){
.name = "gcc_apss_tcu_clk",
- .parent_hws = (const struct clk_hw *[]){ &bimc_ddr_clk_src.clkr.hw },
- .num_parents = 1,
.ops = &clk_branch2_ops,
},
},
@@ -1310,9 +1204,6 @@ static struct clk_branch gcc_smmu_cfg_clk = {
.enable_mask = BIT(12),
.hw.init = &(struct clk_init_data){
.name = "gcc_smmu_cfg_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
.ops = &clk_branch2_ops,
},
},
@@ -1360,9 +1251,6 @@ static struct clk_branch gcc_usb_hs_phy_cfg_ahb_clk = {
.enable_mask = BIT(0),
.hw.init = &(struct clk_init_data){
.name = "gcc_usb_hs_phy_cfg_ahb_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
.ops = &clk_branch2_ops,
},
},
@@ -1375,9 +1263,6 @@ static struct clk_branch gcc_usb_hs_ahb_clk = {
.enable_mask = BIT(0),
.hw.init = &(struct clk_init_data){
.name = "gcc_usb_hs_ahb_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
- .flags = CLK_SET_RATE_PARENT,
.ops = &clk_branch2_ops,
},
},
@@ -1406,8 +1291,6 @@ static struct clk_branch gcc_apss_ahb_clk = {
.enable_mask = BIT(14),
.hw.init = &(struct clk_init_data){
.name = "gcc_apss_ahb_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
.ops = &clk_branch2_ops,
},
},
@@ -1421,8 +1304,6 @@ static struct clk_branch gcc_apss_axi_clk = {
.enable_mask = BIT(13),
.hw.init = &(struct clk_init_data){
.name = "gcc_apss_axi_clk",
- .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
- .num_parents = 1,
.ops = &clk_branch2_ops,
},
},
@@ -1435,10 +1316,6 @@ static struct clk_regmap *gcc_mdm9607_clocks[] = {
[GPLL1_VOTE] = &gpll1_vote,
[GPLL2] = &gpll2.clkr,
[GPLL2_EARLY] = &gpll2_early.clkr,
- [BIMC_PLL] = &bimc_pll.clkr,
- [BIMC_PLL_VOTE] = &bimc_pll_vote,
- [BIMC_DDR_CLK_SRC] = &bimc_ddr_clk_src.clkr,
- [PCNOC_BFDCD_CLK_SRC] = &pcnoc_bfdcd_clk_src.clkr,
[APSS_AHB_CLK_SRC] = &apss_ahb_clk_src.clkr,
[BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr,
[BLSP1_QUP1_SPI_APPS_CLK_SRC] = &blsp1_qup1_spi_apps_clk_src.clkr,
--
2.54.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 09/12] dt-bindings: clock: qcom: gcc-mdm9607: Drop SYSTEM_NOC_BFDCD_CLK_SRC
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
` (7 preceding siblings ...)
2026-07-06 15:02 ` [PATCH v2 08/12] clk: qcom: gcc-mdm9607: Drop incorrect BIMC PLL and related clocks Stephan Gerhold
@ 2026-07-06 15:02 ` Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 10/12] dt-bindings: clock: qcom: gcc-mdm9607: Add missing "clocks" property Stephan Gerhold
` (3 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Krzysztof Kozlowski
From: Stephan Gerhold <stephan@gerhold.net>
This clock does not exist in the hardware, it has no consumers and
reading/writing to the registers fails. Drop it from the bindings.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
include/dt-bindings/clock/qcom,gcc-mdm9607.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/dt-bindings/clock/qcom,gcc-mdm9607.h b/include/dt-bindings/clock/qcom,gcc-mdm9607.h
index 357a680a40da..246bce28137e 100644
--- a/include/dt-bindings/clock/qcom,gcc-mdm9607.h
+++ b/include/dt-bindings/clock/qcom,gcc-mdm9607.h
@@ -13,7 +13,6 @@
#define GPLL2 4
#define GPLL2_EARLY 5
#define PCNOC_BFDCD_CLK_SRC 6
-#define SYSTEM_NOC_BFDCD_CLK_SRC 7
#define GCC_SMMU_CFG_CLK 8
#define APSS_AHB_CLK_SRC 9
#define GCC_QDSS_DAP_CLK 10
--
2.54.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 10/12] dt-bindings: clock: qcom: gcc-mdm9607: Add missing "clocks" property
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
` (8 preceding siblings ...)
2026-07-06 15:02 ` [PATCH v2 09/12] dt-bindings: clock: qcom: gcc-mdm9607: Drop SYSTEM_NOC_BFDCD_CLK_SRC Stephan Gerhold
@ 2026-07-06 15:02 ` Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 11/12] dt-bindings: clock: qcom: gcc-mdm9607: Use proper address in example Stephan Gerhold
` (2 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Krzysztof Kozlowski,
Konrad Dybcio
gcc-mdm9607.c uses "fw_name", so it requires specifying the "xo" and
"sleep_clk" clock source in the device tree. For some reason, this was
never documented in the dt-bindings. Nowadays, qcom,gcc-mdm9607 has a
dedicated schema, so we can just add it to the properties without any
additional conditionals.
Fixes: 6faa7e4ddce6 ("dt-bindings: clock: Add MDM9607 GCC clock bindings")
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
.../devicetree/bindings/clock/qcom,gcc-mdm9607.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml
index d7da30b0e7ee..ef4b274b5c09 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml
@@ -25,8 +25,20 @@ properties:
enum:
- qcom,gcc-mdm9607
+ clocks:
+ items:
+ - description: XO source
+ - description: Sleep clock source
+
+ clock-names:
+ items:
+ - const: xo
+ - const: sleep_clk
+
required:
- compatible
+ - clocks
+ - clock-names
- '#power-domain-cells'
unevaluatedProperties: false
@@ -39,5 +51,7 @@ examples:
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
+ clocks = <&xo_board>, <&sleep_clk>;
+ clock-names = "xo", "sleep_clk";
};
...
--
2.54.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 11/12] dt-bindings: clock: qcom: gcc-mdm9607: Use proper address in example
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
` (9 preceding siblings ...)
2026-07-06 15:02 ` [PATCH v2 10/12] dt-bindings: clock: qcom: gcc-mdm9607: Add missing "clocks" property Stephan Gerhold
@ 2026-07-06 15:02 ` Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 12/12] clk: qcom: gcc-mdm9607: Drop redundant register update during probe Stephan Gerhold
2026-07-31 3:24 ` [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Bjorn Andersson
12 siblings, 0 replies; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Krzysztof Kozlowski,
Konrad Dybcio
Given that this is a dedicated schema for qcom,gcc-mdm9607, we might as
well use the correct memory addresses in the example. This does not
affect the validation itself, but will reduce confusion for readers.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml
index ef4b274b5c09..1b0efb1526a6 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-mdm9607.yaml
@@ -45,9 +45,9 @@ unevaluatedProperties: false
examples:
- |
- clock-controller@900000 {
+ clock-controller@1800000 {
compatible = "qcom,gcc-mdm9607";
- reg = <0x900000 0x4000>;
+ reg = <0x01800000 0x80000>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.54.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 12/12] clk: qcom: gcc-mdm9607: Drop redundant register update during probe
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
` (10 preceding siblings ...)
2026-07-06 15:02 ` [PATCH v2 11/12] dt-bindings: clock: qcom: gcc-mdm9607: Use proper address in example Stephan Gerhold
@ 2026-07-06 15:02 ` Stephan Gerhold
2026-07-31 3:24 ` [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Bjorn Andersson
12 siblings, 0 replies; 15+ messages in thread
From: Stephan Gerhold @ 2026-07-06 15:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Konrad Dybcio
From: Stephan Gerhold <stephan@gerhold.net>
GPLL0 is pretty much guaranteed to be already on (and voted) during boot,
since it's used by the CPU and also various other components such as UART.
We also vote for this bit in the actual GPLL0 definition, which will be set
as soon as any driver in the kernel requires using the GPLL0 clock.
All in all, this makes separately voting for GPLL0 during probe redundant,
especially because the "acpuclock" in the comment is a downstream construct
that does not exist in upstream.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
drivers/clk/qcom/gcc-mdm9607.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/clk/qcom/gcc-mdm9607.c b/drivers/clk/qcom/gcc-mdm9607.c
index 4b749c99586b..2e4cdb590623 100644
--- a/drivers/clk/qcom/gcc-mdm9607.c
+++ b/drivers/clk/qcom/gcc-mdm9607.c
@@ -1425,16 +1425,7 @@ MODULE_DEVICE_TABLE(of, gcc_mdm9607_match_table);
static int gcc_mdm9607_probe(struct platform_device *pdev)
{
- struct regmap *regmap;
-
- regmap = qcom_cc_map(pdev, &gcc_mdm9607_desc);
- if (IS_ERR(regmap))
- return PTR_ERR(regmap);
-
- /* Vote for GPLL0 to turn on. Needed by acpuclock. */
- regmap_update_bits(regmap, 0x45000, BIT(0), BIT(0));
-
- return qcom_cc_really_probe(&pdev->dev, &gcc_mdm9607_desc, regmap);
+ return qcom_cc_probe(pdev, &gcc_mdm9607_desc);
}
static struct platform_driver gcc_mdm9607_driver = {
--
2.54.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 08/12] clk: qcom: gcc-mdm9607: Drop incorrect BIMC PLL and related clocks
2026-07-06 15:02 ` [PATCH v2 08/12] clk: qcom: gcc-mdm9607: Drop incorrect BIMC PLL and related clocks Stephan Gerhold
@ 2026-07-06 15:35 ` Konrad Dybcio
0 siblings, 0 replies; 15+ messages in thread
From: Konrad Dybcio @ 2026-07-06 15:35 UTC (permalink / raw)
To: Stephan Gerhold, Bjorn Andersson
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree
On 7/6/26 5:02 PM, Stephan Gerhold wrote:
> The gcc-mdm9607 driver was originally based on gcc-msm8916, but a closer
> match nowadays is gcc-msm8909. Looking at the differences between
> gcc-mdm9607 and gcc-msm8909, there is quite some confusion around the
> definitions for the BIMC PLL.
>
> It turns out the BIMC PLL on MDM9607 is actually an Alpha PLL just like on
> MSM8909. We can vote for it using BIT(2), which explains why BIT(3) was
> used for GPLL2.
>
> In practice, the BIMC PLL is exclusively controlled by the RPM firmware and
> Linux should not touch it. So far, it was defined to model the full clock
> hierarchy, but even in read-only mode with CLK_GET_RATE_NOCACHE this is
> problematic since the RPM will silently change the clock parents without
> notifying Linux about it. The clock framework reads the clock parent only
> once during boot, so the resulting rates will still be often wrong.
>
> Follow the example of more recent SoCs and drop the BIMC PLL and all
> remaining related clocks to avoid reporting stale status data. This means
> we cannot determine the rate of these clocks anymore. This is not a big
> problem in practice, since these are NoC-related clocks that are
> independently managed through the interconnect subsystem.
>
> Cc: stable@vger.kernel.org
> Fixes: 48b7253264ea ("clk: qcom: Add MDM9607 GCC driver")
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39)
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
` (11 preceding siblings ...)
2026-07-06 15:02 ` [PATCH v2 12/12] clk: qcom: gcc-mdm9607: Drop redundant register update during probe Stephan Gerhold
@ 2026-07-31 3:24 ` Bjorn Andersson
12 siblings, 0 replies; 15+ messages in thread
From: Bjorn Andersson @ 2026-07-31 3:24 UTC (permalink / raw)
To: Stephan Gerhold
Cc: Michael Turquette, Stephen Boyd, Georgi Djakov, Shawn Guo,
Bryan O'Donoghue, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, linux-arm-msm,
linux-clk, linux-kernel, devicetree, Konrad Dybcio,
Krzysztof Kozlowski
On Mon, 06 Jul 2026 17:02:07 +0200, Stephan Gerhold wrote:
> The gcc-mdm9607 driver was originally based on gcc-msm8916, with register
> addresses/frequency tables - where available - replaced with the values
> from the downstream clock-gcc-mdm9607 driver. Nowadays, gcc-msm8909 is a
> much closer match, so comparing the two drivers revealed quite a few
> mistakes inside the gcc-mdm9607 driver.
>
> This series fixes them, together with a few other related bug fixes in
> gcc-msm8916, gcc-msm8939 and the dt-bindings for qcom,gcc-mdm9607.
>
> [...]
Applied, thanks!
[01/12] clk: qcom: gcc-msm8916: Fix enable_reg for gcc_blsp1_sleep_clk
commit: c5339edc6abb601ea10df910ea0b1592fa1016f3
[02/12] clk: qcom: gcc-msm8939: Fix enable_reg for gcc_blsp1_sleep_clk
commit: fc611445b021262b0d4ace6f716a360663816287
[03/12] clk: qcom: gcc-mdm9607: Fix enable_reg for gcc_blsp1_sleep_clk
commit: 944d0fb38cffe57a1d1ebf82c5c077bad82dcdbb
[04/12] clk: qcom: gcc-mdm9607: Fix halt_reg for gcc_apss_axi_clk
commit: ca7e6cc30cde4f0cbeff2e205a84bedf431e9156
[05/12] clk: qcom: gcc-mdm9607: Increase delay for USB PHY reset
commit: c99bc8e83848358bd4a0436e4bdae5b7919babb2
[06/12] clk: qcom: gcc-mdm9607: Drop incorrect apss_tcu_clk_src
commit: 38d06956f60675f906dc3f5b70b3b52103b86a7d
[07/12] clk: qcom: gcc-mdm9607: Drop incorrect system_noc_bfdcd_clk_src
commit: 17784427df923a0573a7ea83f9198456ff1ec1a5
[08/12] clk: qcom: gcc-mdm9607: Drop incorrect BIMC PLL and related clocks
commit: e111ddda092ad961870a634e4c9263c10a3e8485
[09/12] dt-bindings: clock: qcom: gcc-mdm9607: Drop SYSTEM_NOC_BFDCD_CLK_SRC
commit: 1df0fa742c5a1a0409eb64cea2993748efc42591
[10/12] dt-bindings: clock: qcom: gcc-mdm9607: Add missing "clocks" property
commit: 5c117709e7e1f1a53642f5704f29c3250a14c6f0
[11/12] dt-bindings: clock: qcom: gcc-mdm9607: Use proper address in example
commit: 75ae68fcbddca8f093c3b561cc82f9615b867b3d
[12/12] clk: qcom: gcc-mdm9607: Drop redundant register update during probe
commit: d4d2fcb3e3e929e71a7d1ca5443dbe08acd8f128
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2026-07-31 3:25 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-06 15:02 [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 01/12] clk: qcom: gcc-msm8916: Fix enable_reg for gcc_blsp1_sleep_clk Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 02/12] clk: qcom: gcc-msm8939: " Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 03/12] clk: qcom: gcc-mdm9607: " Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 04/12] clk: qcom: gcc-mdm9607: Fix halt_reg for gcc_apss_axi_clk Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 05/12] clk: qcom: gcc-mdm9607: Increase delay for USB PHY reset Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 06/12] clk: qcom: gcc-mdm9607: Drop incorrect apss_tcu_clk_src Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 07/12] clk: qcom: gcc-mdm9607: Drop incorrect system_noc_bfdcd_clk_src Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 08/12] clk: qcom: gcc-mdm9607: Drop incorrect BIMC PLL and related clocks Stephan Gerhold
2026-07-06 15:35 ` Konrad Dybcio
2026-07-06 15:02 ` [PATCH v2 09/12] dt-bindings: clock: qcom: gcc-mdm9607: Drop SYSTEM_NOC_BFDCD_CLK_SRC Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 10/12] dt-bindings: clock: qcom: gcc-mdm9607: Add missing "clocks" property Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 11/12] dt-bindings: clock: qcom: gcc-mdm9607: Use proper address in example Stephan Gerhold
2026-07-06 15:02 ` [PATCH v2 12/12] clk: qcom: gcc-mdm9607: Drop redundant register update during probe Stephan Gerhold
2026-07-31 3:24 ` [PATCH v2 00/12] clk: qcom: Assorted fixes for gcc-mdm9607 (and gcc-msm8916/39) Bjorn Andersson
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®