Skip to content

Commit 6af88cc

Browse files
committed
Merge branches 'clk-cleanup', 'clk-mediatek', 'clk-kunit', 'clk-xilinx' and 'clk-fixed-gate' into clk-next
- Various clk driver cleanups - MediaTek MT6735 SoC clks - MediaTek MT7620, MT7628 and MT7688 MMC clks - KUnit tests for clk-assigned-rates{,-u64} - Add a driver for gated fixed rate clocks * clk-cleanup: clk: clk-loongson2: Fix potential buffer overflow in flexible-array member access clk: Fix invalid execution of clk_set_rate clk: clk-loongson2: Fix memory corruption bug in struct loongson2_clk_provider clk: lan966x: make it selectable for ARCH_LAN969X clk: clk-apple-nco: Add NULL check in applnco_probe clk: starfive: jh7110-pll: Mark the probe function as __init clk: sophgo: avoid integer overflow in sg2042_pll_recalc_rate() clk: tegra: use clamp() in tegra_bpmp_clk_determine_rate() clk: cdce925: make regmap_cdce925_bus constant clk: Drop explicit initialization of struct i2c_device_id::driver_data to 0 clk: clk-qoriq: Replace of_node_put() with __free() clk: Remove unused clk_hw_rate_is_protected * clk-mediatek: clk: en7523: map io region in a single block clk: en7523: move en7581_reset_register() in en7581_clk_hw_init() clk: en7523: fix estimation of fixed rate for EN7581 clk: en7523: introduce chip_scu regmap clk: en7523: move clock_register in hw_init callback clk: en7523: remove REG_PCIE*_{MEM,MEM_MASK} configuration dt-bindings: clock: airoha: Update reg mapping for EN7581 SoC. clk: mediatek: Add drivers for MT6735 syscon clock and reset controllers dt-bindings: clock: mediatek: Add bindings for MT6735 syscon clock and reset controllers clk: mediatek: mt6735-apmixedsys: Fix an error handling path in clk_mt6735_apmixed_probe() clk: ralink: mtmips: add mmc related clocks for SoCs MT7620, MT7628 and MT7688 clk: ralink: mtmips: fix clocks probe order in oldest ralink SoCs clk: ralink: mtmips: fix clock plan for Ralink SoC RT3883 clk: mediatek: clk-mt8188-topckgen: Remove univpll from parents of mfg_core_tmp clk: mediatek: Add drivers for MediaTek MT6735 main clock and reset drivers dt-bindings: clock: Add MediaTek MT6735 clock and reset bindings clk: mediatek: drop two dead config options * clk-kunit: clk: Allow kunit tests to run without OF_OVERLAY enabled clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties of: kunit: Extract some overlay boiler plate into macros clk: test: Add test managed of_clk_add_hw_provider() * clk-xilinx: clk: clocking-wizard: move dynamic reconfig setup behind flag dt-bindings: clock: xilinx: describe whether dynamic reconfig is enabled clk: clocking-wizard: move clock registration to separate function clk: clocking-wizard: use devres versions of clk_hw API clk: clocking-wizard: use newer clk_hw API clk: clocking-wizard: simplify probe/remove with devres helpers * clk-fixed-gate: clk: clk-gpio: add driver for gated-fixed-clocks clk: clk-gpio: use dev_err_probe for gpio-get failure clk: clk-gpio: update documentation for gpio-gate clock dt-bindings: clocks: add binding for gated-fixed-clocks
5 parents 02fb4f0 + a9eaf30 + 94e6fdd + 8e742c6 + 4940071 commit 6af88cc

File tree

58 files changed

+2617
-333
lines changed

Some content is hidden

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

58 files changed

+2617
-333
lines changed

Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ properties:
3434
- airoha,en7581-scu
3535

3636
reg:
37-
minItems: 2
38-
maxItems: 4
37+
items:
38+
- description: scu base address
39+
- description: misc scu base address
40+
minItems: 1
3941

4042
"#clock-cells":
4143
description:
@@ -60,9 +62,7 @@ allOf:
6062
then:
6163
properties:
6264
reg:
63-
items:
64-
- description: scu base address
65-
- description: misc scu base address
65+
minItems: 2
6666

