cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Explorer
Explorer
1,272 Views
Registered: ‎04-21-2017

How to change si570 clocks on ZCU106 dev-kit using Petalinux .DTSI files

Dear Forum,

 

I'm building a Petalinux project for the ZCU106 dev-kit, and in the zcu106-reva.dtsi file I can find specific reference to the si570 chip that is setup to drive the User_MGT clock pin. In the zcu106-reva.dtsi file, this si570 is setup as follows.

 

i2c@3 { /* i2c mw 74 0 8 */
#address-cells = <1>;
#size-cells = <0>;
reg = <3>;
si570_2: clock-generator3@5d { /* USER MGT SI570 - u56 */
#clock-cells = <0>;
compatible = "silabs,si570";
reg = <0x5d>;
temperature-stability = <50>; /* copy from zc702 */
factory-fout = <156250000>;
clock-frequency = <148500000>;
};
};

 

For my design I want the output of this clock to remain at 156.25Mhz.

 

 

1) Should I edit the zcu106-reva.dtsi file directly?

If so how Delete or Edit the clock-frequency value..?

 

2) Should I add the above text to my system-user.dtsi file, with appropriate edits to get 156.25MHz..?

Will settings in the system-user.dtsi file overwrite those in other .dtsi files?

 

TTFN.

 

DJE666

 

0 Kudos
Reply
5 Replies
Moderator
Moderator
1,246 Views
Registered: ‎02-07-2018

Hi ,

You can add node details with required clock value in system-user.dtsi. This will overwrite required value.

 

You can check wether taht value is reflected or not  by converting  output (system.dtb) to system.dts using below command.

  • dtc -I dtb -O dts -o  system.dts system.dtb

 

 

Thanks & Regards

Aravind

 

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

0 Kudos
Reply
Explorer
Explorer
1,183 Views
Registered: ‎04-21-2017

Hi Aravind,

 

Thanks for this data.

 

Can you please clarify what constitutes the full details of any given NODE in the system? If we take the example that I initially posted, should I put all this text in the system-user.dtsi, a sub-section of it or something else? Here is the original text..

 

i2c@3 { /* i2c mw 74 0 8 */
#address-cells = <1>;
#size-cells = <0>;
reg = <3>;
si570_2: clock-generator3@5d { /* USER MGT SI570 - u56 */
#clock-cells = <0>;
compatible = "silabs,si570";
reg = <0x5d>;
temperature-stability = <50>; /* copy from zc702 */
factory-fout = <156250000>;
clock-frequency = <148500000>;
};
};

 

Would the following simple edit to the last line be correct in the system-user.dtsi?

 

i2c@3 { /* i2c mw 74 0 8 */
#address-cells = <1>;
#size-cells = <0>;
reg = <3>;
si570_2: clock-generator3@5d { /* USER MGT SI570 - u56 */
#clock-cells = <0>;
compatible = "silabs,si570";
reg = <0x5d>;
temperature-stability = <50>; /* copy from zc702 */
factory-fout = <156250000>;
clock-frequency = <156250000>;
};
};

 

Regards,

 

DJE666

0 Kudos
Reply
Moderator
Moderator
1,169 Views
Registered: ‎04-24-2017

Hi @dje666,

 

In system-user.dtsi you can override the clocks as shown below.

 

/include/ "system-conf.dtsi"
/ {
};

&i2c1 {
    i2cswitch@74 {
        i2c@3 {
            si570_2: clock-generator@5d { /* USER MGT SI570 - u56 */
                clock-frequency = <156250000>;
            };
        };
    };
};

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Reply
Observer
Observer
636 Views
Registered: ‎07-30-2019

This is how the device tree is described on my system as the i2c buss on the ZCU106 is connected to a multiplexer
 
&i2c1 {
    i2c-mux@74 {
        i2c@3 {
            si570_2: clock-generator@5d { /* USER MGT SI570 - u56 */
                clock-frequency = <125000000>;
            };
        };
    };
};

 

0 Kudos
Reply
Moderator
Moderator
619 Views
Registered: ‎09-12-2007

If you want to manually build the DTB outside petalinux, you will need to precompile the include folders. This is shown in the wiki below:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/136904764/Creating+Devicetree+from+Devicetree+Generator+for+Zynq+Ultrascale+and+Zynq+7000

gcc -I my_dts -E -nostdinc -undef -D__DTS__ -x assembler-with-cpp -o my_dts/system-top.dts.tmp my_dts/system-top.dts
dtc -I dts -O dtb -o my_dts/system-top.dtb my_dts/system-top.dts.tmp

 

0 Kudos
Reply