i.MX8MP Custom Board LVDS Display

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8MP Custom Board LVDS Display

Jump to solution
2,136 Views
Wobaffet
Senior Contributor I

Hello, We are trying to bring up our LVDS display with our custom board. 

we've patched the device tree imx8mp-evk.dts for the kernel as follows:

  lvds_backlight: lvds_backlight {
                compatible = "pwm-backlight";
                pwms = <&pwm2 0 100000 0>;
                status = "okay";

                brightness-levels = < 0  1  2  3  4  5  6  7  8  9
                                     10 11 12 13 14 15 16 17 18 19
                                     20 21 22 23 24 25 26 27 28 29
                                     30 31 32 33 34 35 36 37 38 39
                                     40 41 42 43 44 45 46 47 48 49
                                     50 51 52 53 54 55 56 57 58 59
                                     60 61 62 63 64 65 66 67 68 69
                                     70 71 72 73 74 75 76 77 78 79
                                     80 81 82 83 84 85 86 87 88 89
                                     90 91 92 93 94 95 96 97 98 99
                                    100>;
                default-brightness-level = <80>;
        };
        lvds_panel0 {
                compatible = "dlc,dlc1010gig";
                backlight = <&lvds_backlight>;

                        port{
                                panel_lvds0_in: endpoint {
                                remote-endpoint=<&lvds_out>;
                                };
                         };
        };
lvds_bridge: lvds-to-hdmi-bridge@4c {
                compatible = "ite,it6263";
                reg = <0x4c>;
                reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
                status = "disabled";
                port {
                        it6263_in: endpoint {
                                remote-endpoint = <&lvds_out>;
                        };
                };
        };
&ldb {
        status = "okay";

        lvds-channel@0 {
                fsl,data-mapping = "jeida";
                fsl,data-width = <24>;
                status = "okay";

                port@1{
                        reg=<1>;
                        lvds_out: endpoint{
                                remote-endpoint = <&panel_lvds0_in>;
                        };

                };
        };
};

&ldb_phy {
        status = "okay";
};

We've built the imx-image-core to test out the LVDS, but at the start-up we get the following log:

[FAILED] Failed to start Weston, a …mpositor, as a system service.
See 'systemctl status weston.service' for details.

Then for the 

