Jump to content
  • 0

Arty Z7 HDMI output under PetaLinux 2022.1


zsoltc

Question

Hello Digilent team,

I know there is no official support for the Arty Z7 and HDMI output under PetaLinux but this is the board I have and I want to make it work. 

The issue with the last (2017.1 I think) release is that it still uses 4.x kernel with a now-outdated encoder and device tree entries (xlnx-drm is not supposed to be used anymore).

I realized that the Zybo board is essentially the same Zynq7000 device and you do have that updated, so here is what I've done.

1. Downloaded the Arty Z7 2022.1 HW and SW IDE packages. My HW works perfectly fine with the baremetal (Vitis) project, it drives both my regular PC monitor as well as my small 7" HDMI display (max res 800x480). 

2. I created a brand new PetaLinux 2022.1 project and took over both the axidynclk as well as the digilent_hdmi drivers from the Digilent kernel repo and added them as out of tree kernel modules for the time being. I also added the new "digilent,hdmi" and "xlnx,pl-disp" to the system-user.dtsi. I also merged the settings from the Zybo config, rootfs_config and devtool-fragment.cfg

3. The board is booting successfully over the UART console, I have the following relevant messages:

The [axidynclk] and [digilenthdmi] messages are printk messages I placed for debugging.

On paper everything looks fine to me, yet I still don't get any output. It's not that it's blank/black, I have no signal when connecting.

axidynclk: loading out-of-tree module taints kernel.
[axidynclk] succesfully probed!
xlnx,bridge-vtc 43c10000.v_tc: vtc ppc = 1
xlnx,bridge-vtc 43c10000.v_tc: Xilinx VTC IP version : 0x0602000b
[digilenthdmi] hmax: 640, vmax: 480
[digilenthdmi] succesfully probed!
xlnx,bridge-vtc 43c10000.v_tc: Xilinx VTC DRM Bridge driver probed
xlnx-drm xlnx-drm.0: bound amba_pl:drm-pl_disp-drv (ops 0xc08380cc)
xlnx-drm xlnx-drm.0: bound amba_pl:digilent_encoder (ops hdmi_driver_exit [digilenthdmi])
[digilenthdmi] hdmi_get_modes called
[digilenthdmi] i2c bus valid
[digilenthdmi] edid data retrieved
[digilenthdmi] mode count: 53
[axidynclk] set_rate entered, rate: 31500000, parent rate: 100000000
[axidynclk] set_rate succeeded, frequnecy set to: 31500000
Console: switching to colour frame buffer device 80x30
xlnx-pl-disp amba_pl:drm-pl_disp-drv: [drm] fb0: xlnxdrmfb frame buffer device
[drm] Initialized xlnx 1.0.0 20130509 for amba_pl:drm-pl_disp-drv on minor 0
xlnx-pl-disp amba_pl:drm-pl_disp-drv: Xlnx PL display driver probed

Here is my system-user.dtsi, it is based mostly on the Zybo one with some minor changes (e.g. the edid is i2c1 on the Arty and i2c0 on the Zybo).

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

&amba_pl { 
	digilent_encoder { 
		compatible = "digilent,hdmi"; 
		clocks = <&axi_dynclk_0>;
		clock-names = "clk";
		digilent,fmax = <150000>; 
		digilent,edid-i2c = <&i2c1>;
		port@0 { 
			hdmi_ep: endpoint { 
				remote-endpoint = <&pl_disp_ep>; 
			}; 
		}; 
	};

 	drm-pl_disp-drv { 
		compatible = "xlnx,pl-disp"; 
		dmas = <&axi_vdma_0 0>; 
		dma-names = "dma0"; 
		xlnx,vformat = "XR24"; 
		xlnx,bridge = <&v_tc_0>; 
		port@0 { 
			pl_disp_ep: endpoint { 
				remote-endpoint = <&hdmi_ep>; 
			}; 
		};
	}; 
};

&axi_vdma_0 {
	dma-ranges = <0x00000000 0x00000000 0x40000000>;
};

&axi_dynclk_0 {
	compatible = "digilent,axi-dynclk";
	#clock-cells = <0>;
	clocks = <&clkc 15>;
};

