Skip to content

Commit 6f7478e

Browse files
committed
Merge branches 'clk-mediatek', 'clk-sunplus', 'clk-loongson' and 'clk-socfpga' into clk-next
- Frequency Hopping (FHCTL) on MediaTek MT6795, MT8173, MT8192 and MT8195 SoCs - Converted most Mediatek clock drivers to struct platform_driver - MediaTek clock drivers can be built as modules - Mediatek MT8188 SoC clk drivers - Clock driver for Sunplus SP7021 SoC - Reimplement Loongson-1 clk driver with DT support - Clk driver support for Loongson-2 SoCs - Migrate socfpga clk driver to of_clk_add_hw_provider() * clk-mediatek: (84 commits) clk: mediatek: fhctl: Mark local variables static clk: mediatek: Use right match table, include mod_devicetable clk: mediatek: Add MT8188 adsp clock support clk: mediatek: Add MT8188 imp i2c wrapper clock support clk: mediatek: Add MT8188 wpesys clock support clk: mediatek: Add MT8188 vppsys1 clock support clk: mediatek: Add MT8188 vppsys0 clock support clk: mediatek: Add MT8188 vencsys clock support clk: mediatek: Add MT8188 vdosys1 clock support clk: mediatek: Add MT8188 vdosys0 clock support clk: mediatek: Add MT8188 vdecsys clock support clk: mediatek: Add MT8188 mfgcfg clock support clk: mediatek: Add MT8188 ipesys clock support clk: mediatek: Add MT8188 imgsys clock support clk: mediatek: Add MT8188 ccusys clock support clk: mediatek: Add MT8188 camsys clock support clk: mediatek: Add MT8188 infrastructure clock support clk: mediatek: Add MT8188 peripheral clock support clk: mediatek: Add MT8188 topckgen clock support clk: mediatek: Add MT8188 apmixedsys clock support ... * clk-sunplus: clk: Add Sunplus SP7021 clock driver * clk-loongson: clk: clk-loongson2: add clock controller driver support dt-bindings: clock: add loongson-2 boot clock index MAINTAINERS: remove obsolete file entry in MIPS/LOONGSON1 ARCHITECTURE MIPS: loongson32: Update the clock initialization clk: loongson1: Re-implement the clock driver clk: loongson1: Remove the outdated driver dt-bindings: clock: Add Loongson-1 clock * clk-socfpga: clk: socfpga: arria10: use of_clk_add_hw_provider and improve error handling clk: socfpga: use of_clk_add_hw_provider and improve error handling clk: socfpga: arria10: use of_clk_add_hw_provider and improve error handling clk: socfpga: use of_clk_add_hw_provider and improve error handling clk: socfpga: arria10: use of_clk_add_hw_provider and improve error handling clk: socfpga: use of_clk_add_hw_provider and improve error handling
5 parents 4ec6a2f + cb9eee5 + d54c1fd + acc0ccf + 3dc6faa commit 6f7478e

File tree

205 files changed

+9286
-4897
lines changed

Some content is hidden

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

205 files changed

+9286
-4897
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/loongson,ls1x-clk.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Loongson-1 Clock Controller
8+
9+
maintainers:
10+
- Keguang Zhang <keguang.zhang@gmail.com>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- loongson,ls1b-clk
16+
- loongson,ls1c-clk
17+
18+
reg:
19+
maxItems: 1
20+
21+
clocks:
22+
maxItems: 1
23+
24+
"#clock-cells":
25+
const: 1
26+
27+
required:
28+
- compatible
29+
- reg
30+
- clocks
31+
- "#clock-cells"
32+
33+
additionalProperties: false
34+
35+
examples:
36+
- |
37+
clkc: clock-controller@1fe78030 {
38+
compatible = "loongson,ls1b-clk";
39+
reg = <0x1fe78030 0x8>;
40+
41+
clocks = <&xtal>;
42+
#clock-cells = <1>;
43+
};
44+
45+
...

Documentation/devicetree/bindings/clock/mediatek,mt8186-fhctl.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ description: |
1616
1717
properties:
1818
compatible:
19-
const: mediatek,mt8186-fhctl
19+
enum:
20+
- mediatek,mt6795-fhctl
21+
- mediatek,mt8173-fhctl
22+
- mediatek,mt8186-fhctl
23+
- mediatek,mt8192-fhctl
24+
- mediatek,mt8195-fhctl
2025