6767
'#reset-cells': false
6868

@@ -73,11 +73,7 @@ allOf:
7373
then:
7474
properties:
7575
reg:
76-
items:
77-
- description: scu base address
78-
- description: misc scu base address
79-
- description: reset base address
80-
- description: pb scu base address
76+
maxItems: 1
8177

8278
additionalProperties: false
8379

@@ -96,12 +92,9 @@ examples:
9692
#address-cells = <2>;
9793
#size-cells = <2>;
9894
99-
scuclk: clock-controller@1fa20000 {
95+
scuclk: clock-controller@1fb00000 {
10096
compatible = "airoha,en7581-scu";
101-
reg = <0x0 0x1fa20000 0x0 0x400>,
102-
<0x0 0x1fb00000 0x0 0x90>,
103-
<0x0 0x1fb00830 0x0 0x8>,
104-
<0x0 0x1fbe3400 0x0 0xfc>;
97+
reg = <0x0 0x1fb00000 0x0 0x970>;
10598
#clock-cells = <1>;
10699
#reset-cells = <1>;
107100
};
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+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/gated-fixed-clock.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Gated Fixed clock
8+
9+
maintainers:
10+
- Heiko Stuebner <[email protected]>
11+
12+
properties:
13+
compatible:
14+
const: gated-fixed-clock
15+
16+
"#clock-cells":
17+
const: 0
18+
19+
clock-frequency: true
20+
21+
clock-output-names:
22+
maxItems: 1
23+
24+
enable-gpios:
25+
description:
26+
Contains a single GPIO specifier for the GPIO that enables and disables
27+
the oscillator.
28+
maxItems: 1
29+
30+
vdd-supply:
31+
description: handle of the regulator that provides the supply voltage
32+
33+
required:
34+
- compatible
35+
- "#clock-cells"
36+
- clock-frequency
37+
- vdd-supply
38+
39+
additionalProperties: false
40+
41+
examples:
42+
- |
43+
clock-1000000000 {
44+
compatible = "gated-fixed-clock";
45+
#clock-cells = <0>;
46+
clock-frequency = <1000000000>;
47+
vdd-supply = <&reg_vdd>;
48+
};
49+
...

Documentation/devicetree/bindings/clock/mediatek,apmixedsys.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ maintainers:
1212

1313
description:
1414
The Mediatek apmixedsys controller provides PLLs to the system.
15-
The clock values can be found in <dt-bindings/clock/mt*-clk.h>.
15+
The clock values can be found in <dt-bindings/clock/mt*-clk.h>
16+
and <dt-bindings/clock/mediatek,mt*-apmixedsys.h>.
1617

1718
properties:
1819
compatible:
@@ -34,6 +35,7 @@ properties:
3435
- enum:
3536
- mediatek,mt2701-apmixedsys
3637
- mediatek,mt2712-apmixedsys
38+
- mediatek,mt6735-apmixedsys
3739
- mediatek,mt6765-apmixedsys
3840
- mediatek,mt6779-apmixed
3941
- mediatek,mt6795-apmixedsys

Documentation/devicetree/bindings/clock/mediatek,infracfg.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ maintainers:
1111

1212
description:
1313
The Mediatek infracfg controller provides various clocks and reset outputs
14-
to the system. The clock values can be found in <dt-bindings/clock/mt*-clk.h>,
15-
and reset values in <dt-bindings/reset/mt*-reset.h> and
16-
<dt-bindings/reset/mt*-resets.h>.
14+
to the system. The clock values can be found in <dt-bindings/clock/mt*-clk.h>
15+
and <dt-bindings/clock/mediatek,mt*-infracfg.h>, and reset values in
16+
<dt-bindings/reset/mt*-reset.h>, <dt-bindings/reset/mt*-resets.h> and
17+
<dt-bindings/reset/mediatek,mt*-infracfg.h>.
1718

1819
properties:
1920
compatible:
@@ -22,6 +23,7 @@ properties:
2223
- enum:
2324
- mediatek,mt2701-infracfg
2425
- mediatek,mt2712-infracfg
26+
- mediatek,mt6735-infracfg
2527
- mediatek,mt6765-infracfg
2628
- mediatek,mt6795-infracfg
2729
- mediatek,mt6779-infracfg_ao

Documentation/devicetree/bindings/clock/mediatek,pericfg.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ properties:
2020
- enum:
2121
- mediatek,mt2701-pericfg
2222
- mediatek,mt2712-pericfg
23+
- mediatek,mt6735-pericfg
2324
- mediatek,mt6765-pericfg
2425
- mediatek,mt6795-pericfg
2526
- mediatek,mt7622-pericfg

Documentation/devicetree/bindings/clock/mediatek,syscon.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ properties:
2828
- mediatek,mt2712-mfgcfg
2929
- mediatek,mt2712-vdecsys
3030
- mediatek,mt2712-vencsys
31+
- mediatek,mt6735-imgsys
32+
- mediatek,mt6735-mfgcfg
33+
- mediatek,mt6735-vdecsys
34+
- mediatek,mt6735-vencsys
3135
- mediatek,mt6765-camsys
3236
- mediatek,mt6765-imgsys
3337
- mediatek,mt6765-mipi0a

Documentation/devicetree/bindings/clock/mediatek,topckgen.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ maintainers:
1212

1313
description:
1414
The Mediatek topckgen controller provides various clocks to the system.
15-
The clock values can be found in <dt-bindings/clock/mt*-clk.h>.
15+
The clock values can be found in <dt-bindings/clock/mt*-clk.h> and
16+
<dt-bindings/clock/mediatek,mt*-topckgen.h>.
1617

1718
properties:
1819
compatible:
@@ -31,6 +32,7 @@ properties:
3132
- enum:
3233
- mediatek,mt2701-topckgen
3334
- mediatek,mt2712-topckgen
35+
- mediatek,mt6735-topckgen
3436
- mediatek,mt6765-topckgen
3537
- mediatek,mt6779-topckgen
3638
- mediatek,mt6795-topckgen

Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ properties:
3939
- const: clk_in1
4040
- const: s_axi_aclk
4141

42+
xlnx,static-config:
43+
$ref: /schemas/types.yaml#/definitions/flag
44+
description:
45+
Indicate whether the core has been configured without support for dynamic
46+
runtime reconfguration of the clocking primitive MMCM/PLL.
4247

4348
xlnx,speed-grade:
4449
$ref: /schemas/types.yaml#/definitions/uint32
@@ -70,6 +75,7 @@ examples:
7075
compatible = "xlnx,clocking-wizard";
7176
reg = <0xb0000000 0x10000>;
7277
#clock-cells = <1>;
78+
xlnx,static-config;
7379
xlnx,speed-grade = <1>;
7480
xlnx,nr-outputs = <6>;
7581
clock-names = "clk_in1", "s_axi_aclk";

MAINTAINERS

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14528,6 +14528,32 @@ S: Maintained
1452814528
F: Documentation/devicetree/bindings/mmc/mtk-sd.yaml
1452914529
F: drivers/mmc/host/mtk-sd.c
1453014530

14531+
MEDIATEK MT6735 CLOCK & RESET DRIVERS
14532+
M: Yassine Oudjana <[email protected]>
14533+
14534+
L: [email protected] (moderated for non-subscribers)
14535+
S: Maintained
14536+
F: drivers/clk/mediatek/clk-mt6735-apmixedsys.c
14537+
F: drivers/clk/mediatek/clk-mt6735-imgsys.c
14538+
F: drivers/clk/mediatek/clk-mt6735-infracfg.c
14539+
F: drivers/clk/mediatek/clk-mt6735-mfgcfg.c
14540+
F: drivers/clk/mediatek/clk-mt6735-pericfg.c
14541+
F: drivers/clk/mediatek/clk-mt6735-topckgen.c
14542+
F: drivers/clk/mediatek/clk-mt6735-vdecsys.c
14543+
F: drivers/clk/mediatek/clk-mt6735-vencsys.c
14544+
F: include/dt-bindings/clock/mediatek,mt6735-apmixedsys.h
14545+
F: include/dt-bindings/clock/mediatek,mt6735-imgsys.h
14546+
F: include/dt-bindings/clock/mediatek,mt6735-infracfg.h
14547+
F: include/dt-bindings/clock/mediatek,mt6735-mfgcfg.h
14548+
F: include/dt-bindings/clock/mediatek,mt6735-pericfg.h
14549+
F: include/dt-bindings/clock/mediatek,mt6735-topckgen.h
14550+
F: include/dt-bindings/clock/mediatek,mt6735-vdecsys.h
14551+
F: include/dt-bindings/clock/mediatek,mt6735-vencsys.h
14552+
F: include/dt-bindings/reset/mediatek,mt6735-infracfg.h
14553+
F: include/dt-bindings/reset/mediatek,mt6735-mfgcfg.h
14554+
F: include/dt-bindings/reset/mediatek,mt6735-pericfg.h
14555+
F: include/dt-bindings/reset/mediatek,mt6735-vdecsys.h
14556+
1453114557
MEDIATEK MT76 WIRELESS LAN DRIVER
1453214558
M: Felix Fietkau <[email protected]>
1453314559
M: Lorenzo Bianconi <[email protected]>

drivers/clk/.kunitconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
CONFIG_KUNIT=y
22
CONFIG_OF=y
3+
CONFIG_OF_OVERLAY=y
34
CONFIG_COMMON_CLK=y
45
CONFIG_CLK_KUNIT_TEST=y
56
CONFIG_CLK_FIXED_RATE_KUNIT_TEST=y

drivers/clk/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ config CLK_KUNIT_TEST
517517
tristate "Basic Clock Framework Kunit Tests" if !KUNIT_ALL_TESTS
518518
depends on KUNIT
519519
default KUNIT_ALL_TESTS
520-
select OF_OVERLAY if OF
521520
select DTC
522521
help
523522
Kunit tests for the common clock framework.
@@ -526,7 +525,6 @@ config CLK_FIXED_RATE_KUNIT_TEST
526525
tristate "Basic fixed rate clk type KUnit test" if !KUNIT_ALL_TESTS
527526
depends on KUNIT
528527
default KUNIT_ALL_TESTS
529-
select OF_OVERLAY if OF
530528
select DTC
531529
help
532530
KUnit tests for the basic fixed rate clk type.

drivers/clk/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ obj-$(CONFIG_HAVE_CLK) += clk-devres.o clk-bulk.o clkdev.o
44
obj-$(CONFIG_COMMON_CLK) += clk.o
55
obj-$(CONFIG_CLK_KUNIT_TEST) += clk-test.o
66
clk-test-y := clk_test.o \
7+
kunit_clk_assigned_rates_u64_one.dtbo.o \
8+
kunit_clk_assigned_rates_u64_one_consumer.dtbo.o \
9+
kunit_clk_assigned_rates_u64_multiple.dtbo.o \
10+
kunit_clk_assigned_rates_u64_multiple_consumer.dtbo.o \
11+
kunit_clk_assigned_rates_multiple.dtbo.o \
12+
kunit_clk_assigned_rates_multiple_consumer.dtbo.o \
13+
kunit_clk_assigned_rates_null.dtbo.o \
14+
kunit_clk_assigned_rates_null_consumer.dtbo.o \
15+
kunit_clk_assigned_rates_one.dtbo.o \
16+
kunit_clk_assigned_rates_one_consumer.dtbo.o \
17+
kunit_clk_assigned_rates_without.dtbo.o \
18+
kunit_clk_assigned_rates_without_consumer.dtbo.o \
19+
kunit_clk_assigned_rates_zero.dtbo.o \
20+
kunit_clk_assigned_rates_zero_consumer.dtbo.o \
721
kunit_clk_parent_data_test.dtbo.o
822
obj-$(CONFIG_COMMON_CLK) += clk-divider.o
923
obj-$(CONFIG_COMMON_CLK) += clk-fixed-factor.o

0 commit comments

Comments
 (0)