Skip to contentSkip to conversation

Add display clock controller driver for SDM845

PATCH Superseded Taniya Das 3 participants 7 messages Jun 13, 2018 – Jun 23, 2018

Subsystems (4)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Taniya Das

author
#0 lore raw

v2 cover Add display clock controller driver for SDM845

[v2]
* Removed unused header file includes.
* Moved the frequency table macro to a common file [1].
* Move to pll config to probe.
* Update SoC name in device tree binding and also update the Kconfig.

Add support for the display clock controller found on SDM845 based devices. This would allow display drivers to probe and control their clocks.

The Display clock driver depends on the frequency table macro movement to a common file [1].

[1]: https://lkml.org/lkml/2018/6/13/216

Taniya Das (2):
dt-bindings: clock: Introduce QCOM Display clock bindings
clk: qcom: Add display clock controller driver for SDM845

 .../devicetree/bindings/clock/qcom,dispcc.txt      |  19 +
 drivers/clk/qcom/Kconfig                           |  10 +
 drivers/clk/qcom/Makefile                          |   1 +
 drivers/clk/qcom/dispcc-sdm845.c                   | 674 +++++++++++++++++++++
 include/dt-bindings/clock/qcom,dispcc-sdm845.h     |  45 ++
 5 files changed, 749 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,dispcc.txt
 create mode 100644 drivers/clk/qcom/dispcc-sdm845.c
 create mode 100644 include/dt-bindings/clock/qcom,dispcc-sdm845.h

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.

author
#1 lore raw

PATCH v2 1/2 dt-bindings: clock: Introduce QCOM Display clock bindings

Add device tree bindings for display clock controller for Qualcomm Technology Inc's SDM845 SoCs.

---
 .../devicetree/bindings/clock/qcom,dispcc.txt      | 19 +++++++++
 include/dt-bindings/clock/qcom,dispcc-sdm845.h     | 45 ++++++++++++++++++++++
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,dispcc.txt
 create mode 100644 include/dt-bindings/clock/qcom,dispcc-sdm845.h
Documentation/devicetree/bindings/clock/qcom,dispcc.txt new file +19 -0
new file mode 100644
index 0000000..d639e18
@@ -0,0 +1,19 @@
+Qualcomm Technologies, Inc. Display Clock Controller Binding
+------------------------------------------------------------
+
+Required properties :
+
+- compatible : shall contain "qcom,sdm845-dispcc"
+- reg : shall contain base register location and length.
+- #clock-cells : from common clock binding, shall contain 1.
+- #reset-cells : from common reset binding, shall contain 1.
+- #power-domain-cells : from generic power domain binding, shall contain 1.
+
+Example:
+	dispcc: clock-controller@af00000 {
+		compatible = "qcom,sdm845-dispcc";
+		reg = <0xaf00000 0x100000>;
+		#clock-cells = <1>;
+		#reset-cells = <1>;
+		#power-domain-cells = <1>;
+	};
include/dt-bindings/clock/qcom,dispcc-sdm845.h new file +45 -0

45 lines not on this page · raw message

Signature · 2 lines
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member
of the Code Aurora Forum, hosted by the  Linux Foundation.
author
#2 lore raw

PATCH v2 2/2 clk: qcom: Add display clock controller driver for SDM845

In reply to Taniya Das

Add support for the display clock controller found on SDM845 based devices. This would allow display drivers to probe and control their clocks.

---
 drivers/clk/qcom/Kconfig         |  10 +
 drivers/clk/qcom/Makefile        |   1 +
 drivers/clk/qcom/dispcc-sdm845.c | 674 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 685 insertions(+)
 create mode 100644 drivers/clk/qcom/dispcc-sdm845.c
drivers/clk/qcom/Kconfig +10 -0
index 9c3480d..7300574 100644
@@ -245,6 +245,16 @@ config SDM_VIDEOCC_845
 	  Say Y if you want to support video devices and functionality such as
 	  video encode and decode.
 
+config SDM_DISPCC_845
+	tristate "SDM845 Display Clock Controller"
+	select SDM_GCC_845
+	depends on COMMON_CLK_QCOM
+	help
+	  Support for the display clock controller on Qualcomm Technologies, Inc
+	  SDM845 devices.
+	  Say Y if you want to support display devices and functionality such as
+	  splash screen.
+
 config SPMI_PMIC_CLKDIV
 	tristate "SPMI PMIC clkdiv Support"
 	depends on (COMMON_CLK_QCOM && SPMI) || COMPILE_TEST
