Skip to content

Commit 7459da1

Browse files
committed
Merge branches 'clk-bindings', 'clk-renesas', 'clk-spacemit' and 'clk-cleanup' into clk-next
* clk-bindings: dt-bindings: clock: Drop st,stm32h7-rcc.txt dt-bindings: clock: convert bcm2835-aux-clock to yaml dt-bindings: clock: Drop maxim,max77686.txt dt-bindings: clock: convert vf610-clock.txt to yaml format * clk-renesas: (26 commits) clk: renesas: r9a09g047: Add XSPI clock/reset clk: renesas: r9a09g047: Add support for xspi mux and divider dt-bindings: clock: renesas,r9a09g047-cpg: Add XSPI and GBETH PTP core clocks clk: renesas: Use str_on_off() helper clk: renesas: r9a09g057: Add clock and reset entries for USB2 dt-bindings: clock: renesas,r9a09g057-cpg: Add USB2 PHY and GBETH PTP core clocks clk: renesas: rzv2h: Use both CLK_ON and CLK_MON bits for clock state validation clk: renesas: rzv2h: Use str_on_off() helper in rzv2h_mod_clock_endisable() clk: renesas: rzv2h: Support static dividers without RMW clk: renesas: rzv2h: Add macro for defining static dividers clk: renesas: rzv2h: Add support for static mux clocks clk: renesas: r9a09g047: Add clock and reset entries for GE3D clk: renesas: rzv2h: Fix a typo clk: renesas: rzv2h: Add support for RZ/V2N SoC clk: renesas: rzv2h: Sort compatible list based on SoC part number dt-bindings: pinctrl: renesas: Document RZ/V2N SoC dt-bindings: clock: renesas: Document RZ/V2N SoC CPG dt-bindings: soc: renesas: Document SYS for RZ/V2N SoC dt-bindings: soc: renesas: Document Renesas RZ/V2N SoC variants and EVK clk: renesas: rzv2h: Simplify rzv2h_cpg_assert()/rzv2h_cpg_deassert() ... * clk-spacemit: clk: spacemit: k1: Add TWSI8 bus and function clocks clk: spacemit: Add clock support for SpacemiT K1 SoC dt-bindings: clock: spacemit: Add spacemit,k1-pll dt-bindings: soc: spacemit: Add spacemit,k1-syscon * clk-cleanup: clk: test: Forward-declare struct of_phandle_args in kunit/clk.h clk: davinci: Use of_get_available_child_by_name() clk: bcm: rpi: Add NULL check in raspberrypi_clk_register() clk: bcm: rpi: Drop module alias clk: bcm: kona: Remove unused scaled_div_build
4 parents 72b421e + 1ffbdb7 + f37f6ba + 7a0c187 commit 7459da1

36 files changed

+3010
-100
lines changed

Documentation/devicetree/bindings/clock/renesas,rzv2h-cpg.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
$id: http://devicetree.org/schemas/clock/renesas,rzv2h-cpg.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: Renesas RZ/{G3E,V2H(P)} Clock Pulse Generator (CPG)
7+
title: Renesas RZ/{G3E,V2H(P),V2N} Clock Pulse Generator (CPG)
88

99
maintainers:
1010
- Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
1111

1212
description:
13-
On Renesas RZ/{G3E,V2H(P)} SoCs, the CPG (Clock Pulse Generator) handles
13+
On Renesas RZ/{G3E,V2H(P),V2N} SoCs, the CPG (Clock Pulse Generator) handles
1414
generation and control of clock signals for the IP modules, generation and
1515
control of resets, and control over booting, low power consumption and power
1616
supply domains.
@@ -19,6 +19,7 @@ properties:
1919
compatible:
2020
enum:
2121
- renesas,r9a09g047-cpg # RZ/G3E
22+
- renesas,r9a09g056-cpg # RZ/V2N
2223
- renesas,r9a09g057-cpg # RZ/V2H
2324

2425
reg:
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/spacemit,k1-pll.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: SpacemiT K1 PLL
8+
9+
maintainers:
10+
- Haylen Chu <heylenay@4d2.org>
11+
12+
properties:
13+
compatible:
14+
const: spacemit,k1-pll
15+
16+
reg:
17+
maxItems: 1
18+
19+
clocks:
20+
description: External 24MHz oscillator
21+
22+
spacemit,mpmu:
23+
$ref: /schemas/types.yaml#/definitions/phandle
24+
description:
25+
Phandle to the "Main PMU (MPMU)" syscon. It is used to check PLL
26+
lock status.
27+
28+
"#clock-cells":
29+
const: 1
30+
description:
31+
See <dt-bindings/clock/spacemit,k1-syscon.h> for valid indices.
32+
33+
required:
34+
- compatible
35+
- reg
36+
- clocks
37+
- spacemit,mpmu
38+
- "#clock-cells"
39+
40+
additionalProperties: false
41+
42+
examples:
43+
- |
44+
clock-controller@d4090000 {
45+
compatible = "spacemit,k1-pll";
46+
reg = <0xd4090000 0x1000>;
47+
clocks = <&vctcxo_24m>;
48+
spacemit,mpmu = <&sysctl_mpmu>;
49+
#clock-cells = <1>;
50+
};

Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ properties:
2727
- renesas,r9a07g044-pinctrl # RZ/G2{L,LC}
2828
- renesas,r9a08g045-pinctrl # RZ/G3S
2929
- renesas,r9a09g047-pinctrl # RZ/G3E
30+
- renesas,r9a09g056-pinctrl # RZ/V2N
3031
- renesas,r9a09g057-pinctrl # RZ/V2H(P)
3132

3233
- items:
@@ -145,6 +146,7 @@ allOf:
145146
contains:
146147
enum:
147148
- renesas,r9a09g047-pinctrl
149+
- renesas,r9a09g056-pinctrl
148150
- renesas,r9a09g057-pinctrl
149151
then:
150152
properties:

Documentation/devicetree/bindings/soc/renesas/renesas,r9a09g057-sys.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ properties:
2525
items:
2626
- enum:
2727
- renesas,r9a09g047-sys # RZ/G3E
28+
- renesas,r9a09g056-sys # RZ/V2N
2829
- renesas,r9a09g057-sys # RZ/V2H
2930

3031
reg:

Documentation/devicetree/bindings/soc/renesas/renesas.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,21 @@ properties:
551551
- renesas,r9a09g047e58 # Quad Cortex-A55 + Cortex-M33 + Ethos-U55 (21mm BGA)
552552
- const: renesas,r9a09g047
553553

554+
- description: RZ/V2N (R9A09G056)
555+
items:
556+
- enum:
557+
- renesas,rzv2n-evk # RZ/V2N EVK (RTK0EF0186C03000BJ)
558+
- enum:
559+
- renesas,r9a09g056n41 # RZ/V2N
560+
- renesas,r9a09g056n42 # RZ/V2N with Mali-G31 support
561+
- renesas,r9a09g056n43 # RZ/V2N with Mali-C55 support
562+
- renesas,r9a09g056n44 # RZ/V2N with Mali-G31 + Mali-C55 support
563+
- renesas,r9a09g056n45 # RZ/V2N with cryptographic extension support
564+
- renesas,r9a09g056n46 # RZ/V2N with Mali-G31 + cryptographic extension support
565+
- renesas,r9a09g056n47 # RZ/V2N with Mali-C55 + cryptographic extension support
566+
- renesas,r9a09g056n48 # RZ/V2N with Mali-G31 + Mali-C55 + cryptographic extension support
567+
- const: renesas,r9a09g056
568+
554569
- description: RZ/V2H(P) (R9A09G057)
555570
items:
556571
- enum:
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/soc/spacemit/spacemit,k1-syscon.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: SpacemiT K1 SoC System Controller
8+
9+
maintainers:
10+
- Haylen Chu <heylenay@4d2.org>
11+
12+
description:
13+
System controllers found on SpacemiT K1 SoC, which are capable of
14+
clock, reset and power-management functions.
15+
16+
properties:
17+
compatible:
18+
enum:
19+
- spacemit,k1-syscon-apbc
20+
- spacemit,k1-syscon-apmu
21+
- spacemit,k1-syscon-mpmu
22+
23+
reg:
24+
maxItems: 1
25+
26+
clocks:
27+
maxItems: 4
28+
29+
clock-names:
30+
items:
31+
- const: osc
32+
- const: vctcxo_1m
33+
- const: vctcxo_3m
34+
- const: vctcxo_24m
35+
36+
"#clock-cells":
37+
const: 1
38+
description:
39+
See <dt-bindings/clock/spacemit,k1-syscon.h> for valid indices.
40+
41+
"#power-domain-cells":
42+
const: 1
43+
44+
"#reset-cells":
45+
const: 1
46+
47+
required:
48+
- compatible
49+
- reg
50+
- clocks
51+
- clock-names
52+
- "#clock-cells"
53+
- "#reset-cells"
54+
55+
allOf:
56+
- if:
57+
properties:
58+
compatible:
59+
contains:
60+
const: spacemit,k1-syscon-apbc
61+
then:
62+
properties:
63+
"#power-domain-cells": false
64+
else:
65+
required:
66+
- "#power-domain-cells"
67+
68+
additionalProperties: false
69+
70+
examples:
71+
- |
72+
system-controller@d4050000 {
73+
compatible = "spacemit,k1-syscon-mpmu";
74+
reg = <0xd4050000 0x209c>;
75+
clocks = <&osc>, <&vctcxo_1m>, <&vctcxo_3m>, <&vctcxo_24m>;
76+
clock-names = "osc", "vctcxo_1m", "vctcxo_3m", "vctcxo_24m";
77+
#clock-cells = <1>;
78+
#power-domain-cells = <1>;
79+
#reset-cells = <1>;
80+
};

