Skip to content

Commit 2643f0b

Browse files
committed
Merge branch '[email protected]' into clk-for-6.7
Merge the SM4450 RPMHCC and GCC through a topic branch, to allow reuse of the defines from the DeviceTree binding in the DeviceTree source.
2 parents 471e287 + c32c4ef commit 2643f0b

File tree

7 files changed

+3181
-0
lines changed

7 files changed

+3181
-0
lines changed

Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ properties:
2828
- qcom,sdx55-rpmh-clk
2929
- qcom,sdx65-rpmh-clk
3030
- qcom,sdx75-rpmh-clk
31+
- qcom,sm4450-rpmh-clk
3132
- qcom,sm6350-rpmh-clk
3233
- qcom,sm8150-rpmh-clk
3334
- qcom,sm8250-rpmh-clk
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/qcom,sm4450-gcc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm Global Clock & Reset Controller on SM4450
8+
9+
maintainers:
10+
- Ajit Pandey <[email protected]>
11+
- Taniya Das <[email protected]>
12+
13+
description: |
14+
Qualcomm global clock control module provides the clocks, resets and power
15+
domains on SM4450
16+
17+
See also:: include/dt-bindings/clock/qcom,sm4450-gcc.h
18+
19+
properties:
20+
compatible:
21+
const: qcom,sm4450-gcc
22+
23+
clocks:
24+
items:
25+
- description: Board XO source
26+
- description: Sleep clock source
27+
- description: UFS Phy Rx symbol 0 clock source
28+
- description: UFS Phy Rx symbol 1 clock source
29+
- description: UFS Phy Tx symbol 0 clock source
30+
- description: USB3 Phy wrapper pipe clock source
31+
32+
required:
33+
- compatible
34+
- clocks
35+
36+
allOf:
37+
- $ref: qcom,gcc.yaml#
38+
39+
unevaluatedProperties: false
40+
41+
examples:
42+
- |
43+
#include <dt-bindings/clock/qcom,rpmh.h>
44+
clock-controller@100000 {
45+
compatible = "qcom,sm4450-gcc";
46+
reg = <0x00100000 0x001f4200>;
47+
clocks = <&rpmhcc RPMH_CXO_CLK>, <&sleep_clk>,
48+
<&ufs_mem_phy 0>, <&ufs_mem_phy 1>,
49+
<&ufs_mem_phy 2>, <&usb_1_qmpphy>;
50+
#clock-cells = <1>;
51+
#reset-cells = <1>;
52+
#power-domain-cells = <1>;
53+
};
54+
55+
...

drivers/clk/qcom/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,15 @@ config SM_DISPCC_8550
841841
Say Y if you want to support display devices and functionality such as
842842
splash screen.
843843

844+
config SM_GCC_4450
845+
tristate "SM4450 Global Clock Controller"
846+
depends on ARM64 || COMPILE_TEST
847+
select QCOM_GDSC
848+
help
849+
Support for the global clock controller on SM4450 devices.
850+
Say Y if you want to use peripheral devices such as UART, SPI,
851+
I2C, USB, SD/UFS, PCIe, etc.
852+
844853
config SM_GCC_6115
845854
tristate "SM6115 and SM4250 Global Clock Controller"
846855
depends on ARM64 || COMPILE_TEST

drivers/clk/qcom/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ obj-$(CONFIG_SM_DISPCC_6375) += dispcc-sm6375.o
110110
obj-$(CONFIG_SM_DISPCC_8250) += dispcc-sm8250.o
111111
obj-$(CONFIG_SM_DISPCC_8450) += dispcc-sm8450.o
112112
obj-$(CONFIG_SM_DISPCC_8550) += dispcc-sm8550.o
113+
obj-$(CONFIG_SM_GCC_4450) += gcc-sm4450.o
113114
obj-$(CONFIG_SM_GCC_6115) += gcc-sm6115.o
114115
obj-$(CONFIG_SM_GCC_6125) += gcc-sm6125.o
115116
obj-$(CONFIG_SM_GCC_6350) += gcc-sm6350.o

drivers/clk/qcom/clk-rpmh.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ DEFINE_CLK_RPMH_VRM(ln_bb_clk3, _a2, "lnbclka3", 2);
350350

351351
DEFINE_CLK_RPMH_VRM(ln_bb_clk1, _a4, "lnbclka1", 4);
352352
DEFINE_CLK_RPMH_VRM(ln_bb_clk2, _a4, "lnbclka2", 4);
353+
DEFINE_CLK_RPMH_VRM(ln_bb_clk3, _a4, "lnbclka3", 4);
353354

354355
DEFINE_CLK_RPMH_VRM(ln_bb_clk2, _g4, "lnbclkg2", 4);
355356
DEFINE_CLK_RPMH_VRM(ln_bb_clk3, _g4, "lnbclkg3", 4);
@@ -717,6 +718,25 @@ static const struct clk_rpmh_desc clk_rpmh_sdx75 = {
717718
.num_clks = ARRAY_SIZE(sdx75_rpmh_clocks),
718719
};
719720

721+
static struct clk_hw *sm4450_rpmh_clocks[] = {
722+
[RPMH_CXO_CLK] = &clk_rpmh_bi_tcxo_div4.hw,
723+
[RPMH_CXO_CLK_A] = &clk_rpmh_bi_tcxo_div4_ao.hw,
724+
[RPMH_LN_BB_CLK2] = &clk_rpmh_ln_bb_clk2_a4.hw,
725+
[RPMH_LN_BB_CLK2_A] = &clk_rpmh_ln_bb_clk2_a4_ao.hw,
726+
[RPMH_LN_BB_CLK3] = &clk_rpmh_ln_bb_clk3_a4.hw,
727+
[RPMH_LN_BB_CLK3_A] = &clk_rpmh_ln_bb_clk3_a4_ao.hw,
728+
[RPMH_RF_CLK1] = &clk_rpmh_rf_clk1_a.hw,
729+
[RPMH_RF_CLK1_A] = &clk_rpmh_rf_clk1_a_ao.hw,
730+
[RPMH_RF_CLK5] = &clk_rpmh_rf_clk5_a.hw,
731+
[RPMH_RF_CLK5_A] = &clk_rpmh_rf_clk5_a_ao.hw,
732+
[RPMH_IPA_CLK] = &clk_rpmh_ipa.hw,
733+
};
734+
735+
static const struct clk_rpmh_desc clk_rpmh_sm4450 = {
736+
.clks = sm4450_rpmh_clocks,
737+
.num_clks = ARRAY_SIZE(sm4450_rpmh_clocks),
738+
};
739+
720740
static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec,
721741
void *data)
722742
{
@@ -810,6 +830,7 @@ static const struct of_device_id clk_rpmh_match_table[] = {
810830
{ .compatible = "qcom,sdx55-rpmh-clk", .data = &clk_rpmh_sdx55},
811831
{ .compatible = "qcom,sdx65-rpmh-clk", .data = &clk_rpmh_sdx65},
812832
{ .compatible = "qcom,sdx75-rpmh-clk", .data = &clk_rpmh_sdx75},
833+
{ .compatible = "qcom,sm4450-rpmh-clk", .data = &clk_rpmh_sm4450},
813834
{ .compatible = "qcom,sm6350-rpmh-clk", .data = &clk_rpmh_sm6350},
814835
{ .compatible = "qcom,sm8150-rpmh-clk", .data = &clk_rpmh_sm8150},
815836
{ .compatible = "qcom,sm8250-rpmh-clk", .data = &clk_rpmh_sm8250},

0 commit comments

Comments
 (0)