root@imx8mp-lpddr4-evk:/# weston info
Date: 2022-11-08 UTC
[14:14:37.442] weston 11.0.1
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: lf-6.1.1-1.0.0+
[14:14:37.443] Command line: weston info
[14:14:37.443] OS: Linux, 6.1.1+g32c8c4ce7e52, #1 SMP PREEMPT Thu Mar  2 14:54:17 UTC 2023, aarch64
[14:14:37.443] Flight recorder: enabled
[14:14:37.443] Using config file '/etc/xdg/weston/weston.ini'
[14:14:37.443] Output repaint window is 16 ms maximum.
[14:14:37.443] Loading module '/usr/lib/libweston-11/wayland-backend.so'
[14:14:37.443] Failed to load module: /usr/lib/libweston-11/wayland-backend.so: cannot open shared object file: No such file or directory
[14:14:37.443] fatal: failed to create compositor backend
root@imx8mp-lpddr4-evk:/# systemctl status weston.service
x weston.service - Weston, a Wayland compositor, as a system service
     Loaded: loaded (/lib/systemd/system/weston.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2022-11-08 14:17:34 UTC; 1min 21s ago
TriggeredBy: * weston.socket
       Docs: man:weston(1)
             man:weston.ini(5)
             http://wayland.freedesktop.org/
    Process: 603 ExecStart=/usr/bin/weston --log=${XDG_RUNTIME_DIR}/weston.log --modules=systemd-notify.>
   Main PID: 603 (code=exited, status=1/FAILURE)

Nov 08 14:17:34 imx8mp-lpddr4-evk systemd[1]: Starting Weston, a Wayland compositor, as a system service>
Nov 08 14:17:34 imx8mp-lpddr4-evk systemd[1]: weston.service: Main process exited, code=exited, status=1>
Nov 08 14:17:34 imx8mp-lpddr4-evk systemd[1]: weston.service: Failed with result 'exit-code'.
Nov 08 14:17:34 imx8mp-lpddr4-evk systemd[1]: Failed to start Weston, a Wayland compositor, as a system >
root@imx8mp-lpddr4-evk:/# journalctl -xeu weston.service
-- 
-- A start job for unit weston.service has begun execution.
-- 
-- The job identifier is 118.
Nov 08 14:00:22 imx8mp-lpddr4-evk systemd[1]: weston.service: Main process exited, code=exited, status=1>
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- An ExecStart= process belonging to unit weston.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Nov 08 14:00:22 imx8mp-lpddr4-evk systemd[1]: weston.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The unit weston.service has entered the 'failed' state with result 'exit-code'.
Nov 08 14:00:22 imx8mp-lpddr4-evk systemd[1]: Failed to start Weston, a Wayland compositor, as a system >
-- Subject: A start job for unit weston.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit weston.service has finished with a failure.
-- 
-- The job identifier is 118 and the job result is failed.
Nov 08 14:17:34 imx8mp-lpddr4-evk systemd[1]: Starting Weston, a Wayland compositor, as a system service>
-- Subject: A start job for unit weston.service has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit weston.service has begun execution.
-- 
-- The job identifier is 548.
Nov 08 14:17:34 imx8mp-lpddr4-evk systemd[1]: weston.service: Main process exited, code=exited, status=1>
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- An ExecStart= process belonging to unit weston.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Nov 08 14:17:34 imx8mp-lpddr4-evk systemd[1]: weston.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The unit weston.service has entered the 'failed' state with result 'exit-code'.
Nov 08 14:17:34 imx8mp-lpddr4-evk systemd[1]: Failed to start Weston, a Wayland compositor, as a system >
-- Subject: A start job for unit weston.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit weston.service has finished with a failure.
-- 
-- The job identifier is 548 and the job result is failed.
lines 5-60/60 (END)

What could be wrong in our position. Thank you in advance!

Best Regards.

Tags (1)
0 Kudos
1 Solution
2,093 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @Wobaffet,

I hope you are doing well.

Please refer to the example of the device tree given in the below link.
https://community.toradex.com/t/imx8mp-lvds-display-lvds-channel-0/17389/5
https://community.toradex.com/t/imx8mp-lvds-display-settings/17401/2

Please apply those changes and check.

Further If you want to use the lvds dual channel then please follow the below link.
https://github.com/varigit/uboot-imx/issues/9

"[FAILED] Failed to start Weston, a …mpositor, as a system service."
->Please follow the below-given link for references and apply those changes and check.
https://community.nxp.com/t5/i-MX-Processors/IMX8MQ-failed-to-run-weston-service/m-p/1088208
https://community.nxp.com/t5/i-MX-Processors/Unable-to-start-weston-wayland-on-imx8mm/m-p/1658344


To get a detailed idea on starting the service, Please refer to the below link.
https://wayland.pages.freedesktop.org/weston/toc/running-weston.html#running-weston-from-a-systemd-s...

It will help!

Thanks & Regards,
Sanket Parekh

View solution in original post

0 Kudos
8 Replies
2,029 Views
Wobaffet
Senior Contributor I

Hello,

I've configured my DT as follows. But weston does not start. Logs still are like above. What could be the problem here? 

#include "imx8mp-evk.dts"

/ {
lvds0_panel {
compatible = "dlc,dlc1010gig";
fsl,data-mapping="spwg";
width-mm=<216>;
height-mm=<135>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lvds>;
gpio = <&gpio1 10 GPIO_ACTIVE_HIGH
&gpio1 11 GPIO_ACTIVE_HIGH>;
panel-timing{
clock-frequency=<74250000>;
hactive=<1280>;
vactive=<800>;
hfront-porch=<53>;
hback-porch=<53>;
hsync-len=<54>;
vfront-porch=<8>;
vback-porch=<8>;
vsync-len=<7>;
de-active=<1>;
};
port {
panel_lvds_in: endpoint {
remote-endpoint = <&lvds_out>;
};
};
};
};
/delete-node/ &lvds_bridge;
/delete-node/ &pwm2;
/delete-node/ &lvds_backlight;
&ldb {
status = "okay";
fsl,dual-channel;

lvds-channel@0 {
fsl,data-mapping = "spwg";
/delete-node/ port@1;

port@1 {
reg = <1>;

lvds_out: endpoint {
remote-endpoint = <&panel_lvds_in>;
};
};

};
};
&iomuxc{
pinctrl_lvds:lvdsgrp {
fsl,pins=<
MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10 0x1c0
MX8MP_IOMUXC_GPIO1_IO11__GPIO1_IO11 0x1c0
>;
};
};

Thank you in advance!

Best Regards

0 Kudos
2,013 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @Wobaffet,

I hope you are doing well.

Can you follow this link and check by running the command described in the link?
https://github.com/nxp-imx/weston-imx

Please also follow this link in order to start the Weston, Please apply these changes and check.
https://community.nxp.com/t5/i-MX-Processors/How-to-start-Weston-in-fsl-image-validation-imx-image/t...

0 Kudos
1,997 Views
Wobaffet
Senior Contributor I

I've the following issue that you've provided.

https://community.nxp.com/t5/i-MX-Processors/Unable-to-start-weston-wayland-on-imx8mm/m-p/1658344


For this context, solution is solved with the correct configuration on the device tree, can you check our configuration for the lvds panel, we have direct connection to the boards lvds panel just like in the imx8mp-evk but we have configured backlight pwm as a gpio and it is always on, also display enable pin configured as always on, voltages are okay for these pins.

Thank you in advance!

best regards,

Tags (1)
0 Kudos
1,977 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @Wobaffet,

I hope you are doing well.
I have shared required properties one should include in the device tree below, Please find the same.

Required properties:
- compatible: should be "dlc,dlc1010gig"
- power-supply: See simple-panel.txt


Optional properties:
- enable-gpios: See simple-panel.txt
- backlight: See simple-panel.txt


This binding is compatible with the simple-panel binding, which is specified in simple-panel.txt in this directory.
https://github.com/OpenChannelSSD/linux/blob/master/Documentation/devicetree/bindings/display/panel/...

This will help you.

Thanks & Regards,
Sanket Parekh

0 Kudos
1,968 Views
Wobaffet
Senior Contributor I
Hello @Sanketh_Parekh
I've tried the solutions you have suggested, but I still can't initialize my display and weston. Should I also patch DTS for u-boot? what does seat does in terms of weston? Thank you in advance!
Best Regards.
0 Kudos
1,922 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @Wobaffet,

I hope you are doing well.

"Should I also patch DTS for u-boot? what does seat does in terms of weston?"
->Yes, One should take reference from the below knowledge base link.
https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Patch-to-support-uboot-logo-keep-from-ub...

It will be helpful.

Thanks & Regards,
Sanket Parekh

0 Kudos
1,985 Views
Wobaffet
Senior Contributor I

Our problem still continues, we are stuck at the development. Below is the our weston.ini

Wobaffet_0-1697093812271.png

And here is our log when we try to launch weston with 

weston -B drm-backend.so

Wobaffet_1-1697093915768.png

We've tried to create rules for the weston which at first was not exist. And it can be seen below;

Wobaffet_2-1697094098892.png

Our DTS file for our custom board is attached. 

Basically,  logind can not launch. How can we eliminate this problem. Is our rules for the weston okay? Is this launch error related to DT configuration? We don't want to start weston as root. How should we configure? Can you help with these matters?

Thank you in advance!

Best Regards.

 

0 Kudos
2,094 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @Wobaffet,

I hope you are doing well.

Please refer to the example of the device tree given in the below link.
https://community.toradex.com/t/imx8mp-lvds-display-lvds-channel-0/17389/5
https://community.toradex.com/t/imx8mp-lvds-display-settings/17401/2

Please apply those changes and check.

Further If you want to use the lvds dual channel then please follow the below link.
https://github.com/varigit/uboot-imx/issues/9

"[FAILED] Failed to start Weston, a …mpositor, as a system service."
->Please follow the below-given link for references and apply those changes and check.
https://community.nxp.com/t5/i-MX-Processors/IMX8MQ-failed-to-run-weston-service/m-p/1088208
https://community.nxp.com/t5/i-MX-Processors/Unable-to-start-weston-wayland-on-imx8mm/m-p/1658344


To get a detailed idea on starting the service, Please refer to the below link.
https://wayland.pages.freedesktop.org/weston/toc/running-weston.html#running-weston-from-a-systemd-s...

It will help!

Thanks & Regards,
Sanket Parekh

0 Kudos