Skip to content

Commit 2c29798

Browse files
committed
Merge branches 'clk-ti', 'clk-cleanup', 'clk-airoha', 'clk-i2c-simple' and 'clk-renesas' into clk-next
- Airoha EN7523 SoC system clocks - Use i2c driver probe_new to avoid id scans * clk-ti: clk: ti: clkctrl: replace usage of found with dedicated list iterator variable clk: ti: composite: Prefer kcalloc over open coded arithmetic clk: keystone: syscon-clk: Add support for AM62 epwm-tbclk dt-bindings: clock: ehrpwm: Add AM62 specific compatible * clk-cleanup: clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc() clk: fixed-rate: Remove redundant if statement clk: mux: remove redundant initialization of variable width clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync clk: actions: remove redundant assignment after a mask operation * clk-airoha: clk: en7523: fix wrong pointer check in en7523_clk_probe() clk: en7523: Add clock driver for Airoha EN7523 SoC dt-bindings: Add en7523-scu device tree binding documentation * clk-i2c-simple: clk: renesas-pcie: use simple i2c probe function clk: si570: use i2c_match_id and simple i2c probe clk: si544: use i2c_match_id and simple i2c probe clk: si5351: use i2c_match_id and simple i2c probe clk: si5341: use simple i2c probe function clk: si514: use simple i2c probe function clk: max9485: use simple i2c probe function clk: cs2000-cp: use simple i2c probe function clk: cdce925: use i2c_match_id and simple i2c probe clk: cdce706: use simple i2c probe function * clk-renesas: (48 commits) clk: renesas: r9a09g011: Add eth clock and reset entries clk: renesas: Add RZ/V2M support using the rzg2l driver clk: renesas: rzg2l: Add support for RZ/V2M reset monitor reg clk: renesas: rzg2l: Make use of CLK_MON registers optional clk: renesas: rzg2l: Set HIWORD mask for all mux and dividers clk: renesas: rzg2l: Add read only versions of the clk macros clk: renesas: rzg2l: Move the DEF_MUX array size calc into the macro dt-bindings: clock: renesas,rzg2l: Document RZ/V2M SoC clk: renesas: r9a07g044: Fix OSTM1 module clock name clk: renesas: r9a07g043: Add clock and reset entries for ADC clk: renesas: r9a07g043: Add TSU clock and reset entry clk: renesas: r9a07g043: Add RSPI clock and reset entries clk: renesas: r9a07g043: Add clock and reset entries for SPI Multi I/O Bus Controller clk: renesas: r9a07g044: Add DSI clock and reset entries clk: renesas: r9a07g044: Add LCDC clock and reset entries clk: renesas: r9a07g044: Add M4 Clock support clk: renesas: r9a07g044: Add M3 Clock support clk: renesas: r9a07g044: Add {M2, M2_DIV2} Clocks support clk: renesas: r9a07g044: Add M1 clock support clk: renesas: rzg2l: Add DSI divider clk support ...
5 parents 560a316 + b7fa624 + c6b61d4 + 5baa12c + 13982e8 commit 2c29798

52 files changed

Lines changed: 2619 additions & 193 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/airoha,en7523-scu.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: EN7523 Clock Device Tree Bindings
8+
9+
maintainers:
10+
- Felix Fietkau <nbd@nbd.name>
11+
- John Crispin <nbd@nbd.name>
12+
13+
description: |
14+
This node defines the System Control Unit of the EN7523 SoC,
15+
a collection of registers configuring many different aspects of the SoC.
16+
17+
The clock driver uses it to read and configure settings of the
18+
PLL controller, which provides clocks for the CPU, the bus and
19+
other SoC internal peripherals.
20+
21+
Each clock is assigned an identifier and client nodes use this identifier
22+
to specify which clock they consume.
23+
24+
All these identifiers can be found in:
25+
[1]: <include/dt-bindings/clock/en7523-clk.h>.
26+
27+
The clocks are provided inside a system controller node.
28+
29+
properties:
30+
compatible:
31+
items:
32+
- const: airoha,en7523-scu
33+
34+
reg:
35+
maxItems: 2
36+
37+
"#clock-cells":
38+
description:
39+
The first cell indicates the clock number, see [1] for available
40+
clocks.
41+
const: 1
42+
43+
required:
44+
- compatible
45+
- reg
46+
- '#clock-cells'
47+
48+
additionalProperties: false
49+
50+
examples:
51+
- |
52+
#include <dt-bindings/clock/en7523-clk.h>
53+
scu: system-controller@1fa20000 {
54+
compatible = "airoha,en7523-scu";
55+
reg = <0x1fa20000 0x400>,
56+
<0x1fb00000 0x1000>;
57+
#clock-cells = <1>;
58+
};

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ properties:
4949
- renesas,r8a77995-cpg-mssr # R-Car D3
5050
- renesas,r8a779a0-cpg-mssr # R-Car V3U
5151
- renesas,r8a779f0-cpg-mssr # R-Car S4-8
52+
- renesas,r8a779g0-cpg-mssr # R-Car V4H
5253

