forked from Minki/linux
Merge branches 'clk-qcom', 'clk-socfpga', 'clk-mediatek', 'clk-lmk' and 'clk-x86' into clk-next
- Support video, gpu, display clks on qcom sc7280 SoCs - GCC clks on qcom MSM8953, SM4250/6115, and SM6350 SoCs - Multimedia clks (MMCC) on qcom MSM8994/MSM8992 - Migrate to clk_parent_data in gcc-sdm660 - RPMh clks on qcom SM6350 SoCs - Support for Mediatek MT8192 SoCs * clk-qcom: (38 commits) clk: qcom: Add SM6350 GCC driver dt-bindings: clock: Add SM6350 GCC clock bindings clk: qcom: rpmh: Add support for RPMH clocks on SM6350 dt-bindings: clock: Add RPMHCC bindings for SM6350 clk: qcom: adjust selects for SM_VIDEOCC_8150 and SM_VIDEOCC_8250 clk: qcom: Add Global Clock controller (GCC) driver for SM6115 dt-bindings: clk: qcom: gcc-sm6115: Document SM6115 GCC clk: qcom: mmcc-msm8994: Add MSM8992 support clk: qcom: Add msm8994 MMCC driver dt-bindings: clock: Add support for MSM8992/4 MMCC clk: qcom: Add Global Clock Controller driver for MSM8953 dt-bindings: clock: add Qualcomm MSM8953 GCC driver bindings clk: qcom: gcc-sdm660: Replace usage of parent_names clk: qcom: gcc-sdm660: Move parent tables after PLLs clk: qcom: use devm_pm_runtime_enable and devm_pm_clk_create PM: runtime: add devm_pm_clk_create helper PM: runtime: add devm_pm_runtime_enable helper clk: qcom: a53-pll: Add MSM8939 a53pll support dt-bindings: clock: Update qcom,a53pll bindings for MSM8939 support clk: qcom: a53pll/mux: Use unique clock name ... * clk-socfpga: clk: socfpga: agilex: add the bypass register for s2f_usr0 clock clk: socfpga: agilex: fix up s2f_user0_clk representation clk: socfpga: agilex: fix the parents of the psi_ref_clk * clk-mediatek: (22 commits) clk: mediatek: make COMMON_CLK_MT8167* depend on COMMON_CLK_MT8167 clk: mediatek: Add MT8192 vencsys clock support clk: mediatek: Add MT8192 vdecsys clock support clk: mediatek: Add MT8192 scp adsp clock support clk: mediatek: Add MT8192 msdc clock support clk: mediatek: Add MT8192 mmsys clock support clk: mediatek: Add MT8192 mfgcfg clock support clk: mediatek: Add MT8192 mdpsys clock support clk: mediatek: Add MT8192 ipesys clock support clk: mediatek: Add MT8192 imp i2c wrapper clock support clk: mediatek: Add MT8192 imgsys clock support clk: mediatek: Add MT8192 camsys clock support clk: mediatek: Add MT8192 audio clock support clk: mediatek: Add MT8192 basic clocks support clk: mediatek: Add mtk_clk_simple_probe() to simplify clock providers clk: mediatek: Add configurable enable control to mtk_pll_data clk: mediatek: Fix asymmetrical PLL enable and disable control clk: mediatek: Get regmap without syscon compatible check clk: mediatek: Add dt-bindings of MT8192 clocks dt-bindings: ARM: Mediatek: Add audsys document binding for MT8192 ... * clk-lmk: clk: lmk04832: drop redundant fallthrough statements * clk-x86: clk: x86: Rename clk-lpt to more specific clk-lpss-atom
This commit is contained in:
commit
4990d8c133
@ -13,6 +13,7 @@ Required Properties:
|
||||
- "mediatek,mt7623-audsys", "mediatek,mt2701-audsys", "syscon"
|
||||
- "mediatek,mt8167-audiosys", "syscon"
|
||||
- "mediatek,mt8183-audiosys", "syscon"
|
||||
- "mediatek,mt8192-audsys", "syscon"
|
||||
- "mediatek,mt8516-audsys", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
|
@ -16,6 +16,7 @@ Required Properties:
|
||||
- "mediatek,mt8167-mmsys", "syscon"
|
||||
- "mediatek,mt8173-mmsys", "syscon"
|
||||
- "mediatek,mt8183-mmsys", "syscon"
|
||||
- "mediatek,mt8192-mmsys", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
For the clock control, the mmsys controller uses the common clk binding from
|
||||
|
@ -0,0 +1,199 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: "http://devicetree.org/schemas/arm/mediatek/mediatek,mt8192-clock.yaml#"
|
||||
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||
|
||||
title: MediaTek Functional Clock Controller for MT8192
|
||||
|
||||
maintainers:
|
||||
- Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
description:
|
||||
The Mediatek functional clock controller provides various clocks on MT8192.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- mediatek,mt8192-scp_adsp
|
||||
- mediatek,mt8192-imp_iic_wrap_c
|
||||
- mediatek,mt8192-imp_iic_wrap_e
|
||||
- mediatek,mt8192-imp_iic_wrap_s
|
||||
- mediatek,mt8192-imp_iic_wrap_ws
|
||||
- mediatek,mt8192-imp_iic_wrap_w
|
||||
- mediatek,mt8192-imp_iic_wrap_n
|
||||
- mediatek,mt8192-msdc_top
|
||||
- mediatek,mt8192-msdc
|
||||
- mediatek,mt8192-mfgcfg
|
||||
- mediatek,mt8192-imgsys
|
||||
- mediatek,mt8192-imgsys2
|
||||
- mediatek,mt8192-vdecsys_soc
|
||||
- mediatek,mt8192-vdecsys
|
||||
- mediatek,mt8192-vencsys
|
||||
- mediatek,mt8192-camsys
|
||||
- mediatek,mt8192-camsys_rawa
|
||||
- mediatek,mt8192-camsys_rawb
|
||||
- mediatek,mt8192-camsys_rawc
|
||||
- mediatek,mt8192-ipesys
|
||||
- mediatek,mt8192-mdpsys
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
scp_adsp: clock-controller@10720000 {
|
||||
compatible = "mediatek,mt8192-scp_adsp";
|
||||
reg = <0x10720000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
imp_iic_wrap_c: clock-controller@11007000 {
|
||||
compatible = "mediatek,mt8192-imp_iic_wrap_c";
|
||||
reg = <0x11007000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
imp_iic_wrap_e: clock-controller@11cb1000 {
|
||||
compatible = "mediatek,mt8192-imp_iic_wrap_e";
|
||||
reg = <0x11cb1000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
imp_iic_wrap_s: clock-controller@11d03000 {
|
||||
compatible = "mediatek,mt8192-imp_iic_wrap_s";
|
||||
reg = <0x11d03000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
imp_iic_wrap_ws: clock-controller@11d23000 {
|
||||
compatible = "mediatek,mt8192-imp_iic_wrap_ws";
|
||||
reg = <0x11d23000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
imp_iic_wrap_w: clock-controller@11e01000 {
|
||||
compatible = "mediatek,mt8192-imp_iic_wrap_w";
|
||||
reg = <0x11e01000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
imp_iic_wrap_n: clock-controller@11f02000 {
|
||||
compatible = "mediatek,mt8192-imp_iic_wrap_n";
|
||||
reg = <0x11f02000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
msdc_top: clock-controller@11f10000 {
|
||||
compatible = "mediatek,mt8192-msdc_top";
|
||||
reg = <0x11f10000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
msdc: clock-controller@11f60000 {
|
||||
compatible = "mediatek,mt8192-msdc";
|
||||
reg = <0x11f60000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
mfgcfg: clock-controller@13fbf000 {
|
||||
compatible = "mediatek,mt8192-mfgcfg";
|
||||
reg = <0x13fbf000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
imgsys: clock-controller@15020000 {
|
||||
compatible = "mediatek,mt8192-imgsys";
|
||||
reg = <0x15020000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
imgsys2: clock-controller@15820000 {
|
||||
compatible = "mediatek,mt8192-imgsys2";
|
||||
reg = <0x15820000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
vdecsys_soc: clock-controller@1600f000 {
|
||||
compatible = "mediatek,mt8192-vdecsys_soc";
|
||||
reg = <0x1600f000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
vdecsys: clock-controller@1602f000 {
|
||||
compatible = "mediatek,mt8192-vdecsys";
|
||||
reg = <0x1602f000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
vencsys: clock-controller@17000000 {
|
||||
compatible = "mediatek,mt8192-vencsys";
|
||||
reg = <0x17000000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
camsys: clock-controller@1a000000 {
|
||||
compatible = "mediatek,mt8192-camsys";
|
||||
reg = <0x1a000000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
camsys_rawa: clock-controller@1a04f000 {
|
||||
compatible = "mediatek,mt8192-camsys_rawa";
|
||||
reg = <0x1a04f000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
camsys_rawb: clock-controller@1a06f000 {
|
||||
compatible = "mediatek,mt8192-camsys_rawb";
|
||||
reg = <0x1a06f000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
camsys_rawc: clock-controller@1a08f000 {
|
||||
compatible = "mediatek,mt8192-camsys_rawc";
|
||||
reg = <0x1a08f000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
ipesys: clock-controller@1b000000 {
|
||||
compatible = "mediatek,mt8192-ipesys";
|
||||
reg = <0x1b000000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
mdpsys: clock-controller@1f000000 {
|
||||
compatible = "mediatek,mt8192-mdpsys";
|
||||
reg = <0x1f000000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
@ -0,0 +1,65 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: "http://devicetree.org/schemas/arm/mediatek/mediatek,mt8192-sys-clock.yaml#"
|
||||
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||
|
||||
title: MediaTek System Clock Controller for MT8192
|
||||
|
||||
maintainers:
|
||||
- Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
description:
|
||||
The Mediatek system clock controller provides various clocks and system configuration
|
||||
like reset and bus protection on MT8192.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- mediatek,mt8192-topckgen
|
||||
- mediatek,mt8192-infracfg
|
||||
- mediatek,mt8192-pericfg
|
||||
- mediatek,mt8192-apmixedsys
|
||||
- const: syscon
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
topckgen: syscon@10000000 {
|
||||
compatible = "mediatek,mt8192-topckgen", "syscon";
|
||||
reg = <0x10000000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
infracfg: syscon@10001000 {
|
||||
compatible = "mediatek,mt8192-infracfg", "syscon";
|
||||
reg = <0x10001000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
pericfg: syscon@10003000 {
|
||||
compatible = "mediatek,mt8192-pericfg", "syscon";
|
||||
reg = <0x10003000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
apmixedsys: syscon@1000c000 {
|
||||
compatible = "mediatek,mt8192-apmixedsys", "syscon";
|
||||
reg = <0x1000c000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
@ -18,6 +18,7 @@ properties:
|
||||
enum:
|
||||
- qcom,ipq6018-a53pll
|
||||
- qcom,msm8916-a53pll
|
||||
- qcom,msm8939-a53pll
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
@ -33,6 +34,8 @@ properties:
|
||||
items:
|
||||
- const: xo
|
||||
|
||||
operating-points-v2: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
72
Documentation/devicetree/bindings/clock/qcom,gcc-sm6115.yaml
Normal file
72
Documentation/devicetree/bindings/clock/qcom,gcc-sm6115.yaml
Normal file
@ -0,0 +1,72 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,gcc-sm6115.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Global Clock & Reset Controller Binding for SM6115 and SM4250
|
||||
|
||||
maintainers:
|
||||
- Iskren Chernev <iskren.chernev@gmail.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module which supports the clocks, resets and
|
||||
power domains on SM4250/6115.
|
||||
|
||||
See also:
|
||||
- dt-bindings/clock/qcom,gcc-sm6115.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,gcc-sm6115
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Sleep clock source
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: bi_tcxo
|
||||
- const: sleep_clk
|
||||
|
||||
'#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.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
- clock-names
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,rpmcc.h>
|
||||
clock-controller@1400000 {
|
||||
compatible = "qcom,gcc-sm6115";
|
||||
reg = <0x01400000 0x1f0000>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
clock-names = "bi_tcxo", "sleep_clk";
|
||||
clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, <&sleep_clk>;
|
||||
};
|
||||
...
|
76
Documentation/devicetree/bindings/clock/qcom,gcc-sm6350.yaml
Normal file
76
Documentation/devicetree/bindings/clock/qcom,gcc-sm6350.yaml
Normal file
@ -0,0 +1,76 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,gcc-sm6350.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Global Clock & Reset Controller Binding for SM6350
|
||||
|
||||
maintainers:
|
||||
- Konrad Dybcio <konrad.dybcio@somainline.org>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module which supports the clocks, resets and
|
||||
power domains on SM6350.
|
||||
|
||||
See also:
|
||||
- dt-bindings/clock/qcom,gcc-sm6350.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,gcc-sm6350
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Board active XO source
|
||||
- description: Sleep clock source
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: bi_tcxo
|
||||
- const: bi_tcxo_ao
|
||||
- const: sleep_clk
|
||||
|
||||
'#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.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
- clock-names
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,rpmh.h>
|
||||
clock-controller@100000 {
|
||||
compatible = "qcom,gcc-sm6350";
|
||||
reg = <0x00100000 0x1f0000>;
|
||||
clocks = <&rpmhcc RPMH_CXO_CLK>,
|
||||
<&rpmhcc RPMH_CXO_CLK_A>,
|
||||
<&sleep_clk>;
|
||||
clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
...
|
@ -23,6 +23,7 @@ description: |
|
||||
- dt-bindings/clock/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064)
|
||||
- dt-bindings/reset/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064)
|
||||
- dt-bindings/clock/qcom,gcc-msm8939.h
|
||||
- dt-bindings/clock/qcom,gcc-msm8953.h
|
||||
- dt-bindings/reset/qcom,gcc-msm8939.h
|
||||
- dt-bindings/clock/qcom,gcc-msm8660.h
|
||||
- dt-bindings/reset/qcom,gcc-msm8660.h
|
||||
@ -46,6 +47,7 @@ properties:
|
||||
- qcom,gcc-msm8660
|
||||
- qcom,gcc-msm8916
|
||||
- qcom,gcc-msm8939
|
||||
- qcom,gcc-msm8953
|
||||
- qcom,gcc-msm8960
|
||||
- qcom,gcc-msm8974
|
||||
- qcom,gcc-msm8974pro
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,gpucc.yaml#
|
||||
@ -11,11 +11,12 @@ maintainers:
|
||||
|
||||
description: |
|
||||
Qualcomm graphics clock control module which supports the clocks, resets and
|
||||
power domains on SDM845/SC7180/SM8150/SM8250.
|
||||
power domains on Qualcomm SoCs.
|
||||
|
||||
See also:
|
||||
dt-bindings/clock/qcom,gpucc-sdm845.h
|
||||
dt-bindings/clock/qcom,gpucc-sc7180.h
|
||||
dt-bindings/clock/qcom,gpucc-sc7280.h
|
||||
dt-bindings/clock/qcom,gpucc-sm8150.h
|
||||
dt-bindings/clock/qcom,gpucc-sm8250.h
|
||||
|
||||
@ -24,6 +25,8 @@ properties:
|
||||
enum:
|
||||
- qcom,sdm845-gpucc
|
||||
- qcom,sc7180-gpucc
|
||||
- qcom,sc7280-gpucc
|
||||
- qcom,sc8180x-gpucc
|
||||
- qcom,sm8150-gpucc
|
||||
- qcom,sm8250-gpucc
|
||||
|
||||
|
@ -22,6 +22,8 @@ properties:
|
||||
- qcom,mmcc-msm8660
|
||||
- qcom,mmcc-msm8960
|
||||
- qcom,mmcc-msm8974
|
||||
- qcom,mmcc-msm8992
|
||||
- qcom,mmcc-msm8994
|
||||
- qcom,mmcc-msm8996
|
||||
- qcom,mmcc-msm8998
|
||||
- qcom,mmcc-sdm630
|
||||
|
@ -10,11 +10,13 @@ Required properties :
|
||||
- compatible : shall contain only one of the following. The generic
|
||||
compatible "qcom,rpmcc" should be also included.
|
||||
|
||||
"qcom,rpmcc-mdm9607", "qcom,rpmcc"
|
||||
"qcom,rpmcc-msm8660", "qcom,rpmcc"
|
||||
"qcom,rpmcc-apq8060", "qcom,rpmcc"
|
||||
"qcom,rpmcc-msm8226", "qcom,rpmcc"
|
||||
"qcom,rpmcc-msm8916", "qcom,rpmcc"
|
||||
"qcom,rpmcc-msm8936", "qcom,rpmcc"
|
||||
"qcom,rpmcc-msm8953", "qcom,rpmcc"
|
||||
"qcom,rpmcc-msm8974", "qcom,rpmcc"
|
||||
"qcom,rpmcc-msm8976", "qcom,rpmcc"
|
||||
"qcom,rpmcc-apq8064", "qcom,rpmcc"
|
||||
@ -25,6 +27,8 @@ Required properties :
|
||||
"qcom,rpmcc-msm8998", "qcom,rpmcc"
|
||||
"qcom,rpmcc-qcs404", "qcom,rpmcc"
|
||||
"qcom,rpmcc-sdm660", "qcom,rpmcc"
|
||||
"qcom,rpmcc-sm6115", "qcom,rpmcc"
|
||||
"qcom,rpmcc-sm6125", "qcom,rpmcc"
|
||||
|
||||
- #clock-cells : shall contain 1
|
||||
|
||||
|
@ -22,6 +22,7 @@ properties:
|
||||
- qcom,sc8180x-rpmh-clk
|
||||
- qcom,sdm845-rpmh-clk
|
||||
- qcom,sdx55-rpmh-clk
|
||||
- qcom,sm6350-rpmh-clk
|
||||
- qcom,sm8150-rpmh-clk
|
||||
- qcom,sm8250-rpmh-clk
|
||||
- qcom,sm8350-rpmh-clk
|
||||
|
@ -0,0 +1,94 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,sc7280-dispcc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Display Clock & Reset Controller Binding for SC7280
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
|
||||
description: |
|
||||
Qualcomm display clock control module which supports the clocks, resets and
|
||||
power domains on SC7280.
|
||||
|
||||
See also dt-bindings/clock/qcom,dispcc-sc7280.h.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,sc7280-dispcc
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: GPLL0 source from GCC
|
||||
- description: Byte clock from DSI PHY
|
||||
- description: Pixel clock from DSI PHY
|
||||
- description: Link clock from DP PHY
|
||||
- description: VCO DIV clock from DP PHY
|
||||
- description: Link clock from EDP PHY
|
||||
- description: VCO DIV clock from EDP PHY
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: bi_tcxo
|
||||
- const: gcc_disp_gpll0_clk
|
||||
- const: dsi0_phy_pll_out_byteclk
|
||||
- const: dsi0_phy_pll_out_dsiclk
|
||||
- const: dp_phy_pll_link_clk
|
||||
- const: dp_phy_pll_vco_div_clk
|
||||
- const: edp_phy_pll_link_clk
|
||||
- const: edp_phy_pll_vco_div_clk
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-sc7280.h>
|
||||
#include <dt-bindings/clock/qcom,rpmh.h>
|
||||
clock-controller@af00000 {
|
||||
compatible = "qcom,sc7280-dispcc";
|
||||
reg = <0x0af00000 0x200000>;
|
||||
clocks = <&rpmhcc RPMH_CXO_CLK>,
|
||||
<&gcc GCC_DISP_GPLL0_CLK_SRC>,
|
||||
<&dsi_phy 0>,
|
||||
<&dsi_phy 1>,
|
||||
<&dp_phy 0>,
|
||||
<&dp_phy 1>,
|
||||
<&edp_phy 0>,
|
||||
<&edp_phy 1>;
|
||||
clock-names = "bi_tcxo",
|
||||
"gcc_disp_gpll0_clk",
|
||||
"dsi0_phy_pll_out_byteclk",
|
||||
"dsi0_phy_pll_out_dsiclk",
|
||||
"dp_phy_pll_link_clk",
|
||||
"dp_phy_pll_vco_div_clk",
|
||||
"edp_phy_pll_link_clk",
|
||||
"edp_phy_pll_vco_div_clk";
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
...
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,videocc.yaml#
|
||||
@ -11,10 +11,11 @@ maintainers:
|
||||
|
||||
description: |
|
||||
Qualcomm video clock control module which supports the clocks, resets and
|
||||
power domains on SDM845/SC7180/SM8150/SM8250.
|
||||
power domains on Qualcomm SoCs.
|
||||
|
||||
See also:
|
||||
dt-bindings/clock/qcom,videocc-sc7180.h
|
||||
dt-bindings/clock/qcom,videocc-sc7280.h
|
||||
dt-bindings/clock/qcom,videocc-sdm845.h
|
||||
dt-bindings/clock/qcom,videocc-sm8150.h
|
||||
dt-bindings/clock/qcom,videocc-sm8250.h
|
||||
@ -23,6 +24,7 @@ properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,sc7180-videocc
|
||||
- qcom,sc7280-videocc
|
||||
- qcom,sdm845-videocc
|
||||
- qcom,sm8150-videocc
|
||||
- qcom,sm8250-videocc
|
||||
|
@ -385,7 +385,9 @@ static struct platform_device *lpss_clk_dev;
|
||||
|
||||
static inline void lpt_register_clock_device(void)
|
||||
{
|
||||
lpss_clk_dev = platform_device_register_simple("clk-lpt", -1, NULL, 0);
|
||||
lpss_clk_dev = platform_device_register_simple("clk-lpss-atom",
|
||||
PLATFORM_DEVID_NONE,
|
||||
NULL, 0);
|
||||
}
|
||||
|
||||
static int register_device_clock(struct acpi_device *adev,
|
||||
@ -1337,7 +1339,7 @@ void __init acpi_lpss_init(void)
|
||||
const struct x86_cpu_id *id;
|
||||
int ret;
|
||||
|
||||
ret = lpt_clk_init();
|
||||
ret = lpss_atom_clk_init();
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
|
@ -519,6 +519,23 @@ void pm_clk_destroy(struct device *dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pm_clk_destroy);
|
||||
|
||||
static void pm_clk_destroy_action(void *data)
|
||||
{
|
||||
pm_clk_destroy(data);
|
||||
}
|
||||
|
||||
int devm_pm_clk_create(struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = pm_clk_create(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return devm_add_action_or_reset(dev, pm_clk_destroy_action, dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_pm_clk_create);
|
||||
|
||||
/**
|
||||
* pm_clk_suspend - Disable clocks in a device's PM clock list.
|
||||
* @dev: Device to disable the clocks for.
|
||||
|
@ -1447,6 +1447,23 @@ void pm_runtime_enable(struct device *dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pm_runtime_enable);
|
||||
|
||||
static void pm_runtime_disable_action(void *data)
|
||||
{
|
||||
pm_runtime_disable(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* devm_pm_runtime_enable - devres-enabled version of pm_runtime_enable.
|
||||
* @dev: Device to handle.
|
||||
*/
|
||||
int devm_pm_runtime_enable(struct device *dev)
|
||||
{
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
return devm_add_action_or_reset(dev, pm_runtime_disable_action, dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_pm_runtime_enable);
|
||||
|
||||
/**
|
||||
* pm_runtime_forbid - Block runtime PM of a device.
|
||||
* @dev: Device to handle.
|
||||
|
@ -269,23 +269,14 @@ static bool lmk04832_regmap_rd_regs(struct device *dev, unsigned int reg)
|
||||
{
|
||||
switch (reg) {
|
||||
case LMK04832_REG_RST3W ... LMK04832_REG_ID_MASKREV:
|
||||
fallthrough;
|
||||
case LMK04832_REG_ID_VNDR_MSB:
|
||||
fallthrough;
|
||||
case LMK04832_REG_ID_VNDR_LSB:
|
||||
fallthrough;
|
||||
case LMK04832_REG_CLKOUT_CTRL0(0) ... LMK04832_REG_PLL2_DLD_CNT_LSB:
|
||||
fallthrough;
|
||||
case LMK04832_REG_PLL2_LD:
|
||||
fallthrough;
|
||||
case LMK04832_REG_PLL2_PD:
|
||||
fallthrough;
|
||||
case LMK04832_REG_PLL1R_RST:
|
||||
fallthrough;
|
||||
case LMK04832_REG_CLR_PLL_LOST ... LMK04832_REG_RB_DAC_VAL_LSB:
|
||||
fallthrough;
|
||||
case LMK04832_REG_RB_HOLDOVER:
|
||||
fallthrough;
|
||||
case LMK04832_REG_SPI_LOCK:
|
||||
return true;
|
||||
default:
|
||||
@ -297,27 +288,18 @@ static bool lmk04832_regmap_wr_regs(struct device *dev, unsigned int reg)
|
||||
{
|
||||
switch (reg) {
|
||||
case LMK04832_REG_RST3W:
|
||||
fallthrough;
|
||||
case LMK04832_REG_POWERDOWN:
|
||||
return true;
|
||||
case LMK04832_REG_ID_DEV_TYPE ... LMK04832_REG_ID_MASKREV:
|
||||
fallthrough;
|
||||
case LMK04832_REG_ID_VNDR_MSB:
|
||||
fallthrough;
|
||||
case LMK04832_REG_ID_VNDR_LSB:
|
||||
return false;
|
||||
case LMK04832_REG_CLKOUT_CTRL0(0) ... LMK04832_REG_PLL2_DLD_CNT_LSB:
|
||||
fallthrough;
|
||||
case LMK04832_REG_PLL2_LD:
|
||||
fallthrough;
|
||||
case LMK04832_REG_PLL2_PD:
|
||||
fallthrough;
|
||||
case LMK04832_REG_PLL1R_RST:
|
||||
fallthrough;
|
||||
case LMK04832_REG_CLR_PLL_LOST ... LMK04832_REG_RB_DAC_VAL_LSB:
|
||||
fallthrough;
|
||||
case LMK04832_REG_RB_HOLDOVER:
|
||||
fallthrough;
|
||||
case LMK04832_REG_SPI_LOCK:
|
||||
return true;
|
||||
default:
|
||||
|
@ -362,41 +362,36 @@ config COMMON_CLK_MT8167
|
||||
|
||||
config COMMON_CLK_MT8167_AUDSYS
|
||||
bool "Clock driver for MediaTek MT8167 audsys"
|
||||
depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
|
||||
select COMMON_CLK_MEDIATEK
|
||||
default ARCH_MEDIATEK
|
||||
depends on COMMON_CLK_MT8167
|
||||
default COMMON_CLK_MT8167
|
||||
help
|
||||
This driver supports MediaTek MT8167 audsys clocks.
|
||||
|
||||
config COMMON_CLK_MT8167_IMGSYS
|
||||
bool "Clock driver for MediaTek MT8167 imgsys"
|
||||
depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
|
||||
select COMMON_CLK_MEDIATEK
|
||||
default ARCH_MEDIATEK
|
||||
depends on COMMON_CLK_MT8167
|
||||
default COMMON_CLK_MT8167
|
||||
help
|
||||
This driver supports MediaTek MT8167 imgsys clocks.
|
||||
|
||||
config COMMON_CLK_MT8167_MFGCFG
|
||||
bool "Clock driver for MediaTek MT8167 mfgcfg"
|
||||
depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
|
||||
select COMMON_CLK_MEDIATEK
|
||||
default ARCH_MEDIATEK
|
||||
depends on COMMON_CLK_MT8167
|
||||
default COMMON_CLK_MT8167
|
||||
help
|
||||
This driver supports MediaTek MT8167 mfgcfg clocks.
|
||||
|
||||
config COMMON_CLK_MT8167_MMSYS
|
||||
bool "Clock driver for MediaTek MT8167 mmsys"
|
||||
depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
|
||||
select COMMON_CLK_MEDIATEK
|
||||
default ARCH_MEDIATEK
|
||||
depends on COMMON_CLK_MT8167
|
||||
default COMMON_CLK_MT8167
|
||||
help
|
||||
This driver supports MediaTek MT8167 mmsys clocks.
|
||||
|
||||
config COMMON_CLK_MT8167_VDECSYS
|
||||
bool "Clock driver for MediaTek MT8167 vdecsys"
|
||||
depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
|
||||
select COMMON_CLK_MEDIATEK
|
||||
default ARCH_MEDIATEK
|
||||
depends on COMMON_CLK_MT8167
|
||||
default COMMON_CLK_MT8167
|
||||
help
|
||||
This driver supports MediaTek MT8167 vdecsys clocks.
|
||||
|
||||
@ -500,6 +495,86 @@ config COMMON_CLK_MT8183_VENCSYS
|
||||
help
|
||||
This driver supports MediaTek MT8183 vencsys clocks.
|
||||
|
||||
config COMMON_CLK_MT8192
|
||||
bool "Clock driver for MediaTek MT8192"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
select COMMON_CLK_MEDIATEK
|
||||
default ARM64
|
||||
help
|
||||
This driver supports MediaTek MT8192 basic clocks.
|
||||
|
||||
config COMMON_CLK_MT8192_AUDSYS
|
||||
bool "Clock driver for MediaTek MT8192 audsys"
|
||||
depends on COMMON_CLK_MT8192
|
||||
help
|
||||
This driver supports MediaTek MT8192 audsys clocks.
|
||||
|
||||
config COMMON_CLK_MT8192_CAMSYS
|
||||
bool "Clock driver for MediaTek MT8192 camsys"
|
||||
depends on COMMON_CLK_MT8192
|
||||
help
|
||||
This driver supports MediaTek MT8192 camsys and camsys_raw clocks.
|
||||
|
||||
config COMMON_CLK_MT8192_IMGSYS
|
||||
bool "Clock driver for MediaTek MT8192 imgsys"
|
||||
depends on COMMON_CLK_MT8192
|
||||
help
|
||||
This driver supports MediaTek MT8192 imgsys and imgsys2 clocks.
|
||||
|
||||
config COMMON_CLK_MT8192_IMP_IIC_WRAP
|
||||
bool "Clock driver for MediaTek MT8192 imp_iic_wrap"
|
||||
depends on COMMON_CLK_MT8192
|
||||
help
|
||||
This driver supports MediaTek MT8192 imp_iic_wrap clocks.
|
||||
|
||||
config COMMON_CLK_MT8192_IPESYS
|
||||
bool "Clock driver for MediaTek MT8192 ipesys"
|
||||
depends on COMMON_CLK_MT8192
|
||||
help
|
||||
This driver supports MediaTek MT8192 ipesys clocks.
|
||||
|
||||
config COMMON_CLK_MT8192_MDPSYS
|
||||
bool "Clock driver for MediaTek MT8192 mdpsys"
|
||||
depends on COMMON_CLK_MT8192
|
||||
help
|
||||
This driver supports MediaTek MT8192 mdpsys clocks.
|
||||
|
||||
config COMMON_CLK_MT8192_MFGCFG
|
||||
bool "Clock driver for MediaTek MT8192 mfgcfg"
|
||||
depends on COMMON_CLK_MT8192
|
||||
help
|
||||
This driver supports MediaTek MT8192 mfgcfg clocks.
|
||||
|
||||
config COMMON_CLK_MT8192_MMSYS
|
||||
bool "Clock driver for MediaTek MT8192 mmsys"
|
||||
depends on COMMON_CLK_MT8192
|
||||
help
|
||||
This driver supports MediaTek MT8192 mmsys clocks.
|
||||
|
||||
config COMMON_CLK_MT8192_MSDC
|
||||
bool "Clock driver for MediaTek MT8192 msdc"
|
||||
depends on COMMON_CLK_MT8192
|
||||
help
|
||||
This driver supports MediaTek MT8192 msdc and msdc_top clocks.
|
||||
|
||||
config COMMON_CLK_MT8192_SCP_ADSP
|
||||
bool "Clock driver for MediaTek MT8192 scp_adsp"
|
||||
depends on COMMON_CLK_MT8192
|
||||
help
|
||||
This driver supports MediaTek MT8192 scp_adsp clocks.
|
||||
|
||||
config COMMON_CLK_MT8192_VDECSYS
|
||||
bool "Clock driver for MediaTek MT8192 vdecsys"
|
||||
depends on COMMON_CLK_MT8192
|
||||
help
|
||||
This driver supports MediaTek MT8192 vdecsys and vdecsys_soc clocks.
|
||||
|
||||
config COMMON_CLK_MT8192_VENCSYS
|
||||
bool "Clock driver for MediaTek MT8192 vencsys"
|
||||
depends on COMMON_CLK_MT8192
|
||||
help
|
||||
This driver supports MediaTek MT8192 vencsys clocks.
|
||||
|
||||
config COMMON_CLK_MT8516
|
||||
bool "Clock driver for MediaTek MT8516"
|
||||
depends on ARCH_MEDIATEK || COMPILE_TEST
|
||||
|
@ -67,5 +67,18 @@ obj-$(CONFIG_COMMON_CLK_MT8183_MFGCFG) += clk-mt8183-mfgcfg.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8183_MMSYS) += clk-mt8183-mm.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8183_VDECSYS) += clk-mt8183-vdec.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8183_VENCSYS) += clk-mt8183-venc.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192_IMGSYS) += clk-mt8192-img.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192_IMP_IIC_WRAP) += clk-mt8192-imp_iic_wrap.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192_IPESYS) += clk-mt8192-ipe.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192_MDPSYS) += clk-mt8192-mdp.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192_MFGCFG) += clk-mt8192-mfg.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192_MMSYS) += clk-mt8192-mm.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192_MSDC) += clk-mt8192-msdc.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192_SCP_ADSP) += clk-mt8192-scp_adsp.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192_VDECSYS) += clk-mt8192-vdec.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8192_VENCSYS) += clk-mt8192-venc.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8516) += clk-mt8516.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8516_AUDSYS) += clk-mt8516-aud.o
|
||||
|
@ -84,7 +84,7 @@ int mtk_clk_register_cpumuxes(struct device_node *node,
|
||||
struct clk *clk;
|
||||
struct regmap *regmap;
|
||||
|
||||
regmap = syscon_node_to_regmap(node);
|
||||
regmap = device_node_to_regmap(node);
|
||||
if (IS_ERR(regmap)) {
|
||||
pr_err("Cannot find regmap for %pOF: %ld\n", node,
|
||||
PTR_ERR(regmap));
|
||||
|
118
drivers/clk/mediatek/clk-mt8192-aud.c
Normal file
118
drivers/clk/mediatek/clk-mt8192-aud.c
Normal file
@ -0,0 +1,118 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
//
|
||||
// Copyright (c) 2021 MediaTek Inc.
|
||||
// Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
|
||||
#include <dt-bindings/clock/mt8192-clk.h>
|
||||
|
||||
static const struct mtk_gate_regs aud0_cg_regs = {
|
||||
.set_ofs = 0x0,
|
||||
.clr_ofs = 0x0,
|
||||
.sta_ofs = 0x0,
|
||||
};
|
||||
|
||||
static const struct mtk_gate_regs aud1_cg_regs = {
|
||||
.set_ofs = 0x4,
|
||||
.clr_ofs = 0x4,
|
||||
.sta_ofs = 0x4,
|
||||
};
|
||||
|
||||
static const struct mtk_gate_regs aud2_cg_regs = {
|
||||
.set_ofs = 0x8,
|
||||
.clr_ofs = 0x8,
|
||||
.sta_ofs = 0x8,
|
||||
};
|
||||
|
||||
#define GATE_AUD0(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &aud0_cg_regs, _shift, &mtk_clk_gate_ops_no_setclr)
|
||||
|
||||
#define GATE_AUD1(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &aud1_cg_regs, _shift, &mtk_clk_gate_ops_no_setclr)
|
||||
|
||||
#define GATE_AUD2(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &aud2_cg_regs, _shift, &mtk_clk_gate_ops_no_setclr)
|
||||
|
||||
static const struct mtk_gate aud_clks[] = {
|
||||
/* AUD0 */
|
||||
GATE_AUD0(CLK_AUD_AFE, "aud_afe", "audio_sel", 2),
|
||||
GATE_AUD0(CLK_AUD_22M, "aud_22m", "aud_engen1_sel", 8),
|
||||
GATE_AUD0(CLK_AUD_24M, "aud_24m", "aud_engen2_sel", 9),
|
||||
GATE_AUD0(CLK_AUD_APLL2_TUNER, "aud_apll2_tuner", "aud_engen2_sel", 18),
|
||||
GATE_AUD0(CLK_AUD_APLL_TUNER, "aud_apll_tuner", "aud_engen1_sel", 19),
|
||||
GATE_AUD0(CLK_AUD_TDM, "aud_tdm", "aud_1_sel", 20),
|
||||
GATE_AUD0(CLK_AUD_ADC, "aud_adc", "audio_sel", 24),
|
||||
GATE_AUD0(CLK_AUD_DAC, "aud_dac", "audio_sel", 25),
|
||||
GATE_AUD0(CLK_AUD_DAC_PREDIS, "aud_dac_predis", "audio_sel", 26),
|
||||
GATE_AUD0(CLK_AUD_TML, "aud_tml", "audio_sel", 27),
|
||||
GATE_AUD0(CLK_AUD_NLE, "aud_nle", "audio_sel", 28),
|
||||
/* AUD1 */
|
||||
GATE_AUD1(CLK_AUD_I2S1_B, "aud_i2s1_b", "audio_sel", 4),
|
||||
GATE_AUD1(CLK_AUD_I2S2_B, "aud_i2s2_b", "audio_sel", 5),
|
||||
GATE_AUD1(CLK_AUD_I2S3_B, "aud_i2s3_b", "audio_sel", 6),
|
||||
GATE_AUD1(CLK_AUD_I2S4_B, "aud_i2s4_b", "audio_sel", 7),
|
||||
GATE_AUD1(CLK_AUD_CONNSYS_I2S_ASRC, "aud_connsys_i2s_asrc", "audio_sel", 12),
|
||||
GATE_AUD1(CLK_AUD_GENERAL1_ASRC, "aud_general1_asrc", "audio_sel", 13),
|
||||
GATE_AUD1(CLK_AUD_GENERAL2_ASRC, "aud_general2_asrc", "audio_sel", 14),
|
||||
GATE_AUD1(CLK_AUD_DAC_HIRES, "aud_dac_hires", "audio_h_sel", 15),
|
||||
GATE_AUD1(CLK_AUD_ADC_HIRES, "aud_adc_hires", "audio_h_sel", 16),
|
||||
GATE_AUD1(CLK_AUD_ADC_HIRES_TML, "aud_adc_hires_tml", "audio_h_sel", 17),
|
||||
GATE_AUD1(CLK_AUD_ADDA6_ADC, "aud_adda6_adc", "audio_sel", 20),
|
||||
GATE_AUD1(CLK_AUD_ADDA6_ADC_HIRES, "aud_adda6_adc_hires", "audio_h_sel", 21),
|
||||
GATE_AUD1(CLK_AUD_3RD_DAC, "aud_3rd_dac", "audio_sel", 28),
|
||||
GATE_AUD1(CLK_AUD_3RD_DAC_PREDIS, "aud_3rd_dac_predis", "audio_sel", 29),
|
||||
GATE_AUD1(CLK_AUD_3RD_DAC_TML, "aud_3rd_dac_tml", "audio_sel", 30),
|
||||
GATE_AUD1(CLK_AUD_3RD_DAC_HIRES, "aud_3rd_dac_hires", "audio_h_sel", 31),
|
||||
/* AUD2 */
|
||||
GATE_AUD2(CLK_AUD_I2S5_B, "aud_i2s5_b", "audio_sel", 0),
|
||||
GATE_AUD2(CLK_AUD_I2S6_B, "aud_i2s6_b", "audio_sel", 1),
|
||||
GATE_AUD2(CLK_AUD_I2S7_B, "aud_i2s7_b", "audio_sel", 2),
|
||||
GATE_AUD2(CLK_AUD_I2S8_B, "aud_i2s8_b", "audio_sel", 3),
|
||||
GATE_AUD2(CLK_AUD_I2S9_B, "aud_i2s9_b", "audio_sel", 4),
|
||||
};
|
||||
|
||||
static int clk_mt8192_aud_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
int r;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_AUD_NR_CLK);
|
||||
if (!clk_data)
|
||||
return -ENOMEM;
|
||||
|
||||
r = mtk_clk_register_gates(node, aud_clks, ARRAY_SIZE(aud_clks), clk_data);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
r = devm_of_platform_populate(&pdev->dev);
|
||||
if (r)
|
||||
of_clk_del_provider(node);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8192_aud[] = {
|
||||
{ .compatible = "mediatek,mt8192-audsys", },
|
||||
{}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8192_aud_drv = {
|
||||
.probe = clk_mt8192_aud_probe,
|
||||
.driver = {
|
||||
.name = "clk-mt8192-aud",
|
||||
.of_match_table = of_match_clk_mt8192_aud,
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(clk_mt8192_aud_drv);
|
107
drivers/clk/mediatek/clk-mt8192-cam.c
Normal file
107
drivers/clk/mediatek/clk-mt8192-cam.c
Normal file
@ -0,0 +1,107 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
//
|
||||
// Copyright (c) 2021 MediaTek Inc.
|
||||
// Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
|
||||
#include <dt-bindings/clock/mt8192-clk.h>
|
||||
|
||||
static const struct mtk_gate_regs cam_cg_regs = {
|
||||
.set_ofs = 0x4,
|
||||
.clr_ofs = 0x8,
|
||||
.sta_ofs = 0x0,
|
||||
};
|
||||
|
||||
#define GATE_CAM(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &cam_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
static const struct mtk_gate cam_clks[] = {
|
||||
GATE_CAM(CLK_CAM_LARB13, "cam_larb13", "cam_sel", 0),
|
||||
GATE_CAM(CLK_CAM_DFP_VAD, "cam_dfp_vad", "cam_sel", 1),
|
||||
GATE_CAM(CLK_CAM_LARB14, "cam_larb14", "cam_sel", 2),
|
||||
GATE_CAM(CLK_CAM_CAM, "cam_cam", "cam_sel", 6),
|
||||
GATE_CAM(CLK_CAM_CAMTG, "cam_camtg", "cam_sel", 7),
|
||||
GATE_CAM(CLK_CAM_SENINF, "cam_seninf", "cam_sel", 8),
|
||||
GATE_CAM(CLK_CAM_CAMSV0, "cam_camsv0", "cam_sel", 9),
|
||||
GATE_CAM(CLK_CAM_CAMSV1, "cam_camsv1", "cam_sel", 10),
|
||||
GATE_CAM(CLK_CAM_CAMSV2, "cam_camsv2", "cam_sel", 11),
|
||||
GATE_CAM(CLK_CAM_CAMSV3, "cam_camsv3", "cam_sel", 12),
|
||||
GATE_CAM(CLK_CAM_CCU0, "cam_ccu0", "cam_sel", 13),
|
||||
GATE_CAM(CLK_CAM_CCU1, "cam_ccu1", "cam_sel", 14),
|
||||
GATE_CAM(CLK_CAM_MRAW0, "cam_mraw0", "cam_sel", 15),
|
||||
GATE_CAM(CLK_CAM_FAKE_ENG, "cam_fake_eng", "cam_sel", 17),
|
||||
GATE_CAM(CLK_CAM_CCU_GALS, "cam_ccu_gals", "cam_sel", 18),
|
||||
GATE_CAM(CLK_CAM_CAM2MM_GALS, "cam2mm_gals", "cam_sel", 19),
|
||||
};
|
||||
|
||||
static const struct mtk_gate cam_rawa_clks[] = {
|
||||
GATE_CAM(CLK_CAM_RAWA_LARBX, "cam_rawa_larbx", "cam_sel", 0),
|
||||
GATE_CAM(CLK_CAM_RAWA_CAM, "cam_rawa_cam", "cam_sel", 1),
|
||||
GATE_CAM(CLK_CAM_RAWA_CAMTG, "cam_rawa_camtg", "cam_sel", 2),
|
||||
};
|
||||
|
||||
static const struct mtk_gate cam_rawb_clks[] = {
|
||||
GATE_CAM(CLK_CAM_RAWB_LARBX, "cam_rawb_larbx", "cam_sel", 0),
|
||||
GATE_CAM(CLK_CAM_RAWB_CAM, "cam_rawb_cam", "cam_sel", 1),
|
||||
GATE_CAM(CLK_CAM_RAWB_CAMTG, "cam_rawb_camtg", "cam_sel", 2),
|
||||
};
|
||||
|
||||
static const struct mtk_gate cam_rawc_clks[] = {
|
||||
GATE_CAM(CLK_CAM_RAWC_LARBX, "cam_rawc_larbx", "cam_sel", 0),
|
||||
GATE_CAM(CLK_CAM_RAWC_CAM, "cam_rawc_cam", "cam_sel", 1),
|
||||
GATE_CAM(CLK_CAM_RAWC_CAMTG, "cam_rawc_camtg", "cam_sel", 2),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc cam_desc = {
|
||||
.clks = cam_clks,
|
||||
.num_clks = ARRAY_SIZE(cam_clks),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc cam_rawa_desc = {
|
||||
.clks = cam_rawa_clks,
|
||||
.num_clks = ARRAY_SIZE(cam_rawa_clks),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc cam_rawb_desc = {
|
||||
.clks = cam_rawb_clks,
|
||||
.num_clks = ARRAY_SIZE(cam_rawb_clks),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc cam_rawc_desc = {
|
||||
.clks = cam_rawc_clks,
|
||||
.num_clks = ARRAY_SIZE(cam_rawc_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8192_cam[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt8192-camsys",
|
||||
.data = &cam_desc,
|
||||
}, {
|
||||
.compatible = "mediatek,mt8192-camsys_rawa",
|
||||
.data = &cam_rawa_desc,
|
||||
}, {
|
||||
.compatible = "mediatek,mt8192-camsys_rawb",
|
||||
.data = &cam_rawb_desc,
|
||||
}, {
|
||||
.compatible = "mediatek,mt8192-camsys_rawc",
|
||||
.data = &cam_rawc_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8192_cam_drv = {
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.driver = {
|
||||
.name = "clk-mt8192-cam",
|
||||
.of_match_table = of_match_clk_mt8192_cam,
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(clk_mt8192_cam_drv);
|
70
drivers/clk/mediatek/clk-mt8192-img.c
Normal file
70
drivers/clk/mediatek/clk-mt8192-img.c
Normal file
@ -0,0 +1,70 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
//
|
||||
// Copyright (c) 2021 MediaTek Inc.
|
||||
// Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
|
||||
#include <dt-bindings/clock/mt8192-clk.h>
|
||||
|
||||
static const struct mtk_gate_regs img_cg_regs = {
|
||||
.set_ofs = 0x4,
|
||||
.clr_ofs = 0x8,
|
||||
.sta_ofs = 0x0,
|
||||
};
|
||||
|
||||
#define GATE_IMG(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &img_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
static const struct mtk_gate img_clks[] = {
|
||||
GATE_IMG(CLK_IMG_LARB9, "img_larb9", "img1_sel", 0),
|
||||
GATE_IMG(CLK_IMG_LARB10, "img_larb10", "img1_sel", 1),
|
||||
GATE_IMG(CLK_IMG_DIP, "img_dip", "img1_sel", 2),
|
||||
GATE_IMG(CLK_IMG_GALS, "img_gals", "img1_sel", 12),
|
||||
};
|
||||
|
||||
static const struct mtk_gate img2_clks[] = {
|
||||
GATE_IMG(CLK_IMG2_LARB11, "img2_larb11", "img1_sel", 0),
|
||||
GATE_IMG(CLK_IMG2_LARB12, "img2_larb12", "img1_sel", 1),
|
||||
GATE_IMG(CLK_IMG2_MFB, "img2_mfb", "img1_sel", 6),
|
||||
GATE_IMG(CLK_IMG2_WPE, "img2_wpe", "img1_sel", 7),
|
||||
GATE_IMG(CLK_IMG2_MSS, "img2_mss", "img1_sel", 8),
|
||||
GATE_IMG(CLK_IMG2_GALS, "img2_gals", "img1_sel", 12),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc img_desc = {
|
||||
.clks = img_clks,
|
||||
.num_clks = ARRAY_SIZE(img_clks),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc img2_desc = {
|
||||
.clks = img2_clks,
|
||||
.num_clks = ARRAY_SIZE(img2_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8192_img[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt8192-imgsys",
|
||||
.data = &img_desc,
|
||||
}, {
|
||||
.compatible = "mediatek,mt8192-imgsys2",
|
||||
.data = &img2_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8192_img_drv = {
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.driver = {
|
||||
.name = "clk-mt8192-img",
|
||||
.of_match_table = of_match_clk_mt8192_img,
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(clk_mt8192_img_drv);
|
119
drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c
Normal file
119
drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c
Normal file
@ -0,0 +1,119 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
//
|
||||
// Copyright (c) 2021 MediaTek Inc.
|
||||
// Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
|
||||
#include <dt-bindings/clock/mt8192-clk.h>
|
||||
|
||||
static const struct mtk_gate_regs imp_iic_wrap_cg_regs = {
|
||||
.set_ofs = 0xe08,
|
||||
.clr_ofs = 0xe04,
|
||||
.sta_ofs = 0xe00,
|
||||
};
|
||||
|
||||
#define GATE_IMP_IIC_WRAP(_id, _name, _parent, _shift) \
|
||||
GATE_MTK_FLAGS(_id, _name, _parent, &imp_iic_wrap_cg_regs, _shift, \
|
||||
&mtk_clk_gate_ops_setclr, CLK_OPS_PARENT_ENABLE)
|
||||
|
||||
static const struct mtk_gate imp_iic_wrap_c_clks[] = {
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_C_I2C10, "imp_iic_wrap_c_i2c10", "infra_i2c0", 0),
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_C_I2C11, "imp_iic_wrap_c_i2c11", "infra_i2c0", 1),
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_C_I2C12, "imp_iic_wrap_c_i2c12", "infra_i2c0", 2),
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_C_I2C13, "imp_iic_wrap_c_i2c13", "infra_i2c0", 3),
|
||||
};
|
||||
|
||||
static const struct mtk_gate imp_iic_wrap_e_clks[] = {
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_E_I2C3, "imp_iic_wrap_e_i2c3", "infra_i2c0", 0),
|
||||
};
|
||||
|
||||
static const struct mtk_gate imp_iic_wrap_n_clks[] = {
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_N_I2C0, "imp_iic_wrap_n_i2c0", "infra_i2c0", 0),
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_N_I2C6, "imp_iic_wrap_n_i2c6", "infra_i2c0", 1),
|
||||
};
|
||||
|
||||
static const struct mtk_gate imp_iic_wrap_s_clks[] = {
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_S_I2C7, "imp_iic_wrap_s_i2c7", "infra_i2c0", 0),
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_S_I2C8, "imp_iic_wrap_s_i2c8", "infra_i2c0", 1),
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_S_I2C9, "imp_iic_wrap_s_i2c9", "infra_i2c0", 2),
|
||||
};
|
||||
|
||||
static const struct mtk_gate imp_iic_wrap_w_clks[] = {
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_W_I2C5, "imp_iic_wrap_w_i2c5", "infra_i2c0", 0),
|
||||
};
|
||||
|
||||
static const struct mtk_gate imp_iic_wrap_ws_clks[] = {
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_WS_I2C1, "imp_iic_wrap_ws_i2c1", "infra_i2c0", 0),
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_WS_I2C2, "imp_iic_wrap_ws_i2c2", "infra_i2c0", 1),
|
||||
GATE_IMP_IIC_WRAP(CLK_IMP_IIC_WRAP_WS_I2C4, "imp_iic_wrap_ws_i2c4", "infra_i2c0", 2),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc imp_iic_wrap_c_desc = {
|
||||
.clks = imp_iic_wrap_c_clks,
|
||||
.num_clks = ARRAY_SIZE(imp_iic_wrap_c_clks),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc imp_iic_wrap_e_desc = {
|
||||
.clks = imp_iic_wrap_e_clks,
|
||||
.num_clks = ARRAY_SIZE(imp_iic_wrap_e_clks),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc imp_iic_wrap_n_desc = {
|
||||
.clks = imp_iic_wrap_n_clks,
|
||||
.num_clks = ARRAY_SIZE(imp_iic_wrap_n_clks),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc imp_iic_wrap_s_desc = {
|
||||
.clks = imp_iic_wrap_s_clks,
|
||||
.num_clks = ARRAY_SIZE(imp_iic_wrap_s_clks),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc imp_iic_wrap_w_desc = {
|
||||
.clks = imp_iic_wrap_w_clks,
|
||||
.num_clks = ARRAY_SIZE(imp_iic_wrap_w_clks),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc imp_iic_wrap_ws_desc = {
|
||||
.clks = imp_iic_wrap_ws_clks,
|
||||
.num_clks = ARRAY_SIZE(imp_iic_wrap_ws_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8192_imp_iic_wrap[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt8192-imp_iic_wrap_c",
|
||||
.data = &imp_iic_wrap_c_desc,
|
||||
}, {
|
||||
.compatible = "mediatek,mt8192-imp_iic_wrap_e",
|
||||
.data = &imp_iic_wrap_e_desc,
|
||||
}, {
|
||||
.compatible = "mediatek,mt8192-imp_iic_wrap_n",
|
||||
.data = &imp_iic_wrap_n_desc,
|
||||
}, {
|
||||
.compatible = "mediatek,mt8192-imp_iic_wrap_s",
|
||||
.data = &imp_iic_wrap_s_desc,
|
||||
}, {
|
||||
.compatible = "mediatek,mt8192-imp_iic_wrap_w",
|
||||
.data = &imp_iic_wrap_w_desc,
|
||||
}, {
|
||||
.compatible = "mediatek,mt8192-imp_iic_wrap_ws",
|
||||
.data = &imp_iic_wrap_ws_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8192_imp_iic_wrap_drv = {
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.driver = {
|
||||
.name = "clk-mt8192-imp_iic_wrap",
|
||||
.of_match_table = of_match_clk_mt8192_imp_iic_wrap,
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(clk_mt8192_imp_iic_wrap_drv);
|
57
drivers/clk/mediatek/clk-mt8192-ipe.c
Normal file
57
drivers/clk/mediatek/clk-mt8192-ipe.c
Normal file
@ -0,0 +1,57 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
//
|
||||
// Copyright (c) 2021 MediaTek Inc.
|
||||
// Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
|
||||
#include <dt-bindings/clock/mt8192-clk.h>
|
||||
|
||||
static const struct mtk_gate_regs ipe_cg_regs = {
|
||||
.set_ofs = 0x4,
|
||||
.clr_ofs = 0x8,
|
||||
.sta_ofs = 0x0,
|
||||
};
|
||||
|
||||
#define GATE_IPE(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &ipe_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
static const struct mtk_gate ipe_clks[] = {
|
||||
GATE_IPE(CLK_IPE_LARB19, "ipe_larb19", "ipe_sel", 0),
|
||||
GATE_IPE(CLK_IPE_LARB20, "ipe_larb20", "ipe_sel", 1),
|
||||
GATE_IPE(CLK_IPE_SMI_SUBCOM, "ipe_smi_subcom", "ipe_sel", 2),
|
||||
GATE_IPE(CLK_IPE_FD, "ipe_fd", "ipe_sel", 3),
|
||||
GATE_IPE(CLK_IPE_FE, "ipe_fe", "ipe_sel", 4),
|
||||
GATE_IPE(CLK_IPE_RSC, "ipe_rsc", "ipe_sel", 5),
|
||||
GATE_IPE(CLK_IPE_DPE, "ipe_dpe", "ipe_sel", 6),
|
||||
GATE_IPE(CLK_IPE_GALS, "ipe_gals", "ipe_sel", 8),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc ipe_desc = {
|
||||
.clks = ipe_clks,
|
||||
.num_clks = ARRAY_SIZE(ipe_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8192_ipe[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt8192-ipesys",
|
||||
.data = &ipe_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8192_ipe_drv = {
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.driver = {
|
||||
.name = "clk-mt8192-ipe",
|
||||
.of_match_table = of_match_clk_mt8192_ipe,
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(clk_mt8192_ipe_drv);
|
82
drivers/clk/mediatek/clk-mt8192-mdp.c
Normal file
82
drivers/clk/mediatek/clk-mt8192-mdp.c
Normal file
@ -0,0 +1,82 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
//
|
||||
// Copyright (c) 2021 MediaTek Inc.
|
||||
// Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
|
||||
#include <dt-bindings/clock/mt8192-clk.h>
|
||||
|
||||
static const struct mtk_gate_regs mdp0_cg_regs = {
|
||||
.set_ofs = 0x104,
|
||||
.clr_ofs = 0x108,
|
||||
.sta_ofs = 0x100,
|
||||
};
|
||||
|
||||
static const struct mtk_gate_regs mdp1_cg_regs = {
|
||||
.set_ofs = 0x124,
|
||||
.clr_ofs = 0x128,
|
||||
.sta_ofs = 0x120,
|
||||
};
|
||||
|
||||
#define GATE_MDP0(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &mdp0_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
#define GATE_MDP1(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &mdp1_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
static const struct mtk_gate mdp_clks[] = {
|
||||
/* MDP0 */
|
||||
GATE_MDP0(CLK_MDP_RDMA0, "mdp_mdp_rdma0", "mdp_sel", 0),
|
||||
GATE_MDP0(CLK_MDP_TDSHP0, "mdp_mdp_tdshp0", "mdp_sel", 1),
|
||||
GATE_MDP0(CLK_MDP_IMG_DL_ASYNC0, "mdp_img_dl_async0", "mdp_sel", 2),
|
||||
GATE_MDP0(CLK_MDP_IMG_DL_ASYNC1, "mdp_img_dl_async1", "mdp_sel", 3),
|
||||
GATE_MDP0(CLK_MDP_RDMA1, "mdp_mdp_rdma1", "mdp_sel", 4),
|
||||
GATE_MDP0(CLK_MDP_TDSHP1, "mdp_mdp_tdshp1", "mdp_sel", 5),
|
||||
GATE_MDP0(CLK_MDP_SMI0, "mdp_smi0", "mdp_sel", 6),
|
||||
GATE_MDP0(CLK_MDP_APB_BUS, "mdp_apb_bus", "mdp_sel", 7),
|
||||
GATE_MDP0(CLK_MDP_WROT0, "mdp_mdp_wrot0", "mdp_sel", 8),
|
||||
GATE_MDP0(CLK_MDP_RSZ0, "mdp_mdp_rsz0", "mdp_sel", 9),
|
||||
GATE_MDP0(CLK_MDP_HDR0, "mdp_mdp_hdr0", "mdp_sel", 10),
|
||||
GATE_MDP0(CLK_MDP_MUTEX0, "mdp_mdp_mutex0", "mdp_sel", 11),
|
||||
GATE_MDP0(CLK_MDP_WROT1, "mdp_mdp_wrot1", "mdp_sel", 12),
|
||||
GATE_MDP0(CLK_MDP_RSZ1, "mdp_mdp_rsz1", "mdp_sel", 13),
|
||||
GATE_MDP0(CLK_MDP_HDR1, "mdp_mdp_hdr1", "mdp_sel", 14),
|
||||
GATE_MDP0(CLK_MDP_FAKE_ENG0, "mdp_mdp_fake_eng0", "mdp_sel", 15),
|
||||
GATE_MDP0(CLK_MDP_AAL0, "mdp_mdp_aal0", "mdp_sel", 16),
|
||||
GATE_MDP0(CLK_MDP_AAL1, "mdp_mdp_aal1", "mdp_sel", 17),
|
||||
GATE_MDP0(CLK_MDP_COLOR0, "mdp_mdp_color0", "mdp_sel", 18),
|
||||
GATE_MDP0(CLK_MDP_COLOR1, "mdp_mdp_color1", "mdp_sel", 19),
|
||||
/* MDP1 */
|
||||
GATE_MDP1(CLK_MDP_IMG_DL_RELAY0_ASYNC0, "mdp_img_dl_relay0_async0", "mdp_sel", 0),
|
||||
GATE_MDP1(CLK_MDP_IMG_DL_RELAY1_ASYNC1, "mdp_img_dl_relay1_async1", "mdp_sel", 8),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc mdp_desc = {
|
||||
.clks = mdp_clks,
|
||||
.num_clks = ARRAY_SIZE(mdp_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8192_mdp[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt8192-mdpsys",
|
||||
.data = &mdp_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8192_mdp_drv = {
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.driver = {
|
||||
.name = "clk-mt8192-mdp",
|
||||
.of_match_table = of_match_clk_mt8192_mdp,
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(clk_mt8192_mdp_drv);
|
50
drivers/clk/mediatek/clk-mt8192-mfg.c
Normal file
50
drivers/clk/mediatek/clk-mt8192-mfg.c
Normal file
@ -0,0 +1,50 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
//
|
||||
// Copyright (c) 2021 MediaTek Inc.
|
||||
// Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
|
||||
#include <dt-bindings/clock/mt8192-clk.h>
|
||||
|
||||
static const struct mtk_gate_regs mfg_cg_regs = {
|
||||
.set_ofs = 0x4,
|
||||
.clr_ofs = 0x8,
|
||||
.sta_ofs = 0x0,
|
||||
};
|
||||
|
||||
#define GATE_MFG(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &mfg_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
static const struct mtk_gate mfg_clks[] = {
|
||||
GATE_MFG(CLK_MFG_BG3D, "mfg_bg3d", "mfg_pll_sel", 0),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc mfg_desc = {
|
||||
.clks = mfg_clks,
|
||||
.num_clks = ARRAY_SIZE(mfg_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8192_mfg[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt8192-mfgcfg",
|
||||
.data = &mfg_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8192_mfg_drv = {
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.driver = {
|
||||
.name = "clk-mt8192-mfg",
|
||||
.of_match_table = of_match_clk_mt8192_mfg,
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(clk_mt8192_mfg_drv);
|
108
drivers/clk/mediatek/clk-mt8192-mm.c
Normal file
108
drivers/clk/mediatek/clk-mt8192-mm.c
Normal file
@ -0,0 +1,108 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
//
|
||||
// Copyright (c) 2021 MediaTek Inc.
|
||||
// Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
|
||||
#include <dt-bindings/clock/mt8192-clk.h>
|
||||
|
||||
static const struct mtk_gate_regs mm0_cg_regs = {
|
||||
.set_ofs = 0x104,
|
||||
.clr_ofs = 0x108,
|
||||
.sta_ofs = 0x100,
|
||||
};
|
||||
|
||||
static const struct mtk_gate_regs mm1_cg_regs = {
|
||||
.set_ofs = 0x114,
|
||||
.clr_ofs = 0x118,
|
||||
.sta_ofs = 0x110,
|
||||
};
|
||||
|
||||
static const struct mtk_gate_regs mm2_cg_regs = {
|
||||
.set_ofs = 0x1a4,
|
||||
.clr_ofs = 0x1a8,
|
||||
.sta_ofs = 0x1a0,
|
||||
};
|
||||
|
||||
#define GATE_MM0(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &mm0_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
#define GATE_MM1(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &mm1_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
#define GATE_MM2(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &mm2_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
static const struct mtk_gate mm_clks[] = {
|
||||
/* MM0 */
|
||||
GATE_MM0(CLK_MM_DISP_MUTEX0, "mm_disp_mutex0", "disp_sel", 0),
|
||||
GATE_MM0(CLK_MM_DISP_CONFIG, "mm_disp_config", "disp_sel", 1),
|
||||
GATE_MM0(CLK_MM_DISP_OVL0, "mm_disp_ovl0", "disp_sel", 2),
|
||||
GATE_MM0(CLK_MM_DISP_RDMA0, "mm_disp_rdma0", "disp_sel", 3),
|
||||
GATE_MM0(CLK_MM_DISP_OVL0_2L, "mm_disp_ovl0_2l", "disp_sel", 4),
|
||||
GATE_MM0(CLK_MM_DISP_WDMA0, "mm_disp_wdma0", "disp_sel", 5),
|
||||
GATE_MM0(CLK_MM_DISP_UFBC_WDMA0, "mm_disp_ufbc_wdma0", "disp_sel", 6),
|
||||
GATE_MM0(CLK_MM_DISP_RSZ0, "mm_disp_rsz0", "disp_sel", 7),
|
||||
GATE_MM0(CLK_MM_DISP_AAL0, "mm_disp_aal0", "disp_sel", 8),
|
||||
GATE_MM0(CLK_MM_DISP_CCORR0, "mm_disp_ccorr0", "disp_sel", 9),
|
||||
GATE_MM0(CLK_MM_DISP_DITHER0, "mm_disp_dither0", "disp_sel", 10),
|
||||
GATE_MM0(CLK_MM_SMI_INFRA, "mm_smi_infra", "disp_sel", 11),
|
||||
GATE_MM0(CLK_MM_DISP_GAMMA0, "mm_disp_gamma0", "disp_sel", 12),
|
||||
GATE_MM0(CLK_MM_DISP_POSTMASK0, "mm_disp_postmask0", "disp_sel", 13),
|
||||
GATE_MM0(CLK_MM_DISP_DSC_WRAP0, "mm_disp_dsc_wrap0", "disp_sel", 14),
|
||||
GATE_MM0(CLK_MM_DSI0, "mm_dsi0", "disp_sel", 15),
|
||||
GATE_MM0(CLK_MM_DISP_COLOR0, "mm_disp_color0", "disp_sel", 16),
|
||||
GATE_MM0(CLK_MM_SMI_COMMON, "mm_smi_common", "disp_sel", 17),
|
||||
GATE_MM0(CLK_MM_DISP_FAKE_ENG0, "mm_disp_fake_eng0", "disp_sel", 18),
|
||||
GATE_MM0(CLK_MM_DISP_FAKE_ENG1, "mm_disp_fake_eng1", "disp_sel", 19),
|
||||
GATE_MM0(CLK_MM_MDP_TDSHP4, "mm_mdp_tdshp4", "disp_sel", 20),
|
||||
GATE_MM0(CLK_MM_MDP_RSZ4, "mm_mdp_rsz4", "disp_sel", 21),
|
||||
GATE_MM0(CLK_MM_MDP_AAL4, "mm_mdp_aal4", "disp_sel", 22),
|
||||
GATE_MM0(CLK_MM_MDP_HDR4, "mm_mdp_hdr4", "disp_sel", 23),
|
||||
GATE_MM0(CLK_MM_MDP_RDMA4, "mm_mdp_rdma4", "disp_sel", 24),
|
||||
GATE_MM0(CLK_MM_MDP_COLOR4, "mm_mdp_color4", "disp_sel", 25),
|
||||
GATE_MM0(CLK_MM_DISP_Y2R0, "mm_disp_y2r0", "disp_sel", 26),
|
||||
GATE_MM0(CLK_MM_SMI_GALS, "mm_smi_gals", "disp_sel", 27),
|
||||
GATE_MM0(CLK_MM_DISP_OVL2_2L, "mm_disp_ovl2_2l", "disp_sel", 28),
|
||||
GATE_MM0(CLK_MM_DISP_RDMA4, "mm_disp_rdma4", "disp_sel", 29),
|
||||
GATE_MM0(CLK_MM_DISP_DPI0, "mm_disp_dpi0", "disp_sel", 30),
|
||||
/* MM1 */
|
||||
GATE_MM1(CLK_MM_SMI_IOMMU, "mm_smi_iommu", "disp_sel", 0),
|
||||
/* MM2 */
|
||||
GATE_MM2(CLK_MM_DSI_DSI0, "mm_dsi_dsi0", "disp_sel", 0),
|
||||
GATE_MM2(CLK_MM_DPI_DPI0, "mm_dpi_dpi0", "dpi_sel", 8),
|
||||
GATE_MM2(CLK_MM_26MHZ, "mm_26mhz", "clk26m", 24),
|
||||
GATE_MM2(CLK_MM_32KHZ, "mm_32khz", "clk32k", 25),
|
||||
};
|
||||
|
||||
static int clk_mt8192_mm_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *node = dev->parent->of_node;
|
||||
struct clk_onecell_data *clk_data;
|
||||
int r;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK);
|
||||
if (!clk_data)
|
||||
return -ENOMEM;
|
||||
|
||||
r = mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks), clk_data);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
return of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
|
||||
}
|
||||
|
||||
static struct platform_driver clk_mt8192_mm_drv = {
|
||||
.probe = clk_mt8192_mm_probe,
|
||||
.driver = {
|
||||
.name = "clk-mt8192-mm",
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(clk_mt8192_mm_drv);
|
85
drivers/clk/mediatek/clk-mt8192-msdc.c
Normal file
85
drivers/clk/mediatek/clk-mt8192-msdc.c
Normal file
@ -0,0 +1,85 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
//
|
||||
// Copyright (c) 2021 MediaTek Inc.
|
||||
// Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
|
||||
#include <dt-bindings/clock/mt8192-clk.h>
|
||||
|
||||
static const struct mtk_gate_regs msdc_cg_regs = {
|
||||
.set_ofs = 0xb4,
|
||||
.clr_ofs = 0xb4,
|
||||
.sta_ofs = 0xb4,
|
||||
};
|
||||
|
||||
static const struct mtk_gate_regs msdc_top_cg_regs = {
|
||||
.set_ofs = 0x0,
|
||||
.clr_ofs = 0x0,
|
||||
.sta_ofs = 0x0,
|
||||
};
|
||||
|
||||
#define GATE_MSDC(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &msdc_cg_regs, _shift, &mtk_clk_gate_ops_no_setclr_inv)
|
||||
|
||||
#define GATE_MSDC_TOP(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &msdc_top_cg_regs, _shift, &mtk_clk_gate_ops_no_setclr_inv)
|
||||
|
||||
static const struct mtk_gate msdc_clks[] = {
|
||||
GATE_MSDC(CLK_MSDC_AXI_WRAP, "msdc_axi_wrap", "axi_sel", 22),
|
||||
};
|
||||
|
||||
static const struct mtk_gate msdc_top_clks[] = {
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_AES_0P, "msdc_top_aes_0p", "aes_msdcfde_sel", 0),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_SRC_0P, "msdc_top_src_0p", "infra_msdc0_src", 1),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_SRC_1P, "msdc_top_src_1p", "infra_msdc1_src", 2),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_SRC_2P, "msdc_top_src_2p", "infra_msdc2_src", 3),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_P_MSDC0, "msdc_top_p_msdc0", "axi_sel", 4),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_P_MSDC1, "msdc_top_p_msdc1", "axi_sel", 5),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_P_MSDC2, "msdc_top_p_msdc2", "axi_sel", 6),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_P_CFG, "msdc_top_p_cfg", "axi_sel", 7),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_AXI, "msdc_top_axi", "axi_sel", 8),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_H_MST_0P, "msdc_top_h_mst_0p", "infra_msdc0", 9),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_H_MST_1P, "msdc_top_h_mst_1p", "infra_msdc1", 10),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_H_MST_2P, "msdc_top_h_mst_2p", "infra_msdc2", 11),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_MEM_OFF_DLY_26M, "msdc_top_mem_off_dly_26m", "clk26m", 12),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_32K, "msdc_top_32k", "clk32k", 13),
|
||||
GATE_MSDC_TOP(CLK_MSDC_TOP_AHB2AXI_BRG_AXI, "msdc_top_ahb2axi_brg_axi", "axi_sel", 14),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc msdc_desc = {
|
||||
.clks = msdc_clks,
|
||||
.num_clks = ARRAY_SIZE(msdc_clks),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc msdc_top_desc = {
|
||||
.clks = msdc_top_clks,
|
||||
.num_clks = ARRAY_SIZE(msdc_top_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8192_msdc[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt8192-msdc",
|
||||
.data = &msdc_desc,
|
||||
}, {
|
||||
.compatible = "mediatek,mt8192-msdc_top",
|
||||
.data = &msdc_top_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8192_msdc_drv = {
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.driver = {
|
||||
.name = "clk-mt8192-msdc",
|
||||
.of_match_table = of_match_clk_mt8192_msdc,
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(clk_mt8192_msdc_drv);
|
50
drivers/clk/mediatek/clk-mt8192-scp_adsp.c
Normal file
50
drivers/clk/mediatek/clk-mt8192-scp_adsp.c
Normal file
@ -0,0 +1,50 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
//
|
||||
// Copyright (c) 2021 MediaTek Inc.
|
||||
// Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
|
||||
#include <dt-bindings/clock/mt8192-clk.h>
|
||||
|
||||
static const struct mtk_gate_regs scp_adsp_cg_regs = {
|
||||
.set_ofs = 0x180,
|
||||
.clr_ofs = 0x180,
|
||||
.sta_ofs = 0x180,
|
||||
};
|
||||
|
||||
#define GATE_SCP_ADSP(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &scp_adsp_cg_regs, _shift, &mtk_clk_gate_ops_no_setclr)
|
||||
|
||||
static const struct mtk_gate scp_adsp_clks[] = {
|
||||
GATE_SCP_ADSP(CLK_SCP_ADSP_AUDIODSP, "scp_adsp_audiodsp", "adsp_sel", 0),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc scp_adsp_desc = {
|
||||
.clks = scp_adsp_clks,
|
||||
.num_clks = ARRAY_SIZE(scp_adsp_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8192_scp_adsp[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt8192-scp_adsp",
|
||||
.data = &scp_adsp_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8192_scp_adsp_drv = {
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.driver = {
|
||||
.name = "clk-mt8192-scp_adsp",
|
||||
.of_match_table = of_match_clk_mt8192_scp_adsp,
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(clk_mt8192_scp_adsp_drv);
|
94
drivers/clk/mediatek/clk-mt8192-vdec.c
Normal file
94
drivers/clk/mediatek/clk-mt8192-vdec.c
Normal file
@ -0,0 +1,94 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
//
|
||||
// Copyright (c) 2021 MediaTek Inc.
|
||||
// Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
|
||||
#include <dt-bindings/clock/mt8192-clk.h>
|
||||
|
||||
static const struct mtk_gate_regs vdec0_cg_regs = {
|
||||
.set_ofs = 0x0,
|
||||
.clr_ofs = 0x4,
|
||||
.sta_ofs = 0x0,
|
||||
};
|
||||
|
||||
static const struct mtk_gate_regs vdec1_cg_regs = {
|
||||
.set_ofs = 0x200,
|
||||
.clr_ofs = 0x204,
|
||||
.sta_ofs = 0x200,
|
||||
};
|
||||
|
||||
static const struct mtk_gate_regs vdec2_cg_regs = {
|
||||
.set_ofs = 0x8,
|
||||
.clr_ofs = 0xc,
|
||||
.sta_ofs = 0x8,
|
||||
};
|
||||
|
||||
#define GATE_VDEC0(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &vdec0_cg_regs, _shift, &mtk_clk_gate_ops_setclr_inv)
|
||||
|
||||
#define GATE_VDEC1(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &vdec1_cg_regs, _shift, &mtk_clk_gate_ops_setclr_inv)
|
||||
|
||||
#define GATE_VDEC2(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &vdec2_cg_regs, _shift, &mtk_clk_gate_ops_setclr_inv)
|
||||
|
||||
static const struct mtk_gate vdec_clks[] = {
|
||||
/* VDEC0 */
|
||||
GATE_VDEC0(CLK_VDEC_VDEC, "vdec_vdec", "vdec_sel", 0),
|
||||
GATE_VDEC0(CLK_VDEC_ACTIVE, "vdec_active", "vdec_sel", 4),
|
||||
/* VDEC1 */
|
||||
GATE_VDEC1(CLK_VDEC_LAT, "vdec_lat", "vdec_sel", 0),
|
||||
GATE_VDEC1(CLK_VDEC_LAT_ACTIVE, "vdec_lat_active", "vdec_sel", 4),
|
||||
/* VDEC2 */
|
||||
GATE_VDEC2(CLK_VDEC_LARB1, "vdec_larb1", "vdec_sel", 0),
|
||||
};
|
||||
|
||||
static const struct mtk_gate vdec_soc_clks[] = {
|
||||
/* VDEC_SOC0 */
|
||||
GATE_VDEC0(CLK_VDEC_SOC_VDEC, "vdec_soc_vdec", "vdec_sel", 0),
|
||||
GATE_VDEC0(CLK_VDEC_SOC_VDEC_ACTIVE, "vdec_soc_vdec_active", "vdec_sel", 4),
|
||||
/* VDEC_SOC1 */
|
||||
GATE_VDEC1(CLK_VDEC_SOC_LAT, "vdec_soc_lat", "vdec_sel", 0),
|
||||
GATE_VDEC1(CLK_VDEC_SOC_LAT_ACTIVE, "vdec_soc_lat_active", "vdec_sel", 4),
|
||||
/* VDEC_SOC2 */
|
||||
GATE_VDEC2(CLK_VDEC_SOC_LARB1, "vdec_soc_larb1", "vdec_sel", 0),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc vdec_desc = {
|
||||
.clks = vdec_clks,
|
||||
.num_clks = ARRAY_SIZE(vdec_clks),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc vdec_soc_desc = {
|
||||
.clks = vdec_soc_clks,
|
||||
.num_clks = ARRAY_SIZE(vdec_soc_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8192_vdec[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt8192-vdecsys",
|
||||
.data = &vdec_desc,
|
||||
}, {
|
||||
.compatible = "mediatek,mt8192-vdecsys_soc",
|
||||
.data = &vdec_soc_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8192_vdec_drv = {
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.driver = {
|
||||
.name = "clk-mt8192-vdec",
|
||||
.of_match_table = of_match_clk_mt8192_vdec,
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(clk_mt8192_vdec_drv);
|
53
drivers/clk/mediatek/clk-mt8192-venc.c
Normal file
53
drivers/clk/mediatek/clk-mt8192-venc.c
Normal file
@ -0,0 +1,53 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
//
|
||||
// Copyright (c) 2021 MediaTek Inc.
|
||||
// Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
|
||||
#include <dt-bindings/clock/mt8192-clk.h>
|
||||
|
||||
static const struct mtk_gate_regs venc_cg_regs = {
|
||||
.set_ofs = 0x4,
|
||||
.clr_ofs = 0x8,
|
||||
.sta_ofs = 0x0,
|
||||
};
|
||||
|
||||
#define GATE_VENC(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &venc_cg_regs, _shift, &mtk_clk_gate_ops_setclr_inv)
|
||||
|
||||
static const struct mtk_gate venc_clks[] = {
|
||||
GATE_VENC(CLK_VENC_SET0_LARB, "venc_set0_larb", "venc_sel", 0),
|
||||
GATE_VENC(CLK_VENC_SET1_VENC, "venc_set1_venc", "venc_sel", 4),
|
||||
GATE_VENC(CLK_VENC_SET2_JPGENC, "venc_set2_jpgenc", "venc_sel", 8),
|
||||
GATE_VENC(CLK_VENC_SET5_GALS, "venc_set5_gals", "venc_sel", 28),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc venc_desc = {
|
||||
.clks = venc_clks,
|
||||
.num_clks = ARRAY_SIZE(venc_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8192_venc[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt8192-vencsys",
|
||||
.data = &venc_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8192_venc_drv = {
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.driver = {
|
||||
.name = "clk-mt8192-venc",
|
||||
.of_match_table = of_match_clk_mt8192_venc,
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(clk_mt8192_venc_drv);
|
1326
drivers/clk/mediatek/clk-mt8192.c
Normal file
1326
drivers/clk/mediatek/clk-mt8192.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -13,6 +13,7 @@
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/of_device.h>
|
||||
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-gate.h"
|
||||
@ -106,7 +107,7 @@ int mtk_clk_register_gates_with_dev(struct device_node *node,
|
||||
if (!clk_data)
|
||||
return -ENOMEM;
|
||||
|
||||
regmap = syscon_node_to_regmap(node);
|
||||
regmap = device_node_to_regmap(node);
|
||||
if (IS_ERR(regmap)) {
|
||||
pr_err("Cannot find regmap for %pOF: %ld\n", node,
|
||||
PTR_ERR(regmap));
|
||||
@ -286,3 +287,25 @@ void mtk_clk_register_dividers(const struct mtk_clk_divider *mcds,
|
||||
clk_data->clks[mcd->id] = clk;
|
||||
}
|
||||
}
|
||||
|
||||
int mtk_clk_simple_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct mtk_clk_desc *mcd;
|
||||
struct clk_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
int r;
|
||||
|
||||
mcd = of_device_get_match_data(&pdev->dev);
|
||||
if (!mcd)
|
||||
return -EINVAL;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(mcd->num_clks);
|
||||
if (!clk_data)
|
||||
return -ENOMEM;
|
||||
|
||||
r = mtk_clk_register_gates(node, mcd->clks, mcd->num_clks, clk_data);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
return of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
struct clk;
|
||||
struct clk_onecell_data;
|
||||
@ -213,13 +214,13 @@ struct mtk_pll_div_table {
|
||||
struct mtk_pll_data {
|
||||
int id;
|
||||
const char *name;
|
||||
uint32_t reg;
|
||||
uint32_t pwr_reg;
|
||||
uint32_t en_mask;
|
||||
uint32_t pd_reg;
|
||||
uint32_t tuner_reg;
|
||||
uint32_t tuner_en_reg;
|
||||
uint8_t tuner_en_bit;
|
||||
u32 reg;
|
||||
u32 pwr_reg;
|
||||
u32 en_mask;
|
||||
u32 pd_reg;
|
||||
u32 tuner_reg;
|
||||
u32 tuner_en_reg;
|
||||
u8 tuner_en_bit;
|
||||
int pd_shift;
|
||||
unsigned int flags;
|
||||
const struct clk_ops *ops;
|
||||
@ -228,11 +229,13 @@ struct mtk_pll_data {
|
||||
unsigned long fmax;
|
||||
int pcwbits;
|
||||
int pcwibits;
|
||||
uint32_t pcw_reg;
|
||||
u32 pcw_reg;
|
||||
int pcw_shift;
|
||||
uint32_t pcw_chg_reg;
|
||||
u32 pcw_chg_reg;
|
||||
const struct mtk_pll_div_table *div_table;
|
||||
const char *parent_name;
|
||||
u32 en_reg;
|
||||
u8 pll_en_bit; /* Assume 0, indicates BIT(0) by default */
|
||||
};
|
||||
|
||||
void mtk_clk_register_plls(struct device_node *node,
|
||||
@ -248,4 +251,11 @@ void mtk_register_reset_controller(struct device_node *np,
|
||||
void mtk_register_reset_controller_set_clr(struct device_node *np,
|
||||
unsigned int num_regs, int regofs);
|
||||
|
||||
struct mtk_clk_desc {
|
||||
const struct mtk_gate *clks;
|
||||
size_t num_clks;
|
||||
};
|
||||
|
||||
int mtk_clk_simple_probe(struct platform_device *pdev);
|
||||
|
||||
#endif /* __DRV_CLK_MTK_H */
|
||||
|
@ -116,7 +116,12 @@ static int mtk_clk_mux_set_parent_setclr_lock(struct clk_hw *hw, u8 index)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct clk_ops mtk_mux_ops = {
|
||||
const struct clk_ops mtk_mux_clr_set_upd_ops = {
|
||||
.get_parent = mtk_clk_mux_get_parent,
|
||||
.set_parent = mtk_clk_mux_set_parent_setclr_lock,
|
||||
};
|
||||
|
||||
const struct clk_ops mtk_mux_gate_clr_set_upd_ops = {
|
||||
.enable = mtk_clk_mux_enable_setclr,
|
||||
.disable = mtk_clk_mux_disable_setclr,
|
||||
.is_enabled = mtk_clk_mux_is_enabled,
|
||||
@ -140,7 +145,7 @@ static struct clk *mtk_clk_register_mux(const struct mtk_mux *mux,
|
||||
init.flags = mux->flags | CLK_SET_RATE_PARENT;
|
||||
init.parent_names = mux->parent_names;
|
||||
init.num_parents = mux->num_parents;
|
||||
init.ops = &mtk_mux_ops;
|
||||
init.ops = mux->ops;
|
||||
|
||||
clk_mux->regmap = regmap;
|
||||
clk_mux->data = mux;
|
||||
@ -165,7 +170,7 @@ int mtk_clk_register_muxes(const struct mtk_mux *muxes,
|
||||
struct clk *clk;
|
||||
int i;
|
||||
|
||||
regmap = syscon_node_to_regmap(node);
|
||||
regmap = device_node_to_regmap(node);
|
||||
if (IS_ERR(regmap)) {
|
||||
pr_err("Cannot find regmap for %pOF: %ld\n", node,
|
||||
PTR_ERR(regmap));
|
||||
|
@ -33,12 +33,13 @@ struct mtk_mux {
|
||||
u8 gate_shift;
|
||||
s8 upd_shift;
|
||||
|
||||
const struct clk_ops *ops;
|
||||
signed char num_parents;
|
||||
};
|
||||
|
||||
#define GATE_CLR_SET_UPD_FLAGS(_id, _name, _parents, _mux_ofs, \
|
||||
_mux_set_ofs, _mux_clr_ofs, _shift, _width, \
|
||||
_gate, _upd_ofs, _upd, _flags) { \
|
||||
_gate, _upd_ofs, _upd, _flags, _ops) { \
|
||||
.id = _id, \
|
||||
.name = _name, \
|
||||
.mux_ofs = _mux_ofs, \
|
||||
@ -52,14 +53,19 @@ struct mtk_mux {
|
||||
.parent_names = _parents, \
|
||||
.num_parents = ARRAY_SIZE(_parents), \
|
||||
.flags = _flags, \
|
||||
.ops = &_ops, \
|
||||
}
|
||||
|
||||
extern const struct clk_ops mtk_mux_clr_set_upd_ops;
|
||||
extern const struct clk_ops mtk_mux_gate_clr_set_upd_ops;
|
||||
|
||||
#define MUX_GATE_CLR_SET_UPD_FLAGS(_id, _name, _parents, _mux_ofs, \
|
||||
_mux_set_ofs, _mux_clr_ofs, _shift, _width, \
|
||||
_gate, _upd_ofs, _upd, _flags) \
|
||||
GATE_CLR_SET_UPD_FLAGS(_id, _name, _parents, _mux_ofs, \
|
||||
_mux_set_ofs, _mux_clr_ofs, _shift, _width, \
|
||||
_gate, _upd_ofs, _upd, _flags) \
|
||||
_gate, _upd_ofs, _upd, _flags, \
|
||||
mtk_mux_gate_clr_set_upd_ops)
|
||||
|
||||
#define MUX_GATE_CLR_SET_UPD(_id, _name, _parents, _mux_ofs, \
|
||||
_mux_set_ofs, _mux_clr_ofs, _shift, _width, \
|
||||
@ -69,6 +75,14 @@ struct mtk_mux {
|
||||
_width, _gate, _upd_ofs, _upd, \
|
||||
CLK_SET_RATE_PARENT)
|
||||
|
||||
#define MUX_CLR_SET_UPD(_id, _name, _parents, _mux_ofs, \
|
||||
_mux_set_ofs, _mux_clr_ofs, _shift, _width, \
|
||||
_upd_ofs, _upd) \
|
||||
GATE_CLR_SET_UPD_FLAGS(_id, _name, _parents, _mux_ofs, \
|
||||
_mux_set_ofs, _mux_clr_ofs, _shift, _width, \
|
||||
0, _upd_ofs, _upd, CLK_SET_RATE_PARENT, \
|
||||
mtk_mux_clr_set_upd_ops)
|
||||
|
||||
int mtk_clk_register_muxes(const struct mtk_mux *muxes,
|
||||
int num, struct device_node *node,
|
||||
spinlock_t *lock,
|
||||
|
@ -44,6 +44,7 @@ struct mtk_clk_pll {
|
||||
void __iomem *tuner_en_addr;
|
||||
void __iomem *pcw_addr;
|
||||
void __iomem *pcw_chg_addr;
|
||||
void __iomem *en_addr;
|
||||
const struct mtk_pll_data *data;
|
||||
};
|
||||
|
||||
@ -56,7 +57,7 @@ static int mtk_pll_is_prepared(struct clk_hw *hw)
|
||||
{
|
||||
struct mtk_clk_pll *pll = to_mtk_clk_pll(hw);
|
||||
|
||||
return (readl(pll->base_addr + REG_CON0) & CON0_BASE_EN) != 0;
|
||||
return (readl(pll->en_addr) & BIT(pll->data->pll_en_bit)) != 0;
|
||||
}
|
||||
|
||||
static unsigned long __mtk_pll_recalc_rate(struct mtk_clk_pll *pll, u32 fin,
|
||||
@ -238,6 +239,7 @@ static int mtk_pll_prepare(struct clk_hw *hw)
|
||||
{
|
||||
struct mtk_clk_pll *pll = to_mtk_clk_pll(hw);
|
||||
u32 r;
|
||||
u32 div_en_mask;
|
||||
|
||||
r = readl(pll->pwr_addr) | CON0_PWR_ON;
|
||||
writel(r, pll->pwr_addr);
|
||||
@ -247,9 +249,14 @@ static int mtk_pll_prepare(struct clk_hw *hw)
|
||||
writel(r, pll->pwr_addr);
|
||||
udelay(1);
|
||||
|
||||
r = readl(pll->base_addr + REG_CON0);
|
||||
r |= pll->data->en_mask;
|
||||
writel(r, pll->base_addr + REG_CON0);
|
||||
r = readl(pll->en_addr) | BIT(pll->data->pll_en_bit);
|
||||
writel(r, pll->en_addr);
|
||||
|
||||
div_en_mask = pll->data->en_mask & ~CON0_BASE_EN;
|
||||
if (div_en_mask) {
|
||||
r = readl(pll->base_addr + REG_CON0) | div_en_mask;
|
||||
writel(r, pll->base_addr + REG_CON0);
|
||||
}
|
||||
|
||||
__mtk_pll_tuner_enable(pll);
|
||||
|
||||
@ -268,6 +275,7 @@ static void mtk_pll_unprepare(struct clk_hw *hw)
|
||||
{
|
||||
struct mtk_clk_pll *pll = to_mtk_clk_pll(hw);
|
||||
u32 r;
|
||||
u32 div_en_mask;
|
||||
|
||||
if (pll->data->flags & HAVE_RST_BAR) {
|
||||
r = readl(pll->base_addr + REG_CON0);
|
||||
@ -277,9 +285,14 @@ static void mtk_pll_unprepare(struct clk_hw *hw)
|
||||
|
||||
__mtk_pll_tuner_disable(pll);
|
||||
|
||||
r = readl(pll->base_addr + REG_CON0);
|
||||
r &= ~CON0_BASE_EN;
|
||||
writel(r, pll->base_addr + REG_CON0);
|
||||
div_en_mask = pll->data->en_mask & ~CON0_BASE_EN;
|
||||
if (div_en_mask) {
|
||||
r = readl(pll->base_addr + REG_CON0) & ~div_en_mask;
|
||||
writel(r, pll->base_addr + REG_CON0);
|
||||
}
|
||||
|
||||
r = readl(pll->en_addr) & ~BIT(pll->data->pll_en_bit);
|
||||
writel(r, pll->en_addr);
|
||||
|
||||
r = readl(pll->pwr_addr) | CON0_ISO_EN;
|
||||
writel(r, pll->pwr_addr);
|
||||
@ -321,6 +334,10 @@ static struct clk *mtk_clk_register_pll(const struct mtk_pll_data *data,
|
||||
pll->tuner_addr = base + data->tuner_reg;
|
||||
if (data->tuner_en_reg)
|
||||
pll->tuner_en_addr = base + data->tuner_en_reg;
|
||||
if (data->en_reg)
|
||||
pll->en_addr = base + data->en_reg;
|
||||
else
|
||||
pll->en_addr = pll->base_addr + REG_CON0;
|
||||
pll->hw.init = &init;
|
||||
pll->data = data;
|
||||
|
||||
|
@ -98,7 +98,7 @@ static void mtk_register_reset_controller_common(struct device_node *np,
|
||||
int ret;
|
||||
struct regmap *regmap;
|
||||
|
||||
regmap = syscon_node_to_regmap(np);
|
||||
regmap = device_node_to_regmap(np);
|
||||
if (IS_ERR(regmap)) {
|
||||
pr_err("Cannot find regmap for %pOF: %ld\n", np,
|
||||
PTR_ERR(regmap));
|
||||
|
@ -240,6 +240,14 @@ config MSM_MMCC_8960
|
||||
Say Y if you want to support multimedia devices such as display,
|
||||
graphics, video encode/decode, camera, etc.
|
||||
|
||||
config MSM_GCC_8953
|
||||
tristate "MSM8953 Global Clock Controller"
|
||||
select QCOM_GDSC
|
||||
help
|
||||
Support for the global clock controller on msm8953 devices.
|
||||
Say Y if you want to use devices such as UART, SPI i2c, USB,
|
||||
SD/eMMC, display, graphics, camera etc.
|
||||
|
||||
config MSM_GCC_8974
|
||||
tristate "MSM8974 Global Clock Controller"
|
||||
select QCOM_GDSC
|
||||
@ -257,6 +265,15 @@ config MSM_MMCC_8974
|
||||
Say Y if you want to support multimedia devices such as display,
|
||||
graphics, video encode/decode, camera, etc.
|
||||
|
||||
config MSM_MMCC_8994
|
||||
tristate "MSM8994 Multimedia Clock Controller"
|
||||
select MSM_GCC_8994
|
||||
select QCOM_GDSC
|
||||
help
|
||||
Support for the multimedia clock controller on msm8994 devices.
|
||||
Say Y if you want to support multimedia devices such as display,
|
||||
graphics, video encode/decode, camera, etc.
|
||||
|
||||
config MSM_GCC_8994
|
||||
tristate "MSM8994 Global Clock Controller"
|
||||
help
|
||||
@ -332,6 +349,15 @@ config SC_DISPCC_7180
|
||||
Say Y if you want to support display devices and functionality such as
|
||||
splash screen.
|
||||
|
||||
config SC_DISPCC_7280
|
||||
tristate "SC7280 Display Clock Controller"
|
||||
select SC_GCC_7280
|
||||
help
|
||||
Support for the display clock controller on Qualcomm Technologies, Inc.
|
||||
SC7280 devices.
|
||||
Say Y if you want to support display devices and functionality such as
|
||||
splash screen.
|
||||
|
||||
config SC_GCC_7180
|
||||
tristate "SC7180 Global Clock Controller"
|
||||
select QCOM_GDSC
|
||||
@ -376,6 +402,14 @@ config SC_GPUCC_7180
|
||||
Say Y if you want to support graphics controller devices and
|
||||
functionality such as 3D graphics.
|
||||
|
||||
config SC_GPUCC_7280
|
||||
tristate "SC7280 Graphics Clock Controller"
|
||||
select SC_GCC_7280
|
||||
help
|
||||
Support for the graphics clock controller on SC7280 devices.
|
||||
Say Y if you want to support graphics controller devices and
|
||||
functionality such as 3D graphics.
|
||||
|
||||
config SC_MSS_7180
|
||||
tristate "SC7180 Modem Clock Controller"
|
||||
select SC_GCC_7180
|
||||
@ -393,6 +427,14 @@ config SC_VIDEOCC_7180
|
||||
Say Y if you want to support video devices and functionality such as
|
||||
video encode and decode.
|
||||
|
||||
config SC_VIDEOCC_7280
|
||||
tristate "SC7280 Video Clock Controller"
|
||||
select SC_GCC_7280
|
||||
help
|
||||
Support for the video clock controller on SC7280 devices.
|
||||
Say Y if you want to support video devices and functionality such as
|
||||
video encode and decode.
|
||||
|
||||
config SDM_CAMCC_845
|
||||
tristate "SDM845 Camera Clock Controller"
|
||||
select SDM_GCC_845
|
||||
@ -506,6 +548,13 @@ config SM_DISPCC_8250
|
||||
Say Y if you want to support display devices and functionality such as
|
||||
splash screen.
|
||||
|
||||
config SM_GCC_6115
|
||||
tristate "SM6115 and SM4250 Global Clock Controller"
|
||||
help
|
||||
Support for the global clock controller on SM6115 and SM4250 devices.
|
||||
Say Y if you want to use peripheral devices such as UART, SPI,
|
||||
i2C, USB, UFS, SDDC, PCIe, etc.
|
||||
|
||||
config SM_GCC_6125
|
||||
tristate "SM6125 Global Clock Controller"
|
||||
help
|
||||
@ -513,6 +562,13 @@ config SM_GCC_6125
|
||||
Say Y if you want to use peripheral devices such as UART,
|
||||
SPI, I2C, USB, SD/UFS, PCIe etc.
|
||||
|
||||
config SM_GCC_6350
|
||||
tristate "SM6350 Global Clock Controller"
|
||||
help
|
||||
Support for the global clock controller on SM6350 devices.
|
||||
Say Y if you want to use peripheral devices such as UART,
|
||||
SPI, I2C, USB, SD/UFS, PCIe etc.
|
||||
|
||||
config SM_GCC_8150
|
||||
tristate "SM8150 Global Clock Controller"
|
||||
help
|
||||
@ -554,7 +610,7 @@ config SM_GPUCC_8250
|
||||
|
||||
config SM_VIDEOCC_8150
|
||||
tristate "SM8150 Video Clock Controller"
|
||||
select SDM_GCC_8150
|
||||
select SM_GCC_8150
|
||||
select QCOM_GDSC
|
||||
help
|
||||
Support for the video clock controller on SM8150 devices.
|
||||
@ -563,7 +619,7 @@ config SM_VIDEOCC_8150
|
||||
|
||||
config SM_VIDEOCC_8250
|
||||
tristate "SM8250 Video Clock Controller"
|
||||
select SDM_GCC_8250
|
||||
select SM_GCC_8250
|
||||
select QCOM_GDSC
|
||||
help
|
||||
Support for the video clock controller on SM8250 devices.
|
||||
|
@ -33,6 +33,7 @@ obj-$(CONFIG_MDM_LCC_9615) += lcc-mdm9615.o
|
||||
obj-$(CONFIG_MSM_GCC_8660) += gcc-msm8660.o
|
||||
obj-$(CONFIG_MSM_GCC_8916) += gcc-msm8916.o
|
||||
obj-$(CONFIG_MSM_GCC_8939) += gcc-msm8939.o
|
||||
obj-$(CONFIG_MSM_GCC_8953) += gcc-msm8953.o
|
||||
obj-$(CONFIG_MSM_GCC_8960) += gcc-msm8960.o
|
||||
obj-$(CONFIG_MSM_GCC_8974) += gcc-msm8974.o
|
||||
obj-$(CONFIG_MSM_GCC_8994) += gcc-msm8994.o
|
||||
@ -42,6 +43,7 @@ obj-$(CONFIG_MSM_GCC_8998) += gcc-msm8998.o
|
||||
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_8994) += mmcc-msm8994.o
|
||||
obj-$(CONFIG_MSM_MMCC_8996) += mmcc-msm8996.o
|
||||
obj-$(CONFIG_MSM_MMCC_8998) += mmcc-msm8998.o
|
||||
obj-$(CONFIG_QCOM_A53PLL) += a53-pll.o
|
||||
@ -57,13 +59,16 @@ obj-$(CONFIG_QCS_Q6SSTOP_404) += q6sstop-qcs404.o
|
||||
obj-$(CONFIG_QCS_TURING_404) += turingcc-qcs404.o
|
||||
obj-$(CONFIG_SC_CAMCC_7180) += camcc-sc7180.o
|
||||
obj-$(CONFIG_SC_DISPCC_7180) += dispcc-sc7180.o
|
||||
obj-$(CONFIG_SC_DISPCC_7280) += dispcc-sc7280.o
|
||||
obj-$(CONFIG_SC_GCC_7180) += gcc-sc7180.o
|
||||
obj-$(CONFIG_SC_GCC_7280) += gcc-sc7280.o
|
||||
obj-$(CONFIG_SC_GCC_8180X) += gcc-sc8180x.o
|
||||
obj-$(CONFIG_SC_GPUCC_7180) += gpucc-sc7180.o
|
||||
obj-$(CONFIG_SC_GPUCC_7280) += gpucc-sc7280.o
|
||||
obj-$(CONFIG_SC_LPASS_CORECC_7180) += lpasscorecc-sc7180.o
|
||||
obj-$(CONFIG_SC_MSS_7180) += mss-sc7180.o
|
||||
obj-$(CONFIG_SC_VIDEOCC_7180) += videocc-sc7180.o
|
||||
obj-$(CONFIG_SC_VIDEOCC_7280) += videocc-sc7280.o
|
||||
obj-$(CONFIG_SDM_CAMCC_845) += camcc-sdm845.o
|
||||
obj-$(CONFIG_SDM_DISPCC_845) += dispcc-sdm845.o
|
||||
obj-$(CONFIG_SDM_GCC_660) += gcc-sdm660.o
|
||||
@ -76,7 +81,9 @@ obj-$(CONFIG_SDM_VIDEOCC_845) += videocc-sdm845.o
|
||||
obj-$(CONFIG_SDX_GCC_55) += gcc-sdx55.o
|
||||
obj-$(CONFIG_SM_CAMCC_8250) += camcc-sm8250.o
|
||||
obj-$(CONFIG_SM_DISPCC_8250) += dispcc-sm8250.o
|
||||
obj-$(CONFIG_SM_GCC_6115) += gcc-sm6115.o
|
||||
obj-$(CONFIG_SM_GCC_6125) += gcc-sm6125.o
|
||||
obj-$(CONFIG_SM_GCC_6350) += gcc-sm6350.o
|
||||
obj-$(CONFIG_SM_GCC_8150) += gcc-sm8150.o
|
||||
obj-$(CONFIG_SM_GCC_8250) += gcc-sm8250.o
|
||||
obj-$(CONFIG_SM_GCC_8350) += gcc-sm8350.o
|
||||
|
@ -6,9 +6,11 @@
|
||||
* Author: Georgi Djakov <georgi.djakov@linaro.org>
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
@ -34,9 +36,59 @@ static const struct regmap_config a53pll_regmap_config = {
|
||||
.fast_io = true,
|
||||
};
|
||||
|
||||
static struct pll_freq_tbl *qcom_a53pll_get_freq_tbl(struct device *dev)
|
||||
{
|
||||
struct pll_freq_tbl *freq_tbl;
|
||||
unsigned long xo_freq;
|
||||
unsigned long freq;
|
||||
struct clk *xo_clk;
|
||||
int count;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
xo_clk = devm_clk_get(dev, "xo");
|
||||
if (IS_ERR(xo_clk))
|
||||
return NULL;
|
||||
|
||||
xo_freq = clk_get_rate(xo_clk);
|
||||
|
||||
ret = devm_pm_opp_of_add_table(dev);
|
||||
if (ret)
|
||||
return NULL;
|
||||
|
||||
count = dev_pm_opp_get_opp_count(dev);
|
||||
if (count <= 0)
|
||||
return NULL;
|
||||
|
||||
freq_tbl = devm_kcalloc(dev, count + 1, sizeof(*freq_tbl), GFP_KERNEL);
|
||||
if (!freq_tbl)
|
||||
return NULL;
|
||||
|
||||
for (i = 0, freq = 0; i < count; i++, freq++) {
|
||||
struct dev_pm_opp *opp;
|
||||
|
||||
opp = dev_pm_opp_find_freq_ceil(dev, &freq);
|
||||
if (IS_ERR(opp))
|
||||
return NULL;
|
||||
|
||||
/* Skip the freq that is not divisible */
|
||||
if (freq % xo_freq)
|
||||
continue;
|
||||
|
||||
freq_tbl[i].freq = freq;
|
||||
freq_tbl[i].l = freq / xo_freq;
|
||||
freq_tbl[i].n = 1;
|
||||
|
||||
dev_pm_opp_put(opp);
|
||||
}
|
||||
|
||||
return freq_tbl;
|
||||
}
|
||||
|
||||
static int qcom_a53pll_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *np = dev->of_node;
|
||||
struct regmap *regmap;
|
||||
struct resource *res;
|
||||
struct clk_pll *pll;
|
||||
@ -64,13 +116,22 @@ static int qcom_a53pll_probe(struct platform_device *pdev)
|
||||
pll->mode_reg = 0x00;
|
||||
pll->status_reg = 0x1c;
|
||||
pll->status_bit = 16;
|
||||
pll->freq_tbl = a53pll_freq;
|
||||
|
||||
init.name = "a53pll";
|
||||
pll->freq_tbl = qcom_a53pll_get_freq_tbl(dev);
|
||||
if (!pll->freq_tbl) {
|
||||
/* Fall on a53pll_freq if no freq_tbl is found from OPP */
|
||||
pll->freq_tbl = a53pll_freq;
|
||||
}
|
||||
|
||||
/* Use an unique name by appending @unit-address */
|
||||
init.name = devm_kasprintf(dev, GFP_KERNEL, "a53pll%s",
|
||||
strchrnul(np->full_name, '@'));
|
||||
if (!init.name)
|
||||
return -ENOMEM;
|
||||
|
||||
init.parent_names = (const char *[]){ "xo" };
|
||||
init.num_parents = 1;
|
||||
init.ops = &clk_pll_sr2_ops;
|
||||
init.flags = CLK_IS_CRITICAL;
|
||||
pll->clkr.hw.init = &init;
|
||||
|
||||
ret = devm_clk_register_regmap(dev, &pll->clkr);
|
||||
@ -91,6 +152,7 @@ static int qcom_a53pll_probe(struct platform_device *pdev)
|
||||
|
||||
static const struct of_device_id qcom_a53pll_match_table[] = {
|
||||
{ .compatible = "qcom,msm8916-a53pll" },
|
||||
{ .compatible = "qcom,msm8939-a53pll" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, qcom_a53pll_match_table);
|
||||
|
@ -46,6 +46,7 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device *parent = dev->parent;
|
||||
struct device_node *np = parent->of_node;
|
||||
struct clk_regmap_mux_div *a53cc;
|
||||
struct regmap *regmap;
|
||||
struct clk_init_data init = { };
|
||||
@ -61,11 +62,16 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev)
|
||||
if (!a53cc)
|
||||
return -ENOMEM;
|
||||
|
||||
init.name = "a53mux";
|
||||
/* Use an unique name by appending parent's @unit-address */
|
||||
init.name = devm_kasprintf(dev, GFP_KERNEL, "a53mux%s",
|
||||
strchrnul(np->full_name, '@'));
|
||||
if (!init.name)
|
||||
return -ENOMEM;
|
||||
|
||||
init.parent_data = pdata;
|
||||
init.num_parents = ARRAY_SIZE(pdata);
|
||||
init.ops = &clk_regmap_mux_div_ops;
|
||||
init.flags = CLK_SET_RATE_PARENT;
|
||||
init.flags = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT;
|
||||
|
||||
a53cc->clkr.hw.init = &init;
|
||||
a53cc->clkr.regmap = regmap;
|
||||
|
@ -1652,32 +1652,35 @@ static int cam_cc_sc7180_probe(struct platform_device *pdev)
|
||||
struct regmap *regmap;
|
||||
int ret;
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
ret = pm_clk_create(&pdev->dev);
|
||||
ret = devm_pm_runtime_enable(&pdev->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = devm_pm_clk_create(&pdev->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = pm_clk_add(&pdev->dev, "xo");
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "Failed to acquire XO clock\n");
|
||||
goto disable_pm_runtime;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = pm_clk_add(&pdev->dev, "iface");
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "Failed to acquire iface clock\n");
|
||||
goto disable_pm_runtime;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = pm_runtime_get(&pdev->dev);
|
||||
if (ret)
|
||||
goto destroy_pm_clk;
|
||||
return ret;
|
||||
|
||||
regmap = qcom_cc_map(pdev, &cam_cc_sc7180_desc);
|
||||
if (IS_ERR(regmap)) {
|
||||
ret = PTR_ERR(regmap);
|
||||
pm_runtime_put(&pdev->dev);
|
||||
goto destroy_pm_clk;
|
||||
return ret;
|
||||
}
|
||||
|
||||
clk_fabia_pll_configure(&cam_cc_pll0, regmap, &cam_cc_pll0_config);
|
||||
@ -1689,18 +1692,10 @@ static int cam_cc_sc7180_probe(struct platform_device *pdev)
|
||||
pm_runtime_put(&pdev->dev);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "Failed to register CAM CC clocks\n");
|
||||
goto destroy_pm_clk;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
destroy_pm_clk:
|
||||
pm_clk_destroy(&pdev->dev);
|
||||
|
||||
disable_pm_runtime:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops cam_cc_pm_ops = {
|
||||
|
@ -536,6 +536,26 @@ static const struct clk_rpmh_desc clk_rpmh_sc7280 = {
|
||||
.num_clks = ARRAY_SIZE(sc7280_rpmh_clocks),
|
||||
};
|
||||
|
||||
DEFINE_CLK_RPMH_VRM(sm6350, ln_bb_clk2, ln_bb_clk2_ao, "lnbclkg2", 4);
|
||||
DEFINE_CLK_RPMH_VRM(sm6350, ln_bb_clk3, ln_bb_clk3_ao, "lnbclkg3", 4);
|
||||
DEFINE_CLK_RPMH_ARC(sm6350, qlink, qlink_ao, "qphy.lvl", 0x1, 4);
|
||||
|
||||
static struct clk_hw *sm6350_rpmh_clocks[] = {
|
||||
[RPMH_CXO_CLK] = &sc7280_bi_tcxo.hw,
|
||||
[RPMH_CXO_CLK_A] = &sc7280_bi_tcxo_ao.hw,
|
||||
[RPMH_LN_BB_CLK2] = &sm6350_ln_bb_clk2.hw,
|
||||
[RPMH_LN_BB_CLK2_A] = &sm6350_ln_bb_clk2_ao.hw,
|
||||
[RPMH_LN_BB_CLK3] = &sm6350_ln_bb_clk3.hw,
|
||||
[RPMH_LN_BB_CLK3_A] = &sm6350_ln_bb_clk3_ao.hw,
|
||||
[RPMH_QLINK_CLK] = &sm6350_qlink.hw,
|
||||
[RPMH_QLINK_CLK_A] = &sm6350_qlink_ao.hw,
|
||||
};
|
||||
|
||||
static const struct clk_rpmh_desc clk_rpmh_sm6350 = {
|
||||
.clks = sm6350_rpmh_clocks,
|
||||
.num_clks = ARRAY_SIZE(sm6350_rpmh_clocks),
|
||||
};
|
||||
|
||||
static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec,
|
||||
void *data)
|
||||
{
|
||||
@ -623,6 +643,7 @@ static const struct of_device_id clk_rpmh_match_table[] = {
|
||||
{ .compatible = "qcom,sc8180x-rpmh-clk", .data = &clk_rpmh_sc8180x},
|
||||
{ .compatible = "qcom,sdm845-rpmh-clk", .data = &clk_rpmh_sdm845},
|
||||
{ .compatible = "qcom,sdx55-rpmh-clk", .data = &clk_rpmh_sdx55},
|
||||
{ .compatible = "qcom,sm6350-rpmh-clk", .data = &clk_rpmh_sm6350},
|
||||
{ .compatible = "qcom,sm8150-rpmh-clk", .data = &clk_rpmh_sm8150},
|
||||
{ .compatible = "qcom,sm8250-rpmh-clk", .data = &clk_rpmh_sm8250},
|
||||
{ .compatible = "qcom,sm8350-rpmh-clk", .data = &clk_rpmh_sm8350},
|
||||
|
@ -913,10 +913,166 @@ static const struct rpm_smd_clk_desc rpm_clk_sdm660 = {
|
||||
.num_clks = ARRAY_SIZE(sdm660_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *mdm9607_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &sdm660_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &sdm660_bi_tcxo_a,
|
||||
[RPM_SMD_PCNOC_CLK] = &msm8916_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &msm8916_pcnoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &msm8916_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &msm8916_bimc_a_clk,
|
||||
[RPM_SMD_QPIC_CLK] = &qcs404_qpic_clk,
|
||||
[RPM_SMD_QPIC_CLK_A] = &qcs404_qpic_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &msm8916_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &msm8916_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &msm8916_bb_clk1,
|
||||
[RPM_SMD_BB_CLK1_A] = &msm8916_bb_clk1_a,
|
||||
[RPM_SMD_BB_CLK1_PIN] = &msm8916_bb_clk1_pin,
|
||||
[RPM_SMD_BB_CLK1_A_PIN] = &msm8916_bb_clk1_a_pin,
|
||||
};
|
||||
|
||||
static const struct rpm_smd_clk_desc rpm_clk_mdm9607 = {
|
||||
.clks = mdm9607_clks,
|
||||
.num_clks = ARRAY_SIZE(mdm9607_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8953_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &sdm660_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &sdm660_bi_tcxo_a,
|
||||
[RPM_SMD_PCNOC_CLK] = &msm8916_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &msm8916_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &msm8916_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &msm8916_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &msm8916_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &msm8916_bimc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &msm8976_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &msm8976_ipa_a_clk,
|
||||
[RPM_SMD_SYSMMNOC_CLK] = &msm8936_sysmmnoc_clk,
|
||||
[RPM_SMD_SYSMMNOC_A_CLK] = &msm8936_sysmmnoc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &msm8916_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &msm8916_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &msm8916_bb_clk1,
|
||||
[RPM_SMD_BB_CLK1_A] = &msm8916_bb_clk1_a,
|
||||
[RPM_SMD_BB_CLK2] = &msm8916_bb_clk2,
|
||||
[RPM_SMD_BB_CLK2_A] = &msm8916_bb_clk2_a,
|
||||
[RPM_SMD_RF_CLK2] = &msm8916_rf_clk2,
|
||||
[RPM_SMD_RF_CLK2_A] = &msm8916_rf_clk2_a,
|
||||
[RPM_SMD_RF_CLK3] = &msm8992_ln_bb_clk,
|
||||
[RPM_SMD_RF_CLK3_A] = &msm8992_ln_bb_a_clk,
|
||||
[RPM_SMD_DIV_CLK2] = &msm8974_div_clk2,
|
||||
[RPM_SMD_DIV_A_CLK2] = &msm8974_div_a_clk2,
|
||||
[RPM_SMD_BB_CLK1_PIN] = &msm8916_bb_clk1_pin,
|
||||
[RPM_SMD_BB_CLK1_A_PIN] = &msm8916_bb_clk1_a_pin,
|
||||
[RPM_SMD_BB_CLK2_PIN] = &msm8916_bb_clk2_pin,
|
||||
[RPM_SMD_BB_CLK2_A_PIN] = &msm8916_bb_clk2_a_pin,
|
||||
};
|
||||
|
||||
static const struct rpm_smd_clk_desc rpm_clk_msm8953 = {
|
||||
.clks = msm8953_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8953_clks),
|
||||
};
|
||||
|
||||
/* SM6125 */
|
||||
DEFINE_CLK_SMD_RPM(sm6125, cnoc_clk, cnoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 1);
|
||||
DEFINE_CLK_SMD_RPM(sm6125, snoc_clk, snoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 2);
|
||||
DEFINE_CLK_SMD_RPM_BRANCH(sm6125, qdss_clk, qdss_a_clk,
|
||||
QCOM_SMD_RPM_MISC_CLK, 1, 19200000);
|
||||
DEFINE_CLK_SMD_RPM(sm6125, qup_clk, qup_a_clk, QCOM_SMD_RPM_QUP_CLK, 0);
|
||||
DEFINE_CLK_SMD_RPM(sm6125, mmnrt_clk, mmnrt_a_clk, QCOM_SMD_RPM_MMAXI_CLK, 0);
|
||||
DEFINE_CLK_SMD_RPM(sm6125, mmrt_clk, mmrt_a_clk, QCOM_SMD_RPM_MMAXI_CLK, 1);
|
||||
DEFINE_CLK_SMD_RPM(sm6125, snoc_periph_clk, snoc_periph_a_clk,
|
||||
QCOM_SMD_RPM_BUS_CLK, 0);
|
||||
DEFINE_CLK_SMD_RPM(sm6125, snoc_lpass_clk, snoc_lpass_a_clk,
|
||||
QCOM_SMD_RPM_BUS_CLK, 5);
|
||||
|
||||
static struct clk_smd_rpm *sm6125_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &sdm660_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &sdm660_bi_tcxo_a,
|
||||
[RPM_SMD_SNOC_CLK] = &sm6125_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &sm6125_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &msm8916_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &msm8916_bimc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &sm6125_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &sm6125_qdss_a_clk,
|
||||
[RPM_SMD_RF_CLK1] = &msm8916_rf_clk1,
|
||||
[RPM_SMD_RF_CLK1_A] = &msm8916_rf_clk1_a,
|
||||
[RPM_SMD_RF_CLK2] = &msm8916_rf_clk2,
|
||||
[RPM_SMD_RF_CLK2_A] = &msm8916_rf_clk2_a,
|
||||
[RPM_SMD_CNOC_CLK] = &sm6125_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &sm6125_cnoc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &msm8976_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &msm8976_ipa_a_clk,
|
||||
[RPM_SMD_CE1_CLK] = &msm8992_ce1_clk,
|
||||
[RPM_SMD_CE1_A_CLK] = &msm8992_ce1_a_clk,
|
||||
[RPM_SMD_LN_BB_CLK1] = &msm8916_bb_clk1,
|
||||
[RPM_SMD_LN_BB_CLK1_A] = &msm8916_bb_clk1_a,
|
||||
[RPM_SMD_LN_BB_CLK2] = &msm8916_bb_clk2,
|
||||
[RPM_SMD_LN_BB_CLK2_A] = &msm8916_bb_clk2_a,
|
||||
[RPM_SMD_LN_BB_CLK3] = &sdm660_ln_bb_clk3,
|
||||
[RPM_SMD_LN_BB_CLK3_A] = &sdm660_ln_bb_clk3_a,
|
||||
[RPM_SMD_QUP_CLK] = &sm6125_qup_clk,
|
||||
[RPM_SMD_QUP_A_CLK] = &sm6125_qup_a_clk,
|
||||
[RPM_SMD_MMRT_CLK] = &sm6125_mmrt_clk,
|
||||
[RPM_SMD_MMRT_A_CLK] = &sm6125_mmrt_a_clk,
|
||||
[RPM_SMD_MMNRT_CLK] = &sm6125_mmnrt_clk,
|
||||
[RPM_SMD_MMNRT_A_CLK] = &sm6125_mmnrt_a_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_CLK] = &sm6125_snoc_periph_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_A_CLK] = &sm6125_snoc_periph_a_clk,
|
||||
[RPM_SMD_SNOC_LPASS_CLK] = &sm6125_snoc_lpass_clk,
|
||||
[RPM_SMD_SNOC_LPASS_A_CLK] = &sm6125_snoc_lpass_a_clk,
|
||||
};
|
||||
|
||||
static const struct rpm_smd_clk_desc rpm_clk_sm6125 = {
|
||||
.clks = sm6125_clks,
|
||||
.num_clks = ARRAY_SIZE(sm6125_clks),
|
||||
};
|
||||
|
||||
/* SM6115 */
|
||||
static struct clk_smd_rpm *sm6115_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &sdm660_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &sdm660_bi_tcxo_a,
|
||||
[RPM_SMD_SNOC_CLK] = &sm6125_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &sm6125_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &msm8916_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &msm8916_bimc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &sm6125_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &sm6125_qdss_a_clk,
|
||||
[RPM_SMD_RF_CLK1] = &msm8916_rf_clk1,
|
||||
[RPM_SMD_RF_CLK1_A] = &msm8916_rf_clk1_a,
|
||||
[RPM_SMD_RF_CLK2] = &msm8916_rf_clk2,
|
||||
[RPM_SMD_RF_CLK2_A] = &msm8916_rf_clk2_a,
|
||||
[RPM_SMD_CNOC_CLK] = &sm6125_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &sm6125_cnoc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &msm8976_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &msm8976_ipa_a_clk,
|
||||
[RPM_SMD_CE1_CLK] = &msm8992_ce1_clk,
|
||||
[RPM_SMD_CE1_A_CLK] = &msm8992_ce1_a_clk,
|
||||
[RPM_SMD_QUP_CLK] = &sm6125_qup_clk,
|
||||
[RPM_SMD_QUP_A_CLK] = &sm6125_qup_a_clk,
|
||||
[RPM_SMD_MMRT_CLK] = &sm6125_mmrt_clk,
|
||||
[RPM_SMD_MMRT_A_CLK] = &sm6125_mmrt_a_clk,
|
||||
[RPM_SMD_MMNRT_CLK] = &sm6125_mmnrt_clk,
|
||||
[RPM_SMD_MMNRT_A_CLK] = &sm6125_mmnrt_a_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_CLK] = &sm6125_snoc_periph_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_A_CLK] = &sm6125_snoc_periph_a_clk,
|
||||
[RPM_SMD_SNOC_LPASS_CLK] = &sm6125_snoc_lpass_clk,
|
||||
[RPM_SMD_SNOC_LPASS_A_CLK] = &sm6125_snoc_lpass_a_clk,
|
||||
[RPM_SMD_RF_CLK1_PIN] = &msm8916_rf_clk1_pin,
|
||||
[RPM_SMD_RF_CLK1_A_PIN] = &msm8916_rf_clk1_a_pin,
|
||||
[RPM_SMD_RF_CLK2_PIN] = &msm8916_rf_clk2_pin,
|
||||
[RPM_SMD_RF_CLK2_A_PIN] = &msm8916_rf_clk2_a_pin,
|
||||
};
|
||||
|
||||
static const struct rpm_smd_clk_desc rpm_clk_sm6115 = {
|
||||
.clks = sm6115_clks,
|
||||
.num_clks = ARRAY_SIZE(sm6115_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id rpm_smd_clk_match_table[] = {
|
||||
{ .compatible = "qcom,rpmcc-mdm9607", .data = &rpm_clk_mdm9607 },
|
||||
{ .compatible = "qcom,rpmcc-msm8226", .data = &rpm_clk_msm8974 },
|
||||
{ .compatible = "qcom,rpmcc-msm8916", .data = &rpm_clk_msm8916 },
|
||||
{ .compatible = "qcom,rpmcc-msm8936", .data = &rpm_clk_msm8936 },
|
||||
{ .compatible = "qcom,rpmcc-msm8953", .data = &rpm_clk_msm8953 },
|
||||
{ .compatible = "qcom,rpmcc-msm8974", .data = &rpm_clk_msm8974 },
|
||||
{ .compatible = "qcom,rpmcc-msm8976", .data = &rpm_clk_msm8976 },
|
||||
{ .compatible = "qcom,rpmcc-msm8992", .data = &rpm_clk_msm8992 },
|
||||
@ -925,6 +1081,8 @@ static const struct of_device_id rpm_smd_clk_match_table[] = {
|
||||
{ .compatible = "qcom,rpmcc-msm8998", .data = &rpm_clk_msm8998 },
|
||||
{ .compatible = "qcom,rpmcc-qcs404", .data = &rpm_clk_qcs404 },
|
||||
{ .compatible = "qcom,rpmcc-sdm660", .data = &rpm_clk_sdm660 },
|
||||
{ .compatible = "qcom,rpmcc-sm6115", .data = &rpm_clk_sm6115 },
|
||||
{ .compatible = "qcom,rpmcc-sm6125", .data = &rpm_clk_sm6125 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, rpm_smd_clk_match_table);
|
||||
|
908
drivers/clk/qcom/dispcc-sc7280.c
Normal file
908
drivers/clk/qcom/dispcc-sc7280.c
Normal file
@ -0,0 +1,908 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include <dt-bindings/clock/qcom,dispcc-sc7280.h>
|
||||
|
||||
#include "clk-alpha-pll.h"
|
||||
#include "clk-branch.h"
|
||||
#include "clk-rcg.h"
|
||||
#include "clk-regmap-divider.h"
|
||||
#include "common.h"
|
||||
#include "gdsc.h"
|
||||
|
||||
enum {
|
||||
P_BI_TCXO,
|
||||
P_DISP_CC_PLL0_OUT_EVEN,
|
||||
P_DISP_CC_PLL0_OUT_MAIN,
|
||||
P_DP_PHY_PLL_LINK_CLK,
|
||||
P_DP_PHY_PLL_VCO_DIV_CLK,
|
||||
P_DSI0_PHY_PLL_OUT_BYTECLK,
|
||||
P_DSI0_PHY_PLL_OUT_DSICLK,
|
||||
P_EDP_PHY_PLL_LINK_CLK,
|
||||
P_EDP_PHY_PLL_VCO_DIV_CLK,
|
||||
P_GCC_DISP_GPLL0_CLK,
|
||||
};
|
||||
|
||||
static const struct pll_vco lucid_vco[] = {
|
||||
{ 249600000, 2000000000, 0 },
|
||||
};
|
||||
|
||||
/* 1520MHz Configuration*/
|
||||
static const struct alpha_pll_config disp_cc_pll0_config = {
|
||||
.l = 0x4F,
|
||||
.alpha = 0x2AAA,
|
||||
.config_ctl_val = 0x20485699,
|
||||
.config_ctl_hi_val = 0x00002261,
|
||||
.config_ctl_hi1_val = 0x329A299C,
|
||||
.user_ctl_val = 0x00000001,
|
||||
.user_ctl_hi_val = 0x00000805,
|
||||
.user_ctl_hi1_val = 0x00000000,
|
||||
};
|
||||
|
||||
static struct clk_alpha_pll disp_cc_pll0 = {
|
||||
.offset = 0x0,
|
||||
.vco_table = lucid_vco,
|
||||
.num_vco = ARRAY_SIZE(lucid_vco),
|
||||
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
|
||||
.clkr = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_pll0",
|
||||
.parent_data = &(const struct clk_parent_data){
|
||||
.fw_name = "bi_tcxo",
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_alpha_pll_lucid_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static const struct parent_map disp_cc_parent_map_0[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data disp_cc_parent_data_0[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
};
|
||||
|
||||
static const struct parent_map disp_cc_parent_map_1[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
{ P_DP_PHY_PLL_LINK_CLK, 1 },
|
||||
{ P_DP_PHY_PLL_VCO_DIV_CLK, 2 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data disp_cc_parent_data_1[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
{ .fw_name = "dp_phy_pll_link_clk" },
|
||||
{ .fw_name = "dp_phy_pll_vco_div_clk" },
|
||||
};
|
||||
|
||||
static const struct parent_map disp_cc_parent_map_2[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
{ P_DSI0_PHY_PLL_OUT_BYTECLK, 1 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data disp_cc_parent_data_2[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
{ .fw_name = "dsi0_phy_pll_out_byteclk" },
|
||||
};
|
||||
|
||||
static const struct parent_map disp_cc_parent_map_3[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
{ P_EDP_PHY_PLL_LINK_CLK, 1 },
|
||||
{ P_EDP_PHY_PLL_VCO_DIV_CLK, 2 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data disp_cc_parent_data_3[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
{ .fw_name = "edp_phy_pll_link_clk" },
|
||||
{ .fw_name = "edp_phy_pll_vco_div_clk" },
|
||||
};
|
||||
|
||||
static const struct parent_map disp_cc_parent_map_4[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
{ P_DISP_CC_PLL0_OUT_MAIN, 1 },
|
||||
{ P_GCC_DISP_GPLL0_CLK, 4 },
|
||||
{ P_DISP_CC_PLL0_OUT_EVEN, 5 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data disp_cc_parent_data_4[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
{ .hw = &disp_cc_pll0.clkr.hw },
|
||||
{ .fw_name = "gcc_disp_gpll0_clk" },
|
||||
{ .hw = &disp_cc_pll0.clkr.hw },
|
||||
};
|
||||
|
||||
static const struct parent_map disp_cc_parent_map_5[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
{ P_GCC_DISP_GPLL0_CLK, 4 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data disp_cc_parent_data_5[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
{ .fw_name = "gcc_disp_gpll0_clk" },
|
||||
};
|
||||
|
||||
static const struct parent_map disp_cc_parent_map_6[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
{ P_DSI0_PHY_PLL_OUT_DSICLK, 1 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data disp_cc_parent_data_6[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
{ .fw_name = "dsi0_phy_pll_out_dsiclk" },
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_disp_cc_mdss_ahb_clk_src[] = {
|
||||
F(19200000, P_BI_TCXO, 1, 0, 0),
|
||||
F(37500000, P_GCC_DISP_GPLL0_CLK, 16, 0, 0),
|
||||
F(75000000, P_GCC_DISP_GPLL0_CLK, 8, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_ahb_clk_src = {
|
||||
.cmd_rcgr = 0x1170,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_5,
|
||||
.freq_tbl = ftbl_disp_cc_mdss_ahb_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_ahb_clk_src",
|
||||
.parent_data = disp_cc_parent_data_5,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_5),
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_byte0_clk_src = {
|
||||
.cmd_rcgr = 0x10d8,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_2,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_byte0_clk_src",
|
||||
.parent_data = disp_cc_parent_data_2,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_byte2_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_disp_cc_mdss_dp_aux_clk_src[] = {
|
||||
F(19200000, P_BI_TCXO, 1, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_dp_aux_clk_src = {
|
||||
.cmd_rcgr = 0x1158,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_0,
|
||||
.freq_tbl = ftbl_disp_cc_mdss_dp_aux_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_dp_aux_clk_src",
|
||||
.parent_data = disp_cc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_dp_crypto_clk_src = {
|
||||
.cmd_rcgr = 0x1128,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_1,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_dp_crypto_clk_src",
|
||||
.parent_data = disp_cc_parent_data_1,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_1),
|
||||
.ops = &clk_byte2_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_dp_link_clk_src = {
|
||||
.cmd_rcgr = 0x110c,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_1,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_dp_link_clk_src",
|
||||
.parent_data = disp_cc_parent_data_1,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_1),
|
||||
.ops = &clk_byte2_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_dp_pixel_clk_src = {
|
||||
.cmd_rcgr = 0x1140,
|
||||
.mnd_width = 16,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_1,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_dp_pixel_clk_src",
|
||||
.parent_data = disp_cc_parent_data_1,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_1),
|
||||
.ops = &clk_dp_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_edp_aux_clk_src = {
|
||||
.cmd_rcgr = 0x11d0,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_0,
|
||||
.freq_tbl = ftbl_disp_cc_mdss_dp_aux_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_edp_aux_clk_src",
|
||||
.parent_data = disp_cc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_edp_link_clk_src = {
|
||||
.cmd_rcgr = 0x11a0,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_3,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_edp_link_clk_src",
|
||||
.parent_data = disp_cc_parent_data_3,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_byte2_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_edp_pixel_clk_src = {
|
||||
.cmd_rcgr = 0x1188,
|
||||
.mnd_width = 16,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_3,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_edp_pixel_clk_src",
|
||||
.parent_data = disp_cc_parent_data_3,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
|
||||
.ops = &clk_dp_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_esc0_clk_src = {
|
||||
.cmd_rcgr = 0x10f4,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_2,
|
||||
.freq_tbl = ftbl_disp_cc_mdss_dp_aux_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_esc0_clk_src",
|
||||
.parent_data = disp_cc_parent_data_2,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_disp_cc_mdss_mdp_clk_src[] = {
|
||||
F(200000000, P_GCC_DISP_GPLL0_CLK, 3, 0, 0),
|
||||
F(300000000, P_GCC_DISP_GPLL0_CLK, 2, 0, 0),
|
||||
F(380000000, P_DISP_CC_PLL0_OUT_MAIN, 4, 0, 0),
|
||||
F(506666667, P_DISP_CC_PLL0_OUT_MAIN, 3, 0, 0),
|
||||
F(608000000, P_DISP_CC_PLL0_OUT_MAIN, 2.5, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_mdp_clk_src = {
|
||||
.cmd_rcgr = 0x1090,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_4,
|
||||
.freq_tbl = ftbl_disp_cc_mdss_mdp_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_mdp_clk_src",
|
||||
.parent_data = disp_cc_parent_data_4,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_4),
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_pclk0_clk_src = {
|
||||
.cmd_rcgr = 0x1078,
|
||||
.mnd_width = 8,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_6,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_pclk0_clk_src",
|
||||
.parent_data = disp_cc_parent_data_6,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_6),
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_pixel_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_rot_clk_src = {
|
||||
.cmd_rcgr = 0x10a8,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_4,
|
||||
.freq_tbl = ftbl_disp_cc_mdss_mdp_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_rot_clk_src",
|
||||
.parent_data = disp_cc_parent_data_4,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_4),
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_vsync_clk_src = {
|
||||
.cmd_rcgr = 0x10c0,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_0,
|
||||
.freq_tbl = ftbl_disp_cc_mdss_dp_aux_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_vsync_clk_src",
|
||||
.parent_data = disp_cc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap_div disp_cc_mdss_byte0_div_clk_src = {
|
||||
.reg = 0x10f0,
|
||||
.shift = 0,
|
||||
.width = 4,
|
||||
.clkr.hw.init = &(struct clk_init_data) {
|
||||
.name = "disp_cc_mdss_byte0_div_clk_src",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_byte0_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_regmap_div_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap_div disp_cc_mdss_dp_link_div_clk_src = {
|
||||
.reg = 0x1124,
|
||||
.shift = 0,
|
||||
.width = 4,
|
||||
.clkr.hw.init = &(struct clk_init_data) {
|
||||
.name = "disp_cc_mdss_dp_link_div_clk_src",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_dp_link_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_regmap_div_ro_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap_div disp_cc_mdss_edp_link_div_clk_src = {
|
||||
.reg = 0x11b8,
|
||||
.shift = 0,
|
||||
.width = 4,
|
||||
.clkr.hw.init = &(struct clk_init_data) {
|
||||
.name = "disp_cc_mdss_edp_link_div_clk_src",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_edp_link_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_regmap_div_ro_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_ahb_clk = {
|
||||
.halt_reg = 0x1050,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1050,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_ahb_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_ahb_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_byte0_clk = {
|
||||
.halt_reg = 0x1030,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1030,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_byte0_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_byte0_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_byte0_intf_clk = {
|
||||
.halt_reg = 0x1034,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1034,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_byte0_intf_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_byte0_div_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_dp_aux_clk = {
|
||||
.halt_reg = 0x104c,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x104c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_dp_aux_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_dp_aux_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_dp_crypto_clk = {
|
||||
.halt_reg = 0x1044,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1044,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_dp_crypto_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_dp_crypto_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_dp_link_clk = {
|
||||
.halt_reg = 0x103c,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x103c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_dp_link_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_dp_link_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_dp_link_intf_clk = {
|
||||
.halt_reg = 0x1040,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1040,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_dp_link_intf_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_dp_link_div_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_dp_pixel_clk = {
|
||||
.halt_reg = 0x1048,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1048,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_dp_pixel_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_dp_pixel_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_edp_aux_clk = {
|
||||
.halt_reg = 0x1060,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1060,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_edp_aux_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_edp_aux_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_edp_link_clk = {
|
||||
.halt_reg = 0x1058,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1058,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_edp_link_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_edp_link_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_edp_link_intf_clk = {
|
||||
.halt_reg = 0x105c,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x105c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_edp_link_intf_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_edp_link_div_clk_src.clkr.hw
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_edp_pixel_clk = {
|
||||
.halt_reg = 0x1054,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1054,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_edp_pixel_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_edp_pixel_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_esc0_clk = {
|
||||
.halt_reg = 0x1038,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1038,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_esc0_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_esc0_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_mdp_clk = {
|
||||
.halt_reg = 0x1014,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1014,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_mdp_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_mdp_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_mdp_lut_clk = {
|
||||
.halt_reg = 0x1024,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1024,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_mdp_lut_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_mdp_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_non_gdsc_ahb_clk = {
|
||||
.halt_reg = 0x2004,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
.clkr = {
|
||||
.enable_reg = 0x2004,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_non_gdsc_ahb_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_ahb_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_pclk0_clk = {
|
||||
.halt_reg = 0x1010,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1010,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_pclk0_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_pclk0_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_rot_clk = {
|
||||
.halt_reg = 0x101c,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x101c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_rot_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_rot_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_rscc_ahb_clk = {
|
||||
.halt_reg = 0x200c,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x200c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_rscc_ahb_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_ahb_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_rscc_vsync_clk = {
|
||||
.halt_reg = 0x2008,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x2008,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_rscc_vsync_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_vsync_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_mdss_vsync_clk = {
|
||||
.halt_reg = 0x102c,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x102c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_vsync_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&disp_cc_mdss_vsync_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch disp_cc_sleep_clk = {
|
||||
.halt_reg = 0x5004,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x5004,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_sleep_clk",
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct gdsc disp_cc_mdss_core_gdsc = {
|
||||
.gdscr = 0x1004,
|
||||
.pd = {
|
||||
.name = "disp_cc_mdss_core_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = HW_CTRL | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct clk_regmap *disp_cc_sc7280_clocks[] = {
|
||||
[DISP_CC_MDSS_AHB_CLK] = &disp_cc_mdss_ahb_clk.clkr,
|
||||
[DISP_CC_MDSS_AHB_CLK_SRC] = &disp_cc_mdss_ahb_clk_src.clkr,
|
||||
[DISP_CC_MDSS_BYTE0_CLK] = &disp_cc_mdss_byte0_clk.clkr,
|
||||
[DISP_CC_MDSS_BYTE0_CLK_SRC] = &disp_cc_mdss_byte0_clk_src.clkr,
|
||||
[DISP_CC_MDSS_BYTE0_DIV_CLK_SRC] = &disp_cc_mdss_byte0_div_clk_src.clkr,
|
||||
[DISP_CC_MDSS_BYTE0_INTF_CLK] = &disp_cc_mdss_byte0_intf_clk.clkr,
|
||||
[DISP_CC_MDSS_DP_AUX_CLK] = &disp_cc_mdss_dp_aux_clk.clkr,
|
||||
[DISP_CC_MDSS_DP_AUX_CLK_SRC] = &disp_cc_mdss_dp_aux_clk_src.clkr,
|
||||
[DISP_CC_MDSS_DP_CRYPTO_CLK] = &disp_cc_mdss_dp_crypto_clk.clkr,
|
||||
[DISP_CC_MDSS_DP_CRYPTO_CLK_SRC] = &disp_cc_mdss_dp_crypto_clk_src.clkr,
|
||||
[DISP_CC_MDSS_DP_LINK_CLK] = &disp_cc_mdss_dp_link_clk.clkr,
|
||||
[DISP_CC_MDSS_DP_LINK_CLK_SRC] = &disp_cc_mdss_dp_link_clk_src.clkr,
|
||||
[DISP_CC_MDSS_DP_LINK_DIV_CLK_SRC] =
|
||||
&disp_cc_mdss_dp_link_div_clk_src.clkr,
|
||||
[DISP_CC_MDSS_DP_LINK_INTF_CLK] = &disp_cc_mdss_dp_link_intf_clk.clkr,
|
||||
[DISP_CC_MDSS_DP_PIXEL_CLK] = &disp_cc_mdss_dp_pixel_clk.clkr,
|
||||
[DISP_CC_MDSS_DP_PIXEL_CLK_SRC] = &disp_cc_mdss_dp_pixel_clk_src.clkr,
|
||||
[DISP_CC_MDSS_EDP_AUX_CLK] = &disp_cc_mdss_edp_aux_clk.clkr,
|
||||
[DISP_CC_MDSS_EDP_AUX_CLK_SRC] = &disp_cc_mdss_edp_aux_clk_src.clkr,
|
||||
[DISP_CC_MDSS_EDP_LINK_CLK] = &disp_cc_mdss_edp_link_clk.clkr,
|
||||
[DISP_CC_MDSS_EDP_LINK_CLK_SRC] = &disp_cc_mdss_edp_link_clk_src.clkr,
|
||||
[DISP_CC_MDSS_EDP_LINK_DIV_CLK_SRC] =
|
||||
&disp_cc_mdss_edp_link_div_clk_src.clkr,
|
||||
[DISP_CC_MDSS_EDP_LINK_INTF_CLK] = &disp_cc_mdss_edp_link_intf_clk.clkr,
|
||||
[DISP_CC_MDSS_EDP_PIXEL_CLK] = &disp_cc_mdss_edp_pixel_clk.clkr,
|
||||
[DISP_CC_MDSS_EDP_PIXEL_CLK_SRC] = &disp_cc_mdss_edp_pixel_clk_src.clkr,
|
||||
[DISP_CC_MDSS_ESC0_CLK] = &disp_cc_mdss_esc0_clk.clkr,
|
||||
[DISP_CC_MDSS_ESC0_CLK_SRC] = &disp_cc_mdss_esc0_clk_src.clkr,
|
||||
[DISP_CC_MDSS_MDP_CLK] = &disp_cc_mdss_mdp_clk.clkr,
|
||||
[DISP_CC_MDSS_MDP_CLK_SRC] = &disp_cc_mdss_mdp_clk_src.clkr,
|
||||
[DISP_CC_MDSS_MDP_LUT_CLK] = &disp_cc_mdss_mdp_lut_clk.clkr,
|
||||
[DISP_CC_MDSS_NON_GDSC_AHB_CLK] = &disp_cc_mdss_non_gdsc_ahb_clk.clkr,
|
||||
[DISP_CC_MDSS_PCLK0_CLK] = &disp_cc_mdss_pclk0_clk.clkr,
|
||||
[DISP_CC_MDSS_PCLK0_CLK_SRC] = &disp_cc_mdss_pclk0_clk_src.clkr,
|
||||
[DISP_CC_MDSS_ROT_CLK] = &disp_cc_mdss_rot_clk.clkr,
|
||||
[DISP_CC_MDSS_ROT_CLK_SRC] = &disp_cc_mdss_rot_clk_src.clkr,
|
||||
[DISP_CC_MDSS_RSCC_AHB_CLK] = &disp_cc_mdss_rscc_ahb_clk.clkr,
|
||||
[DISP_CC_MDSS_RSCC_VSYNC_CLK] = &disp_cc_mdss_rscc_vsync_clk.clkr,
|
||||
[DISP_CC_MDSS_VSYNC_CLK] = &disp_cc_mdss_vsync_clk.clkr,
|
||||
[DISP_CC_MDSS_VSYNC_CLK_SRC] = &disp_cc_mdss_vsync_clk_src.clkr,
|
||||
[DISP_CC_PLL0] = &disp_cc_pll0.clkr,
|
||||
[DISP_CC_SLEEP_CLK] = &disp_cc_sleep_clk.clkr,
|
||||
};
|
||||
|
||||
static struct gdsc *disp_cc_sc7280_gdscs[] = {
|
||||
[DISP_CC_MDSS_CORE_GDSC] = &disp_cc_mdss_core_gdsc,
|
||||
};
|
||||
|
||||
static const struct regmap_config disp_cc_sc7280_regmap_config = {
|
||||
.reg_bits = 32,
|
||||
.reg_stride = 4,
|
||||
.val_bits = 32,
|
||||
.max_register = 0x10000,
|
||||
.fast_io = true,
|
||||
};
|
||||
|
||||
static const struct qcom_cc_desc disp_cc_sc7280_desc = {
|
||||
.config = &disp_cc_sc7280_regmap_config,
|
||||
.clks = disp_cc_sc7280_clocks,
|
||||
.num_clks = ARRAY_SIZE(disp_cc_sc7280_clocks),
|
||||
.gdscs = disp_cc_sc7280_gdscs,
|
||||
.num_gdscs = ARRAY_SIZE(disp_cc_sc7280_gdscs),
|
||||
};
|
||||
|
||||
static const struct of_device_id disp_cc_sc7280_match_table[] = {
|
||||
{ .compatible = "qcom,sc7280-dispcc" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, disp_cc_sc7280_match_table);
|
||||
|
||||
static int disp_cc_sc7280_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct regmap *regmap;
|
||||
|
||||
regmap = qcom_cc_map(pdev, &disp_cc_sc7280_desc);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
clk_lucid_pll_configure(&disp_cc_pll0, regmap, &disp_cc_pll0_config);
|
||||
|
||||
/*
|
||||
* Keep the clocks always-ON
|
||||
* DISP_CC_XO_CLK
|
||||
*/
|
||||
regmap_update_bits(regmap, 0x5008, BIT(0), BIT(0));
|
||||
|
||||
return qcom_cc_really_probe(pdev, &disp_cc_sc7280_desc, regmap);
|
||||
}
|
||||
|
||||
static struct platform_driver disp_cc_sc7280_driver = {
|
||||
.probe = disp_cc_sc7280_probe,
|
||||
.driver = {
|
||||
.name = "disp_cc-sc7280",
|
||||
.of_match_table = disp_cc_sc7280_match_table,
|
||||
},
|
||||
};
|
||||
|
||||
static int __init disp_cc_sc7280_init(void)
|
||||
{
|
||||
return platform_driver_register(&disp_cc_sc7280_driver);
|
||||
}
|
||||
subsys_initcall(disp_cc_sc7280_init);
|
||||
|
||||
static void __exit disp_cc_sc7280_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&disp_cc_sc7280_driver);
|
||||
}
|
||||
module_exit(disp_cc_sc7280_exit);
|
||||
|
||||
MODULE_DESCRIPTION("QTI DISP_CC sc7280 Driver");
|
||||
MODULE_LICENSE("GPL v2");
|
@ -26,6 +26,10 @@ enum {
|
||||
P_DISP_CC_PLL1_OUT_MAIN,
|
||||
P_DP_PHY_PLL_LINK_CLK,
|
||||
P_DP_PHY_PLL_VCO_DIV_CLK,
|
||||
P_DPTX1_PHY_PLL_LINK_CLK,
|
||||
P_DPTX1_PHY_PLL_VCO_DIV_CLK,
|
||||
P_DPTX2_PHY_PLL_LINK_CLK,
|
||||
P_DPTX2_PHY_PLL_VCO_DIV_CLK,
|
||||
P_EDP_PHY_PLL_LINK_CLK,
|
||||
P_EDP_PHY_PLL_VCO_DIV_CLK,
|
||||
P_DSI0_PHY_PLL_OUT_BYTECLK,
|
||||
@ -98,12 +102,20 @@ static const struct parent_map disp_cc_parent_map_0[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
{ P_DP_PHY_PLL_LINK_CLK, 1 },
|
||||
{ P_DP_PHY_PLL_VCO_DIV_CLK, 2 },
|
||||
{ P_DPTX1_PHY_PLL_LINK_CLK, 3 },
|
||||
{ P_DPTX1_PHY_PLL_VCO_DIV_CLK, 4 },
|
||||
{ P_DPTX2_PHY_PLL_LINK_CLK, 5 },
|
||||
{ P_DPTX2_PHY_PLL_VCO_DIV_CLK, 6 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data disp_cc_parent_data_0[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
{ .fw_name = "dp_phy_pll_link_clk" },
|
||||
{ .fw_name = "dp_phy_pll_vco_div_clk" },
|
||||
{ .fw_name = "dptx1_phy_pll_link_clk" },
|
||||
{ .fw_name = "dptx1_phy_pll_vco_div_clk" },
|
||||
{ .fw_name = "dptx2_phy_pll_link_clk" },
|
||||
{ .fw_name = "dptx2_phy_pll_vco_div_clk" },
|
||||
};
|
||||
|
||||
static const struct parent_map disp_cc_parent_map_1[] = {
|
||||
@ -269,20 +281,11 @@ static struct clk_rcg2 disp_cc_mdss_dp_aux_clk_src = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_disp_cc_mdss_dp_link1_clk_src[] = {
|
||||
F(162000000, P_DP_PHY_PLL_LINK_CLK, 1, 0, 0),
|
||||
F(270000000, P_DP_PHY_PLL_LINK_CLK, 1, 0, 0),
|
||||
F(540000000, P_DP_PHY_PLL_LINK_CLK, 1, 0, 0),
|
||||
F(810000000, P_DP_PHY_PLL_LINK_CLK, 1, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 disp_cc_mdss_dp_link1_clk_src = {
|
||||
.cmd_rcgr = 0x220c,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_0,
|
||||
.freq_tbl = ftbl_disp_cc_mdss_dp_link1_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_dp_link1_clk_src",
|
||||
.parent_data = disp_cc_parent_data_0,
|
||||
@ -296,7 +299,6 @@ static struct clk_rcg2 disp_cc_mdss_dp_link_clk_src = {
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_0,
|
||||
.freq_tbl = ftbl_disp_cc_mdss_dp_link1_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_dp_link_clk_src",
|
||||
.parent_data = disp_cc_parent_data_0,
|
||||
|
4250
drivers/clk/qcom/gcc-msm8953.c
Normal file
4250
drivers/clk/qcom/gcc-msm8953.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3544
drivers/clk/qcom/gcc-sm6115.c
Normal file
3544
drivers/clk/qcom/gcc-sm6115.c
Normal file
File diff suppressed because it is too large
Load Diff
2588
drivers/clk/qcom/gcc-sm6350.c
Normal file
2588
drivers/clk/qcom/gcc-sm6350.c
Normal file
File diff suppressed because it is too large
Load Diff
491
drivers/clk/qcom/gpucc-sc7280.c
Normal file
491
drivers/clk/qcom/gpucc-sc7280.c
Normal file
@ -0,0 +1,491 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include <dt-bindings/clock/qcom,gpucc-sc7280.h>
|
||||
|
||||
#include "clk-alpha-pll.h"
|
||||
#include "clk-branch.h"
|
||||
#include "clk-rcg.h"
|
||||
#include "clk-regmap-divider.h"
|
||||
#include "common.h"
|
||||
#include "reset.h"
|
||||
#include "gdsc.h"
|
||||
|
||||
enum {
|
||||
P_BI_TCXO,
|
||||
P_GCC_GPU_GPLL0_CLK_SRC,
|
||||
P_GCC_GPU_GPLL0_DIV_CLK_SRC,
|
||||
P_GPU_CC_PLL0_OUT_MAIN,
|
||||
P_GPU_CC_PLL1_OUT_MAIN,
|
||||
};
|
||||
|
||||
static const struct pll_vco lucid_vco[] = {
|
||||
{ 249600000, 2000000000, 0 },
|
||||
};
|
||||
|
||||
static struct clk_alpha_pll gpu_cc_pll0 = {
|
||||
.offset = 0x0,
|
||||
.vco_table = lucid_vco,
|
||||
.num_vco = ARRAY_SIZE(lucid_vco),
|
||||
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
|
||||
.clkr = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_pll0",
|
||||
.parent_data = &(const struct clk_parent_data){
|
||||
.fw_name = "bi_tcxo",
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_alpha_pll_lucid_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/* 500MHz Configuration */
|
||||
static const struct alpha_pll_config gpu_cc_pll1_config = {
|
||||
.l = 0x1A,
|
||||
.alpha = 0xAAA,
|
||||
.config_ctl_val = 0x20485699,
|
||||
.config_ctl_hi_val = 0x00002261,
|
||||
.config_ctl_hi1_val = 0x329A299C,
|
||||
.user_ctl_val = 0x00000001,
|
||||
.user_ctl_hi_val = 0x00000805,
|
||||
.user_ctl_hi1_val = 0x00000000,
|
||||
};
|
||||
|
||||
static struct clk_alpha_pll gpu_cc_pll1 = {
|
||||
.offset = 0x100,
|
||||
.vco_table = lucid_vco,
|
||||
.num_vco = ARRAY_SIZE(lucid_vco),
|
||||
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
|
||||
.clkr = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_pll1",
|
||||
.parent_data = &(const struct clk_parent_data){
|
||||
.fw_name = "bi_tcxo",
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_alpha_pll_lucid_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static const struct parent_map gpu_cc_parent_map_0[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
{ P_GPU_CC_PLL0_OUT_MAIN, 1 },
|
||||
{ P_GPU_CC_PLL1_OUT_MAIN, 3 },
|
||||
{ P_GCC_GPU_GPLL0_CLK_SRC, 5 },
|
||||
{ P_GCC_GPU_GPLL0_DIV_CLK_SRC, 6 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gpu_cc_parent_data_0[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
{ .hw = &gpu_cc_pll0.clkr.hw },
|
||||
{ .hw = &gpu_cc_pll1.clkr.hw },
|
||||
{ .fw_name = "gcc_gpu_gpll0_clk_src" },
|
||||
{ .fw_name = "gcc_gpu_gpll0_div_clk_src" },
|
||||
};
|
||||
|
||||
static const struct parent_map gpu_cc_parent_map_1[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
{ P_GPU_CC_PLL1_OUT_MAIN, 3 },
|
||||
{ P_GCC_GPU_GPLL0_CLK_SRC, 5 },
|
||||
{ P_GCC_GPU_GPLL0_DIV_CLK_SRC, 6 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gpu_cc_parent_data_1[] = {
|
||||
{ .fw_name = "bi_tcxo", },
|
||||
{ .hw = &gpu_cc_pll1.clkr.hw },
|
||||
{ .fw_name = "gcc_gpu_gpll0_clk_src", },
|
||||
{ .fw_name = "gcc_gpu_gpll0_div_clk_src", },
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = {
|
||||
F(19200000, P_BI_TCXO, 1, 0, 0),
|
||||
F(200000000, P_GCC_GPU_GPLL0_DIV_CLK_SRC, 1.5, 0, 0),
|
||||
F(500000000, P_GPU_CC_PLL1_OUT_MAIN, 1, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gpu_cc_gmu_clk_src = {
|
||||
.cmd_rcgr = 0x1120,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = gpu_cc_parent_map_0,
|
||||
.freq_tbl = ftbl_gpu_cc_gmu_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_gmu_clk_src",
|
||||
.parent_data = gpu_cc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gpu_cc_parent_data_0),
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_gpu_cc_hub_clk_src[] = {
|
||||
F(150000000, P_GCC_GPU_GPLL0_DIV_CLK_SRC, 2, 0, 0),
|
||||
F(240000000, P_GCC_GPU_GPLL0_CLK_SRC, 2.5, 0, 0),
|
||||
F(300000000, P_GCC_GPU_GPLL0_CLK_SRC, 2, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gpu_cc_hub_clk_src = {
|
||||
.cmd_rcgr = 0x117c,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = gpu_cc_parent_map_1,
|
||||
.freq_tbl = ftbl_gpu_cc_hub_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_hub_clk_src",
|
||||
.parent_data = gpu_cc_parent_data_1,
|
||||
.num_parents = ARRAY_SIZE(gpu_cc_parent_data_1),
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap_div gpu_cc_hub_ahb_div_clk_src = {
|
||||
.reg = 0x11c0,
|
||||
.shift = 0,
|
||||
.width = 4,
|
||||
.clkr.hw.init = &(struct clk_init_data) {
|
||||
.name = "gpu_cc_hub_ahb_div_clk_src",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&gpu_cc_hub_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_regmap_div_ro_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap_div gpu_cc_hub_cx_int_div_clk_src = {
|
||||
.reg = 0x11bc,
|
||||
.shift = 0,
|
||||
.width = 4,
|
||||
.clkr.hw.init = &(struct clk_init_data) {
|
||||
.name = "gpu_cc_hub_cx_int_div_clk_src",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&gpu_cc_hub_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_regmap_div_ro_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_ahb_clk = {
|
||||
.halt_reg = 0x1078,
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1078,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_ahb_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&gpu_cc_hub_ahb_div_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_crc_ahb_clk = {
|
||||
.halt_reg = 0x107c,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
.clkr = {
|
||||
.enable_reg = 0x107c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_crc_ahb_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&gpu_cc_hub_ahb_div_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_cx_gmu_clk = {
|
||||
.halt_reg = 0x1098,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1098,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_cx_gmu_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&gpu_cc_gmu_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_aon_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_cx_snoc_dvm_clk = {
|
||||
.halt_reg = 0x108c,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
.clkr = {
|
||||
.enable_reg = 0x108c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_cx_snoc_dvm_clk",
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_cxo_aon_clk = {
|
||||
.halt_reg = 0x1004,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1004,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_cxo_aon_clk",
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_cxo_clk = {
|
||||
.halt_reg = 0x109c,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x109c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_cxo_clk",
|
||||
.ops = &clk_branch2_aon_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_gx_gmu_clk = {
|
||||
.halt_reg = 0x1064,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1064,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_gx_gmu_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&gpu_cc_gmu_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_hlos1_vote_gpu_smmu_clk = {
|
||||
.halt_reg = 0x5000,
|
||||
.halt_check = BRANCH_VOTED,
|
||||
.clkr = {
|
||||
.enable_reg = 0x5000,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_hlos1_vote_gpu_smmu_clk",
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_hub_aon_clk = {
|
||||
.halt_reg = 0x1178,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1178,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_hub_aon_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&gpu_cc_hub_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_aon_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_hub_cx_int_clk = {
|
||||
.halt_reg = 0x1204,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1204,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_hub_cx_int_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&gpu_cc_hub_cx_int_div_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_aon_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_mnd1x_0_gfx3d_clk = {
|
||||
.halt_reg = 0x802c,
|
||||
.halt_check = BRANCH_HALT_SKIP,
|
||||
.clkr = {
|
||||
.enable_reg = 0x802c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_mnd1x_0_gfx3d_clk",
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_mnd1x_1_gfx3d_clk = {
|
||||
.halt_reg = 0x8030,
|
||||
.halt_check = BRANCH_HALT_SKIP,
|
||||
.clkr = {
|
||||
.enable_reg = 0x8030,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_mnd1x_1_gfx3d_clk",
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gpu_cc_sleep_clk = {
|
||||
.halt_reg = 0x1090,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1090,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_sleep_clk",
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct gdsc cx_gdsc = {
|
||||
.gdscr = 0x106c,
|
||||
.gds_hw_ctrl = 0x1540,
|
||||
.pd = {
|
||||
.name = "cx_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc gx_gdsc = {
|
||||
.gdscr = 0x100c,
|
||||
.clamp_io_ctrl = 0x1508,
|
||||
.pd = {
|
||||
.name = "gx_gdsc",
|
||||
.power_on = gdsc_gx_do_nothing_enable,
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = CLAMP_IO | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc *gpu_cc_sc7180_gdscs[] = {
|
||||
[GPU_CC_CX_GDSC] = &cx_gdsc,
|
||||
[GPU_CC_GX_GDSC] = &gx_gdsc,
|
||||
};
|
||||
|
||||
static struct clk_regmap *gpu_cc_sc7280_clocks[] = {
|
||||
[GPU_CC_AHB_CLK] = &gpu_cc_ahb_clk.clkr,
|
||||
[GPU_CC_CRC_AHB_CLK] = &gpu_cc_crc_ahb_clk.clkr,
|
||||
[GPU_CC_CX_GMU_CLK] = &gpu_cc_cx_gmu_clk.clkr,
|
||||
[GPU_CC_CX_SNOC_DVM_CLK] = &gpu_cc_cx_snoc_dvm_clk.clkr,
|
||||
[GPU_CC_CXO_AON_CLK] = &gpu_cc_cxo_aon_clk.clkr,
|
||||
[GPU_CC_CXO_CLK] = &gpu_cc_cxo_clk.clkr,
|
||||
[GPU_CC_GMU_CLK_SRC] = &gpu_cc_gmu_clk_src.clkr,
|
||||
[GPU_CC_GX_GMU_CLK] = &gpu_cc_gx_gmu_clk.clkr,
|
||||
[GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK] = &gpu_cc_hlos1_vote_gpu_smmu_clk.clkr,
|
||||
[GPU_CC_HUB_AHB_DIV_CLK_SRC] = &gpu_cc_hub_ahb_div_clk_src.clkr,
|
||||
[GPU_CC_HUB_AON_CLK] = &gpu_cc_hub_aon_clk.clkr,
|
||||
[GPU_CC_HUB_CLK_SRC] = &gpu_cc_hub_clk_src.clkr,
|
||||
[GPU_CC_HUB_CX_INT_CLK] = &gpu_cc_hub_cx_int_clk.clkr,
|
||||
[GPU_CC_HUB_CX_INT_DIV_CLK_SRC] = &gpu_cc_hub_cx_int_div_clk_src.clkr,
|
||||
[GPU_CC_MND1X_0_GFX3D_CLK] = &gpu_cc_mnd1x_0_gfx3d_clk.clkr,
|
||||
[GPU_CC_MND1X_1_GFX3D_CLK] = &gpu_cc_mnd1x_1_gfx3d_clk.clkr,
|
||||
[GPU_CC_PLL0] = &gpu_cc_pll0.clkr,
|
||||
[GPU_CC_PLL1] = &gpu_cc_pll1.clkr,
|
||||
[GPU_CC_SLEEP_CLK] = &gpu_cc_sleep_clk.clkr,
|
||||
};
|
||||
|
||||
static const struct regmap_config gpu_cc_sc7280_regmap_config = {
|
||||
.reg_bits = 32,
|
||||
.reg_stride = 4,
|
||||
.val_bits = 32,
|
||||
.max_register = 0x8030,
|
||||
.fast_io = true,
|
||||
};
|
||||
|
||||
static const struct qcom_cc_desc gpu_cc_sc7280_desc = {
|
||||
.config = &gpu_cc_sc7280_regmap_config,
|
||||
.clks = gpu_cc_sc7280_clocks,
|
||||
.num_clks = ARRAY_SIZE(gpu_cc_sc7280_clocks),
|
||||
.gdscs = gpu_cc_sc7180_gdscs,
|
||||
.num_gdscs = ARRAY_SIZE(gpu_cc_sc7180_gdscs),
|
||||
};
|
||||
|
||||
static const struct of_device_id gpu_cc_sc7280_match_table[] = {
|
||||
{ .compatible = "qcom,sc7280-gpucc" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, gpu_cc_sc7280_match_table);
|
||||
|
||||
static int gpu_cc_sc7280_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct regmap *regmap;
|
||||
|
||||
regmap = qcom_cc_map(pdev, &gpu_cc_sc7280_desc);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
clk_lucid_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config);
|
||||
|
||||
/*
|
||||
* Keep the clocks always-ON
|
||||
* GPU_CC_CB_CLK, GPUCC_CX_GMU_CLK
|
||||
*/
|
||||
regmap_update_bits(regmap, 0x1170, BIT(0), BIT(0));
|
||||
regmap_update_bits(regmap, 0x1098, BIT(0), BIT(0));
|
||||
|
||||
return qcom_cc_really_probe(pdev, &gpu_cc_sc7280_desc, regmap);
|
||||
}
|
||||
|
||||
static struct platform_driver gpu_cc_sc7280_driver = {
|
||||
.probe = gpu_cc_sc7280_probe,
|
||||
.driver = {
|
||||
.name = "gpu_cc-sc7280",
|
||||
.of_match_table = gpu_cc_sc7280_match_table,
|
||||
},
|
||||
};
|
||||
|
||||
static int __init gpu_cc_sc7280_init(void)
|
||||
{
|
||||
return platform_driver_register(&gpu_cc_sc7280_driver);
|
||||
}
|
||||
subsys_initcall(gpu_cc_sc7280_init);
|
||||
|
||||
static void __exit gpu_cc_sc7280_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&gpu_cc_sc7280_driver);
|
||||
}
|
||||
module_exit(gpu_cc_sc7280_exit);
|
||||
|
||||
MODULE_DESCRIPTION("QTI GPU_CC SC7280 Driver");
|
||||
MODULE_LICENSE("GPL v2");
|
@ -82,6 +82,14 @@ static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src_sc8180x[] = {
|
||||
F(19200000, P_BI_TCXO, 1, 0, 0),
|
||||
F(200000000, P_GPLL0_OUT_MAIN_DIV, 1.5, 0, 0),
|
||||
F(400000000, P_GPLL0_OUT_MAIN, 1.5, 0, 0),
|
||||
F(500000000, P_GPU_CC_PLL1_OUT_MAIN, 1, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gpu_cc_gmu_clk_src = {
|
||||
.cmd_rcgr = 0x1120,
|
||||
.mnd_width = 0,
|
||||
@ -277,6 +285,7 @@ static const struct qcom_cc_desc gpu_cc_sm8150_desc = {
|
||||
};
|
||||
|
||||
static const struct of_device_id gpu_cc_sm8150_match_table[] = {
|
||||
{ .compatible = "qcom,sc8180x-gpucc" },
|
||||
{ .compatible = "qcom,sm8150-gpucc" },
|
||||
{ }
|
||||
};
|
||||
@ -290,6 +299,9 @@ static int gpu_cc_sm8150_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
if (of_device_is_compatible(pdev->dev.of_node, "qcom,sc8180x-gpucc"))
|
||||
gpu_cc_gmu_clk_src.freq_tbl = ftbl_gpu_cc_gmu_clk_src_sc8180x;
|
||||
|
||||
clk_trion_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config);
|
||||
|
||||
return qcom_cc_really_probe(pdev, &gpu_cc_sm8150_desc, regmap);
|
||||
|
@ -251,15 +251,18 @@ static int lpass_gfm_clk_driver_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(cc->base))
|
||||
return PTR_ERR(cc->base);
|
||||
|
||||
pm_runtime_enable(dev);
|
||||
err = pm_clk_create(dev);
|
||||
err = devm_pm_runtime_enable(dev);
|
||||
if (err)
|
||||
goto pm_clk_err;
|
||||
return err;
|
||||
|
||||
err = devm_pm_clk_create(dev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = of_pm_clk_add_clks(dev);
|
||||
if (err < 0) {
|
||||
dev_dbg(dev, "Failed to get lpass core voting clocks\n");
|
||||
goto clk_reg_err;
|
||||
return err;
|
||||
}
|
||||
|
||||
for (i = 0; i < data->onecell_data->num; i++) {
|
||||
@ -273,22 +276,16 @@ static int lpass_gfm_clk_driver_probe(struct platform_device *pdev)
|
||||
|
||||
err = devm_clk_hw_register(dev, &data->gfm_clks[i]->hw);
|
||||
if (err)
|
||||
goto clk_reg_err;
|
||||
return err;
|
||||
|
||||
}
|
||||
|
||||
err = devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get,
|
||||
data->onecell_data);
|
||||
if (err)
|
||||
goto clk_reg_err;
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
|
||||
clk_reg_err:
|
||||
pm_clk_destroy(dev);
|
||||
pm_clk_err:
|
||||
pm_runtime_disable(dev);
|
||||
return err;
|
||||
}
|
||||
|
||||
static const struct of_device_id lpass_gfm_clk_match_table[] = {
|
||||
|
@ -356,32 +356,18 @@ static const struct qcom_cc_desc lpass_audio_hm_sc7180_desc = {
|
||||
.num_gdscs = ARRAY_SIZE(lpass_audio_hm_sc7180_gdscs),
|
||||
};
|
||||
|
||||
static void lpass_pm_runtime_disable(void *data)
|
||||
{
|
||||
pm_runtime_disable(data);
|
||||
}
|
||||
|
||||
static void lpass_pm_clk_destroy(void *data)
|
||||
{
|
||||
pm_clk_destroy(data);
|
||||
}
|
||||
|
||||
static int lpass_create_pm_clks(struct platform_device *pdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
pm_runtime_use_autosuspend(&pdev->dev);
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev, 500);
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
ret = devm_add_action_or_reset(&pdev->dev, lpass_pm_runtime_disable, &pdev->dev);
|
||||
ret = devm_pm_runtime_enable(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = pm_clk_create(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = devm_add_action_or_reset(&pdev->dev, lpass_pm_clk_destroy, &pdev->dev);
|
||||
ret = devm_pm_clk_create(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
2620
drivers/clk/qcom/mmcc-msm8994.c
Normal file
2620
drivers/clk/qcom/mmcc-msm8994.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -73,36 +73,23 @@ static int mss_sc7180_probe(struct platform_device *pdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
ret = pm_clk_create(&pdev->dev);
|
||||
ret = devm_pm_runtime_enable(&pdev->dev);
|
||||
if (ret)
|
||||
goto disable_pm_runtime;
|
||||
return ret;
|
||||
|
||||
ret = devm_pm_clk_create(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = pm_clk_add(&pdev->dev, "cfg_ahb");
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to acquire iface clock\n");
|
||||
goto destroy_pm_clk;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = qcom_cc_probe(pdev, &mss_sc7180_desc);
|
||||
if (ret < 0)
|
||||
goto destroy_pm_clk;
|
||||
|
||||
return 0;
|
||||
|
||||
destroy_pm_clk:
|
||||
pm_clk_destroy(&pdev->dev);
|
||||
|
||||
disable_pm_runtime:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mss_sc7180_remove(struct platform_device *pdev)
|
||||
{
|
||||
pm_clk_destroy(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -119,7 +106,6 @@ MODULE_DEVICE_TABLE(of, mss_sc7180_match_table);
|
||||
|
||||
static struct platform_driver mss_sc7180_driver = {
|
||||
.probe = mss_sc7180_probe,
|
||||
.remove = mss_sc7180_remove,
|
||||
.driver = {
|
||||
.name = "sc7180-mss",
|
||||
.of_match_table = mss_sc7180_match_table,
|
||||
|
@ -159,15 +159,18 @@ static int q6sstopcc_qcs404_probe(struct platform_device *pdev)
|
||||
const struct qcom_cc_desc *desc;
|
||||
int ret;
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
ret = pm_clk_create(&pdev->dev);
|
||||
ret = devm_pm_runtime_enable(&pdev->dev);
|
||||
if (ret)
|
||||
goto disable_pm_runtime;
|
||||
return ret;
|
||||
|
||||
ret = devm_pm_clk_create(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = pm_clk_add(&pdev->dev, NULL);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to acquire iface clock\n");
|
||||
goto destroy_pm_clk;
|
||||
return ret;
|
||||
}
|
||||
|
||||
q6sstop_regmap_config.name = "q6sstop_tcsr";
|
||||
@ -175,30 +178,14 @@ static int q6sstopcc_qcs404_probe(struct platform_device *pdev)
|
||||
|
||||
ret = qcom_cc_probe_by_index(pdev, 1, desc);
|
||||
if (ret)
|
||||
goto destroy_pm_clk;
|
||||
return ret;
|
||||
|
||||
q6sstop_regmap_config.name = "q6sstop_cc";
|
||||
desc = &q6sstop_qcs404_desc;
|
||||
|
||||
ret = qcom_cc_probe_by_index(pdev, 0, desc);
|
||||
if (ret)
|
||||
goto destroy_pm_clk;
|
||||
|
||||
return 0;
|
||||
|
||||
destroy_pm_clk:
|
||||
pm_clk_destroy(&pdev->dev);
|
||||
|
||||
disable_pm_runtime:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int q6sstopcc_qcs404_remove(struct platform_device *pdev)
|
||||
{
|
||||
pm_clk_destroy(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -209,7 +196,6 @@ static const struct dev_pm_ops q6sstopcc_pm_ops = {
|
||||
|
||||
static struct platform_driver q6sstopcc_qcs404_driver = {
|
||||
.probe = q6sstopcc_qcs404_probe,
|
||||
.remove = q6sstopcc_qcs404_remove,
|
||||
.driver = {
|
||||
.name = "qcs404-q6sstopcc",
|
||||
.of_match_table = q6sstopcc_qcs404_match_table,
|
||||
|
@ -110,36 +110,23 @@ static int turingcc_probe(struct platform_device *pdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
ret = pm_clk_create(&pdev->dev);
|
||||
ret = devm_pm_runtime_enable(&pdev->dev);
|
||||
if (ret)
|
||||
goto disable_pm_runtime;
|
||||
return ret;
|
||||
|
||||
ret = devm_pm_clk_create(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = pm_clk_add(&pdev->dev, NULL);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to acquire iface clock\n");
|
||||
goto destroy_pm_clk;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = qcom_cc_probe(pdev, &turingcc_desc);
|
||||
if (ret < 0)
|
||||
goto destroy_pm_clk;
|
||||
|
||||
return 0;
|
||||
|
||||
destroy_pm_clk:
|
||||
pm_clk_destroy(&pdev->dev);
|
||||
|
||||
disable_pm_runtime:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int turingcc_remove(struct platform_device *pdev)
|
||||
{
|
||||
pm_clk_destroy(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -156,7 +143,6 @@ MODULE_DEVICE_TABLE(of, turingcc_match_table);
|
||||
|
||||
static struct platform_driver turingcc_driver = {
|
||||
.probe = turingcc_probe,
|
||||
.remove = turingcc_remove,
|
||||
.driver = {
|
||||
.name = "qcs404-turingcc",
|
||||
.of_match_table = turingcc_match_table,
|
||||
|
325
drivers/clk/qcom/videocc-sc7280.c
Normal file
325
drivers/clk/qcom/videocc-sc7280.c
Normal file
@ -0,0 +1,325 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include <dt-bindings/clock/qcom,videocc-sc7280.h>
|
||||
|
||||
#include "clk-alpha-pll.h"
|
||||
#include "clk-branch.h"
|
||||
#include "clk-rcg.h"
|
||||
#include "common.h"
|
||||
#include "reset.h"
|
||||
#include "gdsc.h"
|
||||
|
||||
enum {
|
||||
P_BI_TCXO,
|
||||
P_SLEEP_CLK,
|
||||
P_VIDEO_PLL0_OUT_EVEN,
|
||||
};
|
||||
|
||||
static const struct pll_vco lucid_vco[] = {
|
||||
{ 249600000, 2000000000, 0 },
|
||||
};
|
||||
|
||||
/* 400MHz Configuration */
|
||||
static const struct alpha_pll_config video_pll0_config = {
|
||||
.l = 0x14,
|
||||
.alpha = 0xD555,
|
||||
.config_ctl_val = 0x20485699,
|
||||
.config_ctl_hi_val = 0x00002261,
|
||||
.config_ctl_hi1_val = 0x329A299C,
|
||||
.user_ctl_val = 0x00000001,
|
||||
.user_ctl_hi_val = 0x00000805,
|
||||
.user_ctl_hi1_val = 0x00000000,
|
||||
};
|
||||
|
||||
static struct clk_alpha_pll video_pll0 = {
|
||||
.offset = 0x0,
|
||||
.vco_table = lucid_vco,
|
||||
.num_vco = ARRAY_SIZE(lucid_vco),
|
||||
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
|
||||
.clkr = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "video_pll0",
|
||||
.parent_data = &(const struct clk_parent_data){
|
||||
.fw_name = "bi_tcxo",
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_alpha_pll_lucid_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static const struct parent_map video_cc_parent_map_0[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
{ P_VIDEO_PLL0_OUT_EVEN, 3 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data video_cc_parent_data_0[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
{ .hw = &video_pll0.clkr.hw },
|
||||
};
|
||||
|
||||
static const struct parent_map video_cc_parent_map_1[] = {
|
||||
{ P_SLEEP_CLK, 0 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data video_cc_parent_data_1[] = {
|
||||
{ .fw_name = "sleep_clk" },
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_video_cc_iris_clk_src[] = {
|
||||
F(133333333, P_VIDEO_PLL0_OUT_EVEN, 3, 0, 0),
|
||||
F(240000000, P_VIDEO_PLL0_OUT_EVEN, 2, 0, 0),
|
||||
F(335000000, P_VIDEO_PLL0_OUT_EVEN, 2, 0, 0),
|
||||
F(424000000, P_VIDEO_PLL0_OUT_EVEN, 2, 0, 0),
|
||||
F(460000000, P_VIDEO_PLL0_OUT_EVEN, 2, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 video_cc_iris_clk_src = {
|
||||
.cmd_rcgr = 0x1000,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = video_cc_parent_map_0,
|
||||
.freq_tbl = ftbl_video_cc_iris_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "video_cc_iris_clk_src",
|
||||
.parent_data = video_cc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(video_cc_parent_data_0),
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_video_cc_sleep_clk_src[] = {
|
||||
F(32000, P_SLEEP_CLK, 1, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 video_cc_sleep_clk_src = {
|
||||
.cmd_rcgr = 0x701c,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = video_cc_parent_map_1,
|
||||
.freq_tbl = ftbl_video_cc_sleep_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "video_cc_sleep_clk_src",
|
||||
.parent_data = video_cc_parent_data_1,
|
||||
.num_parents = ARRAY_SIZE(video_cc_parent_data_1),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch video_cc_iris_ahb_clk = {
|
||||
.halt_reg = 0x5004,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
.clkr = {
|
||||
.enable_reg = 0x5004,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "video_cc_iris_ahb_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&video_cc_iris_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch video_cc_mvs0_axi_clk = {
|
||||
.halt_reg = 0x800c,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x800c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "video_cc_mvs0_axi_clk",
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch video_cc_mvs0_core_clk = {
|
||||
.halt_reg = 0x3010,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
.hwcg_reg = 0x3010,
|
||||
.hwcg_bit = 1,
|
||||
.clkr = {
|
||||
.enable_reg = 0x3010,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "video_cc_mvs0_core_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&video_cc_iris_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch video_cc_mvsc_core_clk = {
|
||||
.halt_reg = 0x2014,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x2014,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "video_cc_mvsc_core_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&video_cc_iris_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch video_cc_mvsc_ctl_axi_clk = {
|
||||
.halt_reg = 0x8004,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x8004,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "video_cc_mvsc_ctl_axi_clk",
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch video_cc_sleep_clk = {
|
||||
.halt_reg = 0x7034,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x7034,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "video_cc_sleep_clk",
|
||||
.parent_hws = (const struct clk_hw*[]){
|
||||
&video_cc_sleep_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch video_cc_venus_ahb_clk = {
|
||||
.halt_reg = 0x801c,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x801c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "video_cc_venus_ahb_clk",
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct gdsc mvs0_gdsc = {
|
||||
.gdscr = 0x3004,
|
||||
.pd = {
|
||||
.name = "mvs0_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = HW_CTRL | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc mvsc_gdsc = {
|
||||
.gdscr = 0x2004,
|
||||
.pd = {
|
||||
.name = "mvsc_gdsc",
|
||||
},
|
||||
.flags = RETAIN_FF_ENABLE,
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
};
|
||||
|
||||
static struct clk_regmap *video_cc_sc7280_clocks[] = {
|
||||
[VIDEO_CC_IRIS_AHB_CLK] = &video_cc_iris_ahb_clk.clkr,
|
||||
[VIDEO_CC_IRIS_CLK_SRC] = &video_cc_iris_clk_src.clkr,
|
||||
[VIDEO_CC_MVS0_AXI_CLK] = &video_cc_mvs0_axi_clk.clkr,
|
||||
[VIDEO_CC_MVS0_CORE_CLK] = &video_cc_mvs0_core_clk.clkr,
|
||||
[VIDEO_CC_MVSC_CORE_CLK] = &video_cc_mvsc_core_clk.clkr,
|
||||
[VIDEO_CC_MVSC_CTL_AXI_CLK] = &video_cc_mvsc_ctl_axi_clk.clkr,
|
||||
[VIDEO_CC_SLEEP_CLK] = &video_cc_sleep_clk.clkr,
|
||||
[VIDEO_CC_SLEEP_CLK_SRC] = &video_cc_sleep_clk_src.clkr,
|
||||
[VIDEO_CC_VENUS_AHB_CLK] = &video_cc_venus_ahb_clk.clkr,
|
||||
[VIDEO_PLL0] = &video_pll0.clkr,
|
||||
};
|
||||
|
||||
static struct gdsc *video_cc_sc7280_gdscs[] = {
|
||||
[MVS0_GDSC] = &mvs0_gdsc,
|
||||
[MVSC_GDSC] = &mvsc_gdsc,
|
||||
};
|
||||
|
||||
static const struct regmap_config video_cc_sc7280_regmap_config = {
|
||||
.reg_bits = 32,
|
||||
.reg_stride = 4,
|
||||
.val_bits = 32,
|
||||
.max_register = 0xb000,
|
||||
.fast_io = true,
|
||||
};
|
||||
|
||||
static const struct qcom_cc_desc video_cc_sc7280_desc = {
|
||||
.config = &video_cc_sc7280_regmap_config,
|
||||
.clks = video_cc_sc7280_clocks,
|
||||
.num_clks = ARRAY_SIZE(video_cc_sc7280_clocks),
|
||||
.gdscs = video_cc_sc7280_gdscs,
|
||||
.num_gdscs = ARRAY_SIZE(video_cc_sc7280_gdscs),
|
||||
};
|
||||
|
||||
static const struct of_device_id video_cc_sc7280_match_table[] = {
|
||||
{ .compatible = "qcom,sc7280-videocc" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, video_cc_sc7280_match_table);
|
||||
|
||||
static int video_cc_sc7280_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct regmap *regmap;
|
||||
|
||||
regmap = qcom_cc_map(pdev, &video_cc_sc7280_desc);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
clk_lucid_pll_configure(&video_pll0, regmap, &video_pll0_config);
|
||||
|
||||
return qcom_cc_really_probe(pdev, &video_cc_sc7280_desc, regmap);
|
||||
}
|
||||
|
||||
static struct platform_driver video_cc_sc7280_driver = {
|
||||
.probe = video_cc_sc7280_probe,
|
||||
.driver = {
|
||||
.name = "video_cc-sc7280",
|
||||
.of_match_table = video_cc_sc7280_match_table,
|
||||
},
|
||||
};
|
||||
|
||||
static int __init video_cc_sc7280_init(void)
|
||||
{
|
||||
return platform_driver_register(&video_cc_sc7280_driver);
|
||||
}
|
||||
subsys_initcall(video_cc_sc7280_init);
|
||||
|
||||
static void __exit video_cc_sc7280_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&video_cc_sc7280_driver);
|
||||
}
|
||||
module_exit(video_cc_sc7280_exit);
|
||||
|
||||
MODULE_DESCRIPTION("QTI VIDEO_CC sc7280 Driver");
|
||||
MODULE_LICENSE("GPL v2");
|
@ -107,10 +107,10 @@ static const struct clk_parent_data gpio_db_free_mux[] = {
|
||||
};
|
||||
|
||||
static const struct clk_parent_data psi_ref_free_mux[] = {
|
||||
{ .fw_name = "main_pll_c3",
|
||||
.name = "main_pll_c3", },
|
||||
{ .fw_name = "peri_pll_c3",
|
||||
.name = "peri_pll_c3", },
|
||||
{ .fw_name = "main_pll_c2",
|
||||
.name = "main_pll_c2", },
|
||||
{ .fw_name = "peri_pll_c2",
|
||||
.name = "peri_pll_c2", },
|
||||
{ .fw_name = "osc1",
|
||||
.name = "osc1", },
|
||||
{ .fw_name = "cb-intosc-hs-div2-clk",
|
||||
@ -195,6 +195,13 @@ static const struct clk_parent_data sdmmc_mux[] = {
|
||||
.name = "boot_clk", },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data s2f_user0_mux[] = {
|
||||
{ .fw_name = "s2f_user0_free_clk",
|
||||
.name = "s2f_user0_free_clk", },
|
||||
{ .fw_name = "boot_clk",
|
||||
.name = "boot_clk", },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data s2f_user1_mux[] = {
|
||||
{ .fw_name = "s2f_user1_free_clk",
|
||||
.name = "s2f_user1_free_clk", },
|
||||
@ -273,7 +280,7 @@ static const struct stratix10_perip_cnt_clock agilex_main_perip_cnt_clks[] = {
|
||||
{ AGILEX_SDMMC_FREE_CLK, "sdmmc_free_clk", NULL, sdmmc_free_mux,
|
||||
ARRAY_SIZE(sdmmc_free_mux), 0, 0xE4, 0, 0, 0},
|
||||
{ AGILEX_S2F_USER0_FREE_CLK, "s2f_user0_free_clk", NULL, s2f_usr0_free_mux,
|
||||
ARRAY_SIZE(s2f_usr0_free_mux), 0, 0xE8, 0, 0, 0},
|
||||
ARRAY_SIZE(s2f_usr0_free_mux), 0, 0xE8, 0, 0x30, 2},
|
||||
{ AGILEX_S2F_USER1_FREE_CLK, "s2f_user1_free_clk", NULL, s2f_usr1_free_mux,
|
||||
ARRAY_SIZE(s2f_usr1_free_mux), 0, 0xEC, 0, 0x88, 5},
|
||||
{ AGILEX_PSI_REF_FREE_CLK, "psi_ref_free_clk", NULL, psi_ref_free_mux,
|
||||
@ -319,6 +326,8 @@ static const struct stratix10_gate_clock agilex_gate_clks[] = {
|
||||
4, 0x98, 0, 16, 0x88, 3, 0},
|
||||
{ AGILEX_SDMMC_CLK, "sdmmc_clk", NULL, sdmmc_mux, ARRAY_SIZE(sdmmc_mux), 0, 0x7C,
|
||||
5, 0, 0, 0, 0x88, 4, 4},
|
||||
{ AGILEX_S2F_USER0_CLK, "s2f_user0_clk", NULL, s2f_user0_mux, ARRAY_SIZE(s2f_user0_mux), 0, 0x24,
|
||||
6, 0, 0, 0, 0x30, 2, 0},
|
||||
{ AGILEX_S2F_USER1_CLK, "s2f_user1_clk", NULL, s2f_user1_mux, ARRAY_SIZE(s2f_user1_mux), 0, 0x7C,
|
||||
6, 0, 0, 0, 0x88, 5, 0},
|
||||
{ AGILEX_PSI_REF_CLK, "psi_ref_clk", NULL, psi_mux, ARRAY_SIZE(psi_mux), 0, 0x7C,
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
obj-$(CONFIG_PMC_ATOM) += clk-pmc-atom.o
|
||||
obj-$(CONFIG_X86_AMD_PLATFORM_DEVICE) += clk-fch.o
|
||||
clk-x86-lpss-objs := clk-lpt.o
|
||||
clk-x86-lpss-y := clk-lpss-atom.o
|
||||
obj-$(CONFIG_X86_INTEL_LPSS) += clk-x86-lpss.o
|
||||
obj-$(CONFIG_CLK_LGM_CGU) += clk-cgu.o clk-cgu-pll.o clk-lgm.o
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <linux/platform_data/x86/clk-lpss.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
static int lpt_clk_probe(struct platform_device *pdev)
|
||||
static int lpss_atom_clk_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct lpss_clk_data *drvdata;
|
||||
struct clk *clk;
|
||||
@ -34,14 +34,14 @@ static int lpt_clk_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver lpt_clk_driver = {
|
||||
static struct platform_driver lpss_atom_clk_driver = {
|
||||
.driver = {
|
||||
.name = "clk-lpt",
|
||||
.name = "clk-lpss-atom",
|
||||
},
|
||||
.probe = lpt_clk_probe,
|
||||
.probe = lpss_atom_clk_probe,
|
||||
};
|
||||
|
||||
int __init lpt_clk_init(void)
|
||||
int __init lpss_atom_clk_init(void)
|
||||
{
|
||||
return platform_driver_register(&lpt_clk_driver);
|
||||
return platform_driver_register(&lpss_atom_clk_driver);
|
||||
}
|
585
include/dt-bindings/clock/mt8192-clk.h
Normal file
585
include/dt-bindings/clock/mt8192-clk.h
Normal file
@ -0,0 +1,585 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2021 MediaTek Inc.
|
||||
* Author: Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_MT8192_H
|
||||
#define _DT_BINDINGS_CLK_MT8192_H
|
||||
|
||||
/* TOPCKGEN */
|
||||
|
||||
#define CLK_TOP_AXI_SEL 0
|
||||
#define CLK_TOP_SPM_SEL 1
|
||||
#define CLK_TOP_SCP_SEL 2
|
||||
#define CLK_TOP_BUS_AXIMEM_SEL 3
|
||||
#define CLK_TOP_DISP_SEL 4
|
||||
#define CLK_TOP_MDP_SEL 5
|
||||
#define CLK_TOP_IMG1_SEL 6
|
||||
#define CLK_TOP_IMG2_SEL 7
|
||||
#define CLK_TOP_IPE_SEL 8
|
||||
#define CLK_TOP_DPE_SEL 9
|
||||
#define CLK_TOP_CAM_SEL 10
|
||||
#define CLK_TOP_CCU_SEL 11
|
||||
#define CLK_TOP_DSP7_SEL 12
|
||||
#define CLK_TOP_MFG_REF_SEL 13
|
||||
#define CLK_TOP_MFG_PLL_SEL 14
|
||||
#define CLK_TOP_CAMTG_SEL 15
|
||||
#define CLK_TOP_CAMTG2_SEL 16
|
||||
#define CLK_TOP_CAMTG3_SEL 17
|
||||
#define CLK_TOP_CAMTG4_SEL 18
|
||||
#define CLK_TOP_CAMTG5_SEL 19
|
||||
#define CLK_TOP_CAMTG6_SEL 20
|
||||
#define CLK_TOP_UART_SEL 21
|
||||
#define CLK_TOP_SPI_SEL 22
|
||||
#define CLK_TOP_MSDC50_0_H_SEL 23
|
||||
#define CLK_TOP_MSDC50_0_SEL 24
|
||||
#define CLK_TOP_MSDC30_1_SEL 25
|
||||
#define CLK_TOP_MSDC30_2_SEL 26
|
||||
#define CLK_TOP_AUDIO_SEL 27
|
||||
#define CLK_TOP_AUD_INTBUS_SEL 28
|
||||
#define CLK_TOP_PWRAP_ULPOSC_SEL 29
|
||||
#define CLK_TOP_ATB_SEL 30
|
||||
#define CLK_TOP_DPI_SEL 31
|
||||
#define CLK_TOP_SCAM_SEL 32
|
||||
#define CLK_TOP_DISP_PWM_SEL 33
|
||||
#define CLK_TOP_USB_TOP_SEL 34
|
||||
#define CLK_TOP_SSUSB_XHCI_SEL 35
|
||||
#define CLK_TOP_I2C_SEL 36
|
||||
#define CLK_TOP_SENINF_SEL 37
|
||||
#define CLK_TOP_SENINF1_SEL 38
|
||||
#define CLK_TOP_SENINF2_SEL 39
|
||||
#define CLK_TOP_SENINF3_SEL 40
|
||||
#define CLK_TOP_TL_SEL 41
|
||||
#define CLK_TOP_DXCC_SEL 42
|
||||
#define CLK_TOP_AUD_ENGEN1_SEL 43
|
||||
#define CLK_TOP_AUD_ENGEN2_SEL 44
|
||||
#define CLK_TOP_AES_UFSFDE_SEL 45
|
||||
#define CLK_TOP_UFS_SEL 46
|
||||
#define CLK_TOP_AUD_1_SEL 47
|
||||
#define CLK_TOP_AUD_2_SEL 48
|
||||
#define CLK_TOP_ADSP_SEL 49
|
||||
#define CLK_TOP_DPMAIF_MAIN_SEL 50
|
||||
#define CLK_TOP_VENC_SEL 51
|
||||
#define CLK_TOP_VDEC_SEL 52
|
||||
#define CLK_TOP_CAMTM_SEL 53
|
||||
#define CLK_TOP_PWM_SEL 54
|
||||
#define CLK_TOP_AUDIO_H_SEL 55
|
||||
#define CLK_TOP_SPMI_MST_SEL 56
|
||||
#define CLK_TOP_AES_MSDCFDE_SEL 57
|
||||
#define CLK_TOP_SFLASH_SEL 58
|
||||
#define CLK_TOP_APLL_I2S0_M_SEL 59
|
||||
#define CLK_TOP_APLL_I2S1_M_SEL 60
|
||||
#define CLK_TOP_APLL_I2S2_M_SEL 61
|
||||
#define CLK_TOP_APLL_I2S3_M_SEL 62
|
||||
#define CLK_TOP_APLL_I2S4_M_SEL 63
|
||||
#define CLK_TOP_APLL_I2S5_M_SEL 64
|
||||
#define CLK_TOP_APLL_I2S6_M_SEL 65
|
||||
#define CLK_TOP_APLL_I2S7_M_SEL 66
|
||||
#define CLK_TOP_APLL_I2S8_M_SEL 67
|
||||
#define CLK_TOP_APLL_I2S9_M_SEL 68
|
||||
#define CLK_TOP_MAINPLL_D3 69
|
||||
#define CLK_TOP_MAINPLL_D4 70
|
||||
#define CLK_TOP_MAINPLL_D4_D2 71
|
||||
#define CLK_TOP_MAINPLL_D4_D4 72
|
||||
#define CLK_TOP_MAINPLL_D4_D8 73
|
||||
#define CLK_TOP_MAINPLL_D4_D16 74
|
||||
#define CLK_TOP_MAINPLL_D5 75
|
||||
#define CLK_TOP_MAINPLL_D5_D2 76
|
||||
#define CLK_TOP_MAINPLL_D5_D4 77
|
||||
#define CLK_TOP_MAINPLL_D5_D8 78
|
||||
#define CLK_TOP_MAINPLL_D6 79
|
||||
#define CLK_TOP_MAINPLL_D6_D2 80
|
||||
#define CLK_TOP_MAINPLL_D6_D4 81
|
||||
#define CLK_TOP_MAINPLL_D7 82
|
||||
#define CLK_TOP_MAINPLL_D7_D2 83
|
||||
#define CLK_TOP_MAINPLL_D7_D4 84
|
||||
#define CLK_TOP_MAINPLL_D7_D8 85
|
||||
#define CLK_TOP_UNIVPLL_D3 86
|
||||
#define CLK_TOP_UNIVPLL_D4 87
|
||||
#define CLK_TOP_UNIVPLL_D4_D2 88
|
||||
#define CLK_TOP_UNIVPLL_D4_D4 89
|
||||
#define CLK_TOP_UNIVPLL_D4_D8 90
|
||||
#define CLK_TOP_UNIVPLL_D5 91
|
||||
#define CLK_TOP_UNIVPLL_D5_D2 92
|
||||
#define CLK_TOP_UNIVPLL_D5_D4 93
|
||||
#define CLK_TOP_UNIVPLL_D5_D8 94
|
||||
#define CLK_TOP_UNIVPLL_D6 95
|
||||
#define CLK_TOP_UNIVPLL_D6_D2 96
|
||||
#define CLK_TOP_UNIVPLL_D6_D4 97
|
||||
#define CLK_TOP_UNIVPLL_D6_D8 98
|
||||
#define CLK_TOP_UNIVPLL_D6_D16 99
|
||||
#define CLK_TOP_UNIVPLL_D7 100
|
||||
#define CLK_TOP_APLL1 101
|
||||
#define CLK_TOP_APLL1_D2 102
|
||||
#define CLK_TOP_APLL1_D4 103
|
||||
#define CLK_TOP_APLL1_D8 104
|
||||
#define CLK_TOP_APLL2 105
|
||||
#define CLK_TOP_APLL2_D2 106
|
||||
#define CLK_TOP_APLL2_D4 107
|
||||
#define CLK_TOP_APLL2_D8 108
|
||||
#define CLK_TOP_MMPLL_D4 109
|
||||
#define CLK_TOP_MMPLL_D4_D2 110
|
||||
#define CLK_TOP_MMPLL_D5 111
|
||||
#define CLK_TOP_MMPLL_D5_D2 112
|
||||
#define CLK_TOP_MMPLL_D6 113
|
||||
#define CLK_TOP_MMPLL_D6_D2 114
|
||||
#define CLK_TOP_MMPLL_D7 115
|
||||
#define CLK_TOP_MMPLL_D9 116
|
||||
#define CLK_TOP_APUPLL 117
|
||||
#define CLK_TOP_NPUPLL 118
|
||||
#define CLK_TOP_TVDPLL 119
|
||||
#define CLK_TOP_TVDPLL_D2 120
|
||||
#define CLK_TOP_TVDPLL_D4 121
|
||||
#define CLK_TOP_TVDPLL_D8 122
|
||||
#define CLK_TOP_TVDPLL_D16 123
|
||||
#define CLK_TOP_MSDCPLL 124
|
||||
#define CLK_TOP_MSDCPLL_D2 125
|
||||
#define CLK_TOP_MSDCPLL_D4 126
|
||||
#define CLK_TOP_ULPOSC 127
|
||||
#define CLK_TOP_OSC_D2 128
|
||||
#define CLK_TOP_OSC_D4 129
|
||||
#define CLK_TOP_OSC_D8 130
|
||||
#define CLK_TOP_OSC_D10 131
|
||||
#define CLK_TOP_OSC_D16 132
|
||||
#define CLK_TOP_OSC_D20 133
|
||||
#define CLK_TOP_CSW_F26M_D2 134
|
||||
#define CLK_TOP_ADSPPLL 135
|
||||
#define CLK_TOP_UNIVPLL_192M 136
|
||||
#define CLK_TOP_UNIVPLL_192M_D2 137
|
||||
#define CLK_TOP_UNIVPLL_192M_D4 138
|
||||
#define CLK_TOP_UNIVPLL_192M_D8 139
|
||||
#define CLK_TOP_UNIVPLL_192M_D16 140
|
||||
#define CLK_TOP_UNIVPLL_192M_D32 141
|
||||
#define CLK_TOP_APLL12_DIV0 142
|
||||
#define CLK_TOP_APLL12_DIV1 143
|
||||
#define CLK_TOP_APLL12_DIV2 144
|
||||
#define CLK_TOP_APLL12_DIV3 145
|
||||
#define CLK_TOP_APLL12_DIV4 146
|
||||
#define CLK_TOP_APLL12_DIVB 147
|
||||
#define CLK_TOP_APLL12_DIV5 148
|
||||
#define CLK_TOP_APLL12_DIV6 149
|
||||
#define CLK_TOP_APLL12_DIV7 150
|
||||
#define CLK_TOP_APLL12_DIV8 151
|
||||
#define CLK_TOP_APLL12_DIV9 152
|
||||
#define CLK_TOP_SSUSB_TOP_REF 153
|
||||
#define CLK_TOP_SSUSB_PHY_REF 154
|
||||
#define CLK_TOP_NR_CLK 155
|
||||
|
||||
/* INFRACFG */
|
||||
|
||||
#define CLK_INFRA_PMIC_TMR 0
|
||||
#define CLK_INFRA_PMIC_AP 1
|
||||
#define CLK_INFRA_PMIC_MD 2
|
||||
#define CLK_INFRA_PMIC_CONN 3
|
||||
#define CLK_INFRA_SCPSYS 4
|
||||
#define CLK_INFRA_SEJ 5
|
||||
#define CLK_INFRA_APXGPT 6
|
||||
#define CLK_INFRA_GCE 7
|
||||
#define CLK_INFRA_GCE2 8
|
||||
#define CLK_INFRA_THERM 9
|
||||
#define CLK_INFRA_I2C0 10
|
||||
#define CLK_INFRA_AP_DMA_PSEUDO 11
|
||||
#define CLK_INFRA_I2C2 12
|
||||
#define CLK_INFRA_I2C3 13
|
||||
#define CLK_INFRA_PWM_H 14
|
||||
#define CLK_INFRA_PWM1 15
|
||||
#define CLK_INFRA_PWM2 16
|
||||
#define CLK_INFRA_PWM3 17
|
||||
#define CLK_INFRA_PWM4 18
|
||||
#define CLK_INFRA_PWM 19
|
||||
#define CLK_INFRA_UART0 20
|
||||
#define CLK_INFRA_UART1 21
|
||||
#define CLK_INFRA_UART2 22
|
||||
#define CLK_INFRA_UART3 23
|
||||
#define CLK_INFRA_GCE_26M 24
|
||||
#define CLK_INFRA_CQ_DMA_FPC 25
|
||||
#define CLK_INFRA_BTIF 26
|
||||
#define CLK_INFRA_SPI0 27
|
||||
#define CLK_INFRA_MSDC0 28
|
||||
#define CLK_INFRA_MSDC1 29
|
||||
#define CLK_INFRA_MSDC2 30
|
||||
#define CLK_INFRA_MSDC0_SRC 31
|
||||
#define CLK_INFRA_GCPU 32
|
||||
#define CLK_INFRA_TRNG 33
|
||||
#define CLK_INFRA_AUXADC 34
|
||||
#define CLK_INFRA_CPUM 35
|
||||
#define CLK_INFRA_CCIF1_AP 36
|
||||
#define CLK_INFRA_CCIF1_MD 37
|
||||
#define CLK_INFRA_AUXADC_MD 38
|
||||
#define CLK_INFRA_PCIE_TL_26M 39
|
||||
#define CLK_INFRA_MSDC1_SRC 40
|
||||
#define CLK_INFRA_MSDC2_SRC 41
|
||||
#define CLK_INFRA_PCIE_TL_96M 42
|
||||
#define CLK_INFRA_PCIE_PL_P_250M 43
|
||||
#define CLK_INFRA_DEVICE_APC 44
|
||||
#define CLK_INFRA_CCIF_AP 45
|
||||
#define CLK_INFRA_DEBUGSYS 46
|
||||
#define CLK_INFRA_AUDIO 47
|
||||
#define CLK_INFRA_CCIF_MD 48
|
||||
#define CLK_INFRA_DXCC_SEC_CORE 49
|
||||
#define CLK_INFRA_DXCC_AO 50
|
||||
#define CLK_INFRA_DBG_TRACE 51
|
||||
#define CLK_INFRA_DEVMPU_B 52
|
||||
#define CLK_INFRA_DRAMC_F26M 53
|
||||
#define CLK_INFRA_IRTX 54
|
||||
#define CLK_INFRA_SSUSB 55
|
||||
#define CLK_INFRA_DISP_PWM 56
|
||||
#define CLK_INFRA_CLDMA_B 57
|
||||
#define CLK_INFRA_AUDIO_26M_B 58
|
||||
#define CLK_INFRA_MODEM_TEMP_SHARE 59
|
||||
#define CLK_INFRA_SPI1 60
|
||||
#define CLK_INFRA_I2C4 61
|
||||
#define CLK_INFRA_SPI2 62
|
||||
#define CLK_INFRA_SPI3 63
|
||||
#define CLK_INFRA_UNIPRO_SYS 64
|
||||
#define CLK_INFRA_UNIPRO_TICK 65
|
||||
#define CLK_INFRA_UFS_MP_SAP_B 66
|
||||
#define CLK_INFRA_MD32_B 67
|
||||
#define CLK_INFRA_UNIPRO_MBIST 68
|
||||
#define CLK_INFRA_I2C5 69
|
||||
#define CLK_INFRA_I2C5_ARBITER 70
|
||||
#define CLK_INFRA_I2C5_IMM 71
|
||||
#define CLK_INFRA_I2C1_ARBITER 72
|
||||
#define CLK_INFRA_I2C1_IMM 73
|
||||
#define CLK_INFRA_I2C2_ARBITER 74
|
||||
#define CLK_INFRA_I2C2_IMM 75
|
||||
#define CLK_INFRA_SPI4 76
|
||||
#define CLK_INFRA_SPI5 77
|
||||
#define CLK_INFRA_CQ_DMA 78
|
||||
#define CLK_INFRA_UFS 79
|
||||
#define CLK_INFRA_AES_UFSFDE 80
|
||||
#define CLK_INFRA_UFS_TICK 81
|
||||
#define CLK_INFRA_SSUSB_XHCI 82
|
||||
#define CLK_INFRA_MSDC0_SELF 83
|
||||
#define CLK_INFRA_MSDC1_SELF 84
|
||||
#define CLK_INFRA_MSDC2_SELF 85
|
||||
#define CLK_INFRA_UFS_AXI 86
|
||||
#define CLK_INFRA_I2C6 87
|
||||
#define CLK_INFRA_AP_MSDC0 88
|
||||
#define CLK_INFRA_MD_MSDC0 89
|
||||
#define CLK_INFRA_CCIF5_AP 90
|
||||
#define CLK_INFRA_CCIF5_MD 91
|
||||
#define CLK_INFRA_PCIE_TOP_H_133M 92
|
||||
#define CLK_INFRA_FLASHIF_TOP_H_133M 93
|
||||
#define CLK_INFRA_PCIE_PERI_26M 94
|
||||
#define CLK_INFRA_CCIF2_AP 95
|
||||
#define CLK_INFRA_CCIF2_MD 96
|
||||
#define CLK_INFRA_CCIF3_AP 97
|
||||
#define CLK_INFRA_CCIF3_MD 98
|
||||
#define CLK_INFRA_SEJ_F13M 99
|
||||
#define CLK_INFRA_AES 100
|
||||
#define CLK_INFRA_I2C7 101
|
||||
#define CLK_INFRA_I2C8 102
|
||||
#define CLK_INFRA_FBIST2FPC 103
|
||||
#define CLK_INFRA_DEVICE_APC_SYNC 104
|
||||
#define CLK_INFRA_DPMAIF_MAIN 105
|
||||
#define CLK_INFRA_PCIE_TL_32K 106
|
||||
#define CLK_INFRA_CCIF4_AP 107
|
||||
#define CLK_INFRA_CCIF4_MD 108
|
||||
#define CLK_INFRA_SPI6 109
|
||||
#define CLK_INFRA_SPI7 110
|
||||
#define CLK_INFRA_133M 111
|
||||
#define CLK_INFRA_66M 112
|
||||
#define CLK_INFRA_66M_PERI_BUS 113
|
||||
#define CLK_INFRA_FREE_DCM_133M 114
|
||||
#define CLK_INFRA_FREE_DCM_66M 115
|
||||
#define CLK_INFRA_PERI_BUS_DCM_133M 116
|
||||
#define CLK_INFRA_PERI_BUS_DCM_66M 117
|
||||
#define CLK_INFRA_FLASHIF_PERI_26M 118
|
||||
#define CLK_INFRA_FLASHIF_SFLASH 119
|
||||
#define CLK_INFRA_AP_DMA 120
|
||||
#define CLK_INFRA_NR_CLK 121
|
||||
|
||||
/* PERICFG */
|
||||
|
||||
#define CLK_PERI_PERIAXI 0
|
||||
#define CLK_PERI_NR_CLK 1
|
||||
|
||||
/* APMIXEDSYS */
|
||||
|
||||
#define CLK_APMIXED_MAINPLL 0
|
||||
#define CLK_APMIXED_UNIVPLL 1
|
||||
#define CLK_APMIXED_USBPLL 2
|
||||
#define CLK_APMIXED_MSDCPLL 3
|
||||
#define CLK_APMIXED_MMPLL 4
|
||||
#define CLK_APMIXED_ADSPPLL 5
|
||||
#define CLK_APMIXED_MFGPLL 6
|
||||
#define CLK_APMIXED_TVDPLL 7
|
||||
#define CLK_APMIXED_APLL1 8
|
||||
#define CLK_APMIXED_APLL2 9
|
||||
#define CLK_APMIXED_MIPID26M 10
|
||||
#define CLK_APMIXED_NR_CLK 11
|
||||
|
||||
/* SCP_ADSP */
|
||||
|
||||
#define CLK_SCP_ADSP_AUDIODSP 0
|
||||
#define CLK_SCP_ADSP_NR_CLK 1
|
||||
|
||||
/* IMP_IIC_WRAP_C */
|
||||
|
||||
#define CLK_IMP_IIC_WRAP_C_I2C10 0
|
||||
#define CLK_IMP_IIC_WRAP_C_I2C11 1
|
||||
#define CLK_IMP_IIC_WRAP_C_I2C12 2
|
||||
#define CLK_IMP_IIC_WRAP_C_I2C13 3
|
||||
#define CLK_IMP_IIC_WRAP_C_NR_CLK 4
|
||||
|
||||
/* AUDSYS */
|
||||
|
||||
#define CLK_AUD_AFE 0
|
||||
#define CLK_AUD_22M 1
|
||||
#define CLK_AUD_24M 2
|
||||
#define CLK_AUD_APLL2_TUNER 3
|
||||
#define CLK_AUD_APLL_TUNER 4
|
||||
#define CLK_AUD_TDM 5
|
||||
#define CLK_AUD_ADC 6
|
||||
#define CLK_AUD_DAC 7
|
||||
#define CLK_AUD_DAC_PREDIS 8
|
||||
#define CLK_AUD_TML 9
|
||||
#define CLK_AUD_NLE 10
|
||||
#define CLK_AUD_I2S1_B 11
|
||||
#define CLK_AUD_I2S2_B 12
|
||||
#define CLK_AUD_I2S3_B 13
|
||||
#define CLK_AUD_I2S4_B 14
|
||||
#define CLK_AUD_CONNSYS_I2S_ASRC 15
|
||||
#define CLK_AUD_GENERAL1_ASRC 16
|
||||
#define CLK_AUD_GENERAL2_ASRC 17
|
||||
#define CLK_AUD_DAC_HIRES 18
|
||||
#define CLK_AUD_ADC_HIRES 19
|
||||
#define CLK_AUD_ADC_HIRES_TML 20
|
||||
#define CLK_AUD_ADDA6_ADC 21
|
||||
#define CLK_AUD_ADDA6_ADC_HIRES 22
|
||||
#define CLK_AUD_3RD_DAC 23
|
||||
#define CLK_AUD_3RD_DAC_PREDIS 24
|
||||
#define CLK_AUD_3RD_DAC_TML 25
|
||||
#define CLK_AUD_3RD_DAC_HIRES 26
|
||||
#define CLK_AUD_I2S5_B 27
|
||||
#define CLK_AUD_I2S6_B 28
|
||||
#define CLK_AUD_I2S7_B 29
|
||||
#define CLK_AUD_I2S8_B 30
|
||||
#define CLK_AUD_I2S9_B 31
|
||||
#define CLK_AUD_NR_CLK 32
|
||||
|
||||
/* IMP_IIC_WRAP_E */
|
||||
|
||||
#define CLK_IMP_IIC_WRAP_E_I2C3 0
|
||||
#define CLK_IMP_IIC_WRAP_E_NR_CLK 1
|
||||
|
||||
/* IMP_IIC_WRAP_S */
|
||||
|
||||
#define CLK_IMP_IIC_WRAP_S_I2C7 0
|
||||
#define CLK_IMP_IIC_WRAP_S_I2C8 1
|
||||
#define CLK_IMP_IIC_WRAP_S_I2C9 2
|
||||
#define CLK_IMP_IIC_WRAP_S_NR_CLK 3
|
||||
|
||||
/* IMP_IIC_WRAP_WS */
|
||||
|
||||
#define CLK_IMP_IIC_WRAP_WS_I2C1 0
|
||||
#define CLK_IMP_IIC_WRAP_WS_I2C2 1
|
||||
#define CLK_IMP_IIC_WRAP_WS_I2C4 2
|
||||
#define CLK_IMP_IIC_WRAP_WS_NR_CLK 3
|
||||
|
||||
/* IMP_IIC_WRAP_W */
|
||||
|
||||
#define CLK_IMP_IIC_WRAP_W_I2C5 0
|
||||
#define CLK_IMP_IIC_WRAP_W_NR_CLK 1
|
||||
|
||||
/* IMP_IIC_WRAP_N */
|
||||
|
||||
#define CLK_IMP_IIC_WRAP_N_I2C0 0
|
||||
#define CLK_IMP_IIC_WRAP_N_I2C6 1
|
||||
#define CLK_IMP_IIC_WRAP_N_NR_CLK 2
|
||||
|
||||
/* MSDC_TOP */
|
||||
|
||||
#define CLK_MSDC_TOP_AES_0P 0
|
||||
#define CLK_MSDC_TOP_SRC_0P 1
|
||||
#define CLK_MSDC_TOP_SRC_1P 2
|
||||
#define CLK_MSDC_TOP_SRC_2P 3
|
||||
#define CLK_MSDC_TOP_P_MSDC0 4
|
||||
#define CLK_MSDC_TOP_P_MSDC1 5
|
||||
#define CLK_MSDC_TOP_P_MSDC2 6
|
||||
#define CLK_MSDC_TOP_P_CFG 7
|
||||
#define CLK_MSDC_TOP_AXI 8
|
||||
#define CLK_MSDC_TOP_H_MST_0P 9
|
||||
#define CLK_MSDC_TOP_H_MST_1P 10
|
||||
#define CLK_MSDC_TOP_H_MST_2P 11
|
||||
#define CLK_MSDC_TOP_MEM_OFF_DLY_26M 12
|
||||
#define CLK_MSDC_TOP_32K 13
|
||||
#define CLK_MSDC_TOP_AHB2AXI_BRG_AXI 14
|
||||
#define CLK_MSDC_TOP_NR_CLK 15
|
||||
|
||||
/* MSDC */
|
||||
|
||||
#define CLK_MSDC_AXI_WRAP 0
|
||||
#define CLK_MSDC_NR_CLK 1
|
||||
|
||||
/* MFGCFG */
|
||||
|
||||
#define CLK_MFG_BG3D 0
|
||||
#define CLK_MFG_NR_CLK 1
|
||||
|
||||
/* MMSYS */
|
||||
|
||||
#define CLK_MM_DISP_MUTEX0 0
|
||||
#define CLK_MM_DISP_CONFIG 1
|
||||
#define CLK_MM_DISP_OVL0 2
|
||||
#define CLK_MM_DISP_RDMA0 3
|
||||
#define CLK_MM_DISP_OVL0_2L 4
|
||||
#define CLK_MM_DISP_WDMA0 5
|
||||
#define CLK_MM_DISP_UFBC_WDMA0 6
|
||||
#define CLK_MM_DISP_RSZ0 7
|
||||
#define CLK_MM_DISP_AAL0 8
|
||||
#define CLK_MM_DISP_CCORR0 9
|
||||
#define CLK_MM_DISP_DITHER0 10
|
||||
#define CLK_MM_SMI_INFRA 11
|
||||
#define CLK_MM_DISP_GAMMA0 12
|
||||
#define CLK_MM_DISP_POSTMASK0 13
|
||||
#define CLK_MM_DISP_DSC_WRAP0 14
|
||||
#define CLK_MM_DSI0 15
|
||||
#define CLK_MM_DISP_COLOR0 16
|
||||
#define CLK_MM_SMI_COMMON 17
|
||||
#define CLK_MM_DISP_FAKE_ENG0 18
|
||||
#define CLK_MM_DISP_FAKE_ENG1 19
|
||||
#define CLK_MM_MDP_TDSHP4 20
|
||||
#define CLK_MM_MDP_RSZ4 21
|
||||
#define CLK_MM_MDP_AAL4 22
|
||||
#define CLK_MM_MDP_HDR4 23
|
||||
#define CLK_MM_MDP_RDMA4 24
|
||||
#define CLK_MM_MDP_COLOR4 25
|
||||
#define CLK_MM_DISP_Y2R0 26
|
||||
#define CLK_MM_SMI_GALS 27
|
||||
#define CLK_MM_DISP_OVL2_2L 28
|
||||
#define CLK_MM_DISP_RDMA4 29
|
||||
#define CLK_MM_DISP_DPI0 30
|
||||
#define CLK_MM_SMI_IOMMU 31
|
||||
#define CLK_MM_DSI_DSI0 32
|
||||
#define CLK_MM_DPI_DPI0 33
|
||||
#define CLK_MM_26MHZ 34
|
||||
#define CLK_MM_32KHZ 35
|
||||
#define CLK_MM_NR_CLK 36
|
||||
|
||||
/* IMGSYS */
|
||||
|
||||
#define CLK_IMG_LARB9 0
|
||||
#define CLK_IMG_LARB10 1
|
||||
#define CLK_IMG_DIP 2
|
||||
#define CLK_IMG_GALS 3
|
||||
#define CLK_IMG_NR_CLK 4
|
||||
|
||||
/* IMGSYS2 */
|
||||
|
||||
#define CLK_IMG2_LARB11 0
|
||||
#define CLK_IMG2_LARB12 1
|
||||
#define CLK_IMG2_MFB 2
|
||||
#define CLK_IMG2_WPE 3
|
||||
#define CLK_IMG2_MSS 4
|
||||
#define CLK_IMG2_GALS 5
|
||||
#define CLK_IMG2_NR_CLK 6
|
||||
|
||||
/* VDECSYS_SOC */
|
||||
|
||||
#define CLK_VDEC_SOC_LARB1 0
|
||||
#define CLK_VDEC_SOC_LAT 1
|
||||
#define CLK_VDEC_SOC_LAT_ACTIVE 2
|
||||
#define CLK_VDEC_SOC_VDEC 3
|
||||
#define CLK_VDEC_SOC_VDEC_ACTIVE 4
|
||||
#define CLK_VDEC_SOC_NR_CLK 5
|
||||
|
||||
/* VDECSYS */
|
||||
|
||||
#define CLK_VDEC_LARB1 0
|
||||
#define CLK_VDEC_LAT 1
|
||||
#define CLK_VDEC_LAT_ACTIVE 2
|
||||
#define CLK_VDEC_VDEC 3
|
||||
#define CLK_VDEC_ACTIVE 4
|
||||
#define CLK_VDEC_NR_CLK 5
|
||||
|
||||
/* VENCSYS */
|
||||
|
||||
#define CLK_VENC_SET0_LARB 0
|
||||
#define CLK_VENC_SET1_VENC 1
|
||||
#define CLK_VENC_SET2_JPGENC 2
|
||||
#define CLK_VENC_SET5_GALS 3
|
||||
#define CLK_VENC_NR_CLK 4
|
||||
|
||||
/* CAMSYS */
|
||||
|
||||
#define CLK_CAM_LARB13 0
|
||||
#define CLK_CAM_DFP_VAD 1
|
||||
#define CLK_CAM_LARB14 2
|
||||
#define CLK_CAM_CAM 3
|
||||
#define CLK_CAM_CAMTG 4
|
||||
#define CLK_CAM_SENINF 5
|
||||
#define CLK_CAM_CAMSV0 6
|
||||
#define CLK_CAM_CAMSV1 7
|
||||
#define CLK_CAM_CAMSV2 8
|
||||
#define CLK_CAM_CAMSV3 9
|
||||
#define CLK_CAM_CCU0 10
|
||||
#define CLK_CAM_CCU1 11
|
||||
#define CLK_CAM_MRAW0 12
|
||||
#define CLK_CAM_FAKE_ENG 13
|
||||
#define CLK_CAM_CCU_GALS 14
|
||||
#define CLK_CAM_CAM2MM_GALS 15
|
||||
#define CLK_CAM_NR_CLK 16
|
||||
|
||||
/* CAMSYS_RAWA */
|
||||
|
||||
#define CLK_CAM_RAWA_LARBX 0
|
||||
#define CLK_CAM_RAWA_CAM 1
|
||||
#define CLK_CAM_RAWA_CAMTG 2
|
||||
#define CLK_CAM_RAWA_NR_CLK 3
|
||||
|
||||
/* CAMSYS_RAWB */
|
||||
|
||||
#define CLK_CAM_RAWB_LARBX 0
|
||||
#define CLK_CAM_RAWB_CAM 1
|
||||
#define CLK_CAM_RAWB_CAMTG 2
|
||||
#define CLK_CAM_RAWB_NR_CLK 3
|
||||
|
||||
/* CAMSYS_RAWC */
|
||||
|
||||
#define CLK_CAM_RAWC_LARBX 0
|
||||
#define CLK_CAM_RAWC_CAM 1
|
||||
#define CLK_CAM_RAWC_CAMTG 2
|
||||
#define CLK_CAM_RAWC_NR_CLK 3
|
||||
|
||||
/* IPESYS */
|
||||
|
||||
#define CLK_IPE_LARB19 0
|
||||
#define CLK_IPE_LARB20 1
|
||||
#define CLK_IPE_SMI_SUBCOM 2
|
||||
#define CLK_IPE_FD 3
|
||||
#define CLK_IPE_FE 4
|
||||
#define CLK_IPE_RSC 5
|
||||
#define CLK_IPE_DPE 6
|
||||
#define CLK_IPE_GALS 7
|
||||
#define CLK_IPE_NR_CLK 8
|
||||
|
||||
/* MDPSYS */
|
||||
|
||||
#define CLK_MDP_RDMA0 0
|
||||
#define CLK_MDP_TDSHP0 1
|
||||
#define CLK_MDP_IMG_DL_ASYNC0 2
|
||||
#define CLK_MDP_IMG_DL_ASYNC1 3
|
||||
#define CLK_MDP_RDMA1 4
|
||||
#define CLK_MDP_TDSHP1 5
|
||||
#define CLK_MDP_SMI0 6
|
||||
#define CLK_MDP_APB_BUS 7
|
||||
#define CLK_MDP_WROT0 8
|
||||
#define CLK_MDP_RSZ0 9
|
||||
#define CLK_MDP_HDR0 10
|
||||
#define CLK_MDP_MUTEX0 11
|
||||
#define CLK_MDP_WROT1 12
|
||||
#define CLK_MDP_RSZ1 13
|
||||
#define CLK_MDP_HDR1 14
|
||||
#define CLK_MDP_FAKE_ENG0 15
|
||||
#define CLK_MDP_AAL0 16
|
||||
#define CLK_MDP_AAL1 17
|
||||
#define CLK_MDP_COLOR0 18
|
||||
#define CLK_MDP_COLOR1 19
|
||||
#define CLK_MDP_IMG_DL_RELAY0_ASYNC0 20
|
||||
#define CLK_MDP_IMG_DL_RELAY1_ASYNC1 21
|
||||
#define CLK_MDP_NR_CLK 22
|
||||
|
||||
#endif /* _DT_BINDINGS_CLK_MT8192_H */
|
55
include/dt-bindings/clock/qcom,dispcc-sc7280.h
Normal file
55
include/dt-bindings/clock/qcom,dispcc-sc7280.h
Normal file
@ -0,0 +1,55 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_QCOM_DISP_CC_SC7280_H
|
||||
#define _DT_BINDINGS_CLK_QCOM_DISP_CC_SC7280_H
|
||||
|
||||
/* DISP_CC clocks */
|
||||
#define DISP_CC_PLL0 0
|
||||
#define DISP_CC_MDSS_AHB_CLK 1
|
||||
#define DISP_CC_MDSS_AHB_CLK_SRC 2
|
||||
#define DISP_CC_MDSS_BYTE0_CLK 3
|
||||
#define DISP_CC_MDSS_BYTE0_CLK_SRC 4
|
||||
#define DISP_CC_MDSS_BYTE0_DIV_CLK_SRC 5
|
||||
#define DISP_CC_MDSS_BYTE0_INTF_CLK 6
|
||||
#define DISP_CC_MDSS_DP_AUX_CLK 7
|
||||
#define DISP_CC_MDSS_DP_AUX_CLK_SRC 8
|
||||
#define DISP_CC_MDSS_DP_CRYPTO_CLK 9
|
||||
#define DISP_CC_MDSS_DP_CRYPTO_CLK_SRC 10
|
||||
#define DISP_CC_MDSS_DP_LINK_CLK 11
|
||||
#define DISP_CC_MDSS_DP_LINK_CLK_SRC 12
|
||||
#define DISP_CC_MDSS_DP_LINK_DIV_CLK_SRC 13
|
||||
#define DISP_CC_MDSS_DP_LINK_INTF_CLK 14
|
||||
#define DISP_CC_MDSS_DP_PIXEL_CLK 15
|
||||
#define DISP_CC_MDSS_DP_PIXEL_CLK_SRC 16
|
||||
#define DISP_CC_MDSS_EDP_AUX_CLK 17
|
||||
#define DISP_CC_MDSS_EDP_AUX_CLK_SRC 18
|
||||
#define DISP_CC_MDSS_EDP_LINK_CLK 19
|
||||
#define DISP_CC_MDSS_EDP_LINK_CLK_SRC 20
|
||||
#define DISP_CC_MDSS_EDP_LINK_DIV_CLK_SRC 21
|
||||
#define DISP_CC_MDSS_EDP_LINK_INTF_CLK 22
|
||||
#define DISP_CC_MDSS_EDP_PIXEL_CLK 23
|
||||
#define DISP_CC_MDSS_EDP_PIXEL_CLK_SRC 24
|
||||
#define DISP_CC_MDSS_ESC0_CLK 25
|
||||
#define DISP_CC_MDSS_ESC0_CLK_SRC 26
|
||||
#define DISP_CC_MDSS_MDP_CLK 27
|
||||
#define DISP_CC_MDSS_MDP_CLK_SRC 28
|
||||
#define DISP_CC_MDSS_MDP_LUT_CLK 29
|
||||
#define DISP_CC_MDSS_NON_GDSC_AHB_CLK 30
|
||||
#define DISP_CC_MDSS_PCLK0_CLK 31
|
||||
#define DISP_CC_MDSS_PCLK0_CLK_SRC 32
|
||||
#define DISP_CC_MDSS_ROT_CLK 33
|
||||
#define DISP_CC_MDSS_ROT_CLK_SRC 34
|
||||
#define DISP_CC_MDSS_RSCC_AHB_CLK 35
|
||||
#define DISP_CC_MDSS_RSCC_VSYNC_CLK 36
|
||||
#define DISP_CC_MDSS_VSYNC_CLK 37
|
||||
#define DISP_CC_MDSS_VSYNC_CLK_SRC 38
|
||||
#define DISP_CC_SLEEP_CLK 39
|
||||
#define DISP_CC_XO_CLK 40
|
||||
|
||||
/* DISP_CC power domains */
|
||||
#define DISP_CC_MDSS_CORE_GDSC 0
|
||||
|
||||
#endif
|
234
include/dt-bindings/clock/qcom,gcc-msm8953.h
Normal file
234
include/dt-bindings/clock/qcom,gcc-msm8953.h
Normal file
@ -0,0 +1,234 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_MSM_GCC_8953_H
|
||||
#define _DT_BINDINGS_CLK_MSM_GCC_8953_H
|
||||
|
||||
/* Clocks */
|
||||
#define APC0_DROOP_DETECTOR_CLK_SRC 0
|
||||
#define APC1_DROOP_DETECTOR_CLK_SRC 1
|
||||
#define APSS_AHB_CLK_SRC 2
|
||||
#define BLSP1_QUP1_I2C_APPS_CLK_SRC 3
|
||||
#define BLSP1_QUP1_SPI_APPS_CLK_SRC 4
|
||||
#define BLSP1_QUP2_I2C_APPS_CLK_SRC 5
|
||||
#define BLSP1_QUP2_SPI_APPS_CLK_SRC 6
|
||||
#define BLSP1_QUP3_I2C_APPS_CLK_SRC 7
|
||||
#define BLSP1_QUP3_SPI_APPS_CLK_SRC 8
|
||||
#define BLSP1_QUP4_I2C_APPS_CLK_SRC 9
|
||||
#define BLSP1_QUP4_SPI_APPS_CLK_SRC 10
|
||||
#define BLSP1_UART1_APPS_CLK_SRC 11
|
||||
#define BLSP1_UART2_APPS_CLK_SRC 12
|
||||
#define BLSP2_QUP1_I2C_APPS_CLK_SRC 13
|
||||
#define BLSP2_QUP1_SPI_APPS_CLK_SRC 14
|
||||
#define BLSP2_QUP2_I2C_APPS_CLK_SRC 15
|
||||
#define BLSP2_QUP2_SPI_APPS_CLK_SRC 16
|
||||
#define BLSP2_QUP3_I2C_APPS_CLK_SRC 17
|
||||
#define BLSP2_QUP3_SPI_APPS_CLK_SRC 18
|
||||
#define BLSP2_QUP4_I2C_APPS_CLK_SRC 19
|
||||
#define BLSP2_QUP4_SPI_APPS_CLK_SRC 20
|
||||
#define BLSP2_UART1_APPS_CLK_SRC 21
|
||||
#define BLSP2_UART2_APPS_CLK_SRC 22
|
||||
#define BYTE0_CLK_SRC 23
|
||||
#define BYTE1_CLK_SRC 24
|
||||
#define CAMSS_GP0_CLK_SRC 25
|
||||
#define CAMSS_GP1_CLK_SRC 26
|
||||
#define CAMSS_TOP_AHB_CLK_SRC 27
|
||||
#define CCI_CLK_SRC 28
|
||||
#define CPP_CLK_SRC 29
|
||||
#define CRYPTO_CLK_SRC 30
|
||||
#define CSI0PHYTIMER_CLK_SRC 31
|
||||
#define CSI0P_CLK_SRC 32
|
||||
#define CSI0_CLK_SRC 33
|
||||
#define CSI1PHYTIMER_CLK_SRC 34
|
||||
#define CSI1P_CLK_SRC 35
|
||||
#define CSI1_CLK_SRC 36
|
||||
#define CSI2PHYTIMER_CLK_SRC 37
|
||||
#define CSI2P_CLK_SRC 38
|
||||
#define CSI2_CLK_SRC 39
|
||||
#define ESC0_CLK_SRC 40
|
||||
#define ESC1_CLK_SRC 41
|
||||
#define GCC_APC0_DROOP_DETECTOR_GPLL0_CLK 42
|
||||
#define GCC_APC1_DROOP_DETECTOR_GPLL0_CLK 43
|
||||
#define GCC_APSS_AHB_CLK 44
|
||||
#define GCC_APSS_AXI_CLK 45
|
||||
#define GCC_APSS_TCU_ASYNC_CLK 46
|
||||
#define GCC_BIMC_GFX_CLK 47
|
||||
#define GCC_BIMC_GPU_CLK 48
|
||||
#define GCC_BLSP1_AHB_CLK 49
|
||||
#define GCC_BLSP1_QUP1_I2C_APPS_CLK 50
|
||||
#define GCC_BLSP1_QUP1_SPI_APPS_CLK 51
|
||||
#define GCC_BLSP1_QUP2_I2C_APPS_CLK 52
|
||||
#define GCC_BLSP1_QUP2_SPI_APPS_CLK 53
|
||||
#define GCC_BLSP1_QUP3_I2C_APPS_CLK 54
|
||||
#define GCC_BLSP1_QUP3_SPI_APPS_CLK 55
|
||||
#define GCC_BLSP1_QUP4_I2C_APPS_CLK 56
|
||||
#define GCC_BLSP1_QUP4_SPI_APPS_CLK 57
|
||||
#define GCC_BLSP1_UART1_APPS_CLK 58
|
||||
#define GCC_BLSP1_UART2_APPS_CLK 59
|
||||
#define GCC_BLSP2_AHB_CLK 60
|
||||
#define GCC_BLSP2_QUP1_I2C_APPS_CLK 61
|
||||
#define GCC_BLSP2_QUP1_SPI_APPS_CLK 62
|
||||
#define GCC_BLSP2_QUP2_I2C_APPS_CLK 63
|
||||
#define GCC_BLSP2_QUP2_SPI_APPS_CLK 64
|
||||
#define GCC_BLSP2_QUP3_I2C_APPS_CLK 65
|
||||
#define GCC_BLSP2_QUP3_SPI_APPS_CLK 66
|
||||
#define GCC_BLSP2_QUP4_I2C_APPS_CLK 67
|
||||
#define GCC_BLSP2_QUP4_SPI_APPS_CLK 68
|
||||
#define GCC_BLSP2_UART1_APPS_CLK 69
|
||||
#define GCC_BLSP2_UART2_APPS_CLK 70
|
||||
#define GCC_BOOT_ROM_AHB_CLK 71
|
||||
#define GCC_CAMSS_AHB_CLK 72
|
||||
#define GCC_CAMSS_CCI_AHB_CLK 73
|
||||
#define GCC_CAMSS_CCI_CLK 74
|
||||
#define GCC_CAMSS_CPP_AHB_CLK 75
|
||||
#define GCC_CAMSS_CPP_AXI_CLK 76
|
||||
#define GCC_CAMSS_CPP_CLK 77
|
||||
#define GCC_CAMSS_CSI0PHYTIMER_CLK 78
|
||||
#define GCC_CAMSS_CSI0PHY_CLK 79
|
||||
#define GCC_CAMSS_CSI0PIX_CLK 80
|
||||
#define GCC_CAMSS_CSI0RDI_CLK 81
|
||||
#define GCC_CAMSS_CSI0_AHB_CLK 82
|
||||
#define GCC_CAMSS_CSI0_CLK 83
|
||||
#define GCC_CAMSS_CSI0_CSIPHY_3P_CLK 84
|
||||
#define GCC_CAMSS_CSI1PHYTIMER_CLK 85
|
||||
#define GCC_CAMSS_CSI1PHY_CLK 86
|
||||
#define GCC_CAMSS_CSI1PIX_CLK 87
|
||||
#define GCC_CAMSS_CSI1RDI_CLK 88
|
||||
#define GCC_CAMSS_CSI1_AHB_CLK 89
|
||||
#define GCC_CAMSS_CSI1_CLK 90
|
||||
#define GCC_CAMSS_CSI1_CSIPHY_3P_CLK 91
|
||||
#define GCC_CAMSS_CSI2PHYTIMER_CLK 92
|
||||
#define GCC_CAMSS_CSI2PHY_CLK 93
|
||||
#define GCC_CAMSS_CSI2PIX_CLK 94
|
||||
#define GCC_CAMSS_CSI2RDI_CLK 95
|
||||
#define GCC_CAMSS_CSI2_AHB_CLK 96
|
||||
#define GCC_CAMSS_CSI2_CLK 97
|
||||
#define GCC_CAMSS_CSI2_CSIPHY_3P_CLK 98
|
||||
#define GCC_CAMSS_CSI_VFE0_CLK 99
|
||||
#define GCC_CAMSS_CSI_VFE1_CLK 100
|
||||
#define GCC_CAMSS_GP0_CLK 101
|
||||
#define GCC_CAMSS_GP1_CLK 102
|
||||
#define GCC_CAMSS_ISPIF_AHB_CLK 103
|
||||
#define GCC_CAMSS_JPEG0_CLK 104
|
||||
#define GCC_CAMSS_JPEG_AHB_CLK 105
|
||||
#define GCC_CAMSS_JPEG_AXI_CLK 106
|
||||
#define GCC_CAMSS_MCLK0_CLK 107
|
||||
#define GCC_CAMSS_MCLK1_CLK 108
|
||||
#define GCC_CAMSS_MCLK2_CLK 109
|
||||
#define GCC_CAMSS_MCLK3_CLK 110
|
||||
#define GCC_CAMSS_MICRO_AHB_CLK 111
|
||||
#define GCC_CAMSS_TOP_AHB_CLK 112
|
||||
#define GCC_CAMSS_VFE0_AHB_CLK 113
|
||||
#define GCC_CAMSS_VFE0_AXI_CLK 114
|
||||
#define GCC_CAMSS_VFE0_CLK 115
|
||||
#define GCC_CAMSS_VFE1_AHB_CLK 116
|
||||
#define GCC_CAMSS_VFE1_AXI_CLK 117
|
||||
#define GCC_CAMSS_VFE1_CLK 118
|
||||
#define GCC_CPP_TBU_CLK 119
|
||||
#define GCC_CRYPTO_AHB_CLK 120
|
||||
#define GCC_CRYPTO_AXI_CLK 121
|
||||
#define GCC_CRYPTO_CLK 122
|
||||
#define GCC_DCC_CLK 123
|
||||
#define GCC_GP1_CLK 124
|
||||
#define GCC_GP2_CLK 125
|
||||
#define GCC_GP3_CLK 126
|
||||
#define GCC_JPEG_TBU_CLK 127
|
||||
#define GCC_MDP_TBU_CLK 128
|
||||
#define GCC_MDSS_AHB_CLK 129
|
||||
#define GCC_MDSS_AXI_CLK 130
|
||||
#define GCC_MDSS_BYTE0_CLK 131
|
||||
#define GCC_MDSS_BYTE1_CLK 132
|
||||
#define GCC_MDSS_ESC0_CLK 133
|
||||
#define GCC_MDSS_ESC1_CLK 134
|
||||
#define GCC_MDSS_MDP_CLK 135
|
||||
#define GCC_MDSS_PCLK0_CLK 136
|
||||
#define GCC_MDSS_PCLK1_CLK 137
|
||||
#define GCC_MDSS_VSYNC_CLK 138
|
||||
#define GCC_MSS_CFG_AHB_CLK 139
|
||||
#define GCC_MSS_Q6_BIMC_AXI_CLK 140
|
||||
#define GCC_OXILI_AHB_CLK 141
|
||||
#define GCC_OXILI_AON_CLK 142
|
||||
#define GCC_OXILI_GFX3D_CLK 143
|
||||
#define GCC_OXILI_TIMER_CLK 144
|
||||
#define GCC_PCNOC_USB3_AXI_CLK 145
|
||||
#define GCC_PDM2_CLK 146
|
||||
#define GCC_PDM_AHB_CLK 147
|
||||
#define GCC_PRNG_AHB_CLK 148
|
||||
#define GCC_QDSS_DAP_CLK 149
|
||||
#define GCC_QUSB_REF_CLK 150
|
||||
#define GCC_RBCPR_GFX_CLK 151
|
||||
#define GCC_SDCC1_AHB_CLK 152
|
||||
#define GCC_SDCC1_APPS_CLK 153
|
||||
#define GCC_SDCC1_ICE_CORE_CLK 154
|
||||
#define GCC_SDCC2_AHB_CLK 155
|
||||
#define GCC_SDCC2_APPS_CLK 156
|
||||
#define GCC_SMMU_CFG_CLK 157
|
||||
#define GCC_USB30_MASTER_CLK 158
|
||||
#define GCC_USB30_MOCK_UTMI_CLK 159
|
||||
#define GCC_USB30_SLEEP_CLK 160
|
||||
#define GCC_USB3_AUX_CLK 161
|
||||
#define GCC_USB3_PIPE_CLK 162
|
||||
#define GCC_USB_PHY_CFG_AHB_CLK 163
|
||||
#define GCC_USB_SS_REF_CLK 164
|
||||
#define GCC_VENUS0_AHB_CLK 165
|
||||
#define GCC_VENUS0_AXI_CLK 166
|
||||
#define GCC_VENUS0_CORE0_VCODEC0_CLK 167
|
||||
#define GCC_VENUS0_VCODEC0_CLK 168
|
||||
#define GCC_VENUS_TBU_CLK 169
|
||||
#define GCC_VFE1_TBU_CLK 170
|
||||
#define GCC_VFE_TBU_CLK 171
|
||||
#define GFX3D_CLK_SRC 172
|
||||
#define GP1_CLK_SRC 173
|
||||
#define GP2_CLK_SRC 174
|
||||
#define GP3_CLK_SRC 175
|
||||
#define GPLL0 176
|
||||
#define GPLL0_EARLY 177
|
||||
#define GPLL2 178
|
||||
#define GPLL2_EARLY 179
|
||||
#define GPLL3 180
|
||||
#define GPLL3_EARLY 181
|
||||
#define GPLL4 182
|
||||
#define GPLL4_EARLY 183
|
||||
#define GPLL6 184
|
||||
#define GPLL6_EARLY 185
|
||||
#define JPEG0_CLK_SRC 186
|
||||
#define MCLK0_CLK_SRC 187
|
||||
#define MCLK1_CLK_SRC 188
|
||||
#define MCLK2_CLK_SRC 189
|
||||
#define MCLK3_CLK_SRC 190
|
||||
#define MDP_CLK_SRC 191
|
||||
#define PCLK0_CLK_SRC 192
|
||||
#define PCLK1_CLK_SRC 193
|
||||
#define PDM2_CLK_SRC 194
|
||||
#define RBCPR_GFX_CLK_SRC 195
|
||||
#define SDCC1_APPS_CLK_SRC 196
|
||||
#define SDCC1_ICE_CORE_CLK_SRC 197
|
||||
#define SDCC2_APPS_CLK_SRC 198
|
||||
#define USB30_MASTER_CLK_SRC 199
|
||||
#define USB30_MOCK_UTMI_CLK_SRC 200
|
||||
#define USB3_AUX_CLK_SRC 201
|
||||
#define VCODEC0_CLK_SRC 202
|
||||
#define VFE0_CLK_SRC 203
|
||||
#define VFE1_CLK_SRC 204
|
||||
#define VSYNC_CLK_SRC 205
|
||||
|
||||
/* GCC block resets */
|
||||
#define GCC_CAMSS_MICRO_BCR 0
|
||||
#define GCC_MSS_BCR 1
|
||||
#define GCC_QUSB2_PHY_BCR 2
|
||||
#define GCC_USB3PHY_PHY_BCR 3
|
||||
#define GCC_USB3_PHY_BCR 4
|
||||
#define GCC_USB_30_BCR 5
|
||||
|
||||
/* GDSCs */
|
||||
#define CPP_GDSC 0
|
||||
#define JPEG_GDSC 1
|
||||
#define MDSS_GDSC 2
|
||||
#define OXILI_CX_GDSC 3
|
||||
#define OXILI_GX_GDSC 4
|
||||
#define USB30_GDSC 5
|
||||
#define VENUS_CORE0_GDSC 6
|
||||
#define VENUS_GDSC 7
|
||||
#define VFE0_GDSC 8
|
||||
#define VFE1_GDSC 9
|
||||
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
201
include/dt-bindings/clock/qcom,gcc-sm6115.h
Normal file
201
include/dt-bindings/clock/qcom,gcc-sm6115.h
Normal file
@ -0,0 +1,201 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_QCOM_GCC_SM6115_H
|
||||
#define _DT_BINDINGS_CLK_QCOM_GCC_SM6115_H
|
||||
|
||||
/* GCC clocks */
|
||||
#define GPLL0 0
|
||||
#define GPLL0_OUT_AUX2 1
|
||||
#define GPLL0_OUT_MAIN 2
|
||||
#define GPLL10 3
|
||||
#define GPLL10_OUT_MAIN 4
|
||||
#define GPLL11 5
|
||||
#define GPLL11_OUT_MAIN 6
|
||||
#define GPLL3 7
|
||||
#define GPLL4 8
|
||||
#define GPLL4_OUT_MAIN 9
|
||||
#define GPLL6 10
|
||||
#define GPLL6_OUT_MAIN 11
|
||||
#define GPLL7 12
|
||||
#define GPLL7_OUT_MAIN 13
|
||||
#define GPLL8 14
|
||||
#define GPLL8_OUT_MAIN 15
|
||||
#define GPLL9 16
|
||||
#define GPLL9_OUT_MAIN 17
|
||||
#define GCC_CAMSS_CSI0PHYTIMER_CLK 18
|
||||
#define GCC_CAMSS_CSI0PHYTIMER_CLK_SRC 19
|
||||
#define GCC_CAMSS_CSI1PHYTIMER_CLK 20
|
||||
#define GCC_CAMSS_CSI1PHYTIMER_CLK_SRC 21
|
||||
#define GCC_CAMSS_CSI2PHYTIMER_CLK 22
|
||||
#define GCC_CAMSS_CSI2PHYTIMER_CLK_SRC 23
|
||||
#define GCC_CAMSS_MCLK0_CLK 24
|
||||
#define GCC_CAMSS_MCLK0_CLK_SRC 25
|
||||
#define GCC_CAMSS_MCLK1_CLK 26
|
||||
#define GCC_CAMSS_MCLK1_CLK_SRC 27
|
||||
#define GCC_CAMSS_MCLK2_CLK 28
|
||||
#define GCC_CAMSS_MCLK2_CLK_SRC 29
|
||||
#define GCC_CAMSS_MCLK3_CLK 30
|
||||
#define GCC_CAMSS_MCLK3_CLK_SRC 31
|
||||
#define GCC_CAMSS_NRT_AXI_CLK 32
|
||||
#define GCC_CAMSS_OPE_AHB_CLK 33
|
||||
#define GCC_CAMSS_OPE_AHB_CLK_SRC 34
|
||||
#define GCC_CAMSS_OPE_CLK 35
|
||||
#define GCC_CAMSS_OPE_CLK_SRC 36
|
||||
#define GCC_CAMSS_RT_AXI_CLK 37
|
||||
#define GCC_CAMSS_TFE_0_CLK 38
|
||||
#define GCC_CAMSS_TFE_0_CLK_SRC 39
|
||||
#define GCC_CAMSS_TFE_0_CPHY_RX_CLK 40
|
||||
#define GCC_CAMSS_TFE_0_CSID_CLK 41
|
||||
#define GCC_CAMSS_TFE_0_CSID_CLK_SRC 42
|
||||
#define GCC_CAMSS_TFE_1_CLK 43
|
||||
#define GCC_CAMSS_TFE_1_CLK_SRC 44
|
||||
#define GCC_CAMSS_TFE_1_CPHY_RX_CLK 45
|
||||
#define GCC_CAMSS_TFE_1_CSID_CLK 46
|
||||
#define GCC_CAMSS_TFE_1_CSID_CLK_SRC 47
|
||||
#define GCC_CAMSS_TFE_2_CLK 48
|
||||
#define GCC_CAMSS_TFE_2_CLK_SRC 49
|
||||
#define GCC_CAMSS_TFE_2_CPHY_RX_CLK 50
|
||||
#define GCC_CAMSS_TFE_2_CSID_CLK 51
|
||||
#define GCC_CAMSS_TFE_2_CSID_CLK_SRC 52
|
||||
#define GCC_CAMSS_TFE_CPHY_RX_CLK_SRC 53
|
||||
#define GCC_CAMSS_TOP_AHB_CLK 54
|
||||
#define GCC_CAMSS_TOP_AHB_CLK_SRC 55
|
||||
#define GCC_CFG_NOC_USB3_PRIM_AXI_CLK 56
|
||||
#define GCC_CPUSS_AHB_CLK 57
|
||||
#define GCC_CPUSS_GNOC_CLK 60
|
||||
#define GCC_DISP_AHB_CLK 61
|
||||
#define GCC_DISP_GPLL0_DIV_CLK_SRC 62
|
||||
#define GCC_DISP_HF_AXI_CLK 63
|
||||
#define GCC_DISP_THROTTLE_CORE_CLK 64
|
||||
#define GCC_DISP_XO_CLK 65
|
||||
#define GCC_GP1_CLK 66
|
||||
#define GCC_GP1_CLK_SRC 67
|
||||
#define GCC_GP2_CLK 68
|
||||
#define GCC_GP2_CLK_SRC 69
|
||||
#define GCC_GP3_CLK 70
|
||||
#define GCC_GP3_CLK_SRC 71
|
||||
#define GCC_GPU_CFG_AHB_CLK 72
|
||||
#define GCC_GPU_GPLL0_CLK_SRC 73
|
||||
#define GCC_GPU_GPLL0_DIV_CLK_SRC 74
|
||||
#define GCC_GPU_IREF_CLK 75
|
||||
#define GCC_GPU_MEMNOC_GFX_CLK 76
|
||||
#define GCC_GPU_SNOC_DVM_GFX_CLK 77
|
||||
#define GCC_GPU_THROTTLE_CORE_CLK 78
|
||||
#define GCC_GPU_THROTTLE_XO_CLK 79
|
||||
#define GCC_PDM2_CLK 80
|
||||
#define GCC_PDM2_CLK_SRC 81
|
||||
#define GCC_PDM_AHB_CLK 82
|
||||
#define GCC_PDM_XO4_CLK 83
|
||||
#define GCC_PRNG_AHB_CLK 84
|
||||
#define GCC_QMIP_CAMERA_NRT_AHB_CLK 85
|
||||
#define GCC_QMIP_CAMERA_RT_AHB_CLK 86
|
||||
#define GCC_QMIP_DISP_AHB_CLK 87
|
||||
#define GCC_QMIP_GPU_CFG_AHB_CLK 88
|
||||
#define GCC_QMIP_VIDEO_VCODEC_AHB_CLK 89
|
||||
#define GCC_QUPV3_WRAP0_CORE_2X_CLK 90
|
||||
#define GCC_QUPV3_WRAP0_CORE_CLK 91
|
||||
#define GCC_QUPV3_WRAP0_S0_CLK 92
|
||||
#define GCC_QUPV3_WRAP0_S0_CLK_SRC 93
|
||||
#define GCC_QUPV3_WRAP0_S1_CLK 94
|
||||
#define GCC_QUPV3_WRAP0_S1_CLK_SRC 95
|
||||
#define GCC_QUPV3_WRAP0_S2_CLK 96
|
||||
#define GCC_QUPV3_WRAP0_S2_CLK_SRC 97
|
||||
#define GCC_QUPV3_WRAP0_S3_CLK 98
|
||||
#define GCC_QUPV3_WRAP0_S3_CLK_SRC 99
|
||||
#define GCC_QUPV3_WRAP0_S4_CLK 100
|
||||
#define GCC_QUPV3_WRAP0_S4_CLK_SRC 101
|
||||
#define GCC_QUPV3_WRAP0_S5_CLK 102
|
||||
#define GCC_QUPV3_WRAP0_S5_CLK_SRC 103
|
||||
#define GCC_QUPV3_WRAP_0_M_AHB_CLK 104
|
||||
#define GCC_QUPV3_WRAP_0_S_AHB_CLK 105
|
||||
#define GCC_SDCC1_AHB_CLK 106
|
||||
#define GCC_SDCC1_APPS_CLK 107
|
||||
#define GCC_SDCC1_APPS_CLK_SRC 108
|
||||
#define GCC_SDCC1_ICE_CORE_CLK 109
|
||||
#define GCC_SDCC1_ICE_CORE_CLK_SRC 110
|
||||
#define GCC_SDCC2_AHB_CLK 111
|
||||
#define GCC_SDCC2_APPS_CLK 112
|
||||
#define GCC_SDCC2_APPS_CLK_SRC 113
|
||||
#define GCC_SYS_NOC_CPUSS_AHB_CLK 114
|
||||
#define GCC_SYS_NOC_UFS_PHY_AXI_CLK 115
|
||||
#define GCC_SYS_NOC_USB3_PRIM_AXI_CLK 116
|
||||
#define GCC_UFS_PHY_AHB_CLK 117
|
||||
#define GCC_UFS_PHY_AXI_CLK 118
|
||||
#define GCC_UFS_PHY_AXI_CLK_SRC 119
|
||||
#define GCC_UFS_PHY_ICE_CORE_CLK 120
|
||||
#define GCC_UFS_PHY_ICE_CORE_CLK_SRC 121
|
||||
#define GCC_UFS_PHY_PHY_AUX_CLK 122
|
||||
#define GCC_UFS_PHY_PHY_AUX_CLK_SRC 123
|
||||
#define GCC_UFS_PHY_RX_SYMBOL_0_CLK 124
|
||||
#define GCC_UFS_PHY_TX_SYMBOL_0_CLK 125
|
||||
#define GCC_UFS_PHY_UNIPRO_CORE_CLK 126
|
||||
#define GCC_UFS_PHY_UNIPRO_CORE_CLK_SRC 127
|
||||
#define GCC_USB30_PRIM_MASTER_CLK 128
|
||||
#define GCC_USB30_PRIM_MASTER_CLK_SRC 129
|
||||
#define GCC_USB30_PRIM_MOCK_UTMI_CLK 130
|
||||
#define GCC_USB30_PRIM_MOCK_UTMI_CLK_SRC 131
|
||||
#define GCC_USB30_PRIM_MOCK_UTMI_POSTDIV_CLK_SRC 132
|
||||
#define GCC_USB30_PRIM_SLEEP_CLK 133
|
||||
#define GCC_USB3_PRIM_CLKREF_CLK 134
|
||||
#define GCC_USB3_PRIM_PHY_AUX_CLK_SRC 135
|
||||
#define GCC_USB3_PRIM_PHY_COM_AUX_CLK 136
|
||||
#define GCC_USB3_PRIM_PHY_PIPE_CLK 137
|
||||
#define GCC_VCODEC0_AXI_CLK 138
|
||||
#define GCC_VENUS_AHB_CLK 139
|
||||
#define GCC_VENUS_CTL_AXI_CLK 140
|
||||
#define GCC_VIDEO_AHB_CLK 141
|
||||
#define GCC_VIDEO_AXI0_CLK 142
|
||||
#define GCC_VIDEO_THROTTLE_CORE_CLK 143
|
||||
#define GCC_VIDEO_VCODEC0_SYS_CLK 144
|
||||
#define GCC_VIDEO_VENUS_CLK_SRC 145
|
||||
#define GCC_VIDEO_VENUS_CTL_CLK 146
|
||||
#define GCC_VIDEO_XO_CLK 147
|
||||
#define GCC_AHB2PHY_CSI_CLK 148
|
||||
#define GCC_AHB2PHY_USB_CLK 149
|
||||
#define GCC_BIMC_GPU_AXI_CLK 150
|
||||
#define GCC_BOOT_ROM_AHB_CLK 151
|
||||
#define GCC_CAM_THROTTLE_NRT_CLK 152
|
||||
#define GCC_CAM_THROTTLE_RT_CLK 153
|
||||
#define GCC_CAMERA_AHB_CLK 154
|
||||
#define GCC_CAMERA_XO_CLK 155
|
||||
#define GCC_CAMSS_AXI_CLK 156
|
||||
#define GCC_CAMSS_AXI_CLK_SRC 157
|
||||
#define GCC_CAMSS_CAMNOC_ATB_CLK 158
|
||||
#define GCC_CAMSS_CAMNOC_NTS_XO_CLK 159
|
||||
#define GCC_CAMSS_CCI_0_CLK 160
|
||||
#define GCC_CAMSS_CCI_CLK_SRC 161
|
||||
#define GCC_CAMSS_CPHY_0_CLK 162
|
||||
#define GCC_CAMSS_CPHY_1_CLK 163
|
||||
#define GCC_CAMSS_CPHY_2_CLK 164
|
||||
#define GCC_UFS_CLKREF_CLK 165
|
||||
#define GCC_DISP_GPLL0_CLK_SRC 166
|
||||
|
||||
/* GCC resets */
|
||||
#define GCC_QUSB2PHY_PRIM_BCR 0
|
||||
#define GCC_QUSB2PHY_SEC_BCR 1
|
||||
#define GCC_SDCC1_BCR 2
|
||||
#define GCC_UFS_PHY_BCR 3
|
||||
#define GCC_USB30_PRIM_BCR 4
|
||||
#define GCC_USB_PHY_CFG_AHB2PHY_BCR 5
|
||||
#define GCC_VCODEC0_BCR 6
|
||||
#define GCC_VENUS_BCR 7
|
||||
#define GCC_VIDEO_INTERFACE_BCR 8
|
||||
#define GCC_USB3PHY_PHY_PRIM_SP0_BCR 9
|
||||
#define GCC_USB3_PHY_PRIM_SP0_BCR 10
|
||||
#define GCC_SDCC2_BCR 11
|
||||
|
||||
/* Indexes for GDSCs */
|
||||
#define GCC_CAMSS_TOP_GDSC 0
|
||||
#define GCC_UFS_PHY_GDSC 1
|
||||
#define GCC_USB30_PRIM_GDSC 2
|
||||
#define GCC_VCODEC0_GDSC 3
|
||||
#define GCC_VENUS_GDSC 4
|
||||
#define HLOS1_VOTE_TURING_MMU_TBU1_GDSC 5
|
||||
#define HLOS1_VOTE_TURING_MMU_TBU0_GDSC 6
|
||||
#define HLOS1_VOTE_MM_SNOC_MMU_TBU_RT_GDSC 7
|
||||
#define HLOS1_VOTE_MM_SNOC_MMU_TBU_NRT_GDSC 8
|
||||
|
||||
#endif
|
178
include/dt-bindings/clock/qcom,gcc-sm6350.h
Normal file
178
include/dt-bindings/clock/qcom,gcc-sm6350.h
Normal file
@ -0,0 +1,178 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_QCOM_GCC_SM6350_H
|
||||
#define _DT_BINDINGS_CLK_QCOM_GCC_SM6350_H
|
||||
|
||||
/* GCC clocks */
|
||||
#define GPLL0 0
|
||||
#define GPLL0_OUT_EVEN 1
|
||||
#define GPLL0_OUT_ODD 2
|
||||
#define GPLL6 3
|
||||
#define GPLL6_OUT_EVEN 4
|
||||
#define GPLL7 5
|
||||
#define GCC_AGGRE_CNOC_PERIPH_CENTER_AHB_CLK 6
|
||||
#define GCC_AGGRE_NOC_CENTER_AHB_CLK 7
|
||||
#define GCC_AGGRE_NOC_PCIE_SF_AXI_CLK 8
|
||||
#define GCC_AGGRE_NOC_PCIE_TBU_CLK 9
|
||||
#define GCC_AGGRE_NOC_WLAN_AXI_CLK 10
|
||||
#define GCC_AGGRE_UFS_PHY_AXI_CLK 11
|
||||
#define GCC_AGGRE_USB3_PRIM_AXI_CLK 12
|
||||
#define GCC_BOOT_ROM_AHB_CLK 13
|
||||
#define GCC_CAMERA_AHB_CLK 14
|
||||
#define GCC_CAMERA_AXI_CLK 15
|
||||
#define GCC_CAMERA_THROTTLE_NRT_AXI_CLK 16
|
||||
#define GCC_CAMERA_THROTTLE_RT_AXI_CLK 17
|
||||
#define GCC_CAMERA_XO_CLK 18
|
||||
#define GCC_CE1_AHB_CLK 19
|
||||
#define GCC_CE1_AXI_CLK 20
|
||||
#define GCC_CE1_CLK 21
|
||||
#define GCC_CFG_NOC_USB3_PRIM_AXI_CLK 22
|
||||
#define GCC_CPUSS_AHB_CLK 23
|
||||
#define GCC_CPUSS_AHB_CLK_SRC 24
|
||||
#define GCC_CPUSS_AHB_DIV_CLK_SRC 25
|
||||
#define GCC_CPUSS_GNOC_CLK 26
|
||||
#define GCC_CPUSS_RBCPR_CLK 27
|
||||
#define GCC_DDRSS_GPU_AXI_CLK 28
|
||||
#define GCC_DISP_AHB_CLK 29
|
||||
#define GCC_DISP_AXI_CLK 30
|
||||
#define GCC_DISP_CC_SLEEP_CLK 31
|
||||
#define GCC_DISP_CC_XO_CLK 32
|
||||
#define GCC_DISP_GPLL0_CLK 33
|
||||
#define GCC_DISP_THROTTLE_AXI_CLK 34
|
||||
#define GCC_DISP_XO_CLK 35
|
||||
#define GCC_GP1_CLK 36
|
||||
#define GCC_GP1_CLK_SRC 37
|
||||
#define GCC_GP2_CLK 38
|
||||
#define GCC_GP2_CLK_SRC 39
|
||||
#define GCC_GP3_CLK 40
|
||||
#define GCC_GP3_CLK_SRC 41
|
||||
#define GCC_GPU_CFG_AHB_CLK 42
|
||||
#define GCC_GPU_GPLL0_CLK 43
|
||||
#define GCC_GPU_GPLL0_DIV_CLK 44
|
||||
#define GCC_GPU_MEMNOC_GFX_CLK 45
|
||||
#define GCC_GPU_SNOC_DVM_GFX_CLK 46
|
||||
#define GCC_NPU_AXI_CLK 47
|
||||
#define GCC_NPU_BWMON_AXI_CLK 48
|
||||
#define GCC_NPU_BWMON_DMA_CFG_AHB_CLK 49
|
||||
#define GCC_NPU_BWMON_DSP_CFG_AHB_CLK 50
|
||||
#define GCC_NPU_CFG_AHB_CLK 51
|
||||
#define GCC_NPU_DMA_CLK 52
|
||||
#define GCC_NPU_GPLL0_CLK 53
|
||||
#define GCC_NPU_GPLL0_DIV_CLK 54
|
||||
#define GCC_PCIE_0_AUX_CLK 55
|
||||
#define GCC_PCIE_0_AUX_CLK_SRC 56
|
||||
#define GCC_PCIE_0_CFG_AHB_CLK 57
|
||||
#define GCC_PCIE_0_MSTR_AXI_CLK 58
|
||||
#define GCC_PCIE_0_PIPE_CLK 59
|
||||
#define GCC_PCIE_0_SLV_AXI_CLK 60
|
||||
#define GCC_PCIE_0_SLV_Q2A_AXI_CLK 61
|
||||
#define GCC_PCIE_PHY_RCHNG_CLK 62
|
||||
#define GCC_PCIE_PHY_RCHNG_CLK_SRC 63
|
||||
#define GCC_PDM2_CLK 64
|
||||
#define GCC_PDM2_CLK_SRC 65
|
||||
#define GCC_PDM_AHB_CLK 66
|
||||
#define GCC_PDM_XO4_CLK 67
|
||||
#define GCC_PRNG_AHB_CLK 68
|
||||
#define GCC_QUPV3_WRAP0_CORE_2X_CLK 69
|
||||
#define GCC_QUPV3_WRAP0_CORE_CLK 70
|
||||
#define GCC_QUPV3_WRAP0_S0_CLK 71
|
||||
#define GCC_QUPV3_WRAP0_S0_CLK_SRC 72
|
||||
#define GCC_QUPV3_WRAP0_S1_CLK 73
|
||||
#define GCC_QUPV3_WRAP0_S1_CLK_SRC 74
|
||||
#define GCC_QUPV3_WRAP0_S2_CLK 75
|
||||
#define GCC_QUPV3_WRAP0_S2_CLK_SRC 76
|
||||
#define GCC_QUPV3_WRAP0_S3_CLK 77
|
||||
#define GCC_QUPV3_WRAP0_S3_CLK_SRC 78
|
||||
#define GCC_QUPV3_WRAP0_S4_CLK 79
|
||||
#define GCC_QUPV3_WRAP0_S4_CLK_SRC 80
|
||||
#define GCC_QUPV3_WRAP0_S5_CLK 81
|
||||
#define GCC_QUPV3_WRAP0_S5_CLK_SRC 82
|
||||
#define GCC_QUPV3_WRAP1_CORE_2X_CLK 83
|
||||
#define GCC_QUPV3_WRAP1_CORE_CLK 84
|
||||
#define GCC_QUPV3_WRAP1_S0_CLK 85
|
||||
#define GCC_QUPV3_WRAP1_S0_CLK_SRC 86
|
||||
#define GCC_QUPV3_WRAP1_S1_CLK 87
|
||||
#define GCC_QUPV3_WRAP1_S1_CLK_SRC 88
|
||||
#define GCC_QUPV3_WRAP1_S2_CLK 89
|
||||
#define GCC_QUPV3_WRAP1_S2_CLK_SRC 90
|
||||
#define GCC_QUPV3_WRAP1_S3_CLK 91
|
||||
#define GCC_QUPV3_WRAP1_S3_CLK_SRC 92
|
||||
#define GCC_QUPV3_WRAP1_S4_CLK 93
|
||||
#define GCC_QUPV3_WRAP1_S4_CLK_SRC 94
|
||||
#define GCC_QUPV3_WRAP1_S5_CLK 95
|
||||
#define GCC_QUPV3_WRAP1_S5_CLK_SRC 96
|
||||
#define GCC_QUPV3_WRAP_0_M_AHB_CLK 97
|
||||
#define GCC_QUPV3_WRAP_0_S_AHB_CLK 98
|
||||
#define GCC_QUPV3_WRAP_1_M_AHB_CLK 99
|
||||
#define GCC_QUPV3_WRAP_1_S_AHB_CLK 100
|
||||
#define GCC_SDCC1_AHB_CLK 101
|
||||
#define GCC_SDCC1_APPS_CLK 102
|
||||
#define GCC_SDCC1_APPS_CLK_SRC 103
|
||||
#define GCC_SDCC1_ICE_CORE_CLK 104
|
||||
#define GCC_SDCC1_ICE_CORE_CLK_SRC 105
|
||||
#define GCC_SDCC2_AHB_CLK 106
|
||||
#define GCC_SDCC2_APPS_CLK 107
|
||||
#define GCC_SDCC2_APPS_CLK_SRC 108
|
||||
#define GCC_SYS_NOC_CPUSS_AHB_CLK 109
|
||||
#define GCC_UFS_MEM_CLKREF_CLK 110
|
||||
#define GCC_UFS_PHY_AHB_CLK 111
|
||||
#define GCC_UFS_PHY_AXI_CLK 112
|
||||
#define GCC_UFS_PHY_AXI_CLK_SRC 113
|
||||
#define GCC_UFS_PHY_ICE_CORE_CLK 114
|
||||
#define GCC_UFS_PHY_ICE_CORE_CLK_SRC 115
|
||||
#define GCC_UFS_PHY_PHY_AUX_CLK 116
|
||||
#define GCC_UFS_PHY_PHY_AUX_CLK_SRC 117
|
||||
#define GCC_UFS_PHY_RX_SYMBOL_0_CLK 118
|
||||
#define GCC_UFS_PHY_RX_SYMBOL_1_CLK 119
|
||||
#define GCC_UFS_PHY_TX_SYMBOL_0_CLK 120
|
||||
#define GCC_UFS_PHY_UNIPRO_CORE_CLK 121
|
||||
#define GCC_UFS_PHY_UNIPRO_CORE_CLK_SRC 122
|
||||
#define GCC_USB30_PRIM_MASTER_CLK 123
|
||||
#define GCC_USB30_PRIM_MASTER_CLK_SRC 124
|
||||
#define GCC_USB30_PRIM_MOCK_UTMI_CLK 125
|
||||
#define GCC_USB30_PRIM_MOCK_UTMI_CLK_SRC 126
|
||||
#define GCC_USB30_PRIM_MOCK_UTMI_DIV_CLK_SRC 127
|
||||
#define GCC_USB3_PRIM_CLKREF_CLK 128
|
||||
#define GCC_USB30_PRIM_SLEEP_CLK 129
|
||||
#define GCC_USB3_PRIM_PHY_AUX_CLK 130
|
||||
#define GCC_USB3_PRIM_PHY_AUX_CLK_SRC 131
|
||||
#define GCC_USB3_PRIM_PHY_COM_AUX_CLK 132
|
||||
#define GCC_USB3_PRIM_PHY_PIPE_CLK 133
|
||||
#define GCC_VIDEO_AHB_CLK 134
|
||||
#define GCC_VIDEO_AXI_CLK 135
|
||||
#define GCC_VIDEO_THROTTLE_AXI_CLK 136
|
||||
#define GCC_VIDEO_XO_CLK 137
|
||||
#define GCC_UFS_PHY_PHY_AUX_HW_CTL_CLK 138
|
||||
#define GCC_UFS_PHY_AXI_HW_CTL_CLK 139
|
||||
#define GCC_AGGRE_UFS_PHY_AXI_HW_CTL_CLK 140
|
||||
#define GCC_UFS_PHY_UNIPRO_CORE_HW_CTL_CLK 141
|
||||
#define GCC_UFS_PHY_ICE_CORE_HW_CTL_CLK 142
|
||||
#define GCC_RX5_PCIE_CLKREF_CLK 143
|
||||
#define GCC_GPU_GPLL0_MAIN_DIV_CLK_SRC 144
|
||||
#define GCC_NPU_PLL0_MAIN_DIV_CLK_SRC 145
|
||||
|
||||
/* GCC resets */
|
||||
#define GCC_QUSB2PHY_PRIM_BCR 0
|
||||
#define GCC_QUSB2PHY_SEC_BCR 1
|
||||
#define GCC_SDCC1_BCR 2
|
||||
#define GCC_SDCC2_BCR 3
|
||||
#define GCC_UFS_PHY_BCR 4
|
||||
#define GCC_USB30_PRIM_BCR 5
|
||||
#define GCC_PCIE_0_BCR 6
|
||||
#define GCC_PCIE_0_PHY_BCR 7
|
||||
#define GCC_QUPV3_WRAPPER_0_BCR 8
|
||||
#define GCC_QUPV3_WRAPPER_1_BCR 9
|
||||
#define GCC_USB3_PHY_PRIM_BCR 10
|
||||
#define GCC_USB3_DP_PHY_PRIM_BCR 11
|
||||
|
||||
/* GCC GDSCs */
|
||||
#define USB30_PRIM_GDSC 0
|
||||
#define UFS_PHY_GDSC 1
|
||||
#define HLOS1_VOTE_MMNOC_MMU_TBU_HF0_GDSC 2
|
||||
#define HLOS1_VOTE_MMNOC_MMU_TBU_HF1_GDSC 3
|
||||
|
||||
#endif
|
35
include/dt-bindings/clock/qcom,gpucc-sc7280.h
Normal file
35
include/dt-bindings/clock/qcom,gpucc-sc7280.h
Normal file
@ -0,0 +1,35 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_QCOM_GPU_CC_SC7280_H
|
||||
#define _DT_BINDINGS_CLK_QCOM_GPU_CC_SC7280_H
|
||||
|
||||
/* GPU_CC clocks */
|
||||
#define GPU_CC_PLL0 0
|
||||
#define GPU_CC_PLL1 1
|
||||
#define GPU_CC_AHB_CLK 2
|
||||
#define GPU_CC_CB_CLK 3
|
||||
#define GPU_CC_CRC_AHB_CLK 4
|
||||
#define GPU_CC_CX_GMU_CLK 5
|
||||
#define GPU_CC_CX_SNOC_DVM_CLK 6
|
||||
#define GPU_CC_CXO_AON_CLK 7
|
||||
#define GPU_CC_CXO_CLK 8
|
||||
#define GPU_CC_GMU_CLK_SRC 9
|
||||
#define GPU_CC_GX_GMU_CLK 10
|
||||
#define GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK 11
|
||||
#define GPU_CC_HUB_AHB_DIV_CLK_SRC 12
|
||||
#define GPU_CC_HUB_AON_CLK 13
|
||||
#define GPU_CC_HUB_CLK_SRC 14
|
||||
#define GPU_CC_HUB_CX_INT_CLK 15
|
||||
#define GPU_CC_HUB_CX_INT_DIV_CLK_SRC 16
|
||||
#define GPU_CC_MND1X_0_GFX3D_CLK 17
|
||||
#define GPU_CC_MND1X_1_GFX3D_CLK 18
|
||||
#define GPU_CC_SLEEP_CLK 19
|
||||
|
||||
/* GPU_CC power domains */
|
||||
#define GPU_CC_CX_GDSC 0
|
||||
#define GPU_CC_GX_GDSC 1
|
||||
|
||||
#endif
|
155
include/dt-bindings/clock/qcom,mmcc-msm8994.h
Normal file
155
include/dt-bindings/clock/qcom,mmcc-msm8994.h
Normal file
@ -0,0 +1,155 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2020, Konrad Dybcio
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_MSM_MMCC_8994_H
|
||||
#define _DT_BINDINGS_CLK_MSM_MMCC_8994_H
|
||||
|
||||
/* Clocks */
|
||||
#define MMPLL0_EARLY 0
|
||||
#define MMPLL0_PLL 1
|
||||
#define MMPLL1_EARLY 2
|
||||
#define MMPLL1_PLL 3
|
||||
#define MMPLL3_EARLY 4
|
||||
#define MMPLL3_PLL 5
|
||||
#define MMPLL4_EARLY 6
|
||||
#define MMPLL4_PLL 7
|
||||
#define MMPLL5_EARLY 8
|
||||
#define MMPLL5_PLL 9
|
||||
#define AXI_CLK_SRC 10
|
||||
#define RBBMTIMER_CLK_SRC 11
|
||||
#define PCLK0_CLK_SRC 12
|
||||
#define PCLK1_CLK_SRC 13
|
||||
#define MDP_CLK_SRC 14
|
||||
#define VSYNC_CLK_SRC 15
|
||||
#define BYTE0_CLK_SRC 16
|
||||
#define BYTE1_CLK_SRC 17
|
||||
#define ESC0_CLK_SRC 18
|
||||
#define ESC1_CLK_SRC 19
|
||||
#define MDSS_AHB_CLK 20
|
||||
#define MDSS_PCLK0_CLK 21
|
||||
#define MDSS_PCLK1_CLK 22
|
||||
#define MDSS_VSYNC_CLK 23
|
||||
#define MDSS_BYTE0_CLK 24
|
||||
#define MDSS_BYTE1_CLK 25
|
||||
#define MDSS_ESC0_CLK 26
|
||||
#define MDSS_ESC1_CLK 27
|
||||
#define CSI0_CLK_SRC 28
|
||||
#define CSI1_CLK_SRC 29
|
||||
#define CSI2_CLK_SRC 30
|
||||
#define CSI3_CLK_SRC 31
|
||||
#define VFE0_CLK_SRC 32
|
||||
#define VFE1_CLK_SRC 33
|
||||
#define CPP_CLK_SRC 34
|
||||
#define JPEG0_CLK_SRC 35
|
||||
#define JPEG1_CLK_SRC 36
|
||||
#define JPEG2_CLK_SRC 37
|
||||
#define CSI2PHYTIMER_CLK_SRC 38
|
||||
#define FD_CORE_CLK_SRC 39
|
||||
#define OCMEMNOC_CLK_SRC 40
|
||||
#define CCI_CLK_SRC 41
|
||||
#define MMSS_GP0_CLK_SRC 42
|
||||
#define MMSS_GP1_CLK_SRC 43
|
||||
#define JPEG_DMA_CLK_SRC 44
|
||||
#define MCLK0_CLK_SRC 45
|
||||
#define MCLK1_CLK_SRC 46
|
||||
#define MCLK2_CLK_SRC 47
|
||||
#define MCLK3_CLK_SRC 48
|
||||
#define CSI0PHYTIMER_CLK_SRC 49
|
||||
#define CSI1PHYTIMER_CLK_SRC 50
|
||||
#define EXTPCLK_CLK_SRC 51
|
||||
#define HDMI_CLK_SRC 52
|
||||
#define CAMSS_AHB_CLK 53
|
||||
#define CAMSS_CCI_CCI_AHB_CLK 54
|
||||
#define CAMSS_CCI_CCI_CLK 55
|
||||
#define CAMSS_VFE_CPP_AHB_CLK 56
|
||||
#define CAMSS_VFE_CPP_AXI_CLK 57
|
||||
#define CAMSS_VFE_CPP_CLK 58
|
||||
#define CAMSS_CSI0_AHB_CLK 59
|
||||
#define CAMSS_CSI0_CLK 60
|
||||
#define CAMSS_CSI0PHY_CLK 61
|
||||
#define CAMSS_CSI0PIX_CLK 62
|
||||
#define CAMSS_CSI0RDI_CLK 63
|
||||
#define CAMSS_CSI1_AHB_CLK 64
|
||||
#define CAMSS_CSI1_CLK 65
|
||||
#define CAMSS_CSI1PHY_CLK 66
|
||||
#define CAMSS_CSI1PIX_CLK 67
|
||||
#define CAMSS_CSI1RDI_CLK 68
|
||||
#define CAMSS_CSI2_AHB_CLK 69
|
||||
#define CAMSS_CSI2_CLK 70
|
||||
#define CAMSS_CSI2PHY_CLK 71
|
||||
#define CAMSS_CSI2PIX_CLK 72
|
||||
#define CAMSS_CSI2RDI_CLK 73
|
||||
#define CAMSS_CSI3_AHB_CLK 74
|
||||
#define CAMSS_CSI3_CLK 75
|
||||
#define CAMSS_CSI3PHY_CLK 76
|
||||
#define CAMSS_CSI3PIX_CLK 77
|
||||
#define CAMSS_CSI3RDI_CLK 78
|
||||
#define CAMSS_CSI_VFE0_CLK 79
|
||||
#define CAMSS_CSI_VFE1_CLK 80
|
||||
#define CAMSS_GP0_CLK 81
|
||||
#define CAMSS_GP1_CLK 82
|
||||
#define CAMSS_ISPIF_AHB_CLK 83
|
||||
#define CAMSS_JPEG_DMA_CLK 84
|
||||
#define CAMSS_JPEG_JPEG0_CLK 85
|
||||
#define CAMSS_JPEG_JPEG1_CLK 86
|
||||
#define CAMSS_JPEG_JPEG2_CLK 87
|
||||
#define CAMSS_JPEG_JPEG_AHB_CLK 88
|
||||
#define CAMSS_JPEG_JPEG_AXI_CLK 89
|
||||
#define CAMSS_MCLK0_CLK 90
|
||||
#define CAMSS_MCLK1_CLK 91
|
||||
#define CAMSS_MCLK2_CLK 92
|
||||
#define CAMSS_MCLK3_CLK 93
|
||||
#define CAMSS_MICRO_AHB_CLK 94
|
||||
#define CAMSS_PHY0_CSI0PHYTIMER_CLK 95
|
||||
#define CAMSS_PHY1_CSI1PHYTIMER_CLK 96
|
||||
#define CAMSS_PHY2_CSI2PHYTIMER_CLK 97
|
||||
#define CAMSS_TOP_AHB_CLK 98
|
||||
#define CAMSS_VFE_VFE0_CLK 99
|
||||
#define CAMSS_VFE_VFE1_CLK 100
|
||||
#define CAMSS_VFE_VFE_AHB_CLK 101
|
||||
#define CAMSS_VFE_VFE_AXI_CLK 102
|
||||
#define FD_AXI_CLK 103
|
||||
#define FD_CORE_CLK 104
|
||||
#define FD_CORE_UAR_CLK 105
|
||||
#define MDSS_AXI_CLK 106
|
||||
#define MDSS_EXTPCLK_CLK 107
|
||||
#define MDSS_HDMI_AHB_CLK 108
|
||||
#define MDSS_HDMI_CLK 109
|
||||
#define MDSS_MDP_CLK 110
|
||||
#define MMSS_MISC_AHB_CLK 111
|
||||
#define MMSS_MMSSNOC_AXI_CLK 112
|
||||
#define MMSS_S0_AXI_CLK 113
|
||||
#define OCMEMCX_OCMEMNOC_CLK 114
|
||||
#define OXILI_GFX3D_CLK 115
|
||||
#define OXILI_RBBMTIMER_CLK 116
|
||||
#define OXILICX_AHB_CLK 117
|
||||
#define VENUS0_AHB_CLK 118
|
||||
#define VENUS0_AXI_CLK 119
|
||||
#define VENUS0_OCMEMNOC_CLK 120
|
||||
#define VENUS0_VCODEC0_CLK 121
|
||||
#define VENUS0_CORE0_VCODEC_CLK 122
|
||||
#define VENUS0_CORE1_VCODEC_CLK 123
|
||||
#define VENUS0_CORE2_VCODEC_CLK 124
|
||||
#define AHB_CLK_SRC 125
|
||||
#define FD_AHB_CLK 126
|
||||
|
||||
/* GDSCs */
|
||||
#define VENUS_GDSC 0
|
||||
#define VENUS_CORE0_GDSC 1
|
||||
#define VENUS_CORE1_GDSC 2
|
||||
#define VENUS_CORE2_GDSC 3
|
||||
#define CAMSS_TOP_GDSC 4
|
||||
#define MDSS_GDSC 5
|
||||
#define JPEG_GDSC 6
|
||||
#define VFE_GDSC 7
|
||||
#define CPP_GDSC 8
|
||||
#define OXILI_GX_GDSC 9
|
||||
#define OXILI_CX_GDSC 10
|
||||
#define FD_GDSC 11
|
||||
|
||||
/* Resets */
|
||||
#define CAMSS_MICRO_BCR 0
|
||||
|
||||
#endif
|
@ -149,5 +149,15 @@
|
||||
#define RPM_SMD_CE2_A_CLK 103
|
||||
#define RPM_SMD_CE3_CLK 104
|
||||
#define RPM_SMD_CE3_A_CLK 105
|
||||
#define RPM_SMD_QUP_CLK 106
|
||||
#define RPM_SMD_QUP_A_CLK 107
|
||||
#define RPM_SMD_MMRT_CLK 108
|
||||
#define RPM_SMD_MMRT_A_CLK 109
|
||||
#define RPM_SMD_MMNRT_CLK 110
|
||||
#define RPM_SMD_MMNRT_A_CLK 111
|
||||
#define RPM_SMD_SNOC_PERIPH_CLK 112
|
||||
#define RPM_SMD_SNOC_PERIPH_A_CLK 113
|
||||
#define RPM_SMD_SNOC_LPASS_CLK 114
|
||||
#define RPM_SMD_SNOC_LPASS_A_CLK 115
|
||||
|
||||
#endif
|
||||
|
@ -31,5 +31,7 @@
|
||||
#define RPMH_RF_CLK5_A 22
|
||||
#define RPMH_PKA_CLK 23
|
||||
#define RPMH_HWKM_CLK 24
|
||||
#define RPMH_QLINK_CLK 25
|
||||
#define RPMH_QLINK_CLK_A 26
|
||||
|
||||
#endif
|
||||
|
27
include/dt-bindings/clock/qcom,videocc-sc7280.h
Normal file
27
include/dt-bindings/clock/qcom,videocc-sc7280.h
Normal file
@ -0,0 +1,27 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_QCOM_VIDEO_CC_SC7280_H
|
||||
#define _DT_BINDINGS_CLK_QCOM_VIDEO_CC_SC7280_H
|
||||
|
||||
/* VIDEO_CC clocks */
|
||||
#define VIDEO_PLL0 0
|
||||
#define VIDEO_CC_IRIS_AHB_CLK 1
|
||||
#define VIDEO_CC_IRIS_CLK_SRC 2
|
||||
#define VIDEO_CC_MVS0_AXI_CLK 3
|
||||
#define VIDEO_CC_MVS0_CORE_CLK 4
|
||||
#define VIDEO_CC_MVSC_CORE_CLK 5
|
||||
#define VIDEO_CC_MVSC_CTL_AXI_CLK 6
|
||||
#define VIDEO_CC_SLEEP_CLK 7
|
||||
#define VIDEO_CC_SLEEP_CLK_SRC 8
|
||||
#define VIDEO_CC_VENUS_AHB_CLK 9
|
||||
#define VIDEO_CC_XO_CLK 10
|
||||
#define VIDEO_CC_XO_CLK_SRC 11
|
||||
|
||||
/* VIDEO_CC power domains */
|
||||
#define MVS0_GDSC 0
|
||||
#define MVSC_GDSC 1
|
||||
|
||||
#endif
|
@ -15,6 +15,6 @@ struct lpss_clk_data {
|
||||
struct clk *clk;
|
||||
};
|
||||
|
||||
extern int lpt_clk_init(void);
|
||||
extern int lpss_atom_clk_init(void);
|
||||
|
||||
#endif /* __CLK_LPSS_H */
|
||||
|
@ -47,6 +47,7 @@ extern void pm_clk_remove(struct device *dev, const char *con_id);
|
||||
extern void pm_clk_remove_clk(struct device *dev, struct clk *clk);
|
||||
extern int pm_clk_suspend(struct device *dev);
|
||||
extern int pm_clk_resume(struct device *dev);
|
||||
extern int devm_pm_clk_create(struct device *dev);
|
||||
#else
|
||||
static inline bool pm_clk_no_clocks(struct device *dev)
|
||||
{
|
||||
@ -83,6 +84,10 @@ static inline void pm_clk_remove(struct device *dev, const char *con_id)
|
||||
static inline void pm_clk_remove_clk(struct device *dev, struct clk *clk)
|
||||
{
|
||||
}
|
||||
static inline int devm_pm_clk_create(struct device *dev)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAVE_CLK
|
||||
|
@ -59,6 +59,8 @@ extern void pm_runtime_put_suppliers(struct device *dev);
|
||||
extern void pm_runtime_new_link(struct device *dev);
|
||||
extern void pm_runtime_drop_link(struct device_link *link);
|
||||
|
||||
extern int devm_pm_runtime_enable(struct device *dev);
|
||||
|
||||
/**
|
||||
* pm_runtime_get_if_in_use - Conditionally bump up runtime PM usage counter.
|
||||
* @dev: Target device.
|
||||
@ -253,6 +255,8 @@ static inline void __pm_runtime_disable(struct device *dev, bool c) {}
|
||||
static inline void pm_runtime_allow(struct device *dev) {}
|
||||
static inline void pm_runtime_forbid(struct device *dev) {}
|
||||
|
||||
static inline int devm_pm_runtime_enable(struct device *dev) { return 0; }
|
||||
|
||||
static inline void pm_suspend_ignore_children(struct device *dev, bool enable) {}
|
||||
static inline void pm_runtime_get_noresume(struct device *dev) {}
|
||||
static inline void pm_runtime_put_noidle(struct device *dev) {}
|
||||
|
@ -29,6 +29,7 @@ struct qcom_smd_rpm;
|
||||
#define QCOM_SMD_RPM_NCPB 0x6270636E
|
||||
#define QCOM_SMD_RPM_OCMEM_PWR 0x706d636f
|
||||
#define QCOM_SMD_RPM_QPIC_CLK 0x63697071
|
||||
#define QCOM_SMD_RPM_QUP_CLK 0x707571
|
||||
#define QCOM_SMD_RPM_SMPA 0x61706d73
|
||||
#define QCOM_SMD_RPM_SMPB 0x62706d73
|
||||
#define QCOM_SMD_RPM_SPDM 0x63707362
|
||||
|
Loading…
Reference in New Issue
Block a user