Skip to content

Commit 2145bb6

Browse files
Daire McNamarabebarino
authored andcommitted
dt-bindings: clk: microchip: Add Microchip PolarFire host binding
Add device tree bindings for the Microchip PolarFire system clock controller Signed-off-by: Daire McNamara <daire.mcnamara@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211216140022.16146-2-conor.dooley@microchip.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent e783362 commit 2145bb6

File tree

2 files changed

+103
-0
lines changed

2 files changed

+103
-0
lines changed
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/microchip,mpfs.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Microchip PolarFire Clock Control Module Binding
8+
9+
maintainers:
10+
- Daire McNamara <daire.mcnamara@microchip.com>
11+
12+
description: |
13+
Microchip PolarFire clock control (CLKCFG) is an integrated clock controller,
14+
which gates and enables all peripheral clocks.
15+
16+
This device tree binding describes 33 gate clocks. Clocks are referenced by
17+
user nodes by the CLKCFG node phandle and the clock index in the group, from
18+
0 to 32.
19+
20+
properties:
21+
compatible:
22+
const: microchip,mpfs-clkcfg
23+
24+
reg:
25+
maxItems: 1
26+
27+
clocks:
28+
maxItems: 1
29+
30+
'#clock-cells':
31+
const: 1
32+
description: |
33+
The clock consumer should specify the desired clock by having the clock
34+
ID in its "clocks" phandle cell. See include/dt-bindings/clock/microchip,mpfs-clock.h
35+
for the full list of PolarFire clock IDs.
36+
37+
required:
38+
- compatible
39+
- reg
40+
- clocks
41+
- '#clock-cells'
42+
43+
additionalProperties: false
44+
45+
examples:
46+
# Clock Config node:
47+
- |
48+
#include <dt-bindings/clock/microchip,mpfs-clock.h>
49+
soc {
50+
#address-cells = <2>;
51+
#size-cells = <2>;
52+
clkcfg: clock-controller@20002000 {
53+
compatible = "microchip,mpfs-clkcfg";
54+
reg = <0x0 0x20002000 0x0 0x1000>;
55+
clocks = <&ref>;
56+
#clock-cells = <1>;
57+
};
58+
};
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2+
/*
3+
* Daire McNamara,<daire.mcnamara@microchip.com>
4+
* Copyright (C) 2020 Microchip Technology Inc. All rights reserved.
5+
*/
6+
7+
#ifndef _DT_BINDINGS_CLK_MICROCHIP_MPFS_H_
8+
#define _DT_BINDINGS_CLK_MICROCHIP_MPFS_H_
9+
10+
#define CLK_CPU 0
11+
#define CLK_AXI 1
12+
#define CLK_AHB 2
13+
14+
#define CLK_ENVM 3
15+
#define CLK_MAC0 4
16+
#define CLK_MAC1 5
17+
#define CLK_MMC 6
18+
#define CLK_TIMER 7
19+
#define CLK_MMUART0 8
20+
#define CLK_MMUART1 9
21+
#define CLK_MMUART2 10
22+
#define CLK_MMUART3 11
23+
#define CLK_MMUART4 12
24+
#define CLK_SPI0 13
25+
#define CLK_SPI1 14
26+
#define CLK_I2C0 15
27+
#define CLK_I2C1 16
28+
#define CLK_CAN0 17
29+
#define CLK_CAN1 18
30+
#define CLK_USB 19
31+
#define CLK_RESERVED 20
32+
#define CLK_RTC 21
33+
#define CLK_QSPI 22
34+
#define CLK_GPIO0 23
35+
#define CLK_GPIO1 24
36+
#define CLK_GPIO2 25
37+
#define CLK_DDRC 26
38+
#define CLK_FIC0 27
39+
#define CLK_FIC1 28
40+
#define CLK_FIC2 29
41+
#define CLK_FIC3 30
42+
#define CLK_ATHENA 31
43+
#define CLK_CFM 32
44+
45+
#endif /* _DT_BINDINGS_CLK_MICROCHIP_MPFS_H_ */

0 commit comments

Comments
 (0)