Skip to content

Commit 3973bcc

Browse files
committed
Merge tag 'clk-microchip-6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into clk-microchip
Pull Microchip clk driver updates from Claudiu Beznea: Polarfire: - new Kconfig symbol name (SOC_MICROCHIP_POLARFIRE) for Microchip FPGA clock drivers PIC32: - use of_property_read_bool() to read "microchip,pic32mzda-sosc" boolean DT property in clk-pic32mzda AT91: - convert clock dt-bindings to YAML * tag 'clk-microchip-6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: dt-bindings: clocks: at91sam9x5-sckc: convert to yaml dt-bindings: clocks: atmel,at91rm9200-pmc: convert to yaml clk: microchip: Use of_property_read_bool() for boolean properties clk: microchip: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE
2 parents ac9a786 + 9a7b010 commit 3973bcc

File tree

5 files changed

+227
-61
lines changed

5 files changed

+227
-61
lines changed

Documentation/devicetree/bindings/clock/at91-clock.txt

Lines changed: 0 additions & 58 deletions
This file was deleted.
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/atmel,at91rm9200-pmc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Atmel Power Management Controller (PMC)
8+
9+
maintainers:
10+
- Claudiu Beznea <[email protected]>
11+
12+
description:
13+
The power management controller optimizes power consumption by controlling all
14+
system and user peripheral clocks. The PMC enables/disables the clock inputs
15+
to many of the peripherals and to the processor.
16+
17+
properties:
18+
compatible:
19+
oneOf:
20+
- items:
21+
- const: atmel,at91sam9g20-pmc
22+
- const: atmel,at91sam9260-pmc
23+
- const: syscon
24+
- items:
25+
- enum:
26+
- atmel,at91sam9g15-pmc
27+
- atmel,at91sam9g25-pmc
28+
- atmel,at91sam9g35-pmc
29+
- atmel,at91sam9x25-pmc
30+
- atmel,at91sam9x35-pmc
31+
- const: atmel,at91sam9x5-pmc
32+
- const: syscon
33+
- items:
34+
- enum:
35+
- atmel,at91rm9200-pmc
36+
- atmel,at91sam9260-pmc
37+
- atmel,at91sam9g45-pmc
38+
- atmel,at91sam9n12-pmc
39+
- atmel,at91sam9rl-pmc
40+
- atmel,at91sam9x5-pmc
41+
- atmel,sama5d2-pmc
42+
- atmel,sama5d3-pmc
43+
- atmel,sama5d4-pmc
44+
- microchip,sam9x60-pmc
45+
- microchip,sama7g5-pmc
46+
- const: syscon
47+
48+
reg:
49+
maxItems: 1
50+
51+
interrupts:
52+
maxItems: 1
53+
54+
"#clock-cells":
55+
description: |
56+
- 1st cell is the clock type, one of PMC_TYPE_CORE, PMC_TYPE_SYSTEM,
57+
PMC_TYPE_PERIPHERAL, PMC_TYPE_GCK, PMC_TYPE_PROGRAMMABLE (as defined
58+
in <dt-bindings/clock/at91.h>)
59+
- 2nd cell is the clock identifier as defined in <dt-bindings/clock/at91.h
60+
(for core clocks) or as defined in datasheet (for system, peripheral,
61+
gck and programmable clocks).
62+
const: 2
63+
64+
clocks:
65+
minItems: 2
66+
maxItems: 3
67+
68+
clock-names:
69+
minItems: 2
70+
maxItems: 3
71+
72+
atmel,osc-bypass:
73+
description: set when a clock signal is directly provided on XIN
74+
type: boolean
75+
76+
required:
77+
- compatible
78+
- reg
79+
- interrupts
80+
- "#clock-cells"
81+
- clocks
82+
- clock-names
83+
84+
allOf:
85+
- if:
86+
properties:
87+
compatible:
88+
contains:
89+
enum:
90+
- microchip,sam9x60-pmc
91+
- microchip,sama7g5-pmc
92+
then:
93+
properties:
94+
clocks:
95+
minItems: 3
96+
maxItems: 3
97+
clock-names:
98+
items:
99+
- const: td_slck
100+
- const: md_slck
101+
- const: main_xtal
102+
103+
- if:
104+
properties:
105+
compatible:
106+
contains:
107+
enum:
108+
- atmel,at91rm9200-pmc
109+
- atmel,at91sam9260-pmc
110+
- atmel,at91sam9g20-pmc
111+
then:
112+
properties:
113+
clocks:
114+
minItems: 2
115+
maxItems: 2
116+
clock-names:
117+
items:
118+
- const: slow_xtal
119+
- const: main_xtal
120+
121+
- if:
122+
properties:
123+
compatible:
124+
contains:
125+
enum:
126+
- atmel,sama5d2-pmc
127+
- atmel,sama5d3-pmc
128+
- atmel,sama5d4-pmc
129+
then:
130+
properties:
131+
clocks:
132+
minItems: 2
133+
maxItems: 2
134+
clock-names:
135+
items:
136+
- const: slow_clk
137+
- const: main_xtal
138+
139+
additionalProperties: false
140+
141+
examples:
142+
- |
143+
#include <dt-bindings/interrupt-controller/irq.h>
144+
145+
pmc: clock-controller@f0018000 {
146+
compatible = "atmel,sama5d4-pmc", "syscon";
147+
reg = <0xf0018000 0x120>;
148+
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
149+
#clock-cells = <2>;
150+
clocks = <&clk32k>, <&main_xtal>;
151+
clock-names = "slow_clk", "main_xtal";
152+
};
153+
154+
...
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/atmel,at91sam9x5-sckc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Atmel Slow Clock Controller (SCKC)
8+
9+
maintainers:
10+
- Claudiu Beznea <[email protected]>
11+
12+
properties:
13+
compatible:
14+
oneOf:
15+
- enum:
16+
- atmel,at91sam9x5-sckc
17+
- atmel,sama5d3-sckc
18+
- atmel,sama5d4-sckc
19+
- microchip,sam9x60-sckc
20+
- items:
21+
- const: microchip,sama7g5-sckc
22+
- const: microchip,sam9x60-sckc
23+
24+
reg:
25+
maxItems: 1
26+
27+
clocks:
28+
maxItems: 1
29+
30+
"#clock-cells":
31+
enum: [0, 1]
32+
33+
atmel,osc-bypass:
34+
type: boolean
35+
description: set when a clock signal is directly provided on XIN
36+
37+
required:
38+
- compatible
39+
- reg
40+
- clocks
41+
- "#clock-cells"
42+
43+
allOf:
44+
- if:
45+
properties:
46+
compatible:
47+
contains:
48+
enum:
49+
- microchip,sam9x60-sckc
50+
then:
51+
properties:
52+
"#clock-cells":
53+
const: 1
54+
else:
55+
properties:
56+
"#clock-cells":
57+
const: 0
58+
59+
additionalProperties: false
60+
61+
examples:
62+
- |
63+
clk32k: clock-controller@fffffe50 {
64+
compatible = "microchip,sam9x60-sckc";
65+
reg = <0xfffffe50 0x4>;
66+
clocks = <&slow_xtal>;
67+
#clock-cells = <1>;
68+
};
69+
70+
...

