clk: qcom: ipq-cmn-pll: Correct IPQ8074 NSS NoC rate
Subsystems (5)
PATCH v2 1/4 clk: qcom: ipq-cmn-pll: Correct IPQ8074 NSS NoC rate
The IPQ8074 NSS NoC bias output feeds the GCC NSS NoC clock without a divider.
GCC and SSDK (Qualcomm vendor switch driver from SDK) both configure that clock for 461.5 MHz, while the CMN PLL driver reports its parent at 416.5 MHz.
Report the 461.5 MHz output rate so consumers see the correct rate.
---
Changes in v2:
- New patch to correct the IPQ8074 NSS NoC bias clock rate.
drivers/clk/qcom/ipq-cmn-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/ipq-cmn-pll.c +1 -1
@@ -237,7 +237,7 @@ static const struct cmn_pll_fixed_output_clk ipq6018_output_clks[] = {static const struct cmn_pll_fixed_output_clk ipq8074_output_clks[] = {CLK_PLL_OUTPUT (IPQ8074_BIAS_PLL_CC_CLK ,"bias_pll_cc_clk" ,300000000UL ), -CLK_PLL_OUTPUT (IPQ8074_BIAS_PLL_NSS_NOC_CLK ,"bias_pll_nss_noc_clk" ,416500000UL ), +CLK_PLL_OUTPUT (IPQ8074_BIAS_PLL_NSS_NOC_CLK ,"bias_pll_nss_noc_clk" ,461500000UL ), {/* Sentinel */ } };
Signature · 1 line
2.56.0
PATCH v2 2/4 dt-bindings: clocks: qcom,gcc-ipq8074: Allow CMN PLL bias clocks
CMN PLL in IPQ8074 provides 2 fixed clocks to the GCC clock controller. In order to describe this in DTS, allow passing them as the inputs to GCC.
This has a benefit that it avoids doing a global matching by name.
---
Changes in v2:
- Keep the existing four-clock form valid with minItems: 4.
- Drop the _clk suffix from the new GCC input names.
- Correct the NSS NoC bias clock description to 461.5 MHz.
.../devicetree/bindings/clock/qcom,gcc-ipq8074.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/clock/qcom,gcc-ipq8074.yaml +6 -0
@@ -24,18 +24,24 @@ properties: const: qcom,gcc-ipq8074 clocks: + minItems: 4 items: - description: board XO clock - description: sleep clock - description: Gen3 QMP PCIe PHY PIPE clock - description: Gen2 QMP PCIe PHY PIPE clock + - description: 300 MHz bias clock from CMN PLL + - description: 461.5 MHz NSS NoC bias clock from CMN PLL clock-names: + minItems: 4 items: - const: xo - const: sleep_clk - const: pcie0_pipe - const: pcie1_pipe + - const: bias_pll_cc + - const: bias_pll_nss_noc required: - compatible
Signature · 1 line
2.56.0
Re: [PATCH v2 2/4] dt-bindings: clocks: qcom,gcc-ipq8074: Allow CMN PLL bias clocks
Quoted 6 lines · Robert Marko
CMN PLL in IPQ8074 provides 2 fixed clocks to the GCC clock controller. In order to describe this in DTS, allow passing them as the inputs to GCC.
This has a benefit that it avoids doing a global matching by name.
Signed-off-by Robert Marko <[email protected]>
Quoted 8 lines
---
Changes in v2:
- Keep the existing four-clock form valid with minItems: 4.
- Drop the_clksuffix from the new GCC input names.
- Correct the NSS NoC bias clock description to 461.5 MHz..../devicetree/bindings/clock/qcom,gcc-ipq8074.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
Best regards,
Krzysztof
PATCH v2 3/4 clk: qcom: gcc-ipq8074: Align CMN PLL inputs with binding
In reply to Robert MarkoThe GCC binding names the CMN PLL inputs bias_pll_cc and bias_pll_nss_noc. Use those names as fw_name so GCC resolves the clocks through DT references.
Keep the existing .name values as fallbacks for older device trees without these optional inputs.
---
Changes in v2:
- New patch to align GCC parent lookups with the binding input names.
drivers/clk/qcom/gcc-ipq8074.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/clk/qcom/gcc-ipq8074.c +8 -8
@@ -1132,7 +1132,7 @@ static const struct freq_tbl ftbl_nss_noc_bfdcd_clk_src[] = {static const struct clk_parent_data gcc_xo_bias_pll_nss_noc_clk_gpll0_gpll2[] = { { .fw_name ="xo" , .name ="xo" }, - { .fw_name ="bias_pll_nss_noc_clk" , .name ="bias_pll_nss_noc_clk" }, + { .fw_name ="bias_pll_nss_noc" , .name ="bias_pll_nss_noc_clk" }, { .hw = &gpll0.clkr.hw }, { .hw = &gpll2.clkr.hw }, };
@@ -1357,7 +1357,7 @@ static const struct freq_tbl ftbl_nss_ppe_clk_src[] = {static const struct clk_parent_data gcc_xo_bias_gpll0_gpll4_nss_ubi32[] = { { .fw_name ="xo" , .name ="xo" }, - { .fw_name ="bias_pll_cc_clk" , .name ="bias_pll_cc_clk" }, + { .fw_name ="bias_pll_cc" , .name ="bias_pll_cc_clk" }, { .hw = &gpll0.clkr.hw }, { .hw = &gpll4.clkr.hw }, { .hw = &nss_crypto_pll.clkr.hw },
@@ -1411,7 +1411,7 @@ static const struct clk_parent_data gcc_xo_uniphy0_rx_tx_ubi32_bias[] = { { .fw_name = "uniphy0_gcc_rx_clk", .name = "uniphy0_gcc_rx_clk" }, { .fw_name = "uniphy0_gcc_tx_clk", .name = "uniphy0_gcc_tx_clk" }, { .hw = &ubi32_pll.clkr.hw }, - { .fw_name = "bias_pll_cc_clk", .name = "bias_pll_cc_clk" }, + { .fw_name = "bias_pll_cc", .name = "bias_pll_cc_clk" }, }; static const struct parent_map gcc_xo_uniphy0_rx_tx_ubi32_bias_map[] = {
@@ -1463,7 +1463,7 @@ static const struct clk_parent_data gcc_xo_uniphy0_tx_rx_ubi32_bias[] = { { .fw_name = "uniphy0_gcc_tx_clk", .name = "uniphy0_gcc_tx_clk" }, { .fw_name = "uniphy0_gcc_rx_clk", .name = "uniphy0_gcc_rx_clk" }, { .hw = &ubi32_pll.clkr.hw }, - { .fw_name = "bias_pll_cc_clk", .name = "bias_pll_cc_clk" }, + { .fw_name = "bias_pll_cc", .name = "bias_pll_cc_clk" }, }; static const struct parent_map gcc_xo_uniphy0_tx_rx_ubi32_bias_map[] = {
@@ -1704,7 +1704,7 @@ static const struct clk_parent_data gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bia { .fw_name = "uniphy1_gcc_rx_clk", .name = "uniphy1_gcc_rx_clk" }, { .fw_name = "uniphy1_gcc_tx_clk", .name = "uniphy1_gcc_tx_clk" }, { .hw = &ubi32_pll.clkr.hw }, - { .fw_name = "bias_pll_cc_clk", .name = "bias_pll_cc_clk" }, + { .fw_name = "bias_pll_cc", .name = "bias_pll_cc_clk" }, }; static const struct parent_map
@@ -1774,7 +1774,7 @@ static const struct clk_parent_data gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bia { .fw_name = "uniphy1_gcc_tx_clk", .name = "uniphy1_gcc_tx_clk" }, { .fw_name = "uniphy1_gcc_rx_clk", .name = "uniphy1_gcc_rx_clk" }, { .hw = &ubi32_pll.clkr.hw }, - { .fw_name = "bias_pll_cc_clk", .name = "bias_pll_cc_clk" }, + { .fw_name = "bias_pll_cc", .name = "bias_pll_cc_clk" }, }; static const struct parent_map
@@ -1842,7 +1842,7 @@ static const struct clk_parent_data gcc_xo_uniphy2_rx_tx_ubi32_bias[] = { { .fw_name = "uniphy2_gcc_rx_clk", .name = "uniphy2_gcc_rx_clk" }, { .fw_name = "uniphy2_gcc_tx_clk", .name = "uniphy2_gcc_tx_clk" }, { .hw = &ubi32_pll.clkr.hw }, - { .fw_name = "bias_pll_cc_clk", .name = "bias_pll_cc_clk" }, + { .fw_name = "bias_pll_cc", .name = "bias_pll_cc_clk" }, }; static const struct parent_map gcc_xo_uniphy2_rx_tx_ubi32_bias_map[] = {
@@ -1907,7 +1907,7 @@ static const struct clk_parent_data gcc_xo_uniphy2_tx_rx_ubi32_bias[] = { { .fw_name = "uniphy2_gcc_tx_clk", .name = "uniphy2_gcc_tx_clk" }, { .fw_name = "uniphy2_gcc_rx_clk", .name = "uniphy2_gcc_rx_clk" }, { .hw = &ubi32_pll.clkr.hw }, - { .fw_name = "bias_pll_cc_clk", .name = "bias_pll_cc_clk" }, + { .fw_name = "bias_pll_cc", .name = "bias_pll_cc_clk" }, }; static const struct parent_map gcc_xo_uniphy2_tx_rx_ubi32_bias_map[] = {
Signature · 1 line
2.56.0
Re: [PATCH v2 3/4] clk: qcom: gcc-ipq8074: Align CMN PLL inputs with binding
Quoted 9 lines · Robert Marko
The GCC binding names the CMN PLL inputs
bias_pll_ccandbias_pll_nss_noc. Use those names asfw_nameso GCC resolves the clocks through DT references.Keep the existing .name values as fallbacks for older device trees without these optional inputs.
Signed-off-by Robert Marko <[email protected]>---
Konrad
Re: [PATCH v2 3/4] clk: qcom: gcc-ipq8074: Align CMN PLL inputs with binding
In reply to Robert MarkoQuoted 8 lines · Robert Marko
The GCC binding names the CMN PLL inputs
bias_pll_ccandbias_pll_nss_noc. Use those names asfw_nameso GCC resolves the clocks through DT references.Keep the existing .name values as fallbacks for older device trees without these optional inputs.
Signed-off-by Robert Marko <[email protected]>
Re: [PATCH v2 3/4] clk: qcom: gcc-ipq8074: Align CMN PLL inputs with binding
In reply to Robert Marko(Resent with the lists on Cc; the first copy went to the To:
address only.)
Quoted 4 lines · Robert Marko
Keep the existing .name values as fallbacks for older device trees without these optional inputs.
Signed-off-by Robert Marko <[email protected]>
On OpenWrt with Linux 6.18: the NSS NoC clocks run at 461.5 MHz from bias_pll_nss_noc_clk and the PPE and EDMA clocks at 300 MHz from bias_pll_cc_clk, with no orphan clocks or probe deferrals, and the EDMA has been forwarding WAN and LAN traffic for 20 hours.
PATCH v2 4/4 arm64: dts: qcom: ipq8074: Add CMN PLL
In reply to Robert MarkoAdd the CMN PLL node, it will be used to feed the required fixed clocks to networking subsystem.
CMN PLL provides bias_pll_cc and bias_pll_nss_noc to GCC.
---
Changes in v2:
- Drop the _clk suffix from the GCC CMN PLL input names.
arch/arm64/boot/dts/qcom/ipq8074.dtsi | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +25 -2
@@ -5,6 +5,7 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/clock/qcom,gcc-ipq8074.h> +#include <dt-bindings/clock/qcom,ipq8074-cmn-pll.h> / { #address-cells = <2>;
@@ -15,6 +16,12 @@ / { interrupt-parent = <&intc>; clocks { + ref_48mhz_clk: ref-48mhz-clk { + compatible = "fixed-clock"; + clock-frequency = <48000000>; + #clock-cells = <0>; + }; + sleep_clk: sleep_clk { compatible = "fixed-clock"; clock-frequency = <32768>;
@@ -257,6 +264,18 @@ mdio: mdio@90000 { status = "disabled"; }; + cmn_pll: clock-controller@9b000 { + compatible = "qcom,ipq8074-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 IPQ8074_CMN_PLL_CLK>; + assigned-clock-rates-u64 = /bits/ 64 <12000000000>; + }; + qfprom: efuse@a4000 { compatible = "qcom,ipq8074-qfprom", "qcom,qfprom"; reg = <0x000a4000 0x2000>;
@@ -369,11 +388,15 @@ gcc: clock-controller@1800000 { clocks = <&xo>, <&sleep_clk>, <&pcie_qmp0>, - <&pcie_qmp1>; + <&pcie_qmp1>, + <&cmn_pll IPQ8074_BIAS_PLL_CC_CLK>, + <&cmn_pll IPQ8074_BIAS_PLL_NSS_NOC_CLK>; clock-names = "xo", "sleep_clk", "pcie0_pipe", - "pcie1_pipe"; + "pcie1_pipe", + "bias_pll_cc", + "bias_pll_nss_noc"; #clock-cells = <1>; #power-domain-cells = <1>; #reset-cells = <1>;
Signature · 1 line
2.56.0
Re: [PATCH v2 4/4] arm64: dts: qcom: ipq8074: Add CMN PLL
Quoted 7 lines · Robert Marko
Add the CMN PLL node, it will be used to feed the required fixed clocks to networking subsystem.
CMN PLL provides
bias_pll_ccandbias_pll_nss_nocto GCC.Signed-off-by Robert Marko <[email protected]>---
Konrad
Re: [PATCH v2 4/4] arm64: dts: qcom: ipq8074: Add CMN PLL
In reply to Robert MarkoQuoted 6 lines · Robert Marko
Add the CMN PLL node, it will be used to feed the required fixed clocks to networking subsystem.
CMN PLL provides
bias_pll_ccandbias_pll_nss_nocto GCC.Signed-off-by Robert Marko <[email protected]>
Re: [PATCH v2 4/4] arm64: dts: qcom: ipq8074: Add CMN PLL
In reply to Robert Marko(Resent with the lists on Cc; the first copy went to the To:
address only.)
Quoted 3 lines · Robert Marko
CMN PLL provides
bias_pll_ccandbias_pll_nss_nocto GCC.Signed-off-by Robert Marko <[email protected]>
On OpenWrt with Linux 6.18: the NSS NoC clocks run at 461.5 MHz from bias_pll_nss_noc_clk and the PPE and EDMA clocks at 300 MHz from bias_pll_cc_clk, with no orphan clocks or probe deferrals, and the EDMA has been forwarding WAN and LAN traffic for 20 hours.
Quoted 7 lines · Robert Marko
The IPQ8074 NSS NoC bias output feeds the GCC NSS NoC clock without a divider.
GCC and SSDK (Qualcomm vendor switch driver from SDK) both configure that clock for 461.5 MHz, while the CMN PLL driver reports its parent at 416.5 MHz.
Quoted 5 lines
Report the 461.5 MHz output rate so consumers see the correct rate.
Fixes 4e36f8ab45c4 ("clk: qcom: ipq-cmn-pll: Add IPQ8074 SoC support")Signed-off-by Robert Marko <[email protected]>---
Konrad
Quoted 11 lines · Robert Marko
The IPQ8074 NSS NoC bias output feeds the GCC NSS NoC clock without a divider.
GCC and SSDK (Qualcomm vendor switch driver from SDK) both configure that clock for 461.5 MHz, while the CMN PLL driver reports its parent at 416.5 MHz.
Report the 461.5 MHz output rate so consumers see the correct rate.
Fixes 4e36f8ab45c4 ("clk: qcom: ipq-cmn-pll: Add IPQ8074 SoC support")Signed-off-by Robert Marko <[email protected]>
(Resent with the lists on Cc; the first copy went to the To:
address only.)
Quoted 4 lines · Robert Marko
Report the 461.5 MHz output rate so consumers see the correct rate.
Fixes 4e36f8ab45c4 ("clk: qcom: ipq-cmn-pll: Add IPQ8074 SoC support")Signed-off-by Robert Marko <[email protected]>
On OpenWrt with Linux 6.18: the NSS NoC clocks run at 461.5 MHz from bias_pll_nss_noc_clk and the PPE and EDMA clocks at 300 MHz from bias_pll_cc_clk, with no orphan clocks or probe deferrals, and the EDMA has been forwarding WAN and LAN traffic for 20 hours.
Re: (subset) [PATCH v2 1/4] clk: qcom: ipq-cmn-pll: Correct IPQ8074 NSS NoC rate
In reply to Robert MarkoQuoted 8 lines · Robert Marko
The IPQ8074 NSS NoC bias output feeds the GCC NSS NoC clock without a divider.
GCC and SSDK (Qualcomm vendor switch driver from SDK) both configure that clock for 461.5 MHz, while the CMN PLL driver reports its parent at 416.5 MHz.
[...]
Applied, thanks!
[2/4] dt-bindings: clocks: qcom,gcc-ipq8074: Allow CMN PLL bias clocks
commit: 969f124be6cda13ea890e7330c984c6fdb512753
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>