Author Topic: HDMI output TE0820+TE0701  (Read 349 times)

SaW

  • Active Member
  • *
  • Posts: 15
HDMI output TE0820+TE0701
« on: June 05, 2019, 05:43:25 PM »
Hi everyone,
i am trying to display on the HDMI monitor, using the design (HDMI701: https://wiki.trenz-electronic.de/display/PD/TE0720+HDMI701)
i made some modification to use it with the ultrascale MPSoC but i can't receive an output.

it is not a problem of i2c connection, i first tried with the pl design from analog and i was able to receive the output... only it was a green screen. after some reading it seems that it was a problem of data coming on the input D[0:11] of the chips. with the analog design it is possible to send minimum 16bits data, but since ADV7511 on the carrier board only receive 12bits data I just took some part of the data... not really working fully and i am getting this green screen.
Since the Trenz design is made on purpose to have only 12bits data i decided to use it, made some modifications to be able to use it with the ultrascale module.

i think my problem is coming from the devicetree/Image interraction.

For the zeadboard i used the linux git from analog, compiled it with their config and used the devicetree generated... it worked

For the TE0820 I went the same way:
- Linux git from analog, adi-zynqmp-defconfig to with i added the drm_i2c configfor the ADV7511
i used petalinux with the config files given at in the test-board/os of the module TE0820
- the devicetree has been generated and in the pl part added :
Code: [Select]
amba_pl@0 {
#address-cells = <0x2>;
#size-cells = <0x2>;
compatible = "simple-bus";
ranges;

dma@a0010000 {
#dma-cells = <0x1>;
clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axis_mm2s_aclk";
clocks = <0x3 0x47 0x3 0x47 0x3 0x47>;
compatible = "xlnx,axi-vdma-6.3", "xlnx,axi-vdma-1.00.a";
interrupt-names = "mm2s_introut";
interrupt-parent = <0x4>;
interrupts = <0x0 0x59 0x4>;
reg = <0x0 0xa0010000 0x0 0x1000>;
xlnx,addrwidth = <0x20>;
xlnx,flush-fsync = <0x1>;
xlnx,num-fstores = <0x1>;

dma-channel@a0010000 {
compatible = "xlnx,axi-vdma-mm2s-channel";
interrupts = <0x0 0x59 0x4>;
xlnx,datawidth = <0x20>;
xlnx,device-id = <0x0>;
};
};

PERIPHERAL@ff380000 {
compatible = "xlnx,PERIPHERAL-1.0";
reg = <0x0 0xff380000 0x0 0x80000>;
};

PERIPHERAL@ff990000 {
compatible = "xlnx,PERIPHERAL-1.0";
reg = <0x0 0xff990000 0x0 0x10000>;
};

v_tc@a0000000 {
clock-names = "clk", "s_axi_aclk";
clocks = <0x33 0x3 0x47>;
compatible = "xlnx,v-tc-6.1", "xlnx,v-tc-6.1";
interrupt-names = "irq";
interrupt-parent = <0x4>;
interrupts = <0x0 0x5a 0x4>;
reg = <0x0 0xa0000000 0x0 0x10000>;
xlnx,generator;
};

misc_clk_0 {
#clock-cells = <0x0>;
clock-frequency = <0x47868c0>;
compatible = "fixed-clock";
linux,phandle = <0x33>;
phandle = <0x33>;
};
};
and the node for the ADV7511 into the i2c1

when i boot, the adv7511 is well recognized but there is no ouput on the monitor
i imagine i am baddly connecting the part in my devicetree but i don't really see how. I tried to implement xilinx-drm but this one didn't seem to get probe either...
if any of you have an idea :)
best regards
Sarah

Oleksandr Kiyenko

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 360
Re: HDMI output TE0820+TE0701
« Reply #1 on: June 06, 2019, 08:20:12 AM »
Hi Sarah,

In TE0720 project we have almost no configuration in Linux, all important settings made in FSBL. There were 2 reasons to do such configuration, first to avoid driver issue you facing out and second is to make an ability to work without or with other OS.
Try at first do the same, disable drivers in the Linux device tree and put the configuration in FSBL. If it will work, you can move code blocks one by one to drivers. This way you can find which part is failing.

Best regards,
Oleksandr

SaW

  • Active Member
  • *
  • Posts: 15
Re: HDMI output TE0820+TE0701
« Reply #2 on: June 07, 2019, 02:25:39 PM »
Hi Oleksandr,
thank you a lot for your help.
I went on with the configuration into the fsbl as you adviced. i just have a problem: the initialiation of the ADV7511 is coming out with error in the boot :
ADV7511 XIicPs_MasterSendPolled failure

