Skip to content

Commit 90cf94e

Browse files
committed
Merge tag 'clk-meson-v6.7-1' of https://github.com/BayLibre/clk-meson into clk-amlogic
Pull Amlogic clk driver updates from Jerome Brunet: - Add s4 main clock controller support * tag 'clk-meson-v6.7-1' of https://github.com/BayLibre/clk-meson: clk: meson: S4: add support for Amlogic S4 SoC peripheral clock controller clk: meson: S4: add support for Amlogic S4 SoC PLL clock driver dt-bindings: clock: document Amlogic S4 SoC peripherals clock controller dt-bindings: clock: document Amlogic S4 SoC PLL clock controller
2 parents 0bb80ec + 57b55c7 commit 90cf94e

File tree

10 files changed

+5223
-0
lines changed

10 files changed

+5223
-0
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+
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+
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+
...

drivers/clk/meson/Kconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,27 @@ config COMMON_CLK_G12A
144144
help
145145
Support for the clock controller on Amlogic S905D2, S905X2 and S905Y2
146146
devices, aka g12a. Say Y if you want peripherals to work.
147+
148+
config COMMON_CLK_S4_PLL
149+
tristate "S4 SoC PLL clock controllers support"
150+
depends on ARM64
151+
default y
152+
select COMMON_CLK_MESON_MPLL
153+
select COMMON_CLK_MESON_PLL
154+
select COMMON_CLK_MESON_REGMAP
155+
help
156+
Support for the PLL clock controller on Amlogic S805X2 and S905Y4 devices,
157+
AKA S4. Say Y if you want the board to work, because PLLs are the parent of
158+
most peripherals.
159+
160+
config COMMON_CLK_S4_PERIPHERALS
161+
tristate "S4 SoC peripherals clock controllers support"
162+
depends on ARM64
163+
default y
164+
select COMMON_CLK_MESON_REGMAP
165+
select COMMON_CLK_MESON_DUALDIV
166+
select COMMON_CLK_MESON_VID_PLL_DIV
167+
help
168+
Support for the peripherals clock controller on Amlogic S805X2 and S905Y4
169+
devices, AKA S4. Say Y if you want S4 peripherals clock controller to work.
147170
endmenu

drivers/clk/meson/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ obj-$(CONFIG_COMMON_CLK_A1_PERIPHERALS) += a1-peripherals.o
2222
obj-$(CONFIG_COMMON_CLK_GXBB) += gxbb.o gxbb-aoclk.o
2323
obj-$(CONFIG_COMMON_CLK_G12A) += g12a.o g12a-aoclk.o
2424
obj-$(CONFIG_COMMON_CLK_MESON8B) += meson8b.o meson8-ddr.o
25+
obj-$(CONFIG_COMMON_CLK_S4_PLL) += s4-pll.o
26+
obj-$(CONFIG_COMMON_CLK_S4_PERIPHERALS) += s4-peripherals.o

0 commit comments

Comments
 (0)