Skip to content

Commit 31062ea

Browse files
committed
Merge tag 'samsung-clk-6.13' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into clk-samsung
Pull Samsung SoC clk driver updates from Krzysztof Kozlowski: - Tesla FSD: Move number of clocks from DT binding headers to driver, because these are not an ABI and might change while finishing support for the hardware. - ExynosAutov920: Add clock controller drivers for PERIC1, MISC, HSI0 and HSI1. Context of patch depends on a fix from fixes branch, thus pull in my earlier pull request with fixes. - Google GS101: Do not disable UFS host controller clocks, ever, because gating them does not work well with UFS sleep/power savings. Downstream does not gate them via OS, but uses hardware feature - Automatic Clock Gating - which is not yet supported in upstream. - Exynos8895: New SoC with initial support for clock controllers: FSYS0/1, PERIC0/1, PERIS and TOP. * tag 'samsung-clk-6.13' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: clk: samsung: Introduce Exynos8895 clock driver clk: samsung: clk-pll: Add support for pll_{1051x,1052x} dt-bindings: clock: samsung: Add Exynos8895 SoC clk: samsung: gs101: make all ufs related clocks critical clk: samsung: exynosautov920: add peric1, misc and hsi0/1 clock support dt-bindings: clock: exynosautov920: add peric1, misc and hsi0/1 clock definitions clk: samsung: Fix out-of-bound access of of_match_node() dt-bindings: clock: samsung: remove define with number of clocks for FSD clk: samsung: fsd: do not define number of clocks in bindings clk: samsung: Fix errors reported by checkpatch clk: samsung: Fix block comment style warnings reported by checkpatch
2 parents 9852d85 + 9174fac commit 31062ea

23 files changed

+3873
-34
lines changed
Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/samsung,exynos8895-clock.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Samsung Exynos8895 SoC clock controller
8+
9+
maintainers:
10+
- Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
11+
- Chanwoo Choi <cw00.choi@samsung.com>
12+
- Krzysztof Kozlowski <krzk@kernel.org>
13+
14+
description: |
15+
Exynos8895 clock controller is comprised of several CMU units, generating
16+
clocks for different domains. Those CMU units are modeled as separate device
17+
tree nodes, and might depend on each other. The root clock in that root tree
18+
is an external clock: OSCCLK (26 MHz). This external clock must be defined
19+
as a fixed-rate clock in dts.
20+
21+
CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
22+
dividers; all other clocks of function blocks (other CMUs) are usually
23+
derived from CMU_TOP.
24+
25+
Each clock is assigned an identifier and client nodes can use this identifier
26+
to specify the clock which they consume. All clocks available for usage
27+
in clock consumer nodes are defined as preprocessor macros in
28+
'include/dt-bindings/clock/samsung,exynos8895.h' header.
29+
30+
properties:
31+
compatible:
32+
enum:
33+
- samsung,exynos8895-cmu-fsys0
34+
- samsung,exynos8895-cmu-fsys1
35+
- samsung,exynos8895-cmu-peric0
36+
- samsung,exynos8895-cmu-peric1
37+
- samsung,exynos8895-cmu-peris
38+
- samsung,exynos8895-cmu-top
39+
40+
clocks:
41+
minItems: 1
42+
maxItems: 16
43+
44+
clock-names:
45+
minItems: 1
46+
maxItems: 16
47+
48+
"#clock-cells":
49+
const: 1
50+
51+
reg:
52+
maxItems: 1
53+
54+
required:
55+
- compatible
56+
- clocks
57+
- clock-names
58+
- reg
59+
- "#clock-cells"
60+
61+
allOf:
62+
- if:
63+
properties:
64+
compatible:
65+
contains:
66+
const: samsung,exynos8895-cmu-fsys0
67+
68+
then:
69+
properties:
70+
clocks:
71+
items:
72+
- description: External reference clock (26 MHz)
73+
- description: CMU_FSYS0 BUS clock (from CMU_TOP)
74+
- description: CMU_FSYS0 DPGTC clock (from CMU_TOP)
75+
- description: CMU_FSYS0 MMC_EMBD clock (from CMU_TOP)
76+
- description: CMU_FSYS0 UFS_EMBD clock (from CMU_TOP)
77+
- description: CMU_FSYS0 USBDRD30 clock (from CMU_TOP)
78+
79+
clock-names:
80+
items:
81+
- const: oscclk
82+
- const: bus
83+
- const: dpgtc
84+
- const: mmc
85+
- const: ufs
86+
- const: usbdrd30
87+
88+
- if:
89+
properties:
90+
compatible:
91+
contains:
92+
const: samsung,exynos8895-cmu-fsys1
93+
94+
then:
95+
properties:
96+
clocks:
97+
items:
98+
- description: External reference clock (26 MHz)
99+
- description: CMU_FSYS1 BUS clock (from CMU_TOP)
100+
- description: CMU_FSYS1 PCIE clock (from CMU_TOP)
101+
- description: CMU_FSYS1 UFS_CARD clock (from CMU_TOP)
102+
- description: CMU_FSYS1 MMC_CARD clock (from CMU_TOP)
103+
104+
clock-names:
105+
items:
106+
- const: oscclk
107+
- const: bus
108+
- const: pcie
109+
- const: ufs
110+
- const: mmc
111+
112+
- if:
113+
properties:
114+
compatible:
115+
contains:
116+
const: samsung,exynos8895-cmu-peric0
117+
118+
then:
119+
properties:
120+
clocks:
121+
items:
122+
- description: External reference clock (26 MHz)
123+
- description: CMU_PERIC0 BUS clock (from CMU_TOP)
124+
- description: CMU_PERIC0 UART_DBG clock (from CMU_TOP)
125+
- description: CMU_PERIC0 USI00 clock (from CMU_TOP)
126+
- description: CMU_PERIC0 USI01 clock (from CMU_TOP)
127+
- description: CMU_PERIC0 USI02 clock (from CMU_TOP)
128+
- description: CMU_PERIC0 USI03 clock (from CMU_TOP)
129+
130+
clock-names:
131+
items:
132+
- const: oscclk
133+
- const: bus
134+
- const: uart
135+
- const: usi0
136+
- const: usi1
137+
- const: usi2
138+
- const: usi3
139+
140+
- if:
141+
properties:
142+
compatible:
143+
contains:
144+
const: samsung,exynos8895-cmu-peric1
145+
146+
then:
147+
properties:
148+
clocks:
149+
items:
150+
- description: External reference clock (26 MHz)
151+
- description: CMU_PERIC1 BUS clock (from CMU_TOP)
152+
- description: CMU_PERIC1 SPEEDY2 clock (from CMU_TOP)
153+
- description: CMU_PERIC1 SPI_CAM0 clock (from CMU_TOP)
154+
- description: CMU_PERIC1 SPI_CAM1 clock (from CMU_TOP)
155+
- description: CMU_PERIC1 UART_BT clock (from CMU_TOP)
156+
- description: CMU_PERIC1 USI04 clock (from CMU_TOP)
157+
- description: CMU_PERIC1 USI05 clock (from CMU_TOP)
158+
- description: CMU_PERIC1 USI06 clock (from CMU_TOP)
159+
- description: CMU_PERIC1 USI07 clock (from CMU_TOP)
160+
- description: CMU_PERIC1 USI08 clock (from CMU_TOP)
161+
- description: CMU_PERIC1 USI09 clock (from CMU_TOP)
162+
- description: CMU_PERIC1 USI10 clock (from CMU_TOP)
163+
- description: CMU_PERIC1 USI11 clock (from CMU_TOP)
164+
- description: CMU_PERIC1 USI12 clock (from CMU_TOP)
165+
- description: CMU_PERIC1 USI13 clock (from CMU_TOP)
166+
167+
clock-names:
168+
items:
169+
- const: oscclk
170+
- const: bus
171+
- const: speedy
172+
- const: cam0
173+
- const: cam1
174+
- const: uart
175+
- const: usi4
176+
- const: usi5
177+
- const: usi6
178+
- const: usi7
179+
- const: usi8
180+
- const: usi9
181+
- const: usi10
182+
- const: usi11
183+
- const: usi12
184+
- const: usi13
185+
186+
- if:
187+
properties:
188+
compatible:
189+
contains:
190+
const: samsung,exynos8895-cmu-peris
191+
192+
then:
193+
properties:
194+
clocks:
195+
items:
196+
- description: External reference clock (26 MHz)
197+
- description: CMU_PERIS BUS clock (from CMU_TOP)
198+
199+
clock-names:
200+
items:
201+
- const: oscclk
202+
- const: bus
203+
204+
- if:
205+
properties:
206+
compatible:
207+
contains:
208+
const: samsung,exynos8895-cmu-top
209+
210+
then:
211+
properties:
212+
clocks:
213+
items:
214+
- description: External reference clock (26 MHz)
215+
216+
clock-names:
217+
items:
218+
- const: oscclk
219+
220+
additionalProperties: false
221+
222+
examples:
223+
- |
224+
#include <dt-bindings/clock/samsung,exynos8895.h>
225+
226+
cmu_fsys1: clock-controller@11400000 {
227+
compatible = "samsung,exynos8895-cmu-fsys1";
228+
reg = <0x11400000 0x8000>;
229+
#clock-cells = <1>;
230+
231+
clocks = <&oscclk>,
232+
<&cmu_top CLK_DOUT_CMU_FSYS1_BUS>,
233+
<&cmu_top CLK_DOUT_CMU_FSYS1_PCIE>,
234+
<&cmu_top CLK_DOUT_CMU_FSYS1_UFS_CARD>,
235+
<&cmu_top CLK_DOUT_CMU_FSYS1_MMC_CARD>;
236+
clock-names = "oscclk", "bus", "pcie", "ufs", "mmc";
237+
};
238+
239+
...

