mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
Qualcomm clock updates for v6.6
Support for the Global Clock Controller in IPQ5018 is added. The SMD RPM driver is cleaned up, with interconnect bus clocks moved out to the interconnect drivers. Due to being tangled with the related interconnect updates, the topic branch with interconnect patches was merged in as well. Various bugs in PM runtime integration is fixes across many platforms. The MSM8996 core bus framework gains support for MSM8996 Pro. MDM9615 is transitioned to parent_hw and parent_data, with related cleanups. With this the cxo proxy clock is dropped from the driver. And LCC support for MDM9615 is merged into the MSM8960 driver, to avoid duplication. Network-related resets are added on IPQ4019 A couple of missing USB-related clocks are added for IPQ9574. The missing gpll0_sleep_clk_src is added to MSM8917 global clock controller. A few minor fixes for MSM8998 global clock controller. In the QDU1000 global clock controller GDSCs, clkrefs, and GPLL1 are added, while PCIe pipe clock, SDCC rcg ops are corrected. Missing GDSCs are added to SC8280XP global clock controller driver, flags for existing GDSCs are corrected, by enabling retention and dropping the always-on flags. Retention is also enabled for the display clock controller GDSCs. SDCC apps_clk_src is marked CLK_OPS_PARENT_ENABLE to fix issues with missing parent clocks across sc7180, sm7150, sm6350 and sm8250, while sm8450 is corrected to use floor ops. SM6350 GPU clock controller clock supplies are corrected. Unwanted clocks from the IPQ5332 GCC are dropped. The missing OXILICX GDSC is added to MSM8226 GCC. The delay in the reset controller is transitioned to fsleep() to invoke the appropriate sleep method depending on duration. The SM83550 Video clock controller is extended to support SC8280XP. -----BEGIN PGP SIGNATURE----- iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmTlFU4VHGFuZGVyc3Nv bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FEIUP+wVMrzwGAe7rkAf5jWPZJ2MIAN5J EVMOJJIPuhR2J+EwSR1T+u0g0MdlKde+Tt1syHNL8g4XxobJP2V6fst3ILQaPjp1 t2Mjb8crWI5VLvqU2I+uWghi+HvLneoPHvWgyW1Kbe/ZWvBQjwdMgUUtj/wYpk4p C1Xt/F5NcSrNlvD4z2RwE51mT6K5NZiqwtGrl4yIIflRbne9pycbXtfetiYBMGkq ptD63U9ijHExLzIlpM2U6qaYf/1V6IX8G9c7SMk2lY0V2OMYtl0mpQnDwtfUI2Yo o+QUUDWmf+82magQp4FXs8On5Bj9QrIOr538QuDLjLVn53rJfxr2qRifIRZETeDs KjBc379BYc8DgweuUocc0zQNPSXGgDCBxwnRpEYI2MV72q9Ee4WnrsIeZuqgkxS6 W4AXZxlBiJ5B8DQKfmwhAr7/OFj7DalAgLj6frdeQEhEycB6z7V+sRsrunJEFtJ+ UiP8rd0pcfIJx1whgoe9QGbUfZFF7uc8yP0XKD2BpGaspeiHIIni5XUtgZsuADo6 kjxOScpkRzmUc5codnSWohzLfdp2tMzDapQegAwALJdrDuTvloadLu2q2UGlcTst Z2TY3ZjBRUtVl3w8siKYS6jX4nLOm1OazoXOykFNF5zsnr1kkfinpMHuZ7s59Oqz OKAnWt3Si+F/6q4m =b1zW -----END PGP SIGNATURE----- Merge tag 'qcom-clk-for-6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-qcom Pull Qualcomm clk driver updates from Bjorn Andersson: - Support for the Global Clock Controller in IPQ5018 is added. - The SMD RPM driver is cleaned up, with interconnect bus clocks moved out to the interconnect drivers. Due to being tangled with the related interconnect updates, the topic branch with interconnect patches was merged in as well. - Various bugs in PM runtime integration is fixes across many platforms. - The MSM8996 core bus framework gains support for MSM8996 Pro. - MDM9615 is transitioned to parent_hw and parent_data, with related cleanups. With this the cxo proxy clock is dropped from the driver. And LCC support for MDM9615 is merged into the MSM8960 driver, to avoid duplication. - Network-related resets are added on IPQ4019 - A couple of missing USB-related clocks are added for IPQ9574 - The missing gpll0_sleep_clk_src is added to MSM8917 global clock controller - A few minor fixes for MSM8998 global clock controller. - In the QDU1000 global clock controller GDSCs, clkrefs, and GPLL1 are added, while PCIe pipe clock, SDCC rcg ops are corrected. - Missing GDSCs are added to SC8280XP global clock controller driver, flags for existing GDSCs are corrected, by enabling retention and dropping the always-on flags. Retention is also enabled for the display clock controller GDSCs. - SDCC apps_clk_src is marked CLK_OPS_PARENT_ENABLE to fix issues with missing parent clocks across sc7180, sm7150, sm6350 and sm8250, while sm8450 is corrected to use floor ops. - SM6350 GPU clock controller clock supplies are corrected. - Unwanted clocks from the IPQ5332 GCC are dropped. - The missing OXILICX GDSC is added to MSM8226 GCC. - The delay in the reset controller is transitioned to fsleep() to invoke the appropriate sleep method depending on duration. - The SM83550 Video clock controller is extended to support SC8280XP. * tag 'qcom-clk-for-6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (86 commits) clk: qcom: smd-rpm: Set XO rate and CLK_IS_CRITICAL on PCNoC clk: qcom: smd-rpm: Add a way to define bus clocks with rate and flags clk: qcom: gcc-ipq5018: change some variable static clk: qcom: gcc-ipq4019: add missing networking resets dt-bindings: clock: qcom: ipq4019: add missing networking resets clk: qcom: gcc-msm8917: Enable GPLL0_SLEEP_CLK_SRC dt-bindings: clock: gcc-msm8917: Add definition for GPLL0_SLEEP_CLK_SRC clk: qcom: gcc-qdu1000: Update the RCGs ops clk: qcom: gcc-qdu1000: Update the SDCC clock RCG ops clk: qcom: gcc-qdu1000: Add support for GDSCs clk: qcom: gcc-qdu1000: Add gcc_ddrss_ecpri_gsi_clk support clk: qcom: gcc-qdu1000: Register gcc_gpll1_out_even clock clk: qcom: gcc-qdu1000: Fix clkref clocks handling clk: qcom: gcc-qdu1000: Fix gcc_pcie_0_pipe_clk_src clock handling dt-bindings: clock: Update GCC clocks for QDU1000 and QRU1000 SoCs clk: qcom: gcc-sm8450: Use floor ops for SDCC RCGs clk: qcom: ipq5332: drop the gcc_apss_axi_clk_src clock clk: qcom: ipq5332: drop the mem noc clocks clk: qcom: gcc-msm8998: Don't check halt bit on some branch clks clk: qcom: gpucc-msm8998: Use the correct GPLL0 leg with old DTs ...
This commit is contained in:
commit
1b3e04a443
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on APQ8064/MSM8960
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on IPQ4019
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
- Robert Marko <robert.markoo@sartura.hr>
|
||||
|
||||
description: |
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on IPQ8074
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on MSM8976
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on MSM8996
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module which provides the clocks, resets and
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on MSM8998
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
|
|
@ -19,8 +19,6 @@ description: |
|
|||
include/dt-bindings/reset/qcom,gcc-ipq6018.h
|
||||
include/dt-bindings/clock/qcom,gcc-msm8953.h
|
||||
include/dt-bindings/clock/qcom,gcc-mdm9607.h
|
||||
include/dt-bindings/clock/qcom,gcc-mdm9615.h
|
||||
include/dt-bindings/reset/qcom,gcc-mdm9615.h
|
||||
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
|
@ -30,7 +28,6 @@ properties:
|
|||
enum:
|
||||
- qcom,gcc-ipq6018
|
||||
- qcom,gcc-mdm9607
|
||||
- qcom,gcc-mdm9615
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on QCS404
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on SC7180
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm Global Clock & Reset Controller on SC7280
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on SDM670 and SDM845
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on SM8150
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on SM8250
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller Common Properties
|
|||
|
||||
maintainers:
|
||||
- Stephen Boyd <sboyd@kernel.org>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Common bindings for Qualcomm global clock control module providing the
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm Graphics Clock & Reset Controller
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm graphics clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,ipq5018-gcc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Global Clock & Reset Controller on IPQ5018
|
||||
|
||||
maintainers:
|
||||
- Sricharan Ramabadhran <quic_srichara@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
domains on IPQ5018
|
||||
|
||||
See also::
|
||||
include/dt-bindings/clock/qcom,ipq5018-gcc.h
|
||||
include/dt-bindings/reset/qcom,ipq5018-gcc.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,gcc-ipq5018
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Sleep clock source
|
||||
- description: PCIE20 PHY0 pipe clock source
|
||||
- description: PCIE20 PHY1 pipe clock source
|
||||
- description: USB3 PHY pipe clock source
|
||||
- description: GEPHY RX clock source
|
||||
- description: GEPHY TX clock source
|
||||
- description: UNIPHY RX clock source
|
||||
- description: UNIPHY TX clk source
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
clock-controller@1800000 {
|
||||
compatible = "qcom,gcc-ipq5018";
|
||||
reg = <0x01800000 0x80000>;
|
||||
clocks = <&xo_board_clk>,
|
||||
<&sleep_clk>,
|
||||
<&pcie20_phy0_pipe_clk>,
|
||||
<&pcie20_phy1_pipe_clk>,
|
||||
<&usb3_phy0_pipe_clk>,
|
||||
<&gephy_rx_clk>,
|
||||
<&gephy_tx_clk>,
|
||||
<&uniphy_rx_clk>,
|
||||
<&uniphy_tx_clk>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
...
|
||||
|
|
@ -76,6 +76,40 @@ allOf:
|
|||
- clocks
|
||||
- clock-names
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,lcc-mdm9615
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Board CXO source
|
||||
- description: PLL 4 Vote clock
|
||||
- description: MI2S codec clock
|
||||
- description: Mic I2S codec clock
|
||||
- description: Mic I2S spare clock
|
||||
- description: Speaker I2S codec clock
|
||||
- description: Speaker I2S spare clock
|
||||
- description: PCM codec clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: cxo
|
||||
- const: pll4_vote
|
||||
- const: mi2s_codec_clk
|
||||
- const: codec_i2s_mic_codec_clk
|
||||
- const: spare_i2s_mic_codec_clk
|
||||
- const: codec_i2s_spkr_codec_clk
|
||||
- const: spare_i2s_spkr_codec_clk
|
||||
- const: pcm_codec_clk
|
||||
|
||||
required:
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
examples:
|
||||
- |
|
||||
clock-controller@28000000 {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Qualcomm Multimedia Clock & Reset Controller
|
|||
|
||||
maintainers:
|
||||
- Jeffrey Hugo <quic_jhugo@quicinc.com>
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm multimedia clock control module provides the clocks, resets and
|
||||
|
|
@ -297,6 +297,7 @@ allOf:
|
|||
- description: HDMI phy PLL clock
|
||||
- description: DisplayPort phy PLL link clock
|
||||
- description: DisplayPort phy PLL vco clock
|
||||
- description: Global PLL 0 DIV clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
|
|
@ -309,6 +310,7 @@ allOf:
|
|||
- const: hdmipll
|
||||
- const: dplink
|
||||
- const: dpvco
|
||||
- const: gpll0_div
|
||||
|
||||
- if:
|
||||
properties:
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ description: >
|
|||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,msm8996-cbf
|
||||
enum:
|
||||
- qcom,msm8996-cbf
|
||||
- qcom,msm8996pro-cbf
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm Graphics Clock & Reset Controller on MSM8998
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm graphics clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm Global Clock & Reset Controller for QDU1000 and QRU1000
|
||||
|
||||
maintainers:
|
||||
- Melody Olvera <quic_molvera@quicinc.com>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
- Imran Shaik <quic_imrashai@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module which supports the clocks, resets and
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm Technologies, Inc. RPMh Clocks
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Resource Power Manager Hardened (RPMh) manages shared resources on
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm Camera Clock & Reset Controller on SC7180
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm camera clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm Display Clock & Reset Controller on SC7180
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm display clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm LPASS Core Clock Controller on SC7180
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm LPASS core clock control module provides the clocks and power
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm Modem Clock Controller on SC7180
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm modem clock control module provides the clocks on SC7180.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm Camera Clock & Reset Controller on SC7280
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm camera clock control module provides the clocks, resets and
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm Display Clock & Reset Controller on SC7280
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm display clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm LPASS Core Clock Controller on SC7280
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm LPASS core clock control module provides the clocks and power
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm LPASS Core & Audio Clock Controller on SC7280
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm LPASS core and audio clock control module provides the clocks and
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm Display Clock & Reset Controller on SDM845
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm display clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ description: |
|
|||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,sm8350-videocc
|
||||
enum:
|
||||
- qcom,sc8280xp-videocc
|
||||
- qcom,sm8350-videocc
|
||||
|
||||
clocks:
|
||||
items:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
|||
title: Qualcomm Video Clock & Reset Controller
|
||||
|
||||
maintainers:
|
||||
- Taniya Das <tdas@codeaurora.org>
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm video clock control module provides the clocks, resets and power
|
||||
|
|
|
|||
|
|
@ -145,6 +145,14 @@ config IPQ_GCC_4019
|
|||
Say Y if you want to use peripheral devices such as UART, SPI,
|
||||
i2c, USB, SD/eMMC, etc.
|
||||
|
||||
config IPQ_GCC_5018
|
||||
tristate "IPQ5018 Global Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
help
|
||||
Support for global clock controller on ipq5018 devices.
|
||||
Say Y if you want to use peripheral devices such as UART, SPI,
|
||||
i2c, USB, SD/eMMC, etc.
|
||||
|
||||
config IPQ_GCC_5332
|
||||
tristate "IPQ5332 Global Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
|
|
@ -247,11 +255,11 @@ config MSM_GCC_8960
|
|||
i2c, USB, SD/eMMC, SATA, PCIe, etc.
|
||||
|
||||
config MSM_LCC_8960
|
||||
tristate "APQ8064/MSM8960 LPASS Clock Controller"
|
||||
tristate "APQ8064/MSM8960/MDM9650 LPASS Clock Controller"
|
||||
depends on ARM || COMPILE_TEST
|
||||
select MSM_GCC_8960
|
||||
help
|
||||
Support for the LPASS clock controller on apq8064/msm8960 devices.
|
||||
Support for the LPASS clock controller on apq8064/msm8960/mdm9650
|
||||
devices.
|
||||
Say Y if you want to use audio devices such as i2s, pcm,
|
||||
SLIMBus, etc.
|
||||
|
||||
|
|
@ -271,15 +279,6 @@ config MDM_GCC_9615
|
|||
Say Y if you want to use peripheral devices such as UART, SPI,
|
||||
i2c, USB, SD/eMMC, etc.
|
||||
|
||||
config MDM_LCC_9615
|
||||
tristate "MDM9615 LPASS Clock Controller"
|
||||
depends on ARM || COMPILE_TEST
|
||||
select MDM_GCC_9615
|
||||
help
|
||||
Support for the LPASS clock controller on mdm9615 devices.
|
||||
Say Y if you want to use audio devices such as i2s, pcm,
|
||||
SLIMBus, etc.
|
||||
|
||||
config MSM_MMCC_8960
|
||||
tristate "MSM8960 Multimedia Clock Controller"
|
||||
depends on ARM || COMPILE_TEST
|
||||
|
|
@ -995,6 +994,7 @@ config SM_GPUCC_8450
|
|||
|
||||
config SM_GPUCC_8550
|
||||
tristate "SM8550 Graphics Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
select SM_GCC_8550
|
||||
help
|
||||
Support for the graphics clock controller on SM8550 devices.
|
||||
|
|
@ -1031,6 +1031,7 @@ config SM_VIDEOCC_8250
|
|||
|
||||
config SM_VIDEOCC_8350
|
||||
tristate "SM8350 Video Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
select SM_GCC_8350
|
||||
select QCOM_GDSC
|
||||
help
|
||||
|
|
@ -1040,6 +1041,7 @@ config SM_VIDEOCC_8350
|
|||
|
||||
config SM_VIDEOCC_8550
|
||||
tristate "SM8550 Video Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
select SM_GCC_8550
|
||||
select QCOM_GDSC
|
||||
help
|
||||
|
|
@ -1088,6 +1090,7 @@ config CLK_GFM_LPASS_SM8250
|
|||
|
||||
config SM_VIDEOCC_8450
|
||||
tristate "SM8450 Video Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
select SM_GCC_8450
|
||||
select QCOM_GDSC
|
||||
help
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ obj-$(CONFIG_CLK_GFM_LPASS_SM8250) += lpass-gfm-sm8250.o
|
|||
obj-$(CONFIG_IPQ_APSS_PLL) += apss-ipq-pll.o
|
||||
obj-$(CONFIG_IPQ_APSS_6018) += apss-ipq6018.o
|
||||
obj-$(CONFIG_IPQ_GCC_4019) += gcc-ipq4019.o
|
||||
obj-$(CONFIG_IPQ_GCC_5018) += gcc-ipq5018.o
|
||||
obj-$(CONFIG_IPQ_GCC_5332) += gcc-ipq5332.o
|
||||
obj-$(CONFIG_IPQ_GCC_6018) += gcc-ipq6018.o
|
||||
obj-$(CONFIG_IPQ_GCC_806X) += gcc-ipq806x.o
|
||||
|
|
@ -32,7 +33,6 @@ obj-$(CONFIG_IPQ_GCC_9574) += gcc-ipq9574.o
|
|||
obj-$(CONFIG_IPQ_LCC_806X) += lcc-ipq806x.o
|
||||
obj-$(CONFIG_MDM_GCC_9607) += gcc-mdm9607.o
|
||||
obj-$(CONFIG_MDM_GCC_9615) += gcc-mdm9615.o
|
||||
obj-$(CONFIG_MDM_LCC_9615) += lcc-mdm9615.o
|
||||
obj-$(CONFIG_MSM_GCC_8660) += gcc-msm8660.o
|
||||
obj-$(CONFIG_MSM_GCC_8909) += gcc-msm8909.o
|
||||
obj-$(CONFIG_MSM_GCC_8916) += gcc-msm8916.o
|
||||
|
|
|
|||
|
|
@ -1664,7 +1664,7 @@ static int cam_cc_sc7180_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = pm_runtime_get(&pdev->dev);
|
||||
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static const u8 cbf_pll_regs[PLL_OFF_MAX_REGS] = {
|
|||
[PLL_OFF_STATUS] = 0x28,
|
||||
};
|
||||
|
||||
static const struct alpha_pll_config cbfpll_config = {
|
||||
static struct alpha_pll_config cbfpll_config = {
|
||||
.l = 72,
|
||||
.config_ctl_val = 0x200d4828,
|
||||
.config_ctl_hi_val = 0x006,
|
||||
|
|
@ -141,7 +141,7 @@ static int clk_cbf_8996_mux_determine_rate(struct clk_hw *hw,
|
|||
{
|
||||
struct clk_hw *parent;
|
||||
|
||||
if (req->rate < (DIV_THRESHOLD / 2))
|
||||
if (req->rate < (DIV_THRESHOLD / cbf_pll_postdiv.div))
|
||||
return -EINVAL;
|
||||
|
||||
if (req->rate < DIV_THRESHOLD)
|
||||
|
|
@ -312,6 +312,11 @@ static int qcom_msm8996_cbf_probe(struct platform_device *pdev)
|
|||
/* Switch CBF to use the primary PLL */
|
||||
regmap_update_bits(regmap, CBF_MUX_OFFSET, CBF_MUX_PARENT_MASK, 0x1);
|
||||
|
||||
if (of_device_is_compatible(dev->of_node, "qcom,msm8996pro-cbf")) {
|
||||
cbfpll_config.post_div_val = 0x3 << 8;
|
||||
cbf_pll_postdiv.div = 4;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(cbf_msm8996_hw_clks); i++) {
|
||||
ret = devm_clk_hw_register(dev, cbf_msm8996_hw_clks[i]);
|
||||
if (ret)
|
||||
|
|
@ -342,6 +347,7 @@ static int qcom_msm8996_cbf_remove(struct platform_device *pdev)
|
|||
|
||||
static const struct of_device_id qcom_msm8996_cbf_match_table[] = {
|
||||
{ .compatible = "qcom,msm8996-cbf" },
|
||||
{ .compatible = "qcom,msm8996pro-cbf" },
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, qcom_msm8996_cbf_match_table);
|
||||
|
|
|
|||
|
|
@ -18,15 +18,8 @@
|
|||
|
||||
#include <dt-bindings/clock/qcom,rpmcc.h>
|
||||
|
||||
#define QCOM_RPM_KEY_SOFTWARE_ENABLE 0x6e657773
|
||||
#define QCOM_RPM_KEY_PIN_CTRL_CLK_BUFFER_ENABLE_KEY 0x62636370
|
||||
#define QCOM_RPM_SMD_KEY_RATE 0x007a484b
|
||||
#define QCOM_RPM_SMD_KEY_ENABLE 0x62616e45
|
||||
#define QCOM_RPM_SMD_KEY_STATE 0x54415453
|
||||
#define QCOM_RPM_SCALING_ENABLE_ID 0x2
|
||||
|
||||
#define __DEFINE_CLK_SMD_RPM_PREFIX(_prefix, _name, _active, \
|
||||
type, r_id, key) \
|
||||
type, r_id, key, ao_rate, ao_flags) \
|
||||
static struct clk_smd_rpm clk_smd_rpm_##_prefix##_active; \
|
||||
static struct clk_smd_rpm clk_smd_rpm_##_prefix##_name = { \
|
||||
.rpm_res_type = (type), \
|
||||
|
|
@ -50,7 +43,7 @@
|
|||
.active_only = true, \
|
||||
.rpm_key = (key), \
|
||||
.peer = &clk_smd_rpm_##_prefix##_name, \
|
||||
.rate = INT_MAX, \
|
||||
.rate = (ao_rate), \
|
||||
.hw.init = &(struct clk_init_data){ \
|
||||
.ops = &clk_smd_rpm_ops, \
|
||||
.name = #_active, \
|
||||
|
|
@ -59,12 +52,14 @@
|
|||
.name = "xo_board", \
|
||||
}, \
|
||||
.num_parents = 1, \
|
||||
.flags = (ao_flags), \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define __DEFINE_CLK_SMD_RPM(_name, _active, type, r_id, key) \
|
||||
#define __DEFINE_CLK_SMD_RPM(_name, _active, type, r_id, key,\
|
||||
ao_rate, ao_flags) \
|
||||
__DEFINE_CLK_SMD_RPM_PREFIX(/* empty */, _name, _active, \
|
||||
type, r_id, key)
|
||||
type, r_id, key, ao_rate, ao_flags)
|
||||
|
||||
#define __DEFINE_CLK_SMD_RPM_BRANCH_PREFIX(_prefix, _name, _active,\
|
||||
type, r_id, r, key, ao_flags) \
|
||||
|
|
@ -112,17 +107,22 @@
|
|||
|
||||
#define DEFINE_CLK_SMD_RPM(_name, type, r_id) \
|
||||
__DEFINE_CLK_SMD_RPM(_name##_clk, _name##_a_clk, \
|
||||
type, r_id, QCOM_RPM_SMD_KEY_RATE)
|
||||
type, r_id, QCOM_RPM_SMD_KEY_RATE, INT_MAX, 0)
|
||||
|
||||
#define DEFINE_CLK_SMD_RPM_BUS(_name, r_id) \
|
||||
__DEFINE_CLK_SMD_RPM_PREFIX(bus_##r_id##_, \
|
||||
_name##_clk, _name##_a_clk, QCOM_SMD_RPM_BUS_CLK, r_id, \
|
||||
QCOM_RPM_SMD_KEY_RATE)
|
||||
QCOM_RPM_SMD_KEY_RATE, INT_MAX, 0)
|
||||
|
||||
#define DEFINE_CLK_SMD_RPM_BUS_A(_name, r_id, ao_rate, ao_flags) \
|
||||
__DEFINE_CLK_SMD_RPM_PREFIX(bus_##r_id##_, \
|
||||
_name##_clk, _name##_a_clk, QCOM_SMD_RPM_BUS_CLK, r_id, \
|
||||
QCOM_RPM_SMD_KEY_RATE, ao_rate, ao_flags)
|
||||
|
||||
#define DEFINE_CLK_SMD_RPM_CLK_SRC(_name, type, r_id) \
|
||||
__DEFINE_CLK_SMD_RPM( \
|
||||
_name##_clk_src, _name##_a_clk_src, \
|
||||
type, r_id, QCOM_RPM_SMD_KEY_RATE)
|
||||
type, r_id, QCOM_RPM_SMD_KEY_RATE, INT_MAX, 0)
|
||||
|
||||
#define DEFINE_CLK_SMD_RPM_BRANCH(_name, type, r_id, r) \
|
||||
__DEFINE_CLK_SMD_RPM_BRANCH_PREFIX(branch_, \
|
||||
|
|
@ -136,7 +136,7 @@
|
|||
|
||||
#define DEFINE_CLK_SMD_RPM_QDSS(_name, type, r_id) \
|
||||
__DEFINE_CLK_SMD_RPM(_name##_clk, _name##_a_clk, \
|
||||
type, r_id, QCOM_RPM_SMD_KEY_STATE)
|
||||
type, r_id, QCOM_RPM_SMD_KEY_STATE, INT_MAX, 0)
|
||||
|
||||
#define DEFINE_CLK_SMD_RPM_XO_BUFFER(_name, r_id, r) \
|
||||
__DEFINE_CLK_SMD_RPM_BRANCH(_name, _name##_a, \
|
||||
|
|
@ -171,21 +171,23 @@ struct clk_smd_rpm {
|
|||
unsigned long rate;
|
||||
};
|
||||
|
||||
struct clk_smd_rpm_req {
|
||||
__le32 key;
|
||||
__le32 nbytes;
|
||||
__le32 value;
|
||||
};
|
||||
|
||||
struct rpm_smd_clk_desc {
|
||||
struct clk_smd_rpm **clks;
|
||||
size_t num_clks;
|
||||
|
||||
/*
|
||||
* Interconnect clocks are managed by the icc framework, this driver
|
||||
* only kickstarts them so that they don't get gated between
|
||||
* clk_smd_rpm_enable_scaling() and interconnect driver initialization.
|
||||
*/
|
||||
const struct clk_smd_rpm ** const icc_clks;
|
||||
size_t num_icc_clks;
|
||||
bool scaling_before_handover;
|
||||
};
|
||||
|
||||
static DEFINE_MUTEX(rpm_smd_clk_lock);
|
||||
|
||||
static int clk_smd_rpm_handoff(struct clk_smd_rpm *r)
|
||||
static int clk_smd_rpm_handoff(const struct clk_smd_rpm *r)
|
||||
{
|
||||
int ret;
|
||||
struct clk_smd_rpm_req req = {
|
||||
|
|
@ -454,7 +456,7 @@ DEFINE_CLK_SMD_RPM_BRANCH(aggre2_noc, QCOM_SMD_RPM_AGGR_CLK, 2, 1000);
|
|||
DEFINE_CLK_SMD_RPM(aggre1_noc, QCOM_SMD_RPM_AGGR_CLK, 1);
|
||||
DEFINE_CLK_SMD_RPM(aggre2_noc, QCOM_SMD_RPM_AGGR_CLK, 2);
|
||||
|
||||
DEFINE_CLK_SMD_RPM_BUS(pcnoc, 0);
|
||||
DEFINE_CLK_SMD_RPM_BUS_A(pcnoc, 0, 19200000, CLK_IS_CRITICAL);
|
||||
DEFINE_CLK_SMD_RPM_BUS(snoc, 1);
|
||||
DEFINE_CLK_SMD_RPM_BUS(sysmmnoc, 2);
|
||||
DEFINE_CLK_SMD_RPM_BUS(cnoc, 2);
|
||||
|
|
@ -511,13 +513,69 @@ DEFINE_CLK_SMD_RPM_XO_BUFFER(div_clk1, 11, 19200000);
|
|||
DEFINE_CLK_SMD_RPM_XO_BUFFER(div_clk2, 12, 19200000);
|
||||
DEFINE_CLK_SMD_RPM_XO_BUFFER(div_clk3, 13, 19200000);
|
||||
|
||||
static const struct clk_smd_rpm *bimc_pcnoc_icc_clks[] = {
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *bimc_pcnoc_snoc_icc_clks[] = {
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
&clk_smd_rpm_bus_1_snoc_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *bimc_pcnoc_snoc_smmnoc_icc_clks[] = {
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
&clk_smd_rpm_bus_1_snoc_clk,
|
||||
&clk_smd_rpm_bus_2_sysmmnoc_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *bimc_pcnoc_snoc_cnoc_ocmem_icc_clks[] = {
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
&clk_smd_rpm_bus_1_snoc_clk,
|
||||
&clk_smd_rpm_bus_2_cnoc_clk,
|
||||
&clk_smd_rpm_ocmemgx_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *msm8996_icc_clks[] = {
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_branch_aggre1_noc_clk,
|
||||
&clk_smd_rpm_branch_aggre2_noc_clk,
|
||||
&clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
&clk_smd_rpm_bus_1_snoc_clk,
|
||||
&clk_smd_rpm_bus_2_cnoc_clk,
|
||||
&clk_smd_rpm_mmssnoc_axi_rpm_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *msm8998_icc_clks[] = {
|
||||
&clk_smd_rpm_aggre1_noc_clk,
|
||||
&clk_smd_rpm_aggre2_noc_clk,
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_1_snoc_clk,
|
||||
&clk_smd_rpm_bus_2_cnoc_clk,
|
||||
&clk_smd_rpm_mmssnoc_axi_rpm_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *sdm660_icc_clks[] = {
|
||||
&clk_smd_rpm_aggre2_noc_clk,
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_1_snoc_clk,
|
||||
&clk_smd_rpm_bus_2_cnoc_clk,
|
||||
&clk_smd_rpm_mmssnoc_axi_rpm_clk,
|
||||
};
|
||||
|
||||
static const struct clk_smd_rpm *sm_qnoc_icc_clks[] = {
|
||||
&clk_smd_rpm_bimc_clk,
|
||||
&clk_smd_rpm_bus_1_cnoc_clk,
|
||||
&clk_smd_rpm_mmnrt_clk,
|
||||
&clk_smd_rpm_mmrt_clk,
|
||||
&clk_smd_rpm_qup_clk,
|
||||
&clk_smd_rpm_bus_2_snoc_clk,
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8909_clks[] = {
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QPIC_CLK] = &clk_smd_rpm_qpic_clk,
|
||||
[RPM_SMD_QPIC_CLK_A] = &clk_smd_rpm_qpic_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
|
|
@ -543,15 +601,11 @@ static struct clk_smd_rpm *msm8909_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8909 = {
|
||||
.clks = msm8909_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8909_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8916_clks[] = {
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
|
|
@ -575,21 +629,15 @@ static struct clk_smd_rpm *msm8916_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8916 = {
|
||||
.clks = msm8916_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8916_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8917_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_BIMC_GPU_CLK] = &clk_smd_rpm_bimc_gpu_clk,
|
||||
[RPM_SMD_BIMC_GPU_A_CLK] = &clk_smd_rpm_bimc_gpu_a_clk,
|
||||
[RPM_SMD_SYSMMNOC_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_clk,
|
||||
[RPM_SMD_SYSMMNOC_A_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
|
|
@ -609,19 +657,13 @@ static struct clk_smd_rpm *msm8917_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8917 = {
|
||||
.clks = msm8917_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8917_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_smmnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_smmnoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8936_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_SYSMMNOC_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_clk,
|
||||
[RPM_SMD_SYSMMNOC_A_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
|
|
@ -645,25 +687,17 @@ static struct clk_smd_rpm *msm8936_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8936 = {
|
||||
.clks = msm8936_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8936_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_smmnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_smmnoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8974_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_2_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_2_cnoc_a_clk,
|
||||
[RPM_SMD_MMSSNOC_AHB_CLK] = &clk_smd_rpm_bus_3_mmssnoc_ahb_clk,
|
||||
[RPM_SMD_MMSSNOC_AHB_A_CLK] = &clk_smd_rpm_bus_3_mmssnoc_ahb_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_GFX3D_CLK_SRC] = &clk_smd_rpm_gfx3d_clk_src,
|
||||
[RPM_SMD_GFX3D_A_CLK_SRC] = &clk_smd_rpm_gfx3d_a_clk_src,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_OCMEMGX_CLK] = &clk_smd_rpm_ocmemgx_clk,
|
||||
[RPM_SMD_OCMEMGX_A_CLK] = &clk_smd_rpm_ocmemgx_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_CXO_D0] = &clk_smd_rpm_cxo_d0,
|
||||
|
|
@ -697,20 +731,14 @@ static struct clk_smd_rpm *msm8974_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8974 = {
|
||||
.clks = msm8974_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8974_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_cnoc_ocmem_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_cnoc_ocmem_icc_clks),
|
||||
.scaling_before_handover = true,
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8976_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_SYSMMNOC_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_clk,
|
||||
[RPM_SMD_SYSMMNOC_A_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
|
|
@ -731,24 +759,15 @@ static struct clk_smd_rpm *msm8976_clks[] = {
|
|||
|
||||
static const struct rpm_smd_clk_desc rpm_clk_msm8976 = {
|
||||
.clks = msm8976_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8976_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_smmnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_smmnoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8992_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_OCMEMGX_CLK] = &clk_smd_rpm_ocmemgx_clk,
|
||||
[RPM_SMD_OCMEMGX_A_CLK] = &clk_smd_rpm_ocmemgx_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_2_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_2_cnoc_a_clk,
|
||||
[RPM_SMD_GFX3D_CLK_SRC] = &clk_smd_rpm_gfx3d_clk_src,
|
||||
[RPM_SMD_GFX3D_A_CLK_SRC] = &clk_smd_rpm_gfx3d_a_clk_src,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
[RPM_SMD_BB_CLK1_A] = &clk_smd_rpm_bb_clk1_a,
|
||||
[RPM_SMD_BB_CLK1_PIN] = &clk_smd_rpm_bb_clk1_pin,
|
||||
|
|
@ -790,23 +809,15 @@ static struct clk_smd_rpm *msm8992_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8992 = {
|
||||
.clks = msm8992_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8992_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_cnoc_ocmem_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_cnoc_ocmem_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8994_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_OCMEMGX_CLK] = &clk_smd_rpm_ocmemgx_clk,
|
||||
[RPM_SMD_OCMEMGX_A_CLK] = &clk_smd_rpm_ocmemgx_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_2_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_2_cnoc_a_clk,
|
||||
[RPM_SMD_GFX3D_CLK_SRC] = &clk_smd_rpm_gfx3d_clk_src,
|
||||
[RPM_SMD_GFX3D_A_CLK_SRC] = &clk_smd_rpm_gfx3d_a_clk_src,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
[RPM_SMD_BB_CLK1_A] = &clk_smd_rpm_bb_clk1_a,
|
||||
[RPM_SMD_BB_CLK1_PIN] = &clk_smd_rpm_bb_clk1_pin,
|
||||
|
|
@ -850,29 +861,17 @@ static struct clk_smd_rpm *msm8994_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8994 = {
|
||||
.clks = msm8994_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8994_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_cnoc_ocmem_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_cnoc_ocmem_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8996_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_2_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_2_cnoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_MMAXI_CLK] = &clk_smd_rpm_mmssnoc_axi_rpm_clk,
|
||||
[RPM_SMD_MMAXI_A_CLK] = &clk_smd_rpm_mmssnoc_axi_rpm_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_CE1_CLK] = &clk_smd_rpm_ce1_clk,
|
||||
[RPM_SMD_CE1_A_CLK] = &clk_smd_rpm_ce1_a_clk,
|
||||
[RPM_SMD_AGGR1_NOC_CLK] = &clk_smd_rpm_branch_aggre1_noc_clk,
|
||||
[RPM_SMD_AGGR1_NOC_A_CLK] = &clk_smd_rpm_branch_aggre1_noc_a_clk,
|
||||
[RPM_SMD_AGGR2_NOC_CLK] = &clk_smd_rpm_branch_aggre2_noc_clk,
|
||||
[RPM_SMD_AGGR2_NOC_A_CLK] = &clk_smd_rpm_branch_aggre2_noc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
|
|
@ -904,6 +903,8 @@ static struct clk_smd_rpm *msm8996_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8996 = {
|
||||
.clks = msm8996_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8996_clks),
|
||||
.icc_clks = msm8996_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(msm8996_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *qcs404_clks[] = {
|
||||
|
|
@ -932,19 +933,15 @@ static struct clk_smd_rpm *qcs404_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_qcs404 = {
|
||||
.clks = qcs404_clks,
|
||||
.num_clks = ARRAY_SIZE(qcs404_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8998_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_2_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_2_cnoc_a_clk,
|
||||
[RPM_SMD_CE1_CLK] = &clk_smd_rpm_ce1_clk,
|
||||
[RPM_SMD_CE1_A_CLK] = &clk_smd_rpm_ce1_a_clk,
|
||||
[RPM_SMD_DIV_CLK1] = &clk_smd_rpm_div_clk1,
|
||||
|
|
@ -967,12 +964,6 @@ static struct clk_smd_rpm *msm8998_clks[] = {
|
|||
[RPM_SMD_LN_BB_CLK2_A_PIN] = &clk_smd_rpm_ln_bb_clk2_a_pin,
|
||||
[RPM_SMD_LN_BB_CLK3_PIN] = &clk_smd_rpm_ln_bb_clk3_pin,
|
||||
[RPM_SMD_LN_BB_CLK3_A_PIN] = &clk_smd_rpm_ln_bb_clk3_a_pin,
|
||||
[RPM_SMD_MMAXI_CLK] = &clk_smd_rpm_mmssnoc_axi_rpm_clk,
|
||||
[RPM_SMD_MMAXI_A_CLK] = &clk_smd_rpm_mmssnoc_axi_rpm_a_clk,
|
||||
[RPM_SMD_AGGR1_NOC_CLK] = &clk_smd_rpm_aggre1_noc_clk,
|
||||
[RPM_SMD_AGGR1_NOC_A_CLK] = &clk_smd_rpm_aggre1_noc_a_clk,
|
||||
[RPM_SMD_AGGR2_NOC_CLK] = &clk_smd_rpm_aggre2_noc_clk,
|
||||
[RPM_SMD_AGGR2_NOC_A_CLK] = &clk_smd_rpm_aggre2_noc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_RF_CLK1] = &clk_smd_rpm_rf_clk1,
|
||||
|
|
@ -992,27 +983,19 @@ static struct clk_smd_rpm *msm8998_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8998 = {
|
||||
.clks = msm8998_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8998_clks),
|
||||
.icc_clks = msm8998_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(msm8998_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *sdm660_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_2_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_2_cnoc_a_clk,
|
||||
[RPM_SMD_CNOC_PERIPH_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_CNOC_PERIPH_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_MMSSNOC_AXI_CLK] = &clk_smd_rpm_mmssnoc_axi_rpm_clk,
|
||||
[RPM_SMD_MMSSNOC_AXI_CLK_A] = &clk_smd_rpm_mmssnoc_axi_rpm_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_CE1_CLK] = &clk_smd_rpm_ce1_clk,
|
||||
[RPM_SMD_CE1_A_CLK] = &clk_smd_rpm_ce1_a_clk,
|
||||
[RPM_SMD_AGGR2_NOC_CLK] = &clk_smd_rpm_aggre2_noc_clk,
|
||||
[RPM_SMD_AGGR2_NOC_A_CLK] = &clk_smd_rpm_aggre2_noc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_RF_CLK1] = &clk_smd_rpm_rf_clk1,
|
||||
|
|
@ -1038,15 +1021,13 @@ static struct clk_smd_rpm *sdm660_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_sdm660 = {
|
||||
.clks = sdm660_clks,
|
||||
.num_clks = ARRAY_SIZE(sdm660_clks),
|
||||
.icc_clks = sdm660_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(sdm660_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *mdm9607_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QPIC_CLK] = &clk_smd_rpm_qpic_clk,
|
||||
[RPM_SMD_QPIC_CLK_A] = &clk_smd_rpm_qpic_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
|
|
@ -1060,21 +1041,15 @@ static struct clk_smd_rpm *mdm9607_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_mdm9607 = {
|
||||
.clks = mdm9607_clks,
|
||||
.num_clks = ARRAY_SIZE(mdm9607_clks),
|
||||
.icc_clks = bimc_pcnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *msm8953_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_1_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_SYSMMNOC_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_clk,
|
||||
[RPM_SMD_SYSMMNOC_A_CLK] = &clk_smd_rpm_bus_2_sysmmnoc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_qdss_a_clk,
|
||||
[RPM_SMD_BB_CLK1] = &clk_smd_rpm_bb_clk1,
|
||||
|
|
@ -1096,23 +1071,19 @@ static struct clk_smd_rpm *msm8953_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_msm8953 = {
|
||||
.clks = msm8953_clks,
|
||||
.num_clks = ARRAY_SIZE(msm8953_clks),
|
||||
.icc_clks = bimc_pcnoc_snoc_smmnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_smmnoc_icc_clks),
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *sm6125_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_2_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_2_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_branch_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_branch_qdss_a_clk,
|
||||
[RPM_SMD_RF_CLK1] = &clk_smd_rpm_rf_clk1,
|
||||
[RPM_SMD_RF_CLK1_A] = &clk_smd_rpm_rf_clk1_a,
|
||||
[RPM_SMD_RF_CLK2] = &clk_smd_rpm_rf_clk2,
|
||||
[RPM_SMD_RF_CLK2_A] = &clk_smd_rpm_rf_clk2_a,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_1_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_1_cnoc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_CE1_CLK] = &clk_smd_rpm_ce1_clk,
|
||||
|
|
@ -1123,12 +1094,6 @@ static struct clk_smd_rpm *sm6125_clks[] = {
|
|||
[RPM_SMD_LN_BB_CLK2_A] = &clk_smd_rpm_ln_bb_clk2_a,
|
||||
[RPM_SMD_LN_BB_CLK3] = &clk_smd_rpm_ln_bb_clk3,
|
||||
[RPM_SMD_LN_BB_CLK3_A] = &clk_smd_rpm_ln_bb_clk3_a,
|
||||
[RPM_SMD_QUP_CLK] = &clk_smd_rpm_qup_clk,
|
||||
[RPM_SMD_QUP_A_CLK] = &clk_smd_rpm_qup_a_clk,
|
||||
[RPM_SMD_MMRT_CLK] = &clk_smd_rpm_mmrt_clk,
|
||||
[RPM_SMD_MMRT_A_CLK] = &clk_smd_rpm_mmrt_a_clk,
|
||||
[RPM_SMD_MMNRT_CLK] = &clk_smd_rpm_mmnrt_clk,
|
||||
[RPM_SMD_MMNRT_A_CLK] = &clk_smd_rpm_mmnrt_a_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_CLK] = &clk_smd_rpm_bus_0_snoc_periph_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_A_CLK] = &clk_smd_rpm_bus_0_snoc_periph_a_clk,
|
||||
[RPM_SMD_SNOC_LPASS_CLK] = &clk_smd_rpm_bus_5_snoc_lpass_clk,
|
||||
|
|
@ -1138,34 +1103,24 @@ static struct clk_smd_rpm *sm6125_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_sm6125 = {
|
||||
.clks = sm6125_clks,
|
||||
.num_clks = ARRAY_SIZE(sm6125_clks),
|
||||
.icc_clks = sm_qnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(sm_qnoc_icc_clks)
|
||||
};
|
||||
|
||||
/* SM6115 */
|
||||
static struct clk_smd_rpm *sm6115_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_2_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_2_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_branch_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_branch_qdss_a_clk,
|
||||
[RPM_SMD_RF_CLK1] = &clk_smd_rpm_rf_clk1,
|
||||
[RPM_SMD_RF_CLK1_A] = &clk_smd_rpm_rf_clk1_a,
|
||||
[RPM_SMD_RF_CLK2] = &clk_smd_rpm_rf_clk2,
|
||||
[RPM_SMD_RF_CLK2_A] = &clk_smd_rpm_rf_clk2_a,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_1_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_1_cnoc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_CE1_CLK] = &clk_smd_rpm_ce1_clk,
|
||||
[RPM_SMD_CE1_A_CLK] = &clk_smd_rpm_ce1_a_clk,
|
||||
[RPM_SMD_QUP_CLK] = &clk_smd_rpm_qup_clk,
|
||||
[RPM_SMD_QUP_A_CLK] = &clk_smd_rpm_qup_a_clk,
|
||||
[RPM_SMD_MMRT_CLK] = &clk_smd_rpm_mmrt_clk,
|
||||
[RPM_SMD_MMRT_A_CLK] = &clk_smd_rpm_mmrt_a_clk,
|
||||
[RPM_SMD_MMNRT_CLK] = &clk_smd_rpm_mmnrt_clk,
|
||||
[RPM_SMD_MMNRT_A_CLK] = &clk_smd_rpm_mmnrt_a_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_CLK] = &clk_smd_rpm_bus_0_snoc_periph_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_A_CLK] = &clk_smd_rpm_bus_0_snoc_periph_a_clk,
|
||||
[RPM_SMD_SNOC_LPASS_CLK] = &clk_smd_rpm_bus_5_snoc_lpass_clk,
|
||||
|
|
@ -1179,27 +1134,17 @@ static struct clk_smd_rpm *sm6115_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_sm6115 = {
|
||||
.clks = sm6115_clks,
|
||||
.num_clks = ARRAY_SIZE(sm6115_clks),
|
||||
.icc_clks = sm_qnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(sm_qnoc_icc_clks)
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *sm6375_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_2_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_2_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_branch_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_branch_qdss_a_clk,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_1_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_1_cnoc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_QUP_CLK] = &clk_smd_rpm_qup_clk,
|
||||
[RPM_SMD_QUP_A_CLK] = &clk_smd_rpm_qup_a_clk,
|
||||
[RPM_SMD_MMRT_CLK] = &clk_smd_rpm_mmrt_clk,
|
||||
[RPM_SMD_MMRT_A_CLK] = &clk_smd_rpm_mmrt_a_clk,
|
||||
[RPM_SMD_MMNRT_CLK] = &clk_smd_rpm_mmnrt_clk,
|
||||
[RPM_SMD_MMNRT_A_CLK] = &clk_smd_rpm_mmnrt_a_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_CLK] = &clk_smd_rpm_bus_0_snoc_periph_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_A_CLK] = &clk_smd_rpm_bus_0_snoc_periph_a_clk,
|
||||
[RPM_SMD_SNOC_LPASS_CLK] = &clk_smd_rpm_bus_5_snoc_lpass_clk,
|
||||
|
|
@ -1216,31 +1161,21 @@ static struct clk_smd_rpm *sm6375_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_sm6375 = {
|
||||
.clks = sm6375_clks,
|
||||
.num_clks = ARRAY_SIZE(sm6375_clks),
|
||||
.icc_clks = sm_qnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(sm_qnoc_icc_clks)
|
||||
};
|
||||
|
||||
static struct clk_smd_rpm *qcm2290_clks[] = {
|
||||
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
|
||||
[RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
|
||||
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_2_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &clk_smd_rpm_bus_2_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &clk_smd_rpm_bimc_clk,
|
||||
[RPM_SMD_BIMC_A_CLK] = &clk_smd_rpm_bimc_a_clk,
|
||||
[RPM_SMD_QDSS_CLK] = &clk_smd_rpm_branch_qdss_clk,
|
||||
[RPM_SMD_QDSS_A_CLK] = &clk_smd_rpm_branch_qdss_a_clk,
|
||||
[RPM_SMD_LN_BB_CLK2] = &clk_smd_rpm_ln_bb_clk2,
|
||||
[RPM_SMD_LN_BB_CLK2_A] = &clk_smd_rpm_ln_bb_clk2_a,
|
||||
[RPM_SMD_RF_CLK3] = &clk_smd_rpm_38m4_rf_clk3,
|
||||
[RPM_SMD_RF_CLK3_A] = &clk_smd_rpm_38m4_rf_clk3_a,
|
||||
[RPM_SMD_CNOC_CLK] = &clk_smd_rpm_bus_1_cnoc_clk,
|
||||
[RPM_SMD_CNOC_A_CLK] = &clk_smd_rpm_bus_1_cnoc_a_clk,
|
||||
[RPM_SMD_IPA_CLK] = &clk_smd_rpm_ipa_clk,
|
||||
[RPM_SMD_IPA_A_CLK] = &clk_smd_rpm_ipa_a_clk,
|
||||
[RPM_SMD_QUP_CLK] = &clk_smd_rpm_qup_clk,
|
||||
[RPM_SMD_QUP_A_CLK] = &clk_smd_rpm_qup_a_clk,
|
||||
[RPM_SMD_MMRT_CLK] = &clk_smd_rpm_mmrt_clk,
|
||||
[RPM_SMD_MMRT_A_CLK] = &clk_smd_rpm_mmrt_a_clk,
|
||||
[RPM_SMD_MMNRT_CLK] = &clk_smd_rpm_mmnrt_clk,
|
||||
[RPM_SMD_MMNRT_A_CLK] = &clk_smd_rpm_mmnrt_a_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_CLK] = &clk_smd_rpm_bus_0_snoc_periph_clk,
|
||||
[RPM_SMD_SNOC_PERIPH_A_CLK] = &clk_smd_rpm_bus_0_snoc_periph_a_clk,
|
||||
[RPM_SMD_SNOC_LPASS_CLK] = &clk_smd_rpm_bus_5_snoc_lpass_clk,
|
||||
|
|
@ -1262,6 +1197,8 @@ static struct clk_smd_rpm *qcm2290_clks[] = {
|
|||
static const struct rpm_smd_clk_desc rpm_clk_qcm2290 = {
|
||||
.clks = qcm2290_clks,
|
||||
.num_clks = ARRAY_SIZE(qcm2290_clks),
|
||||
.icc_clks = sm_qnoc_icc_clks,
|
||||
.num_icc_clks = ARRAY_SIZE(sm_qnoc_icc_clks)
|
||||
};
|
||||
|
||||
static const struct of_device_id rpm_smd_clk_match_table[] = {
|
||||
|
|
@ -1302,12 +1239,20 @@ static struct clk_hw *qcom_smdrpm_clk_hw_get(struct of_phandle_args *clkspec,
|
|||
return desc->clks[idx] ? &desc->clks[idx]->hw : ERR_PTR(-ENOENT);
|
||||
}
|
||||
|
||||
static void rpm_smd_unregister_icc(void *data)
|
||||
{
|
||||
struct platform_device *icc_pdev = data;
|
||||
|
||||
platform_device_unregister(icc_pdev);
|
||||
}
|
||||
|
||||
static int rpm_smd_clk_probe(struct platform_device *pdev)
|
||||
{
|
||||
int ret;
|
||||
size_t num_clks, i;
|
||||
struct clk_smd_rpm **rpm_smd_clks;
|
||||
const struct rpm_smd_clk_desc *desc;
|
||||
struct platform_device *icc_pdev;
|
||||
|
||||
rpmcc_smd_rpm = dev_get_drvdata(pdev->dev.parent);
|
||||
if (!rpmcc_smd_rpm) {
|
||||
|
|
@ -1337,6 +1282,15 @@ static int rpm_smd_clk_probe(struct platform_device *pdev)
|
|||
goto err;
|
||||
}
|
||||
|
||||
for (i = 0; i < desc->num_icc_clks; i++) {
|
||||
if (!desc->icc_clks[i])
|
||||
continue;
|
||||
|
||||
ret = clk_smd_rpm_handoff(desc->icc_clks[i]);
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!desc->scaling_before_handover) {
|
||||
ret = clk_smd_rpm_enable_scaling();
|
||||
if (ret)
|
||||
|
|
@ -1357,6 +1311,19 @@ static int rpm_smd_clk_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
goto err;
|
||||
|
||||
icc_pdev = platform_device_register_data(pdev->dev.parent,
|
||||
"icc_smd_rpm", -1, NULL, 0);
|
||||
if (IS_ERR(icc_pdev)) {
|
||||
dev_err(&pdev->dev, "Failed to register icc_smd_rpm device: %pE\n",
|
||||
icc_pdev);
|
||||
/* No need to unregister clocks because of this */
|
||||
} else {
|
||||
ret = devm_add_action_or_reset(&pdev->dev, rpm_smd_unregister_icc,
|
||||
icc_pdev);
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
err:
|
||||
dev_err(&pdev->dev, "Error registering SMD clock driver (%d)\n", ret);
|
||||
|
|
|
|||
|
|
@ -3057,7 +3057,7 @@ static struct gdsc disp0_mdss_gdsc = {
|
|||
.name = "disp0_mdss_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = HW_CTRL,
|
||||
.flags = HW_CTRL | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc disp1_mdss_gdsc = {
|
||||
|
|
@ -3069,7 +3069,7 @@ static struct gdsc disp1_mdss_gdsc = {
|
|||
.name = "disp1_mdss_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = HW_CTRL,
|
||||
.flags = HW_CTRL | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc disp0_mdss_int2_gdsc = {
|
||||
|
|
@ -3081,7 +3081,7 @@ static struct gdsc disp0_mdss_int2_gdsc = {
|
|||
.name = "disp0_mdss_int2_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = HW_CTRL,
|
||||
.flags = HW_CTRL | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc disp1_mdss_int2_gdsc = {
|
||||
|
|
@ -3093,7 +3093,7 @@ static struct gdsc disp1_mdss_int2_gdsc = {
|
|||
.name = "disp1_mdss_int2_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = HW_CTRL,
|
||||
.flags = HW_CTRL | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc *disp0_cc_sc8280xp_gdscs[] = {
|
||||
|
|
|
|||
|
|
@ -1776,8 +1776,10 @@ static int disp_cc_sm8450_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
|
||||
regmap = qcom_cc_map(pdev, &disp_cc_sm8450_desc);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
if (IS_ERR(regmap)) {
|
||||
ret = PTR_ERR(regmap);
|
||||
goto err_put_rpm;
|
||||
}
|
||||
|
||||
clk_lucid_evo_pll_configure(&disp_cc_pll0, regmap, &disp_cc_pll0_config);
|
||||
clk_lucid_evo_pll_configure(&disp_cc_pll1, regmap, &disp_cc_pll1_config);
|
||||
|
|
@ -1792,9 +1794,16 @@ static int disp_cc_sm8450_probe(struct platform_device *pdev)
|
|||
regmap_update_bits(regmap, 0xe05c, BIT(0), BIT(0));
|
||||
|
||||
ret = qcom_cc_really_probe(pdev, &disp_cc_sm8450_desc, regmap);
|
||||
if (ret)
|
||||
goto err_put_rpm;
|
||||
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
||||
err_put_rpm:
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1761,8 +1761,10 @@ static int disp_cc_sm8550_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
|
||||
regmap = qcom_cc_map(pdev, &disp_cc_sm8550_desc);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
if (IS_ERR(regmap)) {
|
||||
ret = PTR_ERR(regmap);
|
||||
goto err_put_rpm;
|
||||
}
|
||||
|
||||
clk_lucid_evo_pll_configure(&disp_cc_pll0, regmap, &disp_cc_pll0_config);
|
||||
clk_lucid_evo_pll_configure(&disp_cc_pll1, regmap, &disp_cc_pll1_config);
|
||||
|
|
@ -1777,9 +1779,16 @@ static int disp_cc_sm8550_probe(struct platform_device *pdev)
|
|||
regmap_update_bits(regmap, 0xe054, BIT(0), BIT(0));
|
||||
|
||||
ret = qcom_cc_really_probe(pdev, &disp_cc_sm8550_desc, regmap);
|
||||
if (ret)
|
||||
goto err_put_rpm;
|
||||
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
||||
err_put_rpm:
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1686,6 +1686,12 @@ static const struct qcom_reset_map gcc_ipq4019_resets[] = {
|
|||
[GCC_TCSR_BCR] = {0x22000, 0},
|
||||
[GCC_MPM_BCR] = {0x24000, 0},
|
||||
[GCC_SPDM_BCR] = {0x25000, 0},
|
||||
[ESS_MAC1_ARES] = {0x1200C, 0},
|
||||
[ESS_MAC2_ARES] = {0x1200C, 1},
|
||||
[ESS_MAC3_ARES] = {0x1200C, 2},
|
||||
[ESS_MAC4_ARES] = {0x1200C, 3},
|
||||
[ESS_MAC5_ARES] = {0x1200C, 4},
|
||||
[ESS_PSGMII_ARES] = {0x1200C, 5},
|
||||
};
|
||||
|
||||
static const struct regmap_config gcc_ipq4019_regmap_config = {
|
||||
|
|
|
|||
3724
drivers/clk/qcom/gcc-ipq5018.c
Normal file
3724
drivers/clk/qcom/gcc-ipq5018.c
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -226,32 +226,30 @@ static const struct clk_parent_data gcc_parent_data_4[] = {
|
|||
static const struct parent_map gcc_parent_map_5[] = {
|
||||
{ P_XO, 0 },
|
||||
{ P_GPLL0_OUT_MAIN, 1 },
|
||||
{ P_GPLL2_OUT_AUX, 2 },
|
||||
{ P_GPLL4_OUT_AUX, 3 },
|
||||
{ P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC, 4 },
|
||||
{ P_GPLL0_OUT_AUX, 5 },
|
||||
{ P_GPLL0_OUT_AUX, 2 },
|
||||
{ P_SLEEP_CLK, 6 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_parent_data_5[] = {
|
||||
{ .index = DT_XO },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
{ .hw = &gpll2.clkr.hw },
|
||||
{ .hw = &gpll4.clkr.hw },
|
||||
{ .hw = &gpll0_div2.hw },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
{ .index = DT_SLEEP_CLK },
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_parent_map_6[] = {
|
||||
{ P_XO, 0 },
|
||||
{ P_GPLL0_OUT_MAIN, 1 },
|
||||
{ P_GPLL0_OUT_AUX, 2 },
|
||||
{ P_GPLL2_OUT_AUX, 2 },
|
||||
{ P_GPLL4_OUT_AUX, 3 },
|
||||
{ P_SLEEP_CLK, 6 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_parent_data_6[] = {
|
||||
{ .index = DT_XO },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
{ .hw = &gpll2.clkr.hw },
|
||||
{ .hw = &gpll4.clkr.hw },
|
||||
{ .index = DT_SLEEP_CLK },
|
||||
};
|
||||
|
||||
|
|
@ -259,86 +257,70 @@ static const struct parent_map gcc_parent_map_7[] = {
|
|||
{ P_XO, 0 },
|
||||
{ P_GPLL0_OUT_MAIN, 1 },
|
||||
{ P_GPLL2_OUT_AUX, 2 },
|
||||
{ P_GPLL4_OUT_AUX, 3 },
|
||||
{ P_SLEEP_CLK, 6 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_parent_data_7[] = {
|
||||
{ .index = DT_XO },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
{ .hw = &gpll2.clkr.hw },
|
||||
{ .hw = &gpll4.clkr.hw },
|
||||
{ .index = DT_SLEEP_CLK },
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_parent_map_8[] = {
|
||||
{ P_XO, 0 },
|
||||
{ P_GPLL0_OUT_MAIN, 1 },
|
||||
{ P_GPLL2_OUT_AUX, 2 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_parent_data_8[] = {
|
||||
{ .index = DT_XO },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
{ .hw = &gpll2.clkr.hw },
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_parent_map_9[] = {
|
||||
{ P_XO, 0 },
|
||||
{ P_GPLL0_OUT_MAIN, 1 },
|
||||
{ P_GPLL2_OUT_MAIN, 2 },
|
||||
{ P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC, 4 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_parent_data_9[] = {
|
||||
static const struct clk_parent_data gcc_parent_data_8[] = {
|
||||
{ .index = DT_XO },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
{ .hw = &gpll2.clkr.hw },
|
||||
{ .hw = &gpll0_div2.hw },
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_parent_map_10[] = {
|
||||
static const struct parent_map gcc_parent_map_9[] = {
|
||||
{ P_SLEEP_CLK, 6 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_parent_data_10[] = {
|
||||
static const struct clk_parent_data gcc_parent_data_9[] = {
|
||||
{ .index = DT_SLEEP_CLK },
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_parent_map_11[] = {
|
||||
static const struct parent_map gcc_parent_map_10[] = {
|
||||
{ P_XO, 0 },
|
||||
{ P_GPLL0_OUT_MAIN, 1 },
|
||||
{ P_GPLL4_OUT_MAIN, 2 },
|
||||
{ P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC, 3 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_parent_data_11[] = {
|
||||
static const struct clk_parent_data gcc_parent_data_10[] = {
|
||||
{ .index = DT_XO },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
{ .hw = &gpll4.clkr.hw },
|
||||
{ .hw = &gpll0_div2.hw },
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_parent_map_12[] = {
|
||||
static const struct parent_map gcc_parent_map_11[] = {
|
||||
{ P_XO, 0 },
|
||||
{ P_GPLL0_OUT_AUX, 2 },
|
||||
{ P_SLEEP_CLK, 6 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_parent_data_12[] = {
|
||||
static const struct clk_parent_data gcc_parent_data_11[] = {
|
||||
{ .index = DT_XO },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
{ .index = DT_SLEEP_CLK },
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_parent_map_13[] = {
|
||||
static const struct parent_map gcc_parent_map_12[] = {
|
||||
{ P_XO, 0 },
|
||||
{ P_GPLL4_OUT_AUX, 1 },
|
||||
{ P_GPLL0_OUT_MAIN, 3 },
|
||||
{ P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC, 4 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_parent_data_13[] = {
|
||||
static const struct clk_parent_data gcc_parent_data_12[] = {
|
||||
{ .index = DT_XO },
|
||||
{ .hw = &gpll4.clkr.hw },
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
|
|
@ -371,20 +353,6 @@ static const struct freq_tbl ftbl_gcc_apss_axi_clk_src[] = {
|
|||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_apss_axi_clk_src = {
|
||||
.cmd_rcgr = 0x24004,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_parent_map_5,
|
||||
.freq_tbl = ftbl_gcc_apss_axi_clk_src,
|
||||
.clkr.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_apss_axi_clk_src",
|
||||
.parent_data = gcc_parent_data_5,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_5),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_gcc_blsp1_qup1_spi_apps_clk_src[] = {
|
||||
F(960000, P_XO, 1, 1, 25),
|
||||
F(4800000, P_XO, 5, 0, 0),
|
||||
|
|
@ -733,12 +701,12 @@ static struct clk_rcg2 gcc_pcie_aux_clk_src = {
|
|||
.cmd_rcgr = 0x28004,
|
||||
.mnd_width = 16,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_parent_map_6,
|
||||
.parent_map = gcc_parent_map_5,
|
||||
.freq_tbl = ftbl_gcc_pcie_aux_clk_src,
|
||||
.clkr.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_pcie_aux_clk_src",
|
||||
.parent_data = gcc_parent_data_6,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_6),
|
||||
.parent_data = gcc_parent_data_5,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_5),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
|
@ -810,12 +778,12 @@ static struct clk_rcg2 gcc_q6_axim_clk_src = {
|
|||
.cmd_rcgr = 0x25004,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_parent_map_7,
|
||||
.parent_map = gcc_parent_map_6,
|
||||
.freq_tbl = ftbl_gcc_apss_axi_clk_src,
|
||||
.clkr.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_q6_axim_clk_src",
|
||||
.parent_data = gcc_parent_data_7,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_7),
|
||||
.parent_data = gcc_parent_data_6,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_6),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
|
@ -931,12 +899,12 @@ static struct clk_rcg2 gcc_qpic_io_macro_clk_src = {
|
|||
.cmd_rcgr = 0x32004,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_parent_map_8,
|
||||
.parent_map = gcc_parent_map_7,
|
||||
.freq_tbl = ftbl_gcc_qpic_io_macro_clk_src,
|
||||
.clkr.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_qpic_io_macro_clk_src",
|
||||
.parent_data = gcc_parent_data_8,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_8),
|
||||
.parent_data = gcc_parent_data_7,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_7),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
|
@ -957,12 +925,12 @@ static struct clk_rcg2 gcc_sdcc1_apps_clk_src = {
|
|||
.cmd_rcgr = 0x33004,
|
||||
.mnd_width = 8,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_parent_map_9,
|
||||
.parent_map = gcc_parent_map_8,
|
||||
.freq_tbl = ftbl_gcc_sdcc1_apps_clk_src,
|
||||
.clkr.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_sdcc1_apps_clk_src",
|
||||
.parent_data = gcc_parent_data_9,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_9),
|
||||
.parent_data = gcc_parent_data_8,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_8),
|
||||
.ops = &clk_rcg2_floor_ops,
|
||||
},
|
||||
};
|
||||
|
|
@ -976,12 +944,12 @@ static struct clk_rcg2 gcc_sleep_clk_src = {
|
|||
.cmd_rcgr = 0x3400c,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_parent_map_10,
|
||||
.parent_map = gcc_parent_map_9,
|
||||
.freq_tbl = ftbl_gcc_sleep_clk_src,
|
||||
.clkr.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_sleep_clk_src",
|
||||
.parent_data = gcc_parent_data_10,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_10),
|
||||
.parent_data = gcc_parent_data_9,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_9),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
|
@ -998,12 +966,12 @@ static struct clk_rcg2 gcc_system_noc_bfdcd_clk_src = {
|
|||
.cmd_rcgr = 0x2e004,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_parent_map_11,
|
||||
.parent_map = gcc_parent_map_10,
|
||||
.freq_tbl = ftbl_gcc_system_noc_bfdcd_clk_src,
|
||||
.clkr.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_system_noc_bfdcd_clk_src",
|
||||
.parent_data = gcc_parent_data_11,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_11),
|
||||
.parent_data = gcc_parent_data_10,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_10),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
|
@ -1039,12 +1007,12 @@ static struct clk_rcg2 gcc_usb0_aux_clk_src = {
|
|||
.cmd_rcgr = 0x2c018,
|
||||
.mnd_width = 16,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_parent_map_12,
|
||||
.parent_map = gcc_parent_map_11,
|
||||
.freq_tbl = ftbl_gcc_pcie_aux_clk_src,
|
||||
.clkr.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_usb0_aux_clk_src",
|
||||
.parent_data = gcc_parent_data_12,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_12),
|
||||
.parent_data = gcc_parent_data_11,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_11),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
|
@ -1091,12 +1059,12 @@ static struct clk_rcg2 gcc_usb0_mock_utmi_clk_src = {
|
|||
.cmd_rcgr = 0x2c02c,
|
||||
.mnd_width = 8,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_parent_map_13,
|
||||
.parent_map = gcc_parent_map_12,
|
||||
.freq_tbl = ftbl_gcc_usb0_mock_utmi_clk_src,
|
||||
.clkr.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_usb0_mock_utmi_clk_src",
|
||||
.parent_data = gcc_parent_data_13,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_13),
|
||||
.parent_data = gcc_parent_data_12,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_12),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
|
@ -1635,42 +1603,6 @@ static struct clk_branch gcc_mdio_slave_ahb_clk = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_mem_noc_q6_axi_clk = {
|
||||
.halt_reg = 0x19010,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x19010,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_mem_noc_q6_axi_clk",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gcc_q6_axim_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_mem_noc_ts_clk = {
|
||||
.halt_reg = 0x19028,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
.clkr = {
|
||||
.enable_reg = 0x19028,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_mem_noc_ts_clk",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gcc_qdss_tsctr_div8_clk_src.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_nss_ts_clk = {
|
||||
.halt_reg = 0x17018,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
|
|
@ -3339,42 +3271,6 @@ static struct clk_branch gcc_nssnoc_pcnoc_1_clk = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_mem_noc_ahb_clk = {
|
||||
.halt_reg = 0x1900c,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x1900c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_mem_noc_ahb_clk",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gcc_pcnoc_bfdcd_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_mem_noc_apss_axi_clk = {
|
||||
.halt_reg = 0x1901c,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
.clkr = {
|
||||
.enable_reg = 0xb004,
|
||||
.enable_mask = BIT(6),
|
||||
.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_mem_noc_apss_axi_clk",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gcc_apss_axi_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap_div gcc_snoc_qosgen_extref_div_clk_src = {
|
||||
.reg = 0x2e010,
|
||||
.shift = 0,
|
||||
|
|
@ -3390,24 +3286,6 @@ static struct clk_regmap_div gcc_snoc_qosgen_extref_div_clk_src = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_mem_noc_qosgen_extref_clk = {
|
||||
.halt_reg = 0x19024,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x19024,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_mem_noc_qosgen_extref_clk",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gcc_snoc_qosgen_extref_div_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap *gcc_ipq5332_clocks[] = {
|
||||
[GPLL0_MAIN] = &gpll0_main.clkr,
|
||||
[GPLL0] = &gpll0.clkr,
|
||||
|
|
@ -3418,7 +3296,6 @@ static struct clk_regmap *gcc_ipq5332_clocks[] = {
|
|||
[GCC_ADSS_PWM_CLK] = &gcc_adss_pwm_clk.clkr,
|
||||
[GCC_ADSS_PWM_CLK_SRC] = &gcc_adss_pwm_clk_src.clkr,
|
||||
[GCC_AHB_CLK] = &gcc_ahb_clk.clkr,
|
||||
[GCC_APSS_AXI_CLK_SRC] = &gcc_apss_axi_clk_src.clkr,
|
||||
[GCC_BLSP1_AHB_CLK] = &gcc_blsp1_ahb_clk.clkr,
|
||||
[GCC_BLSP1_QUP1_I2C_APPS_CLK] = &gcc_blsp1_qup1_i2c_apps_clk.clkr,
|
||||
[GCC_BLSP1_QUP1_SPI_APPS_CLK] = &gcc_blsp1_qup1_spi_apps_clk.clkr,
|
||||
|
|
@ -3451,8 +3328,6 @@ static struct clk_regmap *gcc_ipq5332_clocks[] = {
|
|||
[GCC_LPASS_SWAY_CLK_SRC] = &gcc_lpass_sway_clk_src.clkr,
|
||||
[GCC_MDIO_AHB_CLK] = &gcc_mdio_ahb_clk.clkr,
|
||||
[GCC_MDIO_SLAVE_AHB_CLK] = &gcc_mdio_slave_ahb_clk.clkr,
|
||||
[GCC_MEM_NOC_Q6_AXI_CLK] = &gcc_mem_noc_q6_axi_clk.clkr,
|
||||
[GCC_MEM_NOC_TS_CLK] = &gcc_mem_noc_ts_clk.clkr,
|
||||
[GCC_NSS_TS_CLK] = &gcc_nss_ts_clk.clkr,
|
||||
[GCC_NSS_TS_CLK_SRC] = &gcc_nss_ts_clk_src.clkr,
|
||||
[GCC_NSSCC_CLK] = &gcc_nsscc_clk.clkr,
|
||||
|
|
@ -3573,10 +3448,7 @@ static struct clk_regmap *gcc_ipq5332_clocks[] = {
|
|||
[GCC_XO_DIV4_CLK] = &gcc_xo_div4_clk.clkr,
|
||||
[GCC_IM_SLEEP_CLK] = &gcc_im_sleep_clk.clkr,
|
||||
[GCC_NSSNOC_PCNOC_1_CLK] = &gcc_nssnoc_pcnoc_1_clk.clkr,
|
||||
[GCC_MEM_NOC_AHB_CLK] = &gcc_mem_noc_ahb_clk.clkr,
|
||||
[GCC_MEM_NOC_APSS_AXI_CLK] = &gcc_mem_noc_apss_axi_clk.clkr,
|
||||
[GCC_SNOC_QOSGEN_EXTREF_DIV_CLK_SRC] = &gcc_snoc_qosgen_extref_div_clk_src.clkr,
|
||||
[GCC_MEM_NOC_QOSGEN_EXTREF_CLK] = &gcc_mem_noc_qosgen_extref_clk.clkr,
|
||||
[GCC_PCIE3X2_PIPE_CLK_SRC] = &gcc_pcie3x2_pipe_clk_src.clkr,
|
||||
[GCC_PCIE3X1_0_PIPE_CLK_SRC] = &gcc_pcie3x1_0_pipe_clk_src.clkr,
|
||||
[GCC_PCIE3X1_1_PIPE_CLK_SRC] = &gcc_pcie3x1_1_pipe_clk_src.clkr,
|
||||
|
|
|
|||
|
|
@ -2004,6 +2004,41 @@ static struct clk_regmap_mux usb0_pipe_clk_src = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_usb0_pipe_clk = {
|
||||
.halt_reg = 0x2c054,
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x2c054,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(const struct clk_init_data){
|
||||
.name = "gcc_usb0_pipe_clk",
|
||||
.parent_hws = (const struct clk_hw *[]) {
|
||||
&usb0_pipe_clk_src.clkr.hw
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_usb0_sleep_clk = {
|
||||
.halt_reg = 0x2c058,
|
||||
.clkr = {
|
||||
.enable_reg = 0x2c058,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(const struct clk_init_data){
|
||||
.name = "gcc_usb0_sleep_clk",
|
||||
.parent_hws = (const struct clk_hw *[]) {
|
||||
&gcc_sleep_clk_src.clkr.hw
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_sdcc_apps_clk_src[] = {
|
||||
F(144000, P_XO, 16, 12, 125),
|
||||
F(400000, P_XO, 12, 1, 5),
|
||||
|
|
@ -4003,6 +4038,8 @@ static struct clk_regmap *gcc_ipq9574_clks[] = {
|
|||
[GCC_USB0_MOCK_UTMI_CLK] = &gcc_usb0_mock_utmi_clk.clkr,
|
||||
[USB0_PIPE_CLK_SRC] = &usb0_pipe_clk_src.clkr,
|
||||
[GCC_USB0_PHY_CFG_AHB_CLK] = &gcc_usb0_phy_cfg_ahb_clk.clkr,
|
||||
[GCC_USB0_PIPE_CLK] = &gcc_usb0_pipe_clk.clkr,
|
||||
[GCC_USB0_SLEEP_CLK] = &gcc_usb0_sleep_clk.clkr,
|
||||
[SDCC1_APPS_CLK_SRC] = &sdcc1_apps_clk_src.clkr,
|
||||
[GCC_SDCC1_APPS_CLK] = &gcc_sdcc1_apps_clk.clkr,
|
||||
[SDCC1_ICE_CORE_CLK_SRC] = &sdcc1_ice_core_clk_src.clkr,
|
||||
|
|
|
|||
|
|
@ -26,15 +26,23 @@
|
|||
#include "clk-branch.h"
|
||||
#include "reset.h"
|
||||
|
||||
static struct clk_fixed_factor cxo = {
|
||||
.mult = 1,
|
||||
.div = 1,
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "cxo",
|
||||
.parent_names = (const char *[]){ "cxo_board" },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_fixed_factor_ops,
|
||||
},
|
||||
enum {
|
||||
DT_CXO,
|
||||
DT_PLL4,
|
||||
};
|
||||
|
||||
enum {
|
||||
P_CXO,
|
||||
P_PLL8,
|
||||
P_PLL14,
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_cxo_map[] = {
|
||||
{ P_CXO, 0 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_cxo[] = {
|
||||
{ .index = DT_CXO, .name = "cxo_board" },
|
||||
};
|
||||
|
||||
static struct clk_pll pll0 = {
|
||||
|
|
@ -47,8 +55,8 @@ static struct clk_pll pll0 = {
|
|||
.status_bit = 16,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "pll0",
|
||||
.parent_names = (const char *[]){ "cxo" },
|
||||
.num_parents = 1,
|
||||
.parent_data = gcc_cxo,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo),
|
||||
.ops = &clk_pll_ops,
|
||||
},
|
||||
};
|
||||
|
|
@ -58,7 +66,9 @@ static struct clk_regmap pll0_vote = {
|
|||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "pll0_vote",
|
||||
.parent_names = (const char *[]){ "pll8" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&pll0.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_pll_vote_ops,
|
||||
},
|
||||
|
|
@ -69,7 +79,9 @@ static struct clk_regmap pll4_vote = {
|
|||
.enable_mask = BIT(4),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "pll4_vote",
|
||||
.parent_names = (const char *[]){ "pll4" },
|
||||
.parent_data = &(const struct clk_parent_data) {
|
||||
.index = DT_PLL4, .name = "pll4",
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_pll_vote_ops,
|
||||
},
|
||||
|
|
@ -85,8 +97,8 @@ static struct clk_pll pll8 = {
|
|||
.status_bit = 16,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "pll8",
|
||||
.parent_names = (const char *[]){ "cxo" },
|
||||
.num_parents = 1,
|
||||
.parent_data = gcc_cxo,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo),
|
||||
.ops = &clk_pll_ops,
|
||||
},
|
||||
};
|
||||
|
|
@ -96,7 +108,9 @@ static struct clk_regmap pll8_vote = {
|
|||
.enable_mask = BIT(8),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "pll8_vote",
|
||||
.parent_names = (const char *[]){ "pll8" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&pll8.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_pll_vote_ops,
|
||||
},
|
||||
|
|
@ -112,8 +126,8 @@ static struct clk_pll pll14 = {
|
|||
.status_bit = 16,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "pll14",
|
||||
.parent_names = (const char *[]){ "cxo" },
|
||||
.num_parents = 1,
|
||||
.parent_data = gcc_cxo,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo),
|
||||
.ops = &clk_pll_ops,
|
||||
},
|
||||
};
|
||||
|
|
@ -123,26 +137,22 @@ static struct clk_regmap pll14_vote = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "pll14_vote",
|
||||
.parent_names = (const char *[]){ "pll14" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&pll14.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_pll_vote_ops,
|
||||
},
|
||||
};
|
||||
|
||||
enum {
|
||||
P_CXO,
|
||||
P_PLL8,
|
||||
P_PLL14,
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_cxo_pll8_map[] = {
|
||||
{ P_CXO, 0 },
|
||||
{ P_PLL8, 3 }
|
||||
};
|
||||
|
||||
static const char * const gcc_cxo_pll8[] = {
|
||||
"cxo",
|
||||
"pll8_vote",
|
||||
static const struct clk_parent_data gcc_cxo_pll8[] = {
|
||||
{ .index = DT_CXO, .name = "cxo_board" },
|
||||
{ .hw = &pll8_vote.hw },
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_cxo_pll14_map[] = {
|
||||
|
|
@ -150,17 +160,9 @@ static const struct parent_map gcc_cxo_pll14_map[] = {
|
|||
{ P_PLL14, 4 }
|
||||
};
|
||||
|
||||
static const char * const gcc_cxo_pll14[] = {
|
||||
"cxo",
|
||||
"pll14_vote",
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_cxo_map[] = {
|
||||
{ P_CXO, 0 },
|
||||
};
|
||||
|
||||
static const char * const gcc_cxo[] = {
|
||||
"cxo",
|
||||
static const struct clk_parent_data gcc_cxo_pll14[] = {
|
||||
{ .index = DT_CXO, .name = "cxo_board" },
|
||||
{ .hw = &pll14_vote.hw },
|
||||
};
|
||||
|
||||
static struct freq_tbl clk_tbl_gsbi_uart[] = {
|
||||
|
|
@ -206,8 +208,8 @@ static struct clk_rcg gsbi1_uart_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi1_uart_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_PARENT_GATE,
|
||||
},
|
||||
|
|
@ -222,8 +224,8 @@ static struct clk_branch gsbi1_uart_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi1_uart_clk",
|
||||
.parent_names = (const char *[]){
|
||||
"gsbi1_uart_src",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gsbi1_uart_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
|
|
@ -257,8 +259,8 @@ static struct clk_rcg gsbi2_uart_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi2_uart_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_PARENT_GATE,
|
||||
},
|
||||
|
|
@ -273,8 +275,8 @@ static struct clk_branch gsbi2_uart_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi2_uart_clk",
|
||||
.parent_names = (const char *[]){
|
||||
"gsbi2_uart_src",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gsbi2_uart_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
|
|
@ -308,8 +310,8 @@ static struct clk_rcg gsbi3_uart_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi3_uart_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_PARENT_GATE,
|
||||
},
|
||||
|
|
@ -324,8 +326,8 @@ static struct clk_branch gsbi3_uart_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi3_uart_clk",
|
||||
.parent_names = (const char *[]){
|
||||
"gsbi3_uart_src",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gsbi3_uart_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
|
|
@ -359,8 +361,8 @@ static struct clk_rcg gsbi4_uart_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi4_uart_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_PARENT_GATE,
|
||||
},
|
||||
|
|
@ -375,8 +377,8 @@ static struct clk_branch gsbi4_uart_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi4_uart_clk",
|
||||
.parent_names = (const char *[]){
|
||||
"gsbi4_uart_src",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gsbi4_uart_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
|
|
@ -410,8 +412,8 @@ static struct clk_rcg gsbi5_uart_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi5_uart_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_PARENT_GATE,
|
||||
},
|
||||
|
|
@ -426,8 +428,8 @@ static struct clk_branch gsbi5_uart_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi5_uart_clk",
|
||||
.parent_names = (const char *[]){
|
||||
"gsbi5_uart_src",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gsbi5_uart_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
|
|
@ -473,8 +475,8 @@ static struct clk_rcg gsbi1_qup_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi1_qup_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_PARENT_GATE,
|
||||
},
|
||||
|
|
@ -489,7 +491,9 @@ static struct clk_branch gsbi1_qup_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi1_qup_clk",
|
||||
.parent_names = (const char *[]){ "gsbi1_qup_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gsbi1_qup_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
|
|
@ -522,8 +526,8 @@ static struct clk_rcg gsbi2_qup_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi2_qup_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_PARENT_GATE,
|
||||
},
|
||||
|
|
@ -538,7 +542,9 @@ static struct clk_branch gsbi2_qup_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi2_qup_clk",
|
||||
.parent_names = (const char *[]){ "gsbi2_qup_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gsbi2_qup_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
|
|
@ -571,8 +577,8 @@ static struct clk_rcg gsbi3_qup_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi3_qup_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_PARENT_GATE,
|
||||
},
|
||||
|
|
@ -587,7 +593,9 @@ static struct clk_branch gsbi3_qup_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi3_qup_clk",
|
||||
.parent_names = (const char *[]){ "gsbi3_qup_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gsbi3_qup_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
|
|
@ -620,8 +628,8 @@ static struct clk_rcg gsbi4_qup_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi4_qup_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_PARENT_GATE,
|
||||
},
|
||||
|
|
@ -636,7 +644,9 @@ static struct clk_branch gsbi4_qup_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi4_qup_clk",
|
||||
.parent_names = (const char *[]){ "gsbi4_qup_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gsbi4_qup_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
|
|
@ -669,8 +679,8 @@ static struct clk_rcg gsbi5_qup_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi5_qup_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_PARENT_GATE,
|
||||
},
|
||||
|
|
@ -685,7 +695,9 @@ static struct clk_branch gsbi5_qup_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi5_qup_clk",
|
||||
.parent_names = (const char *[]){ "gsbi5_qup_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gsbi5_qup_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
|
|
@ -724,8 +736,8 @@ static struct clk_rcg gp0_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gp0_src",
|
||||
.parent_names = gcc_cxo,
|
||||
.num_parents = 1,
|
||||
.parent_data = gcc_cxo,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_PARENT_GATE,
|
||||
},
|
||||
|
|
@ -740,7 +752,9 @@ static struct clk_branch gp0_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gp0_clk",
|
||||
.parent_names = (const char *[]){ "gp0_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gp0_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
|
|
@ -773,8 +787,8 @@ static struct clk_rcg gp1_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gp1_src",
|
||||
.parent_names = gcc_cxo,
|
||||
.num_parents = 1,
|
||||
.parent_data = gcc_cxo,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
|
|
@ -789,7 +803,9 @@ static struct clk_branch gp1_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gp1_clk",
|
||||
.parent_names = (const char *[]){ "gp1_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gp1_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
|
|
@ -822,8 +838,8 @@ static struct clk_rcg gp2_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gp2_src",
|
||||
.parent_names = gcc_cxo,
|
||||
.num_parents = 1,
|
||||
.parent_data = gcc_cxo,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
|
|
@ -838,7 +854,9 @@ static struct clk_branch gp2_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gp2_clk",
|
||||
.parent_names = (const char *[]){ "gp2_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gp2_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
|
|
@ -874,8 +892,8 @@ static struct clk_rcg prng_src = {
|
|||
.clkr = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "prng_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
},
|
||||
},
|
||||
|
|
@ -890,7 +908,9 @@ static struct clk_branch prng_clk = {
|
|||
.enable_mask = BIT(10),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "prng_clk",
|
||||
.parent_names = (const char *[]){ "prng_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&prng_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
},
|
||||
|
|
@ -936,8 +956,8 @@ static struct clk_rcg sdc1_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "sdc1_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
},
|
||||
}
|
||||
|
|
@ -951,7 +971,9 @@ static struct clk_branch sdc1_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "sdc1_clk",
|
||||
.parent_names = (const char *[]){ "sdc1_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&sdc1_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
|
|
@ -984,8 +1006,8 @@ static struct clk_rcg sdc2_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "sdc2_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
},
|
||||
}
|
||||
|
|
@ -999,7 +1021,9 @@ static struct clk_branch sdc2_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "sdc2_clk",
|
||||
.parent_names = (const char *[]){ "sdc2_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&sdc2_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
|
|
@ -1037,8 +1061,8 @@ static struct clk_rcg usb_hs1_xcvr_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "usb_hs1_xcvr_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
|
|
@ -1053,7 +1077,9 @@ static struct clk_branch usb_hs1_xcvr_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "usb_hs1_xcvr_clk",
|
||||
.parent_names = (const char *[]){ "usb_hs1_xcvr_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&usb_hs1_xcvr_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
|
|
@ -1086,8 +1112,8 @@ static struct clk_rcg usb_hsic_xcvr_fs_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "usb_hsic_xcvr_fs_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
|
|
@ -1102,8 +1128,9 @@ static struct clk_branch usb_hsic_xcvr_fs_clk = {
|
|||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "usb_hsic_xcvr_fs_clk",
|
||||
.parent_names =
|
||||
(const char *[]){ "usb_hsic_xcvr_fs_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&usb_hsic_xcvr_fs_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
|
|
@ -1141,8 +1168,8 @@ static struct clk_rcg usb_hs1_system_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "usb_hs1_system_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
|
|
@ -1156,8 +1183,9 @@ static struct clk_branch usb_hs1_system_clk = {
|
|||
.enable_reg = 0x36a4,
|
||||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.parent_names =
|
||||
(const char *[]){ "usb_hs1_system_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&usb_hs1_system_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.name = "usb_hs1_system_clk",
|
||||
.ops = &clk_branch_ops,
|
||||
|
|
@ -1196,8 +1224,8 @@ static struct clk_rcg usb_hsic_system_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "usb_hsic_system_src",
|
||||
.parent_names = gcc_cxo_pll8,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll8,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll8),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
|
|
@ -1211,8 +1239,9 @@ static struct clk_branch usb_hsic_system_clk = {
|
|||
.enable_reg = 0x2b58,
|
||||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.parent_names =
|
||||
(const char *[]){ "usb_hsic_system_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&usb_hsic_system_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.name = "usb_hsic_system_clk",
|
||||
.ops = &clk_branch_ops,
|
||||
|
|
@ -1251,8 +1280,8 @@ static struct clk_rcg usb_hsic_hsic_src = {
|
|||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "usb_hsic_hsic_src",
|
||||
.parent_names = gcc_cxo_pll14,
|
||||
.num_parents = 2,
|
||||
.parent_data = gcc_cxo_pll14,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo_pll14),
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
|
|
@ -1265,7 +1294,9 @@ static struct clk_branch usb_hsic_hsic_clk = {
|
|||
.enable_reg = 0x2b50,
|
||||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.parent_names = (const char *[]){ "usb_hsic_hsic_src" },
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&usb_hsic_hsic_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.name = "usb_hsic_hsic_clk",
|
||||
.ops = &clk_branch_ops,
|
||||
|
|
@ -1281,8 +1312,8 @@ static struct clk_branch usb_hsic_hsio_cal_clk = {
|
|||
.enable_reg = 0x2b48,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.parent_names = (const char *[]){ "cxo" },
|
||||
.num_parents = 1,
|
||||
.parent_data = gcc_cxo,
|
||||
.num_parents = ARRAY_SIZE(gcc_cxo),
|
||||
.name = "usb_hsic_hsio_cal_clk",
|
||||
.ops = &clk_branch_ops,
|
||||
},
|
||||
|
|
@ -1581,10 +1612,6 @@ static struct clk_branch ebi2_aon_clk = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct clk_hw *gcc_mdm9615_hws[] = {
|
||||
&cxo.hw,
|
||||
};
|
||||
|
||||
static struct clk_regmap *gcc_mdm9615_clks[] = {
|
||||
[PLL0] = &pll0.clkr,
|
||||
[PLL0_VOTE] = &pll0_vote,
|
||||
|
|
@ -1694,8 +1721,6 @@ static const struct qcom_cc_desc gcc_mdm9615_desc = {
|
|||
.num_clks = ARRAY_SIZE(gcc_mdm9615_clks),
|
||||
.resets = gcc_mdm9615_resets,
|
||||
.num_resets = ARRAY_SIZE(gcc_mdm9615_resets),
|
||||
.clk_hws = gcc_mdm9615_hws,
|
||||
.num_clk_hws = ARRAY_SIZE(gcc_mdm9615_hws),
|
||||
};
|
||||
|
||||
static const struct of_device_id gcc_mdm9615_match_table[] = {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ static struct clk_alpha_pll gpll0_sleep_clk_src = {
|
|||
.index = DT_XO,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_alpha_pll_ops,
|
||||
.ops = &clk_branch_simple_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -3042,6 +3042,7 @@ static struct gdsc cpp_gdsc = {
|
|||
static struct clk_regmap *gcc_msm8917_clocks[] = {
|
||||
[GPLL0] = &gpll0.clkr,
|
||||
[GPLL0_EARLY] = &gpll0_early.clkr,
|
||||
[GPLL0_SLEEP_CLK_SRC] = &gpll0_sleep_clk_src.clkr,
|
||||
[GPLL3] = &gpll3.clkr,
|
||||
[GPLL3_EARLY] = &gpll3_early.clkr,
|
||||
[GPLL4] = &gpll4.clkr,
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@
|
|||
#include "reset.h"
|
||||
#include "gdsc.h"
|
||||
|
||||
#define GCC_MMSS_MISC 0x0902C
|
||||
#define GCC_GPU_MISC 0x71028
|
||||
|
||||
static struct pll_vco fabia_vco[] = {
|
||||
{ 250000000, 2000000000, 0 },
|
||||
{ 125000000, 1000000000, 1 },
|
||||
|
|
@ -1367,6 +1370,22 @@ static struct clk_branch gcc_boot_rom_ahb_clk = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_mmss_gpll0_div_clk = {
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x5200c,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gcc_mmss_gpll0_div_clk",
|
||||
.parent_hws = (const struct clk_hw *[]) {
|
||||
&gpll0_out_main.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_mmss_gpll0_clk = {
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
|
|
@ -1395,6 +1414,38 @@ static struct clk_branch gcc_mss_gpll0_div_clk_src = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_gpu_gpll0_div_clk = {
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x5200c,
|
||||
.enable_mask = BIT(3),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gcc_gpu_gpll0_div_clk",
|
||||
.parent_hws = (const struct clk_hw *[]) {
|
||||
&gpll0_out_main.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_gpu_gpll0_clk = {
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x5200c,
|
||||
.enable_mask = BIT(4),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gcc_gpu_gpll0_clk",
|
||||
.parent_hws = (const struct clk_hw *[]) {
|
||||
&gpll0_out_main.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_blsp1_ahb_clk = {
|
||||
.halt_reg = 0x17004,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
|
|
@ -2061,7 +2112,7 @@ static struct clk_branch gcc_gp3_clk = {
|
|||
|
||||
static struct clk_branch gcc_bimc_gfx_clk = {
|
||||
.halt_reg = 0x46040,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.halt_check = BRANCH_HALT_SKIP,
|
||||
.clkr = {
|
||||
.enable_reg = 0x46040,
|
||||
.enable_mask = BIT(0),
|
||||
|
|
@ -2074,7 +2125,7 @@ static struct clk_branch gcc_bimc_gfx_clk = {
|
|||
|
||||
static struct clk_branch gcc_gpu_bimc_gfx_clk = {
|
||||
.halt_reg = 0x71010,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.halt_check = BRANCH_HALT_SKIP,
|
||||
.clkr = {
|
||||
.enable_reg = 0x71010,
|
||||
.enable_mask = BIT(0),
|
||||
|
|
@ -2100,7 +2151,7 @@ static struct clk_branch gcc_gpu_bimc_gfx_src_clk = {
|
|||
|
||||
static struct clk_branch gcc_gpu_cfg_ahb_clk = {
|
||||
.halt_reg = 0x71004,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.halt_check = BRANCH_HALT_SKIP,
|
||||
.clkr = {
|
||||
.enable_reg = 0x71004,
|
||||
.enable_mask = BIT(0),
|
||||
|
|
@ -3080,6 +3131,9 @@ static struct clk_regmap *gcc_msm8998_clocks[] = {
|
|||
[AGGRE2_SNOC_NORTH_AXI] = &aggre2_snoc_north_axi_clk.clkr,
|
||||
[SSC_XO] = &ssc_xo_clk.clkr,
|
||||
[SSC_CNOC_AHBS_CLK] = &ssc_cnoc_ahbs_clk.clkr,
|
||||
[GCC_MMSS_GPLL0_DIV_CLK] = &gcc_mmss_gpll0_div_clk.clkr,
|
||||
[GCC_GPU_GPLL0_DIV_CLK] = &gcc_gpu_gpll0_div_clk.clkr,
|
||||
[GCC_GPU_GPLL0_CLK] = &gcc_gpu_gpll0_clk.clkr,
|
||||
};
|
||||
|
||||
static struct gdsc *gcc_msm8998_gdscs[] = {
|
||||
|
|
@ -3235,6 +3289,10 @@ static int gcc_msm8998_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Disable the GPLL0 active input to MMSS and GPU via MISC registers */
|
||||
regmap_write(regmap, GCC_MMSS_MISC, 0x10003);
|
||||
regmap_write(regmap, GCC_GPU_MISC, 0x10003);
|
||||
|
||||
return qcom_cc_really_probe(pdev, &gcc_msm8998_desc, regmap);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
#include "clk-regmap-divider.h"
|
||||
#include "clk-regmap-mux.h"
|
||||
#include "clk-regmap-phy-mux.h"
|
||||
#include "gdsc.h"
|
||||
#include "reset.h"
|
||||
|
||||
enum {
|
||||
|
|
@ -370,16 +371,6 @@ static const struct clk_parent_data gcc_parent_data_6[] = {
|
|||
{ .index = DT_TCXO_IDX },
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_parent_map_7[] = {
|
||||
{ P_PCIE_0_PIPE_CLK, 0 },
|
||||
{ P_BI_TCXO, 2 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_parent_data_7[] = {
|
||||
{ .index = DT_PCIE_0_PIPE_CLK_IDX },
|
||||
{ .index = DT_TCXO_IDX },
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_parent_map_8[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
{ P_GCC_GPLL0_OUT_MAIN, 1 },
|
||||
|
|
@ -439,16 +430,15 @@ static struct clk_regmap_mux gcc_pcie_0_phy_aux_clk_src = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap_mux gcc_pcie_0_pipe_clk_src = {
|
||||
static struct clk_regmap_phy_mux gcc_pcie_0_pipe_clk_src = {
|
||||
.reg = 0x9d064,
|
||||
.shift = 0,
|
||||
.width = 2,
|
||||
.parent_map = gcc_parent_map_7,
|
||||
.clkr = {
|
||||
.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_pcie_0_pipe_clk_src",
|
||||
.parent_data = gcc_parent_data_7,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_7),
|
||||
.parent_data = &(const struct clk_parent_data){
|
||||
.index = DT_PCIE_0_PIPE_CLK_IDX,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_regmap_phy_mux_ops,
|
||||
},
|
||||
},
|
||||
|
|
@ -485,7 +475,7 @@ static struct clk_rcg2 gcc_aggre_noc_ecpri_dma_clk_src = {
|
|||
.name = "gcc_aggre_noc_ecpri_dma_clk_src",
|
||||
.parent_data = gcc_parent_data_4,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_4),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -505,7 +495,7 @@ static struct clk_rcg2 gcc_aggre_noc_ecpri_gsi_clk_src = {
|
|||
.name = "gcc_aggre_noc_ecpri_gsi_clk_src",
|
||||
.parent_data = gcc_parent_data_5,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_5),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -524,7 +514,7 @@ static struct clk_rcg2 gcc_gp1_clk_src = {
|
|||
.name = "gcc_gp1_clk_src",
|
||||
.parent_data = gcc_parent_data_1,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_1),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -538,7 +528,7 @@ static struct clk_rcg2 gcc_gp2_clk_src = {
|
|||
.name = "gcc_gp2_clk_src",
|
||||
.parent_data = gcc_parent_data_1,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_1),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -552,7 +542,7 @@ static struct clk_rcg2 gcc_gp3_clk_src = {
|
|||
.name = "gcc_gp3_clk_src",
|
||||
.parent_data = gcc_parent_data_1,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_1),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -571,7 +561,7 @@ static struct clk_rcg2 gcc_pcie_0_aux_clk_src = {
|
|||
.name = "gcc_pcie_0_aux_clk_src",
|
||||
.parent_data = gcc_parent_data_3,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_3),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -591,7 +581,7 @@ static struct clk_rcg2 gcc_pcie_0_phy_rchng_clk_src = {
|
|||
.name = "gcc_pcie_0_phy_rchng_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -610,7 +600,7 @@ static struct clk_rcg2 gcc_pdm2_clk_src = {
|
|||
.name = "gcc_pdm2_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -632,7 +622,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s0_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap0_s0_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap0_s0_clk_src = {
|
||||
|
|
@ -648,7 +638,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s1_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap0_s1_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap0_s1_clk_src = {
|
||||
|
|
@ -664,7 +654,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s2_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap0_s2_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap0_s2_clk_src = {
|
||||
|
|
@ -680,7 +670,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s3_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap0_s3_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap0_s3_clk_src = {
|
||||
|
|
@ -696,7 +686,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s4_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap0_s4_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap0_s4_clk_src = {
|
||||
|
|
@ -717,7 +707,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s5_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap0_s5_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap0_s5_clk_src = {
|
||||
|
|
@ -733,7 +723,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s6_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap0_s6_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap0_s6_clk_src = {
|
||||
|
|
@ -749,7 +739,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s7_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap0_s7_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap0_s7_clk_src = {
|
||||
|
|
@ -765,7 +755,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s0_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap1_s0_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap1_s0_clk_src = {
|
||||
|
|
@ -781,7 +771,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s1_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap1_s1_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap1_s1_clk_src = {
|
||||
|
|
@ -797,7 +787,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s2_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap1_s2_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap1_s2_clk_src = {
|
||||
|
|
@ -813,7 +803,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s3_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap1_s3_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap1_s3_clk_src = {
|
||||
|
|
@ -829,7 +819,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s4_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap1_s4_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap1_s4_clk_src = {
|
||||
|
|
@ -845,7 +835,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s5_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap1_s5_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap1_s5_clk_src = {
|
||||
|
|
@ -861,7 +851,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s6_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap1_s6_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap1_s6_clk_src = {
|
||||
|
|
@ -877,7 +867,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s7_clk_src_init = {
|
|||
.name = "gcc_qupv3_wrap1_s7_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
};
|
||||
|
||||
static struct clk_rcg2 gcc_qupv3_wrap1_s7_clk_src = {
|
||||
|
|
@ -913,7 +903,7 @@ static struct clk_rcg2 gcc_sdcc5_apps_clk_src = {
|
|||
.name = "gcc_sdcc5_apps_clk_src",
|
||||
.parent_data = gcc_parent_data_8,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_8),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_floor_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -932,7 +922,7 @@ static struct clk_rcg2 gcc_sdcc5_ice_core_clk_src = {
|
|||
.name = "gcc_sdcc5_ice_core_clk_src",
|
||||
.parent_data = gcc_parent_data_2,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_2),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_floor_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -946,7 +936,7 @@ static struct clk_rcg2 gcc_sm_bus_xo_clk_src = {
|
|||
.name = "gcc_sm_bus_xo_clk_src",
|
||||
.parent_data = gcc_parent_data_2,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_2),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -965,7 +955,7 @@ static struct clk_rcg2 gcc_tsc_clk_src = {
|
|||
.name = "gcc_tsc_clk_src",
|
||||
.parent_data = gcc_parent_data_9,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_9),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -985,7 +975,7 @@ static struct clk_rcg2 gcc_usb30_prim_master_clk_src = {
|
|||
.name = "gcc_usb30_prim_master_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -999,7 +989,7 @@ static struct clk_rcg2 gcc_usb30_prim_mock_utmi_clk_src = {
|
|||
.name = "gcc_usb30_prim_mock_utmi_clk_src",
|
||||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -1013,7 +1003,7 @@ static struct clk_rcg2 gcc_usb3_prim_phy_aux_clk_src = {
|
|||
.name = "gcc_usb3_prim_phy_aux_clk_src",
|
||||
.parent_data = gcc_parent_data_3,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_3),
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -1142,6 +1132,26 @@ static struct clk_branch gcc_ddrss_ecpri_dma_clk = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_ddrss_ecpri_gsi_clk = {
|
||||
.halt_reg = 0x54298,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
.hwcg_reg = 0x54298,
|
||||
.hwcg_bit = 1,
|
||||
.clkr = {
|
||||
.enable_reg = 0x54298,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_ddrss_ecpri_gsi_clk",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&gcc_aggre_noc_ecpri_gsi_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_aon_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_ecpri_ahb_clk = {
|
||||
.halt_reg = 0x3a008,
|
||||
.halt_check = BRANCH_HALT_VOTED,
|
||||
|
|
@ -1458,14 +1468,13 @@ static struct clk_branch gcc_pcie_0_cfg_ahb_clk = {
|
|||
|
||||
static struct clk_branch gcc_pcie_0_clkref_en = {
|
||||
.halt_reg = 0x9c004,
|
||||
.halt_bit = 31,
|
||||
.halt_check = BRANCH_HALT_ENABLE,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x9c004,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_pcie_0_clkref_en",
|
||||
.ops = &clk_branch_ops,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -2285,14 +2294,13 @@ static struct clk_branch gcc_tsc_etu_clk = {
|
|||
|
||||
static struct clk_branch gcc_usb2_clkref_en = {
|
||||
.halt_reg = 0x9c008,
|
||||
.halt_bit = 31,
|
||||
.halt_check = BRANCH_HALT_ENABLE,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x9c008,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(const struct clk_init_data) {
|
||||
.name = "gcc_usb2_clkref_en",
|
||||
.ops = &clk_branch_ops,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -2402,6 +2410,39 @@ static struct clk_branch gcc_usb3_prim_phy_pipe_clk = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct gdsc pcie_0_gdsc = {
|
||||
.gdscr = 0x9d004,
|
||||
.en_rest_wait_val = 0x2,
|
||||
.en_few_wait_val = 0x2,
|
||||
.clk_dis_wait_val = 0xf,
|
||||
.pd = {
|
||||
.name = "gcc_pcie_0_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
};
|
||||
|
||||
static struct gdsc pcie_0_phy_gdsc = {
|
||||
.gdscr = 0x7c004,
|
||||
.en_rest_wait_val = 0x2,
|
||||
.en_few_wait_val = 0x2,
|
||||
.clk_dis_wait_val = 0x2,
|
||||
.pd = {
|
||||
.name = "gcc_pcie_0_phy_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
};
|
||||
|
||||
static struct gdsc usb30_prim_gdsc = {
|
||||
.gdscr = 0x49004,
|
||||
.en_rest_wait_val = 0x2,
|
||||
.en_few_wait_val = 0x2,
|
||||
.clk_dis_wait_val = 0xf,
|
||||
.pd = {
|
||||
.name = "gcc_usb30_prim_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
};
|
||||
|
||||
static struct clk_regmap *gcc_qdu1000_clocks[] = {
|
||||
[GCC_AGGRE_NOC_ECPRI_DMA_CLK] = &gcc_aggre_noc_ecpri_dma_clk.clkr,
|
||||
[GCC_AGGRE_NOC_ECPRI_DMA_CLK_SRC] = &gcc_aggre_noc_ecpri_dma_clk_src.clkr,
|
||||
|
|
@ -2534,6 +2575,14 @@ static struct clk_regmap *gcc_qdu1000_clocks[] = {
|
|||
[GCC_AGGRE_NOC_ECPRI_GSI_CLK] = &gcc_aggre_noc_ecpri_gsi_clk.clkr,
|
||||
[GCC_PCIE_0_PHY_AUX_CLK_SRC] = &gcc_pcie_0_phy_aux_clk_src.clkr,
|
||||
[GCC_PCIE_0_PIPE_CLK_SRC] = &gcc_pcie_0_pipe_clk_src.clkr,
|
||||
[GCC_GPLL1_OUT_EVEN] = &gcc_gpll1_out_even.clkr,
|
||||
[GCC_DDRSS_ECPRI_GSI_CLK] = &gcc_ddrss_ecpri_gsi_clk.clkr,
|
||||
};
|
||||
|
||||
static struct gdsc *gcc_qdu1000_gdscs[] = {
|
||||
[PCIE_0_GDSC] = &pcie_0_gdsc,
|
||||
[PCIE_0_PHY_GDSC] = &pcie_0_phy_gdsc,
|
||||
[USB30_PRIM_GDSC] = &usb30_prim_gdsc,
|
||||
};
|
||||
|
||||
static const struct qcom_reset_map gcc_qdu1000_resets[] = {
|
||||
|
|
@ -2597,6 +2646,8 @@ static const struct qcom_cc_desc gcc_qdu1000_desc = {
|
|||
.num_clks = ARRAY_SIZE(gcc_qdu1000_clocks),
|
||||
.resets = gcc_qdu1000_resets,
|
||||
.num_resets = ARRAY_SIZE(gcc_qdu1000_resets),
|
||||
.gdscs = gcc_qdu1000_gdscs,
|
||||
.num_gdscs = ARRAY_SIZE(gcc_qdu1000_gdscs),
|
||||
};
|
||||
|
||||
static const struct of_device_id gcc_qdu1000_match_table[] = {
|
||||
|
|
|
|||
|
|
@ -651,6 +651,7 @@ static struct clk_rcg2 gcc_sdcc2_apps_clk_src = {
|
|||
.name = "gcc_sdcc2_apps_clk_src",
|
||||
.parent_data = gcc_parent_data_5,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_5),
|
||||
.flags = CLK_OPS_PARENT_ENABLE,
|
||||
.ops = &clk_rcg2_floor_ops,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6761,7 +6761,7 @@ static struct gdsc pcie_0_tunnel_gdsc = {
|
|||
.name = "pcie_0_tunnel_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
.flags = VOTABLE | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc pcie_1_tunnel_gdsc = {
|
||||
|
|
@ -6772,7 +6772,7 @@ static struct gdsc pcie_1_tunnel_gdsc = {
|
|||
.name = "pcie_1_tunnel_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
.flags = VOTABLE | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -6786,8 +6786,8 @@ static struct gdsc pcie_2a_gdsc = {
|
|||
.pd = {
|
||||
.name = "pcie_2a_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE | ALWAYS_ON,
|
||||
.pwrsts = PWRSTS_RET_ON,
|
||||
.flags = VOTABLE | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc pcie_2b_gdsc = {
|
||||
|
|
@ -6797,8 +6797,8 @@ static struct gdsc pcie_2b_gdsc = {
|
|||
.pd = {
|
||||
.name = "pcie_2b_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE | ALWAYS_ON,
|
||||
.pwrsts = PWRSTS_RET_ON,
|
||||
.flags = VOTABLE | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc pcie_3a_gdsc = {
|
||||
|
|
@ -6808,8 +6808,8 @@ static struct gdsc pcie_3a_gdsc = {
|
|||
.pd = {
|
||||
.name = "pcie_3a_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE | ALWAYS_ON,
|
||||
.pwrsts = PWRSTS_RET_ON,
|
||||
.flags = VOTABLE | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc pcie_3b_gdsc = {
|
||||
|
|
@ -6819,8 +6819,8 @@ static struct gdsc pcie_3b_gdsc = {
|
|||
.pd = {
|
||||
.name = "pcie_3b_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE | ALWAYS_ON,
|
||||
.pwrsts = PWRSTS_RET_ON,
|
||||
.flags = VOTABLE | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc pcie_4_gdsc = {
|
||||
|
|
@ -6830,8 +6830,8 @@ static struct gdsc pcie_4_gdsc = {
|
|||
.pd = {
|
||||
.name = "pcie_4_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE | ALWAYS_ON,
|
||||
.pwrsts = PWRSTS_RET_ON,
|
||||
.flags = VOTABLE | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc ufs_card_gdsc = {
|
||||
|
|
@ -6840,6 +6840,7 @@ static struct gdsc ufs_card_gdsc = {
|
|||
.name = "ufs_card_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc ufs_phy_gdsc = {
|
||||
|
|
@ -6848,6 +6849,7 @@ static struct gdsc ufs_phy_gdsc = {
|
|||
.name = "ufs_phy_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc usb30_mp_gdsc = {
|
||||
|
|
@ -6856,6 +6858,7 @@ static struct gdsc usb30_mp_gdsc = {
|
|||
.name = "usb30_mp_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_RET_ON,
|
||||
.flags = RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc usb30_prim_gdsc = {
|
||||
|
|
@ -6864,6 +6867,7 @@ static struct gdsc usb30_prim_gdsc = {
|
|||
.name = "usb30_prim_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_RET_ON,
|
||||
.flags = RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc usb30_sec_gdsc = {
|
||||
|
|
@ -6872,6 +6876,7 @@ static struct gdsc usb30_sec_gdsc = {
|
|||
.name = "usb30_sec_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_RET_ON,
|
||||
.flags = RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc emac_0_gdsc = {
|
||||
|
|
@ -6880,6 +6885,7 @@ static struct gdsc emac_0_gdsc = {
|
|||
.name = "emac_0_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc emac_1_gdsc = {
|
||||
|
|
@ -6888,6 +6894,97 @@ static struct gdsc emac_1_gdsc = {
|
|||
.name = "emac_1_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc usb4_1_gdsc = {
|
||||
.gdscr = 0xb8004,
|
||||
.pd = {
|
||||
.name = "usb4_1_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc usb4_gdsc = {
|
||||
.gdscr = 0x2a004,
|
||||
.pd = {
|
||||
.name = "usb4_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc = {
|
||||
.gdscr = 0x7d050,
|
||||
.pd = {
|
||||
.name = "hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc = {
|
||||
.gdscr = 0x7d058,
|
||||
.pd = {
|
||||
.name = "hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_mmnoc_mmu_tbu_sf0_gdsc = {
|
||||
.gdscr = 0x7d054,
|
||||
.pd = {
|
||||
.name = "hlos1_vote_mmnoc_mmu_tbu_sf0_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_mmnoc_mmu_tbu_sf1_gdsc = {
|
||||
.gdscr = 0x7d06c,
|
||||
.pd = {
|
||||
.name = "hlos1_vote_mmnoc_mmu_tbu_sf1_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_turing_mmu_tbu0_gdsc = {
|
||||
.gdscr = 0x7d05c,
|
||||
.pd = {
|
||||
.name = "hlos1_vote_turing_mmu_tbu0_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_turing_mmu_tbu1_gdsc = {
|
||||
.gdscr = 0x7d060,
|
||||
.pd = {
|
||||
.name = "hlos1_vote_turing_mmu_tbu1_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_turing_mmu_tbu2_gdsc = {
|
||||
.gdscr = 0x7d0a0,
|
||||
.pd = {
|
||||
.name = "hlos1_vote_turing_mmu_tbu2_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct gdsc hlos1_vote_turing_mmu_tbu3_gdsc = {
|
||||
.gdscr = 0x7d0a4,
|
||||
.pd = {
|
||||
.name = "hlos1_vote_turing_mmu_tbu3_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = VOTABLE,
|
||||
};
|
||||
|
||||
static struct clk_regmap *gcc_sc8280xp_clocks[] = {
|
||||
|
|
@ -7370,6 +7467,16 @@ static struct gdsc *gcc_sc8280xp_gdscs[] = {
|
|||
[USB30_SEC_GDSC] = &usb30_sec_gdsc,
|
||||
[EMAC_0_GDSC] = &emac_0_gdsc,
|
||||
[EMAC_1_GDSC] = &emac_1_gdsc,
|
||||
[USB4_1_GDSC] = &usb4_1_gdsc,
|
||||
[USB4_GDSC] = &usb4_gdsc,
|
||||
[HLOS1_VOTE_MMNOC_MMU_TBU_HF0_GDSC] = &hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc,
|
||||
[HLOS1_VOTE_MMNOC_MMU_TBU_HF1_GDSC] = &hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc,
|
||||
[HLOS1_VOTE_MMNOC_MMU_TBU_SF0_GDSC] = &hlos1_vote_mmnoc_mmu_tbu_sf0_gdsc,
|
||||
[HLOS1_VOTE_MMNOC_MMU_TBU_SF1_GDSC] = &hlos1_vote_mmnoc_mmu_tbu_sf1_gdsc,
|
||||
[HLOS1_VOTE_TURING_MMU_TBU0_GDSC] = &hlos1_vote_turing_mmu_tbu0_gdsc,
|
||||
[HLOS1_VOTE_TURING_MMU_TBU1_GDSC] = &hlos1_vote_turing_mmu_tbu1_gdsc,
|
||||
[HLOS1_VOTE_TURING_MMU_TBU2_GDSC] = &hlos1_vote_turing_mmu_tbu2_gdsc,
|
||||
[HLOS1_VOTE_TURING_MMU_TBU3_GDSC] = &hlos1_vote_turing_mmu_tbu3_gdsc,
|
||||
};
|
||||
|
||||
static const struct clk_rcg_dfs_data gcc_dfs_clocks[] = {
|
||||
|
|
@ -7432,8 +7539,8 @@ static int gcc_sc8280xp_probe(struct platform_device *pdev)
|
|||
|
||||
regmap = qcom_cc_map(pdev, &gcc_sc8280xp_desc);
|
||||
if (IS_ERR(regmap)) {
|
||||
pm_runtime_put(&pdev->dev);
|
||||
return PTR_ERR(regmap);
|
||||
ret = PTR_ERR(regmap);
|
||||
goto err_put_rpm;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -7454,11 +7561,19 @@ static int gcc_sc8280xp_probe(struct platform_device *pdev)
|
|||
|
||||
ret = qcom_cc_register_rcg_dfs(regmap, gcc_dfs_clocks, ARRAY_SIZE(gcc_dfs_clocks));
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_put_rpm;
|
||||
|
||||
ret = qcom_cc_really_probe(pdev, &gcc_sc8280xp_desc, regmap);
|
||||
if (ret)
|
||||
goto err_put_rpm;
|
||||
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
||||
err_put_rpm:
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -641,6 +641,7 @@ static struct clk_rcg2 gcc_sdcc2_apps_clk_src = {
|
|||
.name = "gcc_sdcc2_apps_clk_src",
|
||||
.parent_data = gcc_parent_data_8,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_8),
|
||||
.flags = CLK_OPS_PARENT_ENABLE,
|
||||
.ops = &clk_rcg2_floor_ops,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -739,6 +739,7 @@ static struct clk_rcg2 gcc_sdcc2_apps_clk_src = {
|
|||
.parent_data = gcc_parent_data_6,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_6),
|
||||
.ops = &clk_rcg2_floor_ops,
|
||||
.flags = CLK_OPS_PARENT_ENABLE,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -721,6 +721,7 @@ static struct clk_rcg2 gcc_sdcc2_apps_clk_src = {
|
|||
.name = "gcc_sdcc2_apps_clk_src",
|
||||
.parent_data = gcc_parent_data_4,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_4),
|
||||
.flags = CLK_OPS_PARENT_ENABLE,
|
||||
.ops = &clk_rcg2_floor_ops,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -935,7 +935,7 @@ static struct clk_rcg2 gcc_sdcc2_apps_clk_src = {
|
|||
.parent_data = gcc_parent_data_7,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_7),
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_floor_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -958,7 +958,7 @@ static struct clk_rcg2 gcc_sdcc4_apps_clk_src = {
|
|||
.parent_data = gcc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_rcg2_ops,
|
||||
.ops = &clk_rcg2_floor_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ static const struct parent_map gpu_xo_gpll0_map[] = {
|
|||
|
||||
static const struct clk_parent_data gpu_xo_gpll0[] = {
|
||||
{ .hw = &gpucc_cxo_clk.clkr.hw },
|
||||
{ .fw_name = "gpll0" },
|
||||
{ .fw_name = "gpll0", .name = "gcc_gpu_gpll0_clk" },
|
||||
};
|
||||
|
||||
static const struct parent_map gpu_xo_gpupll0_map[] = {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,12 @@
|
|||
#define CX_GMU_CBCR_WAKE_MASK 0xF
|
||||
#define CX_GMU_CBCR_WAKE_SHIFT 8
|
||||
|
||||
enum {
|
||||
DT_BI_TCXO,
|
||||
DT_GPLL0_OUT_MAIN,
|
||||
DT_GPLL0_OUT_MAIN_DIV,
|
||||
};
|
||||
|
||||
enum {
|
||||
P_BI_TCXO,
|
||||
P_GPLL0_OUT_MAIN,
|
||||
|
|
@ -61,6 +67,7 @@ static struct clk_alpha_pll gpu_cc_pll0 = {
|
|||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_pll0",
|
||||
.parent_data = &(const struct clk_parent_data){
|
||||
.index = DT_BI_TCXO,
|
||||
.fw_name = "bi_tcxo",
|
||||
},
|
||||
.num_parents = 1,
|
||||
|
|
@ -104,6 +111,7 @@ static struct clk_alpha_pll gpu_cc_pll1 = {
|
|||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gpu_cc_pll1",
|
||||
.parent_data = &(const struct clk_parent_data){
|
||||
.index = DT_BI_TCXO,
|
||||
.fw_name = "bi_tcxo",
|
||||
},
|
||||
.num_parents = 1,
|
||||
|
|
@ -121,11 +129,11 @@ static const struct parent_map gpu_cc_parent_map_0[] = {
|
|||
};
|
||||
|
||||
static const struct clk_parent_data gpu_cc_parent_data_0[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
{ .index = DT_BI_TCXO, .fw_name = "bi_tcxo" },
|
||||
{ .hw = &gpu_cc_pll0.clkr.hw },
|
||||
{ .hw = &gpu_cc_pll1.clkr.hw },
|
||||
{ .fw_name = "gcc_gpu_gpll0_clk" },
|
||||
{ .fw_name = "gcc_gpu_gpll0_div_clk" },
|
||||
{ .index = DT_GPLL0_OUT_MAIN, .fw_name = "gcc_gpu_gpll0_clk_src" },
|
||||
{ .index = DT_GPLL0_OUT_MAIN_DIV, .fw_name = "gcc_gpu_gpll0_div_clk_src" },
|
||||
};
|
||||
|
||||
static const struct parent_map gpu_cc_parent_map_1[] = {
|
||||
|
|
@ -138,12 +146,12 @@ static const struct parent_map gpu_cc_parent_map_1[] = {
|
|||
};
|
||||
|
||||
static const struct clk_parent_data gpu_cc_parent_data_1[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
{ .index = DT_BI_TCXO, .fw_name = "bi_tcxo" },
|
||||
{ .hw = &crc_div.hw },
|
||||
{ .hw = &gpu_cc_pll0.clkr.hw },
|
||||
{ .hw = &gpu_cc_pll1.clkr.hw },
|
||||
{ .hw = &gpu_cc_pll1.clkr.hw },
|
||||
{ .fw_name = "gcc_gpu_gpll0_clk" },
|
||||
{ .index = DT_GPLL0_OUT_MAIN, .fw_name = "gcc_gpu_gpll0_clk_src" },
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = {
|
||||
|
|
|
|||
|
|
@ -1,572 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) BayLibre, SAS.
|
||||
* Author : Neil Armstrong <narmstrong@baylibre.com>
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include <dt-bindings/clock/qcom,lcc-mdm9615.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "clk-regmap.h"
|
||||
#include "clk-pll.h"
|
||||
#include "clk-rcg.h"
|
||||
#include "clk-branch.h"
|
||||
#include "clk-regmap-divider.h"
|
||||
#include "clk-regmap-mux.h"
|
||||
|
||||
static struct clk_pll pll4 = {
|
||||
.l_reg = 0x4,
|
||||
.m_reg = 0x8,
|
||||
.n_reg = 0xc,
|
||||
.config_reg = 0x14,
|
||||
.mode_reg = 0x0,
|
||||
.status_reg = 0x18,
|
||||
.status_bit = 16,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "pll4",
|
||||
.parent_names = (const char *[]){ "cxo" },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_pll_ops,
|
||||
},
|
||||
};
|
||||
|
||||
enum {
|
||||
P_CXO,
|
||||
P_PLL4,
|
||||
};
|
||||
|
||||
static const struct parent_map lcc_cxo_pll4_map[] = {
|
||||
{ P_CXO, 0 },
|
||||
{ P_PLL4, 2 }
|
||||
};
|
||||
|
||||
static const char * const lcc_cxo_pll4[] = {
|
||||
"cxo",
|
||||
"pll4_vote",
|
||||
};
|
||||
|
||||
static struct freq_tbl clk_tbl_aif_osr_492[] = {
|
||||
{ 512000, P_PLL4, 4, 1, 240 },
|
||||
{ 768000, P_PLL4, 4, 1, 160 },
|
||||
{ 1024000, P_PLL4, 4, 1, 120 },
|
||||
{ 1536000, P_PLL4, 4, 1, 80 },
|
||||
{ 2048000, P_PLL4, 4, 1, 60 },
|
||||
{ 3072000, P_PLL4, 4, 1, 40 },
|
||||
{ 4096000, P_PLL4, 4, 1, 30 },
|
||||
{ 6144000, P_PLL4, 4, 1, 20 },
|
||||
{ 8192000, P_PLL4, 4, 1, 15 },
|
||||
{ 12288000, P_PLL4, 4, 1, 10 },
|
||||
{ 24576000, P_PLL4, 4, 1, 5 },
|
||||
{ 27000000, P_CXO, 1, 0, 0 },
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct freq_tbl clk_tbl_aif_osr_393[] = {
|
||||
{ 512000, P_PLL4, 4, 1, 192 },
|
||||
{ 768000, P_PLL4, 4, 1, 128 },
|
||||
{ 1024000, P_PLL4, 4, 1, 96 },
|
||||
{ 1536000, P_PLL4, 4, 1, 64 },
|
||||
{ 2048000, P_PLL4, 4, 1, 48 },
|
||||
{ 3072000, P_PLL4, 4, 1, 32 },
|
||||
{ 4096000, P_PLL4, 4, 1, 24 },
|
||||
{ 6144000, P_PLL4, 4, 1, 16 },
|
||||
{ 8192000, P_PLL4, 4, 1, 12 },
|
||||
{ 12288000, P_PLL4, 4, 1, 8 },
|
||||
{ 24576000, P_PLL4, 4, 1, 4 },
|
||||
{ 27000000, P_CXO, 1, 0, 0 },
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg mi2s_osr_src = {
|
||||
.ns_reg = 0x48,
|
||||
.md_reg = 0x4c,
|
||||
.mn = {
|
||||
.mnctr_en_bit = 8,
|
||||
.mnctr_reset_bit = 7,
|
||||
.mnctr_mode_shift = 5,
|
||||
.n_val_shift = 24,
|
||||
.m_val_shift = 8,
|
||||
.width = 8,
|
||||
},
|
||||
.p = {
|
||||
.pre_div_shift = 3,
|
||||
.pre_div_width = 2,
|
||||
},
|
||||
.s = {
|
||||
.src_sel_shift = 0,
|
||||
.parent_map = lcc_cxo_pll4_map,
|
||||
},
|
||||
.freq_tbl = clk_tbl_aif_osr_393,
|
||||
.clkr = {
|
||||
.enable_reg = 0x48,
|
||||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "mi2s_osr_src",
|
||||
.parent_names = lcc_cxo_pll4,
|
||||
.num_parents = 2,
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static const char * const lcc_mi2s_parents[] = {
|
||||
"mi2s_osr_src",
|
||||
};
|
||||
|
||||
static struct clk_branch mi2s_osr_clk = {
|
||||
.halt_reg = 0x50,
|
||||
.halt_bit = 1,
|
||||
.halt_check = BRANCH_HALT_ENABLE,
|
||||
.clkr = {
|
||||
.enable_reg = 0x48,
|
||||
.enable_mask = BIT(17),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "mi2s_osr_clk",
|
||||
.parent_names = lcc_mi2s_parents,
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap_div mi2s_div_clk = {
|
||||
.reg = 0x48,
|
||||
.shift = 10,
|
||||
.width = 4,
|
||||
.clkr = {
|
||||
.enable_reg = 0x48,
|
||||
.enable_mask = BIT(15),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "mi2s_div_clk",
|
||||
.parent_names = lcc_mi2s_parents,
|
||||
.num_parents = 1,
|
||||
.ops = &clk_regmap_div_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch mi2s_bit_div_clk = {
|
||||
.halt_reg = 0x50,
|
||||
.halt_bit = 0,
|
||||
.halt_check = BRANCH_HALT_ENABLE,
|
||||
.clkr = {
|
||||
.enable_reg = 0x48,
|
||||
.enable_mask = BIT(15),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "mi2s_bit_div_clk",
|
||||
.parent_names = (const char *[]){ "mi2s_div_clk" },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap_mux mi2s_bit_clk = {
|
||||
.reg = 0x48,
|
||||
.shift = 14,
|
||||
.width = 1,
|
||||
.clkr = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "mi2s_bit_clk",
|
||||
.parent_names = (const char *[]){
|
||||
"mi2s_bit_div_clk",
|
||||
"mi2s_codec_clk",
|
||||
},
|
||||
.num_parents = 2,
|
||||
.ops = &clk_regmap_mux_closest_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
#define CLK_AIF_OSR_DIV(prefix, _ns, _md, hr) \
|
||||
static struct clk_rcg prefix##_osr_src = { \
|
||||
.ns_reg = _ns, \
|
||||
.md_reg = _md, \
|
||||
.mn = { \
|
||||
.mnctr_en_bit = 8, \
|
||||
.mnctr_reset_bit = 7, \
|
||||
.mnctr_mode_shift = 5, \
|
||||
.n_val_shift = 24, \
|
||||
.m_val_shift = 8, \
|
||||
.width = 8, \
|
||||
}, \
|
||||
.p = { \
|
||||
.pre_div_shift = 3, \
|
||||
.pre_div_width = 2, \
|
||||
}, \
|
||||
.s = { \
|
||||
.src_sel_shift = 0, \
|
||||
.parent_map = lcc_cxo_pll4_map, \
|
||||
}, \
|
||||
.freq_tbl = clk_tbl_aif_osr_393, \
|
||||
.clkr = { \
|
||||
.enable_reg = _ns, \
|
||||
.enable_mask = BIT(9), \
|
||||
.hw.init = &(struct clk_init_data){ \
|
||||
.name = #prefix "_osr_src", \
|
||||
.parent_names = lcc_cxo_pll4, \
|
||||
.num_parents = 2, \
|
||||
.ops = &clk_rcg_ops, \
|
||||
.flags = CLK_SET_RATE_GATE, \
|
||||
}, \
|
||||
}, \
|
||||
}; \
|
||||
\
|
||||
static const char * const lcc_##prefix##_parents[] = { \
|
||||
#prefix "_osr_src", \
|
||||
}; \
|
||||
\
|
||||
static struct clk_branch prefix##_osr_clk = { \
|
||||
.halt_reg = hr, \
|
||||
.halt_bit = 1, \
|
||||
.halt_check = BRANCH_HALT_ENABLE, \
|
||||
.clkr = { \
|
||||
.enable_reg = _ns, \
|
||||
.enable_mask = BIT(21), \
|
||||
.hw.init = &(struct clk_init_data){ \
|
||||
.name = #prefix "_osr_clk", \
|
||||
.parent_names = lcc_##prefix##_parents, \
|
||||
.num_parents = 1, \
|
||||
.ops = &clk_branch_ops, \
|
||||
.flags = CLK_SET_RATE_PARENT, \
|
||||
}, \
|
||||
}, \
|
||||
}; \
|
||||
\
|
||||
static struct clk_regmap_div prefix##_div_clk = { \
|
||||
.reg = _ns, \
|
||||
.shift = 10, \
|
||||
.width = 8, \
|
||||
.clkr = { \
|
||||
.hw.init = &(struct clk_init_data){ \
|
||||
.name = #prefix "_div_clk", \
|
||||
.parent_names = lcc_##prefix##_parents, \
|
||||
.num_parents = 1, \
|
||||
.ops = &clk_regmap_div_ops, \
|
||||
}, \
|
||||
}, \
|
||||
}; \
|
||||
\
|
||||
static struct clk_branch prefix##_bit_div_clk = { \
|
||||
.halt_reg = hr, \
|
||||
.halt_bit = 0, \
|
||||
.halt_check = BRANCH_HALT_ENABLE, \
|
||||
.clkr = { \
|
||||
.enable_reg = _ns, \
|
||||
.enable_mask = BIT(19), \
|
||||
.hw.init = &(struct clk_init_data){ \
|
||||
.name = #prefix "_bit_div_clk", \
|
||||
.parent_names = (const char *[]){ \
|
||||
#prefix "_div_clk" \
|
||||
}, \
|
||||
.num_parents = 1, \
|
||||
.ops = &clk_branch_ops, \
|
||||
.flags = CLK_SET_RATE_PARENT, \
|
||||
}, \
|
||||
}, \
|
||||
}; \
|
||||
\
|
||||
static struct clk_regmap_mux prefix##_bit_clk = { \
|
||||
.reg = _ns, \
|
||||
.shift = 18, \
|
||||
.width = 1, \
|
||||
.clkr = { \
|
||||
.hw.init = &(struct clk_init_data){ \
|
||||
.name = #prefix "_bit_clk", \
|
||||
.parent_names = (const char *[]){ \
|
||||
#prefix "_bit_div_clk", \
|
||||
#prefix "_codec_clk", \
|
||||
}, \
|
||||
.num_parents = 2, \
|
||||
.ops = &clk_regmap_mux_closest_ops, \
|
||||
.flags = CLK_SET_RATE_PARENT, \
|
||||
}, \
|
||||
}, \
|
||||
}
|
||||
|
||||
CLK_AIF_OSR_DIV(codec_i2s_mic, 0x60, 0x64, 0x68);
|
||||
CLK_AIF_OSR_DIV(spare_i2s_mic, 0x78, 0x7c, 0x80);
|
||||
CLK_AIF_OSR_DIV(codec_i2s_spkr, 0x6c, 0x70, 0x74);
|
||||
CLK_AIF_OSR_DIV(spare_i2s_spkr, 0x84, 0x88, 0x8c);
|
||||
|
||||
static struct freq_tbl clk_tbl_pcm_492[] = {
|
||||
{ 256000, P_PLL4, 4, 1, 480 },
|
||||
{ 512000, P_PLL4, 4, 1, 240 },
|
||||
{ 768000, P_PLL4, 4, 1, 160 },
|
||||
{ 1024000, P_PLL4, 4, 1, 120 },
|
||||
{ 1536000, P_PLL4, 4, 1, 80 },
|
||||
{ 2048000, P_PLL4, 4, 1, 60 },
|
||||
{ 3072000, P_PLL4, 4, 1, 40 },
|
||||
{ 4096000, P_PLL4, 4, 1, 30 },
|
||||
{ 6144000, P_PLL4, 4, 1, 20 },
|
||||
{ 8192000, P_PLL4, 4, 1, 15 },
|
||||
{ 12288000, P_PLL4, 4, 1, 10 },
|
||||
{ 24576000, P_PLL4, 4, 1, 5 },
|
||||
{ 27000000, P_CXO, 1, 0, 0 },
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct freq_tbl clk_tbl_pcm_393[] = {
|
||||
{ 256000, P_PLL4, 4, 1, 384 },
|
||||
{ 512000, P_PLL4, 4, 1, 192 },
|
||||
{ 768000, P_PLL4, 4, 1, 128 },
|
||||
{ 1024000, P_PLL4, 4, 1, 96 },
|
||||
{ 1536000, P_PLL4, 4, 1, 64 },
|
||||
{ 2048000, P_PLL4, 4, 1, 48 },
|
||||
{ 3072000, P_PLL4, 4, 1, 32 },
|
||||
{ 4096000, P_PLL4, 4, 1, 24 },
|
||||
{ 6144000, P_PLL4, 4, 1, 16 },
|
||||
{ 8192000, P_PLL4, 4, 1, 12 },
|
||||
{ 12288000, P_PLL4, 4, 1, 8 },
|
||||
{ 24576000, P_PLL4, 4, 1, 4 },
|
||||
{ 27000000, P_CXO, 1, 0, 0 },
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg pcm_src = {
|
||||
.ns_reg = 0x54,
|
||||
.md_reg = 0x58,
|
||||
.mn = {
|
||||
.mnctr_en_bit = 8,
|
||||
.mnctr_reset_bit = 7,
|
||||
.mnctr_mode_shift = 5,
|
||||
.n_val_shift = 16,
|
||||
.m_val_shift = 16,
|
||||
.width = 16,
|
||||
},
|
||||
.p = {
|
||||
.pre_div_shift = 3,
|
||||
.pre_div_width = 2,
|
||||
},
|
||||
.s = {
|
||||
.src_sel_shift = 0,
|
||||
.parent_map = lcc_cxo_pll4_map,
|
||||
},
|
||||
.freq_tbl = clk_tbl_pcm_393,
|
||||
.clkr = {
|
||||
.enable_reg = 0x54,
|
||||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "pcm_src",
|
||||
.parent_names = lcc_cxo_pll4,
|
||||
.num_parents = 2,
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch pcm_clk_out = {
|
||||
.halt_reg = 0x5c,
|
||||
.halt_bit = 0,
|
||||
.halt_check = BRANCH_HALT_ENABLE,
|
||||
.clkr = {
|
||||
.enable_reg = 0x54,
|
||||
.enable_mask = BIT(11),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "pcm_clk_out",
|
||||
.parent_names = (const char *[]){ "pcm_src" },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap_mux pcm_clk = {
|
||||
.reg = 0x54,
|
||||
.shift = 10,
|
||||
.width = 1,
|
||||
.clkr = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "pcm_clk",
|
||||
.parent_names = (const char *[]){
|
||||
"pcm_clk_out",
|
||||
"pcm_codec_clk",
|
||||
},
|
||||
.num_parents = 2,
|
||||
.ops = &clk_regmap_mux_closest_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_rcg slimbus_src = {
|
||||
.ns_reg = 0xcc,
|
||||
.md_reg = 0xd0,
|
||||
.mn = {
|
||||
.mnctr_en_bit = 8,
|
||||
.mnctr_reset_bit = 7,
|
||||
.mnctr_mode_shift = 5,
|
||||
.n_val_shift = 24,
|
||||
.m_val_shift = 8,
|
||||
.width = 8,
|
||||
},
|
||||
.p = {
|
||||
.pre_div_shift = 3,
|
||||
.pre_div_width = 2,
|
||||
},
|
||||
.s = {
|
||||
.src_sel_shift = 0,
|
||||
.parent_map = lcc_cxo_pll4_map,
|
||||
},
|
||||
.freq_tbl = clk_tbl_aif_osr_393,
|
||||
.clkr = {
|
||||
.enable_reg = 0xcc,
|
||||
.enable_mask = BIT(9),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "slimbus_src",
|
||||
.parent_names = lcc_cxo_pll4,
|
||||
.num_parents = 2,
|
||||
.ops = &clk_rcg_ops,
|
||||
.flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static const char * const lcc_slimbus_parents[] = {
|
||||
"slimbus_src",
|
||||
};
|
||||
|
||||
static struct clk_branch audio_slimbus_clk = {
|
||||
.halt_reg = 0xd4,
|
||||
.halt_bit = 0,
|
||||
.halt_check = BRANCH_HALT_ENABLE,
|
||||
.clkr = {
|
||||
.enable_reg = 0xcc,
|
||||
.enable_mask = BIT(10),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "audio_slimbus_clk",
|
||||
.parent_names = lcc_slimbus_parents,
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch sps_slimbus_clk = {
|
||||
.halt_reg = 0xd4,
|
||||
.halt_bit = 1,
|
||||
.halt_check = BRANCH_HALT_ENABLE,
|
||||
.clkr = {
|
||||
.enable_reg = 0xcc,
|
||||
.enable_mask = BIT(12),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "sps_slimbus_clk",
|
||||
.parent_names = lcc_slimbus_parents,
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap *lcc_mdm9615_clks[] = {
|
||||
[PLL4] = &pll4.clkr,
|
||||
[MI2S_OSR_SRC] = &mi2s_osr_src.clkr,
|
||||
[MI2S_OSR_CLK] = &mi2s_osr_clk.clkr,
|
||||
[MI2S_DIV_CLK] = &mi2s_div_clk.clkr,
|
||||
[MI2S_BIT_DIV_CLK] = &mi2s_bit_div_clk.clkr,
|
||||
[MI2S_BIT_CLK] = &mi2s_bit_clk.clkr,
|
||||
[PCM_SRC] = &pcm_src.clkr,
|
||||
[PCM_CLK_OUT] = &pcm_clk_out.clkr,
|
||||
[PCM_CLK] = &pcm_clk.clkr,
|
||||
[SLIMBUS_SRC] = &slimbus_src.clkr,
|
||||
[AUDIO_SLIMBUS_CLK] = &audio_slimbus_clk.clkr,
|
||||
[SPS_SLIMBUS_CLK] = &sps_slimbus_clk.clkr,
|
||||
[CODEC_I2S_MIC_OSR_SRC] = &codec_i2s_mic_osr_src.clkr,
|
||||
[CODEC_I2S_MIC_OSR_CLK] = &codec_i2s_mic_osr_clk.clkr,
|
||||
[CODEC_I2S_MIC_DIV_CLK] = &codec_i2s_mic_div_clk.clkr,
|
||||
[CODEC_I2S_MIC_BIT_DIV_CLK] = &codec_i2s_mic_bit_div_clk.clkr,
|
||||
[CODEC_I2S_MIC_BIT_CLK] = &codec_i2s_mic_bit_clk.clkr,
|
||||
[SPARE_I2S_MIC_OSR_SRC] = &spare_i2s_mic_osr_src.clkr,
|
||||
[SPARE_I2S_MIC_OSR_CLK] = &spare_i2s_mic_osr_clk.clkr,
|
||||
[SPARE_I2S_MIC_DIV_CLK] = &spare_i2s_mic_div_clk.clkr,
|
||||
[SPARE_I2S_MIC_BIT_DIV_CLK] = &spare_i2s_mic_bit_div_clk.clkr,
|
||||
[SPARE_I2S_MIC_BIT_CLK] = &spare_i2s_mic_bit_clk.clkr,
|
||||
[CODEC_I2S_SPKR_OSR_SRC] = &codec_i2s_spkr_osr_src.clkr,
|
||||
[CODEC_I2S_SPKR_OSR_CLK] = &codec_i2s_spkr_osr_clk.clkr,
|
||||
[CODEC_I2S_SPKR_DIV_CLK] = &codec_i2s_spkr_div_clk.clkr,
|
||||
[CODEC_I2S_SPKR_BIT_DIV_CLK] = &codec_i2s_spkr_bit_div_clk.clkr,
|
||||
[CODEC_I2S_SPKR_BIT_CLK] = &codec_i2s_spkr_bit_clk.clkr,
|
||||
[SPARE_I2S_SPKR_OSR_SRC] = &spare_i2s_spkr_osr_src.clkr,
|
||||
[SPARE_I2S_SPKR_OSR_CLK] = &spare_i2s_spkr_osr_clk.clkr,
|
||||
[SPARE_I2S_SPKR_DIV_CLK] = &spare_i2s_spkr_div_clk.clkr,
|
||||
[SPARE_I2S_SPKR_BIT_DIV_CLK] = &spare_i2s_spkr_bit_div_clk.clkr,
|
||||
[SPARE_I2S_SPKR_BIT_CLK] = &spare_i2s_spkr_bit_clk.clkr,
|
||||
};
|
||||
|
||||
static const struct regmap_config lcc_mdm9615_regmap_config = {
|
||||
.reg_bits = 32,
|
||||
.reg_stride = 4,
|
||||
.val_bits = 32,
|
||||
.max_register = 0xfc,
|
||||
.fast_io = true,
|
||||
};
|
||||
|
||||
static const struct qcom_cc_desc lcc_mdm9615_desc = {
|
||||
.config = &lcc_mdm9615_regmap_config,
|
||||
.clks = lcc_mdm9615_clks,
|
||||
.num_clks = ARRAY_SIZE(lcc_mdm9615_clks),
|
||||
};
|
||||
|
||||
static const struct of_device_id lcc_mdm9615_match_table[] = {
|
||||
{ .compatible = "qcom,lcc-mdm9615" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, lcc_mdm9615_match_table);
|
||||
|
||||
static int lcc_mdm9615_probe(struct platform_device *pdev)
|
||||
{
|
||||
u32 val;
|
||||
struct regmap *regmap;
|
||||
|
||||
regmap = qcom_cc_map(pdev, &lcc_mdm9615_desc);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
/* Use the correct frequency plan depending on speed of PLL4 */
|
||||
regmap_read(regmap, 0x4, &val);
|
||||
if (val == 0x12) {
|
||||
slimbus_src.freq_tbl = clk_tbl_aif_osr_492;
|
||||
mi2s_osr_src.freq_tbl = clk_tbl_aif_osr_492;
|
||||
codec_i2s_mic_osr_src.freq_tbl = clk_tbl_aif_osr_492;
|
||||
spare_i2s_mic_osr_src.freq_tbl = clk_tbl_aif_osr_492;
|
||||
codec_i2s_spkr_osr_src.freq_tbl = clk_tbl_aif_osr_492;
|
||||
spare_i2s_spkr_osr_src.freq_tbl = clk_tbl_aif_osr_492;
|
||||
pcm_src.freq_tbl = clk_tbl_pcm_492;
|
||||
}
|
||||
/* Enable PLL4 source on the LPASS Primary PLL Mux */
|
||||
regmap_write(regmap, 0xc4, 0x1);
|
||||
|
||||
return qcom_cc_really_probe(pdev, &lcc_mdm9615_desc, regmap);
|
||||
}
|
||||
|
||||
static struct platform_driver lcc_mdm9615_driver = {
|
||||
.probe = lcc_mdm9615_probe,
|
||||
.driver = {
|
||||
.name = "lcc-mdm9615",
|
||||
.of_match_table = lcc_mdm9615_match_table,
|
||||
},
|
||||
};
|
||||
module_platform_driver(lcc_mdm9615_driver);
|
||||
|
||||
MODULE_DESCRIPTION("QCOM LCC MDM9615 Driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS("platform:lcc-mdm9615");
|
||||
|
|
@ -23,6 +23,10 @@
|
|||
#include "clk-regmap-divider.h"
|
||||
#include "clk-regmap-mux.h"
|
||||
|
||||
static struct clk_parent_data pxo_parent_data = {
|
||||
.fw_name = "pxo", .name = "pxo_board",
|
||||
};
|
||||
|
||||
static struct clk_pll pll4 = {
|
||||
.l_reg = 0x4,
|
||||
.m_reg = 0x8,
|
||||
|
|
@ -33,9 +37,7 @@ static struct clk_pll pll4 = {
|
|||
.status_bit = 16,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "pll4",
|
||||
.parent_data = (const struct clk_parent_data[]){
|
||||
{ .fw_name = "pxo", .name = "pxo_board" },
|
||||
},
|
||||
.parent_data = &pxo_parent_data,
|
||||
.num_parents = 1,
|
||||
.ops = &clk_pll_ops,
|
||||
},
|
||||
|
|
@ -51,7 +53,7 @@ static const struct parent_map lcc_pxo_pll4_map[] = {
|
|||
{ P_PLL4, 2 }
|
||||
};
|
||||
|
||||
static const struct clk_parent_data lcc_pxo_pll4[] = {
|
||||
static struct clk_parent_data lcc_pxo_pll4[] = {
|
||||
{ .fw_name = "pxo", .name = "pxo_board" },
|
||||
{ .fw_name = "pll4_vote", .name = "pll4_vote" },
|
||||
};
|
||||
|
|
@ -444,6 +446,7 @@ static const struct qcom_cc_desc lcc_msm8960_desc = {
|
|||
static const struct of_device_id lcc_msm8960_match_table[] = {
|
||||
{ .compatible = "qcom,lcc-msm8960" },
|
||||
{ .compatible = "qcom,lcc-apq8064" },
|
||||
{ .compatible = "qcom,lcc-mdm9615" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, lcc_msm8960_match_table);
|
||||
|
|
@ -453,6 +456,14 @@ static int lcc_msm8960_probe(struct platform_device *pdev)
|
|||
u32 val;
|
||||
struct regmap *regmap;
|
||||
|
||||
/* patch for the cxo <-> pxo difference */
|
||||
if (of_device_is_compatible(pdev->dev.of_node, "qcom,lcc-mdm9615")) {
|
||||
pxo_parent_data.fw_name = "cxo";
|
||||
pxo_parent_data.name = "cxo_board";
|
||||
lcc_pxo_pll4[0].fw_name = "cxo";
|
||||
lcc_pxo_pll4[0].name = "cxo_board";
|
||||
}
|
||||
|
||||
regmap = qcom_cc_map(pdev, &lcc_msm8960_desc);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
|
|
|||
|
|
@ -118,9 +118,13 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev)
|
|||
ret = pm_clk_add(&pdev->dev, "iface");
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to acquire iface clock\n");
|
||||
goto destroy_pm_clk;
|
||||
goto err_destroy_pm_clk;
|
||||
}
|
||||
|
||||
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||
if (ret)
|
||||
goto err_destroy_pm_clk;
|
||||
|
||||
if (!of_property_read_bool(pdev->dev.of_node, "qcom,adsp-pil-mode")) {
|
||||
lpass_regmap_config.name = "qdsp6ss";
|
||||
lpass_regmap_config.max_register = 0x3f;
|
||||
|
|
@ -128,7 +132,7 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev)
|
|||
|
||||
ret = qcom_cc_probe_by_index(pdev, 0, desc);
|
||||
if (ret)
|
||||
goto destroy_pm_clk;
|
||||
goto err_put_rpm;
|
||||
}
|
||||
|
||||
lpass_regmap_config.name = "top_cc";
|
||||
|
|
@ -137,11 +141,15 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev)
|
|||
|
||||
ret = qcom_cc_probe_by_index(pdev, 1, desc);
|
||||
if (ret)
|
||||
goto destroy_pm_clk;
|
||||
goto err_put_rpm;
|
||||
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
||||
destroy_pm_clk:
|
||||
err_put_rpm:
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
err_destroy_pm_clk:
|
||||
pm_clk_destroy(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -2426,6 +2426,16 @@ static struct gdsc oxilicx_gdsc = {
|
|||
.pwrsts = PWRSTS_OFF_ON,
|
||||
};
|
||||
|
||||
static struct gdsc oxili_cx_gdsc_msm8226 = {
|
||||
.gdscr = 0x4034,
|
||||
.cxcs = (unsigned int []){ 0x4028 },
|
||||
.cxc_count = 1,
|
||||
.pd = {
|
||||
.name = "oxili_cx",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
};
|
||||
|
||||
static struct clk_regmap *mmcc_msm8226_clocks[] = {
|
||||
[MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr,
|
||||
[MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr,
|
||||
|
|
@ -2515,6 +2525,7 @@ static struct gdsc *mmcc_msm8226_gdscs[] = {
|
|||
[MDSS_GDSC] = &mdss_gdsc,
|
||||
[CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc,
|
||||
[CAMSS_VFE_GDSC] = &camss_vfe_gdsc,
|
||||
[OXILICX_GDSC] = &oxili_cx_gdsc_msm8226,
|
||||
};
|
||||
|
||||
static const struct regmap_config mmcc_msm8226_regmap_config = {
|
||||
|
|
|
|||
|
|
@ -46,19 +46,6 @@ enum {
|
|||
P_DPLINK,
|
||||
};
|
||||
|
||||
static struct clk_fixed_factor gpll0_div = {
|
||||
.mult = 1,
|
||||
.div = 2,
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "mmss_gpll0_div",
|
||||
.parent_data = &(const struct clk_parent_data){
|
||||
.fw_name = "gpll0"
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_fixed_factor_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct clk_div_table post_div_table_fabia_even[] = {
|
||||
{ 0x0, 1 },
|
||||
{ 0x1, 2 },
|
||||
|
|
@ -354,7 +341,7 @@ static const struct parent_map mmss_xo_gpll0_gpll0_div_map[] = {
|
|||
static const struct clk_parent_data mmss_xo_gpll0_gpll0_div[] = {
|
||||
{ .fw_name = "xo" },
|
||||
{ .fw_name = "gpll0" },
|
||||
{ .hw = &gpll0_div.hw },
|
||||
{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
|
||||
};
|
||||
|
||||
static const struct parent_map mmss_xo_mmpll0_gpll0_gpll0_div_map[] = {
|
||||
|
|
@ -368,7 +355,7 @@ static const struct clk_parent_data mmss_xo_mmpll0_gpll0_gpll0_div[] = {
|
|||
{ .fw_name = "xo" },
|
||||
{ .hw = &mmpll0_out_even.clkr.hw },
|
||||
{ .fw_name = "gpll0" },
|
||||
{ .hw = &gpll0_div.hw },
|
||||
{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
|
||||
};
|
||||
|
||||
static const struct parent_map mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map[] = {
|
||||
|
|
@ -384,7 +371,7 @@ static const struct clk_parent_data mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div[] = {
|
|||
{ .hw = &mmpll0_out_even.clkr.hw },
|
||||
{ .hw = &mmpll1_out_even.clkr.hw },
|
||||
{ .fw_name = "gpll0" },
|
||||
{ .hw = &gpll0_div.hw },
|
||||
{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
|
||||
};
|
||||
|
||||
static const struct parent_map mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map[] = {
|
||||
|
|
@ -400,7 +387,7 @@ static const struct clk_parent_data mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div[] = {
|
|||
{ .hw = &mmpll0_out_even.clkr.hw },
|
||||
{ .hw = &mmpll5_out_even.clkr.hw },
|
||||
{ .fw_name = "gpll0" },
|
||||
{ .hw = &gpll0_div.hw },
|
||||
{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
|
||||
};
|
||||
|
||||
static const struct parent_map mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map[] = {
|
||||
|
|
@ -418,7 +405,7 @@ static const struct clk_parent_data mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div
|
|||
{ .hw = &mmpll3_out_even.clkr.hw },
|
||||
{ .hw = &mmpll6_out_even.clkr.hw },
|
||||
{ .fw_name = "gpll0" },
|
||||
{ .hw = &gpll0_div.hw },
|
||||
{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
|
||||
};
|
||||
|
||||
static const struct parent_map mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map[] = {
|
||||
|
|
@ -436,7 +423,7 @@ static const struct clk_parent_data mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_di
|
|||
{ .hw = &mmpll7_out_even.clkr.hw },
|
||||
{ .hw = &mmpll10_out_even.clkr.hw },
|
||||
{ .fw_name = "gpll0" },
|
||||
{ .hw = &gpll0_div.hw },
|
||||
{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
|
||||
};
|
||||
|
||||
static const struct parent_map mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div_map[] = {
|
||||
|
|
@ -454,7 +441,7 @@ static const struct clk_parent_data mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_di
|
|||
{ .hw = &mmpll7_out_even.clkr.hw },
|
||||
{ .hw = &mmpll10_out_even.clkr.hw },
|
||||
{ .fw_name = "gpll0" },
|
||||
{ .hw = &gpll0_div.hw },
|
||||
{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
|
||||
};
|
||||
|
||||
static const struct parent_map mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map[] = {
|
||||
|
|
@ -474,7 +461,7 @@ static const struct clk_parent_data mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_g
|
|||
{ .hw = &mmpll7_out_even.clkr.hw },
|
||||
{ .hw = &mmpll10_out_even.clkr.hw },
|
||||
{ .fw_name = "gpll0" },
|
||||
{ .hw = &gpll0_div.hw },
|
||||
{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
|
||||
};
|
||||
|
||||
static struct clk_rcg2 byte0_clk_src = {
|
||||
|
|
@ -2544,10 +2531,6 @@ static struct clk_branch vmem_ahb_clk = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct clk_hw *mmcc_msm8998_hws[] = {
|
||||
&gpll0_div.hw,
|
||||
};
|
||||
|
||||
static struct gdsc video_top_gdsc = {
|
||||
.gdscr = 0x1024,
|
||||
.pd = {
|
||||
|
|
@ -2855,8 +2838,6 @@ static const struct qcom_cc_desc mmcc_msm8998_desc = {
|
|||
.num_resets = ARRAY_SIZE(mmcc_msm8998_resets),
|
||||
.gdscs = mmcc_msm8998_gdscs,
|
||||
.num_gdscs = ARRAY_SIZE(mmcc_msm8998_gdscs),
|
||||
.clk_hws = mmcc_msm8998_hws,
|
||||
.num_clk_hws = ARRAY_SIZE(mmcc_msm8998_hws),
|
||||
};
|
||||
|
||||
static const struct of_device_id mmcc_msm8998_match_table[] = {
|
||||
|
|
|
|||
|
|
@ -87,11 +87,22 @@ static int mss_sc7180_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = qcom_cc_probe(pdev, &mss_sc7180_desc);
|
||||
if (ret < 0)
|
||||
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = qcom_cc_probe(pdev, &mss_sc7180_desc);
|
||||
if (ret < 0)
|
||||
goto err_put_rpm;
|
||||
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
||||
err_put_rpm:
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops mss_sc7180_pm_ops = {
|
||||
|
|
|
|||
|
|
@ -174,21 +174,32 @@ static int q6sstopcc_qcs404_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
q6sstop_regmap_config.name = "q6sstop_tcsr";
|
||||
desc = &tcsr_qcs404_desc;
|
||||
|
||||
ret = qcom_cc_probe_by_index(pdev, 1, desc);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_put_rpm;
|
||||
|
||||
q6sstop_regmap_config.name = "q6sstop_cc";
|
||||
desc = &q6sstop_qcs404_desc;
|
||||
|
||||
ret = qcom_cc_probe_by_index(pdev, 0, desc);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_put_rpm;
|
||||
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
||||
err_put_rpm:
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops q6sstopcc_pm_ops = {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ static int qcom_reset(struct reset_controller_dev *rcdev, unsigned long id)
|
|||
struct qcom_reset_controller *rst = to_qcom_reset_controller(rcdev);
|
||||
|
||||
rcdev->ops->assert(rcdev, id);
|
||||
udelay(rst->reset_map[id].udelay ?: 1); /* use 1 us as default */
|
||||
fsleep(rst->reset_map[id].udelay ?: 1); /* use 1 us as default */
|
||||
|
||||
rcdev->ops->deassert(rcdev, id);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,11 +125,22 @@ static int turingcc_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = qcom_cc_probe(pdev, &turingcc_desc);
|
||||
if (ret < 0)
|
||||
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = qcom_cc_probe(pdev, &turingcc_desc);
|
||||
if (ret < 0)
|
||||
goto err_put_rpm;
|
||||
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
||||
err_put_rpm:
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops turingcc_pm_ops = {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,10 @@ static const struct pll_vco lucid_5lpe_vco[] = {
|
|||
{ 249600000, 1750000000, 0 },
|
||||
};
|
||||
|
||||
static const struct pll_vco lucid_5lpe_vco_8280xp[] = {
|
||||
{ 249600000, 1800000000, 0 },
|
||||
};
|
||||
|
||||
static const struct alpha_pll_config video_pll0_config = {
|
||||
.l = 0x25,
|
||||
.alpha = 0x8000,
|
||||
|
|
@ -159,6 +163,16 @@ static const struct freq_tbl ftbl_video_cc_mvs0_clk_src[] = {
|
|||
{ }
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_video_cc_mvs0_clk_src_8280xp[] = {
|
||||
F(720000000, P_VIDEO_PLL0_OUT_MAIN, 1, 0, 0),
|
||||
F(1014000000, P_VIDEO_PLL0_OUT_MAIN, 1, 0, 0),
|
||||
F(1098000000, P_VIDEO_PLL0_OUT_MAIN, 1, 0, 0),
|
||||
F(1332000000, P_VIDEO_PLL0_OUT_MAIN, 1, 0, 0),
|
||||
F(1599000000, P_VIDEO_PLL0_OUT_MAIN, 1, 0, 0),
|
||||
F(1680000000, P_VIDEO_PLL0_OUT_MAIN, 1, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 video_cc_mvs0_clk_src = {
|
||||
.cmd_rcgr = 0xb94,
|
||||
.mnd_width = 0,
|
||||
|
|
@ -181,6 +195,15 @@ static const struct freq_tbl ftbl_video_cc_mvs1_clk_src[] = {
|
|||
{ }
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_video_cc_mvs1_clk_src_8280xp[] = {
|
||||
F(840000000, P_VIDEO_PLL1_OUT_MAIN, 1, 0, 0),
|
||||
F(1098000000, P_VIDEO_PLL1_OUT_MAIN, 1, 0, 0),
|
||||
F(1332000000, P_VIDEO_PLL1_OUT_MAIN, 1, 0, 0),
|
||||
F(1600000000, P_VIDEO_PLL1_OUT_MAIN, 1, 0, 0),
|
||||
F(1800000000, P_VIDEO_PLL1_OUT_MAIN, 1, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 video_cc_mvs1_clk_src = {
|
||||
.cmd_rcgr = 0xbb4,
|
||||
.mnd_width = 0,
|
||||
|
|
@ -499,6 +522,7 @@ static struct qcom_cc_desc video_cc_sm8350_desc = {
|
|||
|
||||
static int video_cc_sm8350_probe(struct platform_device *pdev)
|
||||
{
|
||||
u32 video_cc_xo_clk_cbcr = 0xeec;
|
||||
struct regmap *regmap;
|
||||
int ret;
|
||||
|
||||
|
|
@ -510,6 +534,21 @@ static int video_cc_sm8350_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (of_device_is_compatible(pdev->dev.of_node, "qcom,sc8280xp-videocc")) {
|
||||
video_cc_sleep_clk_src.cmd_rcgr = 0xf38;
|
||||
video_cc_sleep_clk.halt_reg = 0xf58;
|
||||
video_cc_sleep_clk.clkr.enable_reg = 0xf58;
|
||||
video_cc_xo_clk_src.cmd_rcgr = 0xf14;
|
||||
video_cc_xo_clk_cbcr = 0xf34;
|
||||
|
||||
video_pll0.vco_table = video_pll1.vco_table = lucid_5lpe_vco_8280xp;
|
||||
/* No change, but assign it for completeness */
|
||||
video_pll0.num_vco = video_pll1.num_vco = ARRAY_SIZE(lucid_5lpe_vco_8280xp);
|
||||
|
||||
video_cc_mvs0_clk_src.freq_tbl = ftbl_video_cc_mvs0_clk_src_8280xp;
|
||||
video_cc_mvs1_clk_src.freq_tbl = ftbl_video_cc_mvs1_clk_src_8280xp;
|
||||
}
|
||||
|
||||
regmap = qcom_cc_map(pdev, &video_cc_sm8350_desc);
|
||||
if (IS_ERR(regmap)) {
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
|
@ -525,7 +564,7 @@ static int video_cc_sm8350_probe(struct platform_device *pdev)
|
|||
* video_cc_xo_clk
|
||||
*/
|
||||
regmap_update_bits(regmap, 0xe58, BIT(0), BIT(0));
|
||||
regmap_update_bits(regmap, 0xeec, BIT(0), BIT(0));
|
||||
regmap_update_bits(regmap, video_cc_xo_clk_cbcr, BIT(0), BIT(0));
|
||||
|
||||
ret = qcom_cc_really_probe(pdev, &video_cc_sm8350_desc, regmap);
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
|
@ -534,6 +573,7 @@ static int video_cc_sm8350_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
static const struct of_device_id video_cc_sm8350_match_table[] = {
|
||||
{ .compatible = "qcom,sc8280xp-videocc" },
|
||||
{ .compatible = "qcom,sm8350-videocc" },
|
||||
{ }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ qnoc-sm8250-objs := sm8250.o
|
|||
qnoc-sm8350-objs := sm8350.o
|
||||
qnoc-sm8450-objs := sm8450.o
|
||||
qnoc-sm8550-objs := sm8550.o
|
||||
icc-smd-rpm-objs := smd-rpm.o icc-rpm.o
|
||||
icc-smd-rpm-objs := smd-rpm.o icc-rpm.o icc-rpm-clocks.o
|
||||
|
||||
obj-$(CONFIG_INTERCONNECT_QCOM_BCM_VOTER) += icc-bcm-voter.o
|
||||
obj-$(CONFIG_INTERCONNECT_QCOM_MSM8916) += qnoc-msm8916.o
|
||||
|
|
|
|||
77
drivers/interconnect/qcom/icc-rpm-clocks.c
Normal file
77
drivers/interconnect/qcom/icc-rpm-clocks.c
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2023 Linaro Ltd
|
||||
*/
|
||||
|
||||
#include <linux/soc/qcom/smd-rpm.h>
|
||||
|
||||
#include "icc-rpm.h"
|
||||
|
||||
const struct rpm_clk_resource aggre1_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_AGGR_CLK,
|
||||
.clock_id = 1,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(aggre1_clk);
|
||||
|
||||
const struct rpm_clk_resource aggre2_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_AGGR_CLK,
|
||||
.clock_id = 2,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(aggre2_clk);
|
||||
|
||||
const struct rpm_clk_resource bimc_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_MEM_CLK,
|
||||
.clock_id = 0,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(bimc_clk);
|
||||
|
||||
const struct rpm_clk_resource bus_0_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_BUS_CLK,
|
||||
.clock_id = 0,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(bus_0_clk);
|
||||
|
||||
const struct rpm_clk_resource bus_1_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_BUS_CLK,
|
||||
.clock_id = 1,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(bus_1_clk);
|
||||
|
||||
const struct rpm_clk_resource bus_2_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_BUS_CLK,
|
||||
.clock_id = 2,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(bus_2_clk);
|
||||
|
||||
const struct rpm_clk_resource mmaxi_0_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_MMAXI_CLK,
|
||||
.clock_id = 0,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(mmaxi_0_clk);
|
||||
|
||||
const struct rpm_clk_resource mmaxi_1_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_MMAXI_CLK,
|
||||
.clock_id = 1,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(mmaxi_1_clk);
|
||||
|
||||
const struct rpm_clk_resource qup_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_QUP_CLK,
|
||||
.clock_id = 0,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(qup_clk);
|
||||
|
||||
/* Branch clocks */
|
||||
const struct rpm_clk_resource aggre1_branch_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_AGGR_CLK,
|
||||
.clock_id = 1,
|
||||
.branch = true,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(aggre1_branch_clk);
|
||||
|
||||
const struct rpm_clk_resource aggre2_branch_clk = {
|
||||
.resource_type = QCOM_SMD_RPM_AGGR_CLK,
|
||||
.clock_id = 2,
|
||||
.branch = true,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(aggre2_branch_clk);
|
||||
|
|
@ -3,7 +3,6 @@
|
|||
* Copyright (C) 2020 Linaro Ltd
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
|
|
@ -14,7 +13,6 @@
|
|||
#include <linux/regmap.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "smd-rpm.h"
|
||||
#include "icc-common.h"
|
||||
#include "icc-rpm.h"
|
||||
|
||||
|
|
@ -50,6 +48,8 @@
|
|||
#define NOC_QOS_MODE_FIXED_VAL 0x0
|
||||
#define NOC_QOS_MODE_BYPASS_VAL 0x2
|
||||
|
||||
#define ICC_BUS_CLK_MIN_RATE 19200ULL /* kHz */
|
||||
|
||||
static int qcom_icc_set_qnoc_qos(struct icc_node *src)
|
||||
{
|
||||
struct icc_provider *provider = src->provider;
|
||||
|
|
@ -204,34 +204,39 @@ static int qcom_icc_qos_set(struct icc_node *node)
|
|||
}
|
||||
}
|
||||
|
||||
static int qcom_icc_rpm_set(struct qcom_icc_node *qn, u64 sum_bw)
|
||||
static int qcom_icc_rpm_set(struct qcom_icc_node *qn, u64 *bw)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret, rpm_ctx = 0;
|
||||
u64 bw_bps;
|
||||
|
||||
if (qn->qos.ap_owned)
|
||||
return 0;
|
||||
|
||||
if (qn->mas_rpm_id != -1) {
|
||||
ret = qcom_icc_rpm_smd_send(QCOM_SMD_RPM_ACTIVE_STATE,
|
||||
RPM_BUS_MASTER_REQ,
|
||||
qn->mas_rpm_id,
|
||||
sum_bw);
|
||||
if (ret) {
|
||||
pr_err("qcom_icc_rpm_smd_send mas %d error %d\n",
|
||||
qn->mas_rpm_id, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
for (rpm_ctx = 0; rpm_ctx < QCOM_SMD_RPM_STATE_NUM; rpm_ctx++) {
|
||||
bw_bps = icc_units_to_bps(bw[rpm_ctx]);
|
||||
|
||||
if (qn->slv_rpm_id != -1) {
|
||||
ret = qcom_icc_rpm_smd_send(QCOM_SMD_RPM_ACTIVE_STATE,
|
||||
RPM_BUS_SLAVE_REQ,
|
||||
qn->slv_rpm_id,
|
||||
sum_bw);
|
||||
if (ret) {
|
||||
pr_err("qcom_icc_rpm_smd_send slv %d error %d\n",
|
||||
qn->slv_rpm_id, ret);
|
||||
return ret;
|
||||
if (qn->mas_rpm_id != -1) {
|
||||
ret = qcom_icc_rpm_smd_send(rpm_ctx,
|
||||
RPM_BUS_MASTER_REQ,
|
||||
qn->mas_rpm_id,
|
||||
bw_bps);
|
||||
if (ret) {
|
||||
pr_err("qcom_icc_rpm_smd_send mas %d error %d\n",
|
||||
qn->mas_rpm_id, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (qn->slv_rpm_id != -1) {
|
||||
ret = qcom_icc_rpm_smd_send(rpm_ctx,
|
||||
RPM_BUS_SLAVE_REQ,
|
||||
qn->slv_rpm_id,
|
||||
bw_bps);
|
||||
if (ret) {
|
||||
pr_err("qcom_icc_rpm_smd_send slv %d error %d\n",
|
||||
qn->slv_rpm_id, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -248,7 +253,7 @@ static void qcom_icc_pre_bw_aggregate(struct icc_node *node)
|
|||
size_t i;
|
||||
|
||||
qn = node->data;
|
||||
for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
|
||||
for (i = 0; i < QCOM_SMD_RPM_STATE_NUM; i++) {
|
||||
qn->sum_avg[i] = 0;
|
||||
qn->max_peak[i] = 0;
|
||||
}
|
||||
|
|
@ -272,9 +277,9 @@ static int qcom_icc_bw_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
|
|||
qn = node->data;
|
||||
|
||||
if (!tag)
|
||||
tag = QCOM_ICC_TAG_ALWAYS;
|
||||
tag = RPM_ALWAYS_TAG;
|
||||
|
||||
for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
|
||||
for (i = 0; i < QCOM_SMD_RPM_STATE_NUM; i++) {
|
||||
if (tag & BIT(i)) {
|
||||
qn->sum_avg[i] += avg_bw;
|
||||
qn->max_peak[i] = max_t(u32, qn->max_peak[i], peak_bw);
|
||||
|
|
@ -287,61 +292,45 @@ static int qcom_icc_bw_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
|
|||
}
|
||||
|
||||
/**
|
||||
* qcom_icc_bus_aggregate - aggregate bandwidth by traversing all nodes
|
||||
* qcom_icc_bus_aggregate - calculate bus clock rates by traversing all nodes
|
||||
* @provider: generic interconnect provider
|
||||
* @agg_avg: an array for aggregated average bandwidth of buckets
|
||||
* @agg_peak: an array for aggregated peak bandwidth of buckets
|
||||
* @max_agg_avg: pointer to max value of aggregated average bandwidth
|
||||
* @agg_clk_rate: array containing the aggregated clock rates in kHz
|
||||
*/
|
||||
static void qcom_icc_bus_aggregate(struct icc_provider *provider,
|
||||
u64 *agg_avg, u64 *agg_peak,
|
||||
u64 *max_agg_avg)
|
||||
static void qcom_icc_bus_aggregate(struct icc_provider *provider, u64 *agg_clk_rate)
|
||||
{
|
||||
struct icc_node *node;
|
||||
u64 agg_avg_rate, agg_rate;
|
||||
struct qcom_icc_node *qn;
|
||||
u64 sum_avg[QCOM_ICC_NUM_BUCKETS];
|
||||
struct icc_node *node;
|
||||
int i;
|
||||
|
||||
/* Initialise aggregate values */
|
||||
for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
|
||||
agg_avg[i] = 0;
|
||||
agg_peak[i] = 0;
|
||||
}
|
||||
|
||||
*max_agg_avg = 0;
|
||||
|
||||
/*
|
||||
* Iterate nodes on the interconnect and aggregate bandwidth
|
||||
* requests for every bucket.
|
||||
* Iterate nodes on the provider, aggregate bandwidth requests for
|
||||
* every bucket and convert them into bus clock rates.
|
||||
*/
|
||||
list_for_each_entry(node, &provider->nodes, node_list) {
|
||||
qn = node->data;
|
||||
for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
|
||||
for (i = 0; i < QCOM_SMD_RPM_STATE_NUM; i++) {
|
||||
if (qn->channels)
|
||||
sum_avg[i] = div_u64(qn->sum_avg[i], qn->channels);
|
||||
agg_avg_rate = div_u64(qn->sum_avg[i], qn->channels);
|
||||
else
|
||||
sum_avg[i] = qn->sum_avg[i];
|
||||
agg_avg[i] += sum_avg[i];
|
||||
agg_peak[i] = max_t(u64, agg_peak[i], qn->max_peak[i]);
|
||||
agg_avg_rate = qn->sum_avg[i];
|
||||
|
||||
agg_rate = max_t(u64, agg_avg_rate, qn->max_peak[i]);
|
||||
do_div(agg_rate, qn->buswidth);
|
||||
|
||||
agg_clk_rate[i] = max_t(u64, agg_clk_rate[i], agg_rate);
|
||||
}
|
||||
}
|
||||
|
||||
/* Find maximum values across all buckets */
|
||||
for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++)
|
||||
*max_agg_avg = max_t(u64, *max_agg_avg, agg_avg[i]);
|
||||
}
|
||||
|
||||
static int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
|
||||
{
|
||||
struct qcom_icc_provider *qp;
|
||||
struct qcom_icc_node *src_qn = NULL, *dst_qn = NULL;
|
||||
u64 agg_clk_rate[QCOM_SMD_RPM_STATE_NUM] = { 0 };
|
||||
struct icc_provider *provider;
|
||||
u64 sum_bw;
|
||||
u64 rate;
|
||||
u64 agg_avg[QCOM_ICC_NUM_BUCKETS], agg_peak[QCOM_ICC_NUM_BUCKETS];
|
||||
u64 max_agg_avg;
|
||||
int ret, i;
|
||||
int bucket;
|
||||
struct qcom_icc_provider *qp;
|
||||
u64 active_rate, sleep_rate;
|
||||
int ret;
|
||||
|
||||
src_qn = src->data;
|
||||
if (dst)
|
||||
|
|
@ -349,56 +338,66 @@ static int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
|
|||
provider = src->provider;
|
||||
qp = to_qcom_provider(provider);
|
||||
|
||||
qcom_icc_bus_aggregate(provider, agg_avg, agg_peak, &max_agg_avg);
|
||||
qcom_icc_bus_aggregate(provider, agg_clk_rate);
|
||||
active_rate = agg_clk_rate[QCOM_SMD_RPM_ACTIVE_STATE];
|
||||
sleep_rate = agg_clk_rate[QCOM_SMD_RPM_SLEEP_STATE];
|
||||
|
||||
sum_bw = icc_units_to_bps(max_agg_avg);
|
||||
|
||||
ret = qcom_icc_rpm_set(src_qn, sum_bw);
|
||||
ret = qcom_icc_rpm_set(src_qn, src_qn->sum_avg);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (dst_qn) {
|
||||
ret = qcom_icc_rpm_set(dst_qn, sum_bw);
|
||||
ret = qcom_icc_rpm_set(dst_qn, dst_qn->sum_avg);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (i = 0; i < qp->num_bus_clks; i++) {
|
||||
/*
|
||||
* Use WAKE bucket for active clock, otherwise, use SLEEP bucket
|
||||
* for other clocks. If a platform doesn't set interconnect
|
||||
* path tags, by default use sleep bucket for all clocks.
|
||||
*
|
||||
* Note, AMC bucket is not supported yet.
|
||||
*/
|
||||
if (!strcmp(qp->bus_clks[i].id, "bus_a"))
|
||||
bucket = QCOM_ICC_BUCKET_WAKE;
|
||||
else
|
||||
bucket = QCOM_ICC_BUCKET_SLEEP;
|
||||
/* Some providers don't have a bus clock to scale */
|
||||
if (!qp->bus_clk_desc && !qp->bus_clk)
|
||||
return 0;
|
||||
|
||||
rate = icc_units_to_bps(max(agg_avg[bucket], agg_peak[bucket]));
|
||||
do_div(rate, src_qn->buswidth);
|
||||
rate = min_t(u64, rate, LONG_MAX);
|
||||
/*
|
||||
* Downstream checks whether the requested rate is zero, but it makes little sense
|
||||
* to vote for a value that's below the lower threshold, so let's not do so.
|
||||
*/
|
||||
if (qp->keep_alive)
|
||||
active_rate = max(ICC_BUS_CLK_MIN_RATE, active_rate);
|
||||
|
||||
if (qp->bus_clk_rate[i] == rate)
|
||||
continue;
|
||||
/* Some providers have a non-RPM-owned bus clock - convert kHz->Hz for the CCF */
|
||||
if (qp->bus_clk) {
|
||||
active_rate = max_t(u64, active_rate, sleep_rate);
|
||||
/* ARM32 caps clk_set_rate arg to u32.. Nothing we can do about that! */
|
||||
active_rate = min_t(u64, 1000ULL * active_rate, ULONG_MAX);
|
||||
return clk_set_rate(qp->bus_clk, active_rate);
|
||||
}
|
||||
|
||||
ret = clk_set_rate(qp->bus_clks[i].clk, rate);
|
||||
if (ret) {
|
||||
pr_err("%s clk_set_rate error: %d\n",
|
||||
qp->bus_clks[i].id, ret);
|
||||
/* RPM only accepts <=INT_MAX rates */
|
||||
active_rate = min_t(u64, active_rate, INT_MAX);
|
||||
sleep_rate = min_t(u64, sleep_rate, INT_MAX);
|
||||
|
||||
if (active_rate != qp->bus_clk_rate[QCOM_SMD_RPM_ACTIVE_STATE]) {
|
||||
ret = qcom_icc_rpm_set_bus_rate(qp->bus_clk_desc, QCOM_SMD_RPM_ACTIVE_STATE,
|
||||
active_rate);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
qp->bus_clk_rate[i] = rate;
|
||||
|
||||
/* Cache the rate after we've successfully commited it to RPM */
|
||||
qp->bus_clk_rate[QCOM_SMD_RPM_ACTIVE_STATE] = active_rate;
|
||||
}
|
||||
|
||||
if (sleep_rate != qp->bus_clk_rate[QCOM_SMD_RPM_SLEEP_STATE]) {
|
||||
ret = qcom_icc_rpm_set_bus_rate(qp->bus_clk_desc, QCOM_SMD_RPM_SLEEP_STATE,
|
||||
sleep_rate);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Cache the rate after we've successfully commited it to RPM */
|
||||
qp->bus_clk_rate[QCOM_SMD_RPM_SLEEP_STATE] = sleep_rate;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const char * const bus_clocks[] = {
|
||||
"bus", "bus_a",
|
||||
};
|
||||
|
||||
int qnoc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
|
|
@ -440,6 +439,20 @@ int qnoc_probe(struct platform_device *pdev)
|
|||
if (!qp->intf_clks)
|
||||
return -ENOMEM;
|
||||
|
||||
if (desc->bus_clk_desc) {
|
||||
qp->bus_clk_desc = devm_kzalloc(dev, sizeof(*qp->bus_clk_desc),
|
||||
GFP_KERNEL);
|
||||
if (!qp->bus_clk_desc)
|
||||
return -ENOMEM;
|
||||
|
||||
qp->bus_clk_desc = desc->bus_clk_desc;
|
||||
} else {
|
||||
/* Some older SoCs may have a single non-RPM-owned bus clock. */
|
||||
qp->bus_clk = devm_clk_get_optional(dev, "bus");
|
||||
if (IS_ERR(qp->bus_clk))
|
||||
return PTR_ERR(qp->bus_clk);
|
||||
}
|
||||
|
||||
data = devm_kzalloc(dev, struct_size(data, nodes, num_nodes),
|
||||
GFP_KERNEL);
|
||||
if (!data)
|
||||
|
|
@ -449,10 +462,7 @@ int qnoc_probe(struct platform_device *pdev)
|
|||
for (i = 0; i < cd_num; i++)
|
||||
qp->intf_clks[i].id = cds[i];
|
||||
|
||||
qp->num_bus_clks = desc->no_clk_scaling ? 0 : NUM_BUS_CLKS;
|
||||
for (i = 0; i < qp->num_bus_clks; i++)
|
||||
qp->bus_clks[i].id = bus_clocks[i];
|
||||
|
||||
qp->keep_alive = desc->keep_alive;
|
||||
qp->type = desc->type;
|
||||
qp->qos_offset = desc->qos_offset;
|
||||
|
||||
|
|
@ -481,11 +491,7 @@ int qnoc_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
regmap_done:
|
||||
ret = devm_clk_bulk_get(dev, qp->num_bus_clks, qp->bus_clks);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = clk_bulk_prepare_enable(qp->num_bus_clks, qp->bus_clks);
|
||||
ret = clk_prepare_enable(qp->bus_clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
@ -557,7 +563,7 @@ int qnoc_probe(struct platform_device *pdev)
|
|||
icc_provider_deregister(provider);
|
||||
err_remove_nodes:
|
||||
icc_nodes_remove(provider);
|
||||
clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks);
|
||||
clk_disable_unprepare(qp->bus_clk);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -569,7 +575,7 @@ int qnoc_remove(struct platform_device *pdev)
|
|||
|
||||
icc_provider_deregister(&qp->provider);
|
||||
icc_nodes_remove(&qp->provider);
|
||||
clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks);
|
||||
clk_disable_unprepare(qp->bus_clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,12 @@
|
|||
#ifndef __DRIVERS_INTERCONNECT_QCOM_ICC_RPM_H
|
||||
#define __DRIVERS_INTERCONNECT_QCOM_ICC_RPM_H
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,icc.h>
|
||||
#include <linux/soc/qcom/smd-rpm.h>
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,rpm-icc.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#define RPM_BUS_MASTER_REQ 0x73616d62
|
||||
#define RPM_BUS_SLAVE_REQ 0x766c7362
|
||||
|
|
@ -20,31 +25,43 @@ enum qcom_icc_type {
|
|||
QCOM_ICC_QNOC,
|
||||
};
|
||||
|
||||
#define NUM_BUS_CLKS 2
|
||||
/**
|
||||
* struct rpm_clk_resource - RPM bus clock resource
|
||||
* @resource_type: RPM resource type of the clock resource
|
||||
* @clock_id: index of the clock resource of a specific resource type
|
||||
* @branch: whether the resource represents a branch clock
|
||||
*/
|
||||
struct rpm_clk_resource {
|
||||
u32 resource_type;
|
||||
u32 clock_id;
|
||||
bool branch;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct qcom_icc_provider - Qualcomm specific interconnect provider
|
||||
* @provider: generic interconnect provider
|
||||
* @num_bus_clks: the total number of bus_clks clk_bulk_data entries (0 or 2)
|
||||
* @num_intf_clks: the total number of intf_clks clk_bulk_data entries
|
||||
* @type: the ICC provider type
|
||||
* @regmap: regmap for QoS registers read/write access
|
||||
* @qos_offset: offset to QoS registers
|
||||
* @bus_clk_rate: bus clock rate in Hz
|
||||
* @bus_clks: the clk_bulk_data table of bus clocks
|
||||
* @bus_clk_desc: a pointer to a rpm_clk_resource description of bus clocks
|
||||
* @bus_clk: a pointer to a HLOS-owned bus clock
|
||||
* @intf_clks: a clk_bulk_data array of interface clocks
|
||||
* @keep_alive: whether to always keep a minimum vote on the bus clocks
|
||||
* @is_on: whether the bus is powered on
|
||||
*/
|
||||
struct qcom_icc_provider {
|
||||
struct icc_provider provider;
|
||||
int num_bus_clks;
|
||||
int num_intf_clks;
|
||||
enum qcom_icc_type type;
|
||||
struct regmap *regmap;
|
||||
unsigned int qos_offset;
|
||||
u64 bus_clk_rate[NUM_BUS_CLKS];
|
||||
struct clk_bulk_data bus_clks[NUM_BUS_CLKS];
|
||||
u32 bus_clk_rate[QCOM_SMD_RPM_STATE_NUM];
|
||||
const struct rpm_clk_resource *bus_clk_desc;
|
||||
struct clk *bus_clk;
|
||||
struct clk_bulk_data *intf_clks;
|
||||
bool keep_alive;
|
||||
bool is_on;
|
||||
};
|
||||
|
||||
|
|
@ -89,8 +106,8 @@ struct qcom_icc_node {
|
|||
u16 num_links;
|
||||
u16 channels;
|
||||
u16 buswidth;
|
||||
u64 sum_avg[QCOM_ICC_NUM_BUCKETS];
|
||||
u64 max_peak[QCOM_ICC_NUM_BUCKETS];
|
||||
u64 sum_avg[QCOM_SMD_RPM_STATE_NUM];
|
||||
u64 max_peak[QCOM_SMD_RPM_STATE_NUM];
|
||||
int mas_rpm_id;
|
||||
int slv_rpm_id;
|
||||
struct qcom_icc_qos qos;
|
||||
|
|
@ -99,10 +116,10 @@ struct qcom_icc_node {
|
|||
struct qcom_icc_desc {
|
||||
struct qcom_icc_node * const *nodes;
|
||||
size_t num_nodes;
|
||||
const char * const *bus_clocks;
|
||||
const struct rpm_clk_resource *bus_clk_desc;
|
||||
const char * const *intf_clocks;
|
||||
size_t num_intf_clocks;
|
||||
bool no_clk_scaling;
|
||||
bool keep_alive;
|
||||
enum qcom_icc_type type;
|
||||
const struct regmap_config *regmap_cfg;
|
||||
unsigned int qos_offset;
|
||||
|
|
@ -115,7 +132,24 @@ enum qos_mode {
|
|||
NOC_QOS_MODE_BYPASS,
|
||||
};
|
||||
|
||||
extern const struct rpm_clk_resource aggre1_clk;
|
||||
extern const struct rpm_clk_resource aggre2_clk;
|
||||
extern const struct rpm_clk_resource bimc_clk;
|
||||
extern const struct rpm_clk_resource bus_0_clk;
|
||||
extern const struct rpm_clk_resource bus_1_clk;
|
||||
extern const struct rpm_clk_resource bus_2_clk;
|
||||
extern const struct rpm_clk_resource mmaxi_0_clk;
|
||||
extern const struct rpm_clk_resource mmaxi_1_clk;
|
||||
extern const struct rpm_clk_resource qup_clk;
|
||||
|
||||
extern const struct rpm_clk_resource aggre1_branch_clk;
|
||||
extern const struct rpm_clk_resource aggre2_branch_clk;
|
||||
|
||||
int qnoc_probe(struct platform_device *pdev);
|
||||
int qnoc_remove(struct platform_device *pdev);
|
||||
|
||||
bool qcom_icc_rpm_smd_available(void);
|
||||
int qcom_icc_rpm_smd_send(int ctx, int rsc_type, int id, u32 val);
|
||||
int qcom_icc_rpm_set_bus_rate(const struct rpm_clk_resource *clk, int ctx, u32 rate);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
* Author: Georgi Djakov <georgi.djakov@linaro.org>
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
|
|
@ -15,7 +14,6 @@
|
|||
|
||||
#include <dt-bindings/interconnect/qcom,msm8916.h>
|
||||
|
||||
#include "smd-rpm.h"
|
||||
#include "icc-rpm.h"
|
||||
|
||||
enum {
|
||||
|
|
@ -1232,6 +1230,7 @@ static const struct qcom_icc_desc msm8916_snoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = msm8916_snoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8916_snoc_nodes),
|
||||
.bus_clk_desc = &bus_1_clk,
|
||||
.regmap_cfg = &msm8916_snoc_regmap_config,
|
||||
.qos_offset = 0x7000,
|
||||
};
|
||||
|
|
@ -1260,6 +1259,7 @@ static const struct qcom_icc_desc msm8916_bimc = {
|
|||
.type = QCOM_ICC_BIMC,
|
||||
.nodes = msm8916_bimc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8916_bimc_nodes),
|
||||
.bus_clk_desc = &bimc_clk,
|
||||
.regmap_cfg = &msm8916_bimc_regmap_config,
|
||||
.qos_offset = 0x8000,
|
||||
};
|
||||
|
|
@ -1329,6 +1329,7 @@ static const struct qcom_icc_desc msm8916_pcnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = msm8916_pcnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8916_pcnoc_nodes),
|
||||
.bus_clk_desc = &bus_0_clk,
|
||||
.regmap_cfg = &msm8916_pcnoc_regmap_config,
|
||||
.qos_offset = 0x7000,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
* With reference of msm8916 interconnect driver of Georgi Djakov.
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
|
|
@ -16,7 +15,6 @@
|
|||
|
||||
#include <dt-bindings/interconnect/qcom,msm8939.h>
|
||||
|
||||
#include "smd-rpm.h"
|
||||
#include "icc-rpm.h"
|
||||
|
||||
enum {
|
||||
|
|
@ -1285,6 +1283,7 @@ static const struct qcom_icc_desc msm8939_snoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = msm8939_snoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8939_snoc_nodes),
|
||||
.bus_clk_desc = &bus_1_clk,
|
||||
.regmap_cfg = &msm8939_snoc_regmap_config,
|
||||
.qos_offset = 0x7000,
|
||||
};
|
||||
|
|
@ -1305,6 +1304,7 @@ static const struct qcom_icc_desc msm8939_snoc_mm = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = msm8939_snoc_mm_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8939_snoc_mm_nodes),
|
||||
.bus_clk_desc = &bus_2_clk,
|
||||
.regmap_cfg = &msm8939_snoc_regmap_config,
|
||||
.qos_offset = 0x7000,
|
||||
};
|
||||
|
|
@ -1333,6 +1333,7 @@ static const struct qcom_icc_desc msm8939_bimc = {
|
|||
.type = QCOM_ICC_BIMC,
|
||||
.nodes = msm8939_bimc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8939_bimc_nodes),
|
||||
.bus_clk_desc = &bimc_clk,
|
||||
.regmap_cfg = &msm8939_bimc_regmap_config,
|
||||
.qos_offset = 0x8000,
|
||||
};
|
||||
|
|
@ -1404,6 +1405,7 @@ static const struct qcom_icc_desc msm8939_pcnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = msm8939_pcnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(msm8939_pcnoc_nodes),
|
||||
.bus_clk_desc = &bus_0_clk,
|
||||
.regmap_cfg = &msm8939_pcnoc_regmap_config,
|
||||
.qos_offset = 0x7000,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "smd-rpm.h"
|
||||
#include "icc-rpm.h"
|
||||
|
||||
enum {
|
||||
MSM8974_BIMC_MAS_AMPSS_M0 = 1,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
* Copyright (c) 2021 Yassine Oudjana <y.oudjana@protonmail.com>
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
|
|
@ -18,7 +17,6 @@
|
|||
#include <dt-bindings/interconnect/qcom,msm8996.h>
|
||||
|
||||
#include "icc-rpm.h"
|
||||
#include "smd-rpm.h"
|
||||
#include "msm8996.h"
|
||||
|
||||
static const char * const mm_intf_clocks[] = {
|
||||
|
|
@ -1819,7 +1817,6 @@ static const struct qcom_icc_desc msm8996_a0noc = {
|
|||
.num_nodes = ARRAY_SIZE(a0noc_nodes),
|
||||
.intf_clocks = a0noc_intf_clocks,
|
||||
.num_intf_clocks = ARRAY_SIZE(a0noc_intf_clocks),
|
||||
.no_clk_scaling = true,
|
||||
.regmap_cfg = &msm8996_a0noc_regmap_config
|
||||
};
|
||||
|
||||
|
|
@ -1841,6 +1838,7 @@ static const struct qcom_icc_desc msm8996_a1noc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = a1noc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(a1noc_nodes),
|
||||
.bus_clk_desc = &aggre1_branch_clk,
|
||||
.regmap_cfg = &msm8996_a1noc_regmap_config
|
||||
};
|
||||
|
||||
|
|
@ -1862,6 +1860,7 @@ static const struct qcom_icc_desc msm8996_a2noc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = a2noc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(a2noc_nodes),
|
||||
.bus_clk_desc = &aggre2_branch_clk,
|
||||
.intf_clocks = a2noc_intf_clocks,
|
||||
.num_intf_clocks = ARRAY_SIZE(a2noc_intf_clocks),
|
||||
.regmap_cfg = &msm8996_a2noc_regmap_config
|
||||
|
|
@ -1890,6 +1889,7 @@ static const struct qcom_icc_desc msm8996_bimc = {
|
|||
.type = QCOM_ICC_BIMC,
|
||||
.nodes = bimc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(bimc_nodes),
|
||||
.bus_clk_desc = &bimc_clk,
|
||||
.regmap_cfg = &msm8996_bimc_regmap_config
|
||||
};
|
||||
|
||||
|
|
@ -1948,6 +1948,7 @@ static const struct qcom_icc_desc msm8996_cnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = cnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(cnoc_nodes),
|
||||
.bus_clk_desc = &bus_2_clk,
|
||||
.regmap_cfg = &msm8996_cnoc_regmap_config
|
||||
};
|
||||
|
||||
|
|
@ -2001,6 +2002,7 @@ static const struct qcom_icc_desc msm8996_mnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = mnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(mnoc_nodes),
|
||||
.bus_clk_desc = &mmaxi_0_clk,
|
||||
.intf_clocks = mm_intf_clocks,
|
||||
.num_intf_clocks = ARRAY_SIZE(mm_intf_clocks),
|
||||
.regmap_cfg = &msm8996_mnoc_regmap_config
|
||||
|
|
@ -2039,6 +2041,7 @@ static const struct qcom_icc_desc msm8996_pnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = pnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(pnoc_nodes),
|
||||
.bus_clk_desc = &bus_0_clk,
|
||||
.regmap_cfg = &msm8996_pnoc_regmap_config
|
||||
};
|
||||
|
||||
|
|
@ -2083,6 +2086,7 @@ static const struct qcom_icc_desc msm8996_snoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = snoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(snoc_nodes),
|
||||
.bus_clk_desc = &bus_1_clk,
|
||||
.regmap_cfg = &msm8996_snoc_regmap_config
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,qcm2290.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
|
|
@ -19,7 +18,6 @@
|
|||
#include <linux/slab.h>
|
||||
|
||||
#include "icc-rpm.h"
|
||||
#include "smd-rpm.h"
|
||||
|
||||
enum {
|
||||
QCM2290_MASTER_APPSS_PROC = 1,
|
||||
|
|
@ -1197,6 +1195,7 @@ static const struct qcom_icc_desc qcm2290_bimc = {
|
|||
.type = QCOM_ICC_BIMC,
|
||||
.nodes = qcm2290_bimc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcm2290_bimc_nodes),
|
||||
.bus_clk_desc = &bimc_clk,
|
||||
.regmap_cfg = &qcm2290_bimc_regmap_config,
|
||||
/* M_REG_BASE() in vendor msm_bus_bimc_adhoc driver */
|
||||
.qos_offset = 0x8000,
|
||||
|
|
@ -1252,6 +1251,7 @@ static const struct qcom_icc_desc qcm2290_cnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = qcm2290_cnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcm2290_cnoc_nodes),
|
||||
.bus_clk_desc = &bus_1_clk,
|
||||
.regmap_cfg = &qcm2290_cnoc_regmap_config,
|
||||
};
|
||||
|
||||
|
|
@ -1293,6 +1293,7 @@ static const struct qcom_icc_desc qcm2290_snoc = {
|
|||
.type = QCOM_ICC_QNOC,
|
||||
.nodes = qcm2290_snoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcm2290_snoc_nodes),
|
||||
.bus_clk_desc = &bus_2_clk,
|
||||
.regmap_cfg = &qcm2290_snoc_regmap_config,
|
||||
/* Vendor DT node fab-sys_noc property 'qcom,base-offset' */
|
||||
.qos_offset = 0x15000,
|
||||
|
|
@ -1307,6 +1308,7 @@ static const struct qcom_icc_desc qcm2290_qup_virt = {
|
|||
.type = QCOM_ICC_QNOC,
|
||||
.nodes = qcm2290_qup_virt_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcm2290_qup_virt_nodes),
|
||||
.bus_clk_desc = &qup_clk,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node * const qcm2290_mmnrt_virt_nodes[] = {
|
||||
|
|
@ -1320,6 +1322,7 @@ static const struct qcom_icc_desc qcm2290_mmnrt_virt = {
|
|||
.type = QCOM_ICC_QNOC,
|
||||
.nodes = qcm2290_mmnrt_virt_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcm2290_mmnrt_virt_nodes),
|
||||
.bus_clk_desc = &mmaxi_0_clk,
|
||||
.regmap_cfg = &qcm2290_snoc_regmap_config,
|
||||
.qos_offset = 0x15000,
|
||||
};
|
||||
|
|
@ -1334,6 +1337,7 @@ static const struct qcom_icc_desc qcm2290_mmrt_virt = {
|
|||
.type = QCOM_ICC_QNOC,
|
||||
.nodes = qcm2290_mmrt_virt_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcm2290_mmrt_virt_nodes),
|
||||
.bus_clk_desc = &mmaxi_1_clk,
|
||||
.regmap_cfg = &qcm2290_snoc_regmap_config,
|
||||
.qos_offset = 0x15000,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,qcs404.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
|
|
@ -13,7 +12,6 @@
|
|||
#include <linux/of_device.h>
|
||||
|
||||
|
||||
#include "smd-rpm.h"
|
||||
#include "icc-rpm.h"
|
||||
|
||||
enum {
|
||||
|
|
@ -985,6 +983,7 @@ static struct qcom_icc_node * const qcs404_bimc_nodes[] = {
|
|||
};
|
||||
|
||||
static const struct qcom_icc_desc qcs404_bimc = {
|
||||
.bus_clk_desc = &bimc_clk,
|
||||
.nodes = qcs404_bimc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcs404_bimc_nodes),
|
||||
};
|
||||
|
|
@ -1039,6 +1038,7 @@ static struct qcom_icc_node * const qcs404_pcnoc_nodes[] = {
|
|||
};
|
||||
|
||||
static const struct qcom_icc_desc qcs404_pcnoc = {
|
||||
.bus_clk_desc = &bus_0_clk,
|
||||
.nodes = qcs404_pcnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcs404_pcnoc_nodes),
|
||||
};
|
||||
|
|
@ -1067,6 +1067,7 @@ static struct qcom_icc_node * const qcs404_snoc_nodes[] = {
|
|||
};
|
||||
|
||||
static const struct qcom_icc_desc qcs404_snoc = {
|
||||
.bus_clk_desc = &bus_1_clk,
|
||||
.nodes = qcs404_snoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(qcs404_snoc_nodes),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,sdm660.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interconnect-provider.h>
|
||||
#include <linux/io.h>
|
||||
|
|
@ -17,7 +16,6 @@
|
|||
#include <linux/slab.h>
|
||||
|
||||
#include "icc-rpm.h"
|
||||
#include "smd-rpm.h"
|
||||
|
||||
enum {
|
||||
SDM660_MASTER_IPA = 1,
|
||||
|
|
@ -1512,6 +1510,7 @@ static const struct qcom_icc_desc sdm660_a2noc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = sdm660_a2noc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(sdm660_a2noc_nodes),
|
||||
.bus_clk_desc = &aggre2_clk,
|
||||
.intf_clocks = a2noc_intf_clocks,
|
||||
.num_intf_clocks = ARRAY_SIZE(a2noc_intf_clocks),
|
||||
.regmap_cfg = &sdm660_a2noc_regmap_config,
|
||||
|
|
@ -1540,6 +1539,7 @@ static const struct qcom_icc_desc sdm660_bimc = {
|
|||
.type = QCOM_ICC_BIMC,
|
||||
.nodes = sdm660_bimc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(sdm660_bimc_nodes),
|
||||
.bus_clk_desc = &bimc_clk,
|
||||
.regmap_cfg = &sdm660_bimc_regmap_config,
|
||||
};
|
||||
|
||||
|
|
@ -1594,6 +1594,7 @@ static const struct qcom_icc_desc sdm660_cnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = sdm660_cnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(sdm660_cnoc_nodes),
|
||||
.bus_clk_desc = &bus_2_clk,
|
||||
.regmap_cfg = &sdm660_cnoc_regmap_config,
|
||||
};
|
||||
|
||||
|
|
@ -1616,7 +1617,6 @@ static const struct qcom_icc_desc sdm660_gnoc = {
|
|||
.nodes = sdm660_gnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(sdm660_gnoc_nodes),
|
||||
.regmap_cfg = &sdm660_gnoc_regmap_config,
|
||||
.no_clk_scaling = true,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node * const sdm660_mnoc_nodes[] = {
|
||||
|
|
@ -1656,6 +1656,7 @@ static const struct qcom_icc_desc sdm660_mnoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = sdm660_mnoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(sdm660_mnoc_nodes),
|
||||
.bus_clk_desc = &mmaxi_0_clk,
|
||||
.intf_clocks = mm_intf_clocks,
|
||||
.num_intf_clocks = ARRAY_SIZE(mm_intf_clocks),
|
||||
.regmap_cfg = &sdm660_mnoc_regmap_config,
|
||||
|
|
@ -1693,6 +1694,7 @@ static const struct qcom_icc_desc sdm660_snoc = {
|
|||
.type = QCOM_ICC_NOC,
|
||||
.nodes = sdm660_snoc_nodes,
|
||||
.num_nodes = ARRAY_SIZE(sdm660_snoc_nodes),
|
||||
.bus_clk_desc = &bus_1_clk,
|
||||
.regmap_cfg = &sdm660_snoc_regmap_config,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -13,9 +13,10 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/soc/qcom/smd-rpm.h>
|
||||
|
||||
#include "smd-rpm.h"
|
||||
#include "icc-rpm.h"
|
||||
|
||||
#define RPM_KEY_BW 0x00007762
|
||||
#define QCOM_RPM_SMD_KEY_RATE 0x007a484b
|
||||
|
||||
static struct qcom_smd_rpm *icc_smd_rpm;
|
||||
|
||||
|
|
@ -44,6 +45,26 @@ int qcom_icc_rpm_smd_send(int ctx, int rsc_type, int id, u32 val)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_icc_rpm_smd_send);
|
||||
|
||||
int qcom_icc_rpm_set_bus_rate(const struct rpm_clk_resource *clk, int ctx, u32 rate)
|
||||
{
|
||||
struct clk_smd_rpm_req req = {
|
||||
.key = cpu_to_le32(QCOM_RPM_SMD_KEY_RATE),
|
||||
.nbytes = cpu_to_le32(sizeof(u32)),
|
||||
};
|
||||
|
||||
/* Branch clocks are only on/off */
|
||||
if (clk->branch)
|
||||
rate = !!rate;
|
||||
|
||||
req.value = cpu_to_le32(rate);
|
||||
return qcom_rpm_smd_write(icc_smd_rpm,
|
||||
ctx,
|
||||
clk->resource_type,
|
||||
clk->clock_id,
|
||||
&req, sizeof(req));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_icc_rpm_set_bus_rate);
|
||||
|
||||
static int qcom_icc_rpm_smd_remove(struct platform_device *pdev)
|
||||
{
|
||||
icc_smd_rpm = NULL;
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2019, Linaro Ltd.
|
||||
* Author: Georgi Djakov <georgi.djakov@linaro.org>
|
||||
*/
|
||||
|
||||
#ifndef __DRIVERS_INTERCONNECT_QCOM_SMD_RPM_H
|
||||
#define __DRIVERS_INTERCONNECT_QCOM_SMD_RPM_H
|
||||
|
||||
#include <linux/soc/qcom/smd-rpm.h>
|
||||
|
||||
bool qcom_icc_rpm_smd_available(void);
|
||||
int qcom_icc_rpm_smd_send(int ctx, int rsc_type, int id, u32 val);
|
||||
|
||||
#endif
|
||||
|
|
@ -19,7 +19,6 @@
|
|||
/**
|
||||
* struct qcom_smd_rpm - state of the rpm device driver
|
||||
* @rpm_channel: reference to the smd channel
|
||||
* @icc: interconnect proxy device
|
||||
* @dev: rpm device
|
||||
* @ack: completion for acks
|
||||
* @lock: mutual exclusion around the send/complete pair
|
||||
|
|
@ -27,7 +26,6 @@
|
|||
*/
|
||||
struct qcom_smd_rpm {
|
||||
struct rpmsg_endpoint *rpm_channel;
|
||||
struct platform_device *icc;
|
||||
struct device *dev;
|
||||
|
||||
struct completion ack;
|
||||
|
|
@ -197,7 +195,6 @@ static int qcom_smd_rpm_callback(struct rpmsg_device *rpdev,
|
|||
static int qcom_smd_rpm_probe(struct rpmsg_device *rpdev)
|
||||
{
|
||||
struct qcom_smd_rpm *rpm;
|
||||
int ret;
|
||||
|
||||
rpm = devm_kzalloc(&rpdev->dev, sizeof(*rpm), GFP_KERNEL);
|
||||
if (!rpm)
|
||||
|
|
@ -210,23 +207,11 @@ static int qcom_smd_rpm_probe(struct rpmsg_device *rpdev)
|
|||
rpm->rpm_channel = rpdev->ept;
|
||||
dev_set_drvdata(&rpdev->dev, rpm);
|
||||
|
||||
rpm->icc = platform_device_register_data(&rpdev->dev, "icc_smd_rpm", -1,
|
||||
NULL, 0);
|
||||
if (IS_ERR(rpm->icc))
|
||||
return PTR_ERR(rpm->icc);
|
||||
|
||||
ret = of_platform_populate(rpdev->dev.of_node, NULL, NULL, &rpdev->dev);
|
||||
if (ret)
|
||||
platform_device_unregister(rpm->icc);
|
||||
|
||||
return ret;
|
||||
return of_platform_populate(rpdev->dev.of_node, NULL, NULL, &rpdev->dev);
|
||||
}
|
||||
|
||||
static void qcom_smd_rpm_remove(struct rpmsg_device *rpdev)
|
||||
{
|
||||
struct qcom_smd_rpm *rpm = dev_get_drvdata(&rpdev->dev);
|
||||
|
||||
platform_device_unregister(rpm->icc);
|
||||
of_platform_depopulate(&rpdev->dev);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -165,5 +165,11 @@
|
|||
#define GCC_QDSS_BCR 69
|
||||
#define GCC_MPM_BCR 70
|
||||
#define GCC_SPDM_BCR 71
|
||||
#define ESS_MAC1_ARES 72
|
||||
#define ESS_MAC2_ARES 73
|
||||
#define ESS_MAC3_ARES 74
|
||||
#define ESS_MAC4_ARES 75
|
||||
#define ESS_MAC5_ARES 76
|
||||
#define ESS_PSGMII_ARES 77
|
||||
|
||||
#endif
|
||||
|
|
|
|||
183
include/dt-bindings/clock/qcom,gcc-ipq5018.h
Normal file
183
include/dt-bindings/clock/qcom,gcc-ipq5018.h
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (c) 2023, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLOCK_IPQ_GCC_5018_H
|
||||
#define _DT_BINDINGS_CLOCK_IPQ_GCC_5018_H
|
||||
|
||||
#define GPLL0_MAIN 0
|
||||
#define GPLL0 1
|
||||
#define GPLL2_MAIN 2
|
||||
#define GPLL2 3
|
||||
#define GPLL4_MAIN 4
|
||||
#define GPLL4 5
|
||||
#define UBI32_PLL_MAIN 6
|
||||
#define UBI32_PLL 7
|
||||
#define ADSS_PWM_CLK_SRC 8
|
||||
#define BLSP1_QUP1_I2C_APPS_CLK_SRC 9
|
||||
#define BLSP1_QUP1_SPI_APPS_CLK_SRC 10
|
||||
#define BLSP1_QUP2_I2C_APPS_CLK_SRC 11
|
||||
#define BLSP1_QUP2_SPI_APPS_CLK_SRC 12
|
||||
#define BLSP1_QUP3_I2C_APPS_CLK_SRC 13
|
||||
#define BLSP1_QUP3_SPI_APPS_CLK_SRC 14
|
||||
#define BLSP1_UART1_APPS_CLK_SRC 15
|
||||
#define BLSP1_UART2_APPS_CLK_SRC 16
|
||||
#define CRYPTO_CLK_SRC 17
|
||||
#define GCC_ADSS_PWM_CLK 18
|
||||
#define GCC_BLSP1_AHB_CLK 19
|
||||
#define GCC_BLSP1_QUP1_I2C_APPS_CLK 20
|
||||
#define GCC_BLSP1_QUP1_SPI_APPS_CLK 21
|
||||
#define GCC_BLSP1_QUP2_I2C_APPS_CLK 22
|
||||
#define GCC_BLSP1_QUP2_SPI_APPS_CLK 23
|
||||
#define GCC_BLSP1_QUP3_I2C_APPS_CLK 24
|
||||
#define GCC_BLSP1_QUP3_SPI_APPS_CLK 25
|
||||
#define GCC_BLSP1_UART1_APPS_CLK 26
|
||||
#define GCC_BLSP1_UART2_APPS_CLK 27
|
||||
#define GCC_BTSS_LPO_CLK 28
|
||||
#define GCC_CMN_BLK_AHB_CLK 29
|
||||
#define GCC_CMN_BLK_SYS_CLK 30
|
||||
#define GCC_CRYPTO_AHB_CLK 31
|
||||
#define GCC_CRYPTO_AXI_CLK 32
|
||||
#define GCC_CRYPTO_CLK 33
|
||||
#define GCC_CRYPTO_PPE_CLK 34
|
||||
#define GCC_DCC_CLK 35
|
||||
#define GCC_GEPHY_RX_CLK 36
|
||||
#define GCC_GEPHY_TX_CLK 37
|
||||
#define GCC_GMAC0_CFG_CLK 38
|
||||
#define GCC_GMAC0_PTP_CLK 39
|
||||
#define GCC_GMAC0_RX_CLK 40
|
||||
#define GCC_GMAC0_SYS_CLK 41
|
||||
#define GCC_GMAC0_TX_CLK 42
|
||||
#define GCC_GMAC1_CFG_CLK 43
|
||||
#define GCC_GMAC1_PTP_CLK 44
|
||||
#define GCC_GMAC1_RX_CLK 45
|
||||
#define GCC_GMAC1_SYS_CLK 46
|
||||
#define GCC_GMAC1_TX_CLK 47
|
||||
#define GCC_GP1_CLK 48
|
||||
#define GCC_GP2_CLK 49
|
||||
#define GCC_GP3_CLK 50
|
||||
#define GCC_LPASS_CORE_AXIM_CLK 51
|
||||
#define GCC_LPASS_SWAY_CLK 52
|
||||
#define GCC_MDIO0_AHB_CLK 53
|
||||
#define GCC_MDIO1_AHB_CLK 54
|
||||
#define GCC_PCIE0_AHB_CLK 55
|
||||
#define GCC_PCIE0_AUX_CLK 56
|
||||
#define GCC_PCIE0_AXI_M_CLK 57
|
||||
#define GCC_PCIE0_AXI_S_BRIDGE_CLK 58
|
||||
#define GCC_PCIE0_AXI_S_CLK 59
|
||||
#define GCC_PCIE0_PIPE_CLK 60
|
||||
#define GCC_PCIE1_AHB_CLK 61
|
||||
#define GCC_PCIE1_AUX_CLK 62
|
||||
#define GCC_PCIE1_AXI_M_CLK 63
|
||||
#define GCC_PCIE1_AXI_S_BRIDGE_CLK 64
|
||||
#define GCC_PCIE1_AXI_S_CLK 65
|
||||
#define GCC_PCIE1_PIPE_CLK 66
|
||||
#define GCC_PRNG_AHB_CLK 67
|
||||
#define GCC_Q6_AXIM_CLK 68
|
||||
#define GCC_Q6_AXIM2_CLK 69
|
||||
#define GCC_Q6_AXIS_CLK 70
|
||||
#define GCC_Q6_AHB_CLK 71
|
||||
#define GCC_Q6_AHB_S_CLK 72
|
||||
#define GCC_Q6_TSCTR_1TO2_CLK 73
|
||||
#define GCC_Q6SS_ATBM_CLK 74
|
||||
#define GCC_Q6SS_PCLKDBG_CLK 75
|
||||
#define GCC_Q6SS_TRIG_CLK 76
|
||||
#define GCC_QDSS_AT_CLK 77
|
||||
#define GCC_QDSS_CFG_AHB_CLK 78
|
||||
#define GCC_QDSS_DAP_AHB_CLK 79
|
||||
#define GCC_QDSS_DAP_CLK 80
|
||||
#define GCC_QDSS_ETR_USB_CLK 81
|
||||
#define GCC_QDSS_EUD_AT_CLK 82
|
||||
#define GCC_QDSS_STM_CLK 83
|
||||
#define GCC_QDSS_TRACECLKIN_CLK 84
|
||||
#define GCC_QDSS_TSCTR_DIV8_CLK 85
|
||||
#define GCC_QPIC_AHB_CLK 86
|
||||
#define GCC_QPIC_CLK 87
|
||||
#define GCC_QPIC_IO_MACRO_CLK 88
|
||||
#define GCC_SDCC1_AHB_CLK 89
|
||||
#define GCC_SDCC1_APPS_CLK 90
|
||||
#define GCC_SLEEP_CLK_SRC 91
|
||||
#define GCC_SNOC_GMAC0_AHB_CLK 92
|
||||
#define GCC_SNOC_GMAC0_AXI_CLK 93
|
||||
#define GCC_SNOC_GMAC1_AHB_CLK 94
|
||||
#define GCC_SNOC_GMAC1_AXI_CLK 95
|
||||
#define GCC_SNOC_LPASS_AXIM_CLK 96
|
||||
#define GCC_SNOC_LPASS_SWAY_CLK 97
|
||||
#define GCC_SNOC_UBI0_AXI_CLK 98
|
||||
#define GCC_SYS_NOC_PCIE0_AXI_CLK 99
|
||||
#define GCC_SYS_NOC_PCIE1_AXI_CLK 100
|
||||
#define GCC_SYS_NOC_QDSS_STM_AXI_CLK 101
|
||||
#define GCC_SYS_NOC_USB0_AXI_CLK 102
|
||||
#define GCC_SYS_NOC_WCSS_AHB_CLK 103
|
||||
#define GCC_UBI0_AXI_CLK 104
|
||||
#define GCC_UBI0_CFG_CLK 105
|
||||
#define GCC_UBI0_CORE_CLK 106
|
||||
#define GCC_UBI0_DBG_CLK 107
|
||||
#define GCC_UBI0_NC_AXI_CLK 108
|
||||
#define GCC_UBI0_UTCM_CLK 109
|
||||
#define GCC_UNIPHY_AHB_CLK 110
|
||||
#define GCC_UNIPHY_RX_CLK 111
|
||||
#define GCC_UNIPHY_SYS_CLK 112
|
||||
#define GCC_UNIPHY_TX_CLK 113
|
||||
#define GCC_USB0_AUX_CLK 114
|
||||
#define GCC_USB0_EUD_AT_CLK 115
|
||||
#define GCC_USB0_LFPS_CLK 116
|
||||
#define GCC_USB0_MASTER_CLK 117
|
||||
#define GCC_USB0_MOCK_UTMI_CLK 118
|
||||
#define GCC_USB0_PHY_CFG_AHB_CLK 119
|
||||
#define GCC_USB0_SLEEP_CLK 120
|
||||
#define GCC_WCSS_ACMT_CLK 121
|
||||
#define GCC_WCSS_AHB_S_CLK 122
|
||||
#define GCC_WCSS_AXI_M_CLK 123
|
||||
#define GCC_WCSS_AXI_S_CLK 124
|
||||
#define GCC_WCSS_DBG_IFC_APB_BDG_CLK 125
|
||||
#define GCC_WCSS_DBG_IFC_APB_CLK 126
|
||||
#define GCC_WCSS_DBG_IFC_ATB_BDG_CLK 127
|
||||
#define GCC_WCSS_DBG_IFC_ATB_CLK 128
|
||||
#define GCC_WCSS_DBG_IFC_DAPBUS_BDG_CLK 129
|
||||
#define GCC_WCSS_DBG_IFC_DAPBUS_CLK 130
|
||||
#define GCC_WCSS_DBG_IFC_NTS_BDG_CLK 131
|
||||
#define GCC_WCSS_DBG_IFC_NTS_CLK 132
|
||||
#define GCC_WCSS_ECAHB_CLK 133
|
||||
#define GCC_XO_CLK 134
|
||||
#define GCC_XO_CLK_SRC 135
|
||||
#define GMAC0_RX_CLK_SRC 136
|
||||
#define GMAC0_TX_CLK_SRC 137
|
||||
#define GMAC1_RX_CLK_SRC 138
|
||||
#define GMAC1_TX_CLK_SRC 139
|
||||
#define GMAC_CLK_SRC 140
|
||||
#define GP1_CLK_SRC 141
|
||||
#define GP2_CLK_SRC 142
|
||||
#define GP3_CLK_SRC 143
|
||||
#define LPASS_AXIM_CLK_SRC 144
|
||||
#define LPASS_SWAY_CLK_SRC 145
|
||||
#define PCIE0_AUX_CLK_SRC 146
|
||||
#define PCIE0_AXI_CLK_SRC 147
|
||||
#define PCIE1_AUX_CLK_SRC 148
|
||||
#define PCIE1_AXI_CLK_SRC 149
|
||||
#define PCNOC_BFDCD_CLK_SRC 150
|
||||
#define Q6_AXI_CLK_SRC 151
|
||||
#define QDSS_AT_CLK_SRC 152
|
||||
#define QDSS_STM_CLK_SRC 153
|
||||
#define QDSS_TSCTR_CLK_SRC 154
|
||||
#define QDSS_TRACECLKIN_CLK_SRC 155
|
||||
#define QPIC_IO_MACRO_CLK_SRC 156
|
||||
#define SDCC1_APPS_CLK_SRC 157
|
||||
#define SYSTEM_NOC_BFDCD_CLK_SRC 158
|
||||
#define UBI0_AXI_CLK_SRC 159
|
||||
#define UBI0_CORE_CLK_SRC 160
|
||||
#define USB0_AUX_CLK_SRC 161
|
||||
#define USB0_LFPS_CLK_SRC 162
|
||||
#define USB0_MASTER_CLK_SRC 163
|
||||
#define USB0_MOCK_UTMI_CLK_SRC 164
|
||||
#define WCSS_AHB_CLK_SRC 165
|
||||
#define PCIE0_PIPE_CLK_SRC 166
|
||||
#define PCIE1_PIPE_CLK_SRC 167
|
||||
#define USB0_PIPE_CLK_SRC 168
|
||||
#define GCC_USB0_PIPE_CLK 169
|
||||
#define GMAC0_RX_DIV_CLK_SRC 170
|
||||
#define GMAC0_TX_DIV_CLK_SRC 171
|
||||
#define GMAC1_RX_DIV_CLK_SRC 172
|
||||
#define GMAC1_TX_DIV_CLK_SRC 173
|
||||
#endif
|
||||
|
|
@ -169,6 +169,7 @@
|
|||
#define VFE0_CLK_SRC 162
|
||||
#define VFE1_CLK_SRC 163
|
||||
#define VSYNC_CLK_SRC 164
|
||||
#define GPLL0_SLEEP_CLK_SRC 165
|
||||
|
||||
/* GCC block resets */
|
||||
#define GCC_CAMSS_MICRO_BCR 0
|
||||
|
|
|
|||
|
|
@ -190,6 +190,9 @@
|
|||
#define AGGRE2_SNOC_NORTH_AXI 181
|
||||
#define SSC_XO 182
|
||||
#define SSC_CNOC_AHBS_CLK 183
|
||||
#define GCC_MMSS_GPLL0_DIV_CLK 184
|
||||
#define GCC_GPU_GPLL0_DIV_CLK 185
|
||||
#define GCC_GPU_GPLL0_CLK 186
|
||||
|
||||
#define PCIE_0_GDSC 0
|
||||
#define UFS_GDSC 1
|
||||
|
|
|
|||
|
|
@ -494,5 +494,15 @@
|
|||
#define USB30_SEC_GDSC 11
|
||||
#define EMAC_0_GDSC 12
|
||||
#define EMAC_1_GDSC 13
|
||||
#define USB4_1_GDSC 14
|
||||
#define USB4_GDSC 15
|
||||
#define HLOS1_VOTE_MMNOC_MMU_TBU_HF0_GDSC 16
|
||||
#define HLOS1_VOTE_MMNOC_MMU_TBU_HF1_GDSC 17
|
||||
#define HLOS1_VOTE_MMNOC_MMU_TBU_SF0_GDSC 18
|
||||
#define HLOS1_VOTE_MMNOC_MMU_TBU_SF1_GDSC 19
|
||||
#define HLOS1_VOTE_TURING_MMU_TBU0_GDSC 20
|
||||
#define HLOS1_VOTE_TURING_MMU_TBU1_GDSC 21
|
||||
#define HLOS1_VOTE_TURING_MMU_TBU2_GDSC 22
|
||||
#define HLOS1_VOTE_TURING_MMU_TBU3_GDSC 23
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -214,4 +214,6 @@
|
|||
#define GCC_CRYPTO_CLK 205
|
||||
#define GCC_CRYPTO_AXI_CLK 206
|
||||
#define GCC_CRYPTO_AHB_CLK 207
|
||||
#define GCC_USB0_PIPE_CLK 208
|
||||
#define GCC_USB0_SLEEP_CLK 209
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) BayLibre, SAS.
|
||||
* Author : Neil Armstrong <narmstrong@baylibre.com>
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_LCC_MDM9615_H
|
||||
#define _DT_BINDINGS_CLK_LCC_MDM9615_H
|
||||
|
||||
#define PLL4 0
|
||||
#define MI2S_OSR_SRC 1
|
||||
#define MI2S_OSR_CLK 2
|
||||
#define MI2S_DIV_CLK 3
|
||||
#define MI2S_BIT_DIV_CLK 4
|
||||
#define MI2S_BIT_CLK 5
|
||||
#define PCM_SRC 6
|
||||
#define PCM_CLK_OUT 7
|
||||
#define PCM_CLK 8
|
||||
#define SLIMBUS_SRC 9
|
||||
#define AUDIO_SLIMBUS_CLK 10
|
||||
#define SPS_SLIMBUS_CLK 11
|
||||
#define CODEC_I2S_MIC_OSR_SRC 12
|
||||
#define CODEC_I2S_MIC_OSR_CLK 13
|
||||
#define CODEC_I2S_MIC_DIV_CLK 14
|
||||
#define CODEC_I2S_MIC_BIT_DIV_CLK 15
|
||||
#define CODEC_I2S_MIC_BIT_CLK 16
|
||||
#define SPARE_I2S_MIC_OSR_SRC 17
|
||||
#define SPARE_I2S_MIC_OSR_CLK 18
|
||||
#define SPARE_I2S_MIC_DIV_CLK 19
|
||||
#define SPARE_I2S_MIC_BIT_DIV_CLK 20
|
||||
#define SPARE_I2S_MIC_BIT_CLK 21
|
||||
#define CODEC_I2S_SPKR_OSR_SRC 22
|
||||
#define CODEC_I2S_SPKR_OSR_CLK 23
|
||||
#define CODEC_I2S_SPKR_DIV_CLK 24
|
||||
#define CODEC_I2S_SPKR_BIT_DIV_CLK 25
|
||||
#define CODEC_I2S_SPKR_BIT_CLK 26
|
||||
#define SPARE_I2S_SPKR_OSR_SRC 27
|
||||
#define SPARE_I2S_SPKR_OSR_CLK 28
|
||||
#define SPARE_I2S_SPKR_DIV_CLK 29
|
||||
#define SPARE_I2S_SPKR_BIT_DIV_CLK 30
|
||||
#define SPARE_I2S_SPKR_BIT_CLK 31
|
||||
|
||||
#endif
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
|
||||
/*
|
||||
* Copyright (c) 2021-2022, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_QCOM_GCC_QDU1000_H
|
||||
|
|
@ -138,6 +138,8 @@
|
|||
#define GCC_AGGRE_NOC_ECPRI_GSI_CLK 128
|
||||
#define GCC_PCIE_0_PIPE_CLK_SRC 129
|
||||
#define GCC_PCIE_0_PHY_AUX_CLK_SRC 130
|
||||
#define GCC_GPLL1_OUT_EVEN 131
|
||||
#define GCC_DDRSS_ECPRI_GSI_CLK 132
|
||||
|
||||
/* GCC resets */
|
||||
#define GCC_ECPRI_CC_BCR 0
|
||||
|
|
|
|||
13
include/dt-bindings/interconnect/qcom,rpm-icc.h
Normal file
13
include/dt-bindings/interconnect/qcom,rpm-icc.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (c) 2023, Linaro Limited
|
||||
*/
|
||||
|
||||
#ifndef __DT_BINDINGS_INTERCONNECT_QCOM_RPM_ICC_H
|
||||
#define __DT_BINDINGS_INTERCONNECT_QCOM_RPM_ICC_H
|
||||
|
||||
#define RPM_ACTIVE_TAG (1 << 0)
|
||||
#define RPM_SLEEP_TAG (1 << 1)
|
||||
#define RPM_ALWAYS_TAG (RPM_ACTIVE_TAG | RPM_SLEEP_TAG)
|
||||
|
||||
#endif
|
||||
122
include/dt-bindings/reset/qcom,gcc-ipq5018.h
Normal file
122
include/dt-bindings/reset/qcom,gcc-ipq5018.h
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (c) 2023, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_RESET_IPQ_GCC_5018_H
|
||||
#define _DT_BINDINGS_RESET_IPQ_GCC_5018_H
|
||||
|
||||
#define GCC_APC0_VOLTAGE_DROOP_DETECTOR_BCR 0
|
||||
#define GCC_BLSP1_BCR 1
|
||||
#define GCC_BLSP1_QUP1_BCR 2
|
||||
#define GCC_BLSP1_QUP2_BCR 3
|
||||
#define GCC_BLSP1_QUP3_BCR 4
|
||||
#define GCC_BLSP1_UART1_BCR 5
|
||||
#define GCC_BLSP1_UART2_BCR 6
|
||||
#define GCC_BOOT_ROM_BCR 7
|
||||
#define GCC_BTSS_BCR 8
|
||||
#define GCC_CMN_BLK_BCR 9
|
||||
#define GCC_CMN_LDO_BCR 10
|
||||
#define GCC_CE_BCR 11
|
||||
#define GCC_CRYPTO_BCR 12
|
||||
#define GCC_DCC_BCR 13
|
||||
#define GCC_DCD_BCR 14
|
||||
#define GCC_DDRSS_BCR 15
|
||||
#define GCC_EDPD_BCR 16
|
||||
#define GCC_GEPHY_BCR 17
|
||||
#define GCC_GEPHY_MDC_SW_ARES 18
|
||||
#define GCC_GEPHY_DSP_HW_ARES 19
|
||||
#define GCC_GEPHY_RX_ARES 20
|
||||
#define GCC_GEPHY_TX_ARES 21
|
||||
#define GCC_GMAC0_BCR 22
|
||||
#define GCC_GMAC0_CFG_ARES 23
|
||||
#define GCC_GMAC0_SYS_ARES 24
|
||||
#define GCC_GMAC1_BCR 25
|
||||
#define GCC_GMAC1_CFG_ARES 26
|
||||
#define GCC_GMAC1_SYS_ARES 27
|
||||
#define GCC_IMEM_BCR 28
|
||||
#define GCC_LPASS_BCR 29
|
||||
#define GCC_MDIO0_BCR 30
|
||||
#define GCC_MDIO1_BCR 31
|
||||
#define GCC_MPM_BCR 32
|
||||
#define GCC_PCIE0_BCR 33
|
||||
#define GCC_PCIE0_LINK_DOWN_BCR 34
|
||||
#define GCC_PCIE0_PHY_BCR 35
|
||||
#define GCC_PCIE0PHY_PHY_BCR 36
|
||||
#define GCC_PCIE0_PIPE_ARES 37
|
||||
#define GCC_PCIE0_SLEEP_ARES 38
|
||||
#define GCC_PCIE0_CORE_STICKY_ARES 39
|
||||
#define GCC_PCIE0_AXI_MASTER_ARES 40
|
||||
#define GCC_PCIE0_AXI_SLAVE_ARES 41
|
||||
#define GCC_PCIE0_AHB_ARES 42
|
||||
#define GCC_PCIE0_AXI_MASTER_STICKY_ARES 43
|
||||
#define GCC_PCIE0_AXI_SLAVE_STICKY_ARES 44
|
||||
#define GCC_PCIE1_BCR 45
|
||||
#define GCC_PCIE1_LINK_DOWN_BCR 46
|
||||
#define GCC_PCIE1_PHY_BCR 47
|
||||
#define GCC_PCIE1PHY_PHY_BCR 48
|
||||
#define GCC_PCIE1_PIPE_ARES 49
|
||||
#define GCC_PCIE1_SLEEP_ARES 50
|
||||
#define GCC_PCIE1_CORE_STICKY_ARES 51
|
||||
#define GCC_PCIE1_AXI_MASTER_ARES 52
|
||||
#define GCC_PCIE1_AXI_SLAVE_ARES 53
|
||||
#define GCC_PCIE1_AHB_ARES 54
|
||||
#define GCC_PCIE1_AXI_MASTER_STICKY_ARES 55
|
||||
#define GCC_PCIE1_AXI_SLAVE_STICKY_ARES 56
|
||||
#define GCC_PCNOC_BCR 57
|
||||
#define GCC_PCNOC_BUS_TIMEOUT0_BCR 58
|
||||
#define GCC_PCNOC_BUS_TIMEOUT1_BCR 59
|
||||
#define GCC_PCNOC_BUS_TIMEOUT2_BCR 60
|
||||
#define GCC_PCNOC_BUS_TIMEOUT3_BCR 61
|
||||
#define GCC_PCNOC_BUS_TIMEOUT4_BCR 62
|
||||
#define GCC_PCNOC_BUS_TIMEOUT5_BCR 63
|
||||
#define GCC_PCNOC_BUS_TIMEOUT6_BCR 64
|
||||
#define GCC_PCNOC_BUS_TIMEOUT7_BCR 65
|
||||
#define GCC_PCNOC_BUS_TIMEOUT8_BCR 66
|
||||
#define GCC_PCNOC_BUS_TIMEOUT9_BCR 67
|
||||
#define GCC_PCNOC_BUS_TIMEOUT10_BCR 68
|
||||
#define GCC_PCNOC_BUS_TIMEOUT11_BCR 69
|
||||
#define GCC_PRNG_BCR 70
|
||||
#define GCC_Q6SS_DBG_ARES 71
|
||||
#define GCC_Q6_AHB_S_ARES 72
|
||||
#define GCC_Q6_AHB_ARES 73
|
||||
#define GCC_Q6_AXIM2_ARES 74
|
||||
#define GCC_Q6_AXIM_ARES 75
|
||||
#define GCC_Q6_AXIS_ARES 76
|
||||
#define GCC_QDSS_BCR 77
|
||||
#define GCC_QPIC_BCR 78
|
||||
#define GCC_QUSB2_0_PHY_BCR 79
|
||||
#define GCC_SDCC1_BCR 80
|
||||
#define GCC_SEC_CTRL_BCR 81
|
||||
#define GCC_SPDM_BCR 82
|
||||
#define GCC_SYSTEM_NOC_BCR 83
|
||||
#define GCC_TCSR_BCR 84
|
||||
#define GCC_TLMM_BCR 85
|
||||
#define GCC_UBI0_AXI_ARES 86
|
||||
#define GCC_UBI0_AHB_ARES 87
|
||||
#define GCC_UBI0_NC_AXI_ARES 88
|
||||
#define GCC_UBI0_DBG_ARES 89
|
||||
#define GCC_UBI0_UTCM_ARES 90
|
||||
#define GCC_UBI0_CORE_ARES 91
|
||||
#define GCC_UBI32_BCR 92
|
||||
#define GCC_UNIPHY_BCR 93
|
||||
#define GCC_UNIPHY_AHB_ARES 94
|
||||
#define GCC_UNIPHY_SYS_ARES 95
|
||||
#define GCC_UNIPHY_RX_ARES 96
|
||||
#define GCC_UNIPHY_TX_ARES 97
|
||||
#define GCC_USB0_BCR 98
|
||||
#define GCC_USB0_PHY_BCR 99
|
||||
#define GCC_WCSS_BCR 100
|
||||
#define GCC_WCSS_DBG_ARES 101
|
||||
#define GCC_WCSS_ECAHB_ARES 102
|
||||
#define GCC_WCSS_ACMT_ARES 103
|
||||
#define GCC_WCSS_DBG_BDG_ARES 104
|
||||
#define GCC_WCSS_AHB_S_ARES 105
|
||||
#define GCC_WCSS_AXI_M_ARES 106
|
||||
#define GCC_WCSS_AXI_S_ARES 107
|
||||
#define GCC_WCSS_Q6_BCR 108
|
||||
#define GCC_WCSSAON_RESET 109
|
||||
#define GCC_UNIPHY_SOFT_RESET 110
|
||||
#define GCC_GEPHY_MISC_ARES 111
|
||||
|
||||
#endif
|
||||
|
|
@ -2,10 +2,13 @@
|
|||
#ifndef __QCOM_SMD_RPM_H__
|
||||
#define __QCOM_SMD_RPM_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct qcom_smd_rpm;
|
||||
|
||||
#define QCOM_SMD_RPM_ACTIVE_STATE 0
|
||||
#define QCOM_SMD_RPM_SLEEP_STATE 1
|
||||
#define QCOM_SMD_RPM_ACTIVE_STATE 0
|
||||
#define QCOM_SMD_RPM_SLEEP_STATE 1
|
||||
#define QCOM_SMD_RPM_STATE_NUM 2
|
||||
|
||||
/*
|
||||
* Constants used for addressing resources in the RPM.
|
||||
|
|
@ -44,6 +47,19 @@ struct qcom_smd_rpm;
|
|||
#define QCOM_SMD_RPM_PKA_CLK 0x616b70
|
||||
#define QCOM_SMD_RPM_MCFG_CLK 0x6766636d
|
||||
|
||||
#define QCOM_RPM_KEY_SOFTWARE_ENABLE 0x6e657773
|
||||
#define QCOM_RPM_KEY_PIN_CTRL_CLK_BUFFER_ENABLE_KEY 0x62636370
|
||||
#define QCOM_RPM_SMD_KEY_RATE 0x007a484b
|
||||
#define QCOM_RPM_SMD_KEY_ENABLE 0x62616e45
|
||||
#define QCOM_RPM_SMD_KEY_STATE 0x54415453
|
||||
#define QCOM_RPM_SCALING_ENABLE_ID 0x2
|
||||
|
||||
struct clk_smd_rpm_req {
|
||||
__le32 key;
|
||||
__le32 nbytes;
|
||||
__le32 value;
|
||||
};
|
||||
|
||||
int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm,
|
||||
int state,
|
||||
u32 resource_type, u32 resource_id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user