forked from Minki/linux
Merge branches 'clk-samsung', 'clk-mtk', 'clk-rm', 'clk-ast' and 'clk-qcom' into clk-next
- Add resets for MediaTek MT8195 PCIe and USB - Remove DaVinci DM644x and DM646x clk driver support * clk-samsung: clk: samsung: MAINTAINERS: add Krzysztof Kozlowski clk: samsung: exynos850: Implement CMU_MFCMSCL domain clk: samsung: exynos850: Implement CMU_IS domain clk: samsung: exynos850: Implement CMU_AUD domain clk: samsung: exynos850: Style fixes clk: samsung: exynosautov9: add fsys1 clock support clk: samsung: exynosautov9: add fsys0 clock support clk: samsung: exynosautov9: correct register offsets of peric0/c1 clk: samsung: exynosautov9: add missing gate clks for peric0/c1 dt-bindings: clock: exynos850: Add Exynos850 CMU_MFCMSCL dt-bindings: clock: exynos850: Add Exynos850 CMU_IS dt-bindings: clock: exynos850: Add Exynos850 CMU_AUD dt-bindings: clock: exynosautov9: add schema for cmu_fsys0/1 dt-bindings: clock: exynosautov9: add fsys1 clock definitions dt-bindings: clock: exynosautov9: add fys0 clock definitions clk: samsung: exynos7885: Add TREX clocks clk: samsung: exynos7885: Implement CMU_FSYS domain dt-bindings: clock: exynosautov9: correct clock numbering of peric0/c1 clk: samsung: exynos-clkout: Use of_device_get_match_data() * clk-mtk: (42 commits) clk: mediatek: add driver for MT8365 SoC clk: mediatek: Export required common code symbols clk: mediatek: Provide mtk_devm_alloc_clk_data dt-bindings: clock: mediatek: add bindings for MT8365 SoC clk: mediatek: mt8192: deduplicate parent clock lists clk: mediatek: Migrate remaining clk_unregister_*() to clk_hw_unregister_*() clk: mediatek: fix unregister function in mtk_clk_register_dividers cleanup clk: mediatek: clk-mt8192: Add clock mux notifier for mfg_pll_sel clk: mediatek: clk-mt8192-mfg: Propagate rate changes to parent clk: mediatek: clk-mt8195-topckgen: Drop univplls from mfg mux parents clk: mediatek: clk-mt8195-topckgen: Add GPU clock mux notifier clk: mediatek: clk-mt8195-topckgen: Register mfg_ck_fast_ref as generic mux clk: mediatek: clk-mt8195-mfg: Reparent mfg_bg3d and propagate rate changes clk: mediatek: mt8183: Add clk mux notifier for MFG mux clk: mediatek: mux: add clk notifier functions clk: mediatek: mt8183: mfgcfg: Propagate rate changes to parent clk: mediatek: Use mtk_clk_register_gates_with_dev in simple probe clk: mediatek: gate: Export mtk_clk_register_gates_with_dev clk: mediatek: add VDOSYS1 clock dt-bindings: clk: mediatek: Add MT8195 DPI clocks ... * clk-rm: clk: davinci: remove PLL and PSC clocks for DaVinci DM644x and DM646x * clk-ast: clk: ast2600: BCLK comes from EPLL * clk-qcom: (97 commits) clk: qcom: gcc-sm6375: Ensure unsigned long type clk: qcom: gcc-sm6375: Remove unused variables clk: qcom: kpss-xcc: convert to parent data API clk: introduce (devm_)hw_register_mux_parent_data_table API clk: qcom: gcc-msm8939: use ARRAY_SIZE instead of specifying num_parents clk: qcom: gcc-msm8939: use parent_hws where possible dt-bindings: clock: move qcom,gcc-msm8939 to qcom,gcc-msm8916.yaml clk: qcom: gcc-sm6350: Update the .pwrsts for usb gdscs clk: qcom: gcc-sc8280xp: use retention for USB power domains clk: qcom: gdsc: add missing error handling dt-bindings: clocks: qcom,gcc-sc8280xp: Fix typos clk: qcom: Add global clock controller driver for SM6375 dt-bindings: clock: add SM6375 QCOM global clock bindings clk: qcom: alpha: Add support for programming the PLL_FSM_LEGACY_MODE bit clk: qcom: gcc-sc7280: Update the .pwrsts for usb gdscs clk: qcom: gcc-sc7180: Update the .pwrsts for usb gdsc clk: qcom: gdsc: Fix the handling of PWRSTS_RET support clk: qcom: Add SC8280XP GPU clock controller dt-bindings: clock: Add Qualcomm SC8280XP GPU binding clk: qcom: smd: Add SM6375 clocks ...
This commit is contained in:
commit
a64b79c01c
@ -23,6 +23,7 @@ properties:
|
||||
- mediatek,mt2701-infracfg
|
||||
- mediatek,mt2712-infracfg
|
||||
- mediatek,mt6765-infracfg
|
||||
- mediatek,mt6795-infracfg
|
||||
- mediatek,mt6779-infracfg_ao
|
||||
- mediatek,mt6797-infracfg
|
||||
- mediatek,mt7622-infracfg
|
||||
@ -60,6 +61,7 @@ if:
|
||||
enum:
|
||||
- mediatek,mt2701-infracfg
|
||||
- mediatek,mt2712-infracfg
|
||||
- mediatek,mt6795-infracfg
|
||||
- mediatek,mt7622-infracfg
|
||||
- mediatek,mt7986-infracfg
|
||||
- mediatek,mt8135-infracfg
|
||||
|
@ -25,6 +25,7 @@ properties:
|
||||
- mediatek,mt2712-mmsys
|
||||
- mediatek,mt6765-mmsys
|
||||
- mediatek,mt6779-mmsys
|
||||
- mediatek,mt6795-mmsys
|
||||
- mediatek,mt6797-mmsys
|
||||
- mediatek,mt8167-mmsys
|
||||
- mediatek,mt8173-mmsys
|
||||
|
@ -21,6 +21,7 @@ properties:
|
||||
- mediatek,mt2701-pericfg
|
||||
- mediatek,mt2712-pericfg
|
||||
- mediatek,mt6765-pericfg
|
||||
- mediatek,mt6795-pericfg
|
||||
- mediatek,mt7622-pericfg
|
||||
- mediatek,mt7629-pericfg
|
||||
- mediatek,mt8135-pericfg
|
||||
|
@ -34,6 +34,7 @@ properties:
|
||||
- mediatek,mt2712-apmixedsys
|
||||
- mediatek,mt6765-apmixedsys
|
||||
- mediatek,mt6779-apmixedsys
|
||||
- mediatek,mt6795-apmixedsys
|
||||
- mediatek,mt7629-apmixedsys
|
||||
- mediatek,mt8167-apmixedsys
|
||||
- mediatek,mt8183-apmixedsys
|
||||
|
@ -0,0 +1,66 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/mediatek,mt6795-clock.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: MediaTek Functional Clock Controller for MT6795
|
||||
|
||||
maintainers:
|
||||
- AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
- Chun-Jie Chen <chun-jie.chen@mediatek.com>
|
||||
|
||||
description: |
|
||||
The clock architecture in MediaTek like below
|
||||
PLLs -->
|
||||
dividers -->
|
||||
muxes
|
||||
-->
|
||||
clock gate
|
||||
|
||||
The devices provide clock gate control in different IP blocks.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- mediatek,mt6795-mfgcfg
|
||||
- mediatek,mt6795-vdecsys
|
||||
- mediatek,mt6795-vencsys
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
soc {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
mfgcfg: clock-controller@13000000 {
|
||||
compatible = "mediatek,mt6795-mfgcfg";
|
||||
reg = <0 0x13000000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
vdecsys: clock-controller@16000000 {
|
||||
compatible = "mediatek,mt6795-vdecsys";
|
||||
reg = <0 0x16000000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
vencsys: clock-controller@18000000 {
|
||||
compatible = "mediatek,mt6795-vencsys";
|
||||
reg = <0 0x18000000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
};
|
@ -0,0 +1,54 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/mediatek,mt6795-sys-clock.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: MediaTek System Clock Controller for MT6795
|
||||
|
||||
maintainers:
|
||||
- AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
- 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 MT6795.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- mediatek,mt6795-apmixedsys
|
||||
- mediatek,mt6795-infracfg
|
||||
- mediatek,mt6795-pericfg
|
||||
- mediatek,mt6795-topckgen
|
||||
- const: syscon
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
soc {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
topckgen: clock-controller@10000000 {
|
||||
compatible = "mediatek,mt6795-topckgen", "syscon";
|
||||
reg = <0 0x10000000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
};
|
@ -0,0 +1,42 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/mediatek,mt8365-clock.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: MediaTek Functional Clock Controller for MT8365
|
||||
|
||||
maintainers:
|
||||
- Markus Schneider-Pargmann <msp@baylibre.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- mediatek,mt8365-apu
|
||||
- mediatek,mt8365-imgsys
|
||||
- mediatek,mt8365-mfgcfg
|
||||
- mediatek,mt8365-vdecsys
|
||||
- mediatek,mt8365-vencsys
|
||||
- const: syscon
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
apu: clock-controller@19020000 {
|
||||
compatible = "mediatek,mt8365-apu", "syscon";
|
||||
reg = <0x19020000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
@ -0,0 +1,47 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/mediatek,mt8365-sys-clock.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: MediaTek System Clock Controller for MT8365
|
||||
|
||||
maintainers:
|
||||
- Markus Schneider-Pargmann <msp@baylibre.com>
|
||||
|
||||
description:
|
||||
The apmixedsys module provides most of PLLs which generated from SoC 26m.
|
||||
The topckgen provides dividers and muxes which provides the clock source to other IP blocks.
|
||||
The infracfg_ao and pericfg_ao provides clock gate in peripheral and infrastructure IP blocks.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- mediatek,mt8365-topckgen
|
||||
- mediatek,mt8365-infracfg
|
||||
- mediatek,mt8365-apmixedsys
|
||||
- mediatek,mt8365-pericfg
|
||||
- mediatek,mt8365-mcucfg
|
||||
- const: syscon
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
topckgen: clock-controller@10000000 {
|
||||
compatible = "mediatek,mt8365-topckgen", "syscon";
|
||||
reg = <0x10000000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
@ -33,6 +33,7 @@ properties:
|
||||
- mediatek,mt2712-topckgen
|
||||
- mediatek,mt6765-topckgen
|
||||
- mediatek,mt6779-topckgen
|
||||
- mediatek,mt6795-topckgen
|
||||
- mediatek,mt7629-topckgen
|
||||
- mediatek,mt7986-topckgen
|
||||
- mediatek,mt8167-topckgen
|
||||
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
title: Qualcomm A53 PLL Binding
|
||||
|
||||
maintainers:
|
||||
- Sivaprakash Murugesan <sivaprak@codeaurora.org>
|
||||
- Bjorn Andersson <andersson@kernel.org>
|
||||
|
||||
description:
|
||||
The A53 PLL on few Qualcomm platforms is the main CPU PLL used used for
|
||||
@ -17,6 +17,7 @@ properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,ipq6018-a53pll
|
||||
- qcom,ipq8074-a53pll
|
||||
- qcom,msm8916-a53pll
|
||||
- qcom,msm8939-a53pll
|
||||
|
||||
|
@ -38,6 +38,15 @@ properties:
|
||||
description: child tsens device
|
||||
$ref: /schemas/thermal/qcom-tsens.yaml#
|
||||
|
||||
clocks:
|
||||
maxItems: 3
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: cxo
|
||||
- const: pxo
|
||||
- const: pll4
|
||||
|
||||
nvmem-cells:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
@ -0,0 +1,54 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,gcc-msm8660.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Global Clock & Reset Controller Binding for MSM8660
|
||||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module which supports the clocks and resets on
|
||||
MSM8660
|
||||
|
||||
See also:
|
||||
- dt-bindings/clock/qcom,gcc-msm8660.h
|
||||
- dt-bindings/reset/qcom,gcc-msm8660.h
|
||||
|
||||
allOf:
|
||||
- $ref: "qcom,gcc.yaml#"
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,gcc-msm8660
|
||||
|
||||
clocks:
|
||||
maxItems: 2
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: pxo
|
||||
- const: cxo
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
# Example for GCC for MSM8974:
|
||||
- |
|
||||
clock-controller@900000 {
|
||||
compatible = "qcom,gcc-msm8660";
|
||||
reg = <0x900000 0x4000>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
clocks = <&pxo_board>, <&cxo_board>;
|
||||
clock-names = "pxo", "cxo";
|
||||
};
|
||||
...
|
@ -0,0 +1,58 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,gcc-msm8909.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Global Clock & Reset Controller Binding for MSM8909
|
||||
|
||||
maintainers:
|
||||
- Stephan Gerhold <stephan@gerhold.net>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module which supports the clocks, resets and
|
||||
power domains on MSM8909.
|
||||
|
||||
See also:
|
||||
- dt-bindings/clock/qcom,gcc-msm8909.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,gcc-msm8909
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: XO source
|
||||
- description: Sleep clock source
|
||||
- description: DSI phy instance 0 dsi clock
|
||||
- description: DSI phy instance 0 byte clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: xo
|
||||
- const: sleep_clk
|
||||
- const: dsi0pll
|
||||
- const: dsi0pllbyte
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
gcc: clock-controller@1800000 {
|
||||
compatible = "qcom,gcc-msm8909";
|
||||
reg = <0x01800000 0x80000>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
clocks = <&xo_board>, <&sleep_clk>, <&dsi0_phy 1>, <&dsi0_phy 0>;
|
||||
clock-names = "xo", "sleep_clk", "dsi0pll", "dsi0pllbyte";
|
||||
};
|
||||
...
|
@ -0,0 +1,66 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,gcc-msm8916.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Global Clock & Reset Controller Binding for MSM8916 and MSM8939
|
||||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module which supports the clocks, resets and
|
||||
power domains on MSM8916 or MSM8939.
|
||||
|
||||
See also:
|
||||
- dt-bindings/clock/qcom,gcc-msm8916.h
|
||||
- dt-bindings/clock/qcom,gcc-msm8939.h
|
||||
- dt-bindings/reset/qcom,gcc-msm8916.h
|
||||
- dt-bindings/reset/qcom,gcc-msm8939.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,gcc-msm8916
|
||||
- qcom,gcc-msm8939
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: XO source
|
||||
- description: Sleep clock source
|
||||
- description: DSI phy instance 0 dsi clock
|
||||
- description: DSI phy instance 0 byte clock
|
||||
- description: External MCLK clock
|
||||
- description: External Primary I2S clock
|
||||
- description: External Secondary I2S clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: xo
|
||||
- const: sleep_clk
|
||||
- const: dsi0pll
|
||||
- const: dsi0pllbyte
|
||||
- const: ext_mclk
|
||||
- const: ext_pri_i2s
|
||||
- const: ext_sec_i2s
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
clock-controller@300000 {
|
||||
compatible = "qcom,gcc-msm8916";
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
reg = <0x300000 0x90000>;
|
||||
};
|
||||
...
|
@ -45,29 +45,16 @@ properties:
|
||||
description:
|
||||
Phandle to voltage regulator providing power to the GX domain.
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
- vdd_gfx-supply
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -32,28 +32,15 @@ properties:
|
||||
- const: xo
|
||||
- const: sleep
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
- clock-names
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -49,30 +49,13 @@ properties:
|
||||
- const: ufs_rx_symbol_1_clk_src
|
||||
- const: ufs_tx_symbol_0_clk_src
|
||||
|
||||
'#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
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -37,32 +37,15 @@ properties:
|
||||
- const: core_bi_pll_test_se # Optional clock
|
||||
minItems: 2
|
||||
|
||||
'#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
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -18,11 +18,7 @@ description: |
|
||||
- dt-bindings/clock/qcom,gcc-ipq4019.h
|
||||
- dt-bindings/clock/qcom,gcc-ipq6018.h
|
||||
- dt-bindings/reset/qcom,gcc-ipq6018.h
|
||||
- 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
|
||||
- dt-bindings/clock/qcom,gcc-msm8974.h (qcom,gcc-msm8226 and qcom,gcc-msm8974)
|
||||
- dt-bindings/reset/qcom,gcc-msm8974.h (qcom,gcc-msm8226 and qcom,gcc-msm8974)
|
||||
- dt-bindings/clock/qcom,gcc-mdm9607.h
|
||||
@ -40,9 +36,6 @@ properties:
|
||||
- qcom,gcc-ipq6018
|
||||
- qcom,gcc-mdm9607
|
||||
- qcom,gcc-msm8226
|
||||
- qcom,gcc-msm8660
|
||||
- qcom,gcc-msm8916
|
||||
- qcom,gcc-msm8939
|
||||
- qcom,gcc-msm8953
|
||||
- qcom,gcc-msm8974
|
||||
- qcom,gcc-msm8974pro
|
||||
|
@ -30,32 +30,15 @@ properties:
|
||||
- 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
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -33,32 +33,15 @@ properties:
|
||||
- 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
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -44,28 +44,15 @@ properties:
|
||||
- const: ufs_phy_tx_symbol_0_clk
|
||||
- const: usb3_phy_wrapper_gcc_usb30_pipe_clk
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
- clock-names
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -32,32 +32,15 @@ properties:
|
||||
- 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
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -33,7 +33,7 @@ properties:
|
||||
- description: Primary USB SuperSpeed pipe clock
|
||||
- description: USB4 PHY pipegmux clock source
|
||||
- description: USB4 PHY DP gmux clock source
|
||||
- description: USB4 PHY sys piegmux clock source
|
||||
- description: USB4 PHY sys pipegmux clock source
|
||||
- description: USB4 PHY PCIe pipe clock
|
||||
- description: USB4 PHY router max pipe clock
|
||||
- description: Primary USB4 RX0 clock
|
||||
@ -46,7 +46,7 @@ properties:
|
||||
- description: Second USB4 PHY router max pipe clock
|
||||
- description: Secondary USB4 RX0 clock
|
||||
- description: Secondary USB4 RX1 clock
|
||||
- description: Multiport USB first SupserSpeed pipe clock
|
||||
- description: Multiport USB first SuperSpeed pipe clock
|
||||
- description: Multiport USB second SuperSpeed pipe clock
|
||||
- description: PCIe 2a pipe clock
|
||||
- description: PCIe 2b pipe clock
|
||||
@ -56,30 +56,17 @@ properties:
|
||||
- description: First EMAC controller reference clock
|
||||
- description: Second EMAC controller reference clock
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
protected-clocks:
|
||||
maxItems: 389
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -19,51 +19,67 @@ description: |
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,gcc-sdm845
|
||||
enum:
|
||||
- qcom,gcc-sdm670
|
||||
- qcom,gcc-sdm845
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Board active XO source
|
||||
- description: Sleep clock source
|
||||
- description: PCIE 0 Pipe clock source
|
||||
- description: PCIE 1 Pipe clock source
|
||||
minItems: 3
|
||||
maxItems: 5
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: bi_tcxo
|
||||
- const: bi_tcxo_ao
|
||||
- const: sleep_clk
|
||||
- const: pcie_0_pipe_clk
|
||||
- const: pcie_1_pipe_clk
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
minItems: 3
|
||||
maxItems: 5
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
protected-clocks:
|
||||
description:
|
||||
Protected clock specifier list as per common clock binding.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: qcom,gcc-sdm670
|
||||
then:
|
||||
properties:
|
||||
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
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: qcom,gcc-sdm845
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Board active XO source
|
||||
- description: Sleep clock source
|
||||
- description: PCIE 0 Pipe clock source
|
||||
- description: PCIE 1 Pipe clock source
|
||||
clock-names:
|
||||
items:
|
||||
- const: bi_tcxo
|
||||
- const: bi_tcxo_ao
|
||||
- const: sleep_clk
|
||||
- const: pcie_0_pipe_clk
|
||||
- const: pcie_1_pipe_clk
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
# Example for GCC for SDM845:
|
||||
|
@ -35,28 +35,15 @@ properties:
|
||||
- const: core_bi_pll_test_se # Optional clock
|
||||
minItems: 2
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
- clock-names
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -20,9 +20,6 @@ properties:
|
||||
compatible:
|
||||
const: qcom,gcc-sdx65
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
@ -43,25 +40,15 @@ properties:
|
||||
- const: core_bi_pll_test_se # Optional clock
|
||||
minItems: 5
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -30,32 +30,15 @@ properties:
|
||||
- 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
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -30,32 +30,15 @@ properties:
|
||||
- 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
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -32,32 +32,15 @@ properties:
|
||||
- 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
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -31,32 +31,15 @@ properties:
|
||||
- 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
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -31,32 +31,15 @@ properties:
|
||||
- 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
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -54,28 +54,15 @@ properties:
|
||||
- const: usb3_uni_phy_sec_gcc_usb30_pipe_clk # Optional clock
|
||||
minItems: 2
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
- clock-names
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -46,28 +46,15 @@ properties:
|
||||
- const: usb3_phy_wrapper_gcc_usb30_pipe_clk # Optional clock
|
||||
minItems: 2
|
||||
|
||||
'#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
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -17,6 +17,7 @@ description: |
|
||||
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-sc8280xp.h
|
||||
dt-bindings/clock/qcom,gpucc-sm6350.h
|
||||
dt-bindings/clock/qcom,gpucc-sm8150.h
|
||||
dt-bindings/clock/qcom,gpucc-sm8250.h
|
||||
@ -28,6 +29,7 @@ properties:
|
||||
- qcom,sc7180-gpucc
|
||||
- qcom,sc7280-gpucc
|
||||
- qcom,sc8180x-gpucc
|
||||
- qcom,sc8280xp-gpucc
|
||||
- qcom,sm6350-gpucc
|
||||
- qcom,sm8150-gpucc
|
||||
- qcom,sm8250-gpucc
|
||||
|
@ -31,30 +31,12 @@ properties:
|
||||
- qcom,mmcc-sdm660
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Board sleep source
|
||||
- description: Global PLL 0 clock
|
||||
- description: DSI phy instance 0 dsi clock
|
||||
- description: DSI phy instance 0 byte clock
|
||||
- description: DSI phy instance 1 dsi clock
|
||||
- description: DSI phy instance 1 byte clock
|
||||
- description: HDMI phy PLL clock
|
||||
- description: DisplayPort phy PLL vco clock
|
||||
- description: DisplayPort phy PLL link clock
|
||||
minItems: 8
|
||||
maxItems: 10
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: xo
|
||||
- const: sleep
|
||||
- const: gpll0
|
||||
- const: dsi0dsi
|
||||
- const: dsi0byte
|
||||
- const: dsi1dsi
|
||||
- const: dsi1byte
|
||||
- const: hdmipll
|
||||
- const: dpvco
|
||||
- const: dplink
|
||||
minItems: 8
|
||||
maxItems: 10
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
@ -85,16 +67,179 @@ required:
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: qcom,mmcc-msm8998
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,mmcc-apq8064
|
||||
- qcom,mmcc-msm8960
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Board PXO source
|
||||
- description: PLL 3 clock
|
||||
- description: PLL 3 Vote clock
|
||||
- description: DSI phy instance 1 dsi clock
|
||||
- description: DSI phy instance 1 byte clock
|
||||
- description: DSI phy instance 2 dsi clock
|
||||
- description: DSI phy instance 2 byte clock
|
||||
- description: HDMI phy PLL clock
|
||||
|
||||
then:
|
||||
required:
|
||||
- clocks
|
||||
- clock-names
|
||||
clock-names:
|
||||
items:
|
||||
- const: pxo
|
||||
- const: pll3
|
||||
- const: pll8_vote
|
||||
- const: dsi1pll
|
||||
- const: dsi1pllbyte
|
||||
- const: dsi2pll
|
||||
- const: dsi2pllbyte
|
||||
- const: hdmipll
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,mmcc-msm8994
|
||||
- qcom,mmcc-msm8998
|
||||
- qcom,mmcc-sdm630
|
||||
- qcom,mmcc-sdm660
|
||||
then:
|
||||
required:
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: qcom,mmcc-msm8994
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Global PLL 0 clock
|
||||
- description: MMSS NoC AHB clock
|
||||
- description: GFX3D clock
|
||||
- description: DSI phy instance 0 dsi clock
|
||||
- description: DSI phy instance 0 byte clock
|
||||
- description: DSI phy instance 1 dsi clock
|
||||
- description: DSI phy instance 1 byte clock
|
||||
- description: HDMI phy PLL clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: xo
|
||||
- const: gpll0
|
||||
- const: mmssnoc_ahb
|
||||
- const: oxili_gfx3d_clk_src
|
||||
- const: dsi0pll
|
||||
- const: dsi0pllbyte
|
||||
- const: dsi1pll
|
||||
- const: dsi1pllbyte
|
||||
- const: hdmipll
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: qcom,mmcc-msm8996
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Global PLL 0 clock
|
||||
- description: MMSS NoC AHB clock
|
||||
- description: DSI phy instance 0 dsi clock
|
||||
- description: DSI phy instance 0 byte clock
|
||||
- description: DSI phy instance 1 dsi clock
|
||||
- description: DSI phy instance 1 byte clock
|
||||
- description: HDMI phy PLL clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: xo
|
||||
- const: gpll0
|
||||
- const: gcc_mmss_noc_cfg_ahb_clk
|
||||
- const: dsi0pll
|
||||
- const: dsi0pllbyte
|
||||
- const: dsi1pll
|
||||
- const: dsi1pllbyte
|
||||
- const: hdmipll
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: qcom,mmcc-msm8998
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Global PLL 0 clock
|
||||
- description: DSI phy instance 0 dsi clock
|
||||
- description: DSI phy instance 0 byte clock
|
||||
- description: DSI phy instance 1 dsi clock
|
||||
- description: DSI phy instance 1 byte clock
|
||||
- description: HDMI phy PLL clock
|
||||
- description: DisplayPort phy PLL link clock
|
||||
- description: DisplayPort phy PLL vco clock
|
||||
- description: Test clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: xo
|
||||
- const: gpll0
|
||||
- const: dsi0dsi
|
||||
- const: dsi0byte
|
||||
- const: dsi1dsi
|
||||
- const: dsi1byte
|
||||
- const: hdmipll
|
||||
- const: dplink
|
||||
- const: dpvco
|
||||
- const: core_bi_pll_test_se
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,mmcc-sdm630
|
||||
- qcom,mmcc-sdm660
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Board sleep source
|
||||
- description: Global PLL 0 clock
|
||||
- description: Global PLL 0 DIV clock
|
||||
- description: DSI phy instance 0 dsi clock
|
||||
- description: DSI phy instance 0 byte clock
|
||||
- description: DSI phy instance 1 dsi clock
|
||||
- description: DSI phy instance 1 byte clock
|
||||
- description: DisplayPort phy PLL link clock
|
||||
- description: DisplayPort phy PLL vco clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: xo
|
||||
- const: sleep_clk
|
||||
- const: gpll0
|
||||
- const: gpll0_div
|
||||
- const: dsi0pll
|
||||
- const: dsi0pllbyte
|
||||
- const: dsi1pll
|
||||
- const: dsi1pllbyte
|
||||
- const: dp_link_2x_clk_divsel_five
|
||||
- const: dp_vco_divided_clk_src_mux
|
||||
|
||||
examples:
|
||||
# Example for MMCC for MSM8960:
|
||||
|
@ -26,22 +26,18 @@ properties:
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Primary PLL clock for power cluster (little)
|
||||
- description: Primary PLL clock for perf cluster (big)
|
||||
- description: Alternate PLL clock for power cluster (little)
|
||||
- description: Alternate PLL clock for perf cluster (big)
|
||||
- description: XO source
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: pwrcl_pll
|
||||
- const: perfcl_pll
|
||||
- const: pwrcl_alt_pll
|
||||
- const: perfcl_alt_pll
|
||||
- const: xo
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- '#clock-cells'
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
@ -51,4 +47,7 @@ examples:
|
||||
compatible = "qcom,msm8996-apcc";
|
||||
reg = <0x6400000 0x90000>;
|
||||
#clock-cells = <1>;
|
||||
|
||||
clocks = <&xo_board>;
|
||||
clock-names = "xo";
|
||||
};
|
||||
|
@ -29,6 +29,7 @@ properties:
|
||||
- qcom,rpmcc-mdm9607
|
||||
- qcom,rpmcc-msm8226
|
||||
- qcom,rpmcc-msm8660
|
||||
- qcom,rpmcc-msm8909
|
||||
- qcom,rpmcc-msm8916
|
||||
- qcom,rpmcc-msm8936
|
||||
- qcom,rpmcc-msm8953
|
||||
@ -43,6 +44,7 @@ properties:
|
||||
- qcom,rpmcc-sdm660
|
||||
- qcom,rpmcc-sm6115
|
||||
- qcom,rpmcc-sm6125
|
||||
- qcom,rpmcc-sm6375
|
||||
- const: qcom,rpmcc
|
||||
|
||||
'#clock-cells':
|
||||
|
@ -21,6 +21,7 @@ properties:
|
||||
- qcom,sc7280-rpmh-clk
|
||||
- qcom,sc8180x-rpmh-clk
|
||||
- qcom,sc8280xp-rpmh-clk
|
||||
- qcom,sdm670-rpmh-clk
|
||||
- qcom,sdm845-rpmh-clk
|
||||
- qcom,sdx55-rpmh-clk
|
||||
- qcom,sdx65-rpmh-clk
|
||||
|
@ -36,13 +36,11 @@ properties:
|
||||
items:
|
||||
- description: LPASS qdsp6ss register
|
||||
- description: LPASS top-cc register
|
||||
- description: LPASS cc register
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: qdsp6ss
|
||||
- const: top_cc
|
||||
- const: cc
|
||||
|
||||
required:
|
||||
- compatible
|
||||
@ -59,8 +57,8 @@ examples:
|
||||
#include <dt-bindings/clock/qcom,lpass-sc7280.h>
|
||||
clock-controller@3000000 {
|
||||
compatible = "qcom,sc7280-lpasscc";
|
||||
reg = <0x03000000 0x40>, <0x03c04000 0x4>, <0x03389000 0x24>;
|
||||
reg-names = "qdsp6ss", "top_cc", "cc";
|
||||
reg = <0x03000000 0x40>, <0x03c04000 0x4>;
|
||||
reg-names = "qdsp6ss", "top_cc";
|
||||
clocks = <&gcc GCC_CFG_NOC_LPASS_CLK>;
|
||||
clock-names = "iface";
|
||||
#clock-cells = <1>;
|
||||
|
@ -22,6 +22,8 @@ properties:
|
||||
|
||||
clock-names: true
|
||||
|
||||
reg: true
|
||||
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,sc7280-lpassaoncc
|
||||
@ -38,8 +40,14 @@ properties:
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
qcom,adsp-pil-mode:
|
||||
description:
|
||||
Indicates if the LPASS would be brought out of reset using
|
||||
peripheral loader.
|
||||
type: boolean
|
||||
|
||||
required:
|
||||
- compatible
|
||||
@ -69,6 +77,11 @@ allOf:
|
||||
items:
|
||||
- const: bi_tcxo
|
||||
- const: lpass_aon_cc_main_rcg_clk_src
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: lpass core cc register
|
||||
- description: lpass audio csr register
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
@ -90,6 +103,8 @@ allOf:
|
||||
- const: bi_tcxo_ao
|
||||
- const: iface
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
@ -108,6 +123,8 @@ allOf:
|
||||
items:
|
||||
- const: bi_tcxo
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,rpmh.h>
|
||||
@ -116,13 +133,15 @@ examples:
|
||||
#include <dt-bindings/clock/qcom,lpasscorecc-sc7280.h>
|
||||
lpass_audiocc: clock-controller@3300000 {
|
||||
compatible = "qcom,sc7280-lpassaudiocc";
|
||||
reg = <0x3300000 0x30000>;
|
||||
reg = <0x3300000 0x30000>,
|
||||
<0x32a9000 0x1000>;
|
||||
clocks = <&rpmhcc RPMH_CXO_CLK>,
|
||||
<&lpass_aon LPASS_AON_CC_MAIN_RCG_CLK_SRC>;
|
||||
clock-names = "bi_tcxo", "lpass_aon_cc_main_rcg_clk_src";
|
||||
power-domains = <&lpass_aon LPASS_AON_CC_LPASS_AUDIO_HM_GDSC>;
|
||||
#clock-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
@ -165,6 +184,7 @@ examples:
|
||||
clocks = <&rpmhcc RPMH_CXO_CLK>, <&rpmhcc RPMH_CXO_CLK_A>,
|
||||
<&lpasscore LPASS_CORE_CC_CORE_CLK>;
|
||||
clock-names = "bi_tcxo", "bi_tcxo_ao","iface";
|
||||
qcom,adsp-pil-mode;
|
||||
#clock-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
|
@ -0,0 +1,70 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,sm6115-dispcc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Display Clock Controller for SM6115
|
||||
|
||||
maintainers:
|
||||
- Bjorn Andersson <andersson@kernel.org>
|
||||
|
||||
description: |
|
||||
Qualcomm display clock control module which supports the clocks and
|
||||
power domains on SM6115.
|
||||
|
||||
See also:
|
||||
include/dt-bindings/clock/qcom,sm6115-dispcc.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,sm6115-dispcc
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Board sleep clock
|
||||
- description: Byte clock from DSI PHY0
|
||||
- description: Pixel clock from DSI PHY0
|
||||
- description: GPLL0 DISP DIV clock from GCC
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,rpmcc.h>
|
||||
#include <dt-bindings/clock/qcom,gcc-sm6115.h>
|
||||
clock-controller@5f00000 {
|
||||
compatible = "qcom,sm6115-dispcc";
|
||||
reg = <0x5f00000 0x20000>;
|
||||
clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>,
|
||||
<&sleep_clk>,
|
||||
<&dsi0_phy 0>,
|
||||
<&dsi0_phy 1>,
|
||||
<&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
...
|
52
Documentation/devicetree/bindings/clock/qcom,sm6375-gcc.yaml
Normal file
52
Documentation/devicetree/bindings/clock/qcom,sm6375-gcc.yaml
Normal file
@ -0,0 +1,52 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,sm6375-gcc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Global Clock & Reset Controller Binding for SM6375
|
||||
|
||||
maintainers:
|
||||
- Konrad Dybcio <konrad.dybcio@somainline.org>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module which supports the clocks, resets and
|
||||
power domains on SM6375
|
||||
|
||||
See also:
|
||||
- dt-bindings/clock/qcom,sm6375-gcc.h
|
||||
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,sm6375-gcc
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Board XO Active-Only source
|
||||
- description: Sleep clock source
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,rpmcc.h>
|
||||
clock-controller@1400000 {
|
||||
compatible = "qcom,sm6375-gcc";
|
||||
reg = <0x01400000 0x1f0000>;
|
||||
clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>,
|
||||
<&rpmcc RPM_SMD_XO_A_CLK_SRC>,
|
||||
<&sleep_clk>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
|
||||
...
|
@ -0,0 +1,98 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,sm8450-dispcc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Display Clock & Reset Controller for SM8450
|
||||
|
||||
maintainers:
|
||||
- Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
|
||||
|
||||
description: |
|
||||
Qualcomm display clock control module which supports the clocks, resets and
|
||||
power domains on SM8450.
|
||||
|
||||
See also:
|
||||
include/dt-bindings/clock/qcom,sm8450-dispcc.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,sm8450-dispcc
|
||||
|
||||
clocks:
|
||||
minItems: 3
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Board Always On XO source
|
||||
- description: Display's AHB clock
|
||||
- description: sleep clock
|
||||
- description: Byte clock from DSI PHY0
|
||||
- description: Pixel clock from DSI PHY0
|
||||
- description: Byte clock from DSI PHY1
|
||||
- description: Pixel clock from DSI PHY1
|
||||
- description: Link clock from DP PHY0
|
||||
- description: VCO DIV clock from DP PHY0
|
||||
- description: Link clock from DP PHY1
|
||||
- description: VCO DIV clock from DP PHY1
|
||||
- description: Link clock from DP PHY2
|
||||
- description: VCO DIV clock from DP PHY2
|
||||
- description: Link clock from DP PHY3
|
||||
- description: VCO DIV clock from DP PHY3
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
power-domains:
|
||||
description:
|
||||
A phandle and PM domain specifier for the MMCX power domain.
|
||||
maxItems: 1
|
||||
|
||||
required-opps:
|
||||
description:
|
||||
A phandle to an OPP node describing required MMCX performance point.
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- '#clock-cells'
|
||||
- '#reset-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-sm8450.h>
|
||||
#include <dt-bindings/clock/qcom,rpmh.h>
|
||||
#include <dt-bindings/power/qcom-rpmpd.h>
|
||||
clock-controller@af00000 {
|
||||
compatible = "qcom,sm8450-dispcc";
|
||||
reg = <0x0af00000 0x10000>;
|
||||
clocks = <&rpmhcc RPMH_CXO_CLK>,
|
||||
<&rpmhcc RPMH_CXO_CLK_A>,
|
||||
<&gcc GCC_DISP_AHB_CLK>,
|
||||
<&sleep_clk>,
|
||||
<&dsi0_phy 0>,
|
||||
<&dsi0_phy 1>,
|
||||
<&dsi1_phy 0>,
|
||||
<&dsi1_phy 1>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
power-domains = <&rpmhpd SM8450_MMCX>;
|
||||
required-opps = <&rpmhpd_opp_low_svs>;
|
||||
};
|
||||
...
|
@ -33,10 +33,13 @@ properties:
|
||||
enum:
|
||||
- samsung,exynos850-cmu-top
|
||||
- samsung,exynos850-cmu-apm
|
||||
- samsung,exynos850-cmu-aud
|
||||
- samsung,exynos850-cmu-cmgp
|
||||
- samsung,exynos850-cmu-core
|
||||
- samsung,exynos850-cmu-dpu
|
||||
- samsung,exynos850-cmu-hsi
|
||||
- samsung,exynos850-cmu-is
|
||||
- samsung,exynos850-cmu-mfcmscl
|
||||
- samsung,exynos850-cmu-peri
|
||||
|
||||
clocks:
|
||||
@ -88,6 +91,24 @@ allOf:
|
||||
- const: oscclk
|
||||
- const: dout_clkcmu_apm_bus
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: samsung,exynos850-cmu-aud
|
||||
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: External reference clock (26 MHz)
|
||||
- description: AUD clock (from CMU_TOP)
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: oscclk
|
||||
- const: dout_aud
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
@ -172,6 +193,54 @@ allOf:
|
||||
- const: dout_hsi_mmc_card
|
||||
- const: dout_hsi_usb20drd
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: samsung,exynos850-cmu-is
|
||||
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: External reference clock (26 MHz)
|
||||
- description: CMU_IS bus clock (from CMU_TOP)
|
||||
- description: Image Texture Processing core clock (from CMU_TOP)
|
||||
- description: Visual Recognition Accelerator clock (from CMU_TOP)
|
||||
- description: Geometric Distortion Correction clock (from CMU_TOP)
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: oscclk
|
||||
- const: dout_is_bus
|
||||
- const: dout_is_itp
|
||||
- const: dout_is_vra
|
||||
- const: dout_is_gdc
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: samsung,exynos850-cmu-mfcmscl
|
||||
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: External reference clock (26 MHz)
|
||||
- description: Multi-Format Codec clock (from CMU_TOP)
|
||||
- description: Memory to Memory Scaler clock (from CMU_TOP)
|
||||
- description: Multi-Channel Scaler clock (from CMU_TOP)
|
||||
- description: JPEG codec clock (from CMU_TOP)
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: oscclk
|
||||
- const: dout_mfcmscl_mfc
|
||||
- const: dout_mfcmscl_m2m
|
||||
- const: dout_mfcmscl_mcsc
|
||||
- const: dout_mfcmscl_jpeg
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
|
@ -35,6 +35,8 @@ properties:
|
||||
- samsung,exynosautov9-cmu-top
|
||||
- samsung,exynosautov9-cmu-busmc
|
||||
- samsung,exynosautov9-cmu-core
|
||||
- samsung,exynosautov9-cmu-fsys0
|
||||
- samsung,exynosautov9-cmu-fsys1
|
||||
- samsung,exynosautov9-cmu-fsys2
|
||||
- samsung,exynosautov9-cmu-peric0
|
||||
- samsung,exynosautov9-cmu-peric1
|
||||
@ -107,6 +109,48 @@ allOf:
|
||||
- const: oscclk
|
||||
- const: dout_clkcmu_core_bus
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: samsung,exynosautov9-cmu-fsys0
|
||||
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: External reference clock (26 MHz)
|
||||
- description: CMU_FSYS0 bus clock (from CMU_TOP)
|
||||
- description: CMU_FSYS0 pcie clock (from CMU_TOP)
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: oscclk
|
||||
- const: dout_clkcmu_fsys0_bus
|
||||
- const: dout_clkcmu_fsys0_pcie
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: samsung,exynosautov9-cmu-fsys1
|
||||
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: External reference clock (26 MHz)
|
||||
- description: CMU_FSYS1 bus clock (from CMU_TOP)
|
||||
- description: CMU_FSYS1 mmc card clock (from CMU_TOP)
|
||||
- description: CMU_FSYS1 usb clock (from CMU_TOP)
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: oscclk
|
||||
- const: dout_clkcmu_fsys1_bus
|
||||
- const: dout_clkcmu_fsys1_mmc_card
|
||||
- const: dout_clkcmu_fsys1_usbdrd
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
|
@ -18023,12 +18023,14 @@ Q: https://patchwork.linuxtv.org/project/linux-media/list/
|
||||
F: drivers/media/platform/samsung/exynos4-is/
|
||||
|
||||
SAMSUNG SOC CLOCK DRIVERS
|
||||
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
M: Sylwester Nawrocki <s.nawrocki@samsung.com>
|
||||
M: Tomasz Figa <tomasz.figa@gmail.com>
|
||||
M: Chanwoo Choi <cw00.choi@samsung.com>
|
||||
R: Alim Akhtar <alim.akhtar@samsung.com>
|
||||
L: linux-samsung-soc@vger.kernel.org
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk.git
|
||||
F: Documentation/devicetree/bindings/clock/samsung,*.yaml
|
||||
F: Documentation/devicetree/bindings/clock/samsung,s3c*
|
||||
|
@ -622,7 +622,7 @@ static int aspeed_g6_clk_probe(struct platform_device *pdev)
|
||||
regmap_write(map, 0x308, 0x12000); /* 3x3 = 9 */
|
||||
|
||||
/* P-Bus (BCLK) clock divider */
|
||||
hw = clk_hw_register_divider_table(dev, "bclk", "hpll", 0,
|
||||
hw = clk_hw_register_divider_table(dev, "bclk", "epll", 0,
|
||||
scu_g6_base + ASPEED_G6_CLK_SELECTION1, 20, 3, 0,
|
||||
ast2600_div_table,
|
||||
&aspeed_g6_clk_lock);
|
||||
|
@ -8,14 +8,10 @@ obj-$(CONFIG_ARCH_DAVINCI_DA830) += pll-da830.o
|
||||
obj-$(CONFIG_ARCH_DAVINCI_DA850) += pll-da850.o
|
||||
obj-$(CONFIG_ARCH_DAVINCI_DM355) += pll-dm355.o
|
||||
obj-$(CONFIG_ARCH_DAVINCI_DM365) += pll-dm365.o
|
||||
obj-$(CONFIG_ARCH_DAVINCI_DM644x) += pll-dm644x.o
|
||||
obj-$(CONFIG_ARCH_DAVINCI_DM646x) += pll-dm646x.o
|
||||
|
||||
obj-y += psc.o
|
||||
obj-$(CONFIG_ARCH_DAVINCI_DA830) += psc-da830.o
|
||||
obj-$(CONFIG_ARCH_DAVINCI_DA850) += psc-da850.o
|
||||
obj-$(CONFIG_ARCH_DAVINCI_DM355) += psc-dm355.o
|
||||
obj-$(CONFIG_ARCH_DAVINCI_DM365) += psc-dm365.o
|
||||
obj-$(CONFIG_ARCH_DAVINCI_DM644x) += psc-dm644x.o
|
||||
obj-$(CONFIG_ARCH_DAVINCI_DM646x) += psc-dm646x.o
|
||||
endif
|
||||
|
@ -1,81 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* PLL clock descriptions for TI DM644X
|
||||
*
|
||||
* Copyright (C) 2018 David Lechner <david@lechnology.com>
|
||||
*/
|
||||
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/clk/davinci.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "pll.h"
|
||||
|
||||
static const struct davinci_pll_clk_info dm644x_pll1_info = {
|
||||
.name = "pll1",
|
||||
.pllm_mask = GENMASK(4, 0),
|
||||
.pllm_min = 1,
|
||||
.pllm_max = 32,
|
||||
.pllout_min_rate = 400000000,
|
||||
.pllout_max_rate = 600000000, /* 810MHz @ 1.3V, -810 only */
|
||||
.flags = PLL_HAS_CLKMODE | PLL_HAS_POSTDIV,
|
||||
};
|
||||
|
||||
SYSCLK(1, pll1_sysclk1, pll1_pllen, 4, SYSCLK_FIXED_DIV);
|
||||
SYSCLK(2, pll1_sysclk2, pll1_pllen, 4, SYSCLK_FIXED_DIV);
|
||||
SYSCLK(3, pll1_sysclk3, pll1_pllen, 4, SYSCLK_FIXED_DIV);
|
||||
SYSCLK(5, pll1_sysclk5, pll1_pllen, 4, SYSCLK_FIXED_DIV);
|
||||
|
||||
int dm644x_pll1_init(struct device *dev, void __iomem *base, struct regmap *cfgchip)
|
||||
{
|
||||
struct clk *clk;
|
||||
|
||||
davinci_pll_clk_register(dev, &dm644x_pll1_info, "ref_clk", base, cfgchip);
|
||||
|
||||
clk = davinci_pll_sysclk_register(dev, &pll1_sysclk1, base);
|
||||
clk_register_clkdev(clk, "pll1_sysclk1", "dm644x-psc");
|
||||
|
||||
clk = davinci_pll_sysclk_register(dev, &pll1_sysclk2, base);
|
||||
clk_register_clkdev(clk, "pll1_sysclk2", "dm644x-psc");
|
||||
|
||||
clk = davinci_pll_sysclk_register(dev, &pll1_sysclk3, base);
|
||||
clk_register_clkdev(clk, "pll1_sysclk3", "dm644x-psc");
|
||||
|
||||
clk = davinci_pll_sysclk_register(dev, &pll1_sysclk5, base);
|
||||
clk_register_clkdev(clk, "pll1_sysclk5", "dm644x-psc");
|
||||
|
||||
clk = davinci_pll_auxclk_register(dev, "pll1_auxclk", base);
|
||||
clk_register_clkdev(clk, "pll1_auxclk", "dm644x-psc");
|
||||
|
||||
davinci_pll_sysclkbp_clk_register(dev, "pll1_sysclkbp", base);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct davinci_pll_clk_info dm644x_pll2_info = {
|
||||
.name = "pll2",
|
||||
.pllm_mask = GENMASK(4, 0),
|
||||
.pllm_min = 1,
|
||||
.pllm_max = 32,
|
||||
.pllout_min_rate = 400000000,
|
||||
.pllout_max_rate = 900000000,
|
||||
.flags = PLL_HAS_POSTDIV | PLL_POSTDIV_FIXED_DIV,
|
||||
};
|
||||
|
||||
SYSCLK(1, pll2_sysclk1, pll2_pllen, 4, 0);
|
||||
SYSCLK(2, pll2_sysclk2, pll2_pllen, 4, 0);
|
||||
|
||||
int dm644x_pll2_init(struct device *dev, void __iomem *base, struct regmap *cfgchip)
|
||||
{
|
||||
davinci_pll_clk_register(dev, &dm644x_pll2_info, "oscin", base, cfgchip);
|
||||
|
||||
davinci_pll_sysclk_register(dev, &pll2_sysclk1, base);
|
||||
|
||||
davinci_pll_sysclk_register(dev, &pll2_sysclk2, base);
|
||||
|
||||
davinci_pll_sysclkbp_clk_register(dev, "pll2_sysclkbp", base);
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* PLL clock descriptions for TI DM646X
|
||||
*
|
||||
* Copyright (C) 2018 David Lechner <david@lechnology.com>
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/clk/davinci.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "pll.h"
|
||||
|
||||
static const struct davinci_pll_clk_info dm646x_pll1_info = {
|
||||
.name = "pll1",
|
||||
.pllm_mask = GENMASK(4, 0),
|
||||
.pllm_min = 14,
|
||||
.pllm_max = 32,
|
||||
.flags = PLL_HAS_CLKMODE,
|
||||
};
|
||||
|
||||
SYSCLK(1, pll1_sysclk1, pll1_pllen, 4, SYSCLK_FIXED_DIV);
|
||||
SYSCLK(2, pll1_sysclk2, pll1_pllen, 4, SYSCLK_FIXED_DIV);
|
||||
SYSCLK(3, pll1_sysclk3, pll1_pllen, 4, SYSCLK_FIXED_DIV);
|
||||
SYSCLK(4, pll1_sysclk4, pll1_pllen, 4, 0);
|
||||
SYSCLK(5, pll1_sysclk5, pll1_pllen, 4, 0);
|
||||
SYSCLK(6, pll1_sysclk6, pll1_pllen, 4, 0);
|
||||
SYSCLK(8, pll1_sysclk8, pll1_pllen, 4, 0);
|
||||
SYSCLK(9, pll1_sysclk9, pll1_pllen, 4, 0);
|
||||
|
||||
int dm646x_pll1_init(struct device *dev, void __iomem *base, struct regmap *cfgchip)
|
||||
{
|
||||
struct clk *clk;
|
||||
|
||||
davinci_pll_clk_register(dev, &dm646x_pll1_info, "ref_clk", base, cfgchip);
|
||||
|
||||
clk = davinci_pll_sysclk_register(dev, &pll1_sysclk1, base);
|
||||
clk_register_clkdev(clk, "pll1_sysclk1", "dm646x-psc");
|
||||
|
||||
clk = davinci_pll_sysclk_register(dev, &pll1_sysclk2, base);
|
||||
clk_register_clkdev(clk, "pll1_sysclk2", "dm646x-psc");
|
||||
|
||||
clk = davinci_pll_sysclk_register(dev, &pll1_sysclk3, base);
|
||||
clk_register_clkdev(clk, "pll1_sysclk3", "dm646x-psc");
|
||||
clk_register_clkdev(clk, NULL, "davinci-wdt");
|
||||
|
||||
clk = davinci_pll_sysclk_register(dev, &pll1_sysclk4, base);
|
||||
clk_register_clkdev(clk, "pll1_sysclk4", "dm646x-psc");
|
||||
|
||||
clk = davinci_pll_sysclk_register(dev, &pll1_sysclk5, base);
|
||||
clk_register_clkdev(clk, "pll1_sysclk5", "dm646x-psc");
|
||||
|
||||
davinci_pll_sysclk_register(dev, &pll1_sysclk6, base);
|
||||
|
||||
davinci_pll_sysclk_register(dev, &pll1_sysclk8, base);
|
||||
|
||||
davinci_pll_sysclk_register(dev, &pll1_sysclk9, base);
|
||||
|
||||
davinci_pll_sysclkbp_clk_register(dev, "pll1_sysclkbp", base);
|
||||
|
||||
davinci_pll_auxclk_register(dev, "pll1_auxclk", base);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct davinci_pll_clk_info dm646x_pll2_info = {
|
||||
.name = "pll2",
|
||||
.pllm_mask = GENMASK(4, 0),
|
||||
.pllm_min = 14,
|
||||
.pllm_max = 32,
|
||||
.flags = 0,
|
||||
};
|
||||
|
||||
SYSCLK(1, pll2_sysclk1, pll2_pllen, 4, SYSCLK_ALWAYS_ENABLED);
|
||||
|
||||
int dm646x_pll2_init(struct device *dev, void __iomem *base, struct regmap *cfgchip)
|
||||
{
|
||||
davinci_pll_clk_register(dev, &dm646x_pll2_info, "oscin", base, cfgchip);
|
||||
|
||||
davinci_pll_sysclk_register(dev, &pll2_sysclk1, base);
|
||||
|
||||
return 0;
|
||||
}
|
@ -889,14 +889,6 @@ static const struct platform_device_id davinci_pll_id_table[] = {
|
||||
#ifdef CONFIG_ARCH_DAVINCI_DM365
|
||||
{ .name = "dm365-pll1", .driver_data = (kernel_ulong_t)dm365_pll1_init },
|
||||
{ .name = "dm365-pll2", .driver_data = (kernel_ulong_t)dm365_pll2_init },
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_DAVINCI_DM644x
|
||||
{ .name = "dm644x-pll1", .driver_data = (kernel_ulong_t)dm644x_pll1_init },
|
||||
{ .name = "dm644x-pll2", .driver_data = (kernel_ulong_t)dm644x_pll2_init },
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_DAVINCI_DM646x
|
||||
{ .name = "dm646x-pll1", .driver_data = (kernel_ulong_t)dm646x_pll1_init },
|
||||
{ .name = "dm646x-pll2", .driver_data = (kernel_ulong_t)dm646x_pll2_init },
|
||||
#endif
|
||||
{ }
|
||||
};
|
||||
|
@ -130,11 +130,5 @@ int of_da850_pll1_init(struct device *dev, void __iomem *base, struct regmap *cf
|
||||
#ifdef CONFIG_ARCH_DAVINCI_DM355
|
||||
int dm355_pll2_init(struct device *dev, void __iomem *base, struct regmap *cfgchip);
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_DAVINCI_DM644x
|
||||
int dm644x_pll2_init(struct device *dev, void __iomem *base, struct regmap *cfgchip);
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_DAVINCI_DM646x
|
||||
int dm646x_pll2_init(struct device *dev, void __iomem *base, struct regmap *cfgchip);
|
||||
#endif
|
||||
|
||||
#endif /* __CLK_DAVINCI_PLL_H___ */
|
||||
|
@ -1,85 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* PSC clock descriptions for TI DaVinci DM644x
|
||||
*
|
||||
* Copyright (C) 2018 David Lechner <david@lechnology.com>
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/clk/davinci.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "psc.h"
|
||||
|
||||
LPSC_CLKDEV1(vpss_master_clkdev, "master", "vpss");
|
||||
LPSC_CLKDEV1(vpss_slave_clkdev, "slave", "vpss");
|
||||
LPSC_CLKDEV2(emac_clkdev, NULL, "davinci_emac.1",
|
||||
"fck", "davinci_mdio.0");
|
||||
LPSC_CLKDEV1(usb_clkdev, "usb", NULL);
|
||||
LPSC_CLKDEV1(ide_clkdev, NULL, "palm_bk3710");
|
||||
LPSC_CLKDEV2(aemif_clkdev, "aemif", NULL,
|
||||
NULL, "ti-aemif");
|
||||
LPSC_CLKDEV1(mmcsd_clkdev, NULL, "dm6441-mmc.0");
|
||||
LPSC_CLKDEV1(asp0_clkdev, NULL, "davinci-mcbsp");
|
||||
LPSC_CLKDEV1(i2c_clkdev, NULL, "i2c_davinci.1");
|
||||
LPSC_CLKDEV1(uart0_clkdev, NULL, "serial8250.0");
|
||||
LPSC_CLKDEV1(uart1_clkdev, NULL, "serial8250.1");
|
||||
LPSC_CLKDEV1(uart2_clkdev, NULL, "serial8250.2");
|
||||
/* REVISIT: gpio-davinci.c should be modified to drop con_id */
|
||||
LPSC_CLKDEV1(gpio_clkdev, "gpio", NULL);
|
||||
LPSC_CLKDEV1(timer0_clkdev, "timer0", NULL);
|
||||
LPSC_CLKDEV1(timer2_clkdev, NULL, "davinci-wdt");
|
||||
|
||||
static const struct davinci_lpsc_clk_info dm644x_psc_info[] = {
|
||||
LPSC(0, 0, vpss_master, pll1_sysclk3, vpss_master_clkdev, 0),
|
||||
LPSC(1, 0, vpss_slave, pll1_sysclk3, vpss_slave_clkdev, 0),
|
||||
LPSC(6, 0, emac, pll1_sysclk5, emac_clkdev, 0),
|
||||
LPSC(9, 0, usb, pll1_sysclk5, usb_clkdev, 0),
|
||||
LPSC(10, 0, ide, pll1_sysclk5, ide_clkdev, 0),
|
||||
LPSC(11, 0, vlynq, pll1_sysclk5, NULL, 0),
|
||||
LPSC(14, 0, aemif, pll1_sysclk5, aemif_clkdev, 0),
|
||||
LPSC(15, 0, mmcsd, pll1_sysclk5, mmcsd_clkdev, 0),
|
||||
LPSC(17, 0, asp0, pll1_sysclk5, asp0_clkdev, 0),
|
||||
LPSC(18, 0, i2c, pll1_auxclk, i2c_clkdev, 0),
|
||||
LPSC(19, 0, uart0, pll1_auxclk, uart0_clkdev, 0),
|
||||
LPSC(20, 0, uart1, pll1_auxclk, uart1_clkdev, 0),
|
||||
LPSC(21, 0, uart2, pll1_auxclk, uart2_clkdev, 0),
|
||||
LPSC(22, 0, spi, pll1_sysclk5, NULL, 0),
|
||||
LPSC(23, 0, pwm0, pll1_auxclk, NULL, 0),
|
||||
LPSC(24, 0, pwm1, pll1_auxclk, NULL, 0),
|
||||
LPSC(25, 0, pwm2, pll1_auxclk, NULL, 0),
|
||||
LPSC(26, 0, gpio, pll1_sysclk5, gpio_clkdev, 0),
|
||||
LPSC(27, 0, timer0, pll1_auxclk, timer0_clkdev, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(28, 0, timer1, pll1_auxclk, NULL, 0),
|
||||
/* REVISIT: why can't this be disabled? */
|
||||
LPSC(29, 0, timer2, pll1_auxclk, timer2_clkdev, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(31, 0, arm, pll1_sysclk2, NULL, LPSC_ALWAYS_ENABLED),
|
||||
/* REVISIT how to disable? */
|
||||
LPSC(39, 1, dsp, pll1_sysclk1, NULL, LPSC_ALWAYS_ENABLED),
|
||||
/* REVISIT how to disable? */
|
||||
LPSC(40, 1, vicp, pll1_sysclk2, NULL, LPSC_ALWAYS_ENABLED),
|
||||
{ }
|
||||
};
|
||||
|
||||
int dm644x_psc_init(struct device *dev, void __iomem *base)
|
||||
{
|
||||
return davinci_psc_register_clocks(dev, dm644x_psc_info, 41, base);
|
||||
}
|
||||
|
||||
static struct clk_bulk_data dm644x_psc_parent_clks[] = {
|
||||
{ .id = "pll1_sysclk1" },
|
||||
{ .id = "pll1_sysclk2" },
|
||||
{ .id = "pll1_sysclk3" },
|
||||
{ .id = "pll1_sysclk5" },
|
||||
{ .id = "pll1_auxclk" },
|
||||
};
|
||||
|
||||
const struct davinci_psc_init_data dm644x_psc_init_data = {
|
||||
.parent_clks = dm644x_psc_parent_clks,
|
||||
.num_parent_clks = ARRAY_SIZE(dm644x_psc_parent_clks),
|
||||
.psc_init = &dm644x_psc_init,
|
||||
};
|
@ -1,82 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* PSC clock descriptions for TI DaVinci DM646x
|
||||
*
|
||||
* Copyright (C) 2018 David Lechner <david@lechnology.com>
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/clk/davinci.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "psc.h"
|
||||
|
||||
LPSC_CLKDEV1(ide_clkdev, NULL, "palm_bk3710");
|
||||
LPSC_CLKDEV2(emac_clkdev, NULL, "davinci_emac.1",
|
||||
"fck", "davinci_mdio.0");
|
||||
LPSC_CLKDEV2(aemif_clkdev, "aemif", NULL,
|
||||
NULL, "ti-aemif");
|
||||
LPSC_CLKDEV1(mcasp0_clkdev, NULL, "davinci-mcasp.0");
|
||||
LPSC_CLKDEV1(mcasp1_clkdev, NULL, "davinci-mcasp.1");
|
||||
LPSC_CLKDEV1(uart0_clkdev, NULL, "serial8250.0");
|
||||
LPSC_CLKDEV1(uart1_clkdev, NULL, "serial8250.1");
|
||||
LPSC_CLKDEV1(uart2_clkdev, NULL, "serial8250.2");
|
||||
LPSC_CLKDEV1(i2c_clkdev, NULL, "i2c_davinci.1");
|
||||
/* REVISIT: gpio-davinci.c should be modified to drop con_id */
|
||||
LPSC_CLKDEV1(gpio_clkdev, "gpio", NULL);
|
||||
LPSC_CLKDEV1(timer0_clkdev, "timer0", NULL);
|
||||
|
||||
static const struct davinci_lpsc_clk_info dm646x_psc_info[] = {
|
||||
LPSC(0, 0, arm, pll1_sysclk2, NULL, LPSC_ALWAYS_ENABLED),
|
||||
/* REVISIT how to disable? */
|
||||
LPSC(1, 0, dsp, pll1_sysclk1, NULL, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(4, 0, edma_cc, pll1_sysclk2, NULL, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(5, 0, edma_tc0, pll1_sysclk2, NULL, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(6, 0, edma_tc1, pll1_sysclk2, NULL, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(7, 0, edma_tc2, pll1_sysclk2, NULL, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(8, 0, edma_tc3, pll1_sysclk2, NULL, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(10, 0, ide, pll1_sysclk4, ide_clkdev, 0),
|
||||
LPSC(14, 0, emac, pll1_sysclk3, emac_clkdev, 0),
|
||||
LPSC(16, 0, vpif0, ref_clk, NULL, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(17, 0, vpif1, ref_clk, NULL, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(21, 0, aemif, pll1_sysclk3, aemif_clkdev, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(22, 0, mcasp0, pll1_sysclk3, mcasp0_clkdev, 0),
|
||||
LPSC(23, 0, mcasp1, pll1_sysclk3, mcasp1_clkdev, 0),
|
||||
LPSC(26, 0, uart0, aux_clkin, uart0_clkdev, 0),
|
||||
LPSC(27, 0, uart1, aux_clkin, uart1_clkdev, 0),
|
||||
LPSC(28, 0, uart2, aux_clkin, uart2_clkdev, 0),
|
||||
/* REVIST: disabling hangs system */
|
||||
LPSC(29, 0, pwm0, pll1_sysclk3, NULL, LPSC_ALWAYS_ENABLED),
|
||||
/* REVIST: disabling hangs system */
|
||||
LPSC(30, 0, pwm1, pll1_sysclk3, NULL, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(31, 0, i2c, pll1_sysclk3, i2c_clkdev, 0),
|
||||
LPSC(33, 0, gpio, pll1_sysclk3, gpio_clkdev, 0),
|
||||
LPSC(34, 0, timer0, pll1_sysclk3, timer0_clkdev, LPSC_ALWAYS_ENABLED),
|
||||
LPSC(35, 0, timer1, pll1_sysclk3, NULL, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
int dm646x_psc_init(struct device *dev, void __iomem *base)
|
||||
{
|
||||
return davinci_psc_register_clocks(dev, dm646x_psc_info, 46, base);
|
||||
}
|
||||
|
||||
static struct clk_bulk_data dm646x_psc_parent_clks[] = {
|
||||
{ .id = "ref_clk" },
|
||||
{ .id = "aux_clkin" },
|
||||
{ .id = "pll1_sysclk1" },
|
||||
{ .id = "pll1_sysclk2" },
|
||||
{ .id = "pll1_sysclk3" },
|
||||
{ .id = "pll1_sysclk4" },
|
||||
{ .id = "pll1_sysclk5" },
|
||||
};
|
||||
|
||||
const struct davinci_psc_init_data dm646x_psc_init_data = {
|
||||
.parent_clks = dm646x_psc_parent_clks,
|
||||
.num_parent_clks = ARRAY_SIZE(dm646x_psc_parent_clks),
|
||||
.psc_init = &dm646x_psc_init,
|
||||
};
|
@ -516,12 +516,6 @@ static const struct platform_device_id davinci_psc_id_table[] = {
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_DAVINCI_DM365
|
||||
{ .name = "dm365-psc", .driver_data = (kernel_ulong_t)&dm365_psc_init_data },
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_DAVINCI_DM644x
|
||||
{ .name = "dm644x-psc", .driver_data = (kernel_ulong_t)&dm644x_psc_init_data },
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_DAVINCI_DM646x
|
||||
{ .name = "dm646x-psc", .driver_data = (kernel_ulong_t)&dm646x_psc_init_data },
|
||||
#endif
|
||||
{ }
|
||||
};
|
||||
|
@ -110,11 +110,5 @@ extern const struct davinci_psc_init_data dm355_psc_init_data;
|
||||
#ifdef CONFIG_ARCH_DAVINCI_DM365
|
||||
extern const struct davinci_psc_init_data dm365_psc_init_data;
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_DAVINCI_DM644x
|
||||
extern const struct davinci_psc_init_data dm644x_psc_init_data;
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_DAVINCI_DM646x
|
||||
extern const struct davinci_psc_init_data dm646x_psc_init_data;
|
||||
#endif
|
||||
|
||||
#endif /* __CLK_DAVINCI_PSC_H__ */
|
||||
|
@ -259,6 +259,43 @@ config COMMON_CLK_MT6779_AUDSYS
|
||||
help
|
||||
This driver supports Mediatek MT6779 audsys clocks.
|
||||
|
||||
config COMMON_CLK_MT6795
|
||||
tristate "Clock driver for MediaTek MT6795"
|
||||
depends on ARCH_MEDIATEK || COMPILE_TEST
|
||||
select COMMON_CLK_MEDIATEK
|
||||
default ARCH_MEDIATEK
|
||||
help
|
||||
This driver supports MediaTek MT6795 basic clocks and clocks
|
||||
required for various peripherals found on MediaTek.
|
||||
|
||||
config COMMON_CLK_MT6795_MFGCFG
|
||||
tristate "Clock driver for MediaTek MT6795 mfgcfg"
|
||||
depends on COMMON_CLK_MT6795
|
||||
default COMMON_CLK_MT6795
|
||||
help
|
||||
This driver supports MediaTek MT6795 mfgcfg clocks.
|
||||
|
||||
config COMMON_CLK_MT6795_MMSYS
|
||||
tristate "Clock driver for MediaTek MT6795 mmsys"
|
||||
depends on COMMON_CLK_MT6795
|
||||
default COMMON_CLK_MT6795
|
||||
help
|
||||
This driver supports MediaTek MT6795 mmsys clocks.
|
||||
|
||||
config COMMON_CLK_MT6795_VDECSYS
|
||||
tristate "Clock driver for MediaTek MT6795 VDECSYS"
|
||||
depends on COMMON_CLK_MT6795
|
||||
default COMMON_CLK_MT6795
|
||||
help
|
||||
This driver supports MediaTek MT6795 vdecsys clocks.
|
||||
|
||||
config COMMON_CLK_MT6795_VENCSYS
|
||||
tristate "Clock driver for MediaTek MT6795 VENCSYS"
|
||||
depends on COMMON_CLK_MT6795
|
||||
default COMMON_CLK_MT6795
|
||||
help
|
||||
This driver supports MediaTek MT6795 vencsys clocks.
|
||||
|
||||
config COMMON_CLK_MT6797
|
||||
bool "Clock driver for MediaTek MT6797"
|
||||
depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
|
||||
@ -608,6 +645,56 @@ config COMMON_CLK_MT8195
|
||||
help
|
||||
This driver supports MediaTek MT8195 clocks.
|
||||
|
||||
config COMMON_CLK_MT8365
|
||||
tristate "Clock driver for MediaTek MT8365"
|
||||
depends on ARCH_MEDIATEK || COMPILE_TEST
|
||||
select COMMON_CLK_MEDIATEK
|
||||
default ARCH_MEDIATEK && ARM64
|
||||
help
|
||||
This driver supports MediaTek MT8365 basic clocks.
|
||||
|
||||
config COMMON_CLK_MT8365_APU
|
||||
tristate "Clock driver for MediaTek MT8365 apu"
|
||||
depends on COMMON_CLK_MT8365
|
||||
default COMMON_CLK_MT8365
|
||||
help
|
||||
This driver supports MediaTek MT8365 apu clocks.
|
||||
|
||||
config COMMON_CLK_MT8365_CAM
|
||||
tristate "Clock driver for MediaTek MT8365 cam"
|
||||
depends on COMMON_CLK_MT8365
|
||||
default COMMON_CLK_MT8365
|
||||
help
|
||||
This driver supports MediaTek MT8365 cam clocks.
|
||||
|
||||
config COMMON_CLK_MT8365_MFG
|
||||
tristate "Clock driver for MediaTek MT8365 mfg"
|
||||
depends on COMMON_CLK_MT8365
|
||||
default COMMON_CLK_MT8365
|
||||
help
|
||||
This driver supports MediaTek MT8365 mfg clocks.
|
||||
|
||||
config COMMON_CLK_MT8365_MMSYS
|
||||
tristate "Clock driver for MediaTek MT8365 mmsys"
|
||||
depends on COMMON_CLK_MT8365
|
||||
default COMMON_CLK_MT8365
|
||||
help
|
||||
This driver supports MediaTek MT8365 mmsys clocks.
|
||||
|
||||
config COMMON_CLK_MT8365_VDEC
|
||||
tristate "Clock driver for MediaTek MT8365 vdec"
|
||||
depends on COMMON_CLK_MT8365
|
||||
default COMMON_CLK_MT8365
|
||||
help
|
||||
This driver supports MediaTek MT8365 vdec clocks.
|
||||
|
||||
config COMMON_CLK_MT8365_VENC
|
||||
tristate "Clock driver for MediaTek MT8365 venc"
|
||||
depends on COMMON_CLK_MT8365
|
||||
default COMMON_CLK_MT8365
|
||||
help
|
||||
This driver supports MediaTek MT8365 venc clocks.
|
||||
|
||||
config COMMON_CLK_MT8516
|
||||
bool "Clock driver for MediaTek MT8516"
|
||||
depends on ARCH_MEDIATEK || COMPILE_TEST
|
||||
|
@ -17,6 +17,12 @@ obj-$(CONFIG_COMMON_CLK_MT6779_VDECSYS) += clk-mt6779-vdec.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT6779_VENCSYS) += clk-mt6779-venc.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT6779_MFGCFG) += clk-mt6779-mfg.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT6779_AUDSYS) += clk-mt6779-aud.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT6795) += clk-mt6795-apmixedsys.o clk-mt6795-infracfg.o \
|
||||
clk-mt6795-pericfg.o clk-mt6795-topckgen.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT6795_MFGCFG) += clk-mt6795-mfg.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT6795_MMSYS) += clk-mt6795-mm.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT6795_VDECSYS) += clk-mt6795-vdecsys.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT6795_VENCSYS) += clk-mt6795-vencsys.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT6797) += clk-mt6797.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT6797_IMGSYS) += clk-mt6797-img.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT6797_MMSYS) += clk-mt6797-mm.o
|
||||
@ -97,5 +103,12 @@ obj-$(CONFIG_COMMON_CLK_MT8195) += clk-mt8195-apmixedsys.o clk-mt8195-topckgen.o
|
||||
clk-mt8195-venc.o clk-mt8195-vpp0.o clk-mt8195-vpp1.o \
|
||||
clk-mt8195-wpe.o clk-mt8195-imp_iic_wrap.o \
|
||||
clk-mt8195-apusys_pll.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8365) += clk-mt8365.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8365_APU) += clk-mt8365-apu.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8365_CAM) += clk-mt8365-cam.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8365_MFG) += clk-mt8365-mfg.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8365_MMSYS) += clk-mt8365-mm.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8365_VDEC) += clk-mt8365-vdec.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8365_VENC) += clk-mt8365-venc.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8516) += clk-mt8516.o
|
||||
obj-$(CONFIG_COMMON_CLK_MT8516_AUDSYS) += clk-mt8516-aud.o
|
||||
|
@ -70,7 +70,7 @@ static const struct clk_ops mtk_ref2usb_tx_ops = {
|
||||
.unprepare = mtk_ref2usb_tx_unprepare,
|
||||
};
|
||||
|
||||
struct clk_hw * __init mtk_clk_register_ref2usb_tx(const char *name,
|
||||
struct clk_hw *mtk_clk_register_ref2usb_tx(const char *name,
|
||||
const char *parent_name, void __iomem *reg)
|
||||
{
|
||||
struct mtk_ref2usb_tx *tx;
|
||||
@ -98,5 +98,15 @@ struct clk_hw * __init mtk_clk_register_ref2usb_tx(const char *name,
|
||||
|
||||
return &tx->hw;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtk_clk_register_ref2usb_tx);
|
||||
|
||||
void mtk_clk_unregister_ref2usb_tx(struct clk_hw *hw)
|
||||
{
|
||||
struct mtk_ref2usb_tx *tx = to_mtk_ref2usb_tx(hw);
|
||||
|
||||
clk_hw_unregister(hw);
|
||||
kfree(tx);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtk_clk_unregister_ref2usb_tx);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -150,6 +150,7 @@ err:
|
||||
|
||||
return PTR_ERR(hw);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtk_clk_register_cpumuxes);
|
||||
|
||||
void mtk_clk_unregister_cpumuxes(const struct mtk_composite *clks, int num,
|
||||
struct clk_hw_onecell_data *clk_data)
|
||||
@ -166,5 +167,6 @@ void mtk_clk_unregister_cpumuxes(const struct mtk_composite *clks, int num,
|
||||
clk_data->hws[mux->id] = ERR_PTR(-ENOENT);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtk_clk_unregister_cpumuxes);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -261,6 +261,7 @@ err:
|
||||
|
||||
return PTR_ERR(hw);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtk_clk_register_gates_with_dev);
|
||||
|
||||
int mtk_clk_register_gates(struct device_node *node,
|
||||
const struct mtk_gate *clks, int num,
|
||||
|
@ -94,33 +94,23 @@ static const struct mtk_gate bdp_clks[] = {
|
||||
GATE_BDP1(CLK_BDP_HDMI_MON, "hdmi_mon", "hdmi_0_pll340m", 16),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt2701_bdp[] = {
|
||||
{ .compatible = "mediatek,mt2701-bdpsys", },
|
||||
{}
|
||||
static const struct mtk_clk_desc bdp_desc = {
|
||||
.clks = bdp_clks,
|
||||
.num_clks = ARRAY_SIZE(bdp_clks),
|
||||
};
|
||||
|
||||
static int clk_mt2701_bdp_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_BDP_NR);
|
||||
|
||||
mtk_clk_register_gates(node, bdp_clks, ARRAY_SIZE(bdp_clks),
|
||||
clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
if (r)
|
||||
dev_err(&pdev->dev,
|
||||
"could not register clock provider: %s: %d\n",
|
||||
pdev->name, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct of_device_id of_match_clk_mt2701_bdp[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt2701-bdpsys",
|
||||
.data = &bdp_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt2701_bdp_drv = {
|
||||
.probe = clk_mt2701_bdp_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt2701-bdp",
|
||||
.of_match_table = of_match_clk_mt2701_bdp,
|
||||
|
@ -36,33 +36,23 @@ static const struct mtk_gate img_clks[] = {
|
||||
GATE_IMG(CLK_IMG_VENC, "img_venc", "mm_sel", 9),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt2701_img[] = {
|
||||
{ .compatible = "mediatek,mt2701-imgsys", },
|
||||
{}
|
||||
static const struct mtk_clk_desc img_desc = {
|
||||
.clks = img_clks,
|
||||
.num_clks = ARRAY_SIZE(img_clks),
|
||||
};
|
||||
|
||||
static int clk_mt2701_img_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_IMG_NR);
|
||||
|
||||
mtk_clk_register_gates(node, img_clks, ARRAY_SIZE(img_clks),
|
||||
clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
if (r)
|
||||
dev_err(&pdev->dev,
|
||||
"could not register clock provider: %s: %d\n",
|
||||
pdev->name, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct of_device_id of_match_clk_mt2701_img[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt2701-imgsys",
|
||||
.data = &img_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt2701_img_drv = {
|
||||
.probe = clk_mt2701_img_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt2701-img",
|
||||
.of_match_table = of_match_clk_mt2701_img,
|
||||
|
@ -47,33 +47,23 @@ static const struct mtk_gate vdec_clks[] = {
|
||||
GATE_VDEC1(CLK_VDEC_LARB, "vdec_larb_cken", "mm_sel", 0),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt2701_vdec[] = {
|
||||
{ .compatible = "mediatek,mt2701-vdecsys", },
|
||||
{}
|
||||
static const struct mtk_clk_desc vdec_desc = {
|
||||
.clks = vdec_clks,
|
||||
.num_clks = ARRAY_SIZE(vdec_clks),
|
||||
};
|
||||
|
||||
static int clk_mt2701_vdec_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_VDEC_NR);
|
||||
|
||||
mtk_clk_register_gates(node, vdec_clks, ARRAY_SIZE(vdec_clks),
|
||||
clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
if (r)
|
||||
dev_err(&pdev->dev,
|
||||
"could not register clock provider: %s: %d\n",
|
||||
pdev->name, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct of_device_id of_match_clk_mt2701_vdec[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt2701-vdecsys",
|
||||
.data = &vdec_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt2701_vdec_drv = {
|
||||
.probe = clk_mt2701_vdec_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt2701-vdec",
|
||||
.of_match_table = of_match_clk_mt2701_vdec,
|
||||
|
@ -58,33 +58,23 @@ static const struct mtk_gate bdp_clks[] = {
|
||||
GATE_BDP(CLK_BDP_TVD_CBUS, "bdp_tvd_cbus", "mm_sel", 30),
|
||||
};
|
||||
|
||||
static int clk_mt2712_bdp_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_BDP_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, bdp_clks, ARRAY_SIZE(bdp_clks),
|
||||
clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
if (r != 0)
|
||||
pr_err("%s(): could not register clock provider: %d\n",
|
||||
__func__, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct mtk_clk_desc bdp_desc = {
|
||||
.clks = bdp_clks,
|
||||
.num_clks = ARRAY_SIZE(bdp_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt2712_bdp[] = {
|
||||
{ .compatible = "mediatek,mt2712-bdpsys", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt2712-bdpsys",
|
||||
.data = &bdp_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt2712_bdp_drv = {
|
||||
.probe = clk_mt2712_bdp_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt2712-bdp",
|
||||
.of_match_table = of_match_clk_mt2712_bdp,
|
||||
|
@ -36,33 +36,23 @@ static const struct mtk_gate img_clks[] = {
|
||||
GATE_IMG(CLK_IMG_CAM_SV2_EN, "img_cam_sv2_en", "mm_sel", 11),
|
||||
};
|
||||
|
||||
static int clk_mt2712_img_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_IMG_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, img_clks, ARRAY_SIZE(img_clks),
|
||||
clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
if (r != 0)
|
||||
pr_err("%s(): could not register clock provider: %d\n",
|
||||
__func__, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct mtk_clk_desc img_desc = {
|
||||
.clks = img_clks,
|
||||
.num_clks = ARRAY_SIZE(img_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt2712_img[] = {
|
||||
{ .compatible = "mediatek,mt2712-imgsys", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt2712-imgsys",
|
||||
.data = &img_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt2712_img_drv = {
|
||||
.probe = clk_mt2712_img_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt2712-img",
|
||||
.of_match_table = of_match_clk_mt2712_img,
|
||||
|
@ -32,33 +32,23 @@ static const struct mtk_gate jpgdec_clks[] = {
|
||||
GATE_JPGDEC(CLK_JPGDEC_JPGDEC, "jpgdec_jpgdec", "jpgdec_sel", 4),
|
||||
};
|
||||
|
||||
static int clk_mt2712_jpgdec_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_JPGDEC_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, jpgdec_clks, ARRAY_SIZE(jpgdec_clks),
|
||||
clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
if (r != 0)
|
||||
pr_err("%s(): could not register clock provider: %d\n",
|
||||
__func__, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct mtk_clk_desc jpgdec_desc = {
|
||||
.clks = jpgdec_clks,
|
||||
.num_clks = ARRAY_SIZE(jpgdec_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt2712_jpgdec[] = {
|
||||
{ .compatible = "mediatek,mt2712-jpgdecsys", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt2712-jpgdecsys",
|
||||
.data = &jpgdec_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt2712_jpgdec_drv = {
|
||||
.probe = clk_mt2712_jpgdec_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt2712-jpgdec",
|
||||
.of_match_table = of_match_clk_mt2712_jpgdec,
|
||||
|
@ -31,33 +31,23 @@ static const struct mtk_gate mfg_clks[] = {
|
||||
GATE_MFG(CLK_MFG_BG3D, "mfg_bg3d", "mfg_sel", 0),
|
||||
};
|
||||
|
||||
static int clk_mt2712_mfg_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_MFG_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, mfg_clks, ARRAY_SIZE(mfg_clks),
|
||||
clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
if (r != 0)
|
||||
pr_err("%s(): could not register clock provider: %d\n",
|
||||
__func__, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
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_mt2712_mfg[] = {
|
||||
{ .compatible = "mediatek,mt2712-mfgcfg", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt2712-mfgcfg",
|
||||
.data = &mfg_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt2712_mfg_drv = {
|
||||
.probe = clk_mt2712_mfg_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt2712-mfg",
|
||||
.of_match_table = of_match_clk_mt2712_mfg,
|
||||
|
@ -50,33 +50,23 @@ static const struct mtk_gate vdec_clks[] = {
|
||||
GATE_VDEC1(CLK_VDEC_IMGRZ_CKEN, "vdec_imgrz_cken", "vdec_sel", 1),
|
||||
};
|
||||
|
||||
static int clk_mt2712_vdec_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_VDEC_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, vdec_clks, ARRAY_SIZE(vdec_clks),
|
||||
clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
if (r != 0)
|
||||
pr_err("%s(): could not register clock provider: %d\n",
|
||||
__func__, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct mtk_clk_desc vdec_desc = {
|
||||
.clks = vdec_clks,
|
||||
.num_clks = ARRAY_SIZE(vdec_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt2712_vdec[] = {
|
||||
{ .compatible = "mediatek,mt2712-vdecsys", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt2712-vdecsys",
|
||||
.data = &vdec_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt2712_vdec_drv = {
|
||||
.probe = clk_mt2712_vdec_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt2712-vdec",
|
||||
.of_match_table = of_match_clk_mt2712_vdec,
|
||||
|
@ -33,33 +33,23 @@ static const struct mtk_gate venc_clks[] = {
|
||||
GATE_VENC(CLK_VENC_SMI_LARB6, "venc_smi_larb6", "jpgdec_sel", 12),
|
||||
};
|
||||
|
||||
static int clk_mt2712_venc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_VENC_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, venc_clks, ARRAY_SIZE(venc_clks),
|
||||
clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
if (r != 0)
|
||||
pr_err("%s(): could not register clock provider: %d\n",
|
||||
__func__, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
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_mt2712_venc[] = {
|
||||
{ .compatible = "mediatek,mt2712-vencsys", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt2712-vencsys",
|
||||
.data = &venc_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt2712_venc_drv = {
|
||||
.probe = clk_mt2712_venc_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt2712-venc",
|
||||
.of_match_table = of_match_clk_mt2712_venc,
|
||||
|
@ -64,33 +64,23 @@ static const struct mtk_gate audio_clks[] = {
|
||||
"audio_ck", 7),
|
||||
};
|
||||
|
||||
static int clk_mt6765_audio_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_AUDIO_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, audio_clks,
|
||||
ARRAY_SIZE(audio_clks), clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
if (r)
|
||||
pr_err("%s(): could not register clock provider: %d\n",
|
||||
__func__, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct mtk_clk_desc audio_desc = {
|
||||
.clks = audio_clks,
|
||||
.num_clks = ARRAY_SIZE(audio_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6765_audio[] = {
|
||||
{ .compatible = "mediatek,mt6765-audsys", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt6765-audsys",
|
||||
.data = &audio_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6765_audio_drv = {
|
||||
.probe = clk_mt6765_audio_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6765-audio",
|
||||
.of_match_table = of_match_clk_mt6765_audio,
|
||||
|
@ -39,32 +39,23 @@ static const struct mtk_gate cam_clks[] = {
|
||||
GATE_CAM(CLK_CAM_CCU, "cam_ccu", "mm_ck", 12),
|
||||
};
|
||||
|
||||
static int clk_mt6765_cam_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_CAM_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, cam_clks, ARRAY_SIZE(cam_clks), clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
if (r)
|
||||
pr_err("%s(): could not register clock provider: %d\n",
|
||||
__func__, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct mtk_clk_desc cam_desc = {
|
||||
.clks = cam_clks,
|
||||
.num_clks = ARRAY_SIZE(cam_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6765_cam[] = {
|
||||
{ .compatible = "mediatek,mt6765-camsys", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt6765-camsys",
|
||||
.data = &cam_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6765_cam_drv = {
|
||||
.probe = clk_mt6765_cam_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6765-cam",
|
||||
.of_match_table = of_match_clk_mt6765_cam,
|
||||
|
@ -35,32 +35,23 @@ static const struct mtk_gate img_clks[] = {
|
||||
GATE_IMG(CLK_IMG_RSC, "img_rsc", "mm_ck", 5),
|
||||
};
|
||||
|
||||
static int clk_mt6765_img_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_IMG_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, img_clks, ARRAY_SIZE(img_clks), clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
if (r)
|
||||
pr_err("%s(): could not register clock provider: %d\n",
|
||||
__func__, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct mtk_clk_desc img_desc = {
|
||||
.clks = img_clks,
|
||||
.num_clks = ARRAY_SIZE(img_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6765_img[] = {
|
||||
{ .compatible = "mediatek,mt6765-imgsys", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt6765-imgsys",
|
||||
.data = &img_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6765_img_drv = {
|
||||
.probe = clk_mt6765_img_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6765-img",
|
||||
.of_match_table = of_match_clk_mt6765_img,
|
||||
|
@ -32,33 +32,23 @@ static const struct mtk_gate mipi0a_clks[] = {
|
||||
"mipi0a_csr_0a", "f_fseninf_ck", 1),
|
||||
};
|
||||
|
||||
static int clk_mt6765_mipi0a_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_MIPI0A_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, mipi0a_clks,
|
||||
ARRAY_SIZE(mipi0a_clks), clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
if (r)
|
||||
pr_err("%s(): could not register clock provider: %d\n",
|
||||
__func__, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct mtk_clk_desc mipi0a_desc = {
|
||||
.clks = mipi0a_clks,
|
||||
.num_clks = ARRAY_SIZE(mipi0a_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6765_mipi0a[] = {
|
||||
{ .compatible = "mediatek,mt6765-mipi0a", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt6765-mipi0a",
|
||||
.data = &mipi0a_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6765_mipi0a_drv = {
|
||||
.probe = clk_mt6765_mipi0a_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6765-mipi0a",
|
||||
.of_match_table = of_match_clk_mt6765_mipi0a,
|
||||
|
@ -61,32 +61,23 @@ static const struct mtk_gate mm_clks[] = {
|
||||
GATE_MM(CLK_MM_F26M_HRTWT, "mm_hrtwt", "f_f26m_ck", 29),
|
||||
};
|
||||
|
||||
static int clk_mt6765_mm_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks), clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
if (r)
|
||||
pr_err("%s(): could not register clock provider: %d\n",
|
||||
__func__, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct mtk_clk_desc mm_desc = {
|
||||
.clks = mm_clks,
|
||||
.num_clks = ARRAY_SIZE(mm_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6765_mm[] = {
|
||||
{ .compatible = "mediatek,mt6765-mmsys", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt6765-mmsys",
|
||||
.data = &mm_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6765_mm_drv = {
|
||||
.probe = clk_mt6765_mm_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6765-mm",
|
||||
.of_match_table = of_match_clk_mt6765_mm,
|
||||
|
@ -34,33 +34,23 @@ static const struct mtk_gate venc_clks[] = {
|
||||
GATE_VENC(CLK_VENC_SET3_VDEC, "venc_set3_vdec", "mm_ck", 12),
|
||||
};
|
||||
|
||||
static int clk_mt6765_vcodec_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_VENC_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, venc_clks,
|
||||
ARRAY_SIZE(venc_clks), clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
if (r)
|
||||
pr_err("%s(): could not register clock provider: %d\n",
|
||||
__func__, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
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_mt6765_vcodec[] = {
|
||||
{ .compatible = "mediatek,mt6765-vcodecsys", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt6765-vcodecsys",
|
||||
.data = &venc_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6765_vcodec_drv = {
|
||||
.probe = clk_mt6765_vcodec_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6765-vcodec",
|
||||
.of_match_table = of_match_clk_mt6765_vcodec,
|
||||
|
@ -89,26 +89,23 @@ static const struct mtk_gate audio_clks[] = {
|
||||
"audio_h_sel", 31),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6779_aud[] = {
|
||||
{ .compatible = "mediatek,mt6779-audio", },
|
||||
{}
|
||||
static const struct mtk_clk_desc audio_desc = {
|
||||
.clks = audio_clks,
|
||||
.num_clks = ARRAY_SIZE(audio_clks),
|
||||
};
|
||||
|
||||
static int clk_mt6779_aud_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_AUD_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, audio_clks, ARRAY_SIZE(audio_clks),
|
||||
clk_data);
|
||||
|
||||
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
static const struct of_device_id of_match_clk_mt6779_aud[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt6779-audio",
|
||||
.data = &audio_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6779_aud_drv = {
|
||||
.probe = clk_mt6779_aud_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6779-aud",
|
||||
.of_match_table = of_match_clk_mt6779_aud,
|
||||
|
@ -38,26 +38,23 @@ static const struct mtk_gate cam_clks[] = {
|
||||
GATE_CAM(CLK_CAM_FAKE_ENG, "camsys_fake_eng", "cam_sel", 14),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6779_cam[] = {
|
||||
{ .compatible = "mediatek,mt6779-camsys", },
|
||||
{}
|
||||
static const struct mtk_clk_desc cam_desc = {
|
||||
.clks = cam_clks,
|
||||
.num_clks = ARRAY_SIZE(cam_clks),
|
||||
};
|
||||
|
||||
static int clk_mt6779_cam_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_CAM_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, cam_clks, ARRAY_SIZE(cam_clks),
|
||||
clk_data);
|
||||
|
||||
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
static const struct of_device_id of_match_clk_mt6779_cam[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt6779-camsys",
|
||||
.data = &cam_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6779_cam_drv = {
|
||||
.probe = clk_mt6779_cam_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6779-cam",
|
||||
.of_match_table = of_match_clk_mt6779_cam,
|
||||
|
@ -30,26 +30,23 @@ static const struct mtk_gate img_clks[] = {
|
||||
GATE_IMG(CLK_IMG_WPE_A, "imgsys_wpe_a", "img_sel", 7),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6779_img[] = {
|
||||
{ .compatible = "mediatek,mt6779-imgsys", },
|
||||
{}
|
||||
static const struct mtk_clk_desc img_desc = {
|
||||
.clks = img_clks,
|
||||
.num_clks = ARRAY_SIZE(img_clks),
|
||||
};
|
||||
|
||||
static int clk_mt6779_img_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_IMG_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, img_clks, ARRAY_SIZE(img_clks),
|
||||
clk_data);
|
||||
|
||||
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
static const struct of_device_id of_match_clk_mt6779_img[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt6779-imgsys",
|
||||
.data = &img_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6779_img_drv = {
|
||||
.probe = clk_mt6779_img_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6779-img",
|
||||
.of_match_table = of_match_clk_mt6779_img,
|
||||
|
@ -32,26 +32,23 @@ static const struct mtk_gate ipe_clks[] = {
|
||||
GATE_IPE(CLK_IPE_DPE, "ipe_dpe", "ipe_sel", 6),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6779_ipe[] = {
|
||||
{ .compatible = "mediatek,mt6779-ipesys", },
|
||||
{}
|
||||
static const struct mtk_clk_desc ipe_desc = {
|
||||
.clks = ipe_clks,
|
||||
.num_clks = ARRAY_SIZE(ipe_clks),
|
||||
};
|
||||
|
||||
static int clk_mt6779_ipe_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_IPE_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, ipe_clks, ARRAY_SIZE(ipe_clks),
|
||||
clk_data);
|
||||
|
||||
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
static const struct of_device_id of_match_clk_mt6779_ipe[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt6779-ipesys",
|
||||
.data = &ipe_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6779_ipe_drv = {
|
||||
.probe = clk_mt6779_ipe_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6779-ipe",
|
||||
.of_match_table = of_match_clk_mt6779_ipe,
|
||||
|
@ -27,26 +27,23 @@ static const struct mtk_gate mfg_clks[] = {
|
||||
GATE_MFG(CLK_MFGCFG_BG3D, "mfg_bg3d", "mfg_sel", 0),
|
||||
};
|
||||
|
||||
static int clk_mt6779_mfg_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_MFGCFG_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, mfg_clks, ARRAY_SIZE(mfg_clks),
|
||||
clk_data);
|
||||
|
||||
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
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_mt6779_mfg[] = {
|
||||
{ .compatible = "mediatek,mt6779-mfgcfg", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt6779-mfgcfg",
|
||||
.data = &mfg_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6779_mfg_drv = {
|
||||
.probe = clk_mt6779_mfg_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6779-mfg",
|
||||
.of_match_table = of_match_clk_mt6779_mfg,
|
||||
|
@ -39,26 +39,23 @@ static const struct mtk_gate vdec_clks[] = {
|
||||
GATE_VDEC1_I(CLK_VDEC_LARB1, "vdec_larb1_cken", "vdec_sel", 0),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6779_vdec[] = {
|
||||
{ .compatible = "mediatek,mt6779-vdecsys", },
|
||||
{}
|
||||
static const struct mtk_clk_desc vdec_desc = {
|
||||
.clks = vdec_clks,
|
||||
.num_clks = ARRAY_SIZE(vdec_clks),
|
||||
};
|
||||
|
||||
static int clk_mt6779_vdec_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_VDEC_GCON_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, vdec_clks, ARRAY_SIZE(vdec_clks),
|
||||
clk_data);
|
||||
|
||||
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
static const struct of_device_id of_match_clk_mt6779_vdec[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt6779-vdecsys",
|
||||
.data = &vdec_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6779_vdec_drv = {
|
||||
.probe = clk_mt6779_vdec_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6779-vdec",
|
||||
.of_match_table = of_match_clk_mt6779_vdec,
|
||||
|
@ -30,26 +30,23 @@ static const struct mtk_gate venc_clks[] = {
|
||||
GATE_VENC_I(CLK_VENC_GCON_GALS, "venc_gals", "venc_sel", 28),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6779_venc[] = {
|
||||
{ .compatible = "mediatek,mt6779-vencsys", },
|
||||
{}
|
||||
static const struct mtk_clk_desc venc_desc = {
|
||||
.clks = venc_clks,
|
||||
.num_clks = ARRAY_SIZE(venc_clks),
|
||||
};
|
||||
|
||||
static int clk_mt6779_venc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_VENC_GCON_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, venc_clks, ARRAY_SIZE(venc_clks),
|
||||
clk_data);
|
||||
|
||||
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
static const struct of_device_id of_match_clk_mt6779_venc[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt6779-vencsys",
|
||||
.data = &venc_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6779_venc_drv = {
|
||||
.probe = clk_mt6779_venc_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6779-venc",
|
||||
.of_match_table = of_match_clk_mt6779_venc,
|
||||
|
157
drivers/clk/mediatek/clk-mt6795-apmixedsys.c
Normal file
157
drivers/clk/mediatek/clk-mt6795-apmixedsys.c
Normal file
@ -0,0 +1,157 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2022 Collabora Ltd.
|
||||
* Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
*/
|
||||
|
||||
#include <dt-bindings/clock/mediatek,mt6795-clk.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-pll.h"
|
||||
|
||||
#define REG_REF2USB 0x8
|
||||
#define REG_AP_PLL_CON7 0x1c
|
||||
#define MD1_MTCMOS_OFF BIT(0)
|
||||
#define MD1_MEM_OFF BIT(1)
|
||||
#define MD1_CLK_OFF BIT(4)
|
||||
#define MD1_ISO_OFF BIT(8)
|
||||
|
||||
#define MT6795_PLL_FMAX (3000UL * MHZ)
|
||||
#define MT6795_CON0_EN BIT(0)
|
||||
#define MT6795_CON0_RST_BAR BIT(24)
|
||||
|
||||
#define PLL(_id, _name, _reg, _pwr_reg, _en_mask, _flags, _pcwbits, \
|
||||
_pd_reg, _pd_shift, _tuner_reg, _pcw_reg, _pcw_shift) { \
|
||||
.id = _id, \
|
||||
.name = _name, \
|
||||
.reg = _reg, \
|
||||
.pwr_reg = _pwr_reg, \
|
||||
.en_mask = MT6795_CON0_EN | _en_mask, \
|
||||
.flags = _flags, \
|
||||
.rst_bar_mask = MT6795_CON0_RST_BAR, \
|
||||
.fmax = MT6795_PLL_FMAX, \
|
||||
.pcwbits = _pcwbits, \
|
||||
.pd_reg = _pd_reg, \
|
||||
.pd_shift = _pd_shift, \
|
||||
.tuner_reg = _tuner_reg, \
|
||||
.pcw_reg = _pcw_reg, \
|
||||
.pcw_shift = _pcw_shift, \
|
||||
.div_table = NULL, \
|
||||
.pll_en_bit = 0, \
|
||||
}
|
||||
|
||||
static const struct mtk_pll_data plls[] = {
|
||||
PLL(CLK_APMIXED_ARMCA53PLL, "armca53pll", 0x200, 0x20c, 0, PLL_AO,
|
||||
21, 0x204, 24, 0x0, 0x204, 0),
|
||||
PLL(CLK_APMIXED_MAINPLL, "mainpll", 0x220, 0x22c, 0xf0000101, HAVE_RST_BAR,
|
||||
21, 0x220, 4, 0x0, 0x224, 0),
|
||||
PLL(CLK_APMIXED_UNIVPLL, "univpll", 0x230, 0x23c, 0xfe000101, HAVE_RST_BAR,
|
||||
7, 0x230, 4, 0x0, 0x234, 14),
|
||||
PLL(CLK_APMIXED_MMPLL, "mmpll", 0x240, 0x24c, 0, 0, 21, 0x244, 24, 0x0, 0x244, 0),
|
||||
PLL(CLK_APMIXED_MSDCPLL, "msdcpll", 0x250, 0x25c, 0, 0, 21, 0x250, 4, 0x0, 0x254, 0),
|
||||
PLL(CLK_APMIXED_VENCPLL, "vencpll", 0x260, 0x26c, 0, 0, 21, 0x260, 4, 0x0, 0x264, 0),
|
||||
PLL(CLK_APMIXED_TVDPLL, "tvdpll", 0x270, 0x27c, 0, 0, 21, 0x270, 4, 0x0, 0x274, 0),
|
||||
PLL(CLK_APMIXED_MPLL, "mpll", 0x280, 0x28c, 0, 0, 21, 0x280, 4, 0x0, 0x284, 0),
|
||||
PLL(CLK_APMIXED_VCODECPLL, "vcodecpll", 0x290, 0x29c, 0, 0, 21, 0x290, 4, 0x0, 0x294, 0),
|
||||
PLL(CLK_APMIXED_APLL1, "apll1", 0x2a0, 0x2b0, 0, 0, 31, 0x2a0, 4, 0x2a8, 0x2a4, 0),
|
||||
PLL(CLK_APMIXED_APLL2, "apll2", 0x2b4, 0x2c4, 0, 0, 31, 0x2b4, 4, 0x2bc, 0x2b8, 0),
|
||||
};
|
||||
|
||||
static void clk_mt6795_apmixed_setup_md1(void __iomem *base)
|
||||
{
|
||||
void __iomem *reg = base + REG_AP_PLL_CON7;
|
||||
|
||||
/* Turn on MD1 internal clock */
|
||||
writel(readl(reg) & ~MD1_CLK_OFF, reg);
|
||||
|
||||
/* Unlock MD1's MTCMOS power path */
|
||||
writel(readl(reg) & ~MD1_MTCMOS_OFF, reg);
|
||||
|
||||
/* Turn on ISO */
|
||||
writel(readl(reg) & ~MD1_ISO_OFF, reg);
|
||||
|
||||
/* Turn on memory */
|
||||
writel(readl(reg) & ~MD1_MEM_OFF, reg);
|
||||
}
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6795_apmixed[] = {
|
||||
{ .compatible = "mediatek,mt6795-apmixedsys" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
static int clk_mt6795_apmixed_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *node = dev->of_node;
|
||||
void __iomem *base;
|
||||
struct clk_hw *hw;
|
||||
int ret;
|
||||
|
||||
base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK);
|
||||
if (!clk_data)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data);
|
||||
if (ret)
|
||||
goto free_clk_data;
|
||||
|
||||
hw = mtk_clk_register_ref2usb_tx("ref2usb_tx", "clk26m", base + REG_REF2USB);
|
||||
if (IS_ERR(hw)) {
|
||||
ret = PTR_ERR(hw);
|
||||
dev_err(dev, "Failed to register ref2usb_tx: %d\n", ret);
|
||||
goto unregister_plls;
|
||||
}
|
||||
clk_data->hws[CLK_APMIXED_REF2USB_TX] = hw;
|
||||
|
||||
ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
if (ret) {
|
||||
dev_err(dev, "Cannot register clock provider: %d\n", ret);
|
||||
goto unregister_ref2usb;
|
||||
}
|
||||
|
||||
/* Setup MD1 to avoid random crashes */
|
||||
dev_dbg(dev, "Performing initial setup for MD1\n");
|
||||
clk_mt6795_apmixed_setup_md1(base);
|
||||
|
||||
return 0;
|
||||
|
||||
unregister_ref2usb:
|
||||
mtk_clk_unregister_ref2usb_tx(clk_data->hws[CLK_APMIXED_REF2USB_TX]);
|
||||
unregister_plls:
|
||||
mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data);
|
||||
free_clk_data:
|
||||
mtk_free_clk_data(clk_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int clk_mt6795_apmixed_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
|
||||
|
||||
of_clk_del_provider(node);
|
||||
mtk_clk_unregister_ref2usb_tx(clk_data->hws[CLK_APMIXED_REF2USB_TX]);
|
||||
mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data);
|
||||
mtk_free_clk_data(clk_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver clk_mt6795_apmixed_drv = {
|
||||
.probe = clk_mt6795_apmixed_probe,
|
||||
.remove = clk_mt6795_apmixed_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6795-apmixed",
|
||||
.of_match_table = of_match_clk_mt6795_apmixed,
|
||||
},
|
||||
};
|
||||
module_platform_driver(clk_mt6795_apmixed_drv);
|
||||
|
||||
MODULE_DESCRIPTION("MediaTek MT6795 apmixed clocks driver");
|
||||
MODULE_LICENSE("GPL");
|
151
drivers/clk/mediatek/clk-mt6795-infracfg.c
Normal file
151
drivers/clk/mediatek/clk-mt6795-infracfg.c
Normal file
@ -0,0 +1,151 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2022 Collabora Ltd.
|
||||
* Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
*/
|
||||
|
||||
#include <dt-bindings/clock/mediatek,mt6795-clk.h>
|
||||
#include <dt-bindings/reset/mediatek,mt6795-resets.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include "clk-cpumux.h"
|
||||
#include "clk-gate.h"
|
||||
#include "clk-mtk.h"
|
||||
#include "reset.h"
|
||||
|
||||
#define GATE_ICG(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &infra_cg_regs, \
|
||||
_shift, &mtk_clk_gate_ops_no_setclr)
|
||||
|
||||
static const struct mtk_gate_regs infra_cg_regs = {
|
||||
.set_ofs = 0x0040,
|
||||
.clr_ofs = 0x0044,
|
||||
.sta_ofs = 0x0048,
|
||||
};
|
||||
|
||||
static const char * const ca53_c0_parents[] = {
|
||||
"clk26m",
|
||||
"armca53pll",
|
||||
"mainpll",
|
||||
"univpll"
|
||||
};
|
||||
|
||||
static const char * const ca53_c1_parents[] = {
|
||||
"clk26m",
|
||||
"armca53pll",
|
||||
"mainpll",
|
||||
"univpll"
|
||||
};
|
||||
|
||||
static const struct mtk_composite cpu_muxes[] = {
|
||||
MUX(CLK_INFRA_CA53_C0_SEL, "infra_ca53_c0_sel", ca53_c0_parents, 0x00, 0, 2),
|
||||
MUX(CLK_INFRA_CA53_C1_SEL, "infra_ca53_c1_sel", ca53_c1_parents, 0x00, 2, 2),
|
||||
};
|
||||
|
||||
static const struct mtk_gate infra_gates[] = {
|
||||
GATE_ICG(CLK_INFRA_DBGCLK, "infra_dbgclk", "axi_sel", 0),
|
||||
GATE_ICG(CLK_INFRA_SMI, "infra_smi", "mm_sel", 1),
|
||||
GATE_ICG(CLK_INFRA_AUDIO, "infra_audio", "aud_intbus_sel", 5),
|
||||
GATE_ICG(CLK_INFRA_GCE, "infra_gce", "axi_sel", 6),
|
||||
GATE_ICG(CLK_INFRA_L2C_SRAM, "infra_l2c_sram", "axi_sel", 7),
|
||||
GATE_ICG(CLK_INFRA_M4U, "infra_m4u", "mem_sel", 8),
|
||||
GATE_ICG(CLK_INFRA_MD1MCU, "infra_md1mcu", "clk26m", 9),
|
||||
GATE_ICG(CLK_INFRA_MD1BUS, "infra_md1bus", "axi_sel", 10),
|
||||
GATE_ICG(CLK_INFRA_MD1DBB, "infra_dbb", "axi_sel", 11),
|
||||
GATE_ICG(CLK_INFRA_DEVICE_APC, "infra_devapc", "clk26m", 12),
|
||||
GATE_ICG(CLK_INFRA_TRNG, "infra_trng", "axi_sel", 13),
|
||||
GATE_ICG(CLK_INFRA_MD1LTE, "infra_md1lte", "axi_sel", 14),
|
||||
GATE_ICG(CLK_INFRA_CPUM, "infra_cpum", "cpum_ck", 15),
|
||||
GATE_ICG(CLK_INFRA_KP, "infra_kp", "axi_sel", 16),
|
||||
};
|
||||
|
||||
static u16 infra_ao_rst_ofs[] = { 0x30, 0x34 };
|
||||
|
||||
static u16 infra_ao_idx_map[] = {
|
||||
[MT6795_INFRA_RST0_SCPSYS_RST] = 0 * RST_NR_PER_BANK + 5,
|
||||
[MT6795_INFRA_RST0_PMIC_WRAP_RST] = 0 * RST_NR_PER_BANK + 7,
|
||||
[MT6795_INFRA_RST1_MIPI_DSI_RST] = 1 * RST_NR_PER_BANK + 4,
|
||||
[MT6795_INFRA_RST1_MIPI_CSI_RST] = 1 * RST_NR_PER_BANK + 7,
|
||||
[MT6795_INFRA_RST1_MM_IOMMU_RST] = 1 * RST_NR_PER_BANK + 15,
|
||||
};
|
||||
|
||||
static const struct mtk_clk_rst_desc clk_rst_desc = {
|
||||
.version = MTK_RST_SET_CLR,
|
||||
.rst_bank_ofs = infra_ao_rst_ofs,
|
||||
.rst_bank_nr = ARRAY_SIZE(infra_ao_rst_ofs),
|
||||
.rst_idx_map = infra_ao_idx_map,
|
||||
.rst_idx_map_nr = ARRAY_SIZE(infra_ao_idx_map),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6795_infracfg[] = {
|
||||
{ .compatible = "mediatek,mt6795-infracfg" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
static int clk_mt6795_infracfg_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
void __iomem *base;
|
||||
int ret;
|
||||
|
||||
base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
|
||||
if (!clk_data)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = mtk_register_reset_controller_with_dev(&pdev->dev, &clk_rst_desc);
|
||||
if (ret)
|
||||
goto free_clk_data;
|
||||
|
||||
ret = mtk_clk_register_gates(node, infra_gates, ARRAY_SIZE(infra_gates), clk_data);
|
||||
if (ret)
|
||||
goto free_clk_data;
|
||||
|
||||
ret = mtk_clk_register_cpumuxes(node, cpu_muxes, ARRAY_SIZE(cpu_muxes), clk_data);
|
||||
if (ret)
|
||||
goto unregister_gates;
|
||||
|
||||
ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
if (ret)
|
||||
goto unregister_cpumuxes;
|
||||
|
||||
return 0;
|
||||
|
||||
unregister_cpumuxes:
|
||||
mtk_clk_unregister_cpumuxes(cpu_muxes, ARRAY_SIZE(cpu_muxes), clk_data);
|
||||
unregister_gates:
|
||||
mtk_clk_unregister_gates(infra_gates, ARRAY_SIZE(infra_gates), clk_data);
|
||||
free_clk_data:
|
||||
mtk_free_clk_data(clk_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int clk_mt6795_infracfg_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
|
||||
|
||||
of_clk_del_provider(node);
|
||||
mtk_clk_unregister_cpumuxes(cpu_muxes, ARRAY_SIZE(cpu_muxes), clk_data);
|
||||
mtk_clk_unregister_gates(infra_gates, ARRAY_SIZE(infra_gates), clk_data);
|
||||
mtk_free_clk_data(clk_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver clk_mt6795_infracfg_drv = {
|
||||
.driver = {
|
||||
.name = "clk-mt6795-infracfg",
|
||||
.of_match_table = of_match_clk_mt6795_infracfg,
|
||||
},
|
||||
.probe = clk_mt6795_infracfg_probe,
|
||||
.remove = clk_mt6795_infracfg_remove,
|
||||
};
|
||||
module_platform_driver(clk_mt6795_infracfg_drv);
|
||||
|
||||
MODULE_DESCRIPTION("MediaTek MT6795 infracfg clocks driver");
|
||||
MODULE_LICENSE("GPL");
|
50
drivers/clk/mediatek/clk-mt6795-mfg.c
Normal file
50
drivers/clk/mediatek/clk-mt6795-mfg.c
Normal file
@ -0,0 +1,50 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2022 Collabora Ltd.
|
||||
* Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
*/
|
||||
|
||||
#include <dt-bindings/clock/mediatek,mt6795-clk.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include "clk-gate.h"
|
||||
#include "clk-mtk.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_BAXI, "mfg_baxi", "axi_mfg_in_sel", 0),
|
||||
GATE_MFG(CLK_MFG_BMEM, "mfg_bmem", "mem_mfg_in_sel", 1),
|
||||
GATE_MFG(CLK_MFG_BG3D, "mfg_bg3d", "mfg_sel", 2),
|
||||
GATE_MFG(CLK_MFG_B26M, "mfg_b26m", "clk26m", 3),
|
||||
};
|
||||
|
||||
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_mt6795_mfg[] = {
|
||||
{ .compatible = "mediatek,mt6795-mfgcfg", .data = &mfg_desc },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6795_mfg_drv = {
|
||||
.driver = {
|
||||
.name = "clk-mt6795-mfg",
|
||||
.of_match_table = of_match_clk_mt6795_mfg,
|
||||
},
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
};
|
||||
module_platform_driver(clk_mt6795_mfg_drv);
|
||||
|
||||
MODULE_DESCRIPTION("MediaTek MT6795 mfg clocks driver");
|
||||
MODULE_LICENSE("GPL");
|
132
drivers/clk/mediatek/clk-mt6795-mm.c
Normal file
132
drivers/clk/mediatek/clk-mt6795-mm.c
Normal file
@ -0,0 +1,132 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2022 Collabora Ltd.
|
||||
* Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
*/
|
||||
|
||||
#include <dt-bindings/clock/mediatek,mt6795-clk.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include "clk-gate.h"
|
||||
#include "clk-mtk.h"
|
||||
|
||||
#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)
|
||||
|
||||
static const struct mtk_gate_regs mm0_cg_regs = {
|
||||
.set_ofs = 0x0104,
|
||||
.clr_ofs = 0x0108,
|
||||
.sta_ofs = 0x0100,
|
||||
};
|
||||
|
||||
static const struct mtk_gate_regs mm1_cg_regs = {
|
||||
.set_ofs = 0x0114,
|
||||
.clr_ofs = 0x0118,
|
||||
.sta_ofs = 0x0110,
|
||||
};
|
||||
|
||||
static const struct mtk_gate mm_gates[] = {
|
||||
/* MM0 */
|
||||
GATE_MM0(CLK_MM_SMI_COMMON, "mm_smi_common", "mm_sel", 0),
|
||||
GATE_MM0(CLK_MM_SMI_LARB0, "mm_smi_larb0", "mm_sel", 1),
|
||||
GATE_MM0(CLK_MM_CAM_MDP, "mm_cam_mdp", "mm_sel", 2),
|
||||
GATE_MM0(CLK_MM_MDP_RDMA0, "mm_mdp_rdma0", "mm_sel", 3),
|
||||
GATE_MM0(CLK_MM_MDP_RDMA1, "mm_mdp_rdma1", "mm_sel", 4),
|
||||
GATE_MM0(CLK_MM_MDP_RSZ0, "mm_mdp_rsz0", "mm_sel", 5),
|
||||
GATE_MM0(CLK_MM_MDP_RSZ1, "mm_mdp_rsz1", "mm_sel", 6),
|
||||
GATE_MM0(CLK_MM_MDP_RSZ2, "mm_mdp_rsz2", "mm_sel", 7),
|
||||
GATE_MM0(CLK_MM_MDP_TDSHP0, "mm_mdp_tdshp0", "mm_sel", 8),
|
||||
GATE_MM0(CLK_MM_MDP_TDSHP1, "mm_mdp_tdshp1", "mm_sel", 9),
|
||||
GATE_MM0(CLK_MM_MDP_CROP, "mm_mdp_crop", "mm_sel", 10),
|
||||
GATE_MM0(CLK_MM_MDP_WDMA, "mm_mdp_wdma", "mm_sel", 11),
|
||||
GATE_MM0(CLK_MM_MDP_WROT0, "mm_mdp_wrot0", "mm_sel", 12),
|
||||
GATE_MM0(CLK_MM_MDP_WROT1, "mm_mdp_wrot1", "mm_sel", 13),
|
||||
GATE_MM0(CLK_MM_FAKE_ENG, "mm_fake_eng", "mm_sel", 14),
|
||||
GATE_MM0(CLK_MM_MUTEX_32K, "mm_mutex_32k", "clk32k", 15),
|
||||
GATE_MM0(CLK_MM_DISP_OVL0, "mm_disp_ovl0", "mm_sel", 16),
|
||||
GATE_MM0(CLK_MM_DISP_OVL1, "mm_disp_ovl1", "mm_sel", 17),
|
||||
GATE_MM0(CLK_MM_DISP_RDMA0, "mm_disp_rdma0", "mm_sel", 18),
|
||||
GATE_MM0(CLK_MM_DISP_RDMA1, "mm_disp_rdma1", "mm_sel", 19),
|
||||
GATE_MM0(CLK_MM_DISP_RDMA2, "mm_disp_rdma2", "mm_sel", 20),
|
||||
GATE_MM0(CLK_MM_DISP_WDMA0, "mm_disp_wdma0", "mm_sel", 21),
|
||||
GATE_MM0(CLK_MM_DISP_WDMA1, "mm_disp_wdma1", "mm_sel", 22),
|
||||
GATE_MM0(CLK_MM_DISP_COLOR0, "mm_disp_color0", "mm_sel", 23),
|
||||
GATE_MM0(CLK_MM_DISP_COLOR1, "mm_disp_color1", "mm_sel", 24),
|
||||
GATE_MM0(CLK_MM_DISP_AAL, "mm_disp_aal", "mm_sel", 25),
|
||||
GATE_MM0(CLK_MM_DISP_GAMMA, "mm_disp_gamma", "mm_sel", 26),
|
||||
GATE_MM0(CLK_MM_DISP_UFOE, "mm_disp_ufoe", "mm_sel", 27),
|
||||
GATE_MM0(CLK_MM_DISP_SPLIT0, "mm_disp_split0", "mm_sel", 28),
|
||||
GATE_MM0(CLK_MM_DISP_SPLIT1, "mm_disp_split1", "mm_sel", 29),
|
||||
GATE_MM0(CLK_MM_DISP_MERGE, "mm_disp_merge", "mm_sel", 30),
|
||||
GATE_MM0(CLK_MM_DISP_OD, "mm_disp_od", "mm_sel", 31),
|
||||
|
||||
/* MM1 */
|
||||
GATE_MM1(CLK_MM_DISP_PWM0MM, "mm_disp_pwm0mm", "mm_sel", 0),
|
||||
GATE_MM1(CLK_MM_DISP_PWM026M, "mm_disp_pwm026m", "pwm_sel", 1),
|
||||
GATE_MM1(CLK_MM_DISP_PWM1MM, "mm_disp_pwm1mm", "mm_sel", 2),
|
||||
GATE_MM1(CLK_MM_DISP_PWM126M, "mm_disp_pwm126m", "pwm_sel", 3),
|
||||
GATE_MM1(CLK_MM_DSI0_ENGINE, "mm_dsi0_engine", "mm_sel", 4),
|
||||
GATE_MM1(CLK_MM_DSI0_DIGITAL, "mm_dsi0_digital", "dsi0_dig", 5),
|
||||
GATE_MM1(CLK_MM_DSI1_ENGINE, "mm_dsi1_engine", "mm_sel", 6),
|
||||
GATE_MM1(CLK_MM_DSI1_DIGITAL, "mm_dsi1_digital", "dsi1_dig", 7),
|
||||
GATE_MM1(CLK_MM_DPI_PIXEL, "mm_dpi_pixel", "dpi0_sel", 8),
|
||||
GATE_MM1(CLK_MM_DPI_ENGINE, "mm_dpi_engine", "mm_sel", 9),
|
||||
};
|
||||
|
||||
static int clk_mt6795_mm_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *node = dev->parent->of_node;
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int ret;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK);
|
||||
if (!clk_data)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = mtk_clk_register_gates(node, mm_gates, ARRAY_SIZE(mm_gates), clk_data);
|
||||
if (ret)
|
||||
goto free_clk_data;
|
||||
|
||||
ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
if (ret)
|
||||
goto unregister_gates;
|
||||
|
||||
platform_set_drvdata(pdev, clk_data);
|
||||
|
||||
return 0;
|
||||
|
||||
unregister_gates:
|
||||
mtk_clk_unregister_gates(mm_gates, ARRAY_SIZE(mm_gates), clk_data);
|
||||
free_clk_data:
|
||||
mtk_free_clk_data(clk_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int clk_mt6795_mm_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *node = dev->parent->of_node;
|
||||
struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
|
||||
|
||||
of_clk_del_provider(node);
|
||||
mtk_clk_unregister_gates(mm_gates, ARRAY_SIZE(mm_gates), clk_data);
|
||||
mtk_free_clk_data(clk_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver clk_mt6795_mm_drv = {
|
||||
.driver = {
|
||||
.name = "clk-mt6795-mm",
|
||||
},
|
||||
.probe = clk_mt6795_mm_probe,
|
||||
.remove = clk_mt6795_mm_remove,
|
||||
};
|
||||
module_platform_driver(clk_mt6795_mm_drv);
|
||||
|
||||
MODULE_DESCRIPTION("MediaTek MT6795 MultiMedia clocks driver");
|
||||
MODULE_LICENSE("GPL");
|
160
drivers/clk/mediatek/clk-mt6795-pericfg.c
Normal file
160
drivers/clk/mediatek/clk-mt6795-pericfg.c
Normal file
@ -0,0 +1,160 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2022 Collabora Ltd.
|
||||
* Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
*/
|
||||
|
||||
#include <dt-bindings/clock/mediatek,mt6795-clk.h>
|
||||
#include <dt-bindings/reset/mediatek,mt6795-resets.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include "clk-gate.h"
|
||||
#include "clk-mtk.h"
|
||||
#include "reset.h"
|
||||
|
||||
#define GATE_PERI(_id, _name, _parent, _shift) \
|
||||
GATE_MTK(_id, _name, _parent, &peri_cg_regs, \
|
||||
_shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
static DEFINE_SPINLOCK(mt6795_peri_clk_lock);
|
||||
|
||||
static const struct mtk_gate_regs peri_cg_regs = {
|
||||
.set_ofs = 0x0008,
|
||||
.clr_ofs = 0x0010,
|
||||
.sta_ofs = 0x0018,
|
||||
};
|
||||
|
||||
static const char * const uart_ck_sel_parents[] = {
|
||||
"clk26m",
|
||||
"uart_sel",
|
||||
};
|
||||
|
||||
static const struct mtk_composite peri_clks[] = {
|
||||
MUX(CLK_PERI_UART0_SEL, "uart0_ck_sel", uart_ck_sel_parents, 0x40c, 0, 1),
|
||||
MUX(CLK_PERI_UART1_SEL, "uart1_ck_sel", uart_ck_sel_parents, 0x40c, 1, 1),
|
||||
MUX(CLK_PERI_UART2_SEL, "uart2_ck_sel", uart_ck_sel_parents, 0x40c, 2, 1),
|
||||
MUX(CLK_PERI_UART3_SEL, "uart3_ck_sel", uart_ck_sel_parents, 0x40c, 3, 1),
|
||||
};
|
||||
|
||||
static const struct mtk_gate peri_gates[] = {
|
||||
GATE_PERI(CLK_PERI_NFI, "peri_nfi", "axi_sel", 0),
|
||||
GATE_PERI(CLK_PERI_THERM, "peri_therm", "axi_sel", 1),
|
||||
GATE_PERI(CLK_PERI_PWM1, "peri_pwm1", "axi_sel", 2),
|
||||
GATE_PERI(CLK_PERI_PWM2, "peri_pwm2", "axi_sel", 3),
|
||||
GATE_PERI(CLK_PERI_PWM3, "peri_pwm3", "axi_sel", 4),
|
||||
GATE_PERI(CLK_PERI_PWM4, "peri_pwm4", "axi_sel", 5),
|
||||
GATE_PERI(CLK_PERI_PWM5, "peri_pwm5", "axi_sel", 6),
|
||||
GATE_PERI(CLK_PERI_PWM6, "peri_pwm6", "axi_sel", 7),
|
||||
GATE_PERI(CLK_PERI_PWM7, "peri_pwm7", "axi_sel", 8),
|
||||
GATE_PERI(CLK_PERI_PWM, "peri_pwm", "axi_sel", 9),
|
||||
GATE_PERI(CLK_PERI_USB0, "peri_usb0", "usb30_sel", 10),
|
||||
GATE_PERI(CLK_PERI_USB1, "peri_usb1", "usb20_sel", 11),
|
||||
GATE_PERI(CLK_PERI_AP_DMA, "peri_ap_dma", "axi_sel", 12),
|
||||
GATE_PERI(CLK_PERI_MSDC30_0, "peri_msdc30_0", "msdc50_0_sel", 13),
|
||||
GATE_PERI(CLK_PERI_MSDC30_1, "peri_msdc30_1", "msdc30_1_sel", 14),
|
||||
GATE_PERI(CLK_PERI_MSDC30_2, "peri_msdc30_2", "msdc30_2_sel", 15),
|
||||
GATE_PERI(CLK_PERI_MSDC30_3, "peri_msdc30_3", "msdc30_3_sel", 16),
|
||||
GATE_PERI(CLK_PERI_NLI_ARB, "peri_nli_arb", "axi_sel", 17),
|
||||
GATE_PERI(CLK_PERI_IRDA, "peri_irda", "irda_sel", 18),
|
||||
GATE_PERI(CLK_PERI_UART0, "peri_uart0", "axi_sel", 19),
|
||||
GATE_PERI(CLK_PERI_UART1, "peri_uart1", "axi_sel", 20),
|
||||
GATE_PERI(CLK_PERI_UART2, "peri_uart2", "axi_sel", 21),
|
||||
GATE_PERI(CLK_PERI_UART3, "peri_uart3", "axi_sel", 22),
|
||||
GATE_PERI(CLK_PERI_I2C0, "peri_i2c0", "axi_sel", 23),
|
||||
GATE_PERI(CLK_PERI_I2C1, "peri_i2c1", "axi_sel", 24),
|
||||
GATE_PERI(CLK_PERI_I2C2, "peri_i2c2", "axi_sel", 25),
|
||||
GATE_PERI(CLK_PERI_I2C3, "peri_i2c3", "axi_sel", 26),
|
||||
GATE_PERI(CLK_PERI_I2C4, "peri_i2c4", "axi_sel", 27),
|
||||
GATE_PERI(CLK_PERI_AUXADC, "peri_auxadc", "clk26m", 28),
|
||||
GATE_PERI(CLK_PERI_SPI0, "peri_spi0", "spi_sel", 29),
|
||||
};
|
||||
|
||||
static u16 peri_rst_ofs[] = { 0x0 };
|
||||
|
||||
static u16 peri_idx_map[] = {
|
||||
[MT6795_PERI_NFI_SW_RST] = 14,
|
||||
[MT6795_PERI_THERM_SW_RST] = 16,
|
||||
[MT6795_PERI_MSDC1_SW_RST] = 20,
|
||||
};
|
||||
|
||||
static const struct mtk_clk_rst_desc clk_rst_desc = {
|
||||
.version = MTK_RST_SIMPLE,
|
||||
.rst_bank_ofs = peri_rst_ofs,
|
||||
.rst_bank_nr = ARRAY_SIZE(peri_rst_ofs),
|
||||
.rst_idx_map = peri_idx_map,
|
||||
.rst_idx_map_nr = ARRAY_SIZE(peri_idx_map),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6795_pericfg[] = {
|
||||
{ .compatible = "mediatek,mt6795-pericfg" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
static int clk_mt6795_pericfg_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
void __iomem *base;
|
||||
int ret;
|
||||
|
||||
base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK);
|
||||
if (!clk_data)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = mtk_register_reset_controller_with_dev(&pdev->dev, &clk_rst_desc);
|
||||
if (ret)
|
||||
goto free_clk_data;
|
||||
|
||||
ret = mtk_clk_register_gates(node, peri_gates, ARRAY_SIZE(peri_gates), clk_data);
|
||||
if (ret)
|
||||
goto free_clk_data;
|
||||
|
||||
ret = mtk_clk_register_composites(peri_clks, ARRAY_SIZE(peri_clks), base,
|
||||
&mt6795_peri_clk_lock, clk_data);
|
||||
if (ret)
|
||||
goto unregister_gates;
|
||||
|
||||
ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
if (ret)
|
||||
goto unregister_composites;
|
||||
|
||||
return 0;
|
||||
|
||||
unregister_composites:
|
||||
mtk_clk_unregister_composites(peri_clks, ARRAY_SIZE(peri_clks), clk_data);
|
||||
unregister_gates:
|
||||
mtk_clk_unregister_gates(peri_gates, ARRAY_SIZE(peri_gates), clk_data);
|
||||
free_clk_data:
|
||||
mtk_free_clk_data(clk_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int clk_mt6795_pericfg_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
|
||||
|
||||
of_clk_del_provider(node);
|
||||
mtk_clk_unregister_composites(peri_clks, ARRAY_SIZE(peri_clks), clk_data);
|
||||
mtk_clk_unregister_gates(peri_gates, ARRAY_SIZE(peri_gates), clk_data);
|
||||
mtk_free_clk_data(clk_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver clk_mt6795_pericfg_drv = {
|
||||
.driver = {
|
||||
.name = "clk-mt6795-pericfg",
|
||||
.of_match_table = of_match_clk_mt6795_pericfg,
|
||||
},
|
||||
.probe = clk_mt6795_pericfg_probe,
|
||||
.remove = clk_mt6795_pericfg_remove,
|
||||
};
|
||||
module_platform_driver(clk_mt6795_pericfg_drv);
|
||||
|
||||
MODULE_DESCRIPTION("MediaTek MT6795 pericfg clocks driver");
|
||||
MODULE_LICENSE("GPL");
|
610
drivers/clk/mediatek/clk-mt6795-topckgen.c
Normal file
610
drivers/clk/mediatek/clk-mt6795-topckgen.c
Normal file
@ -0,0 +1,610 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2022 Collabora Ltd.
|
||||
* Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
*/
|
||||
|
||||
#include <dt-bindings/clock/mediatek,mt6795-clk.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include "clk-gate.h"
|
||||
#include "clk-mtk.h"
|
||||
#include "clk-mux.h"
|
||||
|
||||
/*
|
||||
* For some clocks, we don't care what their actual rates are. And these
|
||||
* clocks may change their rate on different products or different scenarios.
|
||||
* So we model these clocks' rate as 0, to denote it's not an actual rate.
|
||||
*/
|
||||
#define DUMMY_RATE 0
|
||||
|
||||
#define TOP_MUX_GATE_NOSR(_id, _name, _parents, _reg, _shift, _width, _gate, _flags) \
|
||||
MUX_GATE_CLR_SET_UPD_FLAGS(_id, _name, _parents, _reg, \
|
||||
(_reg + 0x4), (_reg + 0x8), _shift, _width, \
|
||||
_gate, 0, -1, _flags)
|
||||
|
||||
#define TOP_MUX_GATE(_id, _name, _parents, _reg, _shift, _width, _gate, _flags) \
|
||||
TOP_MUX_GATE_NOSR(_id, _name, _parents, _reg, _shift, _width, \
|
||||
_gate, CLK_SET_RATE_PARENT | _flags)
|
||||
|
||||
static DEFINE_SPINLOCK(mt6795_top_clk_lock);
|
||||
|
||||
static const char * const aud_1_parents[] = {
|
||||
"clk26m",
|
||||
"apll1_ck",
|
||||
"univpll2_d4",
|
||||
"univpll2_d8"
|
||||
};
|
||||
|
||||
static const char * const aud_2_parents[] = {
|
||||
"clk26m",
|
||||
"apll2_ck",
|
||||
"univpll2_d4",
|
||||
"univpll2_d8"
|
||||
};
|
||||
|
||||
static const char * const aud_intbus_parents[] = {
|
||||
"clk26m",
|
||||
"syspll1_d4",
|
||||
"syspll4_d2",
|
||||
"univpll3_d2",
|
||||
"univpll2_d8",
|
||||
"dmpll_d4",
|
||||
"dmpll_d8"
|
||||
};
|
||||
|
||||
static const char * const audio_parents[] = {
|
||||
"clk26m",
|
||||
"syspll3_d4",
|
||||
"syspll4_d4",
|
||||
"syspll1_d16"
|
||||
};
|
||||
|
||||
static const char * const axi_mfg_in_parents[] = {
|
||||
"clk26m",
|
||||
"axi_sel",
|
||||
"dmpll_d2"
|
||||
};
|
||||
|
||||
static const char * const axi_parents[] = {
|
||||
"clk26m",
|
||||
"syspll1_d2",
|
||||
"syspll_d5",
|
||||
"syspll1_d4",
|
||||
"univpll_d5",
|
||||
"univpll2_d2",
|
||||
"dmpll_d2",
|
||||
"dmpll_d4"
|
||||
};
|
||||
|
||||
static const char * const camtg_parents[] = {
|
||||
"clk26m",
|
||||
"univpll_d26",
|
||||
"univpll2_d2",
|
||||
"syspll3_d2",
|
||||
"syspll3_d4",
|
||||
"univpll1_d4",
|
||||
"dmpll_d8"
|
||||
};
|
||||
|
||||
static const char * const cci400_parents[] = {
|
||||
"clk26m",
|
||||
"vencpll_ck",
|
||||
"clk26m",
|
||||
"clk26m",
|
||||
"univpll_d2",
|
||||
"syspll_d2",
|
||||
"msdcpll_ck",
|
||||
"dmpll_ck"
|
||||
};
|
||||
|
||||
static const char * const ddrphycfg_parents[] = {
|
||||
"clk26m",
|
||||
"syspll1_d8"
|
||||
};
|
||||
|
||||
static const char * const dpi0_parents[] = {
|
||||
"clk26m",
|
||||
"tvdpll_d2",
|
||||
"tvdpll_d4",
|
||||
"clk26m",
|
||||
"clk26m",
|
||||
"tvdpll_d8",
|
||||
"tvdpll_d16"
|
||||
};
|
||||
|
||||
static const char * const i2s0_m_ck_parents[] = {
|
||||
"apll1_div1",
|
||||
"apll2_div1"
|
||||
};
|
||||
|
||||
static const char * const i2s1_m_ck_parents[] = {
|
||||
"apll1_div2",
|
||||
"apll2_div2"
|
||||
};
|
||||
|
||||
static const char * const i2s2_m_ck_parents[] = {
|
||||
"apll1_div3",
|
||||
"apll2_div3"
|
||||
};
|
||||
|
||||
static const char * const i2s3_m_ck_parents[] = {
|
||||
"apll1_div4",
|
||||
"apll2_div4"
|
||||
};
|
||||
|
||||
static const char * const i2s3_b_ck_parents[] = {
|
||||
"apll1_div5",
|
||||
"apll2_div5"
|
||||
};
|
||||
|
||||
static const char * const irda_parents[] = {
|
||||
"clk26m",
|
||||
"univpll2_d4",
|
||||
"syspll2_d4",
|
||||
"dmpll_d8",
|
||||
};
|
||||
|
||||
static const char * const mem_mfg_in_parents[] = {
|
||||
"clk26m",
|
||||
"mmpll_ck",
|
||||
"dmpll_ck"
|
||||
};
|
||||
|
||||
static const char * const mem_parents[] = {
|
||||
"clk26m",
|
||||
"dmpll_ck"
|
||||
};
|
||||
|
||||
static const char * const mfg_parents[] = {
|
||||
"clk26m",
|
||||
"mmpll_ck",
|
||||
"dmpll_ck",
|
||||
"clk26m",
|
||||
"clk26m",
|
||||
"clk26m",
|
||||
"clk26m",
|
||||
"clk26m",
|
||||
"clk26m",
|
||||
"syspll_d3",
|
||||
"syspll1_d2",
|
||||
"syspll_d5",
|
||||
"univpll_d3",
|
||||
"univpll1_d2",
|
||||
"univpll_d5",
|
||||
"univpll2_d2"
|
||||
};
|
||||
|
||||
static const char * const mm_parents[] = {
|
||||
"clk26m",
|
||||
"vencpll_d2",
|
||||
"syspll_d3",
|
||||
"syspll1_d2",
|
||||
"syspll_d5",
|
||||
"syspll1_d4",
|
||||
"univpll1_d2",
|
||||
"univpll2_d2",
|
||||
"dmpll_d2"
|
||||
};
|
||||
|
||||
static const char * const mjc_parents[] = {
|
||||
"clk26m",
|
||||
"univpll_d3",
|
||||
"vcodecpll_ck",
|
||||
"tvdpll_445p5m",
|
||||
"vencpll_d2",
|
||||
"syspll_d3",
|
||||
"univpll1_d2",
|
||||
"syspll_d5",
|
||||
"syspll1_d2",
|
||||
"univpll_d5",
|
||||
"univpll2_d2",
|
||||
"dmpll_ck"
|
||||
};
|
||||
|
||||
static const char * const msdc50_0_h_parents[] = {
|
||||
"clk26m",
|
||||
"syspll1_d2",
|
||||
"syspll2_d2",
|
||||
"syspll4_d2",
|
||||
"univpll_d5",
|
||||
"univpll1_d4"
|
||||
};
|
||||
|
||||
static const char * const msdc50_0_parents[] = {
|
||||
"clk26m",
|
||||
"msdcpll_ck",
|
||||
"msdcpll_d2",
|
||||
"univpll1_d4",
|
||||
"syspll2_d2",
|
||||
"syspll_d7",
|
||||
"msdcpll_d4",
|
||||
"vencpll_d4",
|
||||
"tvdpll_ck",
|
||||
"univpll_d2",
|
||||
"univpll1_d2",
|
||||
"mmpll_ck"
|
||||
};
|
||||
|
||||
static const char * const msdc30_1_parents[] = {
|
||||
"clk26m",
|
||||
"univpll2_d2",
|
||||
"msdcpll_d4",
|
||||
"univpll1_d4",
|
||||
"syspll2_d2",
|
||||
"syspll_d7",
|
||||
"univpll_d7",
|
||||
"vencpll_d4"
|
||||
};
|
||||
|
||||
static const char * const msdc30_2_parents[] = {
|
||||
"clk26m",
|
||||
"univpll2_d2",
|
||||
"msdcpll_d4",
|
||||
"univpll1_d4",
|
||||
"syspll2_d2",
|
||||
"syspll_d7",
|
||||
"univpll_d7",
|
||||
"vencpll_d2"
|
||||
};
|
||||
|
||||
static const char * const msdc30_3_parents[] = {
|
||||
"clk26m",
|
||||
"univpll2_d2",
|
||||
"msdcpll_d4",
|
||||
"univpll1_d4",
|
||||
"syspll2_d2",
|
||||
"syspll_d7",
|
||||
"univpll_d7",
|
||||
"vencpll_d4"
|
||||
};
|
||||
|
||||
static const char * const pmicspi_parents[] = {
|
||||
"clk26m",
|
||||
"syspll1_d8",
|
||||
"syspll3_d4",
|
||||
"syspll1_d16",
|
||||
"univpll3_d4",
|
||||
"univpll_d26",
|
||||
"dmpll_d8",
|
||||
"dmpll_d16"
|
||||
};
|
||||
|
||||
static const char * const pwm_parents[] = {
|
||||
"clk26m",
|
||||
"univpll2_d4",
|
||||
"univpll3_d2",
|
||||
"univpll1_d4"
|
||||
};
|
||||
|
||||
static const char * const scam_parents[] = {
|
||||
"clk26m",
|
||||
"syspll3_d2",
|
||||
"univpll2_d4",
|
||||
"dmpll_d4"
|
||||
};
|
||||
|
||||
static const char * const scp_parents[] = {
|
||||
"clk26m",
|
||||
"syspll1_d2",
|
||||
"univpll_d5",
|
||||
"syspll_d5",
|
||||
"dmpll_d2",
|
||||
"dmpll_d4"
|
||||
};
|
||||
|
||||
static const char * const spi_parents[] = {
|
||||
"clk26m",
|
||||
"syspll3_d2",
|
||||
"syspll1_d4",
|
||||
"syspll4_d2",
|
||||
"univpll3_d2",
|
||||
"univpll2_d4",
|
||||
"univpll1_d8"
|
||||
};
|
||||
|
||||
static const char * const uart_parents[] = {
|
||||
"clk26m",
|
||||
"univpll2_d8"
|
||||
};
|
||||
|
||||
static const char * const usb20_parents[] = {
|
||||
"clk26m",
|
||||
"univpll1_d8",
|
||||
"univpll3_d4"
|
||||
};
|
||||
|
||||
static const char * const usb30_parents[] = {
|
||||
"clk26m",
|
||||
"univpll3_d2",
|
||||
"usb_syspll_125m",
|
||||
"univpll2_d4"
|
||||
};
|
||||
|
||||
static const char * const vdec_parents[] = {
|
||||
"clk26m",
|
||||
"vcodecpll_ck",
|
||||
"tvdpll_445p5m",
|
||||
"univpll_d3",
|
||||
"vencpll_d2",
|
||||
"syspll_d3",
|
||||
"univpll1_d2",
|
||||
"mmpll_d2",
|
||||
"dmpll_d2",
|
||||
"dmpll_d4"
|
||||
};
|
||||
|
||||
static const char * const venc_parents[] = {
|
||||
"clk26m",
|
||||
"vcodecpll_ck",
|
||||
"tvdpll_445p5m",
|
||||
"univpll_d3",
|
||||
"vencpll_d2",
|
||||
"syspll_d3",
|
||||
"univpll1_d2",
|
||||
"univpll2_d2",
|
||||
"dmpll_d2",
|
||||
"dmpll_d4"
|
||||
};
|
||||
|
||||
static const struct mtk_fixed_clk fixed_clks[] = {
|
||||
FIXED_CLK(CLK_TOP_ADSYS_26M, "adsys_26m", "clk26m", 26 * MHZ),
|
||||
FIXED_CLK(CLK_TOP_CLKPH_MCK_O, "clkph_mck_o", "clk26m", DUMMY_RATE),
|
||||
FIXED_CLK(CLK_TOP_USB_SYSPLL_125M, "usb_syspll_125m", "clk26m", 125 * MHZ),
|
||||
FIXED_CLK(CLK_TOP_DSI0_DIG, "dsi0_dig", "clk26m", DUMMY_RATE),
|
||||
FIXED_CLK(CLK_TOP_DSI1_DIG, "dsi1_dig", "clk26m", DUMMY_RATE),
|
||||
};
|
||||
|
||||
static const struct mtk_fixed_factor top_divs[] = {
|
||||
FACTOR(CLK_TOP_ARMCA53PLL_754M, "armca53pll_754m", "clk26m", 1, 2),
|
||||
FACTOR(CLK_TOP_ARMCA53PLL_502M, "armca53pll_502m", "clk26m", 1, 3),
|
||||
|
||||
FACTOR(CLK_TOP_MAIN_H546M, "main_h546m", "mainpll", 1, 2),
|
||||
FACTOR(CLK_TOP_MAIN_H364M, "main_h364m", "mainpll", 1, 3),
|
||||
FACTOR(CLK_TOP_MAIN_H218P4M, "main_h218p4m", "mainpll", 1, 5),
|
||||
FACTOR(CLK_TOP_MAIN_H156M, "main_h156m", "mainpll", 1, 7),
|
||||
|
||||
FACTOR(CLK_TOP_TVDPLL_445P5M, "tvdpll_445p5m", "tvdpll", 1, 4),
|
||||
FACTOR(CLK_TOP_TVDPLL_594M, "tvdpll_594m", "tvdpll", 1, 3),
|
||||
|
||||
FACTOR(CLK_TOP_UNIV_624M, "univ_624m", "univpll", 1, 2),
|
||||
FACTOR(CLK_TOP_UNIV_416M, "univ_416m", "univpll", 1, 3),
|
||||
FACTOR(CLK_TOP_UNIV_249P6M, "univ_249p6m", "univpll", 1, 5),
|
||||
FACTOR(CLK_TOP_UNIV_178P3M, "univ_178p3m", "univpll", 1, 7),
|
||||
FACTOR(CLK_TOP_UNIV_48M, "univ_48m", "univpll", 1, 26),
|
||||
|
||||
FACTOR(CLK_TOP_CLKRTC_EXT, "clkrtc_ext", "clk32k", 1, 1),
|
||||
FACTOR(CLK_TOP_CLKRTC_INT, "clkrtc_int", "clk26m", 1, 793),
|
||||
FACTOR(CLK_TOP_FPC, "fpc_ck", "clk26m", 1, 1),
|
||||
|
||||
FACTOR(CLK_TOP_HDMITXPLL_D2, "hdmitxpll_d2", "clk26m", 1, 2),
|
||||
FACTOR(CLK_TOP_HDMITXPLL_D3, "hdmitxpll_d3", "clk26m", 1, 3),
|
||||
|
||||
FACTOR(CLK_TOP_ARMCA53PLL_D2, "armca53pll_d2", "clk26m", 1, 1),
|
||||
FACTOR(CLK_TOP_ARMCA53PLL_D3, "armca53pll_d3", "clk26m", 1, 1),
|
||||
|
||||
FACTOR(CLK_TOP_APLL1, "apll1_ck", "apll1", 1, 1),
|
||||
FACTOR(CLK_TOP_APLL2, "apll2_ck", "apll2", 1, 1),
|
||||
|
||||
FACTOR(CLK_TOP_DMPLL, "dmpll_ck", "clkph_mck_o", 1, 1),
|
||||
FACTOR(CLK_TOP_DMPLL_D2, "dmpll_d2", "clkph_mck_o", 1, 2),
|
||||
FACTOR(CLK_TOP_DMPLL_D4, "dmpll_d4", "clkph_mck_o", 1, 4),
|
||||
FACTOR(CLK_TOP_DMPLL_D8, "dmpll_d8", "clkph_mck_o", 1, 8),
|
||||
FACTOR(CLK_TOP_DMPLL_D16, "dmpll_d16", "clkph_mck_o", 1, 16),
|
||||
|
||||
FACTOR(CLK_TOP_MMPLL, "mmpll_ck", "mmpll", 1, 1),
|
||||
FACTOR(CLK_TOP_MMPLL_D2, "mmpll_d2", "mmpll", 1, 2),
|
||||
|
||||
FACTOR(CLK_TOP_MSDCPLL, "msdcpll_ck", "msdcpll", 1, 1),
|
||||
FACTOR(CLK_TOP_MSDCPLL_D2, "msdcpll_d2", "msdcpll", 1, 2),
|
||||
FACTOR(CLK_TOP_MSDCPLL_D4, "msdcpll_d4", "msdcpll", 1, 4),
|
||||
FACTOR(CLK_TOP_MSDCPLL2, "msdcpll2_ck", "msdcpll2", 1, 1),
|
||||
FACTOR(CLK_TOP_MSDCPLL2_D2, "msdcpll2_d2", "msdcpll2", 1, 2),
|
||||
FACTOR(CLK_TOP_MSDCPLL2_D4, "msdcpll2_d4", "msdcpll2", 1, 4),
|
||||
|
||||
FACTOR(CLK_TOP_SYSPLL_D2, "syspll_d2", "main_h546m", 1, 1),
|
||||
FACTOR(CLK_TOP_SYSPLL1_D2, "syspll1_d2", "main_h546m", 1, 2),
|
||||
FACTOR(CLK_TOP_SYSPLL1_D4, "syspll1_d4", "main_h546m", 1, 4),
|
||||
FACTOR(CLK_TOP_SYSPLL1_D8, "syspll1_d8", "main_h546m", 1, 8),
|
||||
FACTOR(CLK_TOP_SYSPLL1_D16, "syspll1_d16", "main_h546m", 1, 16),
|
||||
FACTOR(CLK_TOP_SYSPLL_D3, "syspll_d3", "main_h364m", 1, 1),
|
||||
FACTOR(CLK_TOP_SYSPLL2_D2, "syspll2_d2", "main_h364m", 1, 2),
|
||||
FACTOR(CLK_TOP_SYSPLL2_D4, "syspll2_d4", "main_h364m", 1, 4),
|
||||
FACTOR(CLK_TOP_SYSPLL_D5, "syspll_d5", "main_h218p4m", 1, 1),
|
||||
FACTOR(CLK_TOP_SYSPLL3_D2, "syspll3_d2", "main_h218p4m", 1, 2),
|
||||
FACTOR(CLK_TOP_SYSPLL3_D4, "syspll3_d4", "main_h218p4m", 1, 4),
|
||||
FACTOR(CLK_TOP_SYSPLL_D7, "syspll_d7", "main_h156m", 1, 1),
|
||||
FACTOR(CLK_TOP_SYSPLL4_D2, "syspll4_d2", "main_h156m", 1, 2),
|
||||
FACTOR(CLK_TOP_SYSPLL4_D4, "syspll4_d4", "main_h156m", 1, 4),
|
||||
|
||||
FACTOR(CLK_TOP_TVDPLL, "tvdpll_ck", "tvdpll_594m", 1, 1),
|
||||
FACTOR(CLK_TOP_TVDPLL_D2, "tvdpll_d2", "tvdpll_594m", 1, 2),
|
||||
FACTOR(CLK_TOP_TVDPLL_D4, "tvdpll_d4", "tvdpll_594m", 1, 4),
|
||||
FACTOR(CLK_TOP_TVDPLL_D8, "tvdpll_d8", "tvdpll_594m", 1, 8),
|
||||
FACTOR(CLK_TOP_TVDPLL_D16, "tvdpll_d16", "tvdpll_594m", 1, 16),
|
||||
|
||||
FACTOR(CLK_TOP_UNIVPLL_D2, "univpll_d2", "univ_624m", 1, 1),
|
||||
FACTOR(CLK_TOP_UNIVPLL1_D2, "univpll1_d2", "univ_624m", 1, 2),
|
||||
FACTOR(CLK_TOP_UNIVPLL1_D4, "univpll1_d4", "univ_624m", 1, 4),
|
||||
FACTOR(CLK_TOP_UNIVPLL1_D8, "univpll1_d8", "univ_624m", 1, 8),
|
||||
FACTOR(CLK_TOP_UNIVPLL_D3, "univpll_d3", "univ_416m", 1, 1),
|
||||
FACTOR(CLK_TOP_UNIVPLL2_D2, "univpll2_d2", "univ_416m", 1, 2),
|
||||
FACTOR(CLK_TOP_UNIVPLL2_D4, "univpll2_d4", "univ_416m", 1, 4),
|
||||
FACTOR(CLK_TOP_UNIVPLL2_D8, "univpll2_d8", "univ_416m", 1, 8),
|
||||
FACTOR(CLK_TOP_UNIVPLL_D5, "univpll_d5", "univ_249p6m", 1, 1),
|
||||
FACTOR(CLK_TOP_UNIVPLL3_D2, "univpll3_d2", "univ_249p6m", 1, 2),
|
||||
FACTOR(CLK_TOP_UNIVPLL3_D4, "univpll3_d4", "univ_249p6m", 1, 4),
|
||||
FACTOR(CLK_TOP_UNIVPLL3_D8, "univpll3_d8", "univ_249p6m", 1, 8),
|
||||
FACTOR(CLK_TOP_UNIVPLL_D7, "univpll_d7", "univ_178p3m", 1, 1),
|
||||
FACTOR(CLK_TOP_UNIVPLL_D26, "univpll_d26", "univ_48m", 1, 1),
|
||||
FACTOR(CLK_TOP_UNIVPLL_D52, "univpll_d52", "univ_48m", 1, 2),
|
||||
|
||||
FACTOR(CLK_TOP_VCODECPLL, "vcodecpll_ck", "vcodecpll", 1, 3),
|
||||
FACTOR(CLK_TOP_VCODECPLL_370P5, "vcodecpll_370p5", "vcodecpll", 1, 4),
|
||||
|
||||
FACTOR(CLK_TOP_VENCPLL, "vencpll_ck", "vencpll", 1, 1),
|
||||
FACTOR(CLK_TOP_VENCPLL_D2, "vencpll_d2", "vencpll", 1, 2),
|
||||
FACTOR(CLK_TOP_VENCPLL_D4, "vencpll_d4", "vencpll", 1, 4),
|
||||
};
|
||||
|
||||
static const struct mtk_mux top_muxes[] = {
|
||||
/* CLK_CFG_0 */
|
||||
TOP_MUX_GATE_NOSR(CLK_TOP_AXI_SEL, "axi_sel", axi_parents,
|
||||
0x40, 0, 3, 7, CLK_IS_CRITICAL),
|
||||
TOP_MUX_GATE_NOSR(CLK_TOP_MEM_SEL, "mem_sel", mem_parents,
|
||||
0x40, 8, 1, 15, CLK_IS_CRITICAL),
|
||||
TOP_MUX_GATE(CLK_TOP_DDRPHYCFG_SEL, "ddrphycfg_sel", ddrphycfg_parents,
|
||||
0x40, 16, 1, 23, CLK_IS_CRITICAL),
|
||||
TOP_MUX_GATE(CLK_TOP_MM_SEL, "mm_sel", mm_parents, 0x40, 24, 3, 31, 0),
|
||||
/* CLK_CFG_1 */
|
||||
TOP_MUX_GATE(CLK_TOP_PWM_SEL, "pwm_sel", pwm_parents, 0x50, 0, 2, 7, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_VDEC_SEL, "vdec_sel", vdec_parents, 0x50, 8, 4, 15, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_VENC_SEL, "venc_sel", venc_parents, 0x50, 16, 4, 23, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_MFG_SEL, "mfg_sel", mfg_parents, 0x50, 24, 4, 31, 0),
|
||||
/* CLK_CFG_2 */
|
||||
TOP_MUX_GATE(CLK_TOP_CAMTG_SEL, "camtg_sel", camtg_parents, 0x60, 0, 3, 7, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_UART_SEL, "uart_sel", uart_parents, 0x60, 8, 1, 15, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_SPI_SEL, "spi_sel", spi_parents, 0x60, 16, 3, 23, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_USB20_SEL, "usb20_sel", usb20_parents, 0x60, 24, 2, 31, 0),
|
||||
/* CLK_CFG_3 */
|
||||
TOP_MUX_GATE(CLK_TOP_USB30_SEL, "usb30_sel", usb30_parents, 0x70, 0, 2, 7, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_MSDC50_0_H_SEL, "msdc50_0_h_sel", msdc50_0_h_parents,
|
||||
0x70, 8, 3, 15, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_MSDC50_0_SEL, "msdc50_0_sel", msdc50_0_parents, 0x70, 16, 4, 23, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_MSDC30_1_SEL, "msdc30_1_sel", msdc30_1_parents, 0x70, 24, 3, 31, 0),
|
||||
/* CLK_CFG_4 */
|
||||
TOP_MUX_GATE(CLK_TOP_MSDC30_2_SEL, "msdc30_2_sel", msdc30_2_parents, 0x80, 0, 3, 7, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_MSDC30_3_SEL, "msdc30_3_sel", msdc30_3_parents, 0x80, 8, 3, 15, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_AUDIO_SEL, "audio_sel", audio_parents, 0x80, 16, 2, 23, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_AUD_INTBUS_SEL, "aud_intbus_sel", aud_intbus_parents,
|
||||
0x80, 24, 3, 31, 0),
|
||||
/* CLK_CFG_5 */
|
||||
TOP_MUX_GATE(CLK_TOP_PMICSPI_SEL, "pmicspi_sel", pmicspi_parents, 0x90, 0, 3, 5, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_SCP_SEL, "scp_sel", scp_parents, 0x90, 8, 3, 15, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_MJC_SEL, "mjc_sel", mjc_parents, 0x90, 24, 4, 31, 0),
|
||||
/* CLK_CFG_6 */
|
||||
/*
|
||||
* The dpi0_sel clock should not propagate rate changes to its parent
|
||||
* clock so the dpi driver can have full control over PLL and divider.
|
||||
*/
|
||||
TOP_MUX_GATE_NOSR(CLK_TOP_DPI0_SEL, "dpi0_sel", dpi0_parents, 0xa0, 0, 3, 7, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_IRDA_SEL, "irda_sel", irda_parents, 0xa0, 8, 2, 15, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_CCI400_SEL, "cci400_sel", cci400_parents,
|
||||
0xa0, 16, 3, 23, CLK_IS_CRITICAL),
|
||||
TOP_MUX_GATE(CLK_TOP_AUD_1_SEL, "aud_1_sel", aud_1_parents, 0xa0, 24, 2, 31, 0),
|
||||
/* CLK_CFG_7 */
|
||||
TOP_MUX_GATE(CLK_TOP_AUD_2_SEL, "aud_2_sel", aud_2_parents, 0xb0, 0, 2, 7, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_MEM_MFG_IN_SEL, "mem_mfg_in_sel", mem_mfg_in_parents,
|
||||
0xb0, 8, 2, 15, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_AXI_MFG_IN_SEL, "axi_mfg_in_sel", axi_mfg_in_parents,
|
||||
0xb0, 16, 2, 23, 0),
|
||||
TOP_MUX_GATE(CLK_TOP_SCAM_SEL, "scam_sel", scam_parents, 0xb0, 24, 2, 31, 0),
|
||||
};
|
||||
|
||||
static struct mtk_composite top_aud_divs[] = {
|
||||
MUX(CLK_TOP_I2S0_M_SEL, "i2s0_m_ck_sel", i2s0_m_ck_parents, 0x120, 4, 1),
|
||||
MUX(CLK_TOP_I2S1_M_SEL, "i2s1_m_ck_sel", i2s1_m_ck_parents, 0x120, 5, 1),
|
||||
MUX(CLK_TOP_I2S2_M_SEL, "i2s2_m_ck_sel", i2s2_m_ck_parents, 0x120, 6, 1),
|
||||
MUX(CLK_TOP_I2S3_M_SEL, "i2s3_m_ck_sel", i2s3_m_ck_parents, 0x120, 7, 1),
|
||||
MUX(CLK_TOP_I2S3_B_SEL, "i2s3_b_ck_sel", i2s3_b_ck_parents, 0x120, 8, 1),
|
||||
|
||||
DIV_GATE(CLK_TOP_APLL1_DIV0, "apll1_div0", "aud_1_sel", 0x12c, 8, 0x120, 4, 24),
|
||||
DIV_GATE(CLK_TOP_APLL1_DIV1, "apll1_div1", "aud_1_sel", 0x12c, 9, 0x124, 8, 0),
|
||||
DIV_GATE(CLK_TOP_APLL1_DIV2, "apll1_div2", "aud_1_sel", 0x12c, 10, 0x124, 8, 8),
|
||||
DIV_GATE(CLK_TOP_APLL1_DIV3, "apll1_div3", "aud_1_sel", 0x12c, 11, 0x124, 8, 16),
|
||||
DIV_GATE(CLK_TOP_APLL1_DIV4, "apll1_div4", "aud_1_sel", 0x12c, 12, 0x124, 8, 24),
|
||||
DIV_GATE(CLK_TOP_APLL1_DIV5, "apll1_div5", "apll1_div4", 0x12c, 13, 0x12c, 4, 0),
|
||||
|
||||
DIV_GATE(CLK_TOP_APLL2_DIV0, "apll2_div0", "aud_2_sel", 0x12c, 16, 0x120, 4, 28),
|
||||
DIV_GATE(CLK_TOP_APLL2_DIV1, "apll2_div1", "aud_2_sel", 0x12c, 17, 0x128, 8, 0),
|
||||
DIV_GATE(CLK_TOP_APLL2_DIV2, "apll2_div2", "aud_2_sel", 0x12c, 18, 0x128, 8, 8),
|
||||
DIV_GATE(CLK_TOP_APLL2_DIV3, "apll2_div3", "aud_2_sel", 0x12c, 19, 0x128, 8, 16),
|
||||
DIV_GATE(CLK_TOP_APLL2_DIV4, "apll2_div4", "aud_2_sel", 0x12c, 20, 0x128, 8, 24),
|
||||
DIV_GATE(CLK_TOP_APLL2_DIV5, "apll2_div5", "apll2_div4", 0x12c, 21, 0x12c, 4, 4),
|
||||
};
|
||||
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6795_topckgen[] = {
|
||||
{ .compatible = "mediatek,mt6795-topckgen" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
static int clk_mt6795_topckgen_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
void __iomem *base;
|
||||
int ret;
|
||||
|
||||
base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_TOP_NR_CLK);
|
||||
if (!clk_data)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = mtk_clk_register_fixed_clks(fixed_clks, ARRAY_SIZE(fixed_clks), clk_data);
|
||||
if (ret)
|
||||
goto free_clk_data;
|
||||
|
||||
ret = mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
|
||||
if (ret)
|
||||
goto unregister_fixed_clks;
|
||||
|
||||
ret = mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes), node,
|
||||
&mt6795_top_clk_lock, clk_data);
|
||||
if (ret)
|
||||
goto unregister_factors;
|
||||
|
||||
ret = mtk_clk_register_composites(top_aud_divs, ARRAY_SIZE(top_aud_divs), base,
|
||||
&mt6795_top_clk_lock, clk_data);
|
||||
if (ret)
|
||||
goto unregister_muxes;
|
||||
|
||||
ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
if (ret)
|
||||
goto unregister_composites;
|
||||
|
||||
return 0;
|
||||
|
||||
unregister_composites:
|
||||
mtk_clk_unregister_composites(top_aud_divs, ARRAY_SIZE(top_aud_divs), clk_data);
|
||||
unregister_muxes:
|
||||
mtk_clk_unregister_muxes(top_muxes, ARRAY_SIZE(top_muxes), clk_data);
|
||||
unregister_factors:
|
||||
mtk_clk_unregister_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
|
||||
unregister_fixed_clks:
|
||||
mtk_clk_unregister_fixed_clks(fixed_clks, ARRAY_SIZE(fixed_clks), clk_data);
|
||||
free_clk_data:
|
||||
mtk_free_clk_data(clk_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int clk_mt6795_topckgen_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
|
||||
|
||||
of_clk_del_provider(node);
|
||||
mtk_clk_unregister_composites(top_aud_divs, ARRAY_SIZE(top_aud_divs), clk_data);
|
||||
mtk_clk_unregister_muxes(top_muxes, ARRAY_SIZE(top_muxes), clk_data);
|
||||
mtk_clk_unregister_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
|
||||
mtk_clk_unregister_fixed_clks(fixed_clks, ARRAY_SIZE(fixed_clks), clk_data);
|
||||
mtk_free_clk_data(clk_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver clk_mt6795_topckgen_drv = {
|
||||
.driver = {
|
||||
.name = "clk-mt6795-topckgen",
|
||||
.of_match_table = of_match_clk_mt6795_topckgen,
|
||||
},
|
||||
.probe = clk_mt6795_topckgen_probe,
|
||||
.remove = clk_mt6795_topckgen_remove,
|
||||
};
|
||||
module_platform_driver(clk_mt6795_topckgen_drv);
|
||||
|
||||
MODULE_DESCRIPTION("MediaTek MT6795 topckgen clocks driver");
|
||||
MODULE_LICENSE("GPL");
|
55
drivers/clk/mediatek/clk-mt6795-vdecsys.c
Normal file
55
drivers/clk/mediatek/clk-mt6795-vdecsys.c
Normal file
@ -0,0 +1,55 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2022 Collabora Ltd.
|
||||
* Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
*/
|
||||
|
||||
#include <dt-bindings/clock/mediatek,mt6795-clk.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include "clk-gate.h"
|
||||
#include "clk-mtk.h"
|
||||
|
||||
#define GATE_VDEC(_id, _name, _parent, _regs) \
|
||||
GATE_MTK(_id, _name, _parent, _regs, 0, \
|
||||
&mtk_clk_gate_ops_setclr_inv)
|
||||
|
||||
static const struct mtk_gate_regs vdec0_cg_regs = {
|
||||
.set_ofs = 0x0000,
|
||||
.clr_ofs = 0x0004,
|
||||
.sta_ofs = 0x0000,
|
||||
};
|
||||
|
||||
static const struct mtk_gate_regs vdec1_cg_regs = {
|
||||
.set_ofs = 0x0008,
|
||||
.clr_ofs = 0x000c,
|
||||
.sta_ofs = 0x0008,
|
||||
};
|
||||
|
||||
static const struct mtk_gate vdec_clks[] = {
|
||||
GATE_VDEC(CLK_VDEC_CKEN, "vdec_cken", "vdec_sel", &vdec0_cg_regs),
|
||||
GATE_VDEC(CLK_VDEC_LARB_CKEN, "vdec_larb_cken", "mm_sel", &vdec1_cg_regs),
|
||||
};
|
||||
|
||||
static const struct mtk_clk_desc vdec_desc = {
|
||||
.clks = vdec_clks,
|
||||
.num_clks = ARRAY_SIZE(vdec_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6795_vdecsys[] = {
|
||||
{ .compatible = "mediatek,mt6795-vdecsys", .data = &vdec_desc },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6795_vdecsys_drv = {
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6795-vdecsys",
|
||||
.of_match_table = of_match_clk_mt6795_vdecsys,
|
||||
},
|
||||
};
|
||||
module_platform_driver(clk_mt6795_vdecsys_drv);
|
||||
|
||||
MODULE_DESCRIPTION("MediaTek MT6795 vdecsys clocks driver");
|
||||
MODULE_LICENSE("GPL");
|
50
drivers/clk/mediatek/clk-mt6795-vencsys.c
Normal file
50
drivers/clk/mediatek/clk-mt6795-vencsys.c
Normal file
@ -0,0 +1,50 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2022 Collabora Ltd.
|
||||
* Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
*/
|
||||
|
||||
#include <dt-bindings/clock/mediatek,mt6795-clk.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include "clk-gate.h"
|
||||
#include "clk-mtk.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_LARB, "venc_larb", "venc_sel", 0),
|
||||
GATE_VENC(CLK_VENC_VENC, "venc_venc", "venc_sel", 4),
|
||||
GATE_VENC(CLK_VENC_JPGENC, "venc_jpgenc", "venc_sel", 8),
|
||||
GATE_VENC(CLK_VENC_JPGDEC, "venc_jpgdec", "venc_sel", 12),
|
||||
};
|
||||
|
||||
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_mt6795_vencsys[] = {
|
||||
{ .compatible = "mediatek,mt6795-vencsys", .data = &venc_desc },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6795_vencsys_drv = {
|
||||
.driver = {
|
||||
.name = "clk-mt6795-vencsys",
|
||||
.of_match_table = of_match_clk_mt6795_vencsys,
|
||||
},
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
};
|
||||
module_platform_driver(clk_mt6795_vencsys_drv);
|
||||
|
||||
MODULE_DESCRIPTION("MediaTek MT6795 vdecsys clocks driver");
|
||||
MODULE_LICENSE("GPL");
|
@ -32,33 +32,23 @@ static const struct mtk_gate img_clks[] = {
|
||||
GATE_IMG(CLK_IMG_LARB6, "img_larb6", "mm_sel", 0),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6797_img[] = {
|
||||
{ .compatible = "mediatek,mt6797-imgsys", },
|
||||
{}
|
||||
static const struct mtk_clk_desc img_desc = {
|
||||
.clks = img_clks,
|
||||
.num_clks = ARRAY_SIZE(img_clks),
|
||||
};
|
||||
|
||||
static int clk_mt6797_img_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_IMG_NR);
|
||||
|
||||
mtk_clk_register_gates(node, img_clks, ARRAY_SIZE(img_clks),
|
||||
clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
if (r)
|
||||
dev_err(&pdev->dev,
|
||||
"could not register clock provider: %s: %d\n",
|
||||
pdev->name, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct of_device_id of_match_clk_mt6797_img[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt6797-imgsys",
|
||||
.data = &img_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6797_img_drv = {
|
||||
.probe = clk_mt6797_img_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6797-img",
|
||||
.of_match_table = of_match_clk_mt6797_img,
|
||||
|
@ -49,33 +49,23 @@ static const struct mtk_gate vdec_clks[] = {
|
||||
GATE_VDEC1(CLK_VDEC_LARB1_CKEN, "vdec_larb1_cken", "mm_sel", 0),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6797_vdec[] = {
|
||||
{ .compatible = "mediatek,mt6797-vdecsys", },
|
||||
{}
|
||||
static const struct mtk_clk_desc vdec_desc = {
|
||||
.clks = vdec_clks,
|
||||
.num_clks = ARRAY_SIZE(vdec_clks),
|
||||
};
|
||||
|
||||
static int clk_mt6797_vdec_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_VDEC_NR);
|
||||
|
||||
mtk_clk_register_gates(node, vdec_clks, ARRAY_SIZE(vdec_clks),
|
||||
clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
if (r)
|
||||
dev_err(&pdev->dev,
|
||||
"could not register clock provider: %s: %d\n",
|
||||
pdev->name, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct of_device_id of_match_clk_mt6797_vdec[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt6797-vdecsys",
|
||||
.data = &vdec_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6797_vdec_drv = {
|
||||
.probe = clk_mt6797_vdec_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6797-vdec",
|
||||
.of_match_table = of_match_clk_mt6797_vdec,
|
||||
|
@ -34,33 +34,23 @@ static const struct mtk_gate venc_clks[] = {
|
||||
GATE_VENC(CLK_VENC_3, "venc_3", "venc_sel", 12),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt6797_venc[] = {
|
||||
{ .compatible = "mediatek,mt6797-vencsys", },
|
||||
{}
|
||||
static const struct mtk_clk_desc venc_desc = {
|
||||
.clks = venc_clks,
|
||||
.num_clks = ARRAY_SIZE(venc_clks),
|
||||
};
|
||||
|
||||
static int clk_mt6797_venc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
int r;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_VENC_NR);
|
||||
|
||||
mtk_clk_register_gates(node, venc_clks, ARRAY_SIZE(venc_clks),
|
||||
clk_data);
|
||||
|
||||
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
if (r)
|
||||
dev_err(&pdev->dev,
|
||||
"could not register clock provider: %s: %d\n",
|
||||
pdev->name, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
static const struct of_device_id of_match_clk_mt6797_venc[] = {
|
||||
{
|
||||
.compatible = "mediatek,mt6797-vencsys",
|
||||
.data = &venc_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt6797_venc_drv = {
|
||||
.probe = clk_mt6797_venc_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt6797-venc",
|
||||
.of_match_table = of_match_clk_mt6797_venc,
|
||||
|
@ -34,26 +34,23 @@ static const struct mtk_gate cam_clks[] = {
|
||||
GATE_CAM(CLK_CAM_CCU, "cam_ccu", "cam_sel", 12),
|
||||
};
|
||||
|
||||
static int clk_mt8183_cam_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_CAM_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, cam_clks, ARRAY_SIZE(cam_clks),
|
||||
clk_data);
|
||||
|
||||
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
static const struct mtk_clk_desc cam_desc = {
|
||||
.clks = cam_clks,
|
||||
.num_clks = ARRAY_SIZE(cam_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8183_cam[] = {
|
||||
{ .compatible = "mediatek,mt8183-camsys", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt8183-camsys",
|
||||
.data = &cam_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8183_cam_drv = {
|
||||
.probe = clk_mt8183_cam_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt8183-cam",
|
||||
.of_match_table = of_match_clk_mt8183_cam,
|
||||
|
@ -34,26 +34,23 @@ static const struct mtk_gate img_clks[] = {
|
||||
GATE_IMG(CLK_IMG_OWE, "img_owe", "img_sel", 9),
|
||||
};
|
||||
|
||||
static int clk_mt8183_img_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_IMG_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, img_clks, ARRAY_SIZE(img_clks),
|
||||
clk_data);
|
||||
|
||||
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
static const struct mtk_clk_desc img_desc = {
|
||||
.clks = img_clks,
|
||||
.num_clks = ARRAY_SIZE(img_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8183_img[] = {
|
||||
{ .compatible = "mediatek,mt8183-imgsys", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt8183-imgsys",
|
||||
.data = &img_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8183_img_drv = {
|
||||
.probe = clk_mt8183_img_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt8183-img",
|
||||
.of_match_table = of_match_clk_mt8183_img,
|
||||
|
@ -27,26 +27,23 @@ static const struct mtk_gate ipu_core0_clks[] = {
|
||||
GATE_IPU_CORE0(CLK_IPU_CORE0_IPU, "ipu_core0_ipu", "dsp_sel", 2),
|
||||
};
|
||||
|
||||
static int clk_mt8183_ipu_core0_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_IPU_CORE0_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, ipu_core0_clks, ARRAY_SIZE(ipu_core0_clks),
|
||||
clk_data);
|
||||
|
||||
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
static const struct mtk_clk_desc ipu_core0_desc = {
|
||||
.clks = ipu_core0_clks,
|
||||
.num_clks = ARRAY_SIZE(ipu_core0_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8183_ipu_core0[] = {
|
||||
{ .compatible = "mediatek,mt8183-ipu_core0", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt8183-ipu_core0",
|
||||
.data = &ipu_core0_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8183_ipu_core0_drv = {
|
||||
.probe = clk_mt8183_ipu_core0_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt8183-ipu_core0",
|
||||
.of_match_table = of_match_clk_mt8183_ipu_core0,
|
||||
|
@ -27,26 +27,23 @@ static const struct mtk_gate ipu_core1_clks[] = {
|
||||
GATE_IPU_CORE1(CLK_IPU_CORE1_IPU, "ipu_core1_ipu", "dsp_sel", 2),
|
||||
};
|
||||
|
||||
static int clk_mt8183_ipu_core1_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_IPU_CORE1_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, ipu_core1_clks, ARRAY_SIZE(ipu_core1_clks),
|
||||
clk_data);
|
||||
|
||||
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
static const struct mtk_clk_desc ipu_core1_desc = {
|
||||
.clks = ipu_core1_clks,
|
||||
.num_clks = ARRAY_SIZE(ipu_core1_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8183_ipu_core1[] = {
|
||||
{ .compatible = "mediatek,mt8183-ipu_core1", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt8183-ipu_core1",
|
||||
.data = &ipu_core1_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8183_ipu_core1_drv = {
|
||||
.probe = clk_mt8183_ipu_core1_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt8183-ipu_core1",
|
||||
.of_match_table = of_match_clk_mt8183_ipu_core1,
|
||||
|
@ -25,26 +25,23 @@ static const struct mtk_gate ipu_adl_clks[] = {
|
||||
GATE_IPU_ADL_I(CLK_IPU_ADL_CABGEN, "ipu_adl_cabgen", "dsp_sel", 24),
|
||||
};
|
||||
|
||||
static int clk_mt8183_ipu_adl_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
clk_data = mtk_alloc_clk_data(CLK_IPU_ADL_NR_CLK);
|
||||
|
||||
mtk_clk_register_gates(node, ipu_adl_clks, ARRAY_SIZE(ipu_adl_clks),
|
||||
clk_data);
|
||||
|
||||
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
static const struct mtk_clk_desc ipu_adl_desc = {
|
||||
.clks = ipu_adl_clks,
|
||||
.num_clks = ARRAY_SIZE(ipu_adl_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id of_match_clk_mt8183_ipu_adl[] = {
|
||||
{ .compatible = "mediatek,mt8183-ipu_adl", },
|
||||
{}
|
||||
{
|
||||
.compatible = "mediatek,mt8183-ipu_adl",
|
||||
.data = &ipu_adl_desc,
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_driver clk_mt8183_ipu_adl_drv = {
|
||||
.probe = clk_mt8183_ipu_adl_probe,
|
||||
.probe = mtk_clk_simple_probe,
|
||||
.remove = mtk_clk_simple_remove,
|
||||
.driver = {
|
||||
.name = "clk-mt8183-ipu_adl",
|
||||
.of_match_table = of_match_clk_mt8183_ipu_adl,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user