5354
reg:
5455
maxItems: 1

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
$id: "http://devicetree.org/schemas/clock/renesas,rzg2l-cpg.yaml#"
55
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
66

7-
title: Renesas RZ/{G2L,V2L} Clock Pulse Generator / Module Standby Mode
7+
title: Renesas RZ/{G2L,V2L,V2M} Clock Pulse Generator / Module Standby Mode
88

99
maintainers:
1010
- Geert Uytterhoeven <geert+renesas@glider.be>
1111

1212
description: |
13-
On Renesas RZ/{G2L,V2L} SoC, the CPG (Clock Pulse Generator) and Module
14-
Standby Mode share the same register block.
13+
On Renesas RZ/{G2L,V2L}-alike SoC's, the CPG (Clock Pulse Generator) and Module
14+
Standby Mode share the same register block. On RZ/V2M, the functionality is
15+
similar, but does not have Clock Monitor Registers.
1516
1617
They provide the following functionalities:
1718
- The CPG block generates various core clocks,
@@ -23,8 +24,10 @@ description: |
2324
properties:
2425
compatible:
2526
enum:
26-
- renesas,r9a07g044-cpg # RZ/G2{L,LC}
27-
- renesas,r9a07g054-cpg # RZ/V2L
27+
- renesas,r9a07g043-cpg # RZ/G2UL{Type-1,Type-2}
28+
- renesas,r9a07g044-cpg # RZ/G2{L,LC}
29+
- renesas,r9a07g054-cpg # RZ/V2L
30+
- renesas,r9a09g011-cpg # RZ/V2M
2831

2932
reg:
3033
maxItems: 1
@@ -42,9 +45,10 @@ properties:
4245
description: |
4346
- For CPG core clocks, the two clock specifier cells must be "CPG_CORE"
4447
and a core clock reference, as defined in
45-
<dt-bindings/clock/r9a07g*-cpg.h>
48+
<dt-bindings/clock/r9a0*-cpg.h>
4649
- For module clocks, the two clock specifier cells must be "CPG_MOD" and
47-
a module number, as defined in the <dt-bindings/clock/r9a07g0*-cpg.h>.
50+
a module number, as defined in the <dt-bindings/clock/r9a07g0*-cpg.h> or
51+
<dt-bindings/clock/r9a09g011-cpg.h>.
4852
const: 2
4953

5054
'#power-domain-cells':
@@ -58,7 +62,7 @@ properties:
5862
'#reset-cells':
5963
description:
6064
The single reset specifier cell must be the module number, as defined in
61-
the <dt-bindings/clock/r9a07g0*-cpg.h>.
65+
the <dt-bindings/clock/r9a07g0*-cpg.h> or <dt-bindings/clock/r9a09g011-cpg.h>.
6266
const: 1
6367

6468
required:

drivers/clk/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,15 @@ config COMMON_CLK_CS2000_CP
210210
help
211211
If you say yes here you get support for the CS2000 clock multiplier.
212212

213+
config COMMON_CLK_EN7523
214+
bool "Clock driver for Airoha EN7523 SoC system clocks"
215+
depends on OF
216+
depends on ARCH_AIROHA || COMPILE_TEST
217+
default ARCH_AIROHA
218+
help
219+
This driver provides the fixed clocks and gates present on Airoha
220+
ARM silicon.
221+
213222
config COMMON_CLK_FSL_FLEXSPI
214223
tristate "Clock driver for FlexSPI on Layerscape SoCs"
215224
depends on ARCH_LAYERSCAPE || COMPILE_TEST

drivers/clk/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ obj-$(CONFIG_COMMON_CLK_CDCE925) += clk-cdce925.o
3030
obj-$(CONFIG_ARCH_CLPS711X) += clk-clps711x.o
3131
obj-$(CONFIG_COMMON_CLK_CS2000_CP) += clk-cs2000-cp.o
3232
obj-$(CONFIG_ARCH_SPARX5) += clk-sparx5.o
33+
obj-$(CONFIG_COMMON_CLK_EN7523) += clk-en7523.o
3334
obj-$(CONFIG_COMMON_CLK_FIXED_MMIO) += clk-fixed-mmio.o
3435
obj-$(CONFIG_COMMON_CLK_FSL_FLEXSPI) += clk-fsl-flexspi.o
3536
obj-$(CONFIG_COMMON_CLK_FSL_SAI) += clk-fsl-sai.o

