Skip to content

Commit 3ad7bef

Browse files
committed
Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Pull more clk updates from Stephen Boyd: "This is the second batch of clk driver updates that needed a little more time to soak in linux-next. - Use modern i2c probe in vc5 - Cleanup some includes - Update links to datasheets - Add UniPhier NX1 SoC clk support - Fix DT bindings for SiFive FU740 - Revert the module platform driver support for Rockchip because it wasn't actually tested - Fix the composite clk code again as the previous fix had a one line bug that broke rate changes for clks that want to use the same parent still - Use the right table for a divider in ast2600 driver - Get rid of gcc_aggre1_pnoc_ahb_clk in qcom clk driver again because its critical but unused" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: qcom: gcc-msm8996: Drop (again) gcc_aggre1_pnoc_ahb_clk clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites clk/ast2600: Fix soc revision for AHB clk: composite: Fix 'switching' to same clock clk: rockchip: drop module parts from rk3399 and rk3568 drivers Revert "clk: rockchip: use module_platform_driver_probe" clk:mediatek: remove duplicate include in clk-mt8195-imp_iic_wrap.c dt-bindings: clock: fu740-prci: add reset-cells clk: uniphier: Add SoC-glue clock source selector support for Pro4 dt-bindings: clock: uniphier: Add clock binding for SoC-glue clk: uniphier: Add NX1 clock support dt-bindings: clock: uniphier: Add NX1 clock binding clk: uniphier: Add audio system and video input clock control for PXs3 clk: si5351: Update datasheet references clk: vc5: Use i2c .probe_new clk/actions/owl-factor.c: remove superfluous headers clk: ingenic: Fix bugs with divided dividers
2 parents f44c7db + 05cf3ec commit 3ad7bef

File tree

19 files changed

+105
-48
lines changed

19 files changed

+105
-48
lines changed

Documentation/devicetree/bindings/clock/sifive/fu740-prci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ properties:
4242
"#clock-cells":
4343
const: 1
4444

45+
"#reset-cells":
46+
const: 1
47+
4548
required:
4649
- compatible
4750
- reg
@@ -57,4 +60,5 @@ examples:
5760
reg = <0x10000000 0x1000>;
5861
clocks = <&hfclk>, <&rtcclk>;
5962
#clock-cells = <1>;
63+
#reset-cells = <1>;
6064
};

Documentation/devicetree/bindings/clock/silabs,si5351.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Binding for Silicon Labs Si5351a/b/c programmable i2c clock generator.
22

33
Reference
44
[1] Si5351A/B/C Data Sheet
5-
https://www.silabs.com/Support%20Documents/TechnicalDocs/Si5351.pdf
5+
https://www.skyworksinc.com/-/media/Skyworks/SL/documents/public/data-sheets/Si5351-B.pdf
66

77
The Si5351a/b/c are programmable i2c clock generators with up to 8 output
88
clocks. Si5351a also has a reduced pin-count package (MSOP10) where only

Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ properties:
2323
- socionext,uniphier-ld11-clock
2424
- socionext,uniphier-ld20-clock
2525
- socionext,uniphier-pxs3-clock
26+
- socionext,uniphier-nx1-clock
2627
- description: Media I/O (MIO) clock, SD clock
2728
enum:
2829
- socionext,uniphier-ld4-mio-clock
@@ -33,6 +34,7 @@ properties:
3334
- socionext,uniphier-ld11-mio-clock
3435
- socionext,uniphier-ld20-sd-clock
3536
- socionext,uniphier-pxs3-sd-clock
37+
- socionext,uniphier-nx1-sd-clock
3638
- description: Peripheral clock
3739
enum:
3840
- socionext,uniphier-ld4-peri-clock
@@ -43,6 +45,10 @@ properties:
4345
- socionext,uniphier-ld11-peri-clock
4446
- socionext,uniphier-ld20-peri-clock
4547
- socionext,uniphier-pxs3-peri-clock
48+
- socionext,uniphier-nx1-peri-clock
49+
- description: SoC-glue clock
50+
enum:
51+
- socionext,uniphier-pro4-sg-clock
4652

4753
"#clock-cells":
4854
const: 1

drivers/clk/actions/owl-factor.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#include <linux/clk-provider.h>
1212
#include <linux/regmap.h>
13-
#include <linux/slab.h>
1413

1514
#include "owl-factor.h"
1615

drivers/clk/clk-ast2600.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ static DEFINE_SPINLOCK(aspeed_g6_clk_lock);
5151
static struct clk_hw_onecell_data *aspeed_g6_clk_data;
5252

5353
static void __iomem *scu_g6_base;
54+
/* AST2600 revision: A0, A1, A2, etc */
55+
static u8 soc_rev;
5456

