Commit ea90f303 authored by Stephen Boyd's avatar Stephen Boyd

Merge tag 'qcom-clk-for-6.4' of...

Merge tag 'qcom-clk-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-qcom

Pull Qualcomm clk driver updates from Bjorn Andersson:

New drivers for Global clock controller on SM7150, IPQ9574, MSM8917 and
IPQ5332 are added. New GPU clock controllers for SM6115, SM6125, SM6375
and SA8775P are added.

The APSS IPQ PLL driver is refactored to support different PLL types,
support for the Stromer Plus PLL type is added, and support for IPQ5332
is introduced.

Helpers for settings sleep, wake and retain bits of CBCR registers are
introduced and used in some of the newly introduced GPU clock drivers.

The platform_driver remove callbacks is transitioned to remove_new, as
part of the system wide cleanup effort.

In the Display clock controller for QCM2290, the MDSS_CORE reset is
introduced and the non-existent DSI1PHY clock is removed.

IPQ4019 Global clock controller is transitioned to parent_data.

USB GDSCs in SM6375, MSM8996 and MSM8998 are changed to use retention as
disabled state, to avoid collapsing them during suspend.
The CX GDSC in the SM6375 GPU clock controller has it's disable-wait
value corrected.

QCM2290 SDCC2 src clock moves to floor_ops.

The two EMAC GDSCs are added for SC8280XP.

Relevant RCGs in the SM6115 Global clock controller are moved to use
shared_ops.

PCIe PIPE clock operations on SM8350 are updated, to ensure the mux is
parked when the parent PLL is disabled.

GDSCs are added to the SC7280 LPASS audio clock controller.

The RPM clock controller is transitioned to use the managed version of
of_clk_add_hw_provider().
Missing XO clocks are added to MSM8226 and MSM8974.

DeviceTree bindings are added for the various newly supported clock
controllers, the binding for KPSS ACC and GCC drivers are converted to
YAML and a few fixes are introduced.

* tag 'qcom-clk-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (57 commits)
  clk: qcom: gcc-sc8280xp: Add EMAC GDSCs
  clk: qcom: dispcc-qcm2290: Remove inexistent DSI1PHY clk
  clk: qcom: add the GPUCC driver for sa8775p
  dt-bindings: clock: qcom: describe the GPUCC clock for SA8775P
  clk: qcom: gcc-sm8350: fix PCIe PIPE clocks handling
  clk: qcom: lpassaudiocc-sc7280: Add required gdsc power domain clks in lpass_cc_sc7280_desc
  clk: qcom: lpasscc-sc7280: Skip qdsp6ss clock registration
  dt-bindings: clock: qcom,sc7280-lpasscc: Add qcom,adsp-pil-mode property
  clk: qcom: rpm: Use managed `of_clk_add_hw_provider()`
  clk: qcom: Add Global Clock Controller driver for IPQ9574
  dt-bindings: clock: Add ipq9574 clock and reset definitions
  clk: qcom: gpucc-sm6375: Configure CX_GDSC disable wait value
  clk: qcom: gcc-sm6115: Mark RCGs shared where applicable
  clk: qcom: dispcc-qcm2290: Add MDSS_CORE reset
  dt-bindings: clock: dispcc-qcm2290: Add MDSS_CORE reset
  clk: qcom: apss-ipq-pll: add support for IPQ5332
  dt-bindings: clock: qcom,a53pll: add IPQ5332 compatible
  clk: qcom: apss-ipq-pll: refactor the driver to accommodate different PLL types
  dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match
  dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks
  ...