drivers/clk/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ source "drivers/clk/samsung/Kconfig"
517517
source "drivers/clk/sifive/Kconfig"
518518
source "drivers/clk/socfpga/Kconfig"
519519
source "drivers/clk/sophgo/Kconfig"
520+
source "drivers/clk/spacemit/Kconfig"
520521
source "drivers/clk/sprd/Kconfig"
521522
source "drivers/clk/starfive/Kconfig"
522523
source "drivers/clk/sunxi/Kconfig"

drivers/clk/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ obj-$(CONFIG_COMMON_CLK_SAMSUNG) += samsung/
145145
obj-$(CONFIG_CLK_SIFIVE) += sifive/
146146
obj-y += socfpga/
147147
obj-y += sophgo/
148+
obj-y += spacemit/
148149
obj-$(CONFIG_PLAT_SPEAR) += spear/
149150
obj-y += sprd/
150151
obj-$(CONFIG_ARCH_STI) += st/

drivers/clk/bcm/clk-kona.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,6 @@ static inline u64 scaled_div_value(struct bcm_clk_div *div, u32 reg_div)
5353
return (u64)reg_div + ((u64)1 << div->u.s.frac_width);
5454
}
5555

56-
/*
57-
* Build a scaled divider value as close as possible to the
58-
* given whole part (div_value) and fractional part (expressed
59-
* in billionths).
60-
*/
61-
u64 scaled_div_build(struct bcm_clk_div *div, u32 div_value, u32 billionths)
62-
{
63-
u64 combined;
64-
65-
BUG_ON(!div_value);
66-
BUG_ON(billionths >= BILLION);
67-
68-
combined = (u64)div_value * BILLION + billionths;
69-
combined <<= div->u.s.frac_width;
70-
71-
return DIV_ROUND_CLOSEST_ULL(combined, BILLION);
72-
}
73-
7456
/* The scaled minimum divisor representable by a divider */
7557
static inline u64
7658
scaled_div_min(struct bcm_clk_div *div)

drivers/clk/bcm/clk-kona.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,6 @@ extern struct clk_ops kona_peri_clk_ops;
492492
/* Externally visible functions */
493493

494494
extern u64 scaled_div_max(struct bcm_clk_div *div);
495-
extern u64 scaled_div_build(struct bcm_clk_div *div, u32 div_value,
496-
u32 billionths);
497495

498496
extern void __init kona_dt_ccu_setup(struct ccu_data *ccu,
499497
struct device_node *node);

0 commit comments

Comments
 (0)