MSM8998 Multimedia Clock Controller
v9 cover MSM8998 Multimedia Clock Controller
The multimedia clock controller (mmcc) is the main clock controller for the multimedia subsystem and is required to enable things like display and camera.
v9:
-expand the commit text for the DT changes a bit more to explain some of the extra changes
v8:
-drop dts changes from series per Stephen's request -fix the mislabeled mmcc example
-drop Stephen as maintainer of the mmcc binding
v7:
-port to gcc.yaml. Drop reviewed-by for DT changes as they got completely rewritten
-drop "clk: qcom: smd: Add XO clock for MSM8998". Will need to find another solution and this is not blocking right now
-convert mmcc to yaml
-drop errant clk.h include
-use blank entries in the DT when no clock is available
v6:
-drop clk_get from mmcc clock provider
v5:
-handle the case where gcc uses rpmcc for xo, but the link is not specified in dt -have gcc select rpmcc
v4:
-fix makefile to use correct config item
-pick up tags
-fix ordering of clocks and clock-names in dt
-drop MODULE_ALIAS
-wait for xo in mmcc since that was found to be useful in some debug configs
v3:
-Rebase onto linux-next to get the final version of the clk parent rewrite series
-Moved the bindings header to the bindings patch per Rob
-Made xo manditory for GCC to work around the lack of clk orphan probe defer to avoid the uart console glitch
v2:
-Rebased on the "Rewrite clk parent handling" series and updated to the clk init mechanisms introduced there.
-Marked XO clk as CLK_IGNORE_UNUSED to avoid the concern about the XO going away "incorrectly" during late init
-Corrected the name of the XO clock to "xo"
-Dropped the fake XO clock in GCC to prevent a namespace conflict -Fully enumerated the external clocks (DSI PLLs, etc) in the DT binding -Cleaned up the weird newlines in the added DT node
-Added DT header file to msm8998 DT for future clients
Jeffrey Hugo (4):
dt-bindings: clock: Document external clocks for MSM8998 gcc
dt-bindings: clock: Convert qcom,mmcc to DT schema
dt-bindings: clock: Add support for the MSM8998 mmcc
clk: qcom: Add MSM8998 Multimedia Clock Controller (MMCC) driver
.../devicetree/bindings/clock/qcom,gcc.yaml | 47 +- .../devicetree/bindings/clock/qcom,mmcc.txt | 28 - .../devicetree/bindings/clock/qcom,mmcc.yaml | 95 + drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/mmcc-msm8998.c | 2913 ++++++++++++++++++++ include/dt-bindings/clock/qcom,mmcc-msm8998.h | 210 ++ 7 files changed, 3261 insertions(+), 42 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/qcom,mmcc.txt create mode 100644 Documentation/devicetree/bindings/clock/qcom,mmcc.yaml create mode 100644 drivers/clk/qcom/mmcc-msm8998.c create mode 100644 include/dt-bindings/clock/qcom,mmcc-msm8998.h
Signature · 2 lines
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v9 1/4 dt-bindings: clock: Document external clocks for MSM8998 gcc
The global clock controller on MSM8998 can consume a number of external clocks. Document them.
For 7180 and 8150, the hardware always exists, so no clocks are truly optional. Therefore, simplify the binding by removing the min/max qualifiers to clocks. Also, fixup an example so that dt_binding_check passes.
--- .../devicetree/bindings/clock/qcom,gcc.yaml | 47 +++++++++++++++------- 1 file changed, 33 insertions(+), 14 deletions(-)
Documentation/devicetree/bindings/clock/qcom,gcc.yaml +33 -14
@@ -40,20 +40,38 @@ properties: - qcom,gcc-sm8150 clocks: - minItems: 1 - maxItems: 3 - items: - - description: Board XO source - - description: Board active XO source - - description: Sleep clock source + oneOf: + #qcom,gcc-sm8150 + #qcom,gcc-sc7180 + - items: + - description: Board XO source + - description: Board active XO source + - description: Sleep clock source + #qcom,gcc-msm8998 + - items: + - description: Board XO source + - description: USB 3.0 phy pipe clock + - description: UFS phy rx symbol clock for pipe 0 + - description: UFS phy rx symbol clock for pipe 1 + - description: UFS phy tx symbol clock + - description: PCIE phy pipe clock clock-names: - minItems: 1 - maxItems: 3 - items: - - const: bi_tcxo - - const: bi_tcxo_ao - - const: sleep_clk + oneOf: + #qcom,gcc-sm8150 + #qcom,gcc-sc7180 + - items: + - const: bi_tcxo + - const: bi_tcxo_ao + - const: sleep_clk + #qcom,gcc-msm8998 + - items: + - const: xo + - const: usb3_pipe + - const: ufs_rx_symbol0 + - const: ufs_rx_symbol1 + - const: ufs_tx_symbol0 + - const: pcie0_pipe '#clock-cells': const: 1
@@ -118,6 +136,7 @@ else: compatible: contains: enum: + - qcom,gcc-msm8998 - qcom,gcc-sm8150 - qcom,gcc-sc7180 then:
@@ -179,8 +198,8 @@ examples: clock-controller@100000 { compatible = "qcom,gcc-sc7180"; reg = <0x100000 0x1f0000>; - clocks = <&rpmhcc 0>, <&rpmhcc 1>; - clock-names = "bi_tcxo", "bi_tcxo_ao"; + clocks = <&rpmhcc 0>, <&rpmhcc 1>, <0>; + clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk"; #clock-cells = <1>; #reset-cells = <1>; #power-domain-cells = <1>;
Signature · 2 lines
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v9 1/4] dt-bindings: clock: Document external clocks for MSM8998 gcc
Hi Jeffrey,
Quoted 32 lines · Jeffrey Hugo
The global clock controller on MSM8998 can consume a number of external clocks. Document them.
For 7180 and 8150, the hardware always exists, so no clocks are truly optional. Therefore, simplify the binding by removing the min/max qualifiers to clocks. Also, fixup an example so that
dt_binding_checkpasses.Signed-off-by Jeffrey Hugo <[email protected]>--- .../devicetree/bindings/clock/qcom,gcc.yaml | 47 +++++++++++++++------- 1 file changed, 33 insertions(+), 14 deletions(-)Documentation/devicetree/bindings/clock/qcom,gcc.yaml +5
-6@@ -40,20 +40,38 @@ properties: - qcom,gcc-sm8150 clocks: - minItems: 1 - maxItems: 3 - items: - - description: Board XO source - - description: Board active XO source - - description: Sleep clock source + oneOf: + #qcom,gcc-sm8150 + #qcom,gcc-sc7180 + - items: + - description: Board XO source
Documentation/devicetree/bindings/clock/qcom,gcc.yaml properties: · line 57
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,gcc.yaml +10
-0+ - description: Board active XO source + - description: Sleep clock source + #qcom,gcc-msm8998 + - items: + - description: Board XO source + - description: USB 3.0 phy pipe clock + - description: UFS phy rx symbol clock for pipe 0 + - description: UFS phy rx symbol clock for pipe 1 + - description: UFS phy tx symbol clock + - description: PCIE phy pipe clock
Would it be possible to add an example for MSM8998?
Quoted 5 lines
Documentation/devicetree/bindings/clock/qcom,gcc.yaml +0
-3clock-names: - minItems: 1 - maxItems: 3 - items:
Documentation/devicetree/bindings/clock/qcom,gcc.yaml properties: · line 66
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,gcc.yaml +7
-3- - const: bi_tcxo - - const: bi_tcxo_ao - - const: sleep_clk + oneOf: + #qcom,gcc-sm8150 + #qcom,gcc-sc7180 + - items: + - const: bi_tcxo + - const: bi_tcxo_ao + - const: sleep_clk
Not required for SC7180.
Quoted 20 lines
Documentation/devicetree/bindings/clock/qcom,gcc.yaml +9
-0+ #qcom,gcc-msm8998 + - items: + - const: xo + - const: usb3_pipe + - const: ufs_rx_symbol0 + - const: ufs_rx_symbol1 + - const: ufs_tx_symbol0 + - const: pcie0_pipe '#clock-cells': const: 1@@ -118,6 +136,7 @@ else: compatible: contains: enum: + - qcom,gcc-msm8998 - qcom,gcc-sm8150 - qcom,gcc-sc7180 then:
Documentation/devicetree/bindings/clock/qcom,gcc.yaml examples: · line 202
Quoted 7 lines
Documentation/devicetree/bindings/clock/qcom,gcc.yaml +2
-2@@ -179,8 +198,8 @@ examples: clock-controller@100000 { compatible = "qcom,gcc-sc7180"; reg = <0x100000 0x1f0000>; - clocks = <&rpmhcc 0>, <&rpmhcc 1>; - clock-names = "bi_tcxo", "bi_tcxo_ao"; + clocks = <&rpmhcc 0>, <&rpmhcc 1>, <0>; + clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
SC7180 does not require a sleep clock.
Quoted 4 lines
Documentation/devicetree/bindings/clock/qcom,gcc.yaml +0
-0#clock-cells = <1>; #reset-cells = <1>; #power-domain-cells = <1>;
Signature · 4 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation. --
Re: [PATCH v9 1/4] dt-bindings: clock: Document external clocks for MSM8998 gcc
Quoted 39 lines · Taniya Das
Hi Jeffrey,
Quoted 36 lines · Jeffrey Hugo
The global clock controller on MSM8998 can consume a number of external clocks. Document them.
For 7180 and 8150, the hardware always exists, so no clocks are truly optional. Therefore, simplify the binding by removing the min/max qualifiers to clocks. Also, fixup an example so that
dt_binding_checkpasses.Signed-off-by Jeffrey Hugo <[email protected]>---
.../devicetree/bindings/clock/qcom,gcc.yaml | 47
+++++++++++++++-------1 file changed, 33 insertions(+), 14 deletions(-)Documentation/devicetree/bindings/clock/qcom,gcc.yaml +0
-0@@ -40,20 +40,38 @@ properties:- qcom,gcc-sm8150
clocks:
- minItems: 1
- maxItems: 3
- items:
- - description: Board XO source
- - description: Board active XO source
- - description: Sleep clock source
+ oneOf:
+ #qcom,gcc-sm8150
+ #qcom,gcc-sc7180
+ - items:
+ - description: Board XO source
+ - description: Board active XO source
+ - description: Sleep clock source
+ #qcom,gcc-msm8998
+ - items:
Quoted 8 lines
Quoted 6 lines
+ - description: Board XO source
+ - description: USB 3.0 phy pipe clock
+ - description: UFS phy rx symbol clock for pipe 0 + - description: UFS phy rx symbol clock for pipe 1 + - description: UFS phy tx symbol clock
+ - description: PCIE phy pipe clockWould it be possible to add an example for MSM8998?
It doesn't seem to be materially different that the existing examples, but sure, that's something that can be done.
Quoted 16 lines
Quoted 15 lines
clock-names:
- minItems: 1
- maxItems: 3
- items:
- - const:bi_tcxo
- - const:bi_tcxo_ao
- - const:sleep_clk
+ oneOf:
+ #qcom,gcc-sm8150
+ #qcom,gcc-sc7180
+ - items:
+ - const:bi_tcxo
+ - const:bi_tcxo_ao
+ - const:sleep_clk
Quoted 1 line
Not required for SC7180.
How are you determining this?
Per the earlier discussion with Stephen, if the hardware exists, it should be represented in DT. According to the documentation I see, the sleep clock is routed to the GCC on SC7180. The driver is not required to make use of it. Thus its required from the DT perspective.
Quoted 35 lines
Quoted 20 lines
+ #qcom,gcc-msm8998
+ - items:
+ - const: xo
+ - const:usb3_pipe
+ - const:ufs_rx_symbol0
+ - const:ufs_rx_symbol1
+ - const:ufs_tx_symbol0
+ - const:pcie0_pipe
'#clock-cells':
const: 1Documentation/devicetree/bindings/clock/qcom,gcc.yaml +0
-0@@ -118,6 +136,7 @@ else:compatible:
contains:
enum:
+ - qcom,gcc-msm8998
- qcom,gcc-sm8150
- qcom,gcc-sc7180
then:Documentation/devicetree/bindings/clock/qcom,gcc.yaml examples: · line 202
Quoted 7 lines
Documentation/devicetree/bindings/clock/qcom,gcc.yaml +2
-2@@ -179,8 +198,8 @@ examples: clock-controller@100000 { compatible = "qcom,gcc-sc7180"; reg = <0x100000 0x1f0000>; - clocks = <&rpmhcc 0>, <&rpmhcc 1>; - clock-names = "bi_tcxo", "bi_tcxo_ao"; + clocks = <&rpmhcc 0>, <&rpmhcc 1>, <0>; + clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";SC7180 does not require a sleep clock.
Quoted 4 lines
Documentation/devicetree/bindings/clock/qcom,gcc.yaml +0
-0#clock-cells = <1>; #reset-cells = <1>; #power-domain-cells = <1>;
Signature · 3 lines
Jeffrey Hugo Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v9 1/4] dt-bindings: clock: Document external clocks for MSM8998 gcc
In reply to Jeffrey HugoQuoted 8 lines · Jeffrey Hugo
The global clock controller on MSM8998 can consume a number of external clocks. Document them.
For 7180 and 8150, the hardware always exists, so no clocks are truly optional. Therefore, simplify the binding by removing the min/max qualifiers to clocks. Also, fixup an example so that
dt_binding_checkpasses.
Quoted 4 lines
Signed-off-by Jeffrey Hugo <[email protected]>--- .../devicetree/bindings/clock/qcom,gcc.yaml | 47 +++++++++++++++------- 1 file changed, 33 insertions(+), 14 deletions(-)
PATCH v9 2/4 dt-bindings: clock: Convert qcom,mmcc to DT schema
In reply to Jeffrey HugoConvert the qcom,mmcc-X clock controller binding to DT schema. Add the protected-clocks property to the schema to show that is it explictly allowed, instead of relying on the generic, pre-schema binding.
--- .../devicetree/bindings/clock/qcom,mmcc.txt | 28 ---------- .../devicetree/bindings/clock/qcom,mmcc.yaml | 59 ++++++++++++++++++++++ 2 files changed, 59 insertions(+), 28 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/qcom,mmcc.txt create mode 100644 Documentation/devicetree/bindings/clock/qcom,mmcc.yaml
Documentation/devicetree/bindings/clock/qcom,mmcc.txt deleted +0 -28
@@ -1,28 +0,0 @@ -Qualcomm Multimedia Clock & Reset Controller Binding ----------------------------------------------------- - -Required properties : -- compatible : shall contain only one of the following: - - "qcom,mmcc-apq8064" - "qcom,mmcc-apq8084" - "qcom,mmcc-msm8660" - "qcom,mmcc-msm8960" - "qcom,mmcc-msm8974" - "qcom,mmcc-msm8996" - -- reg : shall contain base register location and length -- #clock-cells : shall contain 1 -- #reset-cells : shall contain 1 - -Optional properties : -- #power-domain-cells : shall contain 1 - -Example: - clock-controller@4000000 { - compatible = "qcom,mmcc-msm8960"; - reg = <0x4000000 0x1000>; - #clock-cells = <1>; - #reset-cells = <1>; - #power-domain-cells = <1>; - };
Documentation/devicetree/bindings/clock/qcom,mmcc.yaml new file +59 -0
59 lines not on this page · raw message
Signature · 2 lines
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v9 3/4 dt-bindings: clock: Add support for the MSM8998 mmcc
In reply to Jeffrey HugoDocument the multimedia clock controller found on MSM8998.
--- .../devicetree/bindings/clock/qcom,mmcc.yaml | 36 ++++ include/dt-bindings/clock/qcom,mmcc-msm8998.h | 210 +++++++++++++++++++++ 2 files changed, 246 insertions(+) create mode 100644 include/dt-bindings/clock/qcom,mmcc-msm8998.h
Documentation/devicetree/bindings/clock/qcom,mmcc.yaml +36 -0
@@ -22,6 +22,31 @@ properties: - qcom,mmcc-msm8960 - qcom,mmcc-msm8974 - qcom,mmcc-msm8996 + - qcom,mmcc-msm8998 + + clocks: + items: + - description: Board XO source + - description: Global PLL 0 clock + - description: DSI phy instance 0 dsi clock + - description: DSI phy instance 0 byte clock + - description: DSI phy instance 1 dsi clock + - description: DSI phy instance 1 byte clock + - description: HDMI phy PLL clock + - description: DisplayPort phy PLL vco clock + - description: DisplayPort phy PLL link clock + + clock-names: + items: + - const: xo + - const: gpll0 + - const: dsi0dsi + - const: dsi0byte + - const: dsi1dsi + - const: dsi1byte + - const: hdmipll + - const: dpvco + - const: dplink '#clock-cells': const: 1
@@ -46,6 +71,17 @@ required: - '#reset-cells' - '#power-domain-cells' +if: + properties: + compatible: + contains: + const: qcom,mmcc-msm8998 + +then: + required: + - clocks + - clock-names + examples: # Example for MMCC for MSM8960: - |
include/dt-bindings/clock/qcom,mmcc-msm8998.h new file +210 -0
210 lines not on this page · raw message
Signature · 2 lines
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v9 4/4 clk: qcom: Add MSM8998 Multimedia Clock Controller (MMCC) driver
In reply to Jeffrey HugoAdd a driver for the multimedia clock controller found on MSM8998 based devices. This should allow most multimedia device drivers to probe and control their clocks.
--- drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/mmcc-msm8998.c | 2913 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 2923 insertions(+) create mode 100644 drivers/clk/qcom/mmcc-msm8998.c
drivers/clk/qcom/Kconfig +9 -0
@@ -229,6 +229,15 @@ config MSM_GPUCC_8998 Say Y if you want to support graphics controller devices and functionality such as 3D graphics. +config MSM_MMCC_8998 + tristate "MSM8998 Multimedia Clock Controller" + select MSM_GCC_8998 + select QCOM_GDSC + help + Support for the multimedia clock controller on msm8998 devices. + Say Y if you want to support multimedia devices such as display, + graphics, video encode/decode, camera, etc. + config QCS_GCC_404 tristate "QCS404 Global Clock Controller" help
drivers/clk/qcom/Makefile +1 -0
@@ -37,6 +37,7 @@ obj-$(CONFIG_MSM_GPUCC_8998) += gpucc-msm8998.o obj-$(CONFIG_MSM_MMCC_8960) += mmcc-msm8960.o obj-$(CONFIG_MSM_MMCC_8974) += mmcc-msm8974.o obj-$(CONFIG_MSM_MMCC_8996) += mmcc-msm8996.o +obj-$(CONFIG_MSM_MMCC_8998) += mmcc-msm8998.o obj-$(CONFIG_QCOM_A53PLL) += a53-pll.o obj-$(CONFIG_QCOM_CLK_APCS_MSM8916) += apcs-msm8916.o obj-$(CONFIG_QCOM_CLK_RPM) += clk-rpm.o
drivers/clk/qcom/mmcc-msm8998.c new file +2913 -0
2,913 lines not on this page · raw message
Signature · 2 lines
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.