parents fe15c26e 32c2f2a4
Krait Processor Sub-system (KPSS) Application Clock Controller (ACC)
The KPSS ACC provides clock, power domain, and reset control to a Krait CPU.
There is one ACC register region per CPU within the KPSS remapped region as
well as an alias register region that remaps accesses to the ACC associated
with the CPU accessing the region.
PROPERTIES
- compatible:
Usage: required
Value type: <string>
Definition: should be one of:
"qcom,kpss-acc-v1"
"qcom,kpss-acc-v2"
- reg:
Usage: required
Value type: <prop-encoded-array>
Definition: the first element specifies the base address and size of
the register region. An optional second element specifies
the base address and size of the alias register region.
- clocks:
Usage: required
Value type: <prop-encoded-array>
Definition: reference to the pll parents.
- clock-names:
Usage: required
Value type: <stringlist>
Definition: must be "pll8_vote", "pxo".
- clock-output-names:
Usage: optional
Value type: <string>
Definition: Name of the output clock. Typically acpuX_aux where X is a
CPU number starting at 0.
Example:
clock-controller@2088000 {
compatible = "qcom,kpss-acc-v2";
reg = <0x02088000 0x1000>,
<0x02008000 0x1000>;
clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
clock-names = "pll8_vote", "pxo";
clock-output-names = "acpu0_aux";
};
Krait Processor Sub-system (KPSS) Global Clock Controller (GCC)
PROPERTIES
- compatible:
Usage: required
Value type: <string>
Definition: should be one of the following. The generic compatible
"qcom,kpss-gcc" should also be included.
"qcom,kpss-gcc-ipq8064", "qcom,kpss-gcc"
"qcom,kpss-gcc-apq8064", "qcom,kpss-gcc"
"qcom,kpss-gcc-msm8974", "qcom,kpss-gcc"
"qcom,kpss-gcc-msm8960", "qcom,kpss-gcc"
- reg:
Usage: required
Value type: <prop-encoded-array>
Definition: base address and size of the register region
- clocks:
Usage: required
Value type: <prop-encoded-array>
Definition: reference to the pll parents.
- clock-names:
Usage: required
Value type: <stringlist>
Definition: must be "pll8_vote", "pxo".
- clock-output-names:
Usage: required
Value type: <string>
Definition: Name of the output clock. Typically acpu_l2_aux indicating
an L2 cache auxiliary clock.
Example:
l2cc: clock-controller@2011000 {
compatible = "qcom,kpss-gcc-ipq8064", "qcom,kpss-gcc";
reg = <0x2011000 0x1000>;
clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
clock-names = "pll8_vote", "pxo";
clock-output-names = "acpu_l2_aux";
};
...@@ -16,6 +16,7 @@ description: ...@@ -16,6 +16,7 @@ description:
properties: properties:
compatible: compatible:
enum: enum:
- qcom,ipq5332-a53pll
- qcom,ipq6018-a53pll - qcom,ipq6018-a53pll
- qcom,ipq8074-a53pll - qcom,ipq8074-a53pll
- qcom,msm8916-a53pll - qcom,msm8916-a53pll
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/qcom,gcc-ipq4019.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Global Clock & Reset Controller on IPQ4019
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- Taniya Das <tdas@codeaurora.org>
- Robert Marko <robert.markoo@sartura.hr>
description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on IPQ4019.
See also:: include/dt-bindings/clock/qcom,gcc-ipq4019.h
allOf:
- $ref: qcom,gcc.yaml#
properties:
compatible:
const: qcom,gcc-ipq4019
clocks:
items:
- description: board XO clock
- description: sleep clock
clock-names:
items:
- const: xo
- const: sleep_clk
required:
- compatible
unevaluatedProperties: false
examples:
- |
clock-controller@1800000 {
compatible = "qcom,gcc-ipq4019";
reg = <0x1800000 0x60000>;
#clock-cells = <1>;
#power-domain-cells = <1>;
#reset-cells = <1>;
clocks = <&xo>, <&sleep_clk>;
clock-names = "xo", "sleep_clk";
};
...
...@@ -4,20 +4,25 @@ ...@@ -4,20 +4,25 @@
$id: http://devicetree.org/schemas/clock/qcom,gcc-msm8909.yaml# $id: http://devicetree.org/schemas/clock/qcom,gcc-msm8909.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Global Clock & Reset Controller on MSM8909 title: Qualcomm Global Clock & Reset Controller on MSM8909, MSM8917 and QM215
maintainers: maintainers:
- Stephan Gerhold <stephan@gerhold.net> - Stephan Gerhold <stephan@gerhold.net>
description: | description: |
Qualcomm global clock control module provides the clocks, resets and power Qualcomm global clock control module provides the clocks, resets and power
domains on MSM8909. domains on MSM8909, MSM8917 or QM215.
See also:: include/dt-bindings/clock/qcom,gcc-msm8909.h See also::
include/dt-bindings/clock/qcom,gcc-msm8909.h
include/dt-bindings/clock/qcom,gcc-msm8917.h
properties: properties:
compatible: compatible:
const: qcom,gcc-msm8909 enum:
- qcom,gcc-msm8909
- qcom,gcc-msm8917
- qcom,gcc-qm215
clocks: clocks:
items: items:
......
...@@ -15,7 +15,6 @@ description: | ...@@ -15,7 +15,6 @@ description: |
domains. domains.
See also:: See also::
include/dt-bindings/clock/qcom,gcc-ipq4019.h
include/dt-bindings/clock/qcom,gcc-ipq6018.h include/dt-bindings/clock/qcom,gcc-ipq6018.h
include/dt-bindings/reset/qcom,gcc-ipq6018.h include/dt-bindings/reset/qcom,gcc-ipq6018.h
include/dt-bindings/clock/qcom,gcc-msm8953.h include/dt-bindings/clock/qcom,gcc-msm8953.h
...@@ -29,7 +28,6 @@ allOf: ...@@ -29,7 +28,6 @@ allOf:
properties: properties:
compatible: compatible:
enum: enum:
- qcom,gcc-ipq4019
- qcom,gcc-ipq6018 - qcom,gcc-ipq6018
- qcom,gcc-mdm9607 - qcom,gcc-mdm9607
- qcom,gcc-msm8953 - qcom,gcc-msm8953
......
...@@ -15,6 +15,7 @@ description: | ...@@ -15,6 +15,7 @@ description: |
See also:: See also::
include/dt-bindings/clock/qcom,gpucc-sdm845.h include/dt-bindings/clock/qcom,gpucc-sdm845.h
include/dt-bindings/clock/qcom,gpucc-sa8775p.h
include/dt-bindings/clock/qcom,gpucc-sc7180.h include/dt-bindings/clock/qcom,gpucc-sc7180.h
include/dt-bindings/clock/qcom,gpucc-sc7280.h include/dt-bindings/clock/qcom,gpucc-sc7280.h
include/dt-bindings/clock/qcom,gpucc-sc8280xp.h include/dt-bindings/clock/qcom,gpucc-sc8280xp.h
...@@ -27,6 +28,7 @@ properties: ...@@ -27,6 +28,7 @@ properties:
compatible: compatible:
enum: enum:
- qcom,sdm845-gpucc - qcom,sdm845-gpucc
- qcom,sa8775p-gpucc
- qcom,sc7180-gpucc - qcom,sc7180-gpucc
- qcom,sc7280-gpucc - qcom,sc7280-gpucc
- qcom,sc8180x-gpucc - qcom,sc8180x-gpucc
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/qcom,ipq5332-gcc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Global Clock & Reset Controller on IPQ5332
maintainers:
- Bjorn Andersson <andersson@kernel.org>
description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on IPQ5332.
See also:: include/dt-bindings/clock/qcom,gcc-ipq5332.h
allOf:
- $ref: qcom,gcc.yaml#
properties:
compatible:
const: qcom,ipq5332-gcc
clocks:
items:
- description: Board XO clock source
- description: Sleep clock source
- description: PCIE 2lane PHY pipe clock source
- description: PCIE 2lane x1 PHY pipe clock source (For second lane)
- description: USB PCIE wrapper pipe clock source
required:
- compatible
- clocks
unevaluatedProperties: false
examples:
- |
clock-controller@1800000 {
compatible = "qcom,ipq5332-gcc";
reg = <0x01800000 0x80000>;
clocks = <&xo_board>,
<&sleep_clk>,
<&pcie_2lane_phy_pipe_clk>,
<&pcie_2lane_phy_pipe_clk_x1>,
<&usb_pcie_wrapper_pipe_clk>;
#clock-cells = <1>;
#power-domain-cells = <1>;
#reset-cells = <1>;
};
...
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/qcom,ipq9574-gcc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Global Clock & Reset Controller on IPQ9574
maintainers:
- Anusha Rao <quic_anusha@quicinc.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on IPQ9574
See also::
include/dt-bindings/clock/qcom,ipq9574-gcc.h
include/dt-bindings/reset/qcom,ipq9574-gcc.h
properties:
compatible:
const: qcom,ipq9574-gcc
clocks:
items:
- description: Board XO source
- description: Sleep clock source
- description: Bias PLL ubi clock source
- description: PCIE30 PHY0 pipe clock source
- description: PCIE30 PHY1 pipe clock source
- description: PCIE30 PHY2 pipe clock source
- description: PCIE30 PHY3 pipe clock source
- description: USB3 PHY pipe clock source
required:
- compatible
- clocks
allOf:
- $ref: qcom,gcc.yaml#
unevaluatedProperties: false
examples:
- |
clock-controller@1800000 {
compatible = "qcom,ipq9574-gcc";
reg = <0x01800000 0x80000>;
clocks = <&xo_board_clk>,
<&sleep_clk>,
<&bias_pll_ubi_nc_clk>,
<&pcie30_phy0_pipe_clk>,
<&pcie30_phy1_pipe_clk>,
<&pcie30_phy2_pipe_clk>,
<&pcie30_phy3_pipe_clk>,
<&usb3phy_0_cc_pipe_clk>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
};
...
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/qcom,kpss-acc-v1.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Krait Processor Sub-system (KPSS) Application Clock Controller (ACC) v1
maintainers:
- Christian Marangi <ansuelsmth@gmail.com>
description:
The KPSS ACC provides clock, power domain, and reset control to a Krait CPU.
There is one ACC register region per CPU within the KPSS remapped region as
well as an alias register region that remaps accesses to the ACC associated
with the CPU accessing the region. ACC v1 is currently used as a
clock-controller for enabling the cpu and hanling the aux clocks.
properties:
compatible:
const: qcom,kpss-acc-v1
reg:
items:
- description: Base address and size of the register region
- description: Optional base address and size of the alias register region
minItems: 1
clocks:
minItems: 2
maxItems: 2
clock-names:
items:
- const: pll8_vote
- const: pxo
clock-output-names:
description: Name of the aux clock. Krait can have at most 4 cpu.
enum:
- acpu0_aux
- acpu1_aux
- acpu2_aux
- acpu3_aux
'#clock-cells':
const: 0
required:
- compatible
- reg
- clocks
- clock-names
- clock-output-names
- '#clock-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-ipq806x.h>
clock-controller@2088000 {
compatible = "qcom,kpss-acc-v1";
reg = <0x02088000 0x1000>, <0x02008000 0x1000>;
clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
clock-names = "pll8_vote", "pxo";
clock-output-names = "acpu0_aux";
#clock-cells = <0>;
};
...
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/qcom,kpss-gcc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Krait Processor Sub-system (KPSS) Global Clock Controller (GCC)
maintainers:
- Christian Marangi <ansuelsmth@gmail.com>
description:
Krait Processor Sub-system (KPSS) Global Clock Controller (GCC). Used
to control L2 mux (in the current implementation) and provide access
to the kpss-gcc registers.
properties:
compatible:
items:
- enum:
- qcom,kpss-gcc-ipq8064
- qcom,kpss-gcc-apq8064
- qcom,kpss-gcc-msm8974
- qcom,kpss-gcc-msm8960
- qcom,kpss-gcc-msm8660
- qcom,kpss-gcc-mdm9615
- const: qcom,kpss-gcc
- const: syscon
reg:
maxItems: 1
clocks:
minItems: 2
maxItems: 2
clock-names:
items:
- const: pll8_vote
- const: pxo
'#clock-cells':
const: 0
required:
- compatible
- reg
if:
properties:
compatible:
contains:
enum:
- qcom,kpss-gcc-ipq8064
- qcom,kpss-gcc-apq8064
- qcom,kpss-gcc-msm8974
- qcom,kpss-gcc-msm8960
then:
required:
- clocks
- clock-names
- '#clock-cells'
else:
properties:
clock: false
clock-names: false
'#clock-cells': false
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-ipq806x.h>
clock-controller@2011000 {
compatible = "qcom,kpss-gcc-ipq8064", "qcom,kpss-gcc", "syscon";
reg = <0x2011000 0x1000>;
clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
clock-names = "pll8_vote", "pxo";
#clock-cells = <0>;
};
- |
clock-controller@2011000 {
compatible = "qcom,kpss-gcc-mdm9615", "qcom,kpss-gcc", "syscon";
reg = <0x02011000 0x1000>;
};
...
...@@ -31,6 +31,7 @@ properties: ...@@ -31,6 +31,7 @@ properties:
- qcom,rpmcc-msm8660 - qcom,rpmcc-msm8660
- qcom,rpmcc-msm8909 - qcom,rpmcc-msm8909
- qcom,rpmcc-msm8916 - qcom,rpmcc-msm8916
- qcom,rpmcc-msm8917
- qcom,rpmcc-msm8936 - qcom,rpmcc-msm8936
- qcom,rpmcc-msm8953 - qcom,rpmcc-msm8953
- qcom,rpmcc-msm8974 - qcom,rpmcc-msm8974
...@@ -107,6 +108,7 @@ allOf: ...@@ -107,6 +108,7 @@ allOf:
- qcom,rpmcc-mdm9607 - qcom,rpmcc-mdm9607
- qcom,rpmcc-msm8226 - qcom,rpmcc-msm8226
- qcom,rpmcc-msm8916 - qcom,rpmcc-msm8916
- qcom,rpmcc-msm8917
- qcom,rpmcc-msm8936 - qcom,rpmcc-msm8936
- qcom,rpmcc-msm8953 - qcom,rpmcc-msm8953
- qcom,rpmcc-msm8974 - qcom,rpmcc-msm8974
......
...@@ -41,6 +41,12 @@ properties: ...@@ -41,6 +41,12 @@ properties:
- const: qdsp6ss - const: qdsp6ss
- const: top_cc - const: top_cc
qcom,adsp-pil-mode:
description:
Indicates if the LPASS would be brought out of reset using
remoteproc peripheral loader.
type: boolean
required: required:
- compatible - compatible
- reg - reg
...@@ -60,6 +66,7 @@ examples: ...@@ -60,6 +66,7 @@ examples:
reg-names = "qdsp6ss", "top_cc"; reg-names = "qdsp6ss", "top_cc";
clocks = <&gcc GCC_CFG_NOC_LPASS_CLK>; clocks = <&gcc GCC_CFG_NOC_LPASS_CLK>;
clock-names = "iface"; clock-names = "iface";
qcom,adsp-pil-mode;
#clock-cells = <1>; #clock-cells = <1>;
}; };
... ...
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/qcom,sm6115-gpucc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Graphics Clock & Reset Controller on SM6115
maintainers:
- Konrad Dybcio <konrad.dybcio@linaro.org>
description: |
Qualcomm graphics clock control module provides clocks, resets and power
domains on Qualcomm SoCs.
See also:: include/dt-bindings/clock/qcom,sm6115-gpucc.h
properties:
compatible:
enum:
- qcom,sm6115-gpucc
clocks:
items:
- description: Board XO source
- description: GPLL0 main branch source
- description: GPLL0 main div source
required:
- compatible
- clocks
allOf:
- $ref: qcom,gcc.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sm6115.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
soc {
#address-cells = <1>;
#size-cells = <1>;
clock-controller@5990000 {
compatible = "qcom,sm6115-gpucc";
reg = <0x05990000 0x9000>;
clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>,
<&gcc GCC_GPU_GPLL0_CLK_SRC>,
<&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/qcom,sm6125-gpucc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Graphics Clock & Reset Controller on SM6125
maintainers:
- Konrad Dybcio <konrad.dybcio@linaro.org>
description: |
Qualcomm graphics clock control module provides clocks and power domains on
Qualcomm SoCs.
See also:: include/dt-bindings/clock/qcom,sm6125-gpucc.h
properties:
compatible:
enum:
- qcom,sm6125-gpucc
clocks:
items:
- description: Board XO source
- description: GPLL0 main branch source
'#clock-cells':
const: 1
'#power-domain-cells':
const: 1
reg:
maxItems: 1
required:
- compatible
- reg
- clocks
- '#clock-cells'
- '#power-domain-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sm6125.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
soc {
#address-cells = <1>;
#size-cells = <1>;
clock-controller@5990000 {
compatible = "qcom,sm6125-gpucc";
reg = <0x05990000 0x9000>;
clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>,
<&gcc GCC_GPU_GPLL0_CLK_SRC>;
#clock-cells = <1>;
#power-domain-cells = <1>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/qcom,sm6375-gpucc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Graphics Clock & Reset Controller on SM6375
maintainers:
- Konrad Dybcio <konrad.dybcio@linaro.org>
description: |
Qualcomm graphics clock control module provides clocks, resets and power
domains on Qualcomm SoCs.
See also:: include/dt-bindings/clock/qcom,sm6375-gpucc.h
properties:
compatible:
enum:
- qcom,sm6375-gpucc
clocks:
items:
- description: Board XO source
- description: GPLL0 main branch source
- description: GPLL0 div branch source
- description: SNoC DVM GFX source
required:
- compatible
- clocks
allOf:
- $ref: qcom,gcc.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,sm6375-gcc.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
clock-controller@5990000 {
compatible = "qcom,sm6375-gpucc";
reg = <0 0x05990000 0 0x9000>;
clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>,
<&gcc GCC_GPU_GPLL0_CLK_SRC>,
<&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>,
<&gcc GCC_GPU_SNOC_DVM_GFX_CLK>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/qcom,sm7150-gcc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Global Clock & Reset Controller on SM7150
maintainers:
- Bjorn Andersson <andersson@kernel.org>
- Danila Tikhonov <danila@jiaxyga.com>
- David Wronek <davidwronek@gmail.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
domains on SM7150
See also:: include/dt-bindings/clock/qcom,sm7150-gcc.h
properties:
compatible:
const: qcom,sm7150-gcc
clocks:
items:
- description: Board XO source
- description: Board XO Active-Only source
- description: Sleep clock source
required:
- compatible
- clocks
allOf:
- $ref: qcom,gcc.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>
clock-controller@100000 {
compatible = "qcom,sm7150-gcc";
reg = <0x00100000 0x001f0000>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&rpmhcc RPMH_CXO_CLK_A>,
<&sleep_clk>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
};
...
...@@ -91,20 +91,21 @@ allOf: ...@@ -91,20 +91,21 @@ allOf:
- if: - if:
properties: properties:
compatible: compatible:
contains:
enum: enum:
- qcom,sdx55-apcs-gcc - qcom,sdx55-apcs-gcc
then: then:
properties: properties:
clocks: clocks:
items: items:
- description: reference clock
- description: primary pll parent of the clock driver - description: primary pll parent of the clock driver
- description: auxiliary parent - description: auxiliary parent
- description: reference clock
clock-names: clock-names:
items: items:
- const: ref
- const: pll - const: pll
- const: aux - const: aux
- const: ref
- if: - if:
properties: properties:
compatible: compatible:
......
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/qcom,kpss-acc-v2.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Krait Processor Sub-system (KPSS) Application Clock Controller (ACC) v2
maintainers:
- Christian Marangi <ansuelsmth@gmail.com>
description:
The KPSS ACC provides clock, power manager, and reset control to a Krait CPU.
There is one ACC register region per CPU within the KPSS remapped region as
well as an alias register region that remaps accesses to the ACC associated
with the CPU accessing the region. ACC v2 is currently used as a
power-manager for enabling the cpu.
properties:
compatible:
const: qcom,kpss-acc-v2
reg:
items:
- description: Base address and size of the register region
- description: Optional base address and size of the alias register region
minItems: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
power-manager@f9088000 {
compatible = "qcom,kpss-acc-v2";
reg = <0xf9088000 0x1000>,
<0xf9008000 0x1000>;
};
...
...@@ -141,6 +141,14 @@ config IPQ_GCC_4019 ...@@ -141,6 +141,14 @@ config IPQ_GCC_4019
Say Y if you want to use peripheral devices such as UART, SPI, Say Y if you want to use peripheral devices such as UART, SPI,
i2c, USB, SD/eMMC, etc. i2c, USB, SD/eMMC, etc.
config IPQ_GCC_5332
tristate "IPQ5332 Global Clock Controller"
depends on ARM64 || COMPILE_TEST
help
Support for the global clock controller on ipq5332 devices.
Say Y if you want to use peripheral devices such as UART, SPI,
i2c, USB, SD/eMMC, etc.
config IPQ_GCC_6018 config IPQ_GCC_6018
tristate "IPQ6018 Global Clock Controller" tristate "IPQ6018 Global Clock Controller"
help help
...@@ -173,6 +181,14 @@ config IPQ_GCC_8074 ...@@ -173,6 +181,14 @@ config IPQ_GCC_8074
i2c, USB, SD/eMMC, etc. Select this for the root clock i2c, USB, SD/eMMC, etc. Select this for the root clock
of ipq8074. of ipq8074.
config IPQ_GCC_9574
tristate "IPQ9574 Global Clock Controller"
help
Support for global clock controller on ipq9574 devices.
Say Y if you want to use peripheral devices such as UART, SPI,
i2c, USB, SD/eMMC, etc. Select this for the root clock
of ipq9574.
config MSM_GCC_8660 config MSM_GCC_8660
tristate "MSM8660 Global Clock Controller" tristate "MSM8660 Global Clock Controller"
help help
...@@ -196,6 +212,16 @@ config MSM_GCC_8916 ...@@ -196,6 +212,16 @@ config MSM_GCC_8916
Say Y if you want to use devices such as UART, SPI i2c, USB, Say Y if you want to use devices such as UART, SPI i2c, USB,
SD/eMMC, display, graphics, camera etc. SD/eMMC, display, graphics, camera etc.
config MSM_GCC_8917
tristate "MSM8917/QM215 Global Clock Controller"
depends on ARM64 || COMPILE_TEST
select QCOM_GDSC
help
Support for the global clock controller on msm8917 and qm215
devices.
Say Y if you want to use devices such as UART, SPI i2c, USB,
SD/eMMC, display, graphics, camera etc.
config MSM_GCC_8939 config MSM_GCC_8939
tristate "MSM8939 Global Clock Controller" tristate "MSM8939 Global Clock Controller"
select QCOM_GDSC select QCOM_GDSC
...@@ -419,6 +445,15 @@ config SA_GCC_8775P ...@@ -419,6 +445,15 @@ config SA_GCC_8775P
Say Y if you want to use peripheral devices such as UART, SPI, Say Y if you want to use peripheral devices such as UART, SPI,
I2C, USB, UFS, SDCC, etc. I2C, USB, UFS, SDCC, etc.
config SA_GPUCC_8775P
tristate "SA8775P Graphics clock controller"
select QCOM_GDSC
select SA_GCC_8775P
help
Support for the graphics clock controller on SA8775P devices.
Say Y if you want to support graphics controller devices and
functionality such as 3D graphics.
config SC_GCC_7180 config SC_GCC_7180
tristate "SC7180 Global Clock Controller" tristate "SC7180 Global Clock Controller"
select QCOM_GDSC select QCOM_GDSC
...@@ -759,6 +794,14 @@ config SM_GCC_6375 ...@@ -759,6 +794,14 @@ config SM_GCC_6375
Say Y if you want to use peripheral devices such as UART, Say Y if you want to use peripheral devices such as UART,
SPI, I2C, USB, SD/UFS etc. SPI, I2C, USB, SD/UFS etc.
config SM_GCC_7150
tristate "SM7150 Global Clock Controller"
select QCOM_GDSC
help
Support for the global clock controller on SM7150 devices.
Say Y if you want to use peripheral devices such as UART,
SPI, I2C, USB, SD/UFS, PCIe etc.
config SM_GCC_8150 config SM_GCC_8150
tristate "SM8150 Global Clock Controller" tristate "SM8150 Global Clock Controller"
help help
...@@ -798,6 +841,33 @@ config SM_GCC_8550 ...@@ -798,6 +841,33 @@ config SM_GCC_8550
Say Y if you want to use peripheral devices such as UART, Say Y if you want to use peripheral devices such as UART,
SPI, I2C, USB, SD/UFS, PCIe etc. SPI, I2C, USB, SD/UFS, PCIe etc.
config SM_GPUCC_6115
tristate "SM6115 Graphics Clock Controller"
select SM_GCC_6115
depends on ARM64 || COMPILE_TEST
help
Support for the graphics clock controller on SM6115 devices.
Say Y if you want to support graphics controller devices and
functionality such as 3D graphics.
config SM_GPUCC_6125
tristate "SM6125 Graphics Clock Controller"
select SM_GCC_6125
depends on ARM64 || COMPILE_TEST
help
Support for the graphics clock controller on SM6125 devices.
Say Y if you want to support graphics controller devices and
functionality such as 3D graphics.
config SM_GPUCC_6375
tristate "SM6375 Graphics Clock Controller"
select SM_GCC_6375
depends on ARM64 || COMPILE_TEST
help
Support for the graphics clock controller on SM6375 devices.
Say Y if you want to support graphics controller devices and
functionality such as 3D graphics.
config SM_GPUCC_6350 config SM_GPUCC_6350
tristate "SM6350 Graphics Clock Controller" tristate "SM6350 Graphics Clock Controller"
select SM_GCC_6350 select SM_GCC_6350
......
...@@ -24,9 +24,11 @@ obj-$(CONFIG_CLK_GFM_LPASS_SM8250) += lpass-gfm-sm8250.o ...@@ -24,9 +24,11 @@ obj-$(CONFIG_CLK_GFM_LPASS_SM8250) += lpass-gfm-sm8250.o
obj-$(CONFIG_IPQ_APSS_PLL) += apss-ipq-pll.o obj-$(CONFIG_IPQ_APSS_PLL) += apss-ipq-pll.o
obj-$(CONFIG_IPQ_APSS_6018) += apss-ipq6018.o obj-$(CONFIG_IPQ_APSS_6018) += apss-ipq6018.o
obj-$(CONFIG_IPQ_GCC_4019) += gcc-ipq4019.o obj-$(CONFIG_IPQ_GCC_4019) += gcc-ipq4019.o
obj-$(CONFIG_IPQ_GCC_5332) += gcc-ipq5332.o
obj-$(CONFIG_IPQ_GCC_6018) += gcc-ipq6018.o obj-$(CONFIG_IPQ_GCC_6018) += gcc-ipq6018.o
obj-$(CONFIG_IPQ_GCC_806X) += gcc-ipq806x.o obj-$(CONFIG_IPQ_GCC_806X) += gcc-ipq806x.o
obj-$(CONFIG_IPQ_GCC_8074) += gcc-ipq8074.o obj-$(CONFIG_IPQ_GCC_8074) += gcc-ipq8074.o
obj-$(CONFIG_IPQ_GCC_9574) += gcc-ipq9574.o
obj-$(CONFIG_IPQ_LCC_806X) += lcc-ipq806x.o obj-$(CONFIG_IPQ_LCC_806X) += lcc-ipq806x.o
obj-$(CONFIG_MDM_GCC_9607) += gcc-mdm9607.o obj-$(CONFIG_MDM_GCC_9607) += gcc-mdm9607.o
obj-$(CONFIG_MDM_GCC_9615) += gcc-mdm9615.o obj-$(CONFIG_MDM_GCC_9615) += gcc-mdm9615.o
...@@ -34,6 +36,7 @@ obj-$(CONFIG_MDM_LCC_9615) += lcc-mdm9615.o ...@@ -34,6 +36,7 @@ obj-$(CONFIG_MDM_LCC_9615) += lcc-mdm9615.o
obj-$(CONFIG_MSM_GCC_8660) += gcc-msm8660.o obj-$(CONFIG_MSM_GCC_8660) += gcc-msm8660.o
obj-$(CONFIG_MSM_GCC_8909) += gcc-msm8909.o obj-$(CONFIG_MSM_GCC_8909) += gcc-msm8909.o
obj-$(CONFIG_MSM_GCC_8916) += gcc-msm8916.o obj-$(CONFIG_MSM_GCC_8916) += gcc-msm8916.o
obj-$(CONFIG_MSM_GCC_8917) += gcc-msm8917.o
obj-$(CONFIG_MSM_GCC_8939) += gcc-msm8939.o obj-$(CONFIG_MSM_GCC_8939) += gcc-msm8939.o
obj-$(CONFIG_MSM_GCC_8953) += gcc-msm8953.o obj-$(CONFIG_MSM_GCC_8953) += gcc-msm8953.o
obj-$(CONFIG_MSM_GCC_8960) += gcc-msm8960.o obj-$(CONFIG_MSM_GCC_8960) += gcc-msm8960.o
...@@ -69,6 +72,7 @@ obj-$(CONFIG_SC_DISPCC_7180) += dispcc-sc7180.o ...@@ -69,6 +72,7 @@ obj-$(CONFIG_SC_DISPCC_7180) += dispcc-sc7180.o
obj-$(CONFIG_SC_DISPCC_7280) += dispcc-sc7280.o obj-$(CONFIG_SC_DISPCC_7280) += dispcc-sc7280.o
obj-$(CONFIG_SC_DISPCC_8280XP) += dispcc-sc8280xp.o obj-$(CONFIG_SC_DISPCC_8280XP) += dispcc-sc8280xp.o
obj-$(CONFIG_SA_GCC_8775P) += gcc-sa8775p.o obj-$(CONFIG_SA_GCC_8775P) += gcc-sa8775p.o
obj-$(CONFIG_SA_GPUCC_8775P) += gpucc-sa8775p.o
obj-$(CONFIG_SC_GCC_7180) += gcc-sc7180.o obj-$(CONFIG_SC_GCC_7180) += gcc-sc7180.o
obj-$(CONFIG_SC_GCC_7280) += gcc-sc7280.o obj-$(CONFIG_SC_GCC_7280) += gcc-sc7280.o
obj-$(CONFIG_SC_GCC_8180X) += gcc-sc8180x.o obj-$(CONFIG_SC_GCC_8180X) += gcc-sc8180x.o
...@@ -107,12 +111,16 @@ obj-$(CONFIG_SM_GCC_6115) += gcc-sm6115.o ...@@ -107,12 +111,16 @@ obj-$(CONFIG_SM_GCC_6115) += gcc-sm6115.o
obj-$(CONFIG_SM_GCC_6125) += gcc-sm6125.o obj-$(CONFIG_SM_GCC_6125) += gcc-sm6125.o
obj-$(CONFIG_SM_GCC_6350) += gcc-sm6350.o obj-$(CONFIG_SM_GCC_6350) += gcc-sm6350.o
obj-$(CONFIG_SM_GCC_6375) += gcc-sm6375.o obj-$(CONFIG_SM_GCC_6375) += gcc-sm6375.o
obj-$(CONFIG_SM_GCC_7150) += gcc-sm7150.o
obj-$(CONFIG_SM_GCC_8150) += gcc-sm8150.o obj-$(CONFIG_SM_GCC_8150) += gcc-sm8150.o
obj-$(CONFIG_SM_GCC_8250) += gcc-sm8250.o obj-$(CONFIG_SM_GCC_8250) += gcc-sm8250.o
obj-$(CONFIG_SM_GCC_8350) += gcc-sm8350.o obj-$(CONFIG_SM_GCC_8350) += gcc-sm8350.o
obj-$(CONFIG_SM_GCC_8450) += gcc-sm8450.o obj-$(CONFIG_SM_GCC_8450) += gcc-sm8450.o
obj-$(CONFIG_SM_GCC_8550) += gcc-sm8550.o obj-$(CONFIG_SM_GCC_8550) += gcc-sm8550.o
obj-$(CONFIG_SM_GPUCC_6115) += gpucc-sm6115.o
obj-$(CONFIG_SM_GPUCC_6125) += gpucc-sm6125.o
obj-$(CONFIG_SM_GPUCC_6350) += gpucc-sm6350.o obj-$(CONFIG_SM_GPUCC_6350) += gpucc-sm6350.o
obj-$(CONFIG_SM_GPUCC_6375) += gpucc-sm6375.o
obj-$(CONFIG_SM_GPUCC_8150) += gpucc-sm8150.o obj-$(CONFIG_SM_GPUCC_8150) += gpucc-sm8150.o
obj-$(CONFIG_SM_GPUCC_8250) += gpucc-sm8250.o obj-$(CONFIG_SM_GPUCC_8250) += gpucc-sm8250.o
obj-$(CONFIG_SM_GPUCC_8350) += gpucc-sm8350.o obj-$(CONFIG_SM_GPUCC_8350) += gpucc-sm8350.o
......
...@@ -119,18 +119,16 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev) ...@@ -119,18 +119,16 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int qcom_apcs_msm8916_clk_remove(struct platform_device *pdev) static void qcom_apcs_msm8916_clk_remove(struct platform_device *pdev)
{ {
struct clk_regmap_mux_div *a53cc = platform_get_drvdata(pdev); struct clk_regmap_mux_div *a53cc = platform_get_drvdata(pdev);
clk_notifier_unregister(a53cc->pclk, &a53cc->clk_nb); clk_notifier_unregister(a53cc->pclk, &a53cc->clk_nb);
return 0;
} }
static struct platform_driver qcom_apcs_msm8916_clk_driver = { static struct platform_driver qcom_apcs_msm8916_clk_driver = {
.probe = qcom_apcs_msm8916_clk_probe, .probe = qcom_apcs_msm8916_clk_probe,
.remove = qcom_apcs_msm8916_clk_remove, .remove_new = qcom_apcs_msm8916_clk_remove,
.driver = { .driver = {
.name = "qcom-apcs-msm8916-clk", .name = "qcom-apcs-msm8916-clk",
}, },
......
...@@ -120,20 +120,18 @@ static int qcom_apcs_sdx55_clk_probe(struct platform_device *pdev) ...@@ -120,20 +120,18 @@ static int qcom_apcs_sdx55_clk_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int qcom_apcs_sdx55_clk_remove(struct platform_device *pdev) static void qcom_apcs_sdx55_clk_remove(struct platform_device *pdev)
{ {
struct device *cpu_dev = get_cpu_device(0); struct device *cpu_dev = get_cpu_device(0);
struct clk_regmap_mux_div *a7cc = platform_get_drvdata(pdev); struct clk_regmap_mux_div *a7cc = platform_get_drvdata(pdev);
clk_notifier_unregister(a7cc->pclk, &a7cc->clk_nb); clk_notifier_unregister(a7cc->pclk, &a7cc->clk_nb);
dev_pm_domain_detach(cpu_dev, true); dev_pm_domain_detach(cpu_dev, true);
return 0;
} }
static struct platform_driver qcom_apcs_sdx55_clk_driver = { static struct platform_driver qcom_apcs_sdx55_clk_driver = {
.probe = qcom_apcs_sdx55_clk_probe, .probe = qcom_apcs_sdx55_clk_probe,
.remove = qcom_apcs_sdx55_clk_remove, .remove_new = qcom_apcs_sdx55_clk_remove,
.driver = { .driver = {
.name = "qcom-sdx55-acps-clk", .name = "qcom-sdx55-acps-clk",
}, },
......
...@@ -8,7 +8,13 @@ ...@@ -8,7 +8,13 @@
#include "clk-alpha-pll.h" #include "clk-alpha-pll.h"
static const u8 ipq_pll_offsets[] = { /*
* Even though APSS PLL type is of existing one (like Huayra), its offsets
* are different from the one mentioned in the clk-alpha-pll.c, since the
* PLL is specific to APSS, so lets the define the same.
*/
static const u8 ipq_pll_offsets[][PLL_OFF_MAX_REGS] = {
[CLK_ALPHA_PLL_TYPE_HUAYRA] = {
[PLL_OFF_L_VAL] = 0x08, [PLL_OFF_L_VAL] = 0x08,
[PLL_OFF_ALPHA_VAL] = 0x10, [PLL_OFF_ALPHA_VAL] = 0x10,
[PLL_OFF_USER_CTL] = 0x18, [PLL_OFF_USER_CTL] = 0x18,
...@@ -17,11 +23,23 @@ static const u8 ipq_pll_offsets[] = { ...@@ -17,11 +23,23 @@ static const u8 ipq_pll_offsets[] = {
[PLL_OFF_STATUS] = 0x28, [PLL_OFF_STATUS] = 0x28,
[PLL_OFF_TEST_CTL] = 0x30, [PLL_OFF_TEST_CTL] = 0x30,
[PLL_OFF_TEST_CTL_U] = 0x34, [PLL_OFF_TEST_CTL_U] = 0x34,
},
[CLK_ALPHA_PLL_TYPE_STROMER_PLUS] = {
[PLL_OFF_L_VAL] = 0x08,
[PLL_OFF_ALPHA_VAL] = 0x10,
[PLL_OFF_ALPHA_VAL_U] = 0x14,
[PLL_OFF_USER_CTL] = 0x18,
[PLL_OFF_USER_CTL_U] = 0x1c,
[PLL_OFF_CONFIG_CTL] = 0x20,
[PLL_OFF_STATUS] = 0x28,
[PLL_OFF_TEST_CTL] = 0x30,
[PLL_OFF_TEST_CTL_U] = 0x34,
},
}; };
static struct clk_alpha_pll ipq_pll = { static struct clk_alpha_pll ipq_pll_huayra = {
.offset = 0x0, .offset = 0x0,
.regs = ipq_pll_offsets, .regs = ipq_pll_offsets[CLK_ALPHA_PLL_TYPE_HUAYRA],
.flags = SUPPORTS_DYNAMIC_UPDATE, .flags = SUPPORTS_DYNAMIC_UPDATE,
.clkr = { .clkr = {
.enable_reg = 0x0, .enable_reg = 0x0,
...@@ -37,6 +55,38 @@ static struct clk_alpha_pll ipq_pll = { ...@@ -37,6 +55,38 @@ static struct clk_alpha_pll ipq_pll = {
}, },
}; };
static struct clk_alpha_pll ipq_pll_stromer_plus = {
.offset = 0x0,
.regs = ipq_pll_offsets[CLK_ALPHA_PLL_TYPE_STROMER_PLUS],
.flags = SUPPORTS_DYNAMIC_UPDATE,
.clkr = {
.enable_reg = 0x0,
.enable_mask = BIT(0),
.hw.init = &(struct clk_init_data){
.name = "a53pll",
.parent_data = &(const struct clk_parent_data) {
.fw_name = "xo",
},
.num_parents = 1,
.ops = &clk_alpha_pll_stromer_ops,
},
},
};
static const struct alpha_pll_config ipq5332_pll_config = {
.l = 0x3e,
.config_ctl_val = 0x4001075b,
.config_ctl_hi_val = 0x304,
.main_output_mask = BIT(0),
.aux_output_mask = BIT(1),
.early_output_mask = BIT(3),
.alpha_en_mask = BIT(24),
.status_val = 0x3,
.status_mask = GENMASK(10, 8),
.lock_det = BIT(2),
.test_ctl_hi_val = 0x00400003,
};
static const struct alpha_pll_config ipq6018_pll_config = { static const struct alpha_pll_config ipq6018_pll_config = {
.l = 0x37, .l = 0x37,
.config_ctl_val = 0x240d4828, .config_ctl_val = 0x240d4828,
...@@ -61,6 +111,30 @@ static const struct alpha_pll_config ipq8074_pll_config = { ...@@ -61,6 +111,30 @@ static const struct alpha_pll_config ipq8074_pll_config = {
.test_ctl_hi_val = 0x4000, .test_ctl_hi_val = 0x4000,
}; };
struct apss_pll_data {
int pll_type;
struct clk_alpha_pll *pll;
const struct alpha_pll_config *pll_config;
};
static struct apss_pll_data ipq5332_pll_data = {
.pll_type = CLK_ALPHA_PLL_TYPE_STROMER_PLUS,
.pll = &ipq_pll_stromer_plus,
.pll_config = &ipq5332_pll_config,
};
static struct apss_pll_data ipq8074_pll_data = {
.pll_type = CLK_ALPHA_PLL_TYPE_HUAYRA,
.pll = &ipq_pll_huayra,
.pll_config = &ipq8074_pll_config,
};
static struct apss_pll_data ipq6018_pll_data = {
.pll_type = CLK_ALPHA_PLL_TYPE_HUAYRA,
.pll = &ipq_pll_huayra,
.pll_config = &ipq6018_pll_config,
};
static const struct regmap_config ipq_pll_regmap_config = { static const struct regmap_config ipq_pll_regmap_config = {
.reg_bits = 32, .reg_bits = 32,
.reg_stride = 4, .reg_stride = 4,
...@@ -71,7 +145,7 @@ static const struct regmap_config ipq_pll_regmap_config = { ...@@ -71,7 +145,7 @@ static const struct regmap_config ipq_pll_regmap_config = {
static int apss_ipq_pll_probe(struct platform_device *pdev) static int apss_ipq_pll_probe(struct platform_device *pdev)
{ {
const struct alpha_pll_config *ipq_pll_config; const struct apss_pll_data *data;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct regmap *regmap; struct regmap *regmap;
void __iomem *base; void __iomem *base;
...@@ -85,23 +159,27 @@ static int apss_ipq_pll_probe(struct platform_device *pdev) ...@@ -85,23 +159,27 @@ static int apss_ipq_pll_probe(struct platform_device *pdev)
if (IS_ERR(regmap)) if (IS_ERR(regmap))
return PTR_ERR(regmap); return PTR_ERR(regmap);
ipq_pll_config = of_device_get_match_data(&pdev->dev); data = of_device_get_match_data(&pdev->dev);
if (!ipq_pll_config) if (!data)
return -ENODEV; return -ENODEV;
clk_alpha_pll_configure(&ipq_pll, regmap, ipq_pll_config); if (data->pll_type == CLK_ALPHA_PLL_TYPE_HUAYRA)
clk_alpha_pll_configure(data->pll, regmap, data->pll_config);
else if (data->pll_type == CLK_ALPHA_PLL_TYPE_STROMER_PLUS)
clk_stromer_pll_configure(data->pll, regmap, data->pll_config);
ret = devm_clk_register_regmap(dev, &ipq_pll.clkr); ret = devm_clk_register_regmap(dev, &data->pll->clkr);
if (ret) if (ret)
return ret; return ret;
return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get,
&ipq_pll.clkr.hw); &data->pll->clkr.hw);
} }
static const struct of_device_id apss_ipq_pll_match_table[] = { static const struct of_device_id apss_ipq_pll_match_table[] = {
{ .compatible = "qcom,ipq6018-a53pll", .data = &ipq6018_pll_config }, { .compatible = "qcom,ipq5332-a53pll", .data = &ipq5332_pll_data },
{ .compatible = "qcom,ipq8074-a53pll", .data = &ipq8074_pll_config }, { .compatible = "qcom,ipq6018-a53pll", .data = &ipq6018_pll_data },
{ .compatible = "qcom,ipq8074-a53pll", .data = &ipq8074_pll_data },
{ } { }
}; };
MODULE_DEVICE_TABLE(of, apss_ipq_pll_match_table); MODULE_DEVICE_TABLE(of, apss_ipq_pll_match_table);
......
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (c) 2015, 2018, The Linux Foundation. All rights reserved. * Copyright (c) 2015, 2018, The Linux Foundation. All rights reserved.
* Copyright (c) 2021, Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2021, 2023, Qualcomm Innovation Center, Inc. All rights reserved.
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -204,6 +204,29 @@ const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = { ...@@ -204,6 +204,29 @@ const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = {
[PLL_OFF_CONFIG_CTL] = 0x1C, [PLL_OFF_CONFIG_CTL] = 0x1C,
[PLL_OFF_STATUS] = 0x20, [PLL_OFF_STATUS] = 0x20,
}, },
[CLK_ALPHA_PLL_TYPE_STROMER] = {
[PLL_OFF_L_VAL] = 0x08,
[PLL_OFF_ALPHA_VAL] = 0x10,
[PLL_OFF_ALPHA_VAL_U] = 0x14,
[PLL_OFF_USER_CTL] = 0x18,
[PLL_OFF_USER_CTL_U] = 0x1c,
[PLL_OFF_CONFIG_CTL] = 0x20,
[PLL_OFF_CONFIG_CTL_U] = 0xff,
[PLL_OFF_TEST_CTL] = 0x30,
[PLL_OFF_TEST_CTL_U] = 0x34,
[PLL_OFF_STATUS] = 0x28,
},
[CLK_ALPHA_PLL_TYPE_STROMER_PLUS] = {
[PLL_OFF_L_VAL] = 0x04,
[PLL_OFF_USER_CTL] = 0x08,
[PLL_OFF_USER_CTL_U] = 0x0c,
[PLL_OFF_CONFIG_CTL] = 0x10,
[PLL_OFF_TEST_CTL] = 0x14,
[PLL_OFF_TEST_CTL_U] = 0x18,
[PLL_OFF_STATUS] = 0x1c,
[PLL_OFF_ALPHA_VAL] = 0x24,
[PLL_OFF_ALPHA_VAL_U] = 0x28,
},
}; };
EXPORT_SYMBOL_GPL(clk_alpha_pll_regs); EXPORT_SYMBOL_GPL(clk_alpha_pll_regs);
...@@ -215,6 +238,8 @@ EXPORT_SYMBOL_GPL(clk_alpha_pll_regs); ...@@ -215,6 +238,8 @@ EXPORT_SYMBOL_GPL(clk_alpha_pll_regs);
#define ALPHA_BITWIDTH 32U #define ALPHA_BITWIDTH 32U
#define ALPHA_SHIFT(w) min(w, ALPHA_BITWIDTH) #define ALPHA_SHIFT(w) min(w, ALPHA_BITWIDTH)
#define ALPHA_PLL_STATUS_REG_SHIFT 8
#define PLL_HUAYRA_M_WIDTH 8 #define PLL_HUAYRA_M_WIDTH 8
#define PLL_HUAYRA_M_SHIFT 8 #define PLL_HUAYRA_M_SHIFT 8
#define PLL_HUAYRA_M_MASK 0xff #define PLL_HUAYRA_M_MASK 0xff
...@@ -2329,3 +2354,115 @@ const struct clk_ops clk_alpha_pll_rivian_evo_ops = { ...@@ -2329,3 +2354,115 @@ const struct clk_ops clk_alpha_pll_rivian_evo_ops = {
.round_rate = clk_rivian_evo_pll_round_rate, .round_rate = clk_rivian_evo_pll_round_rate,
}; };
EXPORT_SYMBOL_GPL(clk_alpha_pll_rivian_evo_ops); EXPORT_SYMBOL_GPL(clk_alpha_pll_rivian_evo_ops);
void clk_stromer_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
const struct alpha_pll_config *config)
{
u32 val, val_u, mask, mask_u;
regmap_write(regmap, PLL_L_VAL(pll), config->l);
regmap_write(regmap, PLL_ALPHA_VAL(pll), config->alpha);
regmap_write(regmap, PLL_CONFIG_CTL(pll), config->config_ctl_val);
if (pll_has_64bit_config(pll))
regmap_write(regmap, PLL_CONFIG_CTL_U(pll),
config->config_ctl_hi_val);
if (pll_alpha_width(pll) > 32)
regmap_write(regmap, PLL_ALPHA_VAL_U(pll), config->alpha_hi);
val = config->main_output_mask;
val |= config->aux_output_mask;
val |= config->aux2_output_mask;
val |= config->early_output_mask;
val |= config->pre_div_val;
val |= config->post_div_val;
val |= config->vco_val;
val |= config->alpha_en_mask;
val |= config->alpha_mode_mask;
mask = config->main_output_mask;
mask |= config->aux_output_mask;
mask |= config->aux2_output_mask;
mask |= config->early_output_mask;
mask |= config->pre_div_mask;
mask |= config->post_div_mask;
mask |= config->vco_mask;
mask |= config->alpha_en_mask;
mask |= config->alpha_mode_mask;
regmap_update_bits(regmap, PLL_USER_CTL(pll), mask, val);
/* Stromer APSS PLL does not enable LOCK_DET by default, so enable it */
val_u = config->status_val << ALPHA_PLL_STATUS_REG_SHIFT;
val_u |= config->lock_det;
mask_u = config->status_mask;
mask_u |= config->lock_det;
regmap_update_bits(regmap, PLL_USER_CTL_U(pll), mask_u, val_u);
regmap_write(regmap, PLL_TEST_CTL(pll), config->test_ctl_val);
regmap_write(regmap, PLL_TEST_CTL_U(pll), config->test_ctl_hi_val);
if (pll->flags & SUPPORTS_FSM_MODE)
qcom_pll_set_fsm_mode(regmap, PLL_MODE(pll), 6, 0);
}
EXPORT_SYMBOL_GPL(clk_stromer_pll_configure);
static int clk_alpha_pll_stromer_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req)
{
u32 l;
u64 a;
req->rate = alpha_pll_round_rate(req->rate, req->best_parent_rate,
&l, &a, ALPHA_REG_BITWIDTH);
return 0;
}
static int clk_alpha_pll_stromer_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long prate)
{
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
int ret;
u32 l;
u64 a;
rate = alpha_pll_round_rate(rate, prate, &l, &a, ALPHA_REG_BITWIDTH);
regmap_write(pll->clkr.regmap, PLL_L_VAL(pll), l);
regmap_write(pll->clkr.regmap, PLL_ALPHA_VAL(pll), a);
regmap_write(pll->clkr.regmap, PLL_ALPHA_VAL_U(pll),
a >> ALPHA_BITWIDTH);
regmap_update_bits(pll->clkr.regmap, PLL_USER_CTL(pll),
PLL_ALPHA_EN, PLL_ALPHA_EN);
if (!clk_hw_is_enabled(hw))
return 0;
/*
* Stromer PLL supports Dynamic programming.
* It allows the PLL frequency to be changed on-the-fly without first
* execution of a shutdown procedure followed by a bring up procedure.
*/
regmap_update_bits(pll->clkr.regmap, PLL_MODE(pll), PLL_UPDATE,
PLL_UPDATE);
ret = wait_for_pll_update(pll);
if (ret)
return ret;
return wait_for_pll_enable_lock(pll);
}
const struct clk_ops clk_alpha_pll_stromer_ops = {
.enable = clk_alpha_pll_enable,
.disable = clk_alpha_pll_disable,
.is_enabled = clk_alpha_pll_is_enabled,
.recalc_rate = clk_alpha_pll_recalc_rate,
.determine_rate = clk_alpha_pll_stromer_determine_rate,
.set_rate = clk_alpha_pll_stromer_set_rate,
};
EXPORT_SYMBOL_GPL(clk_alpha_pll_stromer_ops);
/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2015, 2018, The Linux Foundation. All rights reserved. */ /*
* Copyright (c) 2015, 2018, 2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef __QCOM_CLK_ALPHA_PLL_H__ #ifndef __QCOM_CLK_ALPHA_PLL_H__
#define __QCOM_CLK_ALPHA_PLL_H__ #define __QCOM_CLK_ALPHA_PLL_H__
...@@ -22,6 +26,8 @@ enum { ...@@ -22,6 +26,8 @@ enum {
CLK_ALPHA_PLL_TYPE_RIVIAN_EVO, CLK_ALPHA_PLL_TYPE_RIVIAN_EVO,
CLK_ALPHA_PLL_TYPE_DEFAULT_EVO, CLK_ALPHA_PLL_TYPE_DEFAULT_EVO,
CLK_ALPHA_PLL_TYPE_BRAMMO_EVO, CLK_ALPHA_PLL_TYPE_BRAMMO_EVO,
CLK_ALPHA_PLL_TYPE_STROMER,
CLK_ALPHA_PLL_TYPE_STROMER_PLUS,
CLK_ALPHA_PLL_TYPE_MAX, CLK_ALPHA_PLL_TYPE_MAX,
}; };
...@@ -131,6 +137,9 @@ struct alpha_pll_config { ...@@ -131,6 +137,9 @@ struct alpha_pll_config {
u32 post_div_mask; u32 post_div_mask;
u32 vco_val; u32 vco_val;
u32 vco_mask; u32 vco_mask;
u32 status_val;
u32 status_mask;
u32 lock_det;
}; };
extern const struct clk_ops clk_alpha_pll_ops; extern const struct clk_ops clk_alpha_pll_ops;
...@@ -139,6 +148,7 @@ extern const struct clk_ops clk_alpha_pll_hwfsm_ops; ...@@ -139,6 +148,7 @@ extern const struct clk_ops clk_alpha_pll_hwfsm_ops;
extern const struct clk_ops clk_alpha_pll_postdiv_ops; extern const struct clk_ops clk_alpha_pll_postdiv_ops;
extern const struct clk_ops clk_alpha_pll_huayra_ops; extern const struct clk_ops clk_alpha_pll_huayra_ops;
extern const struct clk_ops clk_alpha_pll_postdiv_ro_ops; extern const struct clk_ops clk_alpha_pll_postdiv_ro_ops;
extern const struct clk_ops clk_alpha_pll_stromer_ops;
extern const struct clk_ops clk_alpha_pll_fabia_ops; extern const struct clk_ops clk_alpha_pll_fabia_ops;
extern const struct clk_ops clk_alpha_pll_fixed_fabia_ops; extern const struct clk_ops clk_alpha_pll_fixed_fabia_ops;
...@@ -188,5 +198,7 @@ void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regma ...@@ -188,5 +198,7 @@ void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regma
const struct alpha_pll_config *config); const struct alpha_pll_config *config);
void clk_rivian_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, void clk_rivian_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
const struct alpha_pll_config *config); const struct alpha_pll_config *config);
void clk_stromer_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
const struct alpha_pll_config *config);
#endif #endif
...@@ -39,27 +39,22 @@ static bool clk_branch_check_halt(const struct clk_branch *br, bool enabling) ...@@ -39,27 +39,22 @@ static bool clk_branch_check_halt(const struct clk_branch *br, bool enabling)
return !!val == !enabling; return !!val == !enabling;
} }
#define BRANCH_CLK_OFF BIT(31)
#define BRANCH_NOC_FSM_STATUS_SHIFT 28
#define BRANCH_NOC_FSM_STATUS_MASK 0x7
#define BRANCH_NOC_FSM_STATUS_ON (0x2 << BRANCH_NOC_FSM_STATUS_SHIFT)
static bool clk_branch2_check_halt(const struct clk_branch *br, bool enabling) static bool clk_branch2_check_halt(const struct clk_branch *br, bool enabling)
{ {
u32 val; u32 val;
u32 mask; u32 mask;
mask = BRANCH_NOC_FSM_STATUS_MASK << BRANCH_NOC_FSM_STATUS_SHIFT; mask = CBCR_NOC_FSM_STATUS;
mask |= BRANCH_CLK_OFF; mask |= CBCR_CLK_OFF;
regmap_read(br->clkr.regmap, br->halt_reg, &val); regmap_read(br->clkr.regmap, br->halt_reg, &val);
if (enabling) { if (enabling) {
val &= mask; val &= mask;
return (val & BRANCH_CLK_OFF) == 0 || return (val & CBCR_CLK_OFF) == 0 ||
val == BRANCH_NOC_FSM_STATUS_ON; FIELD_GET(CBCR_NOC_FSM_STATUS, val) == FSM_STATUS_ON;
} else { } else {
return val & BRANCH_CLK_OFF; return val & CBCR_CLK_OFF;
} }
} }
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#ifndef __QCOM_CLK_BRANCH_H__ #ifndef __QCOM_CLK_BRANCH_H__
#define __QCOM_CLK_BRANCH_H__ #define __QCOM_CLK_BRANCH_H__
#include <linux/bitfield.h>
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include "clk-regmap.h" #include "clk-regmap.h"
...@@ -37,6 +38,49 @@ struct clk_branch { ...@@ -37,6 +38,49 @@ struct clk_branch {
struct clk_regmap clkr; struct clk_regmap clkr;
}; };
/* Branch clock common bits for HLOS-owned clocks */
#define CBCR_CLK_OFF BIT(31)
#define CBCR_NOC_FSM_STATUS GENMASK(30, 28)
#define FSM_STATUS_ON BIT(1)
#define CBCR_FORCE_MEM_CORE_ON BIT(14)
#define CBCR_FORCE_MEM_PERIPH_ON BIT(13)
#define CBCR_FORCE_MEM_PERIPH_OFF BIT(12)
#define CBCR_WAKEUP GENMASK(11, 8)
#define CBCR_SLEEP GENMASK(7, 4)
static inline void qcom_branch_set_force_mem_core(struct regmap *regmap,
struct clk_branch clk, bool on)
{
regmap_update_bits(regmap, clk.halt_reg, CBCR_FORCE_MEM_CORE_ON,
on ? CBCR_FORCE_MEM_CORE_ON : 0);
}
static inline void qcom_branch_set_force_periph_on(struct regmap *regmap,
struct clk_branch clk, bool on)
{
regmap_update_bits(regmap, clk.halt_reg, CBCR_FORCE_MEM_PERIPH_ON,
on ? CBCR_FORCE_MEM_PERIPH_ON : 0);
}
static inline void qcom_branch_set_force_periph_off(struct regmap *regmap,
struct clk_branch clk, bool on)
{
regmap_update_bits(regmap, clk.halt_reg, CBCR_FORCE_MEM_PERIPH_OFF,
on ? CBCR_FORCE_MEM_PERIPH_OFF : 0);
}
static inline void qcom_branch_set_wakeup(struct regmap *regmap, struct clk_branch clk, u32 val)
{
regmap_update_bits(regmap, clk.halt_reg, CBCR_WAKEUP,
FIELD_PREP(CBCR_WAKEUP, val));
}
static inline void qcom_branch_set_sleep(struct regmap *regmap, struct clk_branch clk, u32 val)
{
regmap_update_bits(regmap, clk.halt_reg, CBCR_SLEEP,
FIELD_PREP(CBCR_SLEEP, val));
}
extern const struct clk_ops clk_branch_ops; extern const struct clk_ops clk_branch_ops;
extern const struct clk_ops clk_branch2_ops; extern const struct clk_ops clk_branch2_ops;
extern const struct clk_ops clk_branch_simple_ops; extern const struct clk_ops clk_branch_simple_ops;
......
...@@ -128,20 +128,20 @@ static void clk_hfpll_disable(struct clk_hw *hw) ...@@ -128,20 +128,20 @@ static void clk_hfpll_disable(struct clk_hw *hw)
spin_unlock_irqrestore(&h->lock, flags); spin_unlock_irqrestore(&h->lock, flags);
} }
static long clk_hfpll_round_rate(struct clk_hw *hw, unsigned long rate, static int clk_hfpll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
unsigned long *parent_rate)
{ {
struct clk_hfpll *h = to_clk_hfpll(hw); struct clk_hfpll *h = to_clk_hfpll(hw);
struct hfpll_data const *hd = h->d; struct hfpll_data const *hd = h->d;
unsigned long rrate; unsigned long rrate;
rate = clamp(rate, hd->min_rate, hd->max_rate); req->rate = clamp(req->rate, hd->min_rate, hd->max_rate);
rrate = DIV_ROUND_UP(rate, *parent_rate) * *parent_rate; rrate = DIV_ROUND_UP(req->rate, req->best_parent_rate) * req->best_parent_rate;
if (rrate > hd->max_rate) if (rrate > hd->max_rate)
rrate -= *parent_rate; rrate -= req->best_parent_rate;
return rrate; req->rate = rrate;
return 0;
} }
/* /*
...@@ -241,7 +241,7 @@ const struct clk_ops clk_ops_hfpll = { ...@@ -241,7 +241,7 @@ const struct clk_ops clk_ops_hfpll = {
.enable = clk_hfpll_enable, .enable = clk_hfpll_enable,
.disable = clk_hfpll_disable, .disable = clk_hfpll_disable,
.is_enabled = hfpll_is_enabled, .is_enabled = hfpll_is_enabled,
.round_rate = clk_hfpll_round_rate, .determine_rate = clk_hfpll_determine_rate,
.set_rate = clk_hfpll_set_rate, .set_rate = clk_hfpll_set_rate,
.recalc_rate = clk_hfpll_recalc_rate, .recalc_rate = clk_hfpll_recalc_rate,
.init = clk_hfpll_init, .init = clk_hfpll_init,
......
...@@ -97,11 +97,11 @@ const struct clk_ops krait_mux_clk_ops = { ...@@ -97,11 +97,11 @@ const struct clk_ops krait_mux_clk_ops = {
EXPORT_SYMBOL_GPL(krait_mux_clk_ops); EXPORT_SYMBOL_GPL(krait_mux_clk_ops);
/* The divider can divide by 2, 4, 6 and 8. But we only really need div-2. */ /* The divider can divide by 2, 4, 6 and 8. But we only really need div-2. */
static long krait_div2_round_rate(struct clk_hw *hw, unsigned long rate, static int krait_div2_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
unsigned long *parent_rate)
{ {
*parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw), rate * 2); req->best_parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw), req->rate * 2);
return DIV_ROUND_UP(*parent_rate, 2); req->rate = DIV_ROUND_UP(req->best_parent_rate, 2);
return 0;
} }
static int krait_div2_set_rate(struct clk_hw *hw, unsigned long rate, static int krait_div2_set_rate(struct clk_hw *hw, unsigned long rate,
...@@ -142,7 +142,7 @@ krait_div2_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) ...@@ -142,7 +142,7 @@ krait_div2_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
} }
const struct clk_ops krait_div2_clk_ops = { const struct clk_ops krait_div2_clk_ops = {
.round_rate = krait_div2_round_rate, .determine_rate = krait_div2_determine_rate,
.set_rate = krait_div2_set_rate, .set_rate = krait_div2_set_rate,
.recalc_rate = krait_div2_recalc_rate, .recalc_rate = krait_div2_recalc_rate,
}; };
......
...@@ -580,7 +580,7 @@ static int rpm_clk_probe(struct platform_device *pdev) ...@@ -580,7 +580,7 @@ static int rpm_clk_probe(struct platform_device *pdev)
goto err; goto err;
} }
ret = of_clk_add_hw_provider(pdev->dev.of_node, qcom_rpm_clk_hw_get, ret = devm_of_clk_add_hw_provider(&pdev->dev, qcom_rpm_clk_hw_get,
rcc); rcc);
if (ret) if (ret)
goto err; goto err;
...@@ -591,19 +591,12 @@ static int rpm_clk_probe(struct platform_device *pdev) ...@@ -591,19 +591,12 @@ static int rpm_clk_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int rpm_clk_remove(struct platform_device *pdev)
{
of_clk_del_provider(pdev->dev.of_node);
return 0;
}
static struct platform_driver rpm_clk_driver = { static struct platform_driver rpm_clk_driver = {
.driver = { .driver = {
.name = "qcom-clk-rpm", .name = "qcom-clk-rpm",
.of_match_table = rpm_clk_match_table, .of_match_table = rpm_clk_match_table,
}, },
.probe = rpm_clk_probe, .probe = rpm_clk_probe,
.remove = rpm_clk_remove,
}; };
static int __init rpm_clk_init(void) static int __init rpm_clk_init(void)
......
...@@ -573,6 +573,40 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8916 = { ...@@ -573,6 +573,40 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8916 = {
.num_clks = ARRAY_SIZE(msm8916_clks), .num_clks = ARRAY_SIZE(msm8916_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,
[RPM_SMD_BB_CLK1_A] = &clk_smd_rpm_bb_clk1_a,
[RPM_SMD_BB_CLK2] = &clk_smd_rpm_bb_clk2,
[RPM_SMD_BB_CLK2_A] = &clk_smd_rpm_bb_clk2_a,
[RPM_SMD_RF_CLK2] = &clk_smd_rpm_rf_clk2,
[RPM_SMD_RF_CLK2_A] = &clk_smd_rpm_rf_clk2_a,
[RPM_SMD_DIV_CLK2] = &clk_smd_rpm_div_clk2,
[RPM_SMD_DIV_A_CLK2] = &clk_smd_rpm_div_clk2_a,
[RPM_SMD_BB_CLK1_PIN] = &clk_smd_rpm_bb_clk1_pin,
[RPM_SMD_BB_CLK1_A_PIN] = &clk_smd_rpm_bb_clk1_a_pin,
[RPM_SMD_BB_CLK2_PIN] = &clk_smd_rpm_bb_clk2_pin,
[RPM_SMD_BB_CLK2_A_PIN] = &clk_smd_rpm_bb_clk2_a_pin,
};
static const struct rpm_smd_clk_desc rpm_clk_msm8917 = {
.clks = msm8917_clks,
.num_clks = ARRAY_SIZE(msm8917_clks),
};
static struct clk_smd_rpm *msm8936_clks[] = { static struct clk_smd_rpm *msm8936_clks[] = {
[RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo, [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_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
...@@ -610,6 +644,8 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8936 = { ...@@ -610,6 +644,8 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8936 = {
}; };
static struct clk_smd_rpm *msm8974_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_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
[RPM_SMD_PNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_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_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
...@@ -1228,6 +1264,7 @@ static const struct of_device_id rpm_smd_clk_match_table[] = { ...@@ -1228,6 +1264,7 @@ static const struct of_device_id rpm_smd_clk_match_table[] = {
{ .compatible = "qcom,rpmcc-msm8226", .data = &rpm_clk_msm8974 }, { .compatible = "qcom,rpmcc-msm8226", .data = &rpm_clk_msm8974 },
{ .compatible = "qcom,rpmcc-msm8909", .data = &rpm_clk_msm8909 }, { .compatible = "qcom,rpmcc-msm8909", .data = &rpm_clk_msm8909 },
{ .compatible = "qcom,rpmcc-msm8916", .data = &rpm_clk_msm8916 }, { .compatible = "qcom,rpmcc-msm8916", .data = &rpm_clk_msm8916 },
{ .compatible = "qcom,rpmcc-msm8917", .data = &rpm_clk_msm8917 },
{ .compatible = "qcom,rpmcc-msm8936", .data = &rpm_clk_msm8936 }, { .compatible = "qcom,rpmcc-msm8936", .data = &rpm_clk_msm8936 },
{ .compatible = "qcom,rpmcc-msm8953", .data = &rpm_clk_msm8953 }, { .compatible = "qcom,rpmcc-msm8953", .data = &rpm_clk_msm8953 },
{ .compatible = "qcom,rpmcc-msm8974", .data = &rpm_clk_msm8974 }, { .compatible = "qcom,rpmcc-msm8974", .data = &rpm_clk_msm8974 },
......
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
#include "clk-regmap-divider.h" #include "clk-regmap-divider.h"
#include "common.h" #include "common.h"
#include "gdsc.h" #include "gdsc.h"
#include "reset.h"
enum { enum {
P_BI_TCXO, P_BI_TCXO,
P_DISP_CC_PLL0_OUT_MAIN, P_DISP_CC_PLL0_OUT_MAIN,
P_DSI0_PHY_PLL_OUT_BYTECLK, P_DSI0_PHY_PLL_OUT_BYTECLK,
P_DSI0_PHY_PLL_OUT_DSICLK, P_DSI0_PHY_PLL_OUT_DSICLK,
P_DSI1_PHY_PLL_OUT_DSICLK,
P_GPLL0_OUT_MAIN, P_GPLL0_OUT_MAIN,
P_SLEEP_CLK, P_SLEEP_CLK,
}; };
...@@ -106,13 +106,11 @@ static const struct clk_parent_data disp_cc_parent_data_3[] = { ...@@ -106,13 +106,11 @@ static const struct clk_parent_data disp_cc_parent_data_3[] = {
static const struct parent_map disp_cc_parent_map_4[] = { static const struct parent_map disp_cc_parent_map_4[] = {
{ P_BI_TCXO, 0 }, { P_BI_TCXO, 0 },
{ P_DSI0_PHY_PLL_OUT_DSICLK, 1 }, { P_DSI0_PHY_PLL_OUT_DSICLK, 1 },
{ P_DSI1_PHY_PLL_OUT_DSICLK, 2 },
}; };
static const struct clk_parent_data disp_cc_parent_data_4[] = { static const struct clk_parent_data disp_cc_parent_data_4[] = {
{ .fw_name = "bi_tcxo" }, { .fw_name = "bi_tcxo" },
{ .fw_name = "dsi0_phy_pll_out_dsiclk" }, { .fw_name = "dsi0_phy_pll_out_dsiclk" },
{ .fw_name = "dsi1_phy_pll_out_dsiclk" },
}; };
static const struct parent_map disp_cc_parent_map_5[] = { static const struct parent_map disp_cc_parent_map_5[] = {
...@@ -445,6 +443,10 @@ static struct clk_branch disp_cc_sleep_clk = { ...@@ -445,6 +443,10 @@ static struct clk_branch disp_cc_sleep_clk = {
}, },
}; };
static const struct qcom_reset_map disp_cc_qcm2290_resets[] = {
[DISP_CC_MDSS_CORE_BCR] = { 0x2000 },
};
static struct gdsc mdss_gdsc = { static struct gdsc mdss_gdsc = {
.gdscr = 0x3000, .gdscr = 0x3000,
.pd = { .pd = {
...@@ -494,6 +496,8 @@ static const struct qcom_cc_desc disp_cc_qcm2290_desc = { ...@@ -494,6 +496,8 @@ static const struct qcom_cc_desc disp_cc_qcm2290_desc = {
.num_clks = ARRAY_SIZE(disp_cc_qcm2290_clocks), .num_clks = ARRAY_SIZE(disp_cc_qcm2290_clocks),
.gdscs = disp_cc_qcm2290_gdscs, .gdscs = disp_cc_qcm2290_gdscs,
.num_gdscs = ARRAY_SIZE(disp_cc_qcm2290_gdscs), .num_gdscs = ARRAY_SIZE(disp_cc_qcm2290_gdscs),
.resets = disp_cc_qcm2290_resets,
.num_resets = ARRAY_SIZE(disp_cc_qcm2290_resets),
}; };
static const struct of_device_id disp_cc_qcm2290_match_table[] = { static const struct of_device_id disp_cc_qcm2290_match_table[] = {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -3754,19 +3754,17 @@ static int gcc_msm8960_probe(struct platform_device *pdev) ...@@ -3754,19 +3754,17 @@ static int gcc_msm8960_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int gcc_msm8960_remove(struct platform_device *pdev) static void gcc_msm8960_remove(struct platform_device *pdev)
{ {
struct platform_device *tsens = platform_get_drvdata(pdev); struct platform_device *tsens = platform_get_drvdata(pdev);
if (tsens) if (tsens)
platform_device_unregister(tsens); platform_device_unregister(tsens);
return 0;
} }
static struct platform_driver gcc_msm8960_driver = { static struct platform_driver gcc_msm8960_driver = {
.probe = gcc_msm8960_probe, .probe = gcc_msm8960_probe,
.remove = gcc_msm8960_remove, .remove_new = gcc_msm8960_remove,
.driver = { .driver = {
.name = "gcc-msm8960", .name = "gcc-msm8960",
.of_match_table = gcc_msm8960_match_table, .of_match_table = gcc_msm8960_match_table,
......
...@@ -3455,7 +3455,8 @@ static struct gdsc usb30_gdsc = { ...@@ -3455,7 +3455,8 @@ static struct gdsc usb30_gdsc = {
.pd = { .pd = {
.name = "usb30", .name = "usb30",
}, },
.pwrsts = PWRSTS_OFF_ON, /* TODO: Change to OFF_ON when USB drivers get proper suspend support */
.pwrsts = PWRSTS_RET_ON,
}; };
static struct gdsc pcie0_gdsc = { static struct gdsc pcie0_gdsc = {
......
...@@ -2898,7 +2898,8 @@ static struct gdsc usb_30_gdsc = { ...@@ -2898,7 +2898,8 @@ static struct gdsc usb_30_gdsc = {
.pd = { .pd = {
.name = "usb_30_gdsc", .name = "usb_30_gdsc",
}, },
.pwrsts = PWRSTS_OFF_ON, /* TODO: Change to OFF_ON when USB drivers get proper suspend support */
.pwrsts = PWRSTS_RET_ON,
.flags = VOTABLE, .flags = VOTABLE,
}; };
......
...@@ -1243,7 +1243,8 @@ static struct clk_rcg2 gcc_sdcc2_apps_clk_src = { ...@@ -1243,7 +1243,8 @@ static struct clk_rcg2 gcc_sdcc2_apps_clk_src = {
.name = "gcc_sdcc2_apps_clk_src", .name = "gcc_sdcc2_apps_clk_src",
.parent_data = gcc_parents_12, .parent_data = gcc_parents_12,
.num_parents = ARRAY_SIZE(gcc_parents_12), .num_parents = ARRAY_SIZE(gcc_parents_12),
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_floor_ops,
.flags = CLK_OPS_PARENT_ENABLE,
}, },
}; };
......
...@@ -6873,6 +6873,22 @@ static struct gdsc usb30_sec_gdsc = { ...@@ -6873,6 +6873,22 @@ static struct gdsc usb30_sec_gdsc = {
.pwrsts = PWRSTS_RET_ON, .pwrsts = PWRSTS_RET_ON,
}; };
static struct gdsc emac_0_gdsc = {
.gdscr = 0xaa004,
.pd = {
.name = "emac_0_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
};
static struct gdsc emac_1_gdsc = {
.gdscr = 0xba004,
.pd = {
.name = "emac_1_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
};
static struct clk_regmap *gcc_sc8280xp_clocks[] = { static struct clk_regmap *gcc_sc8280xp_clocks[] = {
[GCC_AGGRE_NOC_PCIE0_TUNNEL_AXI_CLK] = &gcc_aggre_noc_pcie0_tunnel_axi_clk.clkr, [GCC_AGGRE_NOC_PCIE0_TUNNEL_AXI_CLK] = &gcc_aggre_noc_pcie0_tunnel_axi_clk.clkr,
[GCC_AGGRE_NOC_PCIE1_TUNNEL_AXI_CLK] = &gcc_aggre_noc_pcie1_tunnel_axi_clk.clkr, [GCC_AGGRE_NOC_PCIE1_TUNNEL_AXI_CLK] = &gcc_aggre_noc_pcie1_tunnel_axi_clk.clkr,
...@@ -7351,6 +7367,8 @@ static struct gdsc *gcc_sc8280xp_gdscs[] = { ...@@ -7351,6 +7367,8 @@ static struct gdsc *gcc_sc8280xp_gdscs[] = {
[USB30_MP_GDSC] = &usb30_mp_gdsc, [USB30_MP_GDSC] = &usb30_mp_gdsc,
[USB30_PRIM_GDSC] = &usb30_prim_gdsc, [USB30_PRIM_GDSC] = &usb30_prim_gdsc,
[USB30_SEC_GDSC] = &usb30_sec_gdsc, [USB30_SEC_GDSC] = &usb30_sec_gdsc,
[EMAC_0_GDSC] = &emac_0_gdsc,
[EMAC_1_GDSC] = &emac_1_gdsc,
}; };
static const struct clk_rcg_dfs_data gcc_dfs_clocks[] = { static const struct clk_rcg_dfs_data gcc_dfs_clocks[] = {
......
...@@ -694,7 +694,7 @@ static struct clk_rcg2 gcc_camss_axi_clk_src = { ...@@ -694,7 +694,7 @@ static struct clk_rcg2 gcc_camss_axi_clk_src = {
.parent_data = gcc_parents_7, .parent_data = gcc_parents_7,
.num_parents = ARRAY_SIZE(gcc_parents_7), .num_parents = ARRAY_SIZE(gcc_parents_7),
.flags = CLK_SET_RATE_PARENT, .flags = CLK_SET_RATE_PARENT,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -715,7 +715,7 @@ static struct clk_rcg2 gcc_camss_cci_clk_src = { ...@@ -715,7 +715,7 @@ static struct clk_rcg2 gcc_camss_cci_clk_src = {
.parent_data = gcc_parents_9, .parent_data = gcc_parents_9,
.num_parents = ARRAY_SIZE(gcc_parents_9), .num_parents = ARRAY_SIZE(gcc_parents_9),
.flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, .flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -738,7 +738,7 @@ static struct clk_rcg2 gcc_camss_csi0phytimer_clk_src = { ...@@ -738,7 +738,7 @@ static struct clk_rcg2 gcc_camss_csi0phytimer_clk_src = {
.parent_data = gcc_parents_4, .parent_data = gcc_parents_4,
.num_parents = ARRAY_SIZE(gcc_parents_4), .num_parents = ARRAY_SIZE(gcc_parents_4),
.flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, .flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -753,7 +753,7 @@ static struct clk_rcg2 gcc_camss_csi1phytimer_clk_src = { ...@@ -753,7 +753,7 @@ static struct clk_rcg2 gcc_camss_csi1phytimer_clk_src = {
.parent_data = gcc_parents_4, .parent_data = gcc_parents_4,
.num_parents = ARRAY_SIZE(gcc_parents_4), .num_parents = ARRAY_SIZE(gcc_parents_4),
.flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, .flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -768,7 +768,7 @@ static struct clk_rcg2 gcc_camss_csi2phytimer_clk_src = { ...@@ -768,7 +768,7 @@ static struct clk_rcg2 gcc_camss_csi2phytimer_clk_src = {
.parent_data = gcc_parents_4, .parent_data = gcc_parents_4,
.num_parents = ARRAY_SIZE(gcc_parents_4), .num_parents = ARRAY_SIZE(gcc_parents_4),
.flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, .flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -790,7 +790,7 @@ static struct clk_rcg2 gcc_camss_mclk0_clk_src = { ...@@ -790,7 +790,7 @@ static struct clk_rcg2 gcc_camss_mclk0_clk_src = {
.parent_data = gcc_parents_3, .parent_data = gcc_parents_3,
.num_parents = ARRAY_SIZE(gcc_parents_3), .num_parents = ARRAY_SIZE(gcc_parents_3),
.flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, .flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -805,7 +805,7 @@ static struct clk_rcg2 gcc_camss_mclk1_clk_src = { ...@@ -805,7 +805,7 @@ static struct clk_rcg2 gcc_camss_mclk1_clk_src = {
.parent_data = gcc_parents_3, .parent_data = gcc_parents_3,
.num_parents = ARRAY_SIZE(gcc_parents_3), .num_parents = ARRAY_SIZE(gcc_parents_3),
.flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, .flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -820,7 +820,7 @@ static struct clk_rcg2 gcc_camss_mclk2_clk_src = { ...@@ -820,7 +820,7 @@ static struct clk_rcg2 gcc_camss_mclk2_clk_src = {
.parent_data = gcc_parents_3, .parent_data = gcc_parents_3,
.num_parents = ARRAY_SIZE(gcc_parents_3), .num_parents = ARRAY_SIZE(gcc_parents_3),
.flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, .flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -835,7 +835,7 @@ static struct clk_rcg2 gcc_camss_mclk3_clk_src = { ...@@ -835,7 +835,7 @@ static struct clk_rcg2 gcc_camss_mclk3_clk_src = {
.parent_data = gcc_parents_3, .parent_data = gcc_parents_3,
.num_parents = ARRAY_SIZE(gcc_parents_3), .num_parents = ARRAY_SIZE(gcc_parents_3),
.flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, .flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -857,7 +857,7 @@ static struct clk_rcg2 gcc_camss_ope_ahb_clk_src = { ...@@ -857,7 +857,7 @@ static struct clk_rcg2 gcc_camss_ope_ahb_clk_src = {
.parent_data = gcc_parents_8, .parent_data = gcc_parents_8,
.num_parents = ARRAY_SIZE(gcc_parents_8), .num_parents = ARRAY_SIZE(gcc_parents_8),
.flags = CLK_SET_RATE_PARENT, .flags = CLK_SET_RATE_PARENT,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -881,7 +881,7 @@ static struct clk_rcg2 gcc_camss_ope_clk_src = { ...@@ -881,7 +881,7 @@ static struct clk_rcg2 gcc_camss_ope_clk_src = {
.parent_data = gcc_parents_8, .parent_data = gcc_parents_8,
.num_parents = ARRAY_SIZE(gcc_parents_8), .num_parents = ARRAY_SIZE(gcc_parents_8),
.flags = CLK_SET_RATE_PARENT, .flags = CLK_SET_RATE_PARENT,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -916,7 +916,7 @@ static struct clk_rcg2 gcc_camss_tfe_0_clk_src = { ...@@ -916,7 +916,7 @@ static struct clk_rcg2 gcc_camss_tfe_0_clk_src = {
.parent_data = gcc_parents_5, .parent_data = gcc_parents_5,
.num_parents = ARRAY_SIZE(gcc_parents_5), .num_parents = ARRAY_SIZE(gcc_parents_5),
.flags = CLK_SET_RATE_PARENT, .flags = CLK_SET_RATE_PARENT,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -941,7 +941,7 @@ static struct clk_rcg2 gcc_camss_tfe_0_csid_clk_src = { ...@@ -941,7 +941,7 @@ static struct clk_rcg2 gcc_camss_tfe_0_csid_clk_src = {
.parent_data = gcc_parents_6, .parent_data = gcc_parents_6,
.num_parents = ARRAY_SIZE(gcc_parents_6), .num_parents = ARRAY_SIZE(gcc_parents_6),
.flags = CLK_SET_RATE_PARENT, .flags = CLK_SET_RATE_PARENT,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -956,7 +956,7 @@ static struct clk_rcg2 gcc_camss_tfe_1_clk_src = { ...@@ -956,7 +956,7 @@ static struct clk_rcg2 gcc_camss_tfe_1_clk_src = {
.parent_data = gcc_parents_5, .parent_data = gcc_parents_5,
.num_parents = ARRAY_SIZE(gcc_parents_5), .num_parents = ARRAY_SIZE(gcc_parents_5),
.flags = CLK_SET_RATE_PARENT, .flags = CLK_SET_RATE_PARENT,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -971,7 +971,7 @@ static struct clk_rcg2 gcc_camss_tfe_1_csid_clk_src = { ...@@ -971,7 +971,7 @@ static struct clk_rcg2 gcc_camss_tfe_1_csid_clk_src = {
.parent_data = gcc_parents_6, .parent_data = gcc_parents_6,
.num_parents = ARRAY_SIZE(gcc_parents_6), .num_parents = ARRAY_SIZE(gcc_parents_6),
.flags = CLK_SET_RATE_PARENT, .flags = CLK_SET_RATE_PARENT,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -986,7 +986,7 @@ static struct clk_rcg2 gcc_camss_tfe_2_clk_src = { ...@@ -986,7 +986,7 @@ static struct clk_rcg2 gcc_camss_tfe_2_clk_src = {
.parent_data = gcc_parents_5, .parent_data = gcc_parents_5,
.num_parents = ARRAY_SIZE(gcc_parents_5), .num_parents = ARRAY_SIZE(gcc_parents_5),
.flags = CLK_SET_RATE_PARENT, .flags = CLK_SET_RATE_PARENT,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -1001,7 +1001,7 @@ static struct clk_rcg2 gcc_camss_tfe_2_csid_clk_src = { ...@@ -1001,7 +1001,7 @@ static struct clk_rcg2 gcc_camss_tfe_2_csid_clk_src = {
.parent_data = gcc_parents_6, .parent_data = gcc_parents_6,
.num_parents = ARRAY_SIZE(gcc_parents_6), .num_parents = ARRAY_SIZE(gcc_parents_6),
.flags = CLK_SET_RATE_PARENT, .flags = CLK_SET_RATE_PARENT,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -1024,7 +1024,7 @@ static struct clk_rcg2 gcc_camss_tfe_cphy_rx_clk_src = { ...@@ -1024,7 +1024,7 @@ static struct clk_rcg2 gcc_camss_tfe_cphy_rx_clk_src = {
.parent_data = gcc_parents_10, .parent_data = gcc_parents_10,
.num_parents = ARRAY_SIZE(gcc_parents_10), .num_parents = ARRAY_SIZE(gcc_parents_10),
.flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, .flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -1046,7 +1046,7 @@ static struct clk_rcg2 gcc_camss_top_ahb_clk_src = { ...@@ -1046,7 +1046,7 @@ static struct clk_rcg2 gcc_camss_top_ahb_clk_src = {
.parent_data = gcc_parents_7, .parent_data = gcc_parents_7,
.num_parents = ARRAY_SIZE(gcc_parents_7), .num_parents = ARRAY_SIZE(gcc_parents_7),
.flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, .flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -1116,7 +1116,7 @@ static struct clk_rcg2 gcc_pdm2_clk_src = { ...@@ -1116,7 +1116,7 @@ static struct clk_rcg2 gcc_pdm2_clk_src = {
.name = "gcc_pdm2_clk_src", .name = "gcc_pdm2_clk_src",
.parent_data = gcc_parents_0, .parent_data = gcc_parents_0,
.num_parents = ARRAY_SIZE(gcc_parents_0), .num_parents = ARRAY_SIZE(gcc_parents_0),
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -1329,7 +1329,7 @@ static struct clk_rcg2 gcc_ufs_phy_axi_clk_src = { ...@@ -1329,7 +1329,7 @@ static struct clk_rcg2 gcc_ufs_phy_axi_clk_src = {
.name = "gcc_ufs_phy_axi_clk_src", .name = "gcc_ufs_phy_axi_clk_src",
.parent_data = gcc_parents_0, .parent_data = gcc_parents_0,
.num_parents = ARRAY_SIZE(gcc_parents_0), .num_parents = ARRAY_SIZE(gcc_parents_0),
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -1351,7 +1351,7 @@ static struct clk_rcg2 gcc_ufs_phy_ice_core_clk_src = { ...@@ -1351,7 +1351,7 @@ static struct clk_rcg2 gcc_ufs_phy_ice_core_clk_src = {
.name = "gcc_ufs_phy_ice_core_clk_src", .name = "gcc_ufs_phy_ice_core_clk_src",
.parent_data = gcc_parents_0, .parent_data = gcc_parents_0,
.num_parents = ARRAY_SIZE(gcc_parents_0), .num_parents = ARRAY_SIZE(gcc_parents_0),
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -1392,7 +1392,7 @@ static struct clk_rcg2 gcc_ufs_phy_unipro_core_clk_src = { ...@@ -1392,7 +1392,7 @@ static struct clk_rcg2 gcc_ufs_phy_unipro_core_clk_src = {
.name = "gcc_ufs_phy_unipro_core_clk_src", .name = "gcc_ufs_phy_unipro_core_clk_src",
.parent_data = gcc_parents_0, .parent_data = gcc_parents_0,
.num_parents = ARRAY_SIZE(gcc_parents_0), .num_parents = ARRAY_SIZE(gcc_parents_0),
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -1414,7 +1414,7 @@ static struct clk_rcg2 gcc_usb30_prim_master_clk_src = { ...@@ -1414,7 +1414,7 @@ static struct clk_rcg2 gcc_usb30_prim_master_clk_src = {
.name = "gcc_usb30_prim_master_clk_src", .name = "gcc_usb30_prim_master_clk_src",
.parent_data = gcc_parents_0, .parent_data = gcc_parents_0,
.num_parents = ARRAY_SIZE(gcc_parents_0), .num_parents = ARRAY_SIZE(gcc_parents_0),
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
...@@ -1483,7 +1483,7 @@ static struct clk_rcg2 gcc_video_venus_clk_src = { ...@@ -1483,7 +1483,7 @@ static struct clk_rcg2 gcc_video_venus_clk_src = {
.parent_data = gcc_parents_13, .parent_data = gcc_parents_13,
.num_parents = ARRAY_SIZE(gcc_parents_13), .num_parents = ARRAY_SIZE(gcc_parents_13),
.flags = CLK_SET_RATE_PARENT, .flags = CLK_SET_RATE_PARENT,
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_shared_ops,
}, },
}; };
......
...@@ -3534,7 +3534,8 @@ static struct gdsc usb30_prim_gdsc = { ...@@ -3534,7 +3534,8 @@ static struct gdsc usb30_prim_gdsc = {
.pd = { .pd = {
.name = "usb30_prim_gdsc", .name = "usb30_prim_gdsc",
}, },
.pwrsts = PWRSTS_OFF_ON, /* TODO: Change to OFF_ON when USB drivers get proper suspend support */
.pwrsts = PWRSTS_RET_ON,
}; };
static struct gdsc ufs_phy_gdsc = { static struct gdsc ufs_phy_gdsc = {
......
This diff is collapsed.
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "clk-regmap.h" #include "clk-regmap.h"
#include "clk-regmap-divider.h" #include "clk-regmap-divider.h"
#include "clk-regmap-mux.h" #include "clk-regmap-mux.h"
#include "clk-regmap-phy-mux.h"
#include "gdsc.h" #include "gdsc.h"
#include "reset.h" #include "reset.h"
...@@ -158,26 +159,6 @@ static const struct clk_parent_data gcc_parent_data_3[] = { ...@@ -158,26 +159,6 @@ static const struct clk_parent_data gcc_parent_data_3[] = {
{ .fw_name = "bi_tcxo" }, { .fw_name = "bi_tcxo" },
}; };
static const struct parent_map gcc_parent_map_4[] = {
{ P_PCIE_0_PIPE_CLK, 0 },
{ P_BI_TCXO, 2 },
};
static const struct clk_parent_data gcc_parent_data_4[] = {
{ .fw_name = "pcie_0_pipe_clk", },
{ .fw_name = "bi_tcxo" },
};
static const struct parent_map gcc_parent_map_5[] = {
{ P_PCIE_1_PIPE_CLK, 0 },
{ P_BI_TCXO, 2 },
};
static const struct clk_parent_data gcc_parent_data_5[] = {
{ .fw_name = "pcie_1_pipe_clk" },
{ .fw_name = "bi_tcxo" },
};
static const struct parent_map gcc_parent_map_6[] = { static const struct parent_map gcc_parent_map_6[] = {
{ P_BI_TCXO, 0 }, { P_BI_TCXO, 0 },
{ P_GCC_GPLL0_OUT_MAIN, 1 }, { P_GCC_GPLL0_OUT_MAIN, 1 },
...@@ -274,32 +255,30 @@ static const struct clk_parent_data gcc_parent_data_14[] = { ...@@ -274,32 +255,30 @@ static const struct clk_parent_data gcc_parent_data_14[] = {
{ .fw_name = "bi_tcxo" }, { .fw_name = "bi_tcxo" },
}; };
static struct clk_regmap_mux gcc_pcie_0_pipe_clk_src = { static struct clk_regmap_phy_mux gcc_pcie_0_pipe_clk_src = {
.reg = 0x6b054, .reg = 0x6b054,
.shift = 0,
.width = 2,
.parent_map = gcc_parent_map_4,
.clkr = { .clkr = {
.hw.init = &(struct clk_init_data){ .hw.init = &(struct clk_init_data){
.name = "gcc_pcie_0_pipe_clk_src", .name = "gcc_pcie_0_pipe_clk_src",
.parent_data = gcc_parent_data_4, .parent_data = &(const struct clk_parent_data){
.num_parents = ARRAY_SIZE(gcc_parent_data_4), .fw_name = "pcie_0_pipe_clk",
.ops = &clk_regmap_mux_closest_ops, },
.num_parents = 1,
.ops = &clk_regmap_phy_mux_ops,
}, },
}, },
}; };
static struct clk_regmap_mux gcc_pcie_1_pipe_clk_src = { static struct clk_regmap_phy_mux gcc_pcie_1_pipe_clk_src = {
.reg = 0x8d054, .reg = 0x8d054,
.shift = 0,
.width = 2,
.parent_map = gcc_parent_map_5,
.clkr = { .clkr = {
.hw.init = &(struct clk_init_data){ .hw.init = &(struct clk_init_data){
.name = "gcc_pcie_1_pipe_clk_src", .name = "gcc_pcie_1_pipe_clk_src",
.parent_data = gcc_parent_data_5, .parent_data = &(const struct clk_parent_data){
.num_parents = ARRAY_SIZE(gcc_parent_data_5), .fw_name = "pcie_1_pipe_clk",
.ops = &clk_regmap_mux_closest_ops, },
.num_parents = 1,
.ops = &clk_regmap_phy_mux_ops,
}, },
}, },
}; };
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -696,6 +696,8 @@ static const struct qcom_cc_desc lpass_cc_sc7280_desc = { ...@@ -696,6 +696,8 @@ static const struct qcom_cc_desc lpass_cc_sc7280_desc = {
.config = &lpass_audio_cc_sc7280_regmap_config, .config = &lpass_audio_cc_sc7280_regmap_config,
.clks = lpass_cc_sc7280_clocks, .clks = lpass_cc_sc7280_clocks,
.num_clks = ARRAY_SIZE(lpass_cc_sc7280_clocks), .num_clks = ARRAY_SIZE(lpass_cc_sc7280_clocks),
.gdscs = lpass_aon_cc_sc7280_gdscs,
.num_gdscs = ARRAY_SIZE(lpass_aon_cc_sc7280_gdscs),
}; };
static const struct qcom_cc_desc lpass_audio_cc_sc7280_desc = { static const struct qcom_cc_desc lpass_audio_cc_sc7280_desc = {
......
...@@ -121,14 +121,18 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev) ...@@ -121,14 +121,18 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev)
goto destroy_pm_clk; goto destroy_pm_clk;
} }
if (!of_property_read_bool(pdev->dev.of_node, "qcom,adsp-pil-mode")) {
lpass_regmap_config.name = "qdsp6ss"; lpass_regmap_config.name = "qdsp6ss";
lpass_regmap_config.max_register = 0x3f;
desc = &lpass_qdsp6ss_sc7280_desc; desc = &lpass_qdsp6ss_sc7280_desc;
ret = qcom_cc_probe_by_index(pdev, 0, desc); ret = qcom_cc_probe_by_index(pdev, 0, desc);
if (ret) if (ret)
goto destroy_pm_clk; goto destroy_pm_clk;
}
lpass_regmap_config.name = "top_cc"; lpass_regmap_config.name = "top_cc";
lpass_regmap_config.max_register = 0x4;
desc = &lpass_cc_top_sc7280_desc; desc = &lpass_cc_top_sc7280_desc;
ret = qcom_cc_probe_by_index(pdev, 1, desc); ret = qcom_cc_probe_by_index(pdev, 1, desc);
......
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
#define DISP_CC_XO_CLK 19 #define DISP_CC_XO_CLK 19
#define DISP_CC_XO_CLK_SRC 20 #define DISP_CC_XO_CLK_SRC 20
/* GDSCs */
#define MDSS_GDSC 0 #define MDSS_GDSC 0
/* Resets */
#define DISP_CC_MDSS_CORE_BCR 0
#endif #endif
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
#ifndef _DT_BINDINGS_CLK_MSM_GCC_8917_H
#define _DT_BINDINGS_CLK_MSM_GCC_8917_H
/* Clocks */
#define APSS_AHB_CLK_SRC 0
#define BLSP1_QUP2_I2C_APPS_CLK_SRC 1
#define BLSP1_QUP2_SPI_APPS_CLK_SRC 2
#define BLSP1_QUP3_I2C_APPS_CLK_SRC 3
#define BLSP1_QUP3_SPI_APPS_CLK_SRC 4
#define BLSP1_QUP4_I2C_APPS_CLK_SRC 5
#define BLSP1_QUP4_SPI_APPS_CLK_SRC 6
#define BLSP1_UART1_APPS_CLK_SRC 7
#define BLSP1_UART2_APPS_CLK_SRC 8
#define BLSP2_QUP1_I2C_APPS_CLK_SRC 9
#define BLSP2_QUP1_SPI_APPS_CLK_SRC 10
#define BLSP2_QUP2_I2C_APPS_CLK_SRC 11
#define BLSP2_QUP2_SPI_APPS_CLK_SRC 12
#define BLSP2_QUP3_I2C_APPS_CLK_SRC 13
#define BLSP2_QUP3_SPI_APPS_CLK_SRC 14
#define BLSP2_UART1_APPS_CLK_SRC 15
#define BLSP2_UART2_APPS_CLK_SRC 16
#define BYTE0_CLK_SRC 17
#define CAMSS_GP0_CLK_SRC 18
#define CAMSS_GP1_CLK_SRC 19
#define CAMSS_TOP_AHB_CLK_SRC 20
#define CCI_CLK_SRC 21
#define CPP_CLK_SRC 22
#define CRYPTO_CLK_SRC 23
#define CSI0PHYTIMER_CLK_SRC 24
#define CSI0_CLK_SRC 25
#define CSI1PHYTIMER_CLK_SRC 26
#define CSI1_CLK_SRC 27
#define CSI2_CLK_SRC 28
#define ESC0_CLK_SRC 29
#define GCC_APSS_TCU_CLK 30
#define GCC_BIMC_GFX_CLK 31
#define GCC_BIMC_GPU_CLK 32
#define GCC_BLSP1_AHB_CLK 33
#define GCC_BLSP1_QUP2_I2C_APPS_CLK 34
#define GCC_BLSP1_QUP2_SPI_APPS_CLK 35
#define GCC_BLSP1_QUP3_I2C_APPS_CLK 36
#define GCC_BLSP1_QUP3_SPI_APPS_CLK 37
#define GCC_BLSP1_QUP4_I2C_APPS_CLK 38
#define GCC_BLSP1_QUP4_SPI_APPS_CLK 39
#define GCC_BLSP1_UART1_APPS_CLK 40
#define GCC_BLSP1_UART2_APPS_CLK 41
#define GCC_BLSP2_AHB_CLK 42
#define GCC_BLSP2_QUP1_I2C_APPS_CLK 43
#define GCC_BLSP2_QUP1_SPI_APPS_CLK 44
#define GCC_BLSP2_QUP2_I2C_APPS_CLK 45
#define GCC_BLSP2_QUP2_SPI_APPS_CLK 46
#define GCC_BLSP2_QUP3_I2C_APPS_CLK 47
#define GCC_BLSP2_QUP3_SPI_APPS_CLK 48
#define GCC_BLSP2_UART1_APPS_CLK 49
#define GCC_BLSP2_UART2_APPS_CLK 50
#define GCC_BOOT_ROM_AHB_CLK 51
#define GCC_CAMSS_AHB_CLK 52
#define GCC_CAMSS_CCI_AHB_CLK 53
#define GCC_CAMSS_CCI_CLK 54
#define GCC_CAMSS_CPP_AHB_CLK 55
#define GCC_CAMSS_CPP_CLK 56
#define GCC_CAMSS_CSI0PHYTIMER_CLK 57
#define GCC_CAMSS_CSI0PHY_CLK 58
#define GCC_CAMSS_CSI0PIX_CLK 59
#define GCC_CAMSS_CSI0RDI_CLK 60
#define GCC_CAMSS_CSI0_AHB_CLK 61
#define GCC_CAMSS_CSI0_CLK 62
#define GCC_CAMSS_CSI1PHYTIMER_CLK 63
#define GCC_CAMSS_CSI1PHY_CLK 64
#define GCC_CAMSS_CSI1PIX_CLK 65
#define GCC_CAMSS_CSI1RDI_CLK 66
#define GCC_CAMSS_CSI1_AHB_CLK 67
#define GCC_CAMSS_CSI1_CLK 68
#define GCC_CAMSS_CSI2PHY_CLK 69
#define GCC_CAMSS_CSI2PIX_CLK 70
#define GCC_CAMSS_CSI2RDI_CLK 71
#define GCC_CAMSS_CSI2_AHB_CLK 72
#define GCC_CAMSS_CSI2_CLK 73
#define GCC_CAMSS_CSI_VFE0_CLK 74
#define GCC_CAMSS_CSI_VFE1_CLK 75
#define GCC_CAMSS_GP0_CLK 76
#define GCC_CAMSS_GP1_CLK 77
#define GCC_CAMSS_ISPIF_AHB_CLK 78
#define GCC_CAMSS_JPEG0_CLK 79
#define GCC_CAMSS_JPEG_AHB_CLK 80
#define GCC_CAMSS_JPEG_AXI_CLK 81
#define GCC_CAMSS_MCLK0_CLK 82
#define GCC_CAMSS_MCLK1_CLK 83
#define GCC_CAMSS_MCLK2_CLK 84
#define GCC_CAMSS_MICRO_AHB_CLK 85
#define GCC_CAMSS_TOP_AHB_CLK 86
#define GCC_CAMSS_VFE0_AHB_CLK 87
#define GCC_CAMSS_VFE0_AXI_CLK 88
#define GCC_CAMSS_VFE0_CLK 89
#define GCC_CAMSS_VFE1_AHB_CLK 90
#define GCC_CAMSS_VFE1_AXI_CLK 91
#define GCC_CAMSS_VFE1_CLK 92
#define GCC_CPP_TBU_CLK 93
#define GCC_CRYPTO_AHB_CLK 94
#define GCC_CRYPTO_AXI_CLK 95
#define GCC_CRYPTO_CLK 96
#define GCC_DCC_CLK 97
#define GCC_GFX_TBU_CLK 98
#define GCC_GFX_TCU_CLK 99
#define GCC_GP1_CLK 100
#define GCC_GP2_CLK 101
#define GCC_GP3_CLK 102
#define GCC_GTCU_AHB_CLK 103
#define GCC_JPEG_TBU_CLK 104
#define GCC_MDP_TBU_CLK 105
#define GCC_MDSS_AHB_CLK 106
#define GCC_MDSS_AXI_CLK 107
#define GCC_MDSS_BYTE0_CLK 108
#define GCC_MDSS_ESC0_CLK 109
#define GCC_MDSS_MDP_CLK 110
#define GCC_MDSS_PCLK0_CLK 111
#define GCC_MDSS_VSYNC_CLK 112
#define GCC_MSS_CFG_AHB_CLK 113
#define GCC_MSS_Q6_BIMC_AXI_CLK 114
#define GCC_OXILI_AHB_CLK 115
#define GCC_OXILI_GFX3D_CLK 116
#define GCC_PDM2_CLK 117
#define GCC_PDM_AHB_CLK 118
#define GCC_PRNG_AHB_CLK 119
#define GCC_QDSS_DAP_CLK 120
#define GCC_SDCC1_AHB_CLK 121
#define GCC_SDCC1_APPS_CLK 122
#define GCC_SDCC1_ICE_CORE_CLK 123
#define GCC_SDCC2_AHB_CLK 124
#define GCC_SDCC2_APPS_CLK 125
#define GCC_SMMU_CFG_CLK 126
#define GCC_USB2A_PHY_SLEEP_CLK 127
#define GCC_USB_HS_AHB_CLK 128
#define GCC_USB_HS_PHY_CFG_AHB_CLK 129
#define GCC_USB_HS_SYSTEM_CLK 130
#define GCC_VENUS0_AHB_CLK 131
#define GCC_VENUS0_AXI_CLK 132
#define GCC_VENUS0_CORE0_VCODEC0_CLK 133
#define GCC_VENUS0_VCODEC0_CLK 134
#define GCC_VENUS_TBU_CLK 135
#define GCC_VFE1_TBU_CLK 136
#define GCC_VFE_TBU_CLK 137
#define GFX3D_CLK_SRC 138
#define GP1_CLK_SRC 139
#define GP2_CLK_SRC 140
#define GP3_CLK_SRC 141
#define GPLL0 142
#define GPLL0_EARLY 143
#define GPLL3 144
#define GPLL3_EARLY 145
#define GPLL4 146
#define GPLL4_EARLY 147
#define GPLL6 148
#define GPLL6_EARLY 149
#define JPEG0_CLK_SRC 150
#define MCLK0_CLK_SRC 151
#define MCLK1_CLK_SRC 152
#define MCLK2_CLK_SRC 153
#define MDP_CLK_SRC 154
#define PCLK0_CLK_SRC 155
#define PDM2_CLK_SRC 156
#define SDCC1_APPS_CLK_SRC 157
#define SDCC1_ICE_CORE_CLK_SRC 158
#define SDCC2_APPS_CLK_SRC 159
#define USB_HS_SYSTEM_CLK_SRC 160
#define VCODEC0_CLK_SRC 161
#define VFE0_CLK_SRC 162
#define VFE1_CLK_SRC 163
#define VSYNC_CLK_SRC 164
/* GCC block resets */
#define GCC_CAMSS_MICRO_BCR 0
#define GCC_MSS_BCR 1
#define GCC_QUSB2_PHY_BCR 2
#define GCC_USB_HS_BCR 3
#define GCC_USB2_HS_PHY_ONLY_BCR 4
/* GDSCs */
#define CPP_GDSC 0
#define JPEG_GDSC 1
#define MDSS_GDSC 2
#define OXILI_GX_GDSC 3
#define VENUS_CORE0_GDSC 4
#define VENUS_GDSC 5
#define VFE0_GDSC 6
#define VFE1_GDSC 7
#endif
...@@ -492,5 +492,7 @@ ...@@ -492,5 +492,7 @@
#define USB30_MP_GDSC 9 #define USB30_MP_GDSC 9
#define USB30_PRIM_GDSC 10 #define USB30_PRIM_GDSC 10
#define USB30_SEC_GDSC 11 #define USB30_SEC_GDSC 11
#define EMAC_0_GDSC 12
#define EMAC_1_GDSC 13
#endif #endif
This diff is collapsed.
This diff is collapsed.
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
/*
* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2023, Linaro Limited
*/
#ifndef _DT_BINDINGS_CLK_QCOM_GPUCC_SA8775P_H
#define _DT_BINDINGS_CLK_QCOM_GPUCC_SA8775P_H
/* GPU_CC clocks */
#define GPU_CC_PLL0 0
#define GPU_CC_PLL1 1
#define GPU_CC_AHB_CLK 2
#define GPU_CC_CB_CLK 3
#define GPU_CC_CRC_AHB_CLK 4
#define GPU_CC_CX_FF_CLK 5
#define GPU_CC_CX_GMU_CLK 6
#define GPU_CC_CX_SNOC_DVM_CLK 7
#define GPU_CC_CXO_AON_CLK 8
#define GPU_CC_CXO_CLK 9
#define GPU_CC_DEMET_CLK 10
#define GPU_CC_DEMET_DIV_CLK_SRC 11
#define GPU_CC_FF_CLK_SRC 12
#define GPU_CC_GMU_CLK_SRC 13
#define GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK 14
#define GPU_CC_HUB_AHB_DIV_CLK_SRC 15
#define GPU_CC_HUB_AON_CLK 16
#define GPU_CC_HUB_CLK_SRC 17
#define GPU_CC_HUB_CX_INT_CLK 18
#define GPU_CC_HUB_CX_INT_DIV_CLK_SRC 19
#define GPU_CC_MEMNOC_GFX_CLK 20
#define GPU_CC_SLEEP_CLK 21
#define GPU_CC_XO_CLK_SRC 22
/* GPU_CC resets */
#define GPUCC_GPU_CC_ACD_BCR 0
#define GPUCC_GPU_CC_CB_BCR 1
#define GPUCC_GPU_CC_CX_BCR 2
#define GPUCC_GPU_CC_FAST_HUB_BCR 3
#define GPUCC_GPU_CC_FF_BCR 4
#define GPUCC_GPU_CC_GFX3D_AON_BCR 5
#define GPUCC_GPU_CC_GMU_BCR 6
#define GPUCC_GPU_CC_GX_BCR 7
#define GPUCC_GPU_CC_XO_BCR 8
/* GPU_CC power domains */
#define GPU_CC_CX_GDSC 0
#define GPU_CC_GX_GDSC 1
#endif /* _DT_BINDINGS_CLK_QCOM_GPUCC_SA8775P_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment