Skip to content

Commit fe4ae2f

Browse files
committed
Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Pull clk driver updates from Stephen Boyd: "Herein lies a smallish collection of clk driver updates and some core clk framework changes for the merge window. The core framework changes are only improving the debugfs interface to allow phase adjustments and report which consumers of a clk there are. These are most likely only of interest to kernel developers. On the clk driver side, it's a ghastly amount of updates with only a handful of new clk drivers. We have a couple new clk drivers for Qualcomm, per usual, and a driver for Renesas, Amlogic, and TI respectively. The updates are spread throughout the clk drivers. Some highlights are fixing kunit tests for different configurations like lockdep and big-endian, avoiding integer overflow in rate settable clks, moving clk_hw_onecell_data to the end of allocations so that drivers don't corrupt their private data, and migrating clk drivers to the regmap maple tree. Otherwise it's the usual fixes to clk drivers that only come along with testing the drivers on real hardware. New Drivers: - Add clock driver for TWL6032 - Initial support for the Qualcomm SM4450 Global Clock Controller and SM4450 RPMh clock controllers - Add Camera Clock Controller on Qualcomm SM8550 - Add support for the Renesas RZ/G3S (R9A08G045) SoC - Add Amlogic s4 main clock controller support Updates: - Make clk kunit tests work with lockdep - Fix clk gate kunit test for big-endian - Convert more than a handful of clk drivers to use regmap maple tree - Consider the CLK_FRAC_DIVIDER_ZERO_BASED in fractional divider clk implementation - Add consumer info to clk debugfs - Fix various clk drivers that have clk_hw_onecell_data not at the end of an allocation - Drop CLK_SET_RATE_PARENT for clocks with fixed-rate GPLLs across a variety of Qualcomm IPQ platforms - Add missing parent of APCS PLL on Qualcomm IPQ6018 - Add I2C QUP6 clk on Qualcomm IPQ6018 but mark it critical to avoid problems with RPM - Implement safe source switching for a53pll and use on Qualcomm IPQ5332 - Add support for Stromer Plus PLLs to Qualcomm clk driver - Switch Qualcomm SM8550 Video and GPU clock controllers to use OLE PLL configure method - Non critical fixes to halt bit checks in Qualcomm clk drivers - Add SMMU GDSC for Qualcomm MSM8998 - Fix possible integer overflow in Qualcomm RCG frequency calculation code - Remove RPM managed clks from Qualcomm MSM8996 GCC driver - Add HFPLL configuration for the three HFPLLs in Qualcomm MSM8976 - Switch Qualcomm MSM8996 CBF clock driver's remove function to return void - Fix missing dependency for s4 clock controllers - Select MXC_CLK when building in the CLK_IMX8QXP - Fixes for error handling paths in i.MX8 ACM driver - Move the clocks check in i.MX8 ACM driver in order to log any error - Drop the unused return value of clk_imx_acm_detach_pm_domains - Drop non-existant IMX8MP_CLK_AUDIOMIX_PDM_ROOT clock - Fix error handling in i.MX8MQ clock driver - Allow a different LCDIF1 clock parent if DT describes it for i.MX6SX - Keep the SCU resource table sorted in the i.MX8DXL rsrc driver - Move the elcdif PLL clock registration above lcd_clk, as it is its parent - Correct some ENET specific clocks for i.MX8DXL platform - Drop the VPU_UART and VPUCORE from i.MX8QM as latest HW revision doesn't have them - Remove "de-featured" MLB support from i.MX8QM/QXP/DXL platforms - Skip registering clocks owned by Cortex-A partition SCU-based platforms - Add CAN_1/2 to i.MX8QM and M4_0, PI_0_PWM_0 and PI_0_I2C_0 to i.MX8QXP resources" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (128 commits) clk: Fix clk gate kunit test on big-endian CPUs clk: si521xx: Increase stack based print buffer size in probe clk: mediatek: fix double free in mtk_clk_register_pllfh() clk: socfpga: agilex: Add bounds-checking coverage for struct stratix10_clock_data clk: socfpga: Fix undefined behavior bug in struct stratix10_clock_data clk: sifive: Allow building the driver as a module clk: analogbits: Allow building the library as a module clk: sprd: Composite driver support offset config clk: Allow phase adjustment from debugfs clk: Show active consumers of clocks in debugfs clk: Use device_get_match_data() clk: visconti: Add bounds-checking coverage for struct visconti_pll_provider clk: visconti: Fix undefined behavior bug in struct visconti_pll_provider clk: cdce925: Extend match support for OF tables clk: si570: Simplify probe clk: si5351: Simplify probe clk: rs9: Use i2c_get_match_data() instead of device_get_match_data() clk: clk-si544: Simplify probe() and is_valid_frequency() clk: si521xx: Use i2c_get_match_data() instead of device_get_match_data() clk: meson: S4: select CONFIG_COMMON_CLK_MESON_CLKC_UTILS ...
2 parents c528943 + 0a6d7f8 commit fe4ae2f

File tree

126 files changed

+14392
-833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+14392
-833
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright (C) 2022-2023 Amlogic, Inc. All rights reserved
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/clock/amlogic,s4-peripherals-clkc.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Amlogic S4 Peripherals Clock Controller
9+
10+
maintainers:
11+
- Yu Tu <yu.tu@amlogic.com>
12+
13+
properties:
14+
compatible:
15+
const: amlogic,s4-peripherals-clkc
16+
17+
reg:
18+
maxItems: 1
19+
20+
clocks:
21+
minItems: 14
22+
items:
23+
- description: input fixed pll div2
24+
- description: input fixed pll div2p5
25+
- description: input fixed pll div3
26+
- description: input fixed pll div4
27+
- description: input fixed pll div5
28+
- description: input fixed pll div7
29+
- description: input hifi pll
30+
- description: input gp0 pll
31+
- description: input mpll0
32+
- description: input mpll1
33+
- description: input mpll2
34+
- description: input mpll3
35+
- description: input hdmi pll
36+
- description: input oscillator (usually at 24MHz)
37+
- description: input external 32kHz reference (optional)
38+
39+
clock-names:
40+
minItems: 14
41+
items:
42+
- const: fclk_div2
43+
- const: fclk_div2p5
44+
- const: fclk_div3
45+
- const: fclk_div4
46+
- const: fclk_div5
47+
- const: fclk_div7
48+
- const: hifi_pll
49+
- const: gp0_pll
50+
- const: mpll0
51+
- const: mpll1
52+
- const: mpll2
53+
- const: mpll3
54+
- const: hdmi_pll
55+
- const: xtal
56+
- const: ext_32k
57+
58+
"#clock-cells":
59+
const: 1
60+
61+
required:
62+
- compatible
63+
- reg
64+
- clocks
65+
- clock-names
66+
- "#clock-cells"
67+
68+
additionalProperties: false
69+
70+
examples:
71+
- |
72+
#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h>
73+
74+
clkc_periphs: clock-controller@fe000000 {
75+
compatible = "amlogic,s4-peripherals-clkc";
76+
reg = <0xfe000000 0x49c>;
77+
clocks = <&clkc_pll 3>,
78+
<&clkc_pll 13>,
79+
<&clkc_pll 5>,
80+
<&clkc_pll 7>,
81+
<&clkc_pll 9>,
82+
<&clkc_pll 11>,
83+
<&clkc_pll 17>,
84+
<&clkc_pll 15>,
85+
<&clkc_pll 25>,
86+
<&clkc_pll 27>,
87+
<&clkc_pll 29>,
88+
<&clkc_pll 31>,
89+
<&clkc_pll 20>,
90+
<&xtal>;
91+
clock-names = "fclk_div2", "fclk_div2p5", "fclk_div3", "fclk_div4",
92+
"fclk_div5", "fclk_div7", "hifi_pll", "gp0_pll",
93+
"mpll0", "mpll1", "mpll2", "mpll3", "hdmi_pll", "xtal";
94+
#clock-cells = <1>;
95+
};
96+
...
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright (C) 2022-2023 Amlogic, Inc. All rights reserved
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/clock/amlogic,s4-pll-clkc.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Amlogic S4 PLL Clock Controller
9+
10+
maintainers:
11+
- Yu Tu <yu.tu@amlogic.com>
12+
13+
properties:
14+
compatible:
15+
const: amlogic,s4-pll-clkc
16+
17+
reg:
18+
maxItems: 1
19+
20+
clocks:
21+
maxItems: 1
22+
23+
clock-names:
24+
items:
25+
- const: xtal
26+
27+
"#clock-cells":
28+
const: 1
29+
30+
required:
31+
- compatible
32+
- reg
33+
- clocks
34+
- clock-names
35+
- "#clock-cells"
36+
37+
additionalProperties: false
38+
39+
examples:
40+
- |
41+
clkc_pll: clock-controller@fe008000 {
42+
compatible = "amlogic,s4-pll-clkc";
43+
reg = <0xfe008000 0x1e8>;
44+
clocks = <&xtal>;
45+
clock-names = "xtal";
46+
#clock-cells = <1>;
47+
};
48+
49+
...

Documentation/devicetree/bindings/clock/qcom,hfpll.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ PROPERTIES
1212
"qcom,hfpll-apq8064", "qcom,hfpll"
1313
"qcom,hfpll-msm8974", "qcom,hfpll"
1414
"qcom,hfpll-msm8960", "qcom,hfpll"
15+
"qcom,msm8976-hfpll-a53", "qcom,hfpll"
16+
"qcom,msm8976-hfpll-a72", "qcom,hfpll"
17+
"qcom,msm8976-hfpll-cci", "qcom,hfpll"
1518

1619
- reg:
1720
Usage: required

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 <quic_ajipan@quicinc.com>
11+
- Taniya Das <quic_tdas@quicinc.com>
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+
...

Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@ description: |
1313
Qualcomm camera clock control module provides the clocks, resets and power
1414
domains on SM8450.
1515
16-
See also:: include/dt-bindings/clock/qcom,sm8450-camcc.h
16+
See also::
17+
include/dt-bindings/clock/qcom,sm8450-camcc.h
18+
include/dt-bindings/clock/qcom,sm8550-camcc.h
1719
1820
properties:
1921
compatible:
20-
const: qcom,sm8450-camcc
22+
enum:
23+
- qcom,sm8450-camcc
24+
- qcom,sm8550-camcc
2125

2226
clocks:
2327
items:

Documentation/devicetree/bindings/clock/renesas,rzg2l-cpg.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ properties:
2727
- renesas,r9a07g043-cpg # RZ/G2UL{Type-1,Type-2} and RZ/Five
2828
- renesas,r9a07g044-cpg # RZ/G2{L,LC}
2929
- renesas,r9a07g054-cpg # RZ/V2L
30+
- renesas,r9a08g045-cpg # RZ/G3S
3031
- renesas,r9a09g011-cpg # RZ/V2M
3132

3233
reg:

drivers/clk/.kunitconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ CONFIG_KUNIT=y
22
CONFIG_COMMON_CLK=y
33
CONFIG_CLK_KUNIT_TEST=y
44
CONFIG_CLK_GATE_KUNIT_TEST=y
5+
CONFIG_CLK_FD_KUNIT_TEST=y
56
CONFIG_UML_PCI_OVER_VIRTIO=n

drivers/clk/Kconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,15 @@ config COMMON_CLK_S2MPS11
277277
clock. These multi-function devices have two (S2MPS14) or three
278278
(S2MPS11, S5M8767) fixed-rate oscillators, clocked at 32KHz each.
279279

280+
config CLK_TWL
281+
tristate "Clock driver for the TWL PMIC family"
282+
depends on TWL4030_CORE
283+
help
284+
Enable support for controlling the clock resources on TWL family
285+
PMICs. These devices have some 32K clock outputs which can be
286+
controlled by software. For now, only the TWL6032 clocks are
287+
supported.
288+
280289
config CLK_TWL6040
281290
tristate "External McPDM functional clock from twl6040"
282291
depends on TWL6040_CORE
@@ -517,4 +526,11 @@ config CLK_GATE_KUNIT_TEST
517526
help
518527
Kunit test for the basic clk gate type.
519528

529+
config CLK_FD_KUNIT_TEST
530+
tristate "Basic fractional divider type Kunit test" if !KUNIT_ALL_TESTS
531+
depends on KUNIT
532+
default KUNIT_ALL_TESTS
533+
help
534+
Kunit test for the clk-fractional-divider type.
535+
520536
endif

drivers/clk/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ obj-$(CONFIG_COMMON_CLK) += clk-multiplier.o
1212
obj-$(CONFIG_COMMON_CLK) += clk-mux.o
1313
obj-$(CONFIG_COMMON_CLK) += clk-composite.o
1414
obj-$(CONFIG_COMMON_CLK) += clk-fractional-divider.o
15+
obj-$(CONFIG_CLK_FD_KUNIT_TEST) += clk-fractional-divider_test.o
1516
obj-$(CONFIG_COMMON_CLK) += clk-gpio.o
1617
ifeq ($(CONFIG_OF), y)
1718
obj-$(CONFIG_COMMON_CLK) += clk-conf.o
@@ -72,6 +73,7 @@ obj-$(CONFIG_COMMON_CLK_STM32H7) += clk-stm32h7.o
7273
obj-$(CONFIG_COMMON_CLK_STM32MP157) += clk-stm32mp1.o
7374
obj-$(CONFIG_COMMON_CLK_TPS68470) += clk-tps68470.o
7475
obj-$(CONFIG_CLK_TWL6040) += clk-twl6040.o
76+
obj-$(CONFIG_CLK_TWL) += clk-twl.o
7577
obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o
7678
obj-$(CONFIG_COMMON_CLK_RS9_PCIE) += clk-renesas-pcie.o
7779
obj-$(CONFIG_COMMON_CLK_SI521XX) += clk-si521xx.o

0 commit comments

Comments
 (0)