MSM8998 Multimedia Clock Controller
Subsystems (5)
v7 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.
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 (6):
dt-bindings: clock: Document external clocks for MSM8998 gcc
arm64: dts: msm8998: Add xo clock to gcc node
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
arm64: dts: qcom: msm8998: Add mmcc node
.../devicetree/bindings/clock/qcom,gcc.yaml | 47 +- .../devicetree/bindings/clock/qcom,mmcc.txt | 28 - .../devicetree/bindings/clock/qcom,mmcc.yaml | 96 + arch/arm64/boot/dts/qcom/msm8998.dtsi | 40 + 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 ++ 8 files changed, 3302 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 · 1 line
2.17.1
PATCH v7 1/6 dt-bindings: clock: Document external clocks for MSM8998 gcc
The global clock controller on MSM8998 can consume a number of external clocks. Document them.
--- .../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 · 1 line
2.17.1
Stephen Boyd
maintainerRe: [PATCH v7 1/6] dt-bindings: clock: Document external clocks for MSM8998 gcc
Quoting Jeffrey Hugo (2019-11-08 13:11:58)
Quoted 5 lines
The global clock controller on MSM8998 can consume a number of external clocks. Document them.
Signed-off-by Jeffrey Hugo <[email protected]>---
Cool thanks. I'll wait for Rob to review.
PATCH v7 2/6 arm64: dts: msm8998: Add xo clock to gcc node
In reply to Jeffrey HugoGCC is a consumer of the xo clock. Add a reference to the clock supplier to the gcc node.
--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/qcom/msm8998.dtsi +12 -0
@@ -793,6 +793,18 @@ #reset-cells = <1>; #power-domain-cells = <1>; reg = <0x00100000 0xb0000>; + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, + <0>, + <0>, + <0>, + <0>, + <0>; + clock-names = "xo", + "usb3_pipe", + "ufs_rx_symbol0", + "ufs_rx_symbol1", + "ufs_tx_symbol0", + "pcie0_pipe"; }; rpm_msg_ram: memory@778000 {
Signature · 1 line
2.17.1
PATCH v7 3/6 dt-bindings: clock: Convert qcom,mmcc to DT schema
In reply to Jeffrey HugoConvert the qcom,mmcc-X clock controller binding to DT schema.
--- .../devicetree/bindings/clock/qcom,mmcc.txt | 28 --------- .../devicetree/bindings/clock/qcom,mmcc.yaml | 60 +++++++++++++++++++ 2 files changed, 60 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 +60 -0
60 lines not on this page · raw message
Signature · 1 line
2.17.1
Stephen Boyd
maintainerRe: [PATCH v7 3/6] dt-bindings: clock: Convert qcom,mmcc to DT schema
Quoting Jeffrey Hugo (2019-11-08 13:13:59)
Quoted 6 lines
Documentation/devicetree/bindings/clock/qcom,mmcc.yaml new file +0
-0
Documentation/devicetree/bindings/clock/qcom,mmcc.yaml line 10
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,mmcc.yaml new file +10
-0@@ -0,0 +1,60 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bindings/clock/qcom,mmcc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Multimedia Clock & Reset Controller Binding + +maintainers: + - Stephen Boyd <[email protected]>
I'm maintainer? :) I guess it's fine, but probably should be someone at qcom instead like Taniya?
Quoted 31 lines
Documentation/devicetree/bindings/clock/qcom,mmcc.yaml new file +31
-0+ - Jeffrey Hugo <[email protected]> + +description: | + Qualcomm multimedia clock control module which supports the clocks, resets and + power domains. + +properties: + compatible : + enum: + - qcom,mmcc-apq8064 + - qcom,mmcc-apq8084 + - qcom,mmcc-msm8660 + - qcom,mmcc-msm8960 + - qcom,mmcc-msm8974 + - qcom,mmcc-msm8996 + + '#clock-cells': + const: 1 + + '#reset-cells': + const: 1 + + '#power-domain-cells': + const: 1 + + reg: + maxItems: 1 + + protected-clocks: + description: + Protected clock specifier list as per common clock binding
Documentation/devicetree/bindings/clock/qcom,mmcc.yaml line 51
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,mmcc.yaml new file +10
-0+ +required: + - compatible + - reg + - '#clock-cells' + - '#reset-cells' + - '#power-domain-cells' + +examples: + # Example for GCC for MSM8960:
MMCC, not GCC right?
Quoted 12 lines
Documentation/devicetree/bindings/clock/qcom,mmcc.yaml new file +9
-0+ - | + clock-controller@4000000 { + compatible = "qcom,mmcc-msm8960"; + reg = <0x4000000 0x1000>; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; +...Signature · 1 line
2.17.1
PATCH v7 4/6 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
@@ -23,6 +23,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
@@ -47,6 +72,17 @@ required: - '#reset-cells' - '#power-domain-cells' +if: + properties: + compatible: + contains: + const: qcom,mmcc-msm8998 + +then: + required: + - clocks + - clock-names + examples: # Example for GCC for MSM8960: - |
include/dt-bindings/clock/qcom,mmcc-msm8998.h new file +210 -0
210 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v7 5/6 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 · 1 line
2.17.1
Stephen Boyd
maintainerRe: [PATCH v7 5/6] clk: qcom: Add MSM8998 Multimedia Clock Controller (MMCC) driver
Quoting Jeffrey Hugo (2019-11-08 13:14:37)
Quoted 7 lines
Add 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.
Signed-off-by Jeffrey Hugo <[email protected]>Reviewed-by Bjorn Andersson <[email protected]>---
Driver looks good.
Can you resend with minor fixes to binding and not include dts changes in the series? I can then apply the whole series once Rob acks/reviews the binding updates.
Re: [PATCH v7 5/6] clk: qcom: Add MSM8998 Multimedia Clock Controller (MMCC) driver
Quoted 9 lines · Stephen Boyd
Quoting Jeffrey Hugo (2019-11-08 13:14:37)
Quoted 7 lines
Add 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.
Signed-off-by Jeffrey Hugo <[email protected]>Reviewed-by Bjorn Andersson <[email protected]>---
Quoted 6 lines
Driver looks good.
Can you resend with minor fixes to binding and not include dts changes in the series? I can then apply the whole series once Rob acks/reviews the binding updates.
Sounds good. Will do.
Signature · 3 lines
Jeffrey Hugo Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v7 6/6 arm64: dts: qcom: msm8998: Add mmcc node
In reply to Jeffrey HugoAdd MSM8998 Multimedia Clock Controller DT node.
--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
arch/arm64/boot/dts/qcom/msm8998.dtsi +28 -0
@@ -3,6 +3,7 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/clock/qcom,gcc-msm8998.h> +#include <dt-bindings/clock/qcom,mmcc-msm8998.h> #include <dt-bindings/clock/qcom,rpmcc.h> #include <dt-bindings/power/qcom-rpmpd.h> #include <dt-bindings/gpio/gpio.h>
@@ -1758,6 +1759,33 @@ #size-cells = <0>; }; + mmcc: clock-controller@c8c0000 { + compatible = "qcom,mmcc-msm8998"; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + reg = <0x0c8c0000 0x40000>; + + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, + <&gcc GPLL0_OUT_MAIN>, + <0>, + <0>, + <0>, + <0>, + <0>, + <0>, + <0>; + clock-names = "xo", + "gpll0", + "dsi0dsi", + "dsi0byte", + "dsi1dsi", + "dsi1byte", + "hdmipll", + "dpvco", + "dplink"; + }; + apcs_glb: mailbox@17911000 { compatible = "qcom,msm8998-apcs-hmss-global"; reg = <0x17911000 0x1000>;
Signature · 1 line
2.17.1