cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
1,368 Views
Registered: ‎05-14-2018

Changing the si5341 clock frequency on the ZCU106 dev-kit using Petalinux .DTSI file

Hi,

 

I have a Vivado design and Petalinux project that work when I use the ZCU106 SCUI tool to manually set the output frequency of the si5341 clock generator chip. I need to avoid this manual step and want to get Petalinux to change the frequency when it boots. I have already used the system-user.dtsi file to change the frequency of the si570. I have used the SCUI tool to confirm that the si570 changes frequency. Using the same process for the si5341 does not work.

 

The device tree file for the board zcu106-reva.dtsi has a reference to the si5341:

 

		i2c@1 { /* i2c mw 74 0 2 */
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <1>;
			si5341: clock-generator1@36 { /* SI5341 - u69 */
				compatible = "si5341";
				reg = <0x36>;
			};
};

Unlike the si570 definition below it does not have a clock frequency defined.

 

I have added an entry to my system-user.dtsi file for the si5341:

 

&si5341 {
   compatible = "silabs,si5341";
   temperature-stability = <50>;
   factory-fout = <100000000>;
   clock-frequency = <156250000>;
};

And after I built Petalinux and checked the device tree blob I get the following entry for the si5341:

 

				i2c@1 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					reg = <0x1>;

					clock-generator1@36 {
						compatible = "silabs,si5341";
						reg = <0x36>;
						temperature-stability = <0x32>;
						factory-fout = <0x5f5e100>;
						clock-frequency = <0x9502f90>;
					};
				};

This does not result in Petalinux changing the clock frequency. Any ideas why? Is there a driver for the si5341?

 

Steve.

 

 

 

0 Kudos
4 Replies
Highlighted
Moderator
Moderator
1,319 Views
Registered: ‎12-04-2016

Hi Steve

 

The changes are actually getting reflected, but its converting decimal to hexadecimal. I dont think you will face any functionality issues with this

 

 

Best  Regards

Shabbir

0 Kudos
Highlighted
Contributor
Contributor
1,289 Views
Registered: ‎05-14-2018

Shabbir,

 

I spotted that it was converting the numbers to hex. It does the same for the Si570 and that works. Do you have any suggestions about how I can debug why the Si5341 doesn't change frequency?

 

Steve.

0 Kudos
Highlighted
Contributor
Contributor
1,251 Views
Registered: ‎05-14-2018

Shabbir,

Can you help with this issue?

Steve.
0 Kudos
Highlighted
Scholar
Scholar
513 Views
Registered: ‎10-26-2012

There is a driver for the si5341 family in mainline Linux, it works without changes on the 4.19 kernel.

https://github.com/torvalds/linux/blob/master/drivers/clk/clk-si5341.c

The mainline driver allows you to use the chip to generate any desired frequency, just like other clock chips.

0 Kudos