Skip to content

Commit 7335631

Browse files
Linus Walleijbebarino
authored andcommitted
dt-bindings: clock: u8500: Add clkout clock bindings
This adds device tree bindings for the externally routed clocks CLKOUT1 and CLKOUT2 clocks found in the DB8500. Cc: devicetree@vger.kernel.org Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220414221751.323525-2-linus.walleij@linaro.org Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 3123109 commit 7335631

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

Documentation/devicetree/bindings/clock/stericsson,u8500-clks.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,25 @@ properties:
109109

110110
additionalProperties: false
111111

112+
clkout-clock:
113+
description: A subnode with three clock cells for externally routed clocks,
114+
output clocks. These are two PRCMU-internal clocks that can be divided and
115+
muxed out on the pads of the DB8500 SoC.
116+
type: object
117+
118+
properties:
119+
'#clock-cells':
120+
description:
121+
The first cell indicates which output clock we are using,
122+
possible values are 0 (CLKOUT1) and 1 (CLKOUT2).
123+
The second cell indicates which clock we want to use as source,
124+
possible values are 0 thru 7, see the defines for the different
125+
source clocks.
126+
The third cell is a divider, legal values are 1 thru 63.
127+
const: 3
128+
129+
additionalProperties: false
130+
112131
required:
113132
- compatible
114133
- reg
@@ -119,3 +138,41 @@ required:
119138
- smp-twd-clock
120139

121140
additionalProperties: false
141+
142+
examples:
143+
- |
144+
#include <dt-bindings/clock/ste-db8500-clkout.h>
145+
clocks@8012 {
146+
compatible = "stericsson,u8500-clks";
147+
reg = <0x8012f000 0x1000>, <0x8011f000 0x1000>,
148+
<0x8000f000 0x1000>, <0xa03ff000 0x1000>,
149+
<0xa03cf000 0x1000>;
150+
151+
prcmu_clk: prcmu-clock {
152+
#clock-cells = <1>;
153+
};
154+
155+
prcc_pclk: prcc-periph-clock {
156+
#clock-cells = <2>;
157+
};
158+
159+
prcc_kclk: prcc-kernel-clock {
160+
#clock-cells = <2>;
161+
};
162+
163+
prcc_reset: prcc-reset-controller {
164+
#reset-cells = <2>;
165+
};
166+
167+
rtc_clk: rtc32k-clock {
168+
#clock-cells = <0>;
169+
};
170+
171+
smp_twd_clk: smp-twd-clock {
172+
#clock-cells = <0>;
173+
};
174+
175+
clkout_clk: clkout-clock {
176+
#clock-cells = <3>;
177+
};
178+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef __STE_CLK_DB8500_CLKOUT_H__
3+
#define __STE_CLK_DB8500_CLKOUT_H__
4+
5+
#define DB8500_CLKOUT_1 0
6+
#define DB8500_CLKOUT_2 1
7+
8+
#define DB8500_CLKOUT_SRC_CLK38M 0
9+
#define DB8500_CLKOUT_SRC_ACLK 1
10+
#define DB8500_CLKOUT_SRC_SYSCLK 2
11+
#define DB8500_CLKOUT_SRC_LCDCLK 3
12+
#define DB8500_CLKOUT_SRC_SDMMCCLK 4
13+
#define DB8500_CLKOUT_SRC_TVCLK 5
14+
#define DB8500_CLKOUT_SRC_TIMCLK 6
15+
#define DB8500_CLKOUT_SRC_CLK009 7
16+
17+
#endif

0 commit comments

Comments
 (0)