[A64] LVDS display

Started by lilianEver, April 22, 2021, 04:48:03 pm

Previous topic - Next topic

lilianEver

Hello,

I want to add LVDS display to my olimex board.
I will deactivate the ethernet component with the hardware jumper. (ref: topic)


The display i want to use: display


I have take a look here :
- http://linux-sunxi.org/Linux_mainlining_effort
- Overlay from other board : lcd-olinuxino-15.6.dts


What i need to do to make my display work using LVDS on my olimex board ?
I need to adapt a dts file ?
Enable specific module in the kernel ?


lilianEver

Progress update

Kernel:
I have activated two modules in the kernel (/etc/modules). I suppose i need them to make the communication work:
- lvds-codec
- panel-lvds

Overlay:

I have modified the "sun4i-a10" overlay for the olimex A64 and my display.
New file:
/dts-v1/;
/plugin/;

/ {
    compatible = "allwinner,sun50i-a64",
            "olimex,a64-olinuxino";
    description = "Lvds screen";

fragment@0 {
target-path = "/";
__overlay__ {
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm 0 50000 0>;
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
default-brightness-level = <50>;
};

panel {
compatible = "panel-lvds";

pinctrl-names = "default";
pinctrl-0 = <&lcd_lvds0_pins>;

width-mm = <150>;
height-mm = <94>;
data-mapping = "jeida-24";
status = "okay";

power-supply = <&reg_vcc5v0>;

enable-gpios = <&pio 7 8 0>; /* PH8 : 7,8,0   PD23: 3,23,0 */
backlight = <&backlight>;

panel-timing {
                    /* 1280x800 @60Hz */
clock-frequency = <71000000>;
hactive = <1280>;
hsync-len = <0>;
hfront-porch = <20>;
hback-porch = <54>;
vactive = <760>;
vsync-len = <0>;
vfront-porch = <17>;
vback-porch = <23>;
};

port {
panel_in_tcon0: endpoint {
remote-endpoint = <&tcon0_out_panel>;
};
};
};
};
};

fragment@1 {
target = <&pwm>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&pwm0_pin>;
status = "okay";
};
};

fragment@2 {
target = <&pio>;
__overlay__ {
lcd_lvds0_pins: lcd-lvds0-pins {
pins = "PD12", "PD13", "PD14", "PD15", "PD16",
       "PD17", "PD18", "PD19", "PD20", "PD21";
function = "lvds0";
};
};
};

fragment@3 {
target = <&tcon0_out>;
__overlay__ {
tcon0_out_panel: endpoint@0 {
reg = <0>;
remote-endpoint = <&panel_in_tcon0>;
};
};
};
};

I had try to add this overlay but i think i got wrongs settings that disable all custom overlay added. Adding this overlay disable the mcp215x i have added in (this topic).

Command result:
dmesg | grep lvds
[    5.516865] Modules linked in: cpufreq_dt mcp251x can_dev panel_lvds lvds_codec micrel pinctrl_axp209 dwmac_sun8i mdio_mux

It is difficult to know what settings are wrongs and how changes them correctly. 
It is possible to make LVDS work on this board ?

Do you know some additional command to control overlays or lvds configuration other than "dmesg" ?