Skip to contentSkip to conversation

clk: qcom: Add APQ8084 Global Clock Controller support

PATCH Superseded Georgi Djakov 3 participants 12 messages May 31, 2014 – Jun 2, 2014

Subsystems (5)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover clk: qcom: Add APQ8084 Global Clock Controller support

This patchset adds support for the global clock controller found on the APQ8084 based platforms.

Patches 1,2 can go through clk-next and 3,4 through arm-soc.

Changes from v1:
- Moved APQ8084 clocks into a separate file and under separate Kconfig entry. Dropped the override function patch from v1.
- Added the missing information about resets (suggested by Kumar Gala).
- Made the UART DT node "disabled" in dtsi and "okay" in dts (suggested by Kumar Gala)

Georgi Djakov (4):
clk: qcom: Add APQ8084 Global Clock Controller documentation
clk: qcom: Add APQ8084 Global Clock Controller support
ARM: dts: qcom: Add APQ8084 Global Clock Controller DT node
ARM: dts: qcom: Add APQ8084 serial port DT node

 .../devicetree/bindings/clock/qcom,gcc.txt         |    1 +
 arch/arm/boot/dts/qcom-apq8084-mtp.dts             |    6 +
 arch/arm/boot/dts/qcom-apq8084.dtsi                |   18 +
 drivers/clk/qcom/Kconfig                           |    8 +
 drivers/clk/qcom/Makefile                          |    1 +
 drivers/clk/qcom/gcc-apq8084.c                     | 2951 ++++++++++++++++++++
 include/dt-bindings/clock/qcom,gcc-apq8084.h       |  337 +++
 include/dt-bindings/reset/qcom,gcc-apq8084.h       |  116 +
 8 files changed, 3438 insertions(+)
 create mode 100644 drivers/clk/qcom/gcc-apq8084.c
 create mode 100644 include/dt-bindings/clock/qcom,gcc-apq8084.h
 create mode 100644 include/dt-bindings/reset/qcom,gcc-apq8084.h
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/4 clk: qcom: Add APQ8084 Global Clock Controller documentation

Add the compatible string for the APQ8084 global clock controller to the clock binding documentation.

---
 .../devicetree/bindings/clock/qcom,gcc.txt         |    1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/clock/qcom,gcc.txt +1 -0
index 7b7104e..13fc1ef 100644
@@ -5,6 +5,7 @@ Required properties :
 - compatible : shall contain only one of the following:
 
 			"qcom,gcc-apq8064"
+			"qcom,gcc-apq8084"
 			"qcom,gcc-msm8660"
 			"qcom,gcc-msm8960"
 			"qcom,gcc-msm8974"
Signature · 1 line
1.7.9.5
Reviewed-by on v2 1/4
#2 lore raw

Re: [PATCH v2 1/4] clk: qcom: Add APQ8084 Global Clock Controller documentation

Quoted 4 lines · Georgi Djakov

Add the compatible string for the APQ8084 global clock controller to the clock binding documentation.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#3 lore raw

PATCH v2 2/4 clk: qcom: Add APQ8084 Global Clock Controller support

In reply to Georgi Djakov

This patch adds support for the global clock controller found on the APQ8084 based devices. This includes UART, I2C, SPI etc.

---
 drivers/clk/qcom/Kconfig                     |    8 +
 drivers/clk/qcom/Makefile                    |    1 +
 drivers/clk/qcom/gcc-apq8084.c               | 2951 ++++++++++++++++++++++++++
 include/dt-bindings/clock/qcom,gcc-apq8084.h |  337 +++
 include/dt-bindings/reset/qcom,gcc-apq8084.h |  116 +
 5 files changed, 3413 insertions(+)
 create mode 100644 drivers/clk/qcom/gcc-apq8084.c
 create mode 100644 include/dt-bindings/clock/qcom,gcc-apq8084.h
 create mode 100644 include/dt-bindings/reset/qcom,gcc-apq8084.h
drivers/clk/qcom/Kconfig +8 -0
index 7f696b7..e7516c2 100644
@@ -4,6 +4,14 @@ config COMMON_CLK_QCOM
 	select REGMAP_MMIO
 	select RESET_CONTROLLER
 
