cancel
Showing results for 
Search instead for 
Did you mean: 
Observer
Observer
582 Views
Registered: ‎04-18-2018

VCU 2018.3 device tree entry

I am trying to create the device tree entry for the VCU using the 2018.3 release. It used to work for 2018.1, but now it is missing the additional clock entries.

I have created the following entry with the help of xlnx,vcu.txt:

misc_clk_0: misc_clk_0 {
		#clock-cells = <0>;
		clock-frequency = <99999000>;
		compatible = "fixed-clock";
	};

  misc_clk_1: misc_clk_1 {
		#clock-cells = <0x0>;
		clock-frequency = <0x1fc93f3>;
		compatible = "fixed-clock";
	};

  xlnx_vcu: vcu@a0100000 {
		#address-cells = <2>;
		#size-cells = <2>;
		clock-names = "pll_ref", "aclk", "vcu_core_enc", "vcu_core_dec", "vcu_mcu_enc", "vcu_mcu_dec";
    clocks = <&misc_clk_1>, <&misc_clk_0 71>, <&xlnx_vcu 1>, <&xlnx_vcu 2>, <&xlnx_vcu 3>, <&xlnx_vcu 4>;
		compatible = "xlnx,vcu-1.1", "xlnx,vcu";
		interrupt-names = "vcu_host_interrupt";
		interrupt-parent = <0x4>;
		interrupts = <0 104 4>;
		ranges;
		reg = <0x0 0xa0140000 0x0 0x1000>,
			<0x0 0xa0141000 0x0 0x1000>;
		reg-names = "vcu_slcr", "logicore";

    linux,phandle = < 0x44 >;
		phandle = < 0x44 >;

		encoder: al5e@a0100000 {
			compatible = "al,al5e-1.1", "al,al5e";
			interrupt-parent = <0x4>;
			interrupts = <0 104 4>;
			reg = <0x0 0xa0100000 0x0 0x10000>;
		};
		decoder: al5d@a0120000 {
			compatible = "al,al5d-1.1", "al,al5d";
			interrupt-parent = <0x4>;
			interrupts = <0 104 4>;
			reg = <0x0 0xa0120000 0x0 0x10000>;
		};
	};

I am getting the following errors in dmesg:

    5.020072] OF: /vcu@a0100000: could not find phandle
[    5.025148] ERROR: could not get clock /vcu@a0100000:vcu_core_enc(2)
[    5.031523] xilinx-vcu xilinx-vcu: Could not get core_enc clock
[    5.037465] xilinx-vcu: probe of xilinx-vcu failed with error -2

Does anybody have a working example for a VCU device tree entry, Decompiling the samples provided for the zcu106 2018.3 VCU TRD are simmilar to my current entry. The device tree generator is not working for our hdf file (tcl error).

0 Kudos
1 Reply
Highlighted
Observer
Observer
545 Views
Registered: ‎02-03-2019

Re: VCU 2018.3 device tree entry

You forgot to set #clock-cells = <0x1>; Therefore the VCU has no clocks. In addition <&misc_clk_0 71> must be <&misc_clk_0> because for misc_clk_0 the #clock-cells is 0 and not 1. So the 71 is not the clock index but the next phandle. Let me know, if this helps.
0 Kudos