Add APSS clock controller support for IPQ9574
Subsystems (6)
cover Add APSS clock controller support for IPQ9574
The APSS clock controller in IPQ9574 based devices supports cpu with frequencies above 800Mhz
This patch series adds the support for the same
This series depends on the below patchset
https://lore.kernel.org/linux-arm-msm/[email protected]/
devi priya (6):
dt-bindings: clock: Add YAML schemas for QCOM A73 PLL
clk: qcom: ipq9574: Enable APSS clock driver
arm64: defconfig: Enable ipq6018 apss clock and PLL controller
arm64: dts: qcom: ipq9574: Add support for APSS clock controller
dt-bindings: mailbox: Add compatible for IPQ9574
clk: qcom: Fix APSS PLL and RCG Configuration
.../bindings/clock/qcom,a73pll.yaml | 52 +++++++++++++++++++ .../mailbox/qcom,apcs-kpss-global.yaml | 3 ++ arch/arm64/boot/dts/qcom/ipq9574.dtsi | 17 ++++++ arch/arm64/configs/defconfig | 1 + drivers/clk/qcom/apss-ipq-pll.c | 14 +++++ drivers/clk/qcom/apss-ipq6018.c | 8 ++- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 5 ++ 7 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/clock/qcom,a73pll.yaml
base-commit: 1fe4fd6f5cad346e598593af36caeadc4f5d4fa9
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/6 dt-bindings: clock: Add YAML schemas for QCOM A73 PLL
Add schema for primary CPU PLL found on few Qualcomm platforms.
--- .../bindings/clock/qcom,a73pll.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,a73pll.yaml
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +52 -0
@@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,a73pll.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm A73 PLL clock + +maintainers: + - Bjorn Andersson <[email protected]> + +description: + The A73 PLL on few Qualcomm platforms is the main CPU PLL used for + frequencies above 1GHz. + +properties: + compatible: + enum: + - qcom,ipq9574-a73pll + + reg: + maxItems: 1 + + '#clock-cells': + const: 0 + + clocks: + items: + - description: board XO clock + + clock-names: + items: + - const: xo + + operating-points-v2: true + +required: + - compatible + - reg + - '#clock-cells' + +additionalProperties: false + +examples: + - | + a73pll: clock@b116000 { + compatible = "qcom,ipq9574-a73pll"; + reg = <0x0b116000 0x40>; + #clock-cells = <0>; + clocks = <&xo_board_clk>; + clock-names = "xo"; + };
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 1/6] dt-bindings: clock: Add YAML schemas for QCOM A73 PLL
Quoted 1 line · devi priya
Add schema for primary CPU PLL found on few Qualcomm platforms.
Subject: drop redundant "YAML schemas for"
Quoted 40 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>--- .../bindings/clock/qcom,a73pll.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,a73pll.yamlDocumentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +25
-0@@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,a73pll.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm A73 PLL clock + +maintainers: + - Bjorn Andersson <[email protected]> + +description: + The A73 PLL on few Qualcomm platforms is the main CPU PLL used for + frequencies above 1GHz. + +properties: + compatible: + enum: + - qcom,ipq9574-a73pll + + reg: + maxItems: 1 + + '#clock-cells': + const: 0
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml line 35
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +10
-0+ + clocks: + items: + - description: board XO clock + + clock-names: + items: + - const: xo + + operating-points-v2: true
Drop. I'll fix the other bindings.
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml line 47
Quoted 12 lines
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +12
-0+ +required: + - compatible + - reg + - '#clock-cells' + +additionalProperties: false + +examples: + - | + a73pll: clock@b116000 { + compatible = "qcom,ipq9574-a73pll";
Use 4 spaces for example indentation.
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml line 52
Quoted 5 lines
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +5
-0+ reg = <0x0b116000 0x40>; + #clock-cells = <0>; + clocks = <&xo_board_clk>; + clock-names = "xo"; + };
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 1/6] dt-bindings: clock: Add YAML schemas for QCOM A73 PLL
Thanks for taking time to review the patch!
Quoted 5 lines · Krzysztof Kozlowski
Quoted 1 line · devi priya
Add schema for primary CPU PLL found on few Qualcomm platforms.
Subject: drop redundant "YAML schemas for"
Sure, okay
Quoted 45 lines
Quoted 45 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>--- .../bindings/clock/qcom,a73pll.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+)create mode 100644
Documentation/devicetree/bindings/clock/qcom,a73pll.yamlDocumentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +29
-0@@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,a73pll.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm A73 PLL clock + +maintainers: + - Bjorn Andersson <[email protected]> + +description: + The A73 PLL on few Qualcomm platforms is the main CPU PLL used for + frequencies above 1GHz. + +properties: + compatible: + enum: + - qcom,ipq9574-a73pll + + reg: + maxItems: 1 + + '#clock-cells': + const: 0 + + clocks: + items: + - description: board XO clock
Quoted 9 lines
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml line 35
Quoted 6 lines
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +6
-0+ + clock-names: + items: + - const: xo + + operating-points-v2: trueDrop. I'll fix the other bindings.
As suggested by konrad, will drop this file change and add the compatible in qcom,a53pll.yaml
Quoted 15 lines
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml line 47
Quoted 12 lines
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +12
-0+ +required: + - compatible + - reg + - '#clock-cells' + +additionalProperties: false + +examples: + - | + a73pll: clock@b116000 { + compatible = "qcom,ipq9574-a73pll";Use 4 spaces for example indentation.
Quoted 9 lines
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml line 52
Quoted 5 lines
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +5
-0+ reg = <0x0b116000 0x40>; + #clock-cells = <0>; + clocks = <&xo_board_clk>; + clock-names = "xo"; + };Best regards,
Krzysztof
Best Regards,
Devi Priya
Re: [PATCH 1/6] dt-bindings: clock: Add YAML schemas for QCOM A73 PLL
In reply to devi priyaQuoted 6 lines · devi priya
Add schema for primary CPU PLL found on few Qualcomm platforms.
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>---
Doesn't this belong in Documentation/devicetree/bindings/clock/qcom,a53pll.yaml?
It looks identical, so it may be as simple as adding your new compatible there..
Konrad
Quoted 52 lines
.../bindings/clock/qcom,a73pll.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,a73pll.yamlDocumentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +42
-0@@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,a73pll.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm A73 PLL clock + +maintainers: + - Bjorn Andersson <[email protected]> + +description: + The A73 PLL on few Qualcomm platforms is the main CPU PLL used for + frequencies above 1GHz. + +properties: + compatible: + enum: + - qcom,ipq9574-a73pll + + reg: + maxItems: 1 + + '#clock-cells': + const: 0 + + clocks: + items: + - description: board XO clock + + clock-names: + items: + - const: xo + + operating-points-v2: true + +required: + - compatible + - reg + - '#clock-cells' + +additionalProperties: false
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml line 52
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +10
-0+ +examples: + - | + a73pll: clock@b116000 { + compatible = "qcom,ipq9574-a73pll"; + reg = <0x0b116000 0x40>; + #clock-cells = <0>; + clocks = <&xo_board_clk>; + clock-names = "xo"; + };
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 1/6] dt-bindings: clock: Add YAML schemas for QCOM A73 PLL
Thanks for taking time to review the patch!
Quoted 5 lines · Konrad Dybcio
Quoted 2 lines · devi priya
Add schema for primary CPU PLL found on few Qualcomm platforms.
Quoted 9 lines
Quoted 4 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>---
Doesn't this belong in
Documentation/devicetree/bindings/clock/qcom,a53pll.yaml?It looks identical, so it may be as simple as adding your new compatible there..
As the name was specific to a53pll, added a new yaml for a73. Will add the a73 compatible in qcom,a53pll.yaml if that's accepted!
Quoted 55 lines
Konrad
Quoted 54 lines
.../bindings/clock/qcom,a73pll.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+)create mode 100644
Documentation/devicetree/bindings/clock/qcom,a73pll.yamlDocumentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +44
-0@@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,a73pll.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm A73 PLL clock + +maintainers: + - Bjorn Andersson <[email protected]> + +description: + The A73 PLL on few Qualcomm platforms is the main CPU PLL used for + frequencies above 1GHz. + +properties: + compatible: + enum: + - qcom,ipq9574-a73pll + + reg: + maxItems: 1 + + '#clock-cells': + const: 0 + + clocks: + items: + - description: board XO clock + + clock-names: + items: + - const: xo + + operating-points-v2: true + +required: + - compatible + - reg + - '#clock-cells' + +additionalProperties: false + +examples:
Quoted 8 lines
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml line 52
Quoted 8 lines
Documentation/devicetree/bindings/clock/qcom,a73pll.yaml new file +8
-0+ - | + a73pll: clock@b116000 { + compatible = "qcom,ipq9574-a73pll"; + reg = <0x0b116000 0x40>; + #clock-cells = <0>; + clocks = <&xo_board_clk>; + clock-names = "xo"; + };
Best Regards,
Devi Priya
PATCH 2/6 clk: qcom: ipq9574: Enable APSS clock driver
In reply to devi priyaEnable APSS clock driver for IPQ9574 based devices
--- drivers/clk/qcom/apss-ipq-pll.c | 13 +++++++++++++ drivers/mailbox/qcom-apcs-ipc-mailbox.c | 5 +++++ 2 files changed, 18 insertions(+)
drivers/clk/qcom/apss-ipq-pll.c +13 -0
@@ -61,6 +61,18 @@ static const struct alpha_pll_config ipq8074_pll_config = { .test_ctl_hi_val = 0x4000, }; +static const struct alpha_pll_config ipq9574_pll_config = { + .l =0x3b , + .config_ctl_val =0x200D4828 , + .config_ctl_hi_val =0x6 , + .early_output_mask =BIT (3 ), + .aux2_output_mask =BIT (2 ), + .aux_output_mask =BIT (1 ), + .main_output_mask =BIT (0 ), + .test_ctl_val =0x0 , + .test_ctl_hi_val =0x4000 , +}; +static const struct regmap_config ipq_pll_regmap_config = { .reg_bits =32 , .reg_stride =4 ,
@@ -102,6 +114,7 @@ static int apss_ipq_pll_probe(struct platform_device *pdev)static const struct of_device_id apss_ipq_pll_match_table[] = { { .compatible ="qcom,ipq6018-a53pll" , .data = &ipq6018_pll_config }, { .compatible ="qcom,ipq8074-a53pll" , .data = &ipq8074_pll_config }, + { .compatible ="qcom,ipq9574-a73pll" , .data = &ipq9574_pll_config }, { } };MODULE_DEVICE_TABLE (of, apss_ipq_pll_match_table);
drivers/mailbox/qcom-apcs-ipc-mailbox.c +5 -0
@@ -33,6 +33,10 @@ static const struct qcom_apcs_ipc_data ipq6018_apcs_data = { .offset = 8, .clk_name = "qcom,apss-ipq6018-clk" }; +static const struct qcom_apcs_ipc_data ipq9574_apcs_data = { + .offset =8 , .clk_name ="qcom,apss-ipq6018-clk" +}; +static const struct qcom_apcs_ipc_data msm8916_apcs_data = { .offset =8 , .clk_name ="qcom-apcs-msm8916-clk" };
@@ -143,6 +147,7 @@ static int qcom_apcs_ipc_remove(struct platform_device *pdev)static const struct of_device_id qcom_apcs_ipc_of_match[] = { { .compatible ="qcom,ipq6018-apcs-apps-global" , .data = &ipq6018_apcs_data }, { .compatible ="qcom,ipq8074-apcs-apps-global" , .data = &ipq6018_apcs_data }, + { .compatible ="qcom,ipq9574-apcs-apps-global" , .data = &ipq9574_apcs_data }, { .compatible ="qcom,msm8916-apcs-kpss-global" , .data = &msm8916_apcs_data }, { .compatible ="qcom,msm8939-apcs-kpss-global" , .data = &msm8916_apcs_data }, { .compatible ="qcom,msm8953-apcs-kpss-global" , .data = &msm8994_apcs_data },
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/6] clk: qcom: ipq9574: Enable APSS clock driver
Quoted 1 line · devi priya
Enable APSS clock driver for IPQ9574 based devices
Please be more descriptive of what you're doing and why you're doing it.
clk: qcom: apss-ipq-pll: Add IPQ9574 support
Add IPQ9574-specific APSS PLL configuration values.
mailbox: qcom-apcs-ipc: Add IPQ9574 support
Add a compatible for IPQ9574's mailbox. The SoC, similarly to other IPQs uses the APSS IPQ PLL driver for CPU scaling.
Quoted 14 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>--- drivers/clk/qcom/apss-ipq-pll.c | 13 +++++++++++++ drivers/mailbox/qcom-apcs-ipc-mailbox.c | 5 +++++ 2 files changed, 18 insertions(+)drivers/clk/qcom/apss-ipq-pll.c +0
-0
drivers/clk/qcom/apss-ipq-pll.c static const struct alpha_pll_config ipq8074_pll_config = { · line 66
Quoted 6 lines
drivers/clk/qcom/apss-ipq-pll.c +3
-0@@ -61,6 +61,18 @@ static const struct alpha_pll_config ipq8074_pll_config = { .test_ctl_hi_val = 0x4000, }; +static const struct alpha_pll_config ipq9574_pll_config = { + .l =0x3b , + .config_ctl_val =0x200D4828 ,
Lowercase hex, please.
Quoted 13 lines
drivers/clk/qcom/apss-ipq-pll.c +9
-0+ .config_ctl_hi_val = 0x6, + .early_output_mask = BIT(3), + .aux2_output_mask = BIT(2), + .aux_output_mask = BIT(1), + .main_output_mask = BIT(0), + .test_ctl_val = 0x0, + .test_ctl_hi_val = 0x4000, +}; +static const struct regmap_config ipq_pll_regmap_config = { .reg_bits =32 , .reg_stride =4 ,
drivers/clk/qcom/apss-ipq-pll.c static int apss_ipq_pll_probe(struct platform_device *pdev) · line 119
Quoted 6 lines
drivers/clk/qcom/apss-ipq-pll.c +1
-0@@ -102,6 +114,7 @@ static int apss_ipq_pll_probe(struct platform_device *pdev)static const struct of_device_id apss_ipq_pll_match_table[] = { { .compatible ="qcom,ipq6018-a53pll" , .data = &ipq6018_pll_config }, { .compatible ="qcom,ipq8074-a53pll" , .data = &ipq8074_pll_config }, + { .compatible ="qcom,ipq9574-a73pll" , .data = &ipq9574_pll_config }, { } };
These are very small changes, so maybe they'll pass, but generally it's preferred to split changes per-file if possible (and here it is possible if you change the APSS PLL driver first and then bind it in APCS mbox afterwards).
drivers/mailbox/qcom-apcs-ipc-mailbox.c static const struct qcom_apcs_ipc_data ipq6018_apcs_data = { · line 38
Quoted 12 lines
drivers/clk/qcom/apss-ipq-pll.c +0
-0MODULE_DEVICE_TABLE (of, apss_ipq_pll_match_table);drivers/mailbox/qcom-apcs-ipc-mailbox.c +3
-0@@ -33,6 +33,10 @@ static const struct qcom_apcs_ipc_data ipq6018_apcs_data = { .offset = 8, .clk_name = "qcom,apss-ipq6018-clk" }; +static const struct qcom_apcs_ipc_data ipq9574_apcs_data = { + .offset =8 , .clk_name ="qcom,apss-ipq6018-clk" +};
Please reuse ipq6018_apcs_data, it's identical.
Konrad
drivers/mailbox/qcom-apcs-ipc-mailbox.c static int qcom_apcs_ipc_remove(struct platform_device *pdev) · line 153
Quoted 12 lines
drivers/mailbox/qcom-apcs-ipc-mailbox.c +2
-0+static const struct qcom_apcs_ipc_data msm8916_apcs_data = { .offset =8 , .clk_name ="qcom-apcs-msm8916-clk" };@@ -143,6 +147,7 @@ static int qcom_apcs_ipc_remove(struct platform_device *pdev)static const struct of_device_id qcom_apcs_ipc_of_match[] = { { .compatible ="qcom,ipq6018-apcs-apps-global" , .data = &ipq6018_apcs_data }, { .compatible ="qcom,ipq8074-apcs-apps-global" , .data = &ipq6018_apcs_data }, + { .compatible ="qcom,ipq9574-apcs-apps-global" , .data = &ipq9574_apcs_data }, { .compatible ="qcom,msm8916-apcs-kpss-global" , .data = &msm8916_apcs_data }, { .compatible ="qcom,msm8939-apcs-kpss-global" , .data = &msm8916_apcs_data }, { .compatible ="qcom,msm8953-apcs-kpss-global" , .data = &msm8994_apcs_data },
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/6] clk: qcom: ipq9574: Enable APSS clock driver
Quoted 9 lines · Konrad Dybcio
Quoted 1 line · devi priya
Enable APSS clock driver for IPQ9574 based devices
Please be more descriptive of what you're doing and why you're doing it.
clk: qcom: apss-ipq-pll: Add IPQ9574 support
Quoted 8 lines
Add IPQ9574-specific APSS PLL configuration values.
mailbox: qcom-apcs-ipc: Add IPQ9574 support
Add a compatible for IPQ9574's mailbox. The SoC, similarly to other IPQs uses the APSS IPQ PLL driver for CPU scaling.
Sure, okay
Quoted 18 lines
Quoted 18 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>--- drivers/clk/qcom/apss-ipq-pll.c | 13 +++++++++++++ drivers/mailbox/qcom-apcs-ipc-mailbox.c | 5 +++++ 2 files changed, 18 insertions(+)drivers/clk/qcom/apss-ipq-pll.c +0
-0@@ -61,6 +61,18 @@ static const struct alpha_pll_config ipq8074_pll_config = { .test_ctl_hi_val = 0x4000, };
Quoted 4 lines
drivers/clk/qcom/apss-ipq-pll.c static const struct alpha_pll_config ipq8074_pll_config = { · line 66
Quoted 3 lines
drivers/clk/qcom/apss-ipq-pll.c +3
-0+static const struct alpha_pll_config ipq9574_pll_config = { + .l =0x3b , + .config_ctl_val =0x200D4828 ,Lowercase hex, please.
Okay
Quoted 16 lines
Quoted 16 lines
drivers/clk/qcom/apss-ipq-pll.c +9
-0+ .config_ctl_hi_val = 0x6, + .early_output_mask = BIT(3), + .aux2_output_mask = BIT(2), + .aux_output_mask = BIT(1), + .main_output_mask = BIT(0), + .test_ctl_val = 0x0, + .test_ctl_hi_val = 0x4000, +}; +static const struct regmap_config ipq_pll_regmap_config = { .reg_bits =32 , .reg_stride =4 ,@@ -102,6 +114,7 @@ static int apss_ipq_pll_probe(struct platform_device *pdev)static const struct of_device_id apss_ipq_pll_match_table[] = { { .compatible ="qcom,ipq6018-a53pll" , .data = &ipq6018_pll_config },
Quoted 9 lines
drivers/clk/qcom/apss-ipq-pll.c static int apss_ipq_pll_probe(struct platform_device *pdev) · line 119
Quoted 4 lines
drivers/clk/qcom/apss-ipq-pll.c +1
-0{ .compatible = "qcom,ipq8074-a53pll", .data = &ipq8074_pll_config }, + { .compatible = "qcom,ipq9574-a73pll", .data = &ipq9574_pll_config }, { } };These are very small changes, so maybe they'll pass, but generally it's preferred to split changes per-file if possible (and here it is possible if you change the APSS PLL driver first and then bind it in APCS mbox afterwards).
Sure, will split the file changes in V2
Quoted 9 lines
Quoted 9 lines
drivers/clk/qcom/apss-ipq-pll.c +0
-0MODULE_DEVICE_TABLE (of, apss_ipq_pll_match_table);drivers/mailbox/qcom-apcs-ipc-mailbox.c +0
-0@@ -33,6 +33,10 @@ static const struct qcom_apcs_ipc_data ipq6018_apcs_data = { .offset = 8, .clk_name = "qcom,apss-ipq6018-clk" };
Quoted 6 lines
drivers/mailbox/qcom-apcs-ipc-mailbox.c static const struct qcom_apcs_ipc_data ipq6018_apcs_data = { · line 38
Quoted 3 lines
drivers/mailbox/qcom-apcs-ipc-mailbox.c +3
-0+static const struct qcom_apcs_ipc_data ipq9574_apcs_data = { + .offset =8 , .clk_name ="qcom,apss-ipq6018-clk" +};Please reuse
ipq6018_apcs_data, it's identical.Konrad
Okay
Quoted 4 lines
Quoted 4 lines
drivers/mailbox/qcom-apcs-ipc-mailbox.c +1
-0+static const struct qcom_apcs_ipc_data msm8916_apcs_data = { .offset =8 , .clk_name ="qcom-apcs-msm8916-clk" };
Quoted 8 lines
drivers/mailbox/qcom-apcs-ipc-mailbox.c static int qcom_apcs_ipc_remove(struct platform_device *pdev) · line 153
Quoted 8 lines
drivers/mailbox/qcom-apcs-ipc-mailbox.c +1
-0@@ -143,6 +147,7 @@ static int qcom_apcs_ipc_remove(struct platform_device *pdev)static const struct of_device_id qcom_apcs_ipc_of_match[] = { { .compatible ="qcom,ipq6018-apcs-apps-global" , .data = &ipq6018_apcs_data }, { .compatible ="qcom,ipq8074-apcs-apps-global" , .data = &ipq6018_apcs_data }, + { .compatible ="qcom,ipq9574-apcs-apps-global" , .data = &ipq9574_apcs_data }, { .compatible ="qcom,msm8916-apcs-kpss-global" , .data = &msm8916_apcs_data }, { .compatible ="qcom,msm8939-apcs-kpss-global" , .data = &msm8916_apcs_data }, { .compatible ="qcom,msm8953-apcs-kpss-global" , .data = &msm8994_apcs_data },
Best Regards,
Devi Priya
Re: [PATCH 2/6] clk: qcom: ipq9574: Enable APSS clock driver
In reply to devi priyaQuoted 8 lines · devi priya
Enable APSS clock driver for IPQ9574 based devices
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>--- drivers/clk/qcom/apss-ipq-pll.c | 13 +++++++++++++ drivers/mailbox/qcom-apcs-ipc-mailbox.c | 5 +++++
Note, the drivers/mailbox isn't a part of the 'drivers/clk', so it should go to a separate patch (and it will be handled by a different maintainer).
Quoted 38 lines
2 files changed, 18 insertions(+)drivers/clk/qcom/apss-ipq-pll.c +13
-0@@ -61,6 +61,18 @@ static const struct alpha_pll_config ipq8074_pll_config = { .test_ctl_hi_val = 0x4000, }; +static const struct alpha_pll_config ipq9574_pll_config = { + .l =0x3b , + .config_ctl_val =0x200D4828 , + .config_ctl_hi_val =0x6 , + .early_output_mask =BIT (3 ), + .aux2_output_mask =BIT (2 ), + .aux_output_mask =BIT (1 ), + .main_output_mask =BIT (0 ), + .test_ctl_val =0x0 , + .test_ctl_hi_val =0x4000 , +}; +static const struct regmap_config ipq_pll_regmap_config = { .reg_bits =32 , .reg_stride =4 ,@@ -102,6 +114,7 @@ static int apss_ipq_pll_probe(struct platform_device *pdev)static const struct of_device_id apss_ipq_pll_match_table[] = { { .compatible ="qcom,ipq6018-a53pll" , .data = &ipq6018_pll_config }, { .compatible ="qcom,ipq8074-a53pll" , .data = &ipq8074_pll_config }, + { .compatible ="qcom,ipq9574-a73pll" , .data = &ipq9574_pll_config }, { } };MODULE_DEVICE_TABLE (of, apss_ipq_pll_match_table);drivers/mailbox/qcom-apcs-ipc-mailbox.c +0
-0
drivers/mailbox/qcom-apcs-ipc-mailbox.c static const struct qcom_apcs_ipc_data ipq6018_apcs_data = { · line 38
Quoted 6 lines
drivers/mailbox/qcom-apcs-ipc-mailbox.c +3
-0@@ -33,6 +33,10 @@ static const struct qcom_apcs_ipc_data ipq6018_apcs_data = { .offset = 8, .clk_name = "qcom,apss-ipq6018-clk" }; +static const struct qcom_apcs_ipc_data ipq9574_apcs_data = { + .offset =8 , .clk_name ="qcom,apss-ipq6018-clk" +};
As the data is identical to ipq6018's one, please don't add a duplicate of it.
Quoted 12 lines
drivers/mailbox/qcom-apcs-ipc-mailbox.c +2
-0+static const struct qcom_apcs_ipc_data msm8916_apcs_data = { .offset =8 , .clk_name ="qcom-apcs-msm8916-clk" };@@ -143,6 +147,7 @@ static int qcom_apcs_ipc_remove(struct platform_device *pdev)static const struct of_device_id qcom_apcs_ipc_of_match[] = { { .compatible ="qcom,ipq6018-apcs-apps-global" , .data = &ipq6018_apcs_data }, { .compatible ="qcom,ipq8074-apcs-apps-global" , .data = &ipq6018_apcs_data }, + { .compatible ="qcom,ipq9574-apcs-apps-global" , .data = &ipq9574_apcs_data }, { .compatible ="qcom,msm8916-apcs-kpss-global" , .data = &msm8916_apcs_data }, { .compatible ="qcom,msm8939-apcs-kpss-global" , .data = &msm8916_apcs_data }, { .compatible ="qcom,msm8953-apcs-kpss-global" , .data = &msm8994_apcs_data },
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 2/6] clk: qcom: ipq9574: Enable APSS clock driver
Thanks Dmitry for taking time to review the patch!
Quoted 12 lines · Dmitry Baryshkov
Quoted 8 lines · devi priya
Enable APSS clock driver for IPQ9574 based devices
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>---
drivers/clk/qcom/apss-ipq-pll.c | 13 +++++++++++++drivers/mailbox/qcom-apcs-ipc-mailbox.c| 5 +++++Note, the
drivers/mailboxisn't a part of the 'drivers/clk', so it should go to a separate patch (and it will be handled by a different maintainer).
Sure, got it. will split the changes in V2
Quoted 40 lines
Quoted 40 lines
2 files changed, 18 insertions(+)drivers/clk/qcom/apss-ipq-pll.c +13
-0@@ -61,6 +61,18 @@ static const struct alpha_pll_config ipq8074_pll_config = { .test_ctl_hi_val = 0x4000, }; +static const struct alpha_pll_config ipq9574_pll_config = { + .l = 0x3b, + .config_ctl_val = 0x200D4828, + .config_ctl_hi_val = 0x6, + .early_output_mask = BIT(3), + .aux2_output_mask = BIT(2), + .aux_output_mask = BIT(1), + .main_output_mask = BIT(0), + .test_ctl_val = 0x0, + .test_ctl_hi_val = 0x4000, +}; + static const struct regmap_config ipq_pll_regmap_config = { .reg_bits = 32, .reg_stride = 4,@@ -102,6 +114,7 @@ static int apss_ipq_pll_probe(struct platform_device *pdev) static const struct of_device_id apss_ipq_pll_match_table[] = { { .compatible = "qcom,ipq6018-a53pll", .data = &ipq6018_pll_config }, { .compatible = "qcom,ipq8074-a53pll", .data = &ipq8074_pll_config }, + { .compatible = "qcom,ipq9574-a73pll", .data = &ipq9574_pll_config }, { }};
MODULE_DEVICE_TABLE(of, apss_ipq_pll_match_table);drivers/mailbox/qcom-apcs-ipc-mailbox.c +0
-0@@ -33,6 +33,10 @@ static const struct qcom_apcs_ipc_data
Quoted 9 lines
drivers/mailbox/qcom-apcs-ipc-mailbox.c static const struct qcom_apcs_ipc_data ipq6018_apcs_data = { · line 38
Quoted 6 lines
drivers/mailbox/qcom-apcs-ipc-mailbox.c +0
-0ipq6018_apcs_data = {.offset = 8, .clk_name = "qcom,apss-ipq6018-clk" };
drivers/mailbox/qcom-apcs-ipc-mailbox.c +3
-0+static const struct qcom_apcs_ipc_data ipq9574_apcs_data = { + .offset = 8, .clk_name = "qcom,apss-ipq6018-clk" +};As the data is identical to ipq6018's one, please don't add a duplicate of it.
Sure, okay
Quoted 6 lines
Quoted 6 lines
+
static const structqcom_apcs_ipc_datamsm8916_apcs_data= { .offset = 8, .clk_name = "qcom-apcs-msm8916-clk" };drivers/mailbox/qcom-apcs-ipc-mailbox.c +0
-0@@ -143,6 +147,7 @@ static int qcom_apcs_ipc_remove(struct platform_device *pdev)
Quoted 9 lines
Quoted 8 lines
drivers/mailbox/qcom-apcs-ipc-mailbox.c +1
-0static const struct of_device_id qcom_apcs_ipc_of_match[] = { { .compatible = "qcom,ipq6018-apcs-apps-global", .data = &ipq6018_apcs_data }, { .compatible = "qcom,ipq8074-apcs-apps-global", .data = &ipq6018_apcs_data }, + { .compatible = "qcom,ipq9574-apcs-apps-global", .data = &ipq9574_apcs_data }, { .compatible = "qcom,msm8916-apcs-kpss-global", .data = &msm8916_apcs_data },{ .compatible = "qcom,msm8939-apcs-kpss-global", .data =
&msm8916_apcs_data}, { .compatible = "qcom,msm8953-apcs-kpss-global", .data =&msm8994_apcs_data},
Best Regards,
Devi Priya
PATCH 3/6 arm64: defconfig: Enable ipq6018 apss clock and PLL controller
In reply to devi priyaEnable the PLL controller and IPQ6018 APSS clock controller
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -1092,6 +1092,7 @@ CONFIG_QCOM_CLK_APCS_MSM8916=y CONFIG_QCOM_CLK_APCC_MSM8996=y CONFIG_QCOM_CLK_SMD_RPM=y CONFIG_QCOM_CLK_RPMH=y +CONFIG_IPQ_APSS_6018=y CONFIG_IPQ_GCC_6018=y CONFIG_IPQ_GCC_8074=y CONFIG_IPQ_GCC_9574=y
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 3/6] arm64: defconfig: Enable ipq6018 apss clock and PLL controller
Quoted 1 line · devi priya
Enable the PLL controller and IPQ6018 APSS clock controller
... it is used on several IPQ platforms to clock the CPU so it should be enabled and built-in.
Quoted 4 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>
Just to check: is the capitalization correct in your name here and everywhere else? (please excuse my ignorance here, I do not know all the spelling/capitalization rules).
Quoted 16 lines
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)arch/arm64/configs/defconfig +1
-0@@ -1092,6 +1092,7 @@ CONFIG_QCOM_CLK_APCS_MSM8916=y CONFIG_QCOM_CLK_APCC_MSM8996=y CONFIG_QCOM_CLK_SMD_RPM=y CONFIG_QCOM_CLK_RPMH=y +CONFIG_IPQ_APSS_6018=y CONFIG_IPQ_GCC_6018=y CONFIG_IPQ_GCC_8074=y CONFIG_IPQ_GCC_9574=y
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 3/6] arm64: defconfig: Enable ipq6018 apss clock and PLL controller
Thanks for taking time to review the patch
Quoted 5 lines · Dmitry Baryshkov
Quoted 1 line · devi priya
Enable the PLL controller and IPQ6018 APSS clock controller
... it is used on several IPQ platforms to clock the CPU so it should be enabled and built-in.
Okay, got it. Will update the commit message as suggested in V2
Quoted 7 lines
Quoted 4 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>Just to check: is the capitalization correct in your name here and everywhere else? (please excuse my ignorance here, I do not know all the spelling/capitalization rules).
Sure, will change the naming style to Camel Case
Quoted 4 lines
Quoted 4 lines
---
arch/arm64/configs/defconfig| 1 +1 file changed, 1 insertion(+)
Quoted 13 lines
Quoted 5 lines
arch/arm64/configs/defconfig +0
-0@@ -1092,6 +1092,7 @@ CONFIG_QCOM_CLK_APCS_MSM8916=yQuoted 7 lines
CONFIG_QCOM_CLK_APCC_MSM8996=y
CONFIG_QCOM_CLK_SMD_RPM=y
CONFIG_QCOM_CLK_RPMH=y
+CONFIG_IPQ_APSS_6018=y
CONFIG_IPQ_GCC_6018=y
CONFIG_IPQ_GCC_8074=y
CONFIG_IPQ_GCC_9574=y
Best Regards,
Devi Priya
PATCH 4/6 arm64: dts: qcom: ipq9574: Add support for APSS clock controller
In reply to devi priyaEnable APSS clock controller in IPQ9574
--- arch/arm64/boot/dts/qcom/ipq9574.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/qcom/ipq9574.dtsi +17 -0
@@ -247,6 +247,23 @@ }; }; + apcs_glb: mailbox@b111000 { + compatible = "qcom,ipq9574-apcs-apps-global"; + reg = <0x0b111000 0x1000>; + #clock-cells = <1>; + clocks = <&a73pll>, <&xo_board_clk>; + clock-names = "pll", "xo"; + #mbox-cells = <1>; + }; + + a73pll: clock@b116000 { + compatible = "qcom,ipq9574-a73pll"; + reg = <0x0b116000 0x40>; + #clock-cells = <0>; + clocks = <&xo_board_clk>; + clock-names = "xo"; + }; + timer@b120000 { compatible = "arm,armv7-timer-mem"; reg = <0xb120000 0x1000>;
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 5/6 dt-bindings: mailbox: Add compatible for IPQ9574
In reply to devi priyaAdd the mailbox compatible string for IPQ9574 SoC
--- .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml +3 -0
@@ -20,6 +20,7 @@ properties: - enum: - qcom,ipq6018-apcs-apps-global - qcom,ipq8074-apcs-apps-global + - qcom,ipq9574-apcs-apps-global - qcom,msm8976-apcs-kpss-global - qcom,msm8996-apcs-hmss-global - qcom,msm8998-apcs-hmss-global
@@ -113,6 +114,7 @@ allOf: enum: - qcom,ipq6018-apcs-apps-global - qcom,ipq8074-apcs-apps-global + - qcom,ipq9574-apcs-apps-global then: properties: clocks:
@@ -129,6 +131,7 @@ allOf: enum: - qcom,ipq6018-apcs-apps-global - qcom,ipq8074-apcs-apps-global + - qcom,ipq9574-apcs-apps-global then: properties: '#clock-cells':
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 5/6] dt-bindings: mailbox: Add compatible for IPQ9574
Quoted 6 lines · devi priya
Add the mailbox compatible string for IPQ9574 SoC
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>---
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 5/6] dt-bindings: mailbox: Add compatible for IPQ9574
In reply to devi priyaQuoted 6 lines · devi priya
Add the mailbox compatible string for IPQ9574 SoC
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>---
Binding changes should come before driver changes, so that you're not introducing an "illegal" compatible and only "legalize" it later - please reorder the patch.
Konrad
Quoted 24 lines
.../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 3 +++ 1 file changed, 3 insertions(+)Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml +2
-0@@ -20,6 +20,7 @@ properties: - enum: - qcom,ipq6018-apcs-apps-global - qcom,ipq8074-apcs-apps-global + - qcom,ipq9574-apcs-apps-global - qcom,msm8976-apcs-kpss-global - qcom,msm8996-apcs-hmss-global - qcom,msm8998-apcs-hmss-global@@ -113,6 +114,7 @@ allOf: enum: - qcom,ipq6018-apcs-apps-global - qcom,ipq8074-apcs-apps-global + - qcom,ipq9574-apcs-apps-global then: properties: clocks:
Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml allOf: · line 137
Quoted 7 lines
Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml +1
-0@@ -129,6 +131,7 @@ allOf: enum: - qcom,ipq6018-apcs-apps-global - qcom,ipq8074-apcs-apps-global + - qcom,ipq9574-apcs-apps-global then: properties: '#clock-cells':
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 5/6] dt-bindings: mailbox: Add compatible for IPQ9574
Quoted 9 lines · Konrad Dybcio
Quoted 6 lines · devi priya
Add the mailbox compatible string for IPQ9574 SoC
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>---
Quoted 5 lines
Binding changes should come before driver changes, so that you're not introducing an "illegal" compatible and only "legalize" it later - please reorder the patch.
Konrad
Understood, will reorder the patches in V2
Quoted 23 lines
Quoted 23 lines
.../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 3 +++ 1 file changed, 3 insertions(+)Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml +2
-0@@ -20,6 +20,7 @@ properties: - enum: - qcom,ipq6018-apcs-apps-global - qcom,ipq8074-apcs-apps-global + - qcom,ipq9574-apcs-apps-global - qcom,msm8976-apcs-kpss-global - qcom,msm8996-apcs-hmss-global - qcom,msm8998-apcs-hmss-global@@ -113,6 +114,7 @@ allOf: enum: - qcom,ipq6018-apcs-apps-global - qcom,ipq8074-apcs-apps-global + - qcom,ipq9574-apcs-apps-global then: properties: clocks:
Quoted 8 lines
Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml allOf: · line 137
Quoted 8 lines
Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml +1
-0@@ -129,6 +131,7 @@ allOf: enum: - qcom,ipq6018-apcs-apps-global - qcom,ipq8074-apcs-apps-global + - qcom,ipq9574-apcs-apps-global then: properties: '#clock-cells':
Best Regards,
Devi Priya
PATCH 6/6 clk: qcom: Fix APSS PLL and RCG Configuration
In reply to devi priyaIncluded CLK_IS_CRITICAL flag which helps to properly enable the APSS PLL during bootup.clk_rcg2_ops should be used for APSS clock RCG, as other ops will not configure the RCG register
--- drivers/clk/qcom/apss-ipq-pll.c | 1 + drivers/clk/qcom/apss-ipq6018.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/clk/qcom/apss-ipq-pll.c +1 -0
@@ -33,6 +33,7 @@ static struct clk_alpha_pll ipq_pll = { }, .num_parents = 1, .ops = &clk_alpha_pll_huayra_ops, + .flags = CLK_IS_CRITICAL, }, }, };
drivers/clk/qcom/apss-ipq6018.c +7 -1
@@ -33,15 +33,21 @@ static const struct parent_map parents_apcs_alias0_clk_src_map[] = { { P_APSS_PLL_EARLY, 5 }, }; +static const struct freq_tbl ftbl_apcs_alias0_clk_src[] = { + { .src =P_APSS_PLL_EARLY , .pre_div =1 }, + { } +}; +static struct clk_rcg2 apcs_alias0_clk_src = { .cmd_rcgr =0x0050 , + .freq_tbl = ftbl_apcs_alias0_clk_src, .hid_width =5 , .parent_map = parents_apcs_alias0_clk_src_map, .clkr.hw.init = &(struct clk_init_data ){ .name ="apcs_alias0_clk_src" , .parent_data = parents_apcs_alias0_clk_src, .num_parents =ARRAY_SIZE (parents_apcs_alias0_clk_src), - .ops = &clk_rcg2_mux_closest_ops, + .ops = &clk_rcg2_ops, .flags =CLK_SET_RATE_PARENT , }, };
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 6/6] clk: qcom: Fix APSS PLL and RCG Configuration
Quoted 2 lines · devi priya
Included
CLK_IS_CRITICALflag which helps to properly enable the APSS PLL during bootup.
Please describe the issue and not only the user-visible impact it makes. Does the PLL get shut down by clk_ignore_unused? Maybe you would be interested in the sync_state changes that landed in recent -next that may solve it for you?
I don't think it should be always-on, as you have an alternate source for low power modes, adding CLK_IS_CRITICAL will keep the PLL enabled even if you're not using it.
Quoted 2 lines
clk_rcg2_opsshould be used for APSS clock RCG, as other ops will not configure the RCG register
RCG register meaning RCG register*s*, meaning in this case M/N/D which would be required for proper rate setting and not only input switching (which arguably doesn't seem to be of much concern on a single-parent clock)? This all is not obvious..
Konrad
Quoted 38 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>--- drivers/clk/qcom/apss-ipq-pll.c | 1 + drivers/clk/qcom/apss-ipq6018.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-)drivers/clk/qcom/apss-ipq-pll.c +1
-0@@ -33,6 +33,7 @@ static struct clk_alpha_pll ipq_pll = { }, .num_parents = 1, .ops = &clk_alpha_pll_huayra_ops, + .flags = CLK_IS_CRITICAL, }, }, };drivers/clk/qcom/apss-ipq6018.c +6
-0@@ -33,15 +33,21 @@ static const struct parent_map parents_apcs_alias0_clk_src_map[] = { { P_APSS_PLL_EARLY, 5 }, }; +static const struct freq_tbl ftbl_apcs_alias0_clk_src[] = { + { .src =P_APSS_PLL_EARLY , .pre_div =1 }, + { } +}; +static struct clk_rcg2 apcs_alias0_clk_src = { .cmd_rcgr =0x0050 , + .freq_tbl = ftbl_apcs_alias0_clk_src, .hid_width = 5,
drivers/clk/qcom/apss-ipq6018.c static const struct parent_map parents_apcs_alias0_clk_src_map[] = { · line 53
Quoted 10 lines
drivers/clk/qcom/apss-ipq6018.c +1
-1.parent_map = parents_apcs_alias0_clk_src_map, .clkr.hw.init = &(struct clk_init_data ){ .name ="apcs_alias0_clk_src" , .parent_data = parents_apcs_alias0_clk_src, .num_parents =ARRAY_SIZE (parents_apcs_alias0_clk_src), - .ops = &clk_rcg2_mux_closest_ops, + .ops = &clk_rcg2_ops, .flags =CLK_SET_RATE_PARENT , }, };
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 6/6] clk: qcom: Fix APSS PLL and RCG Configuration
Quoted 4 lines · Konrad Dybcio
Quoted 2 lines · devi priya
Included
CLK_IS_CRITICALflag which helps to properly enable the APSS PLL during bootup.
Quoted 8 lines
Please describe the issue and not only the user-visible impact it makes. Does the PLL get shut down by
clk_ignore_unused? Maybe you would be interested in thesync_statechanges that landed in recent -next that may solve it for you?I don't think it should be always-on, as you have an alternate source for low power modes, adding
CLK_IS_CRITICALwill keep the PLL enabled even if you're not using it.
I have the same opinion, as this is working fine on IPQ6018 and IPQ8074 and I have not experienced any issues with it.
Quoted 7 lines
Quoted 3 lines
clk_rcg2_opsshould be used for APSS clock RCG, as other ops will not configure the RCG registerRCG register meaning RCG register*s*, meaning in this case M/N/D which would be required for proper rate setting and not only input switching (which arguably doesn't seem to be of much concern on a single-parent clock)? This all is not obvious..
Same question from me as well, why do you need clk_rcg2_ops with a dummy frequency table since this is just a mux using RCG2 control bits?
Regards,
Robert
Quoted 50 lines
Konrad
Quoted 47 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>--- drivers/clk/qcom/apss-ipq-pll.c | 1 + drivers/clk/qcom/apss-ipq6018.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-)drivers/clk/qcom/apss-ipq-pll.c +1
-0@@ -33,6 +33,7 @@ static struct clk_alpha_pll ipq_pll = { }, .num_parents = 1, .ops = &clk_alpha_pll_huayra_ops, + .flags = CLK_IS_CRITICAL, }, }, };drivers/clk/qcom/apss-ipq6018.c +7
-1@@ -33,15 +33,21 @@ static const struct parent_map parents_apcs_alias0_clk_src_map[] = { { P_APSS_PLL_EARLY, 5 }, }; +static const struct freq_tbl ftbl_apcs_alias0_clk_src[] = { + { .src =P_APSS_PLL_EARLY , .pre_div =1 }, + { } +}; +static struct clk_rcg2 apcs_alias0_clk_src = { .cmd_rcgr =0x0050 , + .freq_tbl = ftbl_apcs_alias0_clk_src, .hid_width =5 , .parent_map = parents_apcs_alias0_clk_src_map, .clkr.hw.init = &(struct clk_init_data ){ .name ="apcs_alias0_clk_src" , .parent_data = parents_apcs_alias0_clk_src, .num_parents =ARRAY_SIZE (parents_apcs_alias0_clk_src), - .ops = &clk_rcg2_mux_closest_ops, + .ops = &clk_rcg2_ops, .flags =CLK_SET_RATE_PARENT , }, };
Re: [PATCH 6/6] clk: qcom: Fix APSS PLL and RCG Configuration
Thanks for taking time to review the patch!
Quoted 11 lines · Robert Marko
Quoted 9 lines · Konrad Dybcio
Quoted 2 lines · devi priya
Included
CLK_IS_CRITICALflag which helps to properly enable the APSS PLL during bootup.Please describe the issue and not only the user-visible impact it makes. Does the PLL get shut down by
clk_ignore_unused? Maybe you would be interested in thesync_statechanges that landed in recent -next that may solve it for you?
Quoted 7 lines
Quoted 3 lines
I don't think it should be always-on, as you have an alternate source for low power modes, adding
CLK_IS_CRITICALwill keep the PLL enabled even if you're not using it.I have the same opinion, as this is working fine on IPQ6018 and IPQ8074 and I have not experienced any issues with it.
Sure, will drop the critical flag
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
clk_rcg2_opsshould be used for APSS clock RCG, as other ops will not configure the RCG registerRCG register meaning RCG register*s*, meaning in this case M/N/D which would be required for proper rate setting and not only input switching (which arguably doesn't seem to be of much concern on a single-parent clock)? This all is not obvious..
Quoted 7 lines
Same question from me as well, why do you need
clk_rcg2_opswith a dummy frequency table since this is just a mux using RCG2 control bits?Regards,
RobertQuoted 1 line
The RCGR is used for source selection whereas the rate setting is done by configuring the PLL. The source is configured in the RCGR using the source entry (P_APSS_PLL_EARLY) added to the frequency table.
Quoted 41 lines
Quoted 41 lines
Konrad
Quoted 40 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>---
drivers/clk/qcom/apss-ipq-pll.c| 1 +
drivers/clk/qcom/apss-ipq6018.c| 8 +++++++-2 files changed, 8 insertions(+), 1 deletion(-)drivers/clk/qcom/apss-ipq-pll.c +1
-0@@ -33,6 +33,7 @@ static struct clk_alpha_pll ipq_pll = { }, .num_parents = 1, .ops = &clk_alpha_pll_huayra_ops, + .flags = CLK_IS_CRITICAL, }, }, };drivers/clk/qcom/apss-ipq6018.c +6
-0@@ -33,15 +33,21 @@ static const struct parent_map parents_apcs_alias0_clk_src_map[] = { { P_APSS_PLL_EARLY, 5 }, }; +static const struct freq_tbl ftbl_apcs_alias0_clk_src[] = { + { .src = P_APSS_PLL_EARLY, .pre_div = 1 }, + { } +}; + static struct clk_rcg2 apcs_alias0_clk_src = { .cmd_rcgr = 0x0050, + .freq_tbl = ftbl_apcs_alias0_clk_src, .hid_width = 5, .parent_map = parents_apcs_alias0_clk_src_map, .clkr.hw.init = &(struct clk_init_data){ .name = "apcs_alias0_clk_src",
Quoted 8 lines
Quoted 8 lines
drivers/clk/qcom/apss-ipq6018.c static const struct parent_map parents_apcs_alias0_clk_src_map[] = { · line 53
Quoted 7 lines
drivers/clk/qcom/apss-ipq6018.c +1
-1.parent_data = parents_apcs_alias0_clk_src, .num_parents = ARRAY_SIZE(parents_apcs_alias0_clk_src), - .ops = &clk_rcg2_mux_closest_ops, + .ops = &clk_rcg2_ops, .flags = CLK_SET_RATE_PARENT, }, };
Best Regards,
Devi Priya
Re: [PATCH 6/6] clk: qcom: Fix APSS PLL and RCG Configuration
In reply to Konrad DybcioThanks for taking time to review the patch
Quoted 5 lines · Konrad Dybcio
Quoted 2 lines · devi priya
Included
CLK_IS_CRITICALflag which helps to properly enable the APSS PLL during bootup.
Quoted 8 lines
Please describe the issue and not only the user-visible impact it makes. Does the PLL get shut down by
clk_ignore_unused? Maybe you would be interested in thesync_statechanges that landed in recent -next that may solve it for you?I don't think it should be always-on, as you have an alternate source for low power modes, adding
CLK_IS_CRITICALwill keep the PLL enabled even if you're not using it.
Yeah, got it. Will drop the critical flag
Quoted 9 lines
Quoted 3 lines
clk_rcg2_opsshould be used for APSS clock RCG, as other ops will not configure the RCG registerRCG register meaning RCG register*s*, meaning in this case M/N/D which would be required for proper rate setting and not only input switching (which arguably doesn't seem to be of much concern on a single-parent clock)? This all is not obvious..
Konrad
The source selection is done by configuring the RCGR config register with the source entry (P_APSS_PLL_EARLY) added to the frequency table. Proper rate is achieved by configuring the PLL and hence M/N/D values are not configured
Quoted 40 lines
Quoted 40 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>--- drivers/clk/qcom/apss-ipq-pll.c | 1 + drivers/clk/qcom/apss-ipq6018.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-)drivers/clk/qcom/apss-ipq-pll.c +1
-0@@ -33,6 +33,7 @@ static struct clk_alpha_pll ipq_pll = { }, .num_parents = 1, .ops = &clk_alpha_pll_huayra_ops, + .flags = CLK_IS_CRITICAL, }, }, };drivers/clk/qcom/apss-ipq6018.c +6
-0@@ -33,15 +33,21 @@ static const struct parent_map parents_apcs_alias0_clk_src_map[] = { { P_APSS_PLL_EARLY, 5 }, }; +static const struct freq_tbl ftbl_apcs_alias0_clk_src[] = { + { .src = P_APSS_PLL_EARLY, .pre_div = 1 }, + { } +}; + static struct clk_rcg2 apcs_alias0_clk_src = { .cmd_rcgr = 0x0050, + .freq_tbl = ftbl_apcs_alias0_clk_src, .hid_width = 5, .parent_map = parents_apcs_alias0_clk_src_map, .clkr.hw.init = &(struct clk_init_data){
Quoted 8 lines
drivers/clk/qcom/apss-ipq6018.c static const struct parent_map parents_apcs_alias0_clk_src_map[] = { · line 53
Quoted 8 lines
drivers/clk/qcom/apss-ipq6018.c +1
-1.name = "apcs_alias0_clk_src", .parent_data = parents_apcs_alias0_clk_src, .num_parents = ARRAY_SIZE(parents_apcs_alias0_clk_src), - .ops = &clk_rcg2_mux_closest_ops, + .ops = &clk_rcg2_ops, .flags = CLK_SET_RATE_PARENT, }, };
Best Regards,
Devi Priya
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 6/6] clk: qcom: Fix APSS PLL and RCG Configuration
Quoted 20 lines · Devi Priya
Thanks for taking time to review the patch
Quoted 5 lines · Konrad Dybcio
Quoted 2 lines · devi priya
Included
CLK_IS_CRITICALflag which helps to properly enable the APSS PLL during bootup.Quoted 8 lines
Please describe the issue and not only the user-visible impact it makes. Does the PLL get shut down by
clk_ignore_unused? Maybe you would be interested in thesync_statechanges that landed in recent -next that may solve it for you?I don't think it should be always-on, as you have an alternate source for low power modes, adding
CLK_IS_CRITICALwill keep the PLL enabled even if you're not using it.Yeah, got it. Will drop the critical flag
Quoted 3 lines
Quoted 3 lines
clk_rcg2_opsshould be used for APSS clock RCG, as other ops will not configure the RCG register
Quoted 7 lines
Quoted 6 lines
RCG register meaning RCG register*s*, meaning in this case M/N/D which would be required for proper rate setting and not only input switching (which arguably doesn't seem to be of much concern on a single-parent clock)? This all is not obvious..
Konrad
The source selection is done by configuring the RCGR config register with the source entry (
P_APSS_PLL_EARLY) added to the frequency table. Proper rate is achieved by configuring the PLL and hence M/N/D values are not configured
But the clk_rcg2_mux_closest_ops also programs the parent for the clock. So from your description it isn't obvious what is wrong with the current _ops used for the clock.
Quoted 50 lines
Quoted 40 lines
Quoted 40 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>---
drivers/clk/qcom/apss-ipq-pll.c| 1 +
drivers/clk/qcom/apss-ipq6018.c| 8 +++++++-2 files changed, 8 insertions(+), 1 deletion(-)drivers/clk/qcom/apss-ipq-pll.c +1
-0@@ -33,6 +33,7 @@ static struct clk_alpha_pll ipq_pll = { }, .num_parents = 1, .ops = &clk_alpha_pll_huayra_ops, + .flags = CLK_IS_CRITICAL, }, }, };drivers/clk/qcom/apss-ipq6018.c +6
-0@@ -33,15 +33,21 @@ static const struct parent_map parents_apcs_alias0_clk_src_map[] = { { P_APSS_PLL_EARLY, 5 }, }; +static const struct freq_tbl ftbl_apcs_alias0_clk_src[] = { + { .src = P_APSS_PLL_EARLY, .pre_div = 1 }, + { } +}; + static struct clk_rcg2 apcs_alias0_clk_src = { .cmd_rcgr = 0x0050, + .freq_tbl = ftbl_apcs_alias0_clk_src, .hid_width = 5, .parent_map = parents_apcs_alias0_clk_src_map, .clkr.hw.init = &(struct clk_init_data){Quoted 8 lines
drivers/clk/qcom/apss-ipq6018.c static const struct parent_map parents_apcs_alias0_clk_src_map[] = { · line 53
Quoted 8 lines
drivers/clk/qcom/apss-ipq6018.c +1
-1.name = "apcs_alias0_clk_src", .parent_data = parents_apcs_alias0_clk_src, .num_parents = ARRAY_SIZE(parents_apcs_alias0_clk_src), - .ops = &clk_rcg2_mux_closest_ops, + .ops = &clk_rcg2_ops, .flags = CLK_SET_RATE_PARENT, }, };Best Regards,
Devi Priya
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 6/6] clk: qcom: Fix APSS PLL and RCG Configuration
Quoted 26 lines · Dmitry Baryshkov
Quoted 25 lines · Devi Priya
Thanks for taking time to review the patch
Quoted 5 lines · Konrad Dybcio
Quoted 2 lines · devi priya
Included
CLK_IS_CRITICALflag which helps to properly enable the APSS PLL during bootup.Quoted 8 lines
Please describe the issue and not only the user-visible impact it makes. Does the PLL get shut down by
clk_ignore_unused? Maybe you would be interested in thesync_statechanges that landed in recent -next that may solve it for you?I don't think it should be always-on, as you have an alternate source for low power modes, adding
CLK_IS_CRITICALwill keep the PLL enabled even if you're not using it.Yeah, got it. Will drop the critical flag
Quoted 8 lines
Quoted 3 lines
clk_rcg2_opsshould be used for APSS clock RCG, as other ops will not configure the RCG registerRCG register meaning RCG register*s*, meaning in this case M/N/D which would be required for proper rate setting and not only input switching (which arguably doesn't seem to be of much concern on a single-parent clock)? This all is not obvious..
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Konrad
The source selection is done by configuring the RCGR config register with the source entry (
P_APSS_PLL_EARLY) added to the frequency table. Proper rate is achieved by configuring the PLL and hence M/N/D values are not configuredBut the
clk_rcg2_mux_closest_opsalso programs the parent for the clock. So from your description it isn't obvious what is wrong with the current_opsused for the clock.
Okay, understood & agreed.
Will re-verify it once and update it accordingly in V2
Quoted 42 lines
Quoted 42 lines
Quoted 42 lines
Quoted 42 lines
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by devi priya <[email protected]>---
drivers/clk/qcom/apss-ipq-pll.c| 1 +
drivers/clk/qcom/apss-ipq6018.c| 8 +++++++-2 files changed, 8 insertions(+), 1 deletion(-)drivers/clk/qcom/apss-ipq-pll.c +1
-0@@ -33,6 +33,7 @@ static struct clk_alpha_pll ipq_pll = { }, .num_parents = 1, .ops = &clk_alpha_pll_huayra_ops, + .flags = CLK_IS_CRITICAL, }, }, };drivers/clk/qcom/apss-ipq6018.c +6
-0@@ -33,15 +33,21 @@ static const struct parent_map parents_apcs_alias0_clk_src_map[] = { { P_APSS_PLL_EARLY, 5 }, }; +static const struct freq_tbl ftbl_apcs_alias0_clk_src[] = { + { .src = P_APSS_PLL_EARLY, .pre_div = 1 }, + { } +}; + static struct clk_rcg2 apcs_alias0_clk_src = { .cmd_rcgr = 0x0050, + .freq_tbl = ftbl_apcs_alias0_clk_src, .hid_width = 5, .parent_map = parents_apcs_alias0_clk_src_map, .clkr.hw.init = &(struct clk_init_data){ .name = "apcs_alias0_clk_src", .parent_data = parents_apcs_alias0_clk_src,
Quoted 9 lines
Quoted 8 lines
Quoted 6 lines
drivers/clk/qcom/apss-ipq6018.c static const struct parent_map parents_apcs_alias0_clk_src_map[] = { · line 53
Quoted 6 lines
drivers/clk/qcom/apss-ipq6018.c +1
-1.num_parents = ARRAY_SIZE(parents_apcs_alias0_clk_src), - .ops = &clk_rcg2_mux_closest_ops, + .ops = &clk_rcg2_ops, .flags = CLK_SET_RATE_PARENT, }, };Best Regards,
Devi Priya
Best Regards,
Devi Priya