Hi at all people out there,
I actually need some help of defining the kernel/linux DTS file and use it together with the uboot videoargs.
In use is the 5.4.47-2.2.0 uboot and kernel/linux from the YOCTO manifest imx-5.4.47-2.2.0.xml.
In uboot i already can use 5 different MIPI displays and the HDMI adapter from nxp. To configure the display type I use the video_link environment variable. This works fine for me and can easily extended and configured. To get this work my uboot DTS looks like this:
#include <dt-bindings/usb/pd.h>
#include "imx8mm.dtsi"
/ {
model = "My own board";
compatible = "fsl,imx8mm-evk", "fsl,imx8mm";
.
.
.
dsi_host: dsi-host {
compatible = "samsung,sec-mipi-dsi";
status = "okay";
};
01_panel {
compatible = "mydisplay,01_display";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mipi_dsi_en>;
reset-gpio = <&gpio1 8 GPIO_ACTIVE_LOW>;
dsi-lanes = <4>;
video-mode = <2>; /* 0: burst mode
* 1: non-burst mode with sync event
* 2: non-burst mode with sync pulse
*/
panel-width-mm = <67>;
panel-height-mm = <121>;
status = "okay";
port {
01_from_dsim: endpoint {
remote-endpoint = <&dsim_to_01>;
};
};
};
02_panel {
compatible = "mydisplay,02_display";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mipi_dsi_en>;
reset-gpio = <&gpio1 8 GPIO_ACTIVE_LOW>;
dsi-lanes = <4>;
video-mode = <2>; /* 0: burst mode
* 1: non-burst mode with sync event
* 2: non-burst mode with sync pulse
*/
panel-width-mm = <67>;
panel-height-mm = <121>;
status = "okay";
port {
02_from_dsim: endpoint {
remote-endpoint = <&dsim_to_02>;
};
};
};
.
.
.
};
.
.
.
&mipi_dsi {
status = "okay";
port@1 {
dsim_to_adv7535: endpoint {
remote-endpoint = <&adv7535_from_dsim>;
};
};
port@2 {
dsim_to_01: endpoint {
remote-endpoint = <&01_from_dsim>;
};
};
port@3 {
dsim_to_02: endpoint {
remote-endpoint = <&02_from_dsim>;
};
};
.
.
.
};
Now I want to use the same displays in kernel/linux, of course. I first tried the same DTS structure like above from uboot DTS file. Also I used the following configuration of the kernel/linux DTS:
#include "imx8mm.dtsi"
/ {
model = "My own board";
compatible = "fsl,imx8mm-flunder", "fsl,imx8mm";
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
rpmsg_reserved: rpmsg@0xb8000000 {
no-map;
reg = <0 0xb8000000 0 0x400000>;
};
};
.
.
.
};
.
.
.
&mipi_dsi {
status = "okay";
port@1 {
dsim_to_adv7535: endpoint {
remote-endpoint = <&adv7535_from_dsim>;
};
};
panel@0 {
compatible = "mydisplay,01_display";
pinctrl-names = "default";
reg = <0>;
pinctrl-0 = <&pinctrl_mipi_dsi_en>;
reset-gpio = <&gpio1 8 GPIO_ACTIVE_LOW>;
dsi-lanes = <4>;
video-mode = <2>; /* 0: burst mode
* 1: non-burst mode with sync event
* 2: non-burst mode with sync pulse
*/
panel-width-mm = <62>;
panel-height-mm = <110>;
status = "okay";
};
panel@1 {
compatible = "mydisplay,02_display";
pinctrl-names = "default";
reg = <0>;
pinctrl-0 = <&pinctrl_mipi_dsi_en>;
reset-gpio = <&gpio1 8 GPIO_ACTIVE_LOW>;
dsi-lanes = <4>;
video-mode = <2>; /* 0: burst mode
* 1: non-burst mode with sync event
* 2: non-burst mode with sync pulse
*/
panel-width-mm = <62>;
panel-height-mm = <110>;
status = "okay";
};
};
.
.
.
The second variant ends in the usage of the panel 0, while kernel boot. But in both variants I was not able to tell the kernel/linux, from the uboot side, which display I want to use.
As boot- or videoargs from uboot side I tested many variants without any success.
A short example list you can see here:
video=imx-drm:720x1280@60
primary_display=imx-drm
video=DSI-1:dev=01,720x1280@60
video=mxcfb0:dev=ldb,01_panel,if=RGB24
video=mxcfb0:dev=mipi_dsi,01_panel,if=RGB24
video=DSI-1:dev=01_panel
video=mxcfb0:dev=mipi_dsi,720x1280M@60,if=RGB24
video=mxcfb0:dev=ldb,720x1280M@60,if=RGB24
video=DSI-1:720x1280@60
In my opinion the first configuration, like I use in uboot, is the correct one, but I end in the questions:
How is the correct configuration of the kernel/linux DTS file for more then one MIPI DSI Display?
How can I tell the Kernel while booting which display it has it use?
For any help I would very thankful, because this issue already cost me to much time to solve.
Best regards
Cedric
Solved! Go to Solution.
one can consider dts overlay :
https://www.kernel.org/doc/html/latest/devicetree/overlay-notes.html
also as this is general linux question not i.mx specific, may be recommended to
post it on kernel mail list:
http://vger.kernel.org/vger-lists.html
Best regards
igor
Hi Cedric
for custom mipi-dsi lcd one can use rm67191 driver example:
make necessary modifications in struct cmd_set_entry manufacturer_cmd_set[],
lcd initialization can be found in lcd datasheet, timings in struct drm_display_mode default_mode
Best regards
igor
Hi @igorpadykov
Thanks for your quick answer. But the driver isn't my problem.
I have five new drivers implemented, based on the rm67191, which work well alone. But when I want to use all drivers together and tell the kernel from uboot which display I want to use I didn't find any solution till yet. Of course I do never use more then one display while runtime, but in one device is panel_01 and in the other one panel_02. For both I want tu use the same image and configure the display type only by a uboot environment variable like I can use in uboot with video_link.
Understandable?
Best regards
Cedric
one can consider dts overlay :
https://www.kernel.org/doc/html/latest/devicetree/overlay-notes.html
also as this is general linux question not i.mx specific, may be recommended to
post it on kernel mail list:
http://vger.kernel.org/vger-lists.html
Best regards
igor