* [PATCH v2 0/4] Add CMN PLL clock controller support for IPQ5424
@ 2025-04-11 12:58 Luo Jie
2025-04-11 12:58 ` [PATCH v2 1/4] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5424 SoC Luo Jie
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Luo Jie @ 2025-04-11 12:58 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, quic_kkumarcs,
quic_suruchia, quic_pavir, quic_linchen, quic_leiwei, Luo Jie,
Konrad Dybcio
The CMN PLL block of IPQ5424 is almost same as that of IPQ9574
which is currently supported by the driver. The only difference
is that the fixed output clocks to NSS and PPE from CMN PLL have
a different clock rate. In IPQ5424, the output clocks are supplied
to NSS at 300 MHZ and to PPE at 375 MHZ.
This patch series extends the CMN PLL driver to support IPQ5424.
It also adds the SoC specific header file to export the CMN PLL
output clock specifiers for IPQ5424. The new table of output
clocks is added for the CMN PLL of IPQ5424, which is acquired
from the device according to the compatible.
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
---
Changes in v2:
- Alphanumeric order for the compatible strings in dtbindings.
- Add the IPQ5424 SoC specific header file to export the clock specifiers.
- Drop the comma of the sentinel entry of the output clock array.
- Add Reviewed-by tag on the DTS patches.
- Link to v1: https://lore.kernel.org/r/20250321-qcom_ipq5424_cmnpll-v1-0-3ea8e5262da4@quicinc.com
---
Luo Jie (4):
dt-bindings: clock: qcom: Add CMN PLL support for IPQ5424 SoC
clk: qcom: cmnpll: Add IPQ5424 SoC support
arm64: dts: ipq5424: Add CMN PLL node
arm64: dts: qcom: Update IPQ5424 xo_board to use fixed factor clock
.../bindings/clock/qcom,ipq9574-cmn-pll.yaml | 1 +
arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 23 ++++++++++++--
arch/arm64/boot/dts/qcom/ipq5424.dtsi | 27 ++++++++++++++++-
drivers/clk/qcom/ipq-cmn-pll.c | 35 ++++++++++++++++++----
include/dt-bindings/clock/qcom,ipq5424-cmn-pll.h | 22 ++++++++++++++
5 files changed, 100 insertions(+), 8 deletions(-)
---
base-commit: 01c6df60d5d4ae00cd5c1648818744838bba7763
change-id: 20250411-qcom_ipq5424_cmnpll-960a8f597033
Best regards,
--
Luo Jie <quic_luoj@quicinc.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/4] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5424 SoC
2025-04-11 12:58 [PATCH v2 0/4] Add CMN PLL clock controller support for IPQ5424 Luo Jie
@ 2025-04-11 12:58 ` Luo Jie
2025-04-11 20:59 ` Rob Herring (Arm)
2025-04-11 12:58 ` [PATCH v2 2/4] clk: qcom: cmnpll: Add IPQ5424 SoC support Luo Jie
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Luo Jie @ 2025-04-11 12:58 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, quic_kkumarcs,
quic_suruchia, quic_pavir, quic_linchen, quic_leiwei, Luo Jie
The CMN PLL block in the IPQ5424 SoC takes 48 MHZ as the reference
input clock. The output clocks are the same as IPQ9574 SoC, except
for the clock rate of output clocks to PPE and NSS.
Also, add the new header file to export the CMN PLL output clock
specifiers for IPQ5424 SoC.
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
---
.../bindings/clock/qcom,ipq9574-cmn-pll.yaml | 1 +
include/dt-bindings/clock/qcom,ipq5424-cmn-pll.h | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,ipq9574-cmn-pll.yaml b/Documentation/devicetree/bindings/clock/qcom,ipq9574-cmn-pll.yaml
index f869b3739be8..cb6e09f4247f 100644
--- a/Documentation/devicetree/bindings/clock/qcom,ipq9574-cmn-pll.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,ipq9574-cmn-pll.yaml
@@ -24,6 +24,7 @@ description:
properties:
compatible:
enum:
+ - qcom,ipq5424-cmn-pll
- qcom,ipq9574-cmn-pll
reg:
diff --git a/include/dt-bindings/clock/qcom,ipq5424-cmn-pll.h b/include/dt-bindings/clock/qcom,ipq5424-cmn-pll.h
new file mode 100644
index 000000000000..f643c2668c04
--- /dev/null
+++ b/include/dt-bindings/clock/qcom,ipq5424-cmn-pll.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_IPQ5424_CMN_PLL_H
+#define _DT_BINDINGS_CLK_QCOM_IPQ5424_CMN_PLL_H
+
+/* CMN PLL core clock. */
+#define IPQ5424_CMN_PLL_CLK 0
+
+/* The output clocks from CMN PLL of IPQ5424. */
+#define IPQ5424_XO_24MHZ_CLK 1
+#define IPQ5424_SLEEP_32KHZ_CLK 2
+#define IPQ5424_PCS_31P25MHZ_CLK 3
+#define IPQ5424_NSS_300MHZ_CLK 4
+#define IPQ5424_PPE_375MHZ_CLK 5
+#define IPQ5424_ETH0_50MHZ_CLK 6
+#define IPQ5424_ETH1_50MHZ_CLK 7
+#define IPQ5424_ETH2_50MHZ_CLK 8
+#define IPQ5424_ETH_25MHZ_CLK 9
+#endif
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/4] clk: qcom: cmnpll: Add IPQ5424 SoC support
2025-04-11 12:58 [PATCH v2 0/4] Add CMN PLL clock controller support for IPQ5424 Luo Jie
2025-04-11 12:58 ` [PATCH v2 1/4] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5424 SoC Luo Jie
@ 2025-04-11 12:58 ` Luo Jie
2025-04-29 5:29 ` Jie Luo
2025-04-29 19:58 ` Stephen Boyd
2025-04-11 12:58 ` [PATCH v2 3/4] arm64: dts: ipq5424: Add CMN PLL node Luo Jie
2025-04-11 12:58 ` [PATCH v2 4/4] arm64: dts: qcom: Update IPQ5424 xo_board to use fixed factor clock Luo Jie
3 siblings, 2 replies; 8+ messages in thread
From: Luo Jie @ 2025-04-11 12:58 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, quic_kkumarcs,
quic_suruchia, quic_pavir, quic_linchen, quic_leiwei, Luo Jie
The CMN PLL in IPQ5424 SoC supplies the fixed clock to NSS at 300 MHZ
and to PPE at 375 MHZ. Other output clocks from CMN PLL on this SoC,
and their rates are same as IPQ9574.
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
---
drivers/clk/qcom/ipq-cmn-pll.c | 35 ++++++++++++++++++++++++++++++-----
1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/qcom/ipq-cmn-pll.c b/drivers/clk/qcom/ipq-cmn-pll.c
index 432d4c4b7aa6..b34d6faf67b8 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 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2024-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
/*
@@ -16,6 +16,10 @@
* are supplied to GCC (24 MHZ as XO and 32 KHZ as sleep clock), and to PCS
* with 31.25 MHZ.
*
+ * On the IPQ5424 SoC, there is an output clock from CMN PLL to PPE at 375 MHZ,
+ * 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.
+ *
* +---------+
* | GCC |
* +--+---+--+
@@ -46,6 +50,7 @@
#include <linux/regmap.h>
#include <dt-bindings/clock/qcom,ipq-cmn-pll.h>
+#include <dt-bindings/clock/qcom,ipq5424-cmn-pll.h>
#define CMN_PLL_REFCLK_SRC_SELECTION 0x28
#define CMN_PLL_REFCLK_SRC_DIV GENMASK(9, 8)
@@ -115,6 +120,20 @@ static const struct cmn_pll_fixed_output_clk ipq9574_output_clks[] = {
CLK_PLL_OUTPUT(ETH1_50MHZ_CLK, "eth1-50mhz", 50000000UL),
CLK_PLL_OUTPUT(ETH2_50MHZ_CLK, "eth2-50mhz", 50000000UL),
CLK_PLL_OUTPUT(ETH_25MHZ_CLK, "eth-25mhz", 25000000UL),
+ { /* 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),
+ CLK_PLL_OUTPUT(IPQ5424_PCS_31P25MHZ_CLK, "pcs-31p25mhz", 31250000UL),
+ CLK_PLL_OUTPUT(IPQ5424_NSS_300MHZ_CLK, "nss-300mhz", 300000000UL),
+ CLK_PLL_OUTPUT(IPQ5424_PPE_375MHZ_CLK, "ppe-375mhz", 375000000UL),
+ CLK_PLL_OUTPUT(IPQ5424_ETH0_50MHZ_CLK, "eth0-50mhz", 50000000UL),
+ CLK_PLL_OUTPUT(IPQ5424_ETH1_50MHZ_CLK, "eth1-50mhz", 50000000UL),
+ CLK_PLL_OUTPUT(IPQ5424_ETH2_50MHZ_CLK, "eth2-50mhz", 50000000UL),
+ CLK_PLL_OUTPUT(IPQ5424_ETH_25MHZ_CLK, "eth-25mhz", 25000000UL),
+ { /* Sentinel */ }
};
/*
@@ -297,7 +316,7 @@ static struct clk_hw *ipq_cmn_pll_clk_hw_register(struct platform_device *pdev)
static int ipq_cmn_pll_register_clks(struct platform_device *pdev)
{
- const struct cmn_pll_fixed_output_clk *fixed_clk;
+ const struct cmn_pll_fixed_output_clk *p, *fixed_clk;
struct clk_hw_onecell_data *hw_data;
struct device *dev = &pdev->dev;
struct clk_hw *cmn_pll_hw;
@@ -305,8 +324,13 @@ static int ipq_cmn_pll_register_clks(struct platform_device *pdev)
struct clk_hw *hw;
int ret, i;
- fixed_clk = ipq9574_output_clks;
- num_clks = ARRAY_SIZE(ipq9574_output_clks);
+ fixed_clk = device_get_match_data(dev);
+ if (!fixed_clk)
+ return -EINVAL;
+
+ num_clks = 0;
+ for (p = fixed_clk; p->name; p++)
+ num_clks++;
hw_data = devm_kzalloc(dev, struct_size(hw_data, hws, num_clks + 1),
GFP_KERNEL);
@@ -415,7 +439,8 @@ static const struct dev_pm_ops ipq_cmn_pll_pm_ops = {
};
static const struct of_device_id ipq_cmn_pll_clk_ids[] = {
- { .compatible = "qcom,ipq9574-cmn-pll", },
+ { .compatible = "qcom,ipq9574-cmn-pll", .data = &ipq9574_output_clks },
+ { .compatible = "qcom,ipq5424-cmn-pll", .data = &ipq5424_output_clks },
{ }
};
MODULE_DEVICE_TABLE(of, ipq_cmn_pll_clk_ids);
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/4] arm64: dts: ipq5424: Add CMN PLL node
2025-04-11 12:58 [PATCH v2 0/4] Add CMN PLL clock controller support for IPQ5424 Luo Jie
2025-04-11 12:58 ` [PATCH v2 1/4] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5424 SoC Luo Jie
2025-04-11 12:58 ` [PATCH v2 2/4] clk: qcom: cmnpll: Add IPQ5424 SoC support Luo Jie
@ 2025-04-11 12:58 ` Luo Jie
2025-04-11 12:58 ` [PATCH v2 4/4] arm64: dts: qcom: Update IPQ5424 xo_board to use fixed factor clock Luo Jie
3 siblings, 0 replies; 8+ messages in thread
From: Luo Jie @ 2025-04-11 12:58 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, quic_kkumarcs,
quic_suruchia, quic_pavir, quic_linchen, quic_leiwei, Luo Jie,
Konrad Dybcio
Add CMN PLL node for enabling output clocks to the networking
hardware blocks on IPQ5424 devices.
The reference clock of CMN PLL is routed from XO to the CMN PLL
through the internal WiFi block.
.XO (48 MHZ or 96 MHZ or 192 MHZ)-->WiFi (multiplier/divider)-->
48 MHZ to CMN PLL.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
---
arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 16 +++++++++++++++-
arch/arm64/boot/dts/qcom/ipq5424.dtsi | 26 +++++++++++++++++++++++++-
2 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
index 0fd0ebe0251d..b4d1aa00c944 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
@@ -2,7 +2,7 @@
/*
* IPQ5424 RDP466 board device tree source
*
- * Copyright (c) 2024 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2024-2025 The Linux Foundation. All rights reserved.
*/
/dts-v1/;
@@ -213,7 +213,21 @@ &usb3 {
status = "okay";
};
+/*
+ * The bootstrap pins for the board select the XO clock frequency that
+ * supports 48 MHZ, 96 MHZ or 192 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>;
+};
+
&xo_board {
clock-frequency = <24000000>;
};
+&xo_clk {
+ clock-frequency = <48000000>;
+};
diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
index 5d6ed2172b1b..cd12e731c4ae 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
@@ -3,10 +3,11 @@
* IPQ5424 device tree source
*
* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/qcom,ipq5424-cmn-pll.h>
#include <dt-bindings/clock/qcom,ipq5424-gcc.h>
#include <dt-bindings/reset/qcom,ipq5424-gcc.h>
#include <dt-bindings/gpio/gpio.h>
@@ -17,6 +18,12 @@ / {
interrupt-parent = <&intc>;
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>;
@@ -26,6 +33,11 @@ xo_board: xo-board-clk {
compatible = "fixed-clock";
#clock-cells = <0>;
};
+
+ xo_clk: xo-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ };
};
cpus: cpus {
@@ -157,6 +169,18 @@ soc@0 {
#size-cells = <2>;
ranges = <0 0 0 0 0x10 0>;
+ cmn_pll: clock-controller@9b000 {
+ compatible = "qcom,ipq5424-cmn-pll";
+ reg = <0 0x0009b000 0 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 IPQ5424_CMN_PLL_CLK>;
+ assigned-clock-rates-u64 = /bits/ 64 <12000000000>;
+ };
+
efuse@a4000 {
compatible = "qcom,ipq5424-qfprom", "qcom,qfprom";
reg = <0 0x000a4000 0 0x741>;
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 4/4] arm64: dts: qcom: Update IPQ5424 xo_board to use fixed factor clock
2025-04-11 12:58 [PATCH v2 0/4] Add CMN PLL clock controller support for IPQ5424 Luo Jie
` (2 preceding siblings ...)
2025-04-11 12:58 ` [PATCH v2 3/4] arm64: dts: ipq5424: Add CMN PLL node Luo Jie
@ 2025-04-11 12:58 ` Luo Jie
3 siblings, 0 replies; 8+ messages in thread
From: Luo Jie @ 2025-04-11 12:58 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, quic_kkumarcs,
quic_suruchia, quic_pavir, quic_linchen, quic_leiwei, Luo Jie,
Konrad Dybcio
xo_board is fixed to 24 MHZ, which is routed from WiFi output clock
48 MHZ (also being the reference clock of CMN PLL) divided 2 by
analog block routing channel.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
---
arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 7 ++++++-
arch/arm64/boot/dts/qcom/ipq5424.dtsi | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
index b4d1aa00c944..e503b6677a3e 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
@@ -224,8 +224,13 @@ &ref_48mhz_clk {
clock-mult = <1>;
};
+/*
+ * 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/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
index cd12e731c4ae..ae1b587211cb 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
@@ -30,7 +30,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.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5424 SoC
2025-04-11 12:58 ` [PATCH v2 1/4] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5424 SoC Luo Jie
@ 2025-04-11 20:59 ` Rob Herring (Arm)
0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring (Arm) @ 2025-04-11 20:59 UTC (permalink / raw)
To: Luo Jie
Cc: devicetree, Conor Dooley, quic_kkumarcs, linux-clk, quic_suruchia,
Michael Turquette, linux-arm-msm, Bjorn Andersson, linux-kernel,
Krzysztof Kozlowski, quic_linchen, quic_leiwei, Konrad Dybcio,
quic_pavir, Stephen Boyd
On Fri, 11 Apr 2025 20:58:10 +0800, Luo Jie wrote:
> The CMN PLL block in the IPQ5424 SoC takes 48 MHZ as the reference
> input clock. The output clocks are the same as IPQ9574 SoC, except
> for the clock rate of output clocks to PPE and NSS.
>
> Also, add the new header file to export the CMN PLL output clock
> specifiers for IPQ5424 SoC.
>
> Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
> ---
> .../bindings/clock/qcom,ipq9574-cmn-pll.yaml | 1 +
> include/dt-bindings/clock/qcom,ipq5424-cmn-pll.h | 22 ++++++++++++++++++++++
> 2 files changed, 23 insertions(+)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/4] clk: qcom: cmnpll: Add IPQ5424 SoC support
2025-04-11 12:58 ` [PATCH v2 2/4] clk: qcom: cmnpll: Add IPQ5424 SoC support Luo Jie
@ 2025-04-29 5:29 ` Jie Luo
2025-04-29 19:58 ` Stephen Boyd
1 sibling, 0 replies; 8+ messages in thread
From: Jie Luo @ 2025-04-29 5:29 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, quic_kkumarcs,
quic_suruchia, quic_pavir, quic_linchen, quic_leiwei
Hello Stephen,
Thanks for your review on the first version of this patch series.
Gentle reminder, to re-review the updated patch for any further
comments.
Regards.
On 4/11/2025 8:58 PM, Luo Jie wrote:
> The CMN PLL in IPQ5424 SoC supplies the fixed clock to NSS at 300 MHZ
> and to PPE at 375 MHZ. Other output clocks from CMN PLL on this SoC,
> and their rates are same as IPQ9574.
>
> Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
> ---
> drivers/clk/qcom/ipq-cmn-pll.c | 35 ++++++++++++++++++++++++++++++-----
> 1 file changed, 30 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/clk/qcom/ipq-cmn-pll.c b/drivers/clk/qcom/ipq-cmn-pll.c
> index 432d4c4b7aa6..b34d6faf67b8 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 Qualcomm Innovation Center, Inc. All rights reserved.
> + * Copyright (c) 2024-2025 Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> /*
> @@ -16,6 +16,10 @@
> * are supplied to GCC (24 MHZ as XO and 32 KHZ as sleep clock), and to PCS
> * with 31.25 MHZ.
> *
> + * On the IPQ5424 SoC, there is an output clock from CMN PLL to PPE at 375 MHZ,
> + * 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.
> + *
> * +---------+
> * | GCC |
> * +--+---+--+
> @@ -46,6 +50,7 @@
> #include <linux/regmap.h>
>
> #include <dt-bindings/clock/qcom,ipq-cmn-pll.h>
> +#include <dt-bindings/clock/qcom,ipq5424-cmn-pll.h>
>
> #define CMN_PLL_REFCLK_SRC_SELECTION 0x28
> #define CMN_PLL_REFCLK_SRC_DIV GENMASK(9, 8)
> @@ -115,6 +120,20 @@ static const struct cmn_pll_fixed_output_clk ipq9574_output_clks[] = {
> CLK_PLL_OUTPUT(ETH1_50MHZ_CLK, "eth1-50mhz", 50000000UL),
> CLK_PLL_OUTPUT(ETH2_50MHZ_CLK, "eth2-50mhz", 50000000UL),
> CLK_PLL_OUTPUT(ETH_25MHZ_CLK, "eth-25mhz", 25000000UL),
> + { /* 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),
> + CLK_PLL_OUTPUT(IPQ5424_PCS_31P25MHZ_CLK, "pcs-31p25mhz", 31250000UL),
> + CLK_PLL_OUTPUT(IPQ5424_NSS_300MHZ_CLK, "nss-300mhz", 300000000UL),
> + CLK_PLL_OUTPUT(IPQ5424_PPE_375MHZ_CLK, "ppe-375mhz", 375000000UL),
> + CLK_PLL_OUTPUT(IPQ5424_ETH0_50MHZ_CLK, "eth0-50mhz", 50000000UL),
> + CLK_PLL_OUTPUT(IPQ5424_ETH1_50MHZ_CLK, "eth1-50mhz", 50000000UL),
> + CLK_PLL_OUTPUT(IPQ5424_ETH2_50MHZ_CLK, "eth2-50mhz", 50000000UL),
> + CLK_PLL_OUTPUT(IPQ5424_ETH_25MHZ_CLK, "eth-25mhz", 25000000UL),
> + { /* Sentinel */ }
> };
>
> /*
> @@ -297,7 +316,7 @@ static struct clk_hw *ipq_cmn_pll_clk_hw_register(struct platform_device *pdev)
>
> static int ipq_cmn_pll_register_clks(struct platform_device *pdev)
> {
> - const struct cmn_pll_fixed_output_clk *fixed_clk;
> + const struct cmn_pll_fixed_output_clk *p, *fixed_clk;
> struct clk_hw_onecell_data *hw_data;
> struct device *dev = &pdev->dev;
> struct clk_hw *cmn_pll_hw;
> @@ -305,8 +324,13 @@ static int ipq_cmn_pll_register_clks(struct platform_device *pdev)
> struct clk_hw *hw;
> int ret, i;
>
> - fixed_clk = ipq9574_output_clks;
> - num_clks = ARRAY_SIZE(ipq9574_output_clks);
> + fixed_clk = device_get_match_data(dev);
> + if (!fixed_clk)
> + return -EINVAL;
> +
> + num_clks = 0;
> + for (p = fixed_clk; p->name; p++)
> + num_clks++;
>
> hw_data = devm_kzalloc(dev, struct_size(hw_data, hws, num_clks + 1),
> GFP_KERNEL);
> @@ -415,7 +439,8 @@ static const struct dev_pm_ops ipq_cmn_pll_pm_ops = {
> };
>
> static const struct of_device_id ipq_cmn_pll_clk_ids[] = {
> - { .compatible = "qcom,ipq9574-cmn-pll", },
> + { .compatible = "qcom,ipq9574-cmn-pll", .data = &ipq9574_output_clks },
> + { .compatible = "qcom,ipq5424-cmn-pll", .data = &ipq5424_output_clks },
> { }
> };
> MODULE_DEVICE_TABLE(of, ipq_cmn_pll_clk_ids);
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/4] clk: qcom: cmnpll: Add IPQ5424 SoC support
2025-04-11 12:58 ` [PATCH v2 2/4] clk: qcom: cmnpll: Add IPQ5424 SoC support Luo Jie
2025-04-29 5:29 ` Jie Luo
@ 2025-04-29 19:58 ` Stephen Boyd
1 sibling, 0 replies; 8+ messages in thread
From: Stephen Boyd @ 2025-04-29 19:58 UTC (permalink / raw)
To: Bjorn Andersson, Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski,
Luo Jie, Michael Turquette, Rob Herring
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, quic_kkumarcs,
quic_suruchia, quic_pavir, quic_linchen, quic_leiwei, Luo Jie
Quoting Luo Jie (2025-04-11 05:58:11)
> The CMN PLL in IPQ5424 SoC supplies the fixed clock to NSS at 300 MHZ
> and to PPE at 375 MHZ. Other output clocks from CMN PLL on this SoC,
> and their rates are same as IPQ9574.
>
> Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
> ---
Acked-by: Stephen Boyd <sboyd@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-04-29 19:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-11 12:58 [PATCH v2 0/4] Add CMN PLL clock controller support for IPQ5424 Luo Jie
2025-04-11 12:58 ` [PATCH v2 1/4] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5424 SoC Luo Jie
2025-04-11 20:59 ` Rob Herring (Arm)
2025-04-11 12:58 ` [PATCH v2 2/4] clk: qcom: cmnpll: Add IPQ5424 SoC support Luo Jie
2025-04-29 5:29 ` Jie Luo
2025-04-29 19:58 ` Stephen Boyd
2025-04-11 12:58 ` [PATCH v2 3/4] arm64: dts: ipq5424: Add CMN PLL node Luo Jie
2025-04-11 12:58 ` [PATCH v2 4/4] arm64: dts: qcom: Update IPQ5424 xo_board to use fixed factor clock Luo Jie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).