@lex, to get timings for panel you need to follow instructions on
https://linux-sunxi.org/LCD (see "FEX conversion rules"). I understand
that's pretty boring, but that's the only reliable way I know.
I would recommend to start by making your panel to work under u-boot.
U-boot has to be compiled with certain CONFIG_VIDEO_LCD_MODE
configuration value. Then screen should initialize before even kernel is
loaded and started. You will know it is working if you see the boot log
from u-boot on screen. You don't need any devicetree for that, just the
right config for compiling. You can get example from our openvario
project:
https://github.com/Openvario/meta-openvario/blob/warrior/recipes-bsp/u-boot/files/openvario-57-lvds/openvario_defconfig.
See CONFIG_VIDEO_* options.
If you get it working under u-boot, you might get a simple framebuffer
in kernel for free (my patches are not strictly needed for that). If you
need graphics acceleration from lima driver, you might also want to
apply my patches and get the devicetree file right. But first, try to
make it work under u-boot.
On 2/18/20 12:04 AM, @lex wrote:
Hi Andrey,
I have found my fex file for an 18.4" Panel. I have a hard time to
figure out how to enable the dual channel in the dts, can you have a
look at it and help how to enable it?
Here are the timings:
|
[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>
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>
|
how would be the dts equivalent? And how about PD28,PD23,PD24,PD25,PD26
and PD27 pins?
panel {
compatible = "panel-lvds";
width-mm = <>;
height-mm = <>;
pinctrl-names = "default";
pinctrl-0 = <&lcd_enable_pin &lcd_lvds0_pins>;
pinctrl-1 = <&lcd_enable_pin &lcd_lvds1_pins>;
enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
data-mapping = "jeida-18";
#address-cells = <1>;
#size-cells = <0>;
panel-timing {
clock-frequency = <69000000>;
hactive = <1920>;
vactive = <1080>;
hsync-len = <1>;
hfront-porch = <>;
hback-porch = <>;
vsync-len = <1>;
vfront-porch = <>;
vback-porch = <>;
};
port {
lvds_panel_in: endpoint {
remote-endpoint = <&display_out_rgb>;
};
};
};
BR
@lex
On Monday, February 17, 2020 at 11:26:51 AM UTC-3, @lex wrote:
Hi Andrey,
Thank you for sharing your work.
I can remember 2 channel was needed for the 1920x1080 res. in fact
the panel is 17"
I need to find the fex files, must be somewhere here... :)
I will try with your kernel and see what i get. Busy weekend ahead...
I will post the results.
BR
@lex
On Sunday, February 16, 2020 at 10:25:33 AM UTC-3, Andrey Lebedev wrote:
On Saturday, February 15, 2020 at 4:20:33 PM UTC+2, @lex wrote:
Hi Andrey,
I have a couple of 15" LCDs (different makers) with
Cubieboard A20 (kernel 3.4) i would like to test your
implementation if possible.
Can you share a kernel tree with your code and where should
i change the timings for each Panel?
Hi @lex,
I've shared my device tree here:
https://gitlab.freedesktop.org/lima/mesa/issues/131#note_405869
<https://www.google.com/url?q=https%3A%2F%2Fgitlab.freedesktop.org%2Flima%2Fmesa%2Fissues%2F131%23note_405869&sa=D&sntz=1&usg=AFQjCNGLsHoqWxFOjgRhKWl6gbc1IQzxGQ>.
I believe you have to adapt timings either from panel datasheet
or (if you have .fex file with the timings) according to
formulas here: https://linux-sunxi.org/LCD
<https://linux-sunxi.org/LCD>.
The patches for LVDS support are under review right now, I keep
the most up-to-date version here:
https://github.com/kedder/linux/tree/a20-lvds-support
<https://github.com/kedder/linux/tree/a20-lvds-support>
If you have big screen like that, you might need to include
another pin set for LVDS channel 1. They are already included in
my changes on a20-lvds-support branch, see
https://github.com/kedder/linux/commit/44eb271c79869394247b560667eb59dce2ddc1c9
<https://github.com/kedder/linux/commit/44eb271c79869394247b560667eb59dce2ddc1c9>.
--
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/S77AQ6SHxNo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
[email protected]
<mailto:[email protected]>.
To view this discussion on the web, visit
https://groups.google.com/d/msgid/linux-sunxi/bfac180a-2457-4f7f-b51b-3280a9eb81d1%40googlegroups.com
<https://groups.google.com/d/msgid/linux-sunxi/bfac180a-2457-4f7f-b51b-3280a9eb81d1%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Andrey Lebedev aka -.- . -.. -.. . .-.
Software engineer
Homepage: http://lebedev.lt/
--
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 [email protected].
To view this discussion on the web, visit
https://groups.google.com/d/msgid/linux-sunxi/925d2c36-8ce0-1fb6-1a38-c09a7e4b93f2%40gmail.com.