Skip to content

Commit ca1de84

Browse files
committed
Merge tag 'v6.15-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip
Pull Rockchip clk driver updates from Heiko Stuebner: - New clock controller drivers for Rockchip rk3528 and rk3562 - Fix a parent for Rockchip rk3328 clk_ref_usb3otg - Add camera interface clocks for Rockchip rk3188 * tag 'v6.15-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: Add clock controller for the RK3562 dt-bindings: clock: Add RK3562 cru clk: rockchip: rk3528: Add reset lookup table clk: rockchip: Add clock controller driver for RK3528 SoC clk: rockchip: Add PLL flag ROCKCHIP_PLL_FIXED_MODE dt-bindings: clock: Document clock and reset unit of RK3528 clk: rockchip: rk3328: fix wrong clk_ref_usb3otg parent clk: rockchip: rk3568: mark hclk_vi as critical clk: rockchip: rk3188: use PCLK_CIF0/1 clock IDs on RK3066 dt-bindings: clock: rk3188-common: add PCLK_CIF0/PCLK_CIF1
2 parents 2014c95 + f863d4c commit ca1de84

File tree

18 files changed

+4593
-7
lines changed

18 files changed

+4593
-7
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/rockchip,rk3528-cru.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Rockchip RK3528 Clock and Reset Controller
8+
9+
maintainers:
10+
- Yao Zi <ziyao@disroot.org>
11+
12+
description: |
13+
The RK3528 clock controller generates the clock and also implements a reset
14+
controller for SoC peripherals. For example, it provides SCLK_UART0 and
15+
PCLK_UART0 as well as SRST_P_UART0 and SRST_S_UART0 for the first UART
16+
module.
17+
Each clock is assigned an identifier, consumer nodes can use it to specify
18+
the clock. All available clock and reset IDs are defined in dt-binding
19+
headers.
20+
21+
properties:
22+
compatible:
23+
const: rockchip,rk3528-cru
24+
25+
reg:
26+
maxItems: 1
27+
28+
clocks:
29+
items:
30+
- description: External 24MHz oscillator clock
31+
- description: >
32+
50MHz clock generated by PHY module, for generating GMAC0 clocks only.
33+
34+
clock-names:
35+
items:
36+
- const: xin24m
37+
- const: gmac0
38+
39+
"#clock-cells":
40+
const: 1
41+
42+
"#reset-cells":
43+
const: 1
44+
45+
required:
46+
- compatible
47+
- reg
48+
- clocks
49+
- clock-names
50+
- "#clock-cells"
51+
- "#reset-cells"
52+
53+
additionalProperties: false
54+
55+
examples:
56+
- |
57+
clock-controller@ff4a0000 {
58+
compatible = "rockchip,rk3528-cru";
59+
reg = <0xff4a0000 0x30000>;
60+
clocks = <&xin24m>, <&gmac0_clk>;
61+
clock-names = "xin24m", "gmac0";
62+
#clock-cells = <1>;
63+
#reset-cells = <1>;
64+
};
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/rockchip,rk3562-cru.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Rockchip rk3562 Clock and Reset Control Module
8+
9+
maintainers:
10+
- Elaine Zhang <zhangqing@rock-chips.com>
11+
- Heiko Stuebner <heiko@sntech.de>
12+
13+
description:
14+
The RK3562 clock controller generates the clock and also implements a reset
15+
controller for SoC peripherals. For example it provides SCLK_UART2 and
16+
PCLK_UART2, as well as SRST_P_UART2 and SRST_S_UART2 for the second UART
17+
module.
18+
19+
properties:
20+
compatible:
21+
const: rockchip,rk3562-cru
22+
23+
reg:
24+
maxItems: 1
25+
26+
"#clock-cells":
27+
const: 1
28+
29+
"#reset-cells":
30+
const: 1
31+
32+
clocks:
33+
maxItems: 2
34+
35+
clock-names:
36+
items:
37+
- const: xin24m
38+
- const: xin32k
39+
40+
required:
41+
- compatible
42+
- reg
43+
- "#clock-cells"
44+
- "#reset-cells"
45+
46+
additionalProperties: false
47+
48+
examples:
49+
- |
50+
clock-controller@ff100000 {
51+
compatible = "rockchip,rk3562-cru";
52+
reg = <0xff100000 0x40000>;
53+
#clock-cells = <1>;
54+
#reset-cells = <1>;
55+
};

