Skip to content

Commit f2b883b

Browse files
linuswbebarino
authored andcommitted
dt-bindings: clock: u8500: Rewrite in YAML and extend
This rewrites the ux500/u8500 clock bindings in YAML schema and extends them with the PRCC reset controller. The bindings are a bit idiomatic but it just reflects their age, the ux500 platform was used as guinea pig for early device tree conversion of platforms in 2015. The new subnode for the reset controller follows the pattern of the old bindings and adds a node with reset-cells for this. Cc: [email protected] Cc: Philipp Zabel <[email protected]> Reviewed-by: Rob Herring <[email protected]> Acked-by: Ulf Hansson <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 6880fa6 commit f2b883b

File tree

3 files changed

+172
-64
lines changed

3 files changed

+172
-64
lines changed
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/stericsson,u8500-clks.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ST-Ericsson DB8500 (U8500) clocks
8+
9+
maintainers:
10+
- Ulf Hansson <[email protected]>
11+
- Linus Walleij <[email protected]>
12+
13+
description: While named "U8500 clocks" these clocks are inside the
14+
DB8500 digital baseband system-on-chip and its siblings such as
15+
DB8520. These bindings consider the clocks present in the SoC
16+
itself, not off-chip clocks. There are four different on-chip
17+
clocks - RTC (32 kHz), CPU clock (SMP TWD), PRCMU (power reset and
18+
control management unit) clocks and PRCC (peripheral reset and
19+
clock controller) clocks. For some reason PRCC 4 does not exist so
20+
the itemization can be a bit unintuitive.
21+
22+
properties:
23+
compatible:
24+
enum:
25+
- stericsson,u8500-clks
26+
- stericsson,u8540-clks
27+
- stericsson,u9540-clks
28+
29+
reg:
30+
items:
31+
- description: PRCC 1 register area
32+
- description: PRCC 2 register area
33+
- description: PRCC 3 register area
34+
- description: PRCC 5 register area
35+
- description: PRCC 6 register area
36+
37+
prcmu-clock:
38+
description: A subnode with one clock cell for PRCMU (power, reset, control
39+
management unit) clocks. The cell indicates which PRCMU clock in the
40+
prcmu-clock node the consumer wants to use.
41+
type: object
42+
43+
properties:
44+
'#clock-cells':
45+
const: 1
46+
47+
additionalProperties: false
48+
49+
prcc-periph-clock:
50+
description: A subnode with two clock cells for PRCC (peripheral
51+
reset and clock controller) peripheral clocks. The first cell indicates
52+
which PRCC block the consumer wants to use, possible values are 1, 2, 3,
53+
5, 6. The second cell indicates which clock inside the PRCC block it
54+
wants, possible values are 0 thru 31.
55+
type: object
56+
57+
properties:
58+
'#clock-cells':
59+
const: 2
60+
61+
additionalProperties: false
62+
63+
prcc-kernel-clock:
64+
description: A subnode with two clock cells for PRCC (peripheral reset
65+
and clock controller) kernel clocks. The first cell indicates which PRCC
66+
block the consumer wants to use, possible values are 1, 2, 3, 5, 6. The
67+
second cell indicates which clock inside the PRCC block it wants, possible
68+
values are 0 thru 31.
69+
type: object
70+
71+
properties:
72+
'#clock-cells':
73+
const: 2
74+
75+
additionalProperties: false
76+
77+
prcc-reset-controller:
78+
description: A subnode with two reset cells for the reset portions of the
79+
PRCC (peripheral reset and clock controller). The first cell indicates
80+
which PRCC block the consumer wants to use, possible values are 1, 2, 3
81+
5 and 6. The second cell indicates which reset line inside the PRCC block
82+
it wants to control, possible values are 0 thru 31.
83+
type: object
84+
85+
properties:
86+
'#reset-cells':
87+
const: 2
88+
89+
additionalProperties: false
90+
91+
rtc32k-clock:
92+
description: A subnode with zero clock cells for the 32kHz RTC clock.
93+
type: object
94+
95+
properties:
96+
'#clock-cells':
97+
const: 0
98+
99+
additionalProperties: false
100+
101+
smp-twd-clock:
102+
description: A subnode for the ARM SMP Timer Watchdog cluster with zero
103+
clock cells.
104+
type: object
105+
106+
properties:
107+
'#clock-cells':
108+
const: 0
109+
110+
additionalProperties: false
111+
112+
required:
113+
- compatible
114+
- reg
115+
- prcmu-clock
116+
- prcc-periph-clock
117+
- prcc-kernel-clock
118+
- rtc32k-clock
119+
- smp-twd-clock
120+
121+
additionalProperties: false

Documentation/devicetree/bindings/clock/ux500.txt

Lines changed: 0 additions & 64 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
#ifndef _DT_BINDINGS_STE_PRCC_RESET
4+
#define _DT_BINDINGS_STE_PRCC_RESET
5+
6+
#define DB8500_PRCC_1 1
7+
#define DB8500_PRCC_2 2
8+
#define DB8500_PRCC_3 3
9+
#define DB8500_PRCC_6 6
10+
11+
/* Reset lines on PRCC 1 */
12+
#define DB8500_PRCC_1_RESET_UART0 0
13+
#define DB8500_PRCC_1_RESET_UART1 1
14+
#define DB8500_PRCC_1_RESET_I2C1 2
15+
#define DB8500_PRCC_1_RESET_MSP0 3
16+
#define DB8500_PRCC_1_RESET_MSP1 4
17+
#define DB8500_PRCC_1_RESET_SDI0 5
18+
#define DB8500_PRCC_1_RESET_I2C2 6
19+
#define DB8500_PRCC_1_RESET_SPI3 7
20+
#define DB8500_PRCC_1_RESET_SLIMBUS0 8
21+
#define DB8500_PRCC_1_RESET_I2C4 9
22+
#define DB8500_PRCC_1_RESET_MSP3 10
23+
#define DB8500_PRCC_1_RESET_PER_MSP3 11
24+
#define DB8500_PRCC_1_RESET_PER_MSP1 12
25+
#define DB8500_PRCC_1_RESET_PER_MSP0 13
26+
#define DB8500_PRCC_1_RESET_PER_SLIMBUS 14
27+
28+
/* Reset lines on PRCC 2 */
29+
#define DB8500_PRCC_2_RESET_I2C3 0
30+
#define DB8500_PRCC_2_RESET_PWL 1
31+
#define DB8500_PRCC_2_RESET_SDI4 2
32+
#define DB8500_PRCC_2_RESET_MSP2 3
33+
#define DB8500_PRCC_2_RESET_SDI1 4
34+
#define DB8500_PRCC_2_RESET_SDI3 5
35+
#define DB8500_PRCC_2_RESET_HSIRX 6
36+
#define DB8500_PRCC_2_RESET_HSITX 7
37+
#define DB8500_PRCC_1_RESET_PER_MSP2 8
38+
39+
/* Reset lines on PRCC 3 */
40+
#define DB8500_PRCC_3_RESET_SSP0 1
41+
#define DB8500_PRCC_3_RESET_SSP1 2
42+
#define DB8500_PRCC_3_RESET_I2C0 3
43+
#define DB8500_PRCC_3_RESET_SDI2 4
44+
#define DB8500_PRCC_3_RESET_SKE 5
45+
#define DB8500_PRCC_3_RESET_UART2 6
46+
#define DB8500_PRCC_3_RESET_SDI5 7
47+
48+
/* Reset lines on PRCC 6 */
49+
#define DB8500_PRCC_3_RESET_RNG 0
50+
51+
#endif

0 commit comments

Comments
 (0)