Author Topic: Full HD LVDS connection  (Read 2390 times)

Offline Gremlin

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Full HD LVDS connection
« on: September 15, 2015, 07:30:12 am »
Somebody tried to connect to CubieBoard2 LCD panel 1920*1080 wia dual-channel LVDS?

This does not work:

[disp_init]
disp_init_enable = 1
disp_mode = 0
screen0_output_type = 1
screen0_output_mode = 10
screen1_output_type = 1
screen1_output_mode = 10
fb0_framebuffer_num = 2
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 0
fb1_framebuffer_num = 2
fb1_format = 10
fb1_pixel_sequence = 0
fb1_scaler_mode_enable = 0
lcd0_backlight = 197
lcd1_backlight = 197
lcd0_bright = 50
lcd0_contrast = 50
lcd0_saturation = 57
lcd0_hue = 50
lcd1_bright = 50
lcd1_contrast = 50
lcd1_saturation = 57
lcd1_hue = 50

[lcd0_para]
lcd_used = 1
lcd_x = 1920
lcd_y = 1080
lcd_dclk_freq = 142
lcd_pwm_not_used = 0
lcd_pwm_ch = 0
lcd_pwm_freq = 10000
lcd_pwm_pol = 0
lcd_max_bright = 240
lcd_min_bright = 64
lcd_if = 3
lcd_hbp = 13
lcd_ht = 2160
lcd_vbp = 13
lcd_vt = 2250
lcd_hv_if = 0
lcd_hv_smode = 0
lcd_hv_s888_if = 0
lcd_hv_syuv_if = 0
lcd_hv_vspw = 0
lcd_hv_hspw = 0
lcd_lvds_ch = 1
lcd_lvds_mode = 0
lcd_lvds_bitwidth = 0
lcd_lvds_io_cross = 1
lcd_cpu_if = 0
lcd_frm = 0
lcd_io_cfg0 = 268435456
lcd_gamma_correction_en = 0
lcd_gamma_tbl_0 = 0x0
lcd_gamma_tbl_1 = 0x10101
lcd_gamma_tbl_255 = 0xffffff
lcd_bl_en_used = 0
lcd_bl_en = port:PH07<1><0><default><1>
lcd_power_used = 0
lcd_power = port:PH08<1><0><default><1>
lcd_pwm_used = 0
lcd_pwm = port:PB02<2><0><default><default>
lcd_gpio_0 =
lcd_gpio_1 =
lcd_gpio_2 =
lcd_gpio_3 =
lcdd0 = port:PD00<2><0><default><default>
lcdd1 = port:PD01<2><0><default><default>
lcdd2 = port:PD02<2><0><default><default>
lcdd3 = port:PD03<2><0><default><default>
lcdd4 = port:PD04<2><0><default><default>
lcdd5 = port:PD05<2><0><default><default>
lcdd6 = port:PD06<2><0><default><default>
lcdd7 = port:PD07<2><0><default><default>
lcdd8 = port:PD08<2><0><default><default>
lcdd9 = port:PD09<2><0><default><default>
lcdd10 = port:PD10<2><0><default><default>
lcdd11 = port:PD11<2><0><default><default>
lcdd12 = port:PD12<2><0><default><default>
lcdd13 = port:PD13<2><0><default><default>
lcdd14 = port:PD14<2><0><default><default>
lcdd15 = port:PD15<2><0><default><default>
lcdd16 = port:PD16<2><0><default><default>
lcdd17 = port:PD17<2><0><default><default>
lcdd18 = port:PD18<2><0><default><default>
lcdd19 = port:PD19<2><0><default><default>
lcdd20 = port:PD20<2><0><default><default>
lcdd21 = port:PD21<2><0><default><default>
lcdd22 = port:PD22<2><0><default><default>
lcdd23 = port:PD23<2><0><default><default>
lcdclk = port:PD24<2><0><default><default>
lcdde = port:PD25<2><0><default><default>
lcdhsync = port:PD26<2><0><default><default>
lcdvsync = port:PD27<2><0><default><default>

In Dual-head display mode can see two images - odd and even pixels.

Offline Gremlin

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Full HD LVDS connection
« Reply #1 on: September 16, 2015, 08:42:43 am »
I understood the reason for the failure!
It is a bug in linux kernel: if i set pixel clock frequency at 142 MHz, then video driver tries to connect VIDEO_PLL with frequency doubling (in LCD0_CH0_CLK_REG). But for channel 0 can not be done!
From here there are two ways:
1 - Set the frequency of the maximum possible 108 MHz and have a frame rate of 45 Hz;
2 - Patch the driver to use the channel 1.

I checked the first way, everything works fine:

[lcd0_para]
lcd_used = 1
lcd_x = 1920
lcd_y = 1080
lcd_dclk_freq = 108

If you connect each twisted pair so that the "plus" a source connected to the "plus" of the receiver, it is necessary to set:

lcd_lvds_io_cross = 0

Setting this parameter to 1 will lead to a change in the polarity of the twisted pairs!



« Last Edit: September 16, 2015, 08:53:42 am by Gremlin »

Offline @lex

  • Full Member
  • ***
  • Posts: 157
  • Karma: +4/-0
    • View Profile
Re: Full HD LVDS connection
« Reply #2 on: September 16, 2015, 03:06:56 pm »
If you think is a bug, please, try to make a patch or hack the relevant code and release it to kernel builders.
What kernel version are you using?

Not many people use LVDS but if the A40 comes true....

Offline Gremlin

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Full HD LVDS connection
« Reply #3 on: September 24, 2015, 07:29:32 am »
I do not work under Linux - I use a small operating system that I developed myself.
Channel 1 can not be used. Channel 0 can be set to PLL3x2 - maximum frame rate of 45 Hz. You can use PLL6x2, but a change in its frequency will cause the failure of reading SD-MMC card. I used PLL6 without changing its frequency - 600MHz. Frame rate in FullHD mode was 72Hz.

Offline silviop

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Full HD LVDS connection
« Reply #4 on: March 23, 2017, 09:18:56 am »
Hi gremlin , i'm try to use dual channel (on mainline kernel) , but you have  use two channel lvds or one channel at double pixel speed ?

Is not clear from your message.