Skip to content

Commit b02011c

Browse files
robherringbebarino
authored andcommitted
dt-bindings: clock: Convert silabs,si5341 to DT schema
Convert the Silicon Labs SI5341 binding to DT schema format. It's a straight-forward conversion. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250804222034.4083410-1-robh@kernel.org Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent d903f5c commit b02011c

2 files changed

Lines changed: 217 additions & 175 deletions

File tree

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

Lines changed: 0 additions & 175 deletions
This file was deleted.
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/silabs,si5341.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Silicon Labs Si5340/1/2/4/5 programmable i2c clock generator
8+
9+
maintainers:
10+
- Mike Looijmans <mike.looijmans@topic.nl>
11+
12+
description: >
13+
Silicon Labs Si5340, Si5341 Si5342, Si5344 and Si5345 programmable i2c clock
14+
generator.
15+
16+
Reference
17+
[1] Si5341 Data Sheet
18+
https://www.silabs.com/documents/public/data-sheets/Si5341-40-D-DataSheet.pdf
19+
[2] Si5341 Reference Manual
20+
https://www.silabs.com/documents/public/reference-manuals/Si5341-40-D-RM.pdf
21+
[3] Si5345 Reference Manual
22+
https://www.silabs.com/documents/public/reference-manuals/Si5345-44-42-D-RM.pdf
23+
24+
The Si5341 and Si5340 are programmable i2c clock generators with up to 10 output
25+
clocks. The chip contains a PLL that sources 5 (or 4) multisynth clocks, which
26+
in turn can be directed to any of the 10 (or 4) outputs through a divider.
27+
The internal structure of the clock generators can be found in [2].
28+
The Si5345 is similar to the Si5341 with the addition of fractional input
29+
dividers and automatic input selection, as described in [3].
30+
The Si5342 and Si5344 are smaller versions of the Si5345, with 2 or 4 outputs.
31+
32+
The driver can be used in "as is" mode, reading the current settings from the
33+
chip at boot, in case you have a (pre-)programmed device. If the PLL is not
34+
configured when the driver probes, it assumes the driver must fully initialize
35+
it.
36+
37+
The device type, speed grade and revision are determined runtime by probing.
38+
39+
properties:
40+
compatible:
41+
enum:
42+
- silabs,si5340
43+
- silabs,si5341
44+
- silabs,si5342
45+
- silabs,si5344
46+
- silabs,si5345
47+
48+
reg:
49+
maxItems: 1
50+
51+
"#clock-cells":
52+
const: 2
53+
description: >
54+
The first value is "0" for outputs, "1" for synthesizers.
55+
56+
The second value is the output or synthesizer index.
57+
58+
"#address-cells":
59+
const: 1
60+
61+
"#size-cells":
62+
const: 0
63+
64+
clocks:
65+
minItems: 1
66+
maxItems: 4
67+
68+
clock-names:
69+
minItems: 1
70+
items:
71+
- const: xtal
72+
- const: in0
73+
- const: in1
74+
- const: in2
75+
76+
interrupts:
77+
maxItems: 1
78+
description: Interrupt for INTRb pin
79+
80+
vdd-supply:
81+
description: Regulator node for VDD
82+
83+
vdda-supply:
84+
description: Regulator node for VDDA
85+
86+
vdds-supply:
87+
description: Regulator node for VDDS
88+
89+
silabs,pll-m-num:
90+
description:
91+
Numerator for PLL feedback divider. Must be such that the PLL output is in
92+
the valid range. For example, to create 14GHz from a 48MHz xtal, use
93+
m-num=14000 and m-den=48. Only the fraction matters, using 3500 and 12
94+
will deliver the exact same result. If these are not specified, and the
95+
PLL is not yet programmed when the driver probes, the PLL will be set to
96+
14GHz.
97+
$ref: /schemas/types.yaml#/definitions/uint32
98+
99+
silabs,pll-m-den:
100+
description: Denominator for PLL feedback divider
101+
$ref: /schemas/types.yaml#/definitions/uint32
102+
103+
silabs,reprogram:
104+
description: Always perform soft-reset and reinitialize PLL
105+
type: boolean
106+
107+
silabs,xaxb-ext-clk:
108+
description: Use XA/XB pins as external reference clock
109+
type: boolean
110+
111+
silabs,iovdd-33:
112+
description: I2C lines use 3.3V thresholds
113+
type: boolean
114+
115+
patternProperties:
116+
"^vddo[0-9]-supply$": true
117+
118+
"^out@[0-9]$":
119+
description: >
120+
Output-specific override nodes
121+
122+
Each of the clock outputs can be overwritten individually by using a child
123+
node. If a child node for a clock output is not set, the configuration
124+
remains unchanged.
125+
type: object
126+
additionalProperties: false
127+
128+
properties:
129+
reg:
130+
description: Number of clock output
131+
maximum: 9
132+
133+
silabs,format:
134+
description: Output format
135+
$ref: /schemas/types.yaml#/definitions/uint32
136+
enum: [1, 2, 4]
137+
138+
silabs,common-mode:
139+
description: Override output common mode
140+
$ref: /schemas/types.yaml#/definitions/uint32
141+
142+
silabs,amplitude:
143+
description: Override output amplitude
144+
$ref: /schemas/types.yaml#/definitions/uint32
145+
146+
silabs,synth-master:
147+
description: Allow dynamic multisynth rate control
148+
type: boolean
149+
150+
silabs,disable-high:
151+
description: Drive output HIGH when disabled
152+
type: boolean
153+
154+
required:
155+
- reg
156+
157+
required:
158+
- compatible
159+
- reg
160+
- "#clock-cells"
161+
- "#address-cells"
162+
- "#size-cells"
163+
- clocks
164+
- clock-names
165+
166+
additionalProperties: false
167+
168+
examples:
169+
- |
170+
i2c {
171+
#address-cells = <1>;
172+
#size-cells = <0>;
173+
174+
clock-generator@74 {
175+
reg = <0x74>;
176+
compatible = "silabs,si5341";
177+
#clock-cells = <2>;
178+
#address-cells = <1>;
179+
#size-cells = <0>;
180+
clocks = <&ref48>;
181+
clock-names = "xtal";
182+
183+
silabs,pll-m-num = <14000>; /* PLL at 14.0 GHz */
184+
silabs,pll-m-den = <48>;
185+
silabs,reprogram; /* Chips are not programmed, always reset */
186+
187+
out@0 {
188+
reg = <0>;
189+
silabs,format = <1>; /* LVDS 3v3 */
190+
silabs,common-mode = <3>;
191+
silabs,amplitude = <3>;
192+
silabs,synth-master;
193+
};
194+
195+
/*
196+
* Output 6 configuration:
197+
* LVDS 1v8
198+
*/
199+
out@6 {
200+
reg = <6>;
201+
silabs,format = <1>; /* LVDS 1v8 */
202+
silabs,common-mode = <13>;
203+
silabs,amplitude = <3>;
204+
};
205+
206+
/*
207+
* Output 8 configuration:
208+
* HCSL 3v3
209+
*/
210+
out@8 {
211+
reg = <8>;
212+
silabs,format = <2>;
213+
silabs,common-mode = <11>;
214+
silabs,amplitude = <3>;
215+
};
216+
};
217+
};

0 commit comments

Comments
 (0)