+config APQ_GCC_8084
+	tristate "APQ8084 Global Clock Controller"
+	depends on COMMON_CLK_QCOM
+	help
+	  Support for the global clock controller on apq8084 devices.
+	  Say Y if you want to use peripheral devices such as UART, SPI,
+	  i2c, USB, SD/eMMC, SATA, PCIe, etc.
+
 config MSM_GCC_8660
 	tristate "MSM8660 Global Clock Controller"
 	depends on COMMON_CLK_QCOM
drivers/clk/qcom/Makefile +1 -0
index 689e05b..196a5df 100644
@@ -8,6 +8,7 @@ clk-qcom-y += clk-rcg2.o
 clk-qcom-y += clk-branch.o
 clk-qcom-y += reset.o
 
+obj-$(CONFIG_APQ_GCC_8084) += gcc-apq8084.o
 obj-$(CONFIG_MSM_GCC_8660) += gcc-msm8660.o
 obj-$(CONFIG_MSM_GCC_8960) += gcc-msm8960.o
 obj-$(CONFIG_MSM_GCC_8974) += gcc-msm8974.o
drivers/clk/qcom/gcc-apq8084.c new file +2951 -0

2,951 lines not on this page · raw message

include/dt-bindings/clock/qcom,gcc-apq8084.h new file +337 -0

28 lines not on this page · raw message

include/dt-bindings/reset/qcom,gcc-apq8084.h new file +116 -0

116 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.9.5

Part of the diff is not shown here. View the raw message.

#4 lore raw

drivers/clk/qcom/gcc-apq8084.c line 2878

Quoted 12 lines · Georgi Djakov
drivers/clk/qcom/gcc-apq8084.c new file +9 -0
+
+static const struct qcom_reset_map gcc_apq8084_resets[] = {
 
+	[GCC_VENUS0_BCR] = { 0x1020 },
 
+	[GCC_VPU_BCR] = { 0x1400 },
 
+	[GCC_MDSS_BCR] = { 0x2300 },
+	[GCC_AVSYNC_BCR] = { 0x2400 },
+	[GCC_OXILI_BCR] = { 0x4020 },
+	[GCC_OXILICX_BCR] = { 0x4030 },
+	[GCC_OCMEMCX_BCR] = { 0x4050 },

These aren't in global clock control (looks like mmcc).

include/dt-bindings/reset/qcom,gcc-apq8084.h line 114

Quoted 10 lines
include/dt-bindings/reset/qcom,gcc-apq8084.h new file +7 -0
+#define GCC_VENUS0_BCR			56
 
+#define GCC_VPU_BCR			76
 
 
+#define GCC_MDSS_BCR			93
+#define GCC_AVSYNC_BCR			94
+#define GCC_OXILI_BCR			95
+#define GCC_OXILICX_BCR			96
+#define GCC_OCMEMCX_BCR			97

Ditto

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#5 lore raw
Quoted 8 lines · Stephen Boyd
Quoted 6 lines · Georgi Djakov
drivers/clk/qcom/gcc-apq8084.c new file +4 -0
+
+static const struct qcom_reset_map gcc_apq8084_resets[] = {
 
+	[GCC_VENUS0_BCR] = { 0x1020 },
 
+	[GCC_VPU_BCR] = { 0x1400 },
Quoted 8 lines

drivers/clk/qcom/gcc-apq8084.c line 2878

Quoted 5 lines
drivers/clk/qcom/gcc-apq8084.c new file +5 -0
+	[GCC_MDSS_BCR] = { 0x2300 },
+	[GCC_AVSYNC_BCR] = { 0x2400 },
+	[GCC_OXILI_BCR] = { 0x4020 },
+	[GCC_OXILICX_BCR] = { 0x4030 },
+	[GCC_OCMEMCX_BCR] = { 0x4050 },

These aren't in global clock control (looks like mmcc).

Will remove it!

Quoted 5 lines
Quoted 3 lines
include/dt-bindings/reset/qcom,gcc-apq8084.h new file +2 -0
+#define GCC_VENUS0_BCR			56
 
+#define GCC_VPU_BCR			76
Quoted 8 lines

include/dt-bindings/reset/qcom,gcc-apq8084.h line 114

Quoted 5 lines
include/dt-bindings/reset/qcom,gcc-apq8084.h new file +5 -0
+#define GCC_MDSS_BCR			93
+#define GCC_AVSYNC_BCR			94
+#define GCC_OXILI_BCR			95
+#define GCC_OXILICX_BCR			96
+#define GCC_OCMEMCX_BCR			97

Ditto

Thank you for reviewing the patches!

#6 lore raw

PATCH v2 3/4 ARM: dts: qcom: Add APQ8084 Global Clock Controller DT node

In reply to Georgi Djakov

This patch adds the necessary node to probe the global clock controller on APQ8084 platforms.

---
 arch/arm/boot/dts/qcom-apq8084.dtsi |   10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/qcom-apq8084.dtsi +10 -0
index e3e009a..1e785df 100644
@@ -2,6 +2,8 @@
 
 #include "skeleton.dtsi"
 
+#include <dt-bindings/clock/qcom,gcc-apq8084.h>
+
 / {
 	model = "Qualcomm APQ 8084";
 	compatible = "qcom,apq8084";
@@ -175,5 +177,13 @@
 			compatible = "qcom,pshold";
 			reg = <0xfc4ab000 0x4>;
 		};
+
+		gcc: clock-controller at fc400000 {
+			compatible = "qcom,gcc-apq8084";
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+			reg = <0xfc400000 0x4000>;
+		};
+
 	};
 };
Signature · 1 line
1.7.9.5
Reviewed-by on v2 3/4
#7 lore raw

Re: [PATCH v2 3/4] ARM: dts: qcom: Add APQ8084 Global Clock Controller DT node

Quoted 4 lines · Georgi Djakov

This patch adds the necessary node to probe the global clock controller on APQ8084 platforms.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#8 lore raw

Re: [PATCH v2 3/4] ARM: dts: qcom: Add APQ8084 Global Clock Controller DT node

In reply to Georgi Djakov
Quoted 7 lines · Georgi Djakov

This patch adds the necessary node to probe the global clock controller on APQ8084 platforms.

---
arch/arm/boot/dts/qcom-apq8084.dtsi | 10 ++++++++++

1 file changed, 10 insertions(+)

Can you split the 2 DT patches into their own patchset since they will go via the qcom/arm-soc tree and not Mike?s clk tree.

thanks

- k

Signature · 2 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
#9 lore raw

Re: [PATCH v2 3/4] ARM: dts: qcom: Add APQ8084 Global Clock Controller DT node

Quoted 6 lines · Kumar Gala
Quoted 3 lines · Georgi Djakov

This patch adds the necessary node to probe the global clock controller on APQ8084 platforms.

Quoted 9 lines
Quoted 4 lines

---
arch/arm/boot/dts/qcom-apq8084.dtsi | 10 ++++++++++

1 file changed, 10 insertions(+)

Can you split the 2 DT patches into their own patchset since they will go via the qcom/arm-soc tree and not Mike?s clk tree.

thanks

Sure! Thanks!

#10 lore raw

PATCH v2 4/4 ARM: dts: qcom: Add APQ8084 serial port DT node

In reply to Georgi Djakov

Add the necessary DT node to probe the serial driver on APQ8084 platforms.

---
 arch/arm/boot/dts/qcom-apq8084-mtp.dts |    6 ++++++
 arch/arm/boot/dts/qcom-apq8084.dtsi    |    8 ++++++++
 2 files changed, 14 insertions(+)
arch/arm/boot/dts/qcom-apq8084-mtp.dts +6 -0
index 9dae387..5e37f6c 100644
@@ -3,4 +3,10 @@
 / {
 	model = "Qualcomm APQ 8084-MTP";
 	compatible = "qcom,apq8084-mtp", "qcom,apq8084";
+
+	soc {
+		serial at f995e000 {
+			status = "okay";
+		};
+	};
 };
arch/arm/boot/dts/qcom-apq8084.dtsi +8 -0
index 1e785df..b5b156e 100644
@@ -185,5 +185,13 @@
 			reg = <0xfc400000 0x4000>;
 		};
 
+		serial at f995e000 {
+			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
+			reg = <0xf995e000 0x1000>;
+			interrupts = <0 114 0x0>;
+			clocks = <&gcc GCC_BLSP2_UART2_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>;
+			clock-names = "core", "iface";
+			status = "disabled";
+		};
 	};
 };
Signature · 1 line
1.7.9.5
Reviewed-by on v2 4/4
#11 lore raw

Re: [PATCH v2 4/4] ARM: dts: qcom: Add APQ8084 serial port DT node

Quoted 4 lines · Georgi Djakov

Add the necessary DT node to probe the serial driver on APQ8084 platforms.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation