* [PATCH 1/5] clk: qcom: cmnpll: Account for reference clock divider
2025-11-28 8:40 [PATCH 0/5] Add CMN PLL clock controller support for IPQ5332 Luo Jie
@ 2025-11-28 8:40 ` Luo Jie
2025-11-28 11:38 ` Konrad Dybcio
2025-11-28 8:40 ` [PATCH 2/5] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5332 SoC Luo Jie
` (3 subsequent siblings)
4 siblings, 1 reply; 20+ messages in thread
From: Luo Jie @ 2025-11-28 8:40 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Konrad Dybcio,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia, Luo Jie
The clk_cmn_pll_recalc_rate() function must account for the reference clock
divider programmed in CMN_PLL_REFCLK_CONFIG. Without this fix, platforms
with a reference divider other than 1 calculate incorrect CMN PLL rates.
For example, on IPQ5332 where the reference divider is 2, the computed rate
becomes twice the actual output.
Read CMN_PLL_REFCLK_DIV and divide the parent rate by this value before
applying the 2 * FACTOR scaling. This yields the correct rate calculation:
rate = (parent_rate / ref_div) * 2 * factor.
Maintain backward compatibility with earlier platforms (e.g. IPQ9574,
IPQ5424, IPQ5018) that use ref_div = 1.
Fixes: f81715a4c87c ("clk: qcom: Add CMN PLL clock controller driver for IPQ SoC")
Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
---
drivers/clk/qcom/ipq-cmn-pll.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/ipq-cmn-pll.c b/drivers/clk/qcom/ipq-cmn-pll.c
index dafbf5732048..c6180116e1fc 100644
--- a/drivers/clk/qcom/ipq-cmn-pll.c
+++ b/drivers/clk/qcom/ipq-cmn-pll.c
@@ -185,7 +185,7 @@ static unsigned long clk_cmn_pll_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{
struct clk_cmn_pll *cmn_pll = to_clk_cmn_pll(hw);
- u32 val, factor;
+ u32 val, factor, ref_div;
/*
* The value of CMN_PLL_DIVIDER_CTRL_FACTOR is automatically adjusted
@@ -193,8 +193,15 @@ static unsigned long clk_cmn_pll_recalc_rate(struct clk_hw *hw,
*/
regmap_read(cmn_pll->regmap, CMN_PLL_DIVIDER_CTRL, &val);
factor = FIELD_GET(CMN_PLL_DIVIDER_CTRL_FACTOR, val);
+ if (unlikely(factor == 0))
+ factor = 1;
- return parent_rate * 2 * factor;
+ regmap_read(cmn_pll->regmap, CMN_PLL_REFCLK_CONFIG, &val);
+ ref_div = FIELD_GET(CMN_PLL_REFCLK_DIV, val);
+ if (unlikely(ref_div == 0))
+ ref_div = 1;
+
+ return div_u64((u64)parent_rate * 2 * factor, ref_div);
}
static int clk_cmn_pll_determine_rate(struct clk_hw *hw,
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH 1/5] clk: qcom: cmnpll: Account for reference clock divider
2025-11-28 8:40 ` [PATCH 1/5] clk: qcom: cmnpll: Account for reference clock divider Luo Jie
@ 2025-11-28 11:38 ` Konrad Dybcio
2025-11-28 14:29 ` Jie Luo
0 siblings, 1 reply; 20+ messages in thread
From: Konrad Dybcio @ 2025-11-28 11:38 UTC (permalink / raw)
To: Luo Jie, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 11/28/25 9:40 AM, Luo Jie wrote:
> The clk_cmn_pll_recalc_rate() function must account for the reference clock
> divider programmed in CMN_PLL_REFCLK_CONFIG. Without this fix, platforms
> with a reference divider other than 1 calculate incorrect CMN PLL rates.
> For example, on IPQ5332 where the reference divider is 2, the computed rate
> becomes twice the actual output.
>
> Read CMN_PLL_REFCLK_DIV and divide the parent rate by this value before
> applying the 2 * FACTOR scaling. This yields the correct rate calculation:
> rate = (parent_rate / ref_div) * 2 * factor.
>
> Maintain backward compatibility with earlier platforms (e.g. IPQ9574,
> IPQ5424, IPQ5018) that use ref_div = 1.
I'm not sure how to interpret this. Is the value fixed on these platforms
you mentioned, and always shows up as 0?
Konrad
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/5] clk: qcom: cmnpll: Account for reference clock divider
2025-11-28 11:38 ` Konrad Dybcio
@ 2025-11-28 14:29 ` Jie Luo
2025-12-01 13:42 ` Konrad Dybcio
0 siblings, 1 reply; 20+ messages in thread
From: Jie Luo @ 2025-11-28 14:29 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 11/28/2025 7:38 PM, Konrad Dybcio wrote:
> On 11/28/25 9:40 AM, Luo Jie wrote:
>> The clk_cmn_pll_recalc_rate() function must account for the reference clock
>> divider programmed in CMN_PLL_REFCLK_CONFIG. Without this fix, platforms
>> with a reference divider other than 1 calculate incorrect CMN PLL rates.
>> For example, on IPQ5332 where the reference divider is 2, the computed rate
>> becomes twice the actual output.
>>
>> Read CMN_PLL_REFCLK_DIV and divide the parent rate by this value before
>> applying the 2 * FACTOR scaling. This yields the correct rate calculation:
>> rate = (parent_rate / ref_div) * 2 * factor.
>>
>> Maintain backward compatibility with earlier platforms (e.g. IPQ9574,
>> IPQ5424, IPQ5018) that use ref_div = 1.
>
> I'm not sure how to interpret this. Is the value fixed on these platforms
> you mentioned, and always shows up as 0?
>
> Konrad
On these platforms the hardware ref_div register comes up with a value
of 1 by default. It is, however, still a programmable field and not
strictly fixed to 1.
The ref_div == 0 check in this patch is only meant as a safety net to
avoid a divide‑by‑zero in the rate calculation.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/5] clk: qcom: cmnpll: Account for reference clock divider
2025-11-28 14:29 ` Jie Luo
@ 2025-12-01 13:42 ` Konrad Dybcio
2025-12-04 7:44 ` Jie Luo
0 siblings, 1 reply; 20+ messages in thread
From: Konrad Dybcio @ 2025-12-01 13:42 UTC (permalink / raw)
To: Jie Luo, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 11/28/25 3:29 PM, Jie Luo wrote:
>
>
> On 11/28/2025 7:38 PM, Konrad Dybcio wrote:
>> On 11/28/25 9:40 AM, Luo Jie wrote:
>>> The clk_cmn_pll_recalc_rate() function must account for the reference clock
>>> divider programmed in CMN_PLL_REFCLK_CONFIG. Without this fix, platforms
>>> with a reference divider other than 1 calculate incorrect CMN PLL rates.
>>> For example, on IPQ5332 where the reference divider is 2, the computed rate
>>> becomes twice the actual output.
>>>
>>> Read CMN_PLL_REFCLK_DIV and divide the parent rate by this value before
>>> applying the 2 * FACTOR scaling. This yields the correct rate calculation:
>>> rate = (parent_rate / ref_div) * 2 * factor.
>>>
>>> Maintain backward compatibility with earlier platforms (e.g. IPQ9574,
>>> IPQ5424, IPQ5018) that use ref_div = 1.
>>
>> I'm not sure how to interpret this. Is the value fixed on these platforms
>> you mentioned, and always shows up as 0?
>>
>> Konrad
>
> On these platforms the hardware ref_div register comes up with a value
> of 1 by default. It is, however, still a programmable field and not
> strictly fixed to 1.
>
> The ref_div == 0 check in this patch is only meant as a safety net to
> avoid a divide‑by‑zero in the rate calculation.
I think some sort of a warning/bugsplat would be good to have here,
however I see that clk-rcg2.c : clk_gfx3d_determine_rate() apparently
also silently fixes up a div0..
Konrad
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/5] clk: qcom: cmnpll: Account for reference clock divider
2025-12-01 13:42 ` Konrad Dybcio
@ 2025-12-04 7:44 ` Jie Luo
2025-12-04 10:16 ` Konrad Dybcio
0 siblings, 1 reply; 20+ messages in thread
From: Jie Luo @ 2025-12-04 7:44 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 12/1/2025 9:42 PM, Konrad Dybcio wrote:
> On 11/28/25 3:29 PM, Jie Luo wrote:
>>
>>
>> On 11/28/2025 7:38 PM, Konrad Dybcio wrote:
>>> On 11/28/25 9:40 AM, Luo Jie wrote:
>>>> The clk_cmn_pll_recalc_rate() function must account for the reference clock
>>>> divider programmed in CMN_PLL_REFCLK_CONFIG. Without this fix, platforms
>>>> with a reference divider other than 1 calculate incorrect CMN PLL rates.
>>>> For example, on IPQ5332 where the reference divider is 2, the computed rate
>>>> becomes twice the actual output.
>>>>
>>>> Read CMN_PLL_REFCLK_DIV and divide the parent rate by this value before
>>>> applying the 2 * FACTOR scaling. This yields the correct rate calculation:
>>>> rate = (parent_rate / ref_div) * 2 * factor.
>>>>
>>>> Maintain backward compatibility with earlier platforms (e.g. IPQ9574,
>>>> IPQ5424, IPQ5018) that use ref_div = 1.
>>>
>>> I'm not sure how to interpret this. Is the value fixed on these platforms
>>> you mentioned, and always shows up as 0?
>>>
>>> Konrad
>>
>> On these platforms the hardware ref_div register comes up with a value
>> of 1 by default. It is, however, still a programmable field and not
>> strictly fixed to 1.
>>
>> The ref_div == 0 check in this patch is only meant as a safety net to
>> avoid a divide‑by‑zero in the rate calculation.
>
> I think some sort of a warning/bugsplat would be good to have here,
> however I see that clk-rcg2.c : clk_gfx3d_determine_rate() apparently
> also silently fixes up a div0..
>
> Konrad
I agree it would be better to at least flag this as an invalid
configuration. I can update the code to emit a warning (e.g. WARN_ON
(!ref_div) while still clamping ref_div to a sane value to avoid
crashing in production. That way we preserve the safety net but also
get some visibility if this ever happens.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/5] clk: qcom: cmnpll: Account for reference clock divider
2025-12-04 7:44 ` Jie Luo
@ 2025-12-04 10:16 ` Konrad Dybcio
0 siblings, 0 replies; 20+ messages in thread
From: Konrad Dybcio @ 2025-12-04 10:16 UTC (permalink / raw)
To: Jie Luo, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 12/4/25 8:44 AM, Jie Luo wrote:
>
>
> On 12/1/2025 9:42 PM, Konrad Dybcio wrote:
>> On 11/28/25 3:29 PM, Jie Luo wrote:
>>>
>>>
>>> On 11/28/2025 7:38 PM, Konrad Dybcio wrote:
>>>> On 11/28/25 9:40 AM, Luo Jie wrote:
>>>>> The clk_cmn_pll_recalc_rate() function must account for the reference clock
>>>>> divider programmed in CMN_PLL_REFCLK_CONFIG. Without this fix, platforms
>>>>> with a reference divider other than 1 calculate incorrect CMN PLL rates.
>>>>> For example, on IPQ5332 where the reference divider is 2, the computed rate
>>>>> becomes twice the actual output.
>>>>>
>>>>> Read CMN_PLL_REFCLK_DIV and divide the parent rate by this value before
>>>>> applying the 2 * FACTOR scaling. This yields the correct rate calculation:
>>>>> rate = (parent_rate / ref_div) * 2 * factor.
>>>>>
>>>>> Maintain backward compatibility with earlier platforms (e.g. IPQ9574,
>>>>> IPQ5424, IPQ5018) that use ref_div = 1.
>>>>
>>>> I'm not sure how to interpret this. Is the value fixed on these platforms
>>>> you mentioned, and always shows up as 0?
>>>>
>>>> Konrad
>>>
>>> On these platforms the hardware ref_div register comes up with a value
>>> of 1 by default. It is, however, still a programmable field and not
>>> strictly fixed to 1.
>>>
>>> The ref_div == 0 check in this patch is only meant as a safety net to
>>> avoid a divide‑by‑zero in the rate calculation.
>>
>> I think some sort of a warning/bugsplat would be good to have here,
>> however I see that clk-rcg2.c : clk_gfx3d_determine_rate() apparently
>> also silently fixes up a div0..
>>
>> Konrad
>
> I agree it would be better to at least flag this as an invalid
> configuration. I can update the code to emit a warning (e.g. WARN_ON
> (!ref_div) while still clamping ref_div to a sane value to avoid
> crashing in production. That way we preserve the safety net but also
> get some visibility if this ever happens.
if (WARN_ON(div == 0))
sounds good!
Konrad
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 2/5] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5332 SoC
2025-11-28 8:40 [PATCH 0/5] Add CMN PLL clock controller support for IPQ5332 Luo Jie
2025-11-28 8:40 ` [PATCH 1/5] clk: qcom: cmnpll: Account for reference clock divider Luo Jie
@ 2025-11-28 8:40 ` Luo Jie
2025-11-28 9:18 ` Rob Herring (Arm)
2025-11-28 9:39 ` Krzysztof Kozlowski
2025-11-28 8:40 ` [PATCH 3/5] clk: qcom: cmnpll: Add IPQ5332 SoC support Luo Jie
` (2 subsequent siblings)
4 siblings, 2 replies; 20+ messages in thread
From: Luo Jie @ 2025-11-28 8:40 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Konrad Dybcio,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia, Luo Jie
Add device tree bindings for the CMN PLL block in IPQ5332 SoC, which shares
similarities with IPQ9574 but has different output clock frequencies.
Add a new header file to export CMN PLL output clock specifiers for IPQ5332
SoC.
Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
---
.../bindings/clock/qcom,ipq9574-cmn-pll.yaml | 1 +
include/dt-bindings/clock/qcom,ipq5332-cmn-pll.h | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,ipq9574-cmn-pll.yaml b/Documentation/devicetree/bindings/clock/qcom,ipq9574-cmn-pll.yaml
index 817d51135fbf..5bf29fcd8501 100644
--- a/Documentation/devicetree/bindings/clock/qcom,ipq9574-cmn-pll.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,ipq9574-cmn-pll.yaml
@@ -25,6 +25,7 @@ properties:
compatible:
enum:
- qcom,ipq5018-cmn-pll
+ - qcom,ipq5332-cmn-pll
- qcom,ipq5424-cmn-pll
- qcom,ipq9574-cmn-pll
diff --git a/include/dt-bindings/clock/qcom,ipq5332-cmn-pll.h b/include/dt-bindings/clock/qcom,ipq5332-cmn-pll.h
new file mode 100644
index 000000000000..172330e43669
--- /dev/null
+++ b/include/dt-bindings/clock/qcom,ipq5332-cmn-pll.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_IPQ5332_CMN_PLL_H
+#define _DT_BINDINGS_CLK_QCOM_IPQ5332_CMN_PLL_H
+
+/* CMN PLL core clock. */
+#define IPQ5332_CMN_PLL_CLK 0
+
+/* The output clocks from CMN PLL of IPQ5332. */
+#define IPQ5332_XO_24MHZ_CLK 1
+#define IPQ5332_SLEEP_32KHZ_CLK 2
+#define IPQ5332_PCS_31P25MHZ_CLK 3
+#define IPQ5332_NSS_300MHZ_CLK 4
+#define IPQ5332_PPE_200MHZ_CLK 5
+#define IPQ5332_ETH_50MHZ_CLK 6
+#endif
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH 2/5] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5332 SoC
2025-11-28 8:40 ` [PATCH 2/5] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5332 SoC Luo Jie
@ 2025-11-28 9:18 ` Rob Herring (Arm)
2025-11-28 9:39 ` Krzysztof Kozlowski
1 sibling, 0 replies; 20+ messages in thread
From: Rob Herring (Arm) @ 2025-11-28 9:18 UTC (permalink / raw)
To: Luo Jie
Cc: Konrad Dybcio, linux-clk, quic_kkumarcs, Konrad Dybcio,
Bjorn Andersson, Conor Dooley, Luo Jie, Stephen Boyd,
quic_linchen, quic_pavir, quic_leiwei, Michael Turquette,
devicetree, Krzysztof Kozlowski, linux-arm-msm, quic_suruchia,
linux-kernel
On Fri, 28 Nov 2025 00:40:12 -0800, Luo Jie wrote:
> Add device tree bindings for the CMN PLL block in IPQ5332 SoC, which shares
> similarities with IPQ9574 but has different output clock frequencies.
>
> Add a new header file to export CMN PLL output clock specifiers for IPQ5332
> SoC.
>
> Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
> ---
> .../bindings/clock/qcom,ipq9574-cmn-pll.yaml | 1 +
> include/dt-bindings/clock/qcom,ipq5332-cmn-pll.h | 19 +++++++++++++++++++
> 2 files changed, 20 insertions(+)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/thermal/thermal-zones.example.dtb: /example-0/soc/thermal-sensor@c263000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-zones.example.dtb: /example-0/soc/thermal-sensor@c263000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-zones.example.dtb: /example-0/soc/thermal-sensor@c265000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-zones.example.dtb: /example-0/soc/thermal-sensor@c265000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-sensor.example.dtb: /example-0/soc/thermal-sensor@c263000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-sensor.example.dtb: /example-0/soc/thermal-sensor@c263000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-sensor.example.dtb: /example-0/soc/thermal-sensor@c265000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-sensor.example.dtb: /example-0/soc/thermal-sensor@c265000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20251128-qcom_ipq5332_cmnpll-v1-2-55127ba85613@oss.qualcomm.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/5] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5332 SoC
2025-11-28 8:40 ` [PATCH 2/5] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5332 SoC Luo Jie
2025-11-28 9:18 ` Rob Herring (Arm)
@ 2025-11-28 9:39 ` Krzysztof Kozlowski
1 sibling, 0 replies; 20+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-28 9:39 UTC (permalink / raw)
To: Luo Jie, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Konrad Dybcio, Luo Jie, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 28/11/2025 09:40, Luo Jie wrote:
> Add device tree bindings for the CMN PLL block in IPQ5332 SoC, which shares
> similarities with IPQ9574 but has different output clock frequencies.
>
> Add a new header file to export CMN PLL output clock specifiers for IPQ5332
> SoC.
>
> Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
> ---
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 3/5] clk: qcom: cmnpll: Add IPQ5332 SoC support
2025-11-28 8:40 [PATCH 0/5] Add CMN PLL clock controller support for IPQ5332 Luo Jie
2025-11-28 8:40 ` [PATCH 1/5] clk: qcom: cmnpll: Account for reference clock divider Luo Jie
2025-11-28 8:40 ` [PATCH 2/5] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5332 SoC Luo Jie
@ 2025-11-28 8:40 ` Luo Jie
2025-12-01 13:52 ` Konrad Dybcio
2025-11-28 8:40 ` [PATCH 4/5] arm64: dts: ipq5332: Add CMN PLL node for networking hardware Luo Jie
2025-11-28 8:40 ` [PATCH 5/5] arm64: dts: qcom: Represent xo_board as fixed-factor clock on IPQ5332 Luo Jie
4 siblings, 1 reply; 20+ messages in thread
From: Luo Jie @ 2025-11-28 8:40 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Konrad Dybcio,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia, Luo Jie
The CMN PLL in IPQ5332 SoC produces different output clocks when compared
to IPQ9574. While most clock outputs match IPQ9574, the ethernet PHY/switch
(50 Mhz) and PPE clocks (200 Mhz) in IPQ5332 are different.
Add IPQ5332-specific clock definitions and of_device_id entry.
Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
---
drivers/clk/qcom/ipq-cmn-pll.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/ipq-cmn-pll.c b/drivers/clk/qcom/ipq-cmn-pll.c
index c6180116e1fc..08159b427f89 100644
--- a/drivers/clk/qcom/ipq-cmn-pll.c
+++ b/drivers/clk/qcom/ipq-cmn-pll.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * Copyright (c) 2024-2025 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/
/*
@@ -20,6 +20,11 @@
* and an output clock to NSS (network subsystem) at 300 MHZ. The other output
* clocks from CMN PLL on IPQ5424 are the same as IPQ9574.
*
+ * On the IPQ5332 SoC, the CMN PLL provides a single 50 MHZ clock output to
+ * the Ethernet PHY (or switch) via the UNIPHY (PCS). It also supplies a 200
+ * MHZ clock to the PPE. The remaining fixed-rate clocks to the GCC and PCS
+ * are the same as those in the IPQ9574 SoC.
+ *
* +---------+
* | GCC |
* +--+---+--+
@@ -51,6 +56,7 @@
#include <dt-bindings/clock/qcom,ipq-cmn-pll.h>
#include <dt-bindings/clock/qcom,ipq5018-cmn-pll.h>
+#include <dt-bindings/clock/qcom,ipq5332-cmn-pll.h>
#include <dt-bindings/clock/qcom,ipq5424-cmn-pll.h>
#define CMN_PLL_REFCLK_SRC_SELECTION 0x28
@@ -117,6 +123,16 @@ static const struct cmn_pll_fixed_output_clk ipq5018_output_clks[] = {
{ /* Sentinel */ }
};
+static const struct cmn_pll_fixed_output_clk ipq5332_output_clks[] = {
+ CLK_PLL_OUTPUT(IPQ5332_XO_24MHZ_CLK, "xo-24mhz", 24000000UL),
+ CLK_PLL_OUTPUT(IPQ5332_SLEEP_32KHZ_CLK, "sleep-32khz", 32000UL),
+ CLK_PLL_OUTPUT(IPQ5332_PCS_31P25MHZ_CLK, "pcs-31p25mhz", 31250000UL),
+ CLK_PLL_OUTPUT(IPQ5332_NSS_300MHZ_CLK, "nss-300mhz", 300000000UL),
+ CLK_PLL_OUTPUT(IPQ5332_PPE_200MHZ_CLK, "ppe-200mhz", 200000000UL),
+ CLK_PLL_OUTPUT(IPQ5332_ETH_50MHZ_CLK, "eth-50mhz", 50000000UL),
+ { /* Sentinel */ }
+};
+
static const struct cmn_pll_fixed_output_clk ipq5424_output_clks[] = {
CLK_PLL_OUTPUT(IPQ5424_XO_24MHZ_CLK, "xo-24mhz", 24000000UL),
CLK_PLL_OUTPUT(IPQ5424_SLEEP_32KHZ_CLK, "sleep-32khz", 32000UL),
@@ -454,6 +470,7 @@ static const struct dev_pm_ops ipq_cmn_pll_pm_ops = {
static const struct of_device_id ipq_cmn_pll_clk_ids[] = {
{ .compatible = "qcom,ipq5018-cmn-pll", .data = &ipq5018_output_clks },
+ { .compatible = "qcom,ipq5332-cmn-pll", .data = &ipq5332_output_clks },
{ .compatible = "qcom,ipq5424-cmn-pll", .data = &ipq5424_output_clks },
{ .compatible = "qcom,ipq9574-cmn-pll", .data = &ipq9574_output_clks },
{ }
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH 3/5] clk: qcom: cmnpll: Add IPQ5332 SoC support
2025-11-28 8:40 ` [PATCH 3/5] clk: qcom: cmnpll: Add IPQ5332 SoC support Luo Jie
@ 2025-12-01 13:52 ` Konrad Dybcio
2025-12-04 8:09 ` Jie Luo
0 siblings, 1 reply; 20+ messages in thread
From: Konrad Dybcio @ 2025-12-01 13:52 UTC (permalink / raw)
To: Luo Jie, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 11/28/25 9:40 AM, Luo Jie wrote:
> The CMN PLL in IPQ5332 SoC produces different output clocks when compared
> to IPQ9574. While most clock outputs match IPQ9574, the ethernet PHY/switch
> (50 Mhz) and PPE clocks (200 Mhz) in IPQ5332 are different.
>
> Add IPQ5332-specific clock definitions and of_device_id entry.
>
> Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
> ---
[...]
> +static const struct cmn_pll_fixed_output_clk ipq5332_output_clks[] = {
> + CLK_PLL_OUTPUT(IPQ5332_XO_24MHZ_CLK, "xo-24mhz", 24000000UL),
> + CLK_PLL_OUTPUT(IPQ5332_SLEEP_32KHZ_CLK, "sleep-32khz", 32000UL),
> + CLK_PLL_OUTPUT(IPQ5332_PCS_31P25MHZ_CLK, "pcs-31p25mhz", 31250000UL),
> + CLK_PLL_OUTPUT(IPQ5332_NSS_300MHZ_CLK, "nss-300mhz", 300000000UL),
> + CLK_PLL_OUTPUT(IPQ5332_PPE_200MHZ_CLK, "ppe-200mhz", 200000000UL),
> + CLK_PLL_OUTPUT(IPQ5332_ETH_50MHZ_CLK, "eth-50mhz", 50000000UL),
I can't really find the source for most of these, but I see that there's both
a 200 and a 300 MHz output to NSS
Konrad
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [PATCH 3/5] clk: qcom: cmnpll: Add IPQ5332 SoC support
2025-12-01 13:52 ` Konrad Dybcio
@ 2025-12-04 8:09 ` Jie Luo
2025-12-04 13:48 ` Konrad Dybcio
0 siblings, 1 reply; 20+ messages in thread
From: Jie Luo @ 2025-12-04 8:09 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 12/1/2025 9:52 PM, Konrad Dybcio wrote:
> On 11/28/25 9:40 AM, Luo Jie wrote:
>> The CMN PLL in IPQ5332 SoC produces different output clocks when compared
>> to IPQ9574. While most clock outputs match IPQ9574, the ethernet PHY/switch
>> (50 Mhz) and PPE clocks (200 Mhz) in IPQ5332 are different.
>>
>> Add IPQ5332-specific clock definitions and of_device_id entry.
>>
>> Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
>> ---
>
> [...]
>
>> +static const struct cmn_pll_fixed_output_clk ipq5332_output_clks[] = {
>> + CLK_PLL_OUTPUT(IPQ5332_XO_24MHZ_CLK, "xo-24mhz", 24000000UL),
>> + CLK_PLL_OUTPUT(IPQ5332_SLEEP_32KHZ_CLK, "sleep-32khz", 32000UL),
>> + CLK_PLL_OUTPUT(IPQ5332_PCS_31P25MHZ_CLK, "pcs-31p25mhz", 31250000UL),
>> + CLK_PLL_OUTPUT(IPQ5332_NSS_300MHZ_CLK, "nss-300mhz", 300000000UL),
>> + CLK_PLL_OUTPUT(IPQ5332_PPE_200MHZ_CLK, "ppe-200mhz", 200000000UL),
>> + CLK_PLL_OUTPUT(IPQ5332_ETH_50MHZ_CLK, "eth-50mhz", 50000000UL),
>
> I can't really find the source for most of these, but I see that there's both
> a 200 and a 300 MHz output to NSS
>
> Konrad
Both IPQ5332_XO_24MHZ_CLK and IPQ5332_SLEEP_32KHZ_CLK are intended to be
used as the input clocks to the GCC block. IPQ5332_PCS_31P25MHZ_CLK
provides the reference clock for the Ethernet PCS, and
IPQ5332_ETH_50MHZ_CLK is the source clock for the PCS PLL on IPQ5332.
On this platform the Ethernet clocking path is:
CMN PLL ETH 50 MHz output → PCS PLL (divider + gate) → attached PHY or
switch.
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [PATCH 3/5] clk: qcom: cmnpll: Add IPQ5332 SoC support
2025-12-04 8:09 ` Jie Luo
@ 2025-12-04 13:48 ` Konrad Dybcio
2025-12-05 12:11 ` Jie Luo
0 siblings, 1 reply; 20+ messages in thread
From: Konrad Dybcio @ 2025-12-04 13:48 UTC (permalink / raw)
To: Jie Luo, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 12/4/25 9:09 AM, Jie Luo wrote:
>
>
> On 12/1/2025 9:52 PM, Konrad Dybcio wrote:
>> On 11/28/25 9:40 AM, Luo Jie wrote:
>>> The CMN PLL in IPQ5332 SoC produces different output clocks when compared
>>> to IPQ9574. While most clock outputs match IPQ9574, the ethernet PHY/switch
>>> (50 Mhz) and PPE clocks (200 Mhz) in IPQ5332 are different.
>>>
>>> Add IPQ5332-specific clock definitions and of_device_id entry.
>>>
>>> Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
>>> ---
>>
>> [...]
>>
>>> +static const struct cmn_pll_fixed_output_clk ipq5332_output_clks[] = {
>>> + CLK_PLL_OUTPUT(IPQ5332_XO_24MHZ_CLK, "xo-24mhz", 24000000UL),
>>> + CLK_PLL_OUTPUT(IPQ5332_SLEEP_32KHZ_CLK, "sleep-32khz", 32000UL),
>>> + CLK_PLL_OUTPUT(IPQ5332_PCS_31P25MHZ_CLK, "pcs-31p25mhz", 31250000UL),
>>> + CLK_PLL_OUTPUT(IPQ5332_NSS_300MHZ_CLK, "nss-300mhz", 300000000UL),
>>> + CLK_PLL_OUTPUT(IPQ5332_PPE_200MHZ_CLK, "ppe-200mhz", 200000000UL),
>>> + CLK_PLL_OUTPUT(IPQ5332_ETH_50MHZ_CLK, "eth-50mhz", 50000000UL),
>>
>> I can't really find the source for most of these, but I see that there's both
>> a 200 and a 300 MHz output to NSS
>>
>> Konrad
>
> Both IPQ5332_XO_24MHZ_CLK and IPQ5332_SLEEP_32KHZ_CLK are intended to be
> used as the input clocks to the GCC block. IPQ5332_PCS_31P25MHZ_CLK
> provides the reference clock for the Ethernet PCS, and
> IPQ5332_ETH_50MHZ_CLK is the source clock for the PCS PLL on IPQ5332.
> On this platform the Ethernet clocking path is:
> CMN PLL ETH 50 MHz output → PCS PLL (divider + gate) → attached PHY or
> switch.
What about that 200 MHz NSS output? Is it just renamed to PPE?
Konrad
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [PATCH 3/5] clk: qcom: cmnpll: Add IPQ5332 SoC support
2025-12-04 13:48 ` Konrad Dybcio
@ 2025-12-05 12:11 ` Jie Luo
0 siblings, 0 replies; 20+ messages in thread
From: Jie Luo @ 2025-12-05 12:11 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 12/4/2025 9:48 PM, Konrad Dybcio wrote:
> On 12/4/25 9:09 AM, Jie Luo wrote:
>>
>>
>> On 12/1/2025 9:52 PM, Konrad Dybcio wrote:
>>> On 11/28/25 9:40 AM, Luo Jie wrote:
>>>> The CMN PLL in IPQ5332 SoC produces different output clocks when compared
>>>> to IPQ9574. While most clock outputs match IPQ9574, the ethernet PHY/switch
>>>> (50 Mhz) and PPE clocks (200 Mhz) in IPQ5332 are different.
>>>>
>>>> Add IPQ5332-specific clock definitions and of_device_id entry.
>>>>
>>>> Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
>>>> ---
>>>
>>> [...]
>>>
>>>> +static const struct cmn_pll_fixed_output_clk ipq5332_output_clks[] = {
>>>> + CLK_PLL_OUTPUT(IPQ5332_XO_24MHZ_CLK, "xo-24mhz", 24000000UL),
>>>> + CLK_PLL_OUTPUT(IPQ5332_SLEEP_32KHZ_CLK, "sleep-32khz", 32000UL),
>>>> + CLK_PLL_OUTPUT(IPQ5332_PCS_31P25MHZ_CLK, "pcs-31p25mhz", 31250000UL),
>>>> + CLK_PLL_OUTPUT(IPQ5332_NSS_300MHZ_CLK, "nss-300mhz", 300000000UL),
>>>> + CLK_PLL_OUTPUT(IPQ5332_PPE_200MHZ_CLK, "ppe-200mhz", 200000000UL),
>>>> + CLK_PLL_OUTPUT(IPQ5332_ETH_50MHZ_CLK, "eth-50mhz", 50000000UL),
>>>
>>> I can't really find the source for most of these, but I see that there's both
>>> a 200 and a 300 MHz output to NSS
>>>
>>> Konrad
>>
>> Both IPQ5332_XO_24MHZ_CLK and IPQ5332_SLEEP_32KHZ_CLK are intended to be
>> used as the input clocks to the GCC block. IPQ5332_PCS_31P25MHZ_CLK
>> provides the reference clock for the Ethernet PCS, and
>> IPQ5332_ETH_50MHZ_CLK is the source clock for the PCS PLL on IPQ5332.
>> On this platform the Ethernet clocking path is:
>> CMN PLL ETH 50 MHz output → PCS PLL (divider + gate) → attached PHY or
>> switch.
>
> What about that 200 MHz NSS output? Is it just renamed to PPE?
>
> Konrad
On the IPQ5332 platform, the PPE operates at 200 MHz.
IPQ5332_PPE_200MHZ_CLK is the 200 MHz reference clock for the Packet
Processing Engine (PPE), sourced via the NSS clock controller.
The IPQ5332_NSS_300MHZ_CLK refers to the 300 MHz clock that is supplied
to other NSS blocks, for example, crypto (EIP) block. This is also
sourced via the NSS clock controller.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 4/5] arm64: dts: ipq5332: Add CMN PLL node for networking hardware
2025-11-28 8:40 [PATCH 0/5] Add CMN PLL clock controller support for IPQ5332 Luo Jie
` (2 preceding siblings ...)
2025-11-28 8:40 ` [PATCH 3/5] clk: qcom: cmnpll: Add IPQ5332 SoC support Luo Jie
@ 2025-11-28 8:40 ` Luo Jie
2025-12-01 13:52 ` Konrad Dybcio
2025-11-28 8:40 ` [PATCH 5/5] arm64: dts: qcom: Represent xo_board as fixed-factor clock on IPQ5332 Luo Jie
4 siblings, 1 reply; 20+ messages in thread
From: Luo Jie @ 2025-11-28 8:40 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Konrad Dybcio,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia, Luo Jie
Add the CMN PLL node required for networking hardware operation on IPQ5332.
The CMN PLL core runs at 6 GHz on this platform, differing from others like
IPQ9574.
Configure the reference clock path where XO (48 MHz or 96 MHz) routes
through the WiFi block's multiplier/divider to provide a stable 48 MHz
reference to the CMN PLL.
.XO (48 MHZ or 96 MHZ)-->WiFi (multiplier/divider)--> 48 MHZ to CMN PLL.
Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi | 17 +++++++++++++++-
arch/arm64/boot/dts/qcom/ipq5332.dtsi | 26 +++++++++++++++++++++++-
2 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
index b37ae7749083..471024ee1ddd 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
@@ -2,7 +2,7 @@
/*
* IPQ5332 RDP board common device tree source
*
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/
/dts-v1/;
@@ -55,6 +55,17 @@ &blsp1_uart0 {
status = "okay";
};
+/*
+ * The bootstrap pins for the board select the XO clock frequency that
+ * supports 48 MHZ or 96 MHZ. This setting automatically enables the
+ * right dividers, to ensure the reference clock output from WiFi to
+ * the CMN PLL is 48 MHZ.
+ */
+&ref_48mhz_clk {
+ clock-div = <1>;
+ clock-mult = <1>;
+};
+
&sleep_clk {
clock-frequency = <32000>;
};
@@ -63,6 +74,10 @@ &xo_board {
clock-frequency = <24000000>;
};
+&xo_clk {
+ clock-frequency = <48000000>;
+};
+
/* PINCTRL */
&tlmm {
gpio_keys_default: gpio-keys-default-state {
diff --git a/arch/arm64/boot/dts/qcom/ipq5332.dtsi b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
index 45fc512a3bab..0707e053f35d 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
@@ -2,10 +2,11 @@
/*
* IPQ5332 device tree source
*
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/
#include <dt-bindings/clock/qcom,apss-ipq.h>
+#include <dt-bindings/clock/qcom,ipq5332-cmn-pll.h>
#include <dt-bindings/clock/qcom,ipq5332-gcc.h>
#include <dt-bindings/interconnect/qcom,ipq5332.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -16,6 +17,12 @@ / {
#size-cells = <2>;
clocks {
+ ref_48mhz_clk: ref-48mhz-clk {
+ compatible = "fixed-factor-clock";
+ clocks = <&xo_clk>;
+ #clock-cells = <0>;
+ };
+
sleep_clk: sleep-clk {
compatible = "fixed-clock";
#clock-cells = <0>;
@@ -25,6 +32,11 @@ xo_board: xo-board-clk {
compatible = "fixed-clock";
#clock-cells = <0>;
};
+
+ xo_clk: xo-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ };
};
cpus {
@@ -167,6 +179,18 @@ usbphy0: phy@7b000 {
status = "disabled";
};
+ cmn_pll: clock-controller@9b000 {
+ compatible = "qcom,ipq5332-cmn-pll";
+ reg = <0x0009b000 0x800>;
+ clocks = <&ref_48mhz_clk>,
+ <&gcc GCC_CMN_12GPLL_AHB_CLK>,
+ <&gcc GCC_CMN_12GPLL_SYS_CLK>;
+ clock-names = "ref", "ahb", "sys";
+ #clock-cells = <1>;
+ assigned-clocks = <&cmn_pll IPQ5332_CMN_PLL_CLK>;
+ assigned-clock-rates-u64 = /bits/ 64 <6000000000>;
+ };
+
qfprom: efuse@a4000 {
compatible = "qcom,ipq5332-qfprom", "qcom,qfprom";
reg = <0x000a4000 0x721>;
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH 4/5] arm64: dts: ipq5332: Add CMN PLL node for networking hardware
2025-11-28 8:40 ` [PATCH 4/5] arm64: dts: ipq5332: Add CMN PLL node for networking hardware Luo Jie
@ 2025-12-01 13:52 ` Konrad Dybcio
2025-12-04 7:46 ` Jie Luo
0 siblings, 1 reply; 20+ messages in thread
From: Konrad Dybcio @ 2025-12-01 13:52 UTC (permalink / raw)
To: Luo Jie, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 11/28/25 9:40 AM, Luo Jie wrote:
> Add the CMN PLL node required for networking hardware operation on IPQ5332.
> The CMN PLL core runs at 6 GHz on this platform, differing from others like
> IPQ9574.
>
> Configure the reference clock path where XO (48 MHz or 96 MHz) routes
> through the WiFi block's multiplier/divider to provide a stable 48 MHz
> reference to the CMN PLL.
> .XO (48 MHZ or 96 MHZ)-->WiFi (multiplier/divider)--> 48 MHZ to CMN PLL.
>
> Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
> ---
[...]
> + cmn_pll: clock-controller@9b000 {
> + compatible = "qcom,ipq5332-cmn-pll";
> + reg = <0x0009b000 0x800>;
> + clocks = <&ref_48mhz_clk>,
> + <&gcc GCC_CMN_12GPLL_AHB_CLK>,
> + <&gcc GCC_CMN_12GPLL_SYS_CLK>;
> + clock-names = "ref", "ahb", "sys";
1 a line, please
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [PATCH 4/5] arm64: dts: ipq5332: Add CMN PLL node for networking hardware
2025-12-01 13:52 ` Konrad Dybcio
@ 2025-12-04 7:46 ` Jie Luo
0 siblings, 0 replies; 20+ messages in thread
From: Jie Luo @ 2025-12-04 7:46 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 12/1/2025 9:52 PM, Konrad Dybcio wrote:
> On 11/28/25 9:40 AM, Luo Jie wrote:
>> Add the CMN PLL node required for networking hardware operation on IPQ5332.
>> The CMN PLL core runs at 6 GHz on this platform, differing from others like
>> IPQ9574.
>>
>> Configure the reference clock path where XO (48 MHz or 96 MHz) routes
>> through the WiFi block's multiplier/divider to provide a stable 48 MHz
>> reference to the CMN PLL.
>> .XO (48 MHZ or 96 MHZ)-->WiFi (multiplier/divider)--> 48 MHZ to CMN PLL.
>>
>> Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
>> ---
>
> [...]
>
>> + cmn_pll: clock-controller@9b000 {
>> + compatible = "qcom,ipq5332-cmn-pll";
>> + reg = <0x0009b000 0x800>;
>> + clocks = <&ref_48mhz_clk>,
>> + <&gcc GCC_CMN_12GPLL_AHB_CLK>,
>> + <&gcc GCC_CMN_12GPLL_SYS_CLK>;
>> + clock-names = "ref", "ahb", "sys";
>
> 1 a line, please
OK, Will update, thanks.>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> Konrad
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 5/5] arm64: dts: qcom: Represent xo_board as fixed-factor clock on IPQ5332
2025-11-28 8:40 [PATCH 0/5] Add CMN PLL clock controller support for IPQ5332 Luo Jie
` (3 preceding siblings ...)
2025-11-28 8:40 ` [PATCH 4/5] arm64: dts: ipq5332: Add CMN PLL node for networking hardware Luo Jie
@ 2025-11-28 8:40 ` Luo Jie
2025-12-01 13:53 ` Konrad Dybcio
4 siblings, 1 reply; 20+ messages in thread
From: Luo Jie @ 2025-11-28 8:40 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Konrad Dybcio,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia, Luo Jie
The xo_board clock is derived from the 48 MHz WiFi output clock (divided
by 2), and not a standalone fixed frequency source.
The previous implementation incorrectly modelled it as a fixed-clock with
fixed frequency, which doesn't reflect the actual hardware clock tree.
Update for fixed-factor-clock compatibility, and properly reference the
source clock.
Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi | 7 ++++++-
arch/arm64/boot/dts/qcom/ipq5332.dtsi | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
index 471024ee1ddd..e1346098ab0e 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi
@@ -70,8 +70,13 @@ &sleep_clk {
clock-frequency = <32000>;
};
+/*
+ * The frequency of xo_board is fixed to 24 MHZ, which is routed
+ * from WiFi output clock 48 MHZ divided by 2.
+ */
&xo_board {
- clock-frequency = <24000000>;
+ clock-div = <2>;
+ clock-mult = <1>;
};
&xo_clk {
diff --git a/arch/arm64/boot/dts/qcom/ipq5332.dtsi b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
index 0707e053f35d..9e30be3930d8 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
@@ -29,7 +29,8 @@ sleep_clk: sleep-clk {
};
xo_board: xo-board-clk {
- compatible = "fixed-clock";
+ compatible = "fixed-factor-clock";
+ clocks = <&ref_48mhz_clk>;
#clock-cells = <0>;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH 5/5] arm64: dts: qcom: Represent xo_board as fixed-factor clock on IPQ5332
2025-11-28 8:40 ` [PATCH 5/5] arm64: dts: qcom: Represent xo_board as fixed-factor clock on IPQ5332 Luo Jie
@ 2025-12-01 13:53 ` Konrad Dybcio
0 siblings, 0 replies; 20+ messages in thread
From: Konrad Dybcio @ 2025-12-01 13:53 UTC (permalink / raw)
To: Luo Jie, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Luo Jie, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, devicetree, quic_kkumarcs,
quic_linchen, quic_leiwei, quic_pavir, quic_suruchia
On 11/28/25 9:40 AM, Luo Jie wrote:
> The xo_board clock is derived from the 48 MHz WiFi output clock (divided
> by 2), and not a standalone fixed frequency source.
>
> The previous implementation incorrectly modelled it as a fixed-clock with
> fixed frequency, which doesn't reflect the actual hardware clock tree.
> Update for fixed-factor-clock compatibility, and properly reference the
> source clock.
>
> Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 20+ messages in thread