drivers/clk/microchip/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ config COMMON_CLK_PIC32
55

66
config MCHP_CLK_MPFS
77
bool "Clk driver for PolarFire SoC"
8-
depends on SOC_MICROCHIP_POLARFIRE || COMPILE_TEST
9-
default SOC_MICROCHIP_POLARFIRE
8+
depends on ARCH_MICROCHIP_POLARFIRE || COMPILE_TEST
9+
default ARCH_MICROCHIP_POLARFIRE
1010
select AUXILIARY_BUS
1111
help
1212
Supports Clock Configuration for PolarFire SoC

drivers/clk/microchip/clk-pic32mzda.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static int pic32mzda_clk_probe(struct platform_device *pdev)
184184
clks[UPLLCLK] = clk_register_fixed_rate(&pdev->dev, "usbphy_clk", NULL,
185185
0, 24000000);
186186
/* fixed rate (optional) clock */
187-
if (of_find_property(np, "microchip,pic32mzda-sosc", NULL)) {
187+
if (of_property_read_bool(np, "microchip,pic32mzda-sosc")) {
188188
pr_info("pic32-clk: dt requests SOSC.\n");
189189
clks[SOSCCLK] = pic32_sosc_clk_register(&sosc_clk, core);
190190
}

0 commit comments

Comments
 (0)