2126
reg:
2227
maxItems: 1
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/mediatek,mt8188-clock.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek Functional Clock Controller for MT8188
8+
9+
maintainers:
10+
- Garmin Chang <garmin.chang@mediatek.com>
11+
12+
description: |
13+
The clock architecture in MediaTek like below
14+
PLLs -->
15+
dividers -->
16+
muxes
17+
-->
18+
clock gate
19+
20+
The devices provide clock gate control in different IP blocks.
21+
22+
properties:
23+
compatible:
24+
enum:
25+
- mediatek,mt8188-adsp-audio26m
26+
- mediatek,mt8188-camsys
27+
- mediatek,mt8188-camsys-rawa
28+
- mediatek,mt8188-camsys-rawb
29+
- mediatek,mt8188-camsys-yuva
30+
- mediatek,mt8188-camsys-yuvb
31+
- mediatek,mt8188-ccusys
32+
- mediatek,mt8188-imgsys
33+
- mediatek,mt8188-imgsys-wpe1
34+
- mediatek,mt8188-imgsys-wpe2
35+
- mediatek,mt8188-imgsys-wpe3
36+
- mediatek,mt8188-imgsys1-dip-nr
37+
- mediatek,mt8188-imgsys1-dip-top
38+
- mediatek,mt8188-imp-iic-wrap-c
39+
- mediatek,mt8188-imp-iic-wrap-en
40+
- mediatek,mt8188-imp-iic-wrap-w
41+
- mediatek,mt8188-ipesys
42+
- mediatek,mt8188-mfgcfg
43+
- mediatek,mt8188-vdecsys
44+
- mediatek,mt8188-vdecsys-soc
45+
- mediatek,mt8188-vencsys
46+
- mediatek,mt8188-vppsys0
47+
- mediatek,mt8188-vppsys1
48+
- mediatek,mt8188-wpesys
49+
- mediatek,mt8188-wpesys-vpp0
50+
51+
reg:
52+
maxItems: 1
53+
54+
'#clock-cells':
55+
const: 1
56+
57+
required:
58+
- compatible
59+
- reg
60+
- '#clock-cells'
61+
62+
additionalProperties: false
63+
64+
examples:
65+
- |
66+
clock-controller@11283000 {
67+
compatible = "mediatek,mt8188-imp-iic-wrap-c";
68+
reg = <0x11283000 0x1000>;
69+
#clock-cells = <1>;
70+
};
71+
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 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/mediatek,mt8188-sys-clock.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek System Clock Controller for MT8188
8+
9+
maintainers:
10+
- Garmin Chang <garmin.chang@mediatek.com>
11+
12+
description: |
13+
The clock architecture in MediaTek like below
14+
PLLs -->
15+
dividers -->
16+
muxes
17+
-->
18+
clock gate
19+
20+
The apmixedsys provides most of PLLs which generated from SoC 26m.
21+
The topckgen provides dividers and muxes which provide the clock source to other IP blocks.
22+
The infracfg_ao provides clock gate in peripheral and infrastructure IP blocks.
23+
The mcusys provides mux control to select the clock source in AP MCU.
24+
The device nodes also provide the system control capacity for configuration.
25+
26+
properties:
27+
compatible:
28+
items:
29+
- enum:
30+
- mediatek,mt8188-apmixedsys
31+
- mediatek,mt8188-infracfg-ao
32+
- mediatek,mt8188-pericfg-ao
33+
- mediatek,mt8188-topckgen
34+
- const: syscon
35+
36+
reg:
37+
maxItems: 1
38+
39+
'#clock-cells':
40+
const: 1
41+
42+
required:
43+
- compatible
44+
- reg
45+
- '#clock-cells'
46+
47+
additionalProperties: false
48+
49+
examples:
50+
- |
51+
clock-controller@10000000 {
52+
compatible = "mediatek,mt8188-topckgen", "syscon";
53+
reg = <0x10000000 0x1000>;
54+
#clock-cells = <1>;
55+
};

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2849,6 +2849,7 @@ F: Documentation/devicetree/bindings/reset/sunplus,reset.yaml
28492849
F: arch/arm/boot/dts/sunplus-sp7021*.dts*
28502850
F: arch/arm/configs/sp7021_*defconfig
28512851
F: arch/arm/mach-sunplus/
2852+
F: drivers/clk/clk-sp7021.c
28522853
F: drivers/irqchip/irq-sp7021-intc.c
28532854
F: drivers/reset/reset-sunplus.c
28542855
F: include/dt-bindings/clock/sunplus,sp7021-clkc.h
@@ -12121,6 +12122,7 @@ M: Yinbo Zhu <zhuyinbo@loongson.cn>
1212112122
L: linux-clk@vger.kernel.org
1212212123
S: Maintained
1212312124
F: Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml
12125+
F: drivers/clk/clk-loongson2.c
1212412126
F: include/dt-bindings/clock/loongson,ls2k-clk.h
1212512127