&v_tc_0 { 
	compatible = "xlnx,bridge-v-tc-6.1";
	xlnx,pixels-per-clock = <1>; 
	clock-names = "s_axi_aclk", "clk";
	clocks = <&clkc 15>, <&axi_dynclk_0>; 
};

EDIT: when listing /dev, I can see both the dri/card0 entry as well as the fb0 entry.

EDIT2: there result of modetest:

~# modetest -M xlnx
[digilenthdmi] hdmi_get_modes called
[digilenthdmi] i2c bus valid
[digilenthdmi] edid data retrieved
[digilenthdmi] mode count: 53
Encoders:
id      crtc    type    possible crtcs  possible clones
36      33      TMDS    0x00000001      0x00000001

Connectors:
id      encoder status          name            size (mm)       modes   encoders
37      36      connected       HDMI-A-1        620x340         5       36
  modes:
        index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
  #0 640x480 75.00 640 656 720 840 480 481 484 500 31500 flags: nhsync, nvsync; type: driver
  #1 640x480 72.81 640 664 704 832 480 489 492 520 31500 flags: nhsync, nvsync; type: driver
  #2 640x480 66.67 640 704 768 864 480 483 486 525 30240 flags: nhsync, nvsync; type: driver
  #3 640x480 60.00 640 656 752 800 480 490 492 525 25200 flags: nhsync, nvsync; type: driver
  #4 640x480 59.94 640 656 752 800 480 490 492 525 25175 flags: nhsync, nvsync; type: driver
  props:
        1 EDID:
                flags: immutable blob
                blobs:

                value:
                        00ffffffffffff002074316401000000
                        1f200103803e2278ea5525a1574fa028
                        0f5054bdef804540614081408180a9c0
                        b3008bc0d1c0b20c200031e01c102880
                        2200985b000000180000001000000000
                        00000000000000000000000000fd0037
                        4b1e8c14000a202020202020000000fc
                        0048444d490a202020202020202001df
                        02031df55045050403020716011f1213
                        14201511062309070783010000e93980
                        1871382d40582c450006442100001e01
                        1d007251d01e206e2855000644210000
                        1e8c0ad08a20e02d10103e9600064421
                        00001800000000000000000000000000
                        00000000000000000000000000000000
                        000000000000000000000000000000ad
        2 DPMS:
                flags: enum
                enums: On=0 Standby=1 Suspend=2 Off=3
                value: 0
        5 link-status:
                flags: enum
                enums: Good=0 Bad=1
                value: 0
        6 non-desktop:
                flags: immutable range
                values: 0 1
                value: 0
        4 TILE:
                flags: immutable blob
                blobs:

                value:

CRTCs:
id      fb      pos     size
33      38      (0,0)   (640x480)
  #0 640x480 75.00 640 656 720 840 480 481 484 500 31500 flags: nhsync, nvsync; type: driver
  props:
        25 VRR_ENABLED:
                flags: range
                values: 0 1
                value: 0

Planes:
id      crtc    fb      CRTC x,y        x,y     gamma size      possible crtcs
32      33      38      0,0             0,0     0               0x00000001
  formats: XR24
  props:
        9 type:
                flags: immutable enum
                enums: Overlay=0 Primary=1 Cursor=2
                value: 1
        34 fid_err:
                flags: range
                values: 0 1
                value: 0
        35 fid_out:
                flags: range
                values: 0 1
                value: 0

Frame buffers:
id      size    pitch

Any idea, direction, hint is appreciated! If additional info is needed, please let me know.

Edited by zsoltc
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

For anybody ever hitting this issue: the only problem was the xlnx,vformat property of the drm-pl_disp-drv, it has to be RG24 and not XR24.

I have a fully functioning console on my 7" hobby HDMI screen using the Arty Z7 board and PetaLinux 2022.

I also added these to the device tree:
  usb_phy0: usb_phy@0 {
        compatible = "ulpi-phy";
        #phy-cells = <0>;
        reg = <0xe0002000 0x1000>;
        view-port = <0x0170>;
        drv-vbus;
    };

&usb0 {    
    dr_mode = "host";
    usb-phy = <&usb_phy0>;
};

The above changes makes my wireless USB keyboard usable, so the Arty  truly works as a "miniPC".

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...