drivers/clk/actions/owl-pll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static u32 owl_pll_calculate_mul(struct owl_pll_hw *pll_hw, unsigned long rate)
2525
else if (mul > pll_hw->max_mul)
2626
mul = pll_hw->max_mul;
2727

28-
return mul &= mul_mask(pll_hw);
28+
return mul & mul_mask(pll_hw);
2929
}
3030

3131
static unsigned long _get_table_rate(const struct clk_pll_table *table,

drivers/clk/bcm/clk-raspberrypi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ static int raspberrypi_discover_clocks(struct raspberrypi_clk *rpi,
345345
int ret;
346346

347347
clks = devm_kcalloc(rpi->dev,
348-
sizeof(*clks), RPI_FIRMWARE_NUM_CLK_ID,
348+
RPI_FIRMWARE_NUM_CLK_ID, sizeof(*clks),
349349
GFP_KERNEL);
350350
if (!clks)
351351
return -ENOMEM;

drivers/clk/clk-cdce706.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,7 @@ of_clk_cdce_get(struct of_phandle_args *clkspec, void *data)
627627
return &cdce->clkout[idx].hw;
628628
}
629629

630-
static int cdce706_probe(struct i2c_client *client,
631-
const struct i2c_device_id *id)
630+
static int cdce706_probe(struct i2c_client *client)
632631
{
633632
struct i2c_adapter *adapter = client->adapter;
634633
struct cdce706_dev_data *cdce;
@@ -692,7 +691,7 @@ static struct i2c_driver cdce706_i2c_driver = {
692691
.name = "cdce706",
693692
.of_match_table = of_match_ptr(cdce706_dt_match),
694693
},
695-
.probe = cdce706_probe,
694+
.probe_new = cdce706_probe,
696695
.remove = cdce706_remove,
697696
.id_table = cdce706_id,
698697
};

drivers/clk/clk-cdce925.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -634,11 +634,20 @@ static struct regmap_bus regmap_cdce925_bus = {
634634
.read = cdce925_regmap_i2c_read,
635635
};
636636

637-
static int cdce925_probe(struct i2c_client *client,
638-
const struct i2c_device_id *id)
637+
static const struct i2c_device_id cdce925_id[] = {
638+
{ "cdce913", CDCE913 },
639+
{ "cdce925", CDCE925 },
640+
{ "cdce937", CDCE937 },
641+
{ "cdce949", CDCE949 },
642+
{ }
643+
};
644+
MODULE_DEVICE_TABLE(i2c, cdce925_id);
645+
646+
static int cdce925_probe(struct i2c_client *client)
639647
{
640648
struct clk_cdce925_chip *data;
641649
struct device_node *node = client->dev.of_node;
650+
const struct i2c_device_id *id = i2c_match_id(cdce925_id, client);
642651
const char *parent_name;
643652
const char *pll_clk_name[MAX_NUMBER_OF_PLLS] = {NULL,};
644653
struct clk_init_data init;
@@ -814,15 +823,6 @@ static int cdce925_probe(struct i2c_client *client,
814823
return err;
815824
}
816825

817-
static const struct i2c_device_id cdce925_id[] = {
818-
{ "cdce913", CDCE913 },
819-
{ "cdce925", CDCE925 },
820-
{ "cdce937", CDCE937 },
821-
{ "cdce949", CDCE949 },
822-
{ }
823-
};
824-
MODULE_DEVICE_TABLE(i2c, cdce925_id);
825-
826826
static const struct of_device_id clk_cdce925_of_match[] = {
827827
{ .compatible = "ti,cdce913" },
828828
{ .compatible = "ti,cdce925" },
@@ -837,7 +837,7 @@ static struct i2c_driver cdce925_driver = {
837837
.name = "cdce925",
838838
.of_match_table = of_match_ptr(clk_cdce925_of_match),
839839
},
840-
.probe = cdce925_probe,
840+
.probe_new = cdce925_probe,
841841
.id_table = cdce925_id,
842842
};
843843
module_i2c_driver(cdce925_driver);

drivers/clk/clk-cs2000-cp.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,8 +570,7 @@ static int cs2000_remove(struct i2c_client *client)
570570
return 0;
571571
}
572572

573-
static int cs2000_probe(struct i2c_client *client,
574-
const struct i2c_device_id *id)
573+
static int cs2000_probe(struct i2c_client *client)
575574
{
576575
struct cs2000_priv *priv;
577576
struct device *dev = &client->dev;
@@ -625,7 +624,7 @@ static struct i2c_driver cs2000_driver = {
625624
.pm = &cs2000_pm_ops,
626625
.of_match_table = cs2000_of_match,
627626
},
628-
.probe = cs2000_probe,
627+
.probe_new = cs2000_probe,
629628
.remove = cs2000_remove,
630629
.id_table = cs2000_id,
631630
};

0 commit comments

Comments
 (0)