18c2ecf20Sopenharmony_ciBinding for Silicon Labs Si5351a/b/c programmable i2c clock generator.
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciReference
48c2ecf20Sopenharmony_ci[1] Si5351A/B/C Data Sheet
58c2ecf20Sopenharmony_ci    https://www.silabs.com/Support%20Documents/TechnicalDocs/Si5351.pdf
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciThe Si5351a/b/c are programmable i2c clock generators with up to 8 output
88c2ecf20Sopenharmony_ciclocks. Si5351a also has a reduced pin-count package (MSOP10) where only
98c2ecf20Sopenharmony_ci3 output clocks are accessible. The internal structure of the clock
108c2ecf20Sopenharmony_cigenerators can be found in [1].
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci==I2C device node==
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciRequired properties:
158c2ecf20Sopenharmony_ci- compatible: shall be one of the following:
168c2ecf20Sopenharmony_ci	"silabs,si5351a" - Si5351a, QFN20 package
178c2ecf20Sopenharmony_ci	"silabs,si5351a-msop" - Si5351a, MSOP10 package
188c2ecf20Sopenharmony_ci	"silabs,si5351b" - Si5351b, QFN20 package
198c2ecf20Sopenharmony_ci	"silabs,si5351c" - Si5351c, QFN20 package
208c2ecf20Sopenharmony_ci- reg: i2c device address, shall be 0x60 or 0x61.
218c2ecf20Sopenharmony_ci- #clock-cells: from common clock binding; shall be set to 1.
228c2ecf20Sopenharmony_ci- clocks: from common clock binding; list of parent clock
238c2ecf20Sopenharmony_ci  handles, shall be xtal reference clock or xtal and clkin for
248c2ecf20Sopenharmony_ci  si5351c only. Corresponding clock input names are "xtal" and
258c2ecf20Sopenharmony_ci  "clkin" respectively.
268c2ecf20Sopenharmony_ci- #address-cells: shall be set to 1.
278c2ecf20Sopenharmony_ci- #size-cells: shall be set to 0.
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciOptional properties:
308c2ecf20Sopenharmony_ci- silabs,pll-source: pair of (number, source) for each pll. Allows
318c2ecf20Sopenharmony_ci  to overwrite clock source of pll A (number=0) or B (number=1).
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci==Child nodes==
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciEach of the clock outputs can be overwritten individually by
368c2ecf20Sopenharmony_ciusing a child node to the I2C device node. If a child node for a clock
378c2ecf20Sopenharmony_cioutput is not set, the eeprom configuration is not overwritten.
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ciRequired child node properties:
408c2ecf20Sopenharmony_ci- reg: number of clock output.
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ciOptional child node properties:
438c2ecf20Sopenharmony_ci- silabs,clock-source: source clock of the output divider stage N, shall be
448c2ecf20Sopenharmony_ci  0 = multisynth N
458c2ecf20Sopenharmony_ci  1 = multisynth 0 for output clocks 0-3, else multisynth4
468c2ecf20Sopenharmony_ci  2 = xtal
478c2ecf20Sopenharmony_ci  3 = clkin (si5351c only)
488c2ecf20Sopenharmony_ci- silabs,drive-strength: output drive strength in mA, shall be one of {2,4,6,8}.
498c2ecf20Sopenharmony_ci- silabs,multisynth-source: source pll A(0) or B(1) of corresponding multisynth
508c2ecf20Sopenharmony_ci  divider.
518c2ecf20Sopenharmony_ci- silabs,pll-master: boolean, multisynth can change pll frequency.
528c2ecf20Sopenharmony_ci- silabs,pll-reset: boolean, clock output can reset its pll.
538c2ecf20Sopenharmony_ci- silabs,disable-state : clock output disable state, shall be
548c2ecf20Sopenharmony_ci  0 = clock output is driven LOW when disabled
558c2ecf20Sopenharmony_ci  1 = clock output is driven HIGH when disabled
568c2ecf20Sopenharmony_ci  2 = clock output is FLOATING (HIGH-Z) when disabled
578c2ecf20Sopenharmony_ci  3 = clock output is NEVER disabled
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci==Example==
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci/* 25MHz reference crystal */
628c2ecf20Sopenharmony_ciref25: ref25M {
638c2ecf20Sopenharmony_ci	compatible = "fixed-clock";
648c2ecf20Sopenharmony_ci	#clock-cells = <0>;
658c2ecf20Sopenharmony_ci	clock-frequency = <25000000>;
668c2ecf20Sopenharmony_ci};
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_cii2c-master-node {
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci	/* Si5351a msop10 i2c clock generator */
718c2ecf20Sopenharmony_ci	si5351a: clock-generator@60 {
728c2ecf20Sopenharmony_ci		compatible = "silabs,si5351a-msop";
738c2ecf20Sopenharmony_ci		reg = <0x60>;
748c2ecf20Sopenharmony_ci		#address-cells = <1>;
758c2ecf20Sopenharmony_ci		#size-cells = <0>;
768c2ecf20Sopenharmony_ci		#clock-cells = <1>;
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci		/* connect xtal input to 25MHz reference */
798c2ecf20Sopenharmony_ci		clocks = <&ref25>;
808c2ecf20Sopenharmony_ci		clock-names = "xtal";
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci		/* connect xtal input as source of pll0 and pll1 */
838c2ecf20Sopenharmony_ci		silabs,pll-source = <0 0>, <1 0>;
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci		/*
868c2ecf20Sopenharmony_ci		 * overwrite clkout0 configuration with:
878c2ecf20Sopenharmony_ci		 * - 8mA output drive strength
888c2ecf20Sopenharmony_ci		 * - pll0 as clock source of multisynth0
898c2ecf20Sopenharmony_ci		 * - multisynth0 as clock source of output divider
908c2ecf20Sopenharmony_ci		 * - multisynth0 can change pll0
918c2ecf20Sopenharmony_ci		 * - set initial clock frequency of 74.25MHz
928c2ecf20Sopenharmony_ci		 */
938c2ecf20Sopenharmony_ci		clkout0 {
948c2ecf20Sopenharmony_ci			reg = <0>;
958c2ecf20Sopenharmony_ci			silabs,drive-strength = <8>;
968c2ecf20Sopenharmony_ci			silabs,multisynth-source = <0>;
978c2ecf20Sopenharmony_ci			silabs,clock-source = <0>;
988c2ecf20Sopenharmony_ci			silabs,pll-master;
998c2ecf20Sopenharmony_ci			clock-frequency = <74250000>;
1008c2ecf20Sopenharmony_ci		};
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci		/*
1038c2ecf20Sopenharmony_ci		 * overwrite clkout1 configuration with:
1048c2ecf20Sopenharmony_ci		 * - 4mA output drive strength
1058c2ecf20Sopenharmony_ci		 * - pll1 as clock source of multisynth1
1068c2ecf20Sopenharmony_ci		 * - multisynth1 as clock source of output divider
1078c2ecf20Sopenharmony_ci		 * - multisynth1 can change pll1
1088c2ecf20Sopenharmony_ci		 */
1098c2ecf20Sopenharmony_ci		clkout1 {
1108c2ecf20Sopenharmony_ci			reg = <1>;
1118c2ecf20Sopenharmony_ci			silabs,drive-strength = <4>;
1128c2ecf20Sopenharmony_ci			silabs,multisynth-source = <1>;
1138c2ecf20Sopenharmony_ci			silabs,clock-source = <0>;
1148c2ecf20Sopenharmony_ci			pll-master;
1158c2ecf20Sopenharmony_ci		};
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ci		/*
1188c2ecf20Sopenharmony_ci		 * overwrite clkout2 configuration with:
1198c2ecf20Sopenharmony_ci		 * - xtal as clock source of output divider
1208c2ecf20Sopenharmony_ci		 */
1218c2ecf20Sopenharmony_ci		clkout2 {
1228c2ecf20Sopenharmony_ci			reg = <2>;
1238c2ecf20Sopenharmony_ci			silabs,clock-source = <2>;
1248c2ecf20Sopenharmony_ci		};
1258c2ecf20Sopenharmony_ci	};
1268c2ecf20Sopenharmony_ci};
127