i tried to follow as in the fsbl from the HDMI701 project. And from what i read this could come from the i2c clock, that it is to fast or the boot, which is too fast and the adv is not yet ready.
but looking at your files i don't see any change in the i2c clock and like you i am using it in the BeforeHandoff function of the xfsbl_hook... did someone experienced the same issue?


Another question for the framebuffer, i have 2G of memory and in the device tree it is written as
Code: [Select]
memory {
device_type = "memory";
reg = <0x0 0x0 0x0 0x7ff00000>;
};

i wanted to add a frame buffer for the HDMI buffer but it seems to enter in conflict with my configuration of the DRAM:
Code: [Select]
framebuffer@0x7FC00000 {
compatible = "simple-framebuffer";
reg = <0x0 0x0 0x7fc00000 0x384000>;
width = <0x500>;
height = <0x2d0>;
stride = <0x1400>;
format = "a8b8g8r8";
};

do you know why because i am just adding a framebuffer but didn't touch the memory configuration in the end.
Thank you a lot for your help again :)
Best regards,
Sarah


correction: was using the wrong i2C bus for the initialisation ^^' now the initialisation is working well. just block at the level of the DRAM configuration
« Last Edit: June 07, 2019, 03:03:38 PM by SaW »

Oleksandr Kiyenko

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 360
Re: HDMI output TE0820+TE0701
« Reply #3 on: June 11, 2019, 07:56:00 AM »
Hi Sarah,
1. In my example I2C speed is limited to
#define IIC_SCLK_RATE         400000
see line 53 in adv7511.c

2. There are 2 main ways to get memory for framebuffer
- reduce real memory size in "memory" section, so you get something like "reg = <0x0 0x0 0x0 0x7fc00000>;"
- reserve memory, something like
reserved-memory {
      #address-cells = <1>;
      #size-cells = <1>;
      ranges;
        fb_reserved_region@1FC00000 {
         compatible = "removed-dma-pool";
         no-map;
         reg = <0x7FC00000 0x400000>;
      };      
};

Best regards
Oleksandr Kiyenko

SaW

  • Active Member
  • *
  • Posts: 15
Re: HDMI output TE0820+TE0701
« Reply #4 on: June 11, 2019, 02:40:03 PM »
Hi Oleksandr,
thanks for the devicetree configuration, i was able to enable the framebuffer. In the boot it appears correctly and is registered:
Code: [Select]
[    1.292404] simple-framebuffer 7fc00000.framebuffer: framebuffer at 0x7fc00000, 0x384000 bytes, mapped to 0xffffff8009c00000
[    1.292412] simple-framebuffer 7fc00000.framebuffer: format=a8b8g8r8, mode=1280x720x32, linelength=5120
[    1.303551] Console: switching to colour frame buffer device 160x45
[    1.313549] simple-framebuffer 7fc00000.framebuffer: fb0: simplefb registered!

also it appears into my list of device inside the /dev
but i still have no output on the screen, this one turn on and write the message that there is no input and goes back to sleep mode at the end of the boot.

in the configuration of my kernel the framebuffer is allowed aswell as the logo(s)
and from the FSBL log, the VDMA is enabled as well as VTC
i noted that the address at i2c:39 are not all equal to the value we set it up at the initiliasation except for the FIXED ones (describe in the adv7511.c)
i wonder if there isn't a problem there.

Best regards
sarah

Oleksandr Kiyenko

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 360
Re: HDMI output TE0820+TE0701
« Reply #5 on: June 12, 2019, 08:10:38 AM »
Hi Sarah,

If you want to see the splash screen you need to configure VDMA in FSBL, in another case you will see something only after driver start (much later). If you have VDMA driver enabled in Linux, but no configuration for it (no DRM or another driver which configure VDMA) you will see splash screen only for a few seconds, from your FSBL VDMA configuration to start of default VDMA driver which reset transfer. Try to disable VDMA and VTC drivers in the device tree so if you have valid VDMA configuration in FSBL it will work.

Best regards
Oleksandr

SaW

  • Active Member
  • *
  • Posts: 15
