LVDS LCD no clock

356 views
Skip to first unread message

Korneliusz Osmenda

unread,
Jan 6, 2014, 8:41:36 AM1/6/14
to linux...@googlegroups.com
Hi,

I'm trying to run linux on my tablet. (K1001L1C)

I have probed PD7 pin to get know what is going on.
On android I get 52MHz LVDS signal.
On linux-sunxi I get high LVDS state (1,4V)

I tried to tweak fex file but I haven't got anywhere.

Regards.
Korneliusz Osmenda

Luc Verhaegen

unread,
Jan 6, 2014, 9:46:41 AM1/6/14
to linux...@googlegroups.com

Korneliusz Osmenda

unread,
Jan 6, 2014, 10:21:14 AM1/6/14
to linux...@googlegroups.com
There are support files in sunxi-boards and sunxi-uboot.
Now I have added basic wiki page (sorry that I haven't done sooner)
I use sunxi-bsp to make hwpack.
I use sunxi-v3.4.75-r0-1-g9cfbbed kernel

Luc Verhaegen

unread,
Jan 6, 2014, 11:05:37 AM1/6/14
to linux...@googlegroups.com
On Mon, Jan 06, 2014 at 07:21:14AM -0800, Korneliusz Osmenda wrote:
>
> There are support files in sunxi-boards and sunxi-uboot.
> Now I have added basic wiki page (sorry that I haven't done sooner)
> I use sunxi-bsp to make hwpack.
> I use sunxi-v3.4.75-r0-1-g9cfbbed kernel

Please do spend a bit more time on that page. There are way too many
people who bring their device up for themselves, go through a load of
trouble, and then, instead of spending an hour giving something back.

Imho, we should start actively ignoring people who haven't bothered
running through the new device howto properly, and leave them to fend
for themselves.

This device seems to properly use LVDS (lcd_if = 3). Interesting. My
hyundai a7hd claims to use the same, but it has the full PIO D port
listed. Whereas yours only lists PD0-9.

One thing worth noting is that your fex set the gpio muxes to 3, whereas
all other devices set it to 2. You might actually have a proper LVDS
panel whereas the others are all lying (but need a bit of extra support
from the LVDS controller to run).

It could very well be that proper LVDS support is broken in our kernel.
It seems that i must get my hands on this hw.

Luc Verhaegen.

Korneliusz Osmenda

unread,
Jan 6, 2014, 11:18:03 AM1/6/14
to linux...@googlegroups.com
Interestingly in disp_lcd.c in function Disp_lcdc_pin_cfg there is logic which likely fixes broken fex when mul_sel is wrong for LVDS. I have found it when I was trying to get it to work. On wiki cubieboard/LVDS there are wrongly selected muxes. This was spark to find this info in sources. Also I have checked PLL settings, and crosscheck LCDC settings with android. Nothing interesting found. I have something missed.

Korneliusz Osmenda

Michal Suchanek

unread,
Jan 6, 2014, 11:41:27 AM1/6/14
to linux-sunxi
Goerge Ioakimedes (the baseboard guy) has some LVDS lcds in his shop
and presumably has them working on a10. So maybe at some point in
time this actually worked.

Thanks

Michal

Luc Verhaegen

unread,
Jan 6, 2014, 2:06:30 PM1/6/14
to linux...@googlegroups.com
On Mon, Jan 06, 2014 at 05:41:27PM +0100, Michal Suchanek wrote:
>
> Goerge Ioakimedes (the baseboard guy) has some LVDS lcds in his shop
> and presumably has them working on a10. So maybe at some point in
> time this actually worked.

Could be, and could be that it still works on A10, with the right
script.bin. Could also be that this is like the supposed LVDS panels on
all other supposed LVDS based tablets, and that it really is just
switched to LCD.

Imho this makes this very interesting hw that's going to need some
special attention.

Luc Verhaegen.

Luc Verhaegen

unread,
Jan 6, 2014, 2:15:29 PM1/6/14
to linux...@googlegroups.com
On Mon, Jan 06, 2014 at 08:18:03AM -0800, Korneliusz Osmenda wrote:
>

Do fill out that page more, and get us some pictures.

Luc Verhaegen.

Korneliusz Osmenda

unread,
Jan 6, 2014, 4:55:36 PM1/6/14
to linux...@googlegroups.com
Camera in my phone cannot focus on glossy display and case. I will need get camera to get pictures of it. Also tided up.

Korneliusz Osmeda

Luc Verhaegen

unread,
Jan 6, 2014, 6:44:26 PM1/6/14
to linux...@googlegroups.com
Thanks.

Yeah, my pictures are with a phone too. Could be better but already
infinitely better than nothing.

Luc Verhaegen.

Michal Suchanek

unread,
Jan 7, 2014, 1:18:15 AM1/7/14
to linux-sunxi
Actually, VGA also worked on a10 but never got it working on CT with
sunxi. It works with the original image but no signal with sunxi and I
don't even have a scope here.

Thanks

Michal

Dmitriy B.

unread,
Jan 7, 2014, 1:33:08 AM1/7/14
to linux...@googlegroups.com

TsvetanUsunov

unread,
Jan 7, 2014, 1:38:21 AM1/7/14
to linux...@googlegroups.com
LVDS works, but as I reported a month ago LVDS driver is buggy, if the LVDS is one channel clock is OK, if the LVDS is two channels (like for Full HD 1980x1080p LCDs) the clock gets divided by the number of the channels which is wrong and we fix this manually by writing directly in PLL registers
Tsvetan

Dmitriy B.

unread,
Jan 7, 2014, 2:04:24 AM1/7/14
to linux...@googlegroups.com
2014/1/7 TsvetanUsunov

LVDS works, but as I reported a month ago LVDS driver is buggy
Thanks for rapid answer, but could you clarify, what kernel do you use? Our community one, or Allwinner SDK Android?

TsvetanUsunov

unread,
Jan 7, 2014, 2:09:32 AM1/7/14
to linux...@googlegroups.com
linux-sunxi 3.4.67+

Luc Verhaegen

unread,
Jan 7, 2014, 2:14:38 AM1/7/14
to linux...@googlegroups.com
On Mon, Jan 06, 2014 at 10:38:21PM -0800, TsvetanUsunov wrote:
> LVDS works, but as I reported a month ago LVDS driver is buggy, if the LVDS
> is one channel clock is OK, if the LVDS is two channels (like for Full HD
> 1980x1080p LCDs) the clock gets divided by the number of the channels which
> is wrong and we fix this manually by writing directly in PLL registers
> Tsvetan

Where was this reported?

Luc Verhaegen.

TsvetanUsunov

unread,
Jan 7, 2014, 2:29:37 AM1/7/14
to linux...@googlegroups.com
Where was this reported?

Luc Verhaegen.

do not remember, probably on IRC
Tsvetan 

Michal Suchanek

unread,
Jan 7, 2014, 7:15:05 PM1/7/14
to linux-sunxi
Hello,

On 7 January 2014 07:38, TsvetanUsunov <tsveta...@gmail.com> wrote:
> LVDS works, but as I reported a month ago LVDS driver is buggy, if the LVDS
> is one channel clock is OK, if the LVDS is two channels (like for Full HD
> 1980x1080p LCDs) the clock gets divided by the number of the channels which
> is wrong and we fix this manually by writing directly in PLL registers
> Tsvetan

Where does the division come from?

AFAICT the only place the number of channels is used is here:

drivers/video/sunxi/disp/de_lcdc.c:
(info->lcd_lvds_ch << 30) |

Thanks

Michal

>
> 07 януари 2014, вторник, 08:33:08 UTC+2, Dmitriy B. написа:
>>
>> Interesting detail is, OLIMEX now sells LVDS panel
>> https://www.olimex.com/Products/OLinuXino/A20/A20-LCD15.6/
>> http://olimex.wordpress.com/2013/12/09/new-product-in-stock-monster-lvds-15-6-lcd-for-a20-olinuxino/
>> They claim that it works with A20-OLinuXino-MICRO.
>
> --
> You received this message because you are subscribed to the Google Groups
> "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to linux-sunxi...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Korneliusz Osmenda

unread,
Jan 12, 2014, 6:51:12 PM1/12/14
to linux...@googlegroups.com
Hello,

Trying to reproduce bug on cubieboard2 brought me a solution.
In fex file of my tablet there wasn't initialized pll3.
I will send this oneliner patch.

Korneliusz Osmenda

George Ioakimedes

unread,
Jan 12, 2014, 11:08:22 PM1/12/14
to linux...@googlegroups.com
Just to let you know I have tested many LVDS panels with both A10 and A20 as well as several kernels and have them working for more than 1 year now. I have not tested a dual channel (odd/even) in a long time so I can't say if the pixel clock is divided or not.

hdev...@gmail.com

unread,
Jun 2, 2014, 10:59:20 AM6/2/14
to linux...@googlegroups.com

> LVDS works, but as I reported a month ago LVDS driver is buggy, if the LVDS is one channel clock is OK, if the LVDS is two channels (like for Full HD 1980x1080p LCDs) the clock gets divided by the number of the channels which is wrong and we fix this manually by writing directly in PLL registers
> Tsvetan


Can you explain how you write directly in PLL registers and which values, to drive two channels LVDS ?

-Herve

Kaspter Ju

unread,
Jan 20, 2015, 2:45:50 AM1/20/15
to hdev...@gmail.com, tsveta...@gmail.com, linux...@googlegroups.com, nigh0...@gmail.com
Hi all

LVDS two channels pannel can't works well, Can you explain how you write
directly in PLL registers and which values ?

many thanks.

-Kaspter

On 01/07/2014 02:38 PM, TsvetanUsunov wrote:
> LVDS works, but as I reported a month ago LVDS driver is buggy, if the
> LVDS is one channel clock is OK, if the LVDS is two channels (like for
> Full HD 1980x1080p LCDs) the clock gets divided by the number of the
> channels which is wrong and we fix this manually by writing directly in
> PLL registers
> Tsvetan
>
> 07 януари 2014, вторник, 08:33:08 UTC+2, Dmitriy B. написа:
>
> Interesting detail is, OLIMEX now sells LVDS panel
> https://www.olimex.com/Products/OLinuXino/A20/A20-LCD15.6/
> <https://www.olimex.com/Products/OLinuXino/A20/A20-LCD15.6/>
> http://olimex.wordpress.com/2013/12/09/new-product-in-stock-monster-lvds-15-6-lcd-for-a20-olinuxino/
> --
> You received this message because you are subscribed to the Google
> Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to linux-sunxi...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

--
Kaspter Ju

George Ioakimedes

unread,
Jan 20, 2015, 9:32:57 AM1/20/15
to linux...@googlegroups.com, hdev...@gmail.com, tsveta...@gmail.com, nigh0...@gmail.com
I recently connected a 2 channel LVDS panel to Cubieboard2 (A20) and it worked well with just the normal FEX file changes.


For more options, visit https://groups.google.com/groups/opt_out.

--
Kaspter Ju

--
You received this message because you are subscribed to a topic in the Google Groups "linux-sunxi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/linux-sunxi/lNtwrbxZEoc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to linux-sunxi+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kaspter Ju

unread,
Jan 21, 2015, 12:57:55 AM1/21/15
to George Ioakimedes, linux...@googlegroups.com, nigh0...@gmail.com, hdev...@gmail.com, tsveta...@gmail.com
Hi George,

thanks for your input, what kernel code did you use?
https://github.com/linux-sunxi/linux-sunxi.git branch sunxi-3.4?

thanks again,

Best Regards.

On 01/20/2015 10:32 PM, George Ioakimedes wrote:
> I recently connected a 2 channel LVDS panel to Cubieboard2 (A20) and it
> worked well with just the normal FEX file changes.
>
> On Mon, Jan 19, 2015 at 11:45 PM, Kaspter Ju <nigh0...@gmail.com
> <mailto:nigh0...@gmail.com>> wrote:
>
> Hi all
>
> LVDS two channels pannel can't works well, Can you explain how you
> write directly in PLL registers and which values ?
>
> many thanks.
>
> -Kaspter
>
> On 01/07/2014 02:38 PM, TsvetanUsunov wrote:
>
> LVDS works, but as I reported a month ago LVDS driver is buggy,
> if the
> LVDS is one channel clock is OK, if the LVDS is two channels
> (like for
> Full HD 1980x1080p LCDs) the clock gets divided by the number of the
> channels which is wrong and we fix this manually by writing
> directly in
> PLL registers
> Tsvetan
>
> 07 януари 2014, вторник, 08:33:08 UTC+2, Dmitriy B. написа:
>
> Interesting detail is, OLIMEX now sells LVDS panel
> https://www.olimex.com/__Products/OLinuXino/A20/A20-__LCD15.6/
> <https://www.olimex.com/Products/OLinuXino/A20/A20-LCD15.6/>
>
> <https://www.olimex.com/__Products/OLinuXino/A20/A20-__LCD15.6/
> <https://www.olimex.com/Products/OLinuXino/A20/A20-LCD15.6/>>
> http://olimex.wordpress.com/__2013/12/09/new-product-in-__stock-monster-lvds-15-6-lcd-__for-a20-olinuxino/
> <http://olimex.wordpress.com/2013/12/09/new-product-in-stock-monster-lvds-15-6-lcd-for-a20-olinuxino/>
>
> <http://olimex.wordpress.com/__2013/12/09/new-product-in-__stock-monster-lvds-15-6-lcd-__for-a20-olinuxino/
> <http://olimex.wordpress.com/2013/12/09/new-product-in-stock-monster-lvds-15-6-lcd-for-a20-olinuxino/>>
> They claim that it works with A20-OLinuXino-MICRO.
>
> --
> You received this message because you are subscribed to the Google
> Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from
> it, send
> an email to linux-sunxi+unsubscribe@__googlegroups.com
> <mailto:linux-sunxi%2Bunsu...@googlegroups.com>.
> For more options, visit
> https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
> --
> Kaspter Ju
>
> --
> You received this message because you are subscribed to a topic in
> the Google Groups "linux-sunxi" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/__topic/linux-sunxi/lNtwrbxZEoc/__unsubscribe
> <https://groups.google.com/d/topic/linux-sunxi/lNtwrbxZEoc/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> linux-sunxi+unsubscribe@__googlegroups.com
> <mailto:linux-sunxi%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
>

--
Kaspter Ju

George Ioakimedes

unread,
Jan 21, 2015, 9:13:23 AM1/21/15
to Kaspter Ju, linux...@googlegroups.com, herve devehat, Tsvetan Usunov
I don't have that system on the workbench right now but it was off of the 3.4 branch and pulled within the last few months. For reference here is the display portion of my FEX:

[disp_init]
disp_init_enable = 1
disp_mode = 4
screen0_output_type = 1
screen0_output_mode = 4
screen1_output_type = 3
screen1_output_mode = 4
fb0_framebuffer_num = 4
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 1
fb1_framebuffer_num = 2
fb1_format = 10
fb1_pixel_sequence = 0
fb1_scaler_mode_enable = 1
lcd0_bright = 197
lcd1_bright = 197
lcd0_screen_bright = 50
lcd0_screen_contrast = 50
lcd0_screen_saturation = 57
lcd0_screen_hue = 50
lcd1_screen_bright = 50
lcd1_screen_contrast = 50
lcd1_screen_saturation = 57
lcd1_screen_hue = 50

[lcd0_para]
lcd_used = 1
lcd_x = 1920
lcd_y = 1080
lcd_dclk_freq = 69
lcd_pwm_not_used = 0
lcd_pwm_ch = 0
lcd_pwm_freq = 10000
lcd_pwm_pol = 0
lcd_if = 3
lcd_hbp = 160
lcd_ht = 2084
lcd_vbp = 31
lcd_vt = 2226
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 = 1
lcd_lvds_io_cross = 0
lcd_cpu_if = 0
lcd_frm = 1
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 = 1
lcd_bl_en = port:PH07<1><0><default><1>
lcd_power_used = 1
lcd_power = port:PH08<1><0><default><1>
lcd_pwm_used = 1
lcd_pwm = port:PB02<2><0><default><default>

Kaspter Ju

unread,
Jan 22, 2015, 5:01:35 AM1/22/15
to George Ioakimedes, nigh0...@gmail.com, linux...@googlegroups.com, herve devehat, Tsvetan Usunov
thank you George,

After some testing, 2 channel LVDS panel worked well if i disable lvds
output in uboot, hope this help others.
> https://github.com/linux-__sunxi/linux-sunxi.git
> <https://github.com/linux-sunxi/linux-sunxi.git> branch sunxi-3.4?
>
> thanks again,
>
> Best Regards.
>
> On 01/20/2015 10:32 PM, George Ioakimedes wrote:
>
> I recently connected a 2 channel LVDS panel to Cubieboard2 (A20)
> and it
> worked well with just the normal FEX file changes.
>
> On Mon, Jan 19, 2015 at 11:45 PM, Kaspter Ju
> <nigh0...@gmail.com <mailto:nigh0...@gmail.com>
> <mailto:nigh0...@gmail.com <mailto:nigh0...@gmail.com>>__>
> wrote:
>
> Hi all
>
> LVDS two channels pannel can't works well, Can you explain
> how you
> write directly in PLL registers and which values ?
>
> many thanks.
>
> -Kaspter
>
> On 01/07/2014 02:38 PM, TsvetanUsunov wrote:
>
> LVDS works, but as I reported a month ago LVDS driver
> is buggy,
> if the
> LVDS is one channel clock is OK, if the LVDS is two
> channels
> (like for
> Full HD 1980x1080p LCDs) the clock gets divided by the
> number of the
> channels which is wrong and we fix this manually by writing
> directly in
> PLL registers
> Tsvetan
>
> 07 януари 2014, вторник, 08:33:08 UTC+2, Dmitriy B. написа:
>
> Interesting detail is, OLIMEX now sells LVDS panel
> https://www.olimex.com/____Products/OLinuXino/A20/A20-____LCD15.6/
> <https://www.olimex.com/__Products/OLinuXino/A20/A20-__LCD15.6/>
>
> <https://www.olimex.com/__Products/OLinuXino/A20/A20-__LCD15.6/
> <https://www.olimex.com/Products/OLinuXino/A20/A20-LCD15.6/>>
>
>
> <https://www.olimex.com/____Products/OLinuXino/A20/A20-____LCD15.6/
> <https://www.olimex.com/__Products/OLinuXino/A20/A20-__LCD15.6/>
>
> <https://www.olimex.com/__Products/OLinuXino/A20/A20-__LCD15.6/
> <https://www.olimex.com/Products/OLinuXino/A20/A20-LCD15.6/>>>
> http://olimex.wordpress.com/____2013/12/09/new-product-in-____stock-monster-lvds-15-6-lcd-____for-a20-olinuxino/
> <http://olimex.wordpress.com/__2013/12/09/new-product-in-__stock-monster-lvds-15-6-lcd-__for-a20-olinuxino/>
>
> <http://olimex.wordpress.com/__2013/12/09/new-product-in-__stock-monster-lvds-15-6-lcd-__for-a20-olinuxino/
> <http://olimex.wordpress.com/2013/12/09/new-product-in-stock-monster-lvds-15-6-lcd-for-a20-olinuxino/>>
>
>
> <http://olimex.wordpress.com/____2013/12/09/new-product-in-____stock-monster-lvds-15-6-lcd-____for-a20-olinuxino/
> <http://olimex.wordpress.com/__2013/12/09/new-product-in-__stock-monster-lvds-15-6-lcd-__for-a20-olinuxino/>
>
> <http://olimex.wordpress.com/__2013/12/09/new-product-in-__stock-monster-lvds-15-6-lcd-__for-a20-olinuxino/
> <http://olimex.wordpress.com/2013/12/09/new-product-in-stock-monster-lvds-15-6-lcd-for-a20-olinuxino/>>>
> They claim that it works with A20-OLinuXino-MICRO.
>
> --
> You received this message because you are subscribed to
> the Google
> Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving
> emails from
> it, send
> an email to
> linux-sunxi+unsubscribe@__goog__legroups.com
> <http://googlegroups.com>
> <mailto:linux-sunxi%__2Buns...@googlegroups.com
> <mailto:linux-sunxi%252Buns...@googlegroups.com>__>.
> For more options, visit
> https://groups.google.com/____groups/opt_out
> <https://groups.google.com/__groups/opt_out>
> <https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>>.
>
>
> --
> Kaspter Ju
>
> --
> You received this message because you are subscribed to a
> topic in
> the Google Groups "linux-sunxi" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/____topic/linux-sunxi/lNtwrbxZEoc/____unsubscribe
> <https://groups.google.com/d/__topic/linux-sunxi/lNtwrbxZEoc/__unsubscribe>
> linux-sunxi+unsubscribe@__goog__legroups.com
> <http://googlegroups.com>
> <mailto:linux-sunxi%__2Buns...@googlegroups.com
> <mailto:linux-sunxi%252Buns...@googlegroups.com>__>.
> For more options, visit
> https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
--
Kaspter Ju

azh...@gmail.com

unread,
May 1, 2015, 5:27:01 PM5/1/15
to linux...@googlegroups.com, tsveta...@gmail.com, nigh0...@gmail.com, hdev...@gmail.com, georg...@gmail.com
Dear Kaspter,
Could You explain how did You disable lvds in u-boot?
I have the exatly same problem, with my olimex a20 som,
I dont have lvds clock, just constant high signal.

Thanks in advance
Attila HOFFEREK

Kaspter Ju

unread,
May 7, 2015, 3:04:09 AM5/7/15
to azh...@gmail.com, linux...@googlegroups.com, nigh0...@gmail.com, tsveta...@gmail.com, hdev...@gmail.com, georg...@gmail.com
Hi Attila,

Just comment out CONFIG_SUNXI_DISPLAY

--- a/u-boot-2011.09/include/configs/sun7i.h
+++ b/u-boot-2011.09/include/configs/sun7i.h
@@ -150,7 +150,7 @@
#define CONFIG_CMD_BOOTA
#define CONFIG_SUN7I_DMA
#define CONFIG_CMD_MEMORY
-#define CONFIG_SUNXI_DISPLAY
+//#define CONFIG_SUNXI_DISPLAY

#define CONFIG_SUNXI_AXP20
#define CONFIG_SUNXI_AXP_MAIN PMU_TYPE_20X
--
Kaspter Ju

Attila Hofferek

unread,
May 8, 2015, 3:15:16 PM5/8/15
to linux...@googlegroups.com, tsveta...@gmail.com, nigh0...@gmail.com, azh...@gmail.com, hdev...@gmail.com
Dear Kaspter

I'm afraid I can't comment it out, I couldn't find any CONFIG_SUNXI_DISPLAY define in my u-boot source tree.
I use this version: git clone https://github.com/RobertCNelson/u-boot
I grepped like this: cd u-boot; grep -r CONFIG_SUNXI_DISPLAY *

Have You got any idea, or could You offer me another version, where I can find the define metioned by You?

Thanks in advance
Yours sincerely
-- 
Attila HOFFEREK
Reply all
Reply to author
Forward
0 new messages