drivers/clk/samsung/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos-arm64.o
2020
obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos7.o
2121
obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos7885.o
2222
obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos850.o
23+
obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos8895.o
2324
obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynosautov9.o
2425
obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynosautov920.o
2526
obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-gs101.o

drivers/clk/samsung/clk-exynos-audss.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Author: Padmavathi Venna <padma.v@samsung.com>
55
*
66
* Common Clock Framework support for Audio Subsystem Clock Controller.
7-
*/
7+
*/
88

99
#include <linux/slab.h>
1010
#include <linux/io.h>

drivers/clk/samsung/clk-exynos3250.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ static const struct samsung_mux_clock mux_clks[] __initconst = {
260260

261261
/* SRC_TOP0 */
262262
MUX(CLK_MOUT_EBI, "mout_ebi", mout_ebi_p, SRC_TOP0, 28, 1),
263-
MUX(CLK_MOUT_ACLK_200, "mout_aclk_200", group_div_mpll_pre_p,SRC_TOP0, 24, 1),
263+
MUX(CLK_MOUT_ACLK_200, "mout_aclk_200", group_div_mpll_pre_p, SRC_TOP0, 24, 1),
264264
MUX(CLK_MOUT_ACLK_160, "mout_aclk_160", group_div_mpll_pre_p, SRC_TOP0, 20, 1),
265265
MUX(CLK_MOUT_ACLK_100, "mout_aclk_100", group_div_mpll_pre_p, SRC_TOP0, 16, 1),
266266
MUX(CLK_MOUT_ACLK_266_1, "mout_aclk_266_1", mout_aclk_266_1_p, SRC_TOP0, 14, 1),

drivers/clk/samsung/clk-exynos4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: Thomas Abraham <thomas.ab@samsung.com>
66
*
77
* Common Clock Framework support for all Exynos4 SoCs.
8-
*/
8+
*/
99

1010
#include <dt-bindings/clock/exynos4.h>
1111
#include <linux/slab.h>

drivers/clk/samsung/clk-exynos4412-isp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Author: Marek Szyprowski <m.szyprowski@samsung.com>
55
*
66
* Common Clock Framework support for Exynos4412 ISP module.
7-
*/
7+
*/
88

99
#include <dt-bindings/clock/exynos4.h>
1010
#include <linux/slab.h>

drivers/clk/samsung/clk-exynos5250.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: Thomas Abraham <thomas.ab@samsung.com>
66
*
77
* Common Clock Framework support for Exynos5250 SoC.
8-
*/
8+
*/
99

1010
#include <dt-bindings/clock/exynos5250.h>
1111
#include <linux/clk-provider.h>

drivers/clk/samsung/clk-exynos5260.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@ static const struct samsung_fixed_rate_clock fixed_rate_clks[] __initconst = {
14581458
FRATE(PHYCLK_HDMI_LINK_O_TMDS_CLKHI, "phyclk_hdmi_link_o_tmds_clkhi",
14591459
NULL, 0, 125000000),
14601460
FRATE(PHYCLK_MIPI_DPHY_4L_M_TXBYTECLKHS,
1461-
"phyclk_mipi_dphy_4l_m_txbyte_clkhs" , NULL,
1461+
"phyclk_mipi_dphy_4l_m_txbyte_clkhs", NULL,
14621462
0, 187500000),
14631463
FRATE(PHYCLK_DPTX_PHY_O_REF_CLK_24M, "phyclk_dptx_phy_o_ref_clk_24m",
14641464
NULL, 0, 24000000),
@@ -1629,7 +1629,7 @@ static const struct samsung_mux_clock top_mux_clks[] __initconst = {
16291629
mout_isp1_media_400_p,
16301630
MUX_SEL_TOP_ISP10, 4, 1),
16311631
MUX(TOP_MOUT_ACLK_ISP1_400, "mout_aclk_isp1_400", mout_aclk_isp1_400_p,
1632-
MUX_SEL_TOP_ISP10, 8 , 1),
1632+
MUX_SEL_TOP_ISP10, 8, 1),
16331633
MUX(TOP_MOUT_ISP1_MEDIA_266, "mout_isp1_media_266",
16341634
mout_isp1_media_266_p,
16351635
MUX_SEL_TOP_ISP10, 16, 1),

drivers/clk/samsung/clk-exynos5410.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Author: Tarek Dakhran <t.dakhran@samsung.com>
55
*
66
* Common Clock Framework support for Exynos5410 SoC.
7-
*/
7+
*/
88

99
#include <dt-bindings/clock/exynos5410.h>
1010

drivers/clk/samsung/clk-exynos5420.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Chander Kashyap <k.chander@samsung.com>
66
*
77
* Common Clock Framework support for Exynos5420 SoC.
8-
*/
8+
*/
99

1010
#include <dt-bindings/clock/exynos5420.h>
1111
#include <linux/slab.h>
@@ -295,8 +295,8 @@ static const struct samsung_clk_reg_dump exynos5420_set_clksrc[] = {
295295
/* list of all parent clocks */
296296
PNAME(mout_mspll_cpu_p) = {"mout_sclk_cpll", "mout_sclk_dpll",
297297
"mout_sclk_mpll", "mout_sclk_spll"};
298-
PNAME(mout_cpu_p) = {"mout_apll" , "mout_mspll_cpu"};
299-
PNAME(mout_kfc_p) = {"mout_kpll" , "mout_mspll_kfc"};
298+
PNAME(mout_cpu_p) = {"mout_apll", "mout_mspll_cpu"};
299+
PNAME(mout_kfc_p) = {"mout_kpll", "mout_mspll_kfc"};
300300
PNAME(mout_apll_p) = {"fin_pll", "fout_apll"};
301301
PNAME(mout_bpll_p) = {"fin_pll", "fout_bpll"};
302302
PNAME(mout_cpll_p) = {"fin_pll", "fout_cpll"};

0 commit comments

Comments
 (0)