drivers/clk/rockchip/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,20 @@ config CLK_RK3399
9393
help
9494
Build the driver for RK3399 Clock Driver.
9595

96+
config CLK_RK3528
97+
bool "Rockchip RK3528 clock controller support"
98+
depends on ARM64 || COMPILE_TEST
99+
default y
100+
help
101+
Build the driver for RK3528 Clock Controller.
102+
103+
config CLK_RK3562
104+
bool "Rockchip RK3562 clock controller support"
105+
depends on ARM64 || COMPILE_TEST
106+
default y
107+
help
108+
Build the driver for RK3562 Clock Controller.
109+
96110
config CLK_RK3568
97111
bool "Rockchip RK3568 clock controller support"
98112
depends on ARM64 || COMPILE_TEST

drivers/clk/rockchip/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ obj-$(CONFIG_CLK_RK3308) += clk-rk3308.o
2828
obj-$(CONFIG_CLK_RK3328) += clk-rk3328.o
2929
obj-$(CONFIG_CLK_RK3368) += clk-rk3368.o
3030
obj-$(CONFIG_CLK_RK3399) += clk-rk3399.o
31+
obj-$(CONFIG_CLK_RK3528) += clk-rk3528.o rst-rk3528.o
32+
obj-$(CONFIG_CLK_RK3562) += clk-rk3562.o rst-rk3562.o
3133
obj-$(CONFIG_CLK_RK3568) += clk-rk3568.o
3234
obj-$(CONFIG_CLK_RK3576) += clk-rk3576.o rst-rk3576.o
3335
obj-$(CONFIG_CLK_RK3588) += clk-rk3588.o rst-rk3588.o

drivers/clk/rockchip/clk-pll.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,12 @@ static int rockchip_rk3036_pll_set_params(struct rockchip_clk_pll *pll,
204204
rockchip_rk3036_pll_get_params(pll, &cur);
205205
cur.rate = 0;
206206

207-
cur_parent = pll_mux_ops->get_parent(&pll_mux->hw);
208-
if (cur_parent == PLL_MODE_NORM) {
209-
pll_mux_ops->set_parent(&pll_mux->hw, PLL_MODE_SLOW);
210-
rate_change_remuxed = 1;
207+
if (!(pll->flags & ROCKCHIP_PLL_FIXED_MODE)) {
208+
cur_parent = pll_mux_ops->get_parent(&pll_mux->hw);
209+
if (cur_parent == PLL_MODE_NORM) {
210+
pll_mux_ops->set_parent(&pll_mux->hw, PLL_MODE_SLOW);
211+
rate_change_remuxed = 1;
212+
}
211213
}
212214

213215
/* update pll values */

drivers/clk/rockchip/clk-rk3188.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {
337337

338338
GATE(0, "pclkin_cif0", "ext_cif0", 0,
339339
RK2928_CLKGATE_CON(3), 3, GFLAGS),
340-
INVERTER(0, "pclk_cif0", "pclkin_cif0",
340+
INVERTER(PCLK_CIF0, "pclk_cif0", "pclkin_cif0",
341341
RK2928_CLKSEL_CON(30), 8, IFLAGS),
342342

343343
FACTOR(0, "xin12m", "xin24m", 0, 1, 2),
@@ -595,7 +595,7 @@ static struct rockchip_clk_branch rk3066a_clk_branches[] __initdata = {
595595

596596
GATE(0, "pclkin_cif1", "ext_cif1", 0,
597597
RK2928_CLKGATE_CON(3), 4, GFLAGS),
598-
INVERTER(0, "pclk_cif1", "pclkin_cif1",
598+
INVERTER(PCLK_CIF1, "pclk_cif1", "pclkin_cif1",
599599
RK2928_CLKSEL_CON(30), 12, IFLAGS),
600600

601601
COMPOSITE(0, "aclk_gpu_src", mux_pll_src_cpll_gpll_p, 0,

drivers/clk/rockchip/clk-rk3328.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ PNAME(mux_aclk_peri_pre_p) = { "cpll_peri",
201201
"gpll_peri",
202202
"hdmiphy_peri" };
203203
PNAME(mux_ref_usb3otg_src_p) = { "xin24m",
204-
"clk_usb3otg_ref" };
204+
"clk_ref_usb3otg_src" };
205205
PNAME(mux_xin24m_32k_p) = { "xin24m",
206206
"clk_rtc32k" };
207207
PNAME(mux_mac2io_src_p) = { "clk_mac2io_src",

0 commit comments

Comments
 (0)