1212612128
LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
@@ -14000,7 +14002,6 @@ L: linux-mips@vger.kernel.org
1400014002
S: Maintained
1400114003
F: arch/mips/include/asm/mach-loongson32/
1400214004
F: arch/mips/loongson32/
14003-
F: drivers/*/*/*loongson1*
1400414005
F: drivers/*/*loongson1*
1400514006

1400614007
MIPS/LOONGSON2EF ARCHITECTURE

arch/mips/include/asm/mach-loongson32/platform.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ extern struct platform_device ls1x_gpio1_pdev;
2020
extern struct platform_device ls1x_rtc_pdev;
2121
extern struct platform_device ls1x_wdt_pdev;
2222

23-
void __init ls1x_clk_init(void);
2423
void __init ls1x_rtc_set_extclk(struct platform_device *pdev);
2524
void __init ls1x_serial_set_uartclk(struct platform_device *pdev);
2625

arch/mips/loongson32/common/time.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55

66
#include <linux/clk.h>
7+
#include <linux/of_clk.h>
78
#include <linux/interrupt.h>
89
#include <linux/sizes.h>
910
#include <asm/time.h>
@@ -211,7 +212,7 @@ void __init plat_time_init(void)
211212
struct clk *clk = NULL;
212213

213214
/* initialize LS1X clocks */
214-
ls1x_clk_init();
215+
of_clk_init(NULL);
215216

216217
#ifdef CONFIG_CEVT_CSRC_LS1X
217218
/* setup LS1X PWM timer */

drivers/clk/Kconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,15 @@ config COMMON_CLK_LOCHNAGAR
325325
This driver supports the clocking features of the Cirrus Logic
326326
Lochnagar audio development board.
327327

328+
config COMMON_CLK_LOONGSON2
329+
bool "Clock driver for Loongson-2 SoC"
330+
depends on LOONGARCH || COMPILE_TEST
331+
help
332+
This driver provides support for clock controller on Loongson-2 SoC.
333+
The clock controller can generates and supplies clock to various
334+
peripherals within the SoC.
335+
Say Y here to support Loongson-2 SoC clock driver.
336+
328337
config COMMON_CLK_NXP
329338
def_bool COMMON_CLK && (ARCH_LPC18XX || ARCH_LPC32XX)
330339
select REGMAP_MMIO if ARCH_LPC32XX
@@ -445,6 +454,16 @@ config COMMON_CLK_K210
445454
help
446455
Support for the Canaan Kendryte K210 RISC-V SoC clocks.
447456

457+
config COMMON_CLK_SP7021
458+
tristate "Clock driver for Sunplus SP7021 SoC"
459+
depends on SOC_SP7021 || COMPILE_TEST
460+
default SOC_SP7021
461+
help
462+
This driver supports the Sunplus SP7021 SoC clocks.
463+
It implements SP7021 PLLs/gate.
464+
Not all features of the PLL are currently supported
465+
by the driver.
466+
448467
source "drivers/clk/actions/Kconfig"
449468
source "drivers/clk/analogbits/Kconfig"
450469
source "drivers/clk/baikal-t1/Kconfig"

drivers/clk/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ obj-$(CONFIG_COMMON_CLK_K210) += clk-k210.o
4343
obj-$(CONFIG_LMK04832) += clk-lmk04832.o
4444
obj-$(CONFIG_COMMON_CLK_LAN966X) += clk-lan966x.o
4545
obj-$(CONFIG_COMMON_CLK_LOCHNAGAR) += clk-lochnagar.o
46+
obj-$(CONFIG_MACH_LOONGSON32) += clk-loongson1.o
47+
obj-$(CONFIG_COMMON_CLK_LOONGSON2) += clk-loongson2.o
4648
obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o
4749
obj-$(CONFIG_COMMON_CLK_MAX9485) += clk-max9485.o
4850
obj-$(CONFIG_ARCH_MILBEAUT_M10V) += clk-milbeaut.o
@@ -65,6 +67,7 @@ obj-$(CONFIG_COMMON_CLK_SI5351) += clk-si5351.o
6567
obj-$(CONFIG_COMMON_CLK_SI514) += clk-si514.o
6668
obj-$(CONFIG_COMMON_CLK_SI544) += clk-si544.o
6769
obj-$(CONFIG_COMMON_CLK_SI570) += clk-si570.o
70+
obj-$(CONFIG_COMMON_CLK_SP7021) += clk-sp7021.o
6871
obj-$(CONFIG_COMMON_CLK_STM32F) += clk-stm32f4.o
6972
obj-$(CONFIG_COMMON_CLK_STM32H7) += clk-stm32h7.o
7073
obj-$(CONFIG_COMMON_CLK_STM32MP157) += clk-stm32mp1.o
@@ -94,7 +97,6 @@ obj-y += imx/
9497
obj-y += ingenic/
9598
obj-$(CONFIG_ARCH_K3) += keystone/
9699
obj-$(CONFIG_ARCH_KEYSTONE) += keystone/
97-
obj-$(CONFIG_MACH_LOONGSON32) += loongson1/
98100
obj-y += mediatek/
99101
obj-$(CONFIG_ARCH_MESON) += meson/
100102
obj-y += microchip/

0 commit comments

Comments
 (0)