5557
/*
5658
* Clocks marked with CLK_IS_CRITICAL:
@@ -191,9 +193,8 @@ static struct clk_hw *ast2600_calc_pll(const char *name, u32 val)
191193
static struct clk_hw *ast2600_calc_apll(const char *name, u32 val)
192194
{
193195
unsigned int mult, div;
194-
u32 chip_id = readl(scu_g6_base + ASPEED_G6_SILICON_REV);
195196

196-
if (((chip_id & CHIP_REVISION_ID) >> 16) >= 2) {
197+
if (soc_rev >= 2) {
197198
if (val & BIT(24)) {
198199
/* Pass through mode */
199200
mult = div = 1;
@@ -707,7 +708,7 @@ static const u32 ast2600_a1_axi_ahb200_tbl[] = {
707708
static void __init aspeed_g6_cc(struct regmap *map)
708709
{
709710
struct clk_hw *hw;
710-
u32 val, div, divbits, chip_id, axi_div, ahb_div;
711+
u32 val, div, divbits, axi_div, ahb_div;
711712

712713
clk_hw_register_fixed_rate(NULL, "clkin", NULL, 0, 25000000);
713714

@@ -738,8 +739,7 @@ static void __init aspeed_g6_cc(struct regmap *map)
738739
axi_div = 2;
739740

740741
divbits = (val >> 11) & 0x3;
741-
regmap_read(map, ASPEED_G6_SILICON_REV, &chip_id);
742-
if (chip_id & BIT(16)) {
742+
if (soc_rev >= 1) {
743743
if (!divbits) {
744744
ahb_div = ast2600_a1_axi_ahb200_tbl[(val >> 8) & 0x3];
745745
if (val & BIT(16))
@@ -784,6 +784,8 @@ static void __init aspeed_g6_cc_init(struct device_node *np)
784784
if (!scu_g6_base)
785785
return;
786786

787+
soc_rev = (readl(scu_g6_base + ASPEED_G6_SILICON_REV) & CHIP_REVISION_ID) >> 16;
788+
787789
aspeed_g6_clk_data = kzalloc(struct_size(aspeed_g6_clk_data, hws,
788790
ASPEED_G6_NUM_CLKS), GFP_KERNEL);
789791
if (!aspeed_g6_clk_data)

drivers/clk/clk-composite.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ static int clk_composite_determine_rate(struct clk_hw *hw,
9797
return ret;
9898

9999
req->rate = tmp_req.rate;
100+
req->best_parent_hw = tmp_req.best_parent_hw;
100101
req->best_parent_rate = tmp_req.best_parent_rate;
101102

102103
return 0;

drivers/clk/clk-si5351.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later
22
/*
3-
* clk-si5351.c: Silicon Laboratories Si5351A/B/C I2C Clock Generator
3+
* clk-si5351.c: Skyworks / Silicon Labs Si5351A/B/C I2C Clock Generator
44
*
55
* Sebastian Hesselbarth <[email protected]>
66
* Rabeeh Khoury <[email protected]>
77
*
88
* References:
99
* [1] "Si5351A/B/C Data Sheet"
10-
* https://www.silabs.com/Support%20Documents/TechnicalDocs/Si5351.pdf
11-
* [2] "Manually Generating an Si5351 Register Map"
12-
* https://www.silabs.com/Support%20Documents/TechnicalDocs/AN619.pdf
10+
* https://www.skyworksinc.com/-/media/Skyworks/SL/documents/public/data-sheets/Si5351-B.pdf
11+
* [2] "AN619: Manually Generating an Si5351 Register Map"
12+
* https://www.skyworksinc.com/-/media/Skyworks/SL/documents/public/application-notes/AN619.pdf
1313
*/
1414

1515
#include <linux/module.h>

drivers/clk/clk-si5351.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22
/*
3-
* clk-si5351.h: Silicon Laboratories Si5351A/B/C I2C Clock Generator
3+
* clk-si5351.h: Skyworks / Silicon Labs Si5351A/B/C I2C Clock Generator
44
*
55
* Sebastian Hesselbarth <[email protected]>
66
* Rabeeh Khoury <[email protected]>

drivers/clk/clk-versaclock5.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ static int vc5_get_output_config(struct i2c_client *client,
905905

906906
static const struct of_device_id clk_vc5_of_match[];
907907

908-
static int vc5_probe(struct i2c_client *client, const struct i2c_device_id *id)
908+
static int vc5_probe(struct i2c_client *client)
909909
{
910910
unsigned int oe, sd, src_mask = 0, src_val = 0;
911911
struct vc5_driver_data *vc5;
@@ -1244,7 +1244,7 @@ static struct i2c_driver vc5_driver = {
12441244
.pm = &vc5_pm_ops,
12451245
.of_match_table = clk_vc5_of_match,
12461246
},
1247-
.probe = vc5_probe,
1247+
.probe_new = vc5_probe,
12481248
.remove = vc5_remove,
12491249
.id_table = vc5_id,
12501250
};

drivers/clk/imx/clk.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,11 +391,11 @@ struct clk_hw *__imx8m_clk_hw_composite(const char *name,
391391

392392
#define imx8m_clk_hw_composite(name, parent_names, reg) \
393393
_imx8m_clk_hw_composite(name, parent_names, reg, \
394-
IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
394+
0, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
395395

396396
#define imx8m_clk_hw_composite_critical(name, parent_names, reg) \
397397
_imx8m_clk_hw_composite(name, parent_names, reg, \
398-
IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
398+
0, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
399399

400400
#define imx8m_clk_hw_composite_bus(name, parent_names, reg) \
401401
_imx8m_clk_hw_composite(name, parent_names, reg, \

0 commit comments

Comments
 (0)