Re: HDMI output TE0820+TE0701
« Reply #6 on: June 12, 2019, 02:03:12 PM »
Hi Oleksandr,
sorry to bother you again with it, i recompiled the Linux kernel, this time without allowing Xilinx_DMA config and Zynqmp_DMA, and actually the screen stayed ON until the boot is finished but when this one is finished the screen goes back to sleep mode. Also for this short time the screen is on the screen stay black i don't see anything.
But i check and the FSBL is configuring the vdma at least it seems since it doesn't send any error back
could you just check my device tree and tell me if it is correct or not?
Code: [Select]
amba_pl@0 {
#address-cells = <0x2>;
#size-cells = <0x2>;
compatible = "simple-bus";
ranges;

dma@a0010000 {
#dma-cells = <0x1>;
clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axis_mm2s_aclk";
clocks = <0x3 0x47 0x3 0x47 0x3 0x47>;
compatible = "xlnx,axi-vdma-6.3", "xlnx,axi-vdma-1.00.a";
interrupt-names = "mm2s_introut";
interrupt-parent = <0x4>;
interrupts = <0x0 0x59 0x4>;
reg = <0x0 0xa0010000 0x0 0x1000>;
xlnx,addrwidth = <0x20>;
xlnx,flush-fsync = <0x1>;
xlnx,num-fstores = <0x1>;
status = "disabled";

dma-channel@a0010000 {
compatible = "xlnx,axi-vdma-mm2s-channel";
interrupts = <0x0 0x59 0x4>;
xlnx,datawidth = <0x20>;
xlnx,device-id = <0x0>;
};
};

PERIPHERAL@ff380000 {
compatible = "xlnx,PERIPHERAL-1.0";
reg = <0x0 0xff380000 0x0 0x80000>;
};

PERIPHERAL@ff990000 {
compatible = "xlnx,PERIPHERAL-1.0";
reg = <0x0 0xff990000 0x0 0x10000>;
};

v_tc@a0000000 {
clock-names = "clk", "s_axi_aclk";
clocks = <0x33 0x3 0x47>;
compatible = "xlnx,v-tc-6.1", "xlnx,v-tc-6.1";
interrupt-names = "irq";
interrupt-parent = <0x4>;
interrupts = <0x0 0x5a 0x4>;
reg = <0x0 0xa0000000 0x0 0x10000>;
xlnx,generator;
status = "disabled";
};

misc_clk_0 {
#clock-cells = <0x0>;
clock-frequency = <0x47868c0>;
compatible = "fixed-clock";
status = "disabled";
linux,phandle = <0x33>;
phandle = <0x33>;
};
};
vdma and vtc are disabled
and inside chosen :
Code: [Select]
#address-cells = <0x1>;
#size-cells = <0x1>;
ranges;

framebuffer@0x7FC00000 {
compatible = "simple-framebuffer";
reg = <0x7fc00000 0x384000>;
width = <0x500>;
height = <0x2d0>;
stride = <0x1400>;
format = "a8b8g8r8";
status = "okay";
};
Maybe the framebuffer shouldn't be with the label okay? but if i don't, it doesn't initialize it.
i also tried with you small app (adv7511) but it doesn't recognize the address for the i2c... could the problem be there ? (but i2cdetect works…)
sorry for all the question
thank you in advance for your help :)
best regards
Sarah

Oleksandr Kiyenko

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 360
Re: HDMI output TE0820+TE0701
« Reply #7 on: June 13, 2019, 12:41:48 PM »
Hi Sarah,
for this test, the device tree looks OK. VDMA and VTC are disabled. Without adv7511 configuration you will not get the correct image. Put ADV7511 initialization code into (FSBL adv7511.c and adv7511.h from HDMI701\sw_lib\sw_apps\zynq_fsbl\src) and stop Linux boot in u-boot to see if screen is ON. If it will stay ON try to direct write to framebuffer memory, pixels should appear on the screen.

Best regards
Oleksandr

SaW

  • Active Member
  • *
  • Posts: 15
Re: HDMI output TE0820+TE0701
« Reply #8 on: June 13, 2019, 05:32:01 PM »
Hi Oleksandr,
so we have tested it but the screen doesn't stay ON.
We measure the i2C communication, it is doing the initialisation (sending the good data at least). But when we ask to read the register that we just initialized, we received only 0x14 as value.
One thing observed the frequency is not totally the same than the ii_sck_rate, for a frequency of normally 400000 on the scope we see 333333, but nothing has been change in the fsbl except the part for the adv7511, vdma and vtc configuration.

we tried to read the i2c probe on the uboot and it was only sending back the address from the Si5338A PLL and the EEPROM. We couldn't get the value from the adv chip.
I took the uboot from the TE0820 base without adding anything… did you need to change something there for the connection too?
thank you a lot for your help again,
Best regards,
Sarah

Oleksandr Kiyenko

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 360
Re: HDMI output TE0820+TE0701
« Reply #9 on: June 14, 2019, 08:25:06 AM »
Hi Sarah,

you need to figure out what happens with I2C communication to ADV7511 to be sure that it configured correctly.

Best regards
Oleksandr Kiyenko