drivers/clk/qcom/Makefile +1 -0
index 762c011..2b041b2d 100644
@@ -38,6 +38,7 @@ obj-$(CONFIG_QCOM_A53PLL) += a53-pll.o
 obj-$(CONFIG_QCOM_CLK_APCS_MSM8916) += apcs-msm8916.o
 obj-$(CONFIG_QCOM_CLK_RPM) += clk-rpm.o
 obj-$(CONFIG_QCOM_CLK_SMD_RPM) += clk-smd-rpm.o
+obj-$(CONFIG_SDM_DISPCC_845) += dispcc-sdm845.o
 obj-$(CONFIG_SDM_GCC_845) += gcc-sdm845.o
 obj-$(CONFIG_SDM_VIDEOCC_845) += videocc-sdm845.o
 obj-$(CONFIG_SPMI_PMIC_CLKDIV) += clk-spmi-pmic-div.o
drivers/clk/qcom/dispcc-sdm845.c new file +674 -0

674 lines not on this page · raw message

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

Re: [PATCH v2 2/2] clk: qcom: Add display clock controller driver for SDM845

Thank you for the patch! Yet something to improve:

Hi Taniya,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on clk/clk-next]
[also build test ERROR on next-20180613]
[cannot apply to v4.17]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Taniya-Das/Add-display-clock-controller-driver-for-SDM845/20180613-183754
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=sh

All error/warnings (new ones prefixed by >>):

>> drivers/clk/qcom/dispcc-sdm845.c:130:2: error: implicit declaration of function 'F' [-Werror=implicit-function-declaration]
     F(19200000, P_BI_TCXO, 1, 0, 0),
     ^
>> drivers/clk/qcom/dispcc-sdm845.c:130:2: error: initializer element is not constant
   drivers/clk/qcom/dispcc-sdm845.c:130:2: note: (near initialization for 'ftbl_disp_cc_mdss_esc0_clk_src[0].freq')
>> drivers/clk/qcom/dispcc-sdm845.c:131:2: warning: braces around scalar initializer
     { }
     ^
   drivers/clk/qcom/dispcc-sdm845.c:131:2: note: (near initialization for 'ftbl_disp_cc_mdss_esc0_clk_src[0].src')
   drivers/clk/qcom/dispcc-sdm845.c:163:2: error: initializer element is not constant
     F(19200000, P_BI_TCXO, 1, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:163:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[0].freq')
   drivers/clk/qcom/dispcc-sdm845.c:164:2: error: initializer element is not constant
     F(85714286, P_GPLL0_OUT_MAIN, 7, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:164:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[0].src')
   drivers/clk/qcom/dispcc-sdm845.c:165:2: error: initializer element is not constant
     F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:165:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[0].pre_div')
   drivers/clk/qcom/dispcc-sdm845.c:166:2: error: initializer element is not constant
     F(150000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:166:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[0].m')
   drivers/clk/qcom/dispcc-sdm845.c:167:2: error: initializer element is not constant
     F(171428571, P_GPLL0_OUT_MAIN, 3.5, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:167:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[0].n')
   drivers/clk/qcom/dispcc-sdm845.c:168:2: error: initializer element is not constant
     F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:168:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[1].freq')
   drivers/clk/qcom/dispcc-sdm845.c:169:2: error: initializer element is not constant
     F(300000000, P_GPLL0_OUT_MAIN, 2, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:169:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[1].src')
   drivers/clk/qcom/dispcc-sdm845.c:170:2: error: initializer element is not constant
     F(344000000, P_DISP_CC_PLL0_OUT_MAIN, 2.5, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:170:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[1].pre_div')
   drivers/clk/qcom/dispcc-sdm845.c:171:2: error: initializer element is not constant
     F(430000000, P_DISP_CC_PLL0_OUT_MAIN, 2, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:171:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[1].m')
   drivers/clk/qcom/dispcc-sdm845.c:172:2: warning: braces around scalar initializer
     { }
     ^
   drivers/clk/qcom/dispcc-sdm845.c:172:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[1].n')
   drivers/clk/qcom/dispcc-sdm845.c:218:2: error: initializer element is not constant
     F(19200000, P_BI_TCXO, 1, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:218:2: note: (near initialization for 'ftbl_disp_cc_mdss_rot_clk_src[0].freq')
   drivers/clk/qcom/dispcc-sdm845.c:219:2: error: initializer element is not constant
     F(171428571, P_GPLL0_OUT_MAIN, 3.5, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:219:2: note: (near initialization for 'ftbl_disp_cc_mdss_rot_clk_src[0].src')
   drivers/clk/qcom/dispcc-sdm845.c:220:2: error: initializer element is not constant
     F(300000000, P_GPLL0_OUT_MAIN, 2, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:220:2: note: (near initialization for 'ftbl_disp_cc_mdss_rot_clk_src[0].pre_div')
   drivers/clk/qcom/dispcc-sdm845.c:221:2: error: initializer element is not constant
     F(344000000, P_DISP_CC_PLL0_OUT_MAIN, 2.5, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:221:2: note: (near initialization for 'ftbl_disp_cc_mdss_rot_clk_src[0].m')
   drivers/clk/qcom/dispcc-sdm845.c:222:2: error: initializer element is not constant
     F(430000000, P_DISP_CC_PLL0_OUT_MAIN, 2, 0, 0),
     ^

drivers/clk/qcom/dispcc-sdm845.c:222:2: note: (near initialization for 'ftbl_disp_cc_mdss_rot_clk_src[0].n')
cc1: some warnings being treated as errors

vim +/F +130 drivers/clk/qcom/dispcc-sdm845.c

128
129 static const struct freq_tbl ftbl_disp_cc_mdss_esc0_clk_src[] = {

 > 130		F(19200000, P_BI_TCXO, 1, 0, 0),
 > 131		{ }

132 };
133

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#4 lore raw

Re: [PATCH v2 2/2] clk: qcom: Add display clock controller driver for SDM845

In reply to Taniya Das
Thank you for the patch! Yet something to improve:

Hi Taniya,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on clk/clk-next]
[also build test ERROR on next-20180613]
[cannot apply to v4.17]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Taniya-Das/Add-display-clock-controller-driver-for-SDM845/20180613-183754
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> drivers/clk/qcom/dispcc-sdm845.c:130:2: error: implicit declaration of function 'F'; did you mean 'FS'? [-Werror=implicit-function-declaration]
     F(19200000, P_BI_TCXO, 1, 0, 0),
     ^
     FS
   drivers/clk/qcom/dispcc-sdm845.c:130:2: error: initializer element is not constant
   drivers/clk/qcom/dispcc-sdm845.c:130:2: note: (near initialization for 'ftbl_disp_cc_mdss_esc0_clk_src[0].freq')
   drivers/clk/qcom/dispcc-sdm845.c:131:2: warning: braces around scalar initializer
     { }
     ^
   drivers/clk/qcom/dispcc-sdm845.c:131:2: note: (near initialization for 'ftbl_disp_cc_mdss_esc0_clk_src[0].src')
   drivers/clk/qcom/dispcc-sdm845.c:163:2: error: initializer element is not constant
     F(19200000, P_BI_TCXO, 1, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:163:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[0].freq')
   drivers/clk/qcom/dispcc-sdm845.c:164:2: error: initializer element is not constant
     F(85714286, P_GPLL0_OUT_MAIN, 7, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:164:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[0].src')
   drivers/clk/qcom/dispcc-sdm845.c:165:2: error: initializer element is not constant
     F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:165:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[0].pre_div')
   drivers/clk/qcom/dispcc-sdm845.c:166:2: error: initializer element is not constant
     F(150000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:166:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[0].m')
   drivers/clk/qcom/dispcc-sdm845.c:167:2: error: initializer element is not constant
     F(171428571, P_GPLL0_OUT_MAIN, 3.5, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:167:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[0].n')
   drivers/clk/qcom/dispcc-sdm845.c:168:2: error: initializer element is not constant
     F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:168:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[1].freq')
   drivers/clk/qcom/dispcc-sdm845.c:169:2: error: initializer element is not constant
     F(300000000, P_GPLL0_OUT_MAIN, 2, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:169:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[1].src')
   drivers/clk/qcom/dispcc-sdm845.c:170:2: error: initializer element is not constant
     F(344000000, P_DISP_CC_PLL0_OUT_MAIN, 2.5, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:170:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[1].pre_div')
   drivers/clk/qcom/dispcc-sdm845.c:171:2: error: initializer element is not constant
     F(430000000, P_DISP_CC_PLL0_OUT_MAIN, 2, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:171:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[1].m')
   drivers/clk/qcom/dispcc-sdm845.c:172:2: warning: braces around scalar initializer
     { }
     ^
   drivers/clk/qcom/dispcc-sdm845.c:172:2: note: (near initialization for 'ftbl_disp_cc_mdss_mdp_clk_src[1].n')
   drivers/clk/qcom/dispcc-sdm845.c:218:2: error: initializer element is not constant
     F(19200000, P_BI_TCXO, 1, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:218:2: note: (near initialization for 'ftbl_disp_cc_mdss_rot_clk_src[0].freq')
   drivers/clk/qcom/dispcc-sdm845.c:219:2: error: initializer element is not constant
     F(171428571, P_GPLL0_OUT_MAIN, 3.5, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:219:2: note: (near initialization for 'ftbl_disp_cc_mdss_rot_clk_src[0].src')
   drivers/clk/qcom/dispcc-sdm845.c:220:2: error: initializer element is not constant
     F(300000000, P_GPLL0_OUT_MAIN, 2, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:220:2: note: (near initialization for 'ftbl_disp_cc_mdss_rot_clk_src[0].pre_div')
   drivers/clk/qcom/dispcc-sdm845.c:221:2: error: initializer element is not constant
     F(344000000, P_DISP_CC_PLL0_OUT_MAIN, 2.5, 0, 0),
     ^
   drivers/clk/qcom/dispcc-sdm845.c:221:2: note: (near initialization for 'ftbl_disp_cc_mdss_rot_clk_src[0].m')
   drivers/clk/qcom/dispcc-sdm845.c:222:2: error: initializer element is not constant
     F(430000000, P_DISP_CC_PLL0_OUT_MAIN, 2, 0, 0),
     ^

drivers/clk/qcom/dispcc-sdm845.c:222:2: note: (near initialization for 'ftbl_disp_cc_mdss_rot_clk_src[0].n')
cc1: some warnings being treated as errors

vim +130 drivers/clk/qcom/dispcc-sdm845.c

128
129 static const struct freq_tbl ftbl_disp_cc_mdss_esc0_clk_src[] = {

 > 130		F(19200000, P_BI_TCXO, 1, 0, 0),

131 { }
132 };
133

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

maintainer
#5 lore raw
In reply to Taniya Das

Quoting Taniya Das (2018-06-13 03:33:15)

Quoted 7 lines

[v2]
* Removed unused header file includes.
* Moved the frequency table macro to a common file [1].
* Move to pll config to probe.
* Update SoC name in device tree binding and also update the Kconfig.

Quoted 6 lines

Add support for the display clock controller found on SDM845 based devices. This would allow display drivers to probe and control their clocks.

The Display clock driver depends on the frequency table macro movement to a common file [1].

Please send that patch along with these patches so the dependency is clear.

Quoted 3 lines

[1]: https://lkml.org/lkml/2018/6/13/216

author
#6 lore raw

Hello Stephen,

Thanks for the comments.

Quoted 12 lines · Stephen Boyd

Quoting Taniya Das (2018-06-13 03:33:15)

Quoted 11 lines

[v2]
* Removed unused header file includes.
* Moved the frequency table macro to a common file [1].
* Move to pll config to probe.
* Update SoC name in device tree binding and also update the Kconfig.

Add support for the display clock controller found on SDM845 based devices. This would allow display drivers to probe and control their clocks.

Quoted 6 lines
Quoted 2 lines

The Display clock driver depends on the frequency table macro movement to a common file [1].

Please send that patch along with these patches so the dependency is clear.

Please check the latest patch series :
https://lkml.org/lkml/2018/6/23/109

Quoted 3 lines
Quoted 3 lines

[1]: https://lkml.org/lkml/2018/6/13/216

Signature · 4 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--