Skip to contentSkip to conversation

clk: qcom: spmi_pmic clock divider support

PATCH Applied Tirupathi Reddy 3 participants 8 messages Nov 21, 2017 – Dec 7, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v7 cover clk: qcom: spmi_pmic clock divider support

The SPMI_PMIC clock divider driver configures the clkdiv modules present on Qualcomm Technologies, Inc. SPMI PMIC. This driver provides a clock interface for each clkdiv module and allows clock operations such as enable, disable, set_rate, recalc_rate and round_rate.

Tirupathi Reddy (2):
clk: qcom: Add spmi_pmic clock divider support
dt-bindings: Add qcom spmi_pmic clock divider bindings

 .../bindings/clock/qcom,spmi-pmic-div.txt          |  59 ++++
 drivers/clk/qcom/Kconfig                           |   9 +
 drivers/clk/qcom/Makefile                          |   1 +
 drivers/clk/qcom/clk-spmi-pmic-div.c               | 302 +++++++++++++++++++++
 4 files changed, 371 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,spmi-pmic-div.txt
 create mode 100644 drivers/clk/qcom/clk-spmi-pmic-div.c
Signature · 1 line
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
#1 lore raw

PATCH v7 1/2 clk: qcom: Add spmi_pmic clock divider support

Clkdiv module provides a clock output on the PMIC with CXO as the source. This clock can be routed through PMIC GPIOs. Add a device driver to configure this clkdiv module.

---
 drivers/clk/qcom/Kconfig             |   9 ++
 drivers/clk/qcom/Makefile            |   1 +
 drivers/clk/qcom/clk-spmi-pmic-div.c | 302 +++++++++++++++++++++++++++++++++++
 3 files changed, 312 insertions(+)
 create mode 100644 drivers/clk/qcom/clk-spmi-pmic-div.c
drivers/clk/qcom/Kconfig +9 -0
index 9f6c278..20b5d6f 100644
@@ -196,3 +196,12 @@ config MSM_MMCC_8996
 	  Support for the multimedia clock controller on msm8996 devices.
 	  Say Y if you want to support multimedia devices such as display,
 	  graphics, video encode/decode, camera, etc.
+
+config SPMI_PMIC_CLKDIV
+	tristate "SPMI PMIC clkdiv Support"
+	depends on (COMMON_CLK_QCOM && SPMI) || COMPILE_TEST
+	help
+	  This driver supports the clkdiv functionality on the Qualcomm
+	  Technologies, Inc. SPMI PMIC. It configures the frequency of
+	  clkdiv outputs of the PMIC. These clocks are typically wired
+	  through alternate functions on GPIO pins.
drivers/clk/qcom/Makefile +1 -0
index 26410d3..602af38 100644
@@ -34,3 +34,4 @@ obj-$(CONFIG_MSM_MMCC_8974) += mmcc-msm8974.o
 obj-$(CONFIG_MSM_MMCC_8996) += mmcc-msm8996.o
 obj-$(CONFIG_QCOM_CLK_RPM) += clk-rpm.o
 obj-$(CONFIG_QCOM_CLK_SMD_RPM) += clk-smd-rpm.o
+obj-$(CONFIG_SPMI_PMIC_CLKDIV) += clk-spmi-pmic-div.o
drivers/clk/qcom/clk-spmi-pmic-div.c new file +302 -0

302 lines not on this page · raw message

Signature · 1 line
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
#3 lore raw

PATCH v7 2/2 dt-bindings: Add qcom spmi_pmic clock divider bindings

In reply to Tirupathi Reddy

This patch adds device tree bindings for Qualcomm SPMI PMIC clock divider module.

---
 .../bindings/clock/qcom,spmi-pmic-div.txt          | 59 ++++++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,spmi-pmic-div.txt
Documentation/devicetree/bindings/clock/qcom,spmi-pmic-div.txt new file +59 -0
new file mode 100644
index 0000000..2cf2aba
@@ -0,0 +1,59 @@
+Qualcomm Technologies, Inc. SPMI PMIC clock divider (clkdiv)
+
+clkdiv configures the clock frequency of a set of outputs on the PMIC.
+These clocks are typically wired through alternate functions on
+gpio pins.
+
+=======================
+Properties
+=======================
+
+- compatible
+	Usage:      required
+	Value type: <string>
+	Definition: must be "qcom,spmi-clkdiv".
+
+- reg
+	Usage:      required
+	Value type: <prop-encoded-array>
+	Definition: base address of CLKDIV peripherals.
+
+- qcom,num-clkdivs
+	Usage:      required
+	Value type: <u32>
+	Definition: number of CLKDIV peripherals.
+
+- clocks:
+	Usage: required
+	Value type: <prop-encoded-array>
+	Definition: reference to the xo clock.
+
+- clock-names:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "xo".
+
+- clock-cells:
+	Usage: required
+	Value type: <u32>
+	Definition: shall contain 1.
+
+=======
+Example
+=======
+
+pm8998_clk_divs: clock-controller@5b00 {
+	compatible = "qcom,spmi-clkdiv";
+	reg = <0x5b00>;
+	#clock-cells = <1>;
+	qcom,num-clkdivs = <3>;
+	clocks = <&xo_board>;
+	clock-names = "xo";
+
+	assigned-clocks = <&pm8998_clk_divs 1>,
+			  <&pm8998_clk_divs 2>,
+			  <&pm8998_clk_divs 3>;
+	assigned-clock-rates = <9600000>,
+			       <9600000>,
+			       <9600000>;
+};
Signature · 1 line
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
#7 lore raw
In reply to Tirupathi Reddy

Hi Stephen,

I have addressed the comments given on previous patch versions. Could you please review the patch series ?

Thanks

Tirupathi

Quoted 9 lines · Tirupathi Reddy

The SPMI_PMIC clock divider driver configures the clkdiv modules present on Qualcomm Technologies, Inc. SPMI PMIC. This driver provides a clock interface for each clkdiv module and allows clock operations such as enable, disable, set_rate, recalc_rate and round_rate.

Tirupathi Reddy (2):
clk: qcom: Add spmi_pmic clock divider support
dt-bindings: Add qcom spmi_pmic clock divider bindings

Quoted 8 lines
  .../bindings/clock/qcom,spmi-pmic-div.txt          |  59 ++++
  drivers/clk/qcom/Kconfig                           |   9 +
  drivers/clk/qcom/Makefile                          |   1 +
  drivers/clk/qcom/clk-spmi-pmic-div.c               | 302 +++++++++++++++++++++
  4 files changed, 371 insertions(+)

create mode 100644 Documentation/devicetree/bindings/clock/qcom,spmi-pmic-div.txt create mode 100644 drivers/clk/qcom/clk-spmi-pmic-div.c

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#4 lore raw

Re: [PATCH V7 2/2] dt-bindings: Add qcom spmi_pmic clock divider bindings

In reply to Tirupathi Reddy
Quoted 6 lines · Tirupathi Reddy

This patch adds device tree bindings for Qualcomm SPMI PMIC clock divider module.

---
 .../bindings/clock/qcom,spmi-pmic-div.txt          | 59 ++++++++++++++++++++++

Didn't Stephen say to move this somewhere else?

Quoted 35 lines
 1 file changed, 59 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,spmi-pmic-div.txt
Documentation/devicetree/bindings/clock/qcom,spmi-pmic-div.txt new file +26 -0
new file mode 100644
index 0000000..2cf2aba
@@ -0,0 +1,59 @@
+Qualcomm Technologies, Inc. SPMI PMIC clock divider (clkdiv)
+
+clkdiv configures the clock frequency of a set of outputs on the PMIC.
+These clocks are typically wired through alternate functions on
+gpio pins.
+
+=======================
+Properties
+=======================
+
+- compatible
+	Usage:      required
+	Value type: <string>
+	Definition: must be "qcom,spmi-clkdiv".
+
+- reg
+	Usage:      required
+	Value type: <prop-encoded-array>
+	Definition: base address of CLKDIV peripherals.
+
+- qcom,num-clkdivs
+	Usage:      required
+	Value type: <u32>
+	Definition: number of CLKDIV peripherals.
+
+- clocks:

Documentation/devicetree/bindings/clock/qcom,spmi-pmic-div.txt line 36

Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,spmi-pmic-div.txt new file +10 -0
+	Usage: required
+	Value type: <prop-encoded-array>
+	Definition: reference to the xo clock.
+
+- clock-names:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "xo".
+
+- clock-cells:

#clock-cells

Quoted 26 lines
Documentation/devicetree/bindings/clock/qcom,spmi-pmic-div.txt new file +23 -0
+	Usage: required
+	Value type: <u32>
+	Definition: shall contain 1.
+
+=======
+Example
+=======
+
+pm8998_clk_divs: clock-controller@5b00 {
+	compatible = "qcom,spmi-clkdiv";
+	reg = <0x5b00>;
+	#clock-cells = <1>;
+	qcom,num-clkdivs = <3>;
+	clocks = <&xo_board>;
+	clock-names = "xo";
+
+	assigned-clocks = <&pm8998_clk_divs 1>,
+			  <&pm8998_clk_divs 2>,
+			  <&pm8998_clk_divs 3>;
+	assigned-clock-rates = <9600000>,
+			       <9600000>,
+			       <9600000>;
+};
Signature · 1 line
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
#5 lore raw

Re: [PATCH V7 2/2] dt-bindings: Add qcom spmi_pmic clock divider bindings

Quoted 9 lines · Rob Herring
Quoted 6 lines · Tirupathi Reddy

This patch adds device tree bindings for Qualcomm SPMI PMIC clock divider module.

---
 .../bindings/clock/qcom,spmi-pmic-div.txt          | 59 ++++++++++++++++++++++

Didn't Stephen say to move this somewhere else?

yeah I'll move it to qcom,spmi-clkdiv.txt

Quoted 5 lines
Quoted 2 lines

+
+- clock-cells:

#clock-cells

And fix this. Thanks.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Applied
#6 lore raw

Re: [PATCH V7 2/2] dt-bindings: Add qcom spmi_pmic clock divider bindings

In reply to Tirupathi Reddy
Quoted 5 lines · Tirupathi Reddy

This patch adds device tree bindings for Qualcomm SPMI PMIC clock divider module.

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Applied
#2 lore raw

Re: [PATCH V7 1/2] clk: qcom: Add spmi_pmic clock divider support

In reply to Tirupathi Reddy
Quoted 7 lines · Tirupathi Reddy

Clkdiv module provides a clock output on the PMIC with CXO as the source. This clock can be routed through PMIC GPIOs. Add a device driver to configure this clkdiv module.

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project