Hi,
I got original problem solved using following solution:
-
Change overlays.txt file content from the BOOT partition:
verdin-imx8mm-my-machine.conf file added into the tdx/layers/meta-toradex-nxp/conf/machine folder with content:
require conf/machine/verdin-imx8mm.conf
MACHINEOVERRIDES =. "verdin-imx8mm:"
TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT = ""
This was important to remove HDMI bridge adapter loading at u-boot runtime which break the LVDS bridge functionality.
2 . Custom LVDS panel support was added by patching imx8mm.dtsi file:
0001-add-support-for-Evervision-panel-display.patch was added into the tdx/layers/my-layer/recipes-kernel/linux/linux-toradex/verdin-imx8mm with content:
arch/arm64/boot/dts/freescale/imx8mm.dtsi | 111 ++++++++++++++++++++++
1 file changed, 111 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
index f22417f4abbf..ec39cb9ff6d4 100755
--- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
@@ -1486,3 +1486,114 @@
status = "disabled";
};
};
+
+&{/} {
+ backlight {
+ compatible = "pwm-backlight";
+ brightness-levels = <0 45 63 88 119 158 203 255>;
+ default-brightness-level = <4>;
+ /* Verdin MEZ_DSI_1_BKL_EN (SODIMM 21) */
+ enable-gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mez_dsi_1_bkl_en>;
+ power-supply = <®_3p3v>;
+ /* Verdin MEZ_PWM_3_DSI (SODIMM 19) */
+ pwms = <&pwm1 0 6666667 PWM_POLARITY_INVERTED>;
+ };
+};
+
+&{/soc@0/bus@32c00000/display-subsystem} {
+ status = "okay";
+};
+
+/* Verdin I2C_2_DSI */
+&i2c2 {
+ clock-frequency = <10000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+};
+
+/* Verdin I2C_4 */
+&i2c4 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ bridge@2c {
+ compatible = "ti,sn65dsi83";
+ /* Verdin MEZ_GPIO_1 (SODIMM 206) */
+ enable-gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mez_gpio1>;
+ reg = <0x2c>;
+ ti,dsi-lanes = <4>;
+ ti,height-mm = <67>;
+ ti,lvds-bpp = <24>;
+ ti,lvds-format = <2>;
+ ti,width-mm = <105>;
+
+ display-timings {
+ native-mode = <&lvds_timing0>;
+
+ lvds_timing0: lt170410_2whc {
+ /*
+ * PLL1 is at 2079000000, take PLL1/70
+ * otherwise we don't get a picture NXP i.MX8M Plus
+ */clock-frequency = <29700000>;
+ hactive = <800 800 800>;
+ hfront-porch = <18 18 18>;
+ hback-porch = <88 88 88>;
+ hsync-len = <22 22 22>;
+ vactive = <480 480 480>;
+ vfront-porch = <10 10 10>;
+ vback-porch = <32 32 32>;
+ vsync-len = <3 3 3>;
+ de-active = <1>;
+ pixelclk-active = <0>;
+
+ };
+ };
+
+ port {
+ dsi85_in: endpoint {
+ remote-endpoint = <&mipi_dsi_bridge1_out>;
+ };
+ };
+
+ };
+
+ touch@38 {
+ status = "okay";
+ compatible = "evervision,ev-ft5726" , "edt,edt-ft5x06";
+ reg = <0x38>;
+ interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
+ touchscreen-size-x = <2048>;
+ touchscreen-size-y = <2048>;
+ interrupt-parent = <&gpio3>;
+ };
+};
+
+&lcdif {
+ status = "okay";
+};
+
+&mipi_dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ port@1 {
+ reg = <1>;
+
+ mipi_dsi_bridge1_out: endpoint {
+ remote-endpoint = <&dsi85_in>;
+ attach-bridge;
+ };
+ };
+};
+
+&gpu {
+ status = "okay";
+};
+
--
2.26.0
linux-toradex_%.bbappend file was added into the custom layer ../tdx/layers/my-layer/recipes-kernel/linux with content:
# This recipe modify linux-toradex-mainline-5.4 recipe in the my-system
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-toradex:"
SUMMARY = "My Linux kernel additions and modification"
SRC_URI += "file://imx8mm_fragment.cfg"
SRC_URI_append_verdin-imx8mm = "\
file://0001-add-support-for-Evervision-panel-display.patch \
"
I assume I can now use different iMX8mm SOM versions (wifi and no-wifi) and all of those will get LVDS support without extra effort.
3 . Kernel configuration was changed to have touch functionality, this was done by configuration fragment definition:
imx8mm_fragment.cfg was added into the tdx/layers/my-layer/recipes-kernel/linux/linux-toradex with content:
CONFIG_LOCALVERSION="-5.2.0-devel"
CONFIG_LOCALVERSION_AUTO=y
CONFIG_TOUCHSCREEN_EDT_FT5X06=y
# CONFIG_MXC_GPU_VIV is not set
4 . Machine type was changed to be custom:
local.conf file was edited to have this definition:
MACHINE ?= "verdin-imx8mm-my-machine"
After this I realize u-boot need a separate DTS change, but this was something I didn’t get working. I tried following:
5 . Custom LVDS panel support by was added by patching imx8mm-verdin.dts file, 0001-LVDS-support.patch file added into tdx/layers/my-layer/recipes-bsp/u-boot/u-boot-toradex/verdin-imx8mm with content:
arch/arm/dts/imx8mm-verdin.dts | 55 +++++++++++++++++++++++-----------
1 file changed, 37 insertions(+), 18 deletions(-)
diff --git a/arch/arm/dts/imx8mm-verdin.dts b/arch/arm/dts/imx8mm-verdin.dts
index e134a13fb9..e808982417 100644
--- a/arch/arm/dts/imx8mm-verdin.dts
+++ b/arch/arm/dts/imx8mm-verdin.dts
@@ -19,7 +19,6 @@
aliases {
eeprom0 = &eeprom_module;
eeprom1 = &eeprom_carrier;
- eeprom2 = &eeprom_mipi_dsi;
};
regulators {
@@ -312,30 +311,48 @@
};
/* MIPI-DSI to HDMI adapter */
- lt8912@48 {
- compatible = "lontium,lt8912";
- ddc-i2c-bus = <&i2c2>;
- hpd-gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>;
- reset-gpios = <&gpio5 5 GPIO_ACTIVE_LOW>;
+ bridge@2c {
+ compatible = "ti,sn65dsi83";
+ enable-gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_gpio_hpd>, <&pinctrl_gpio1>,
- <&pinctrl_gpio2>;
- reg = <0x48>;
+ pinctrl-0 = <&pinctrl_gpio1>;
+ reg = <0x2c>;
+
+ ti,dsi-lanes = <4>;
+ ti,height-mm = <67>;
+ ti,lvds-bpp = <24>;
+ ti,lvds-format = <2>;
+ ti,width-mm = <105>;
+
+ display-timings {
<<etc..>>
6 . u-boot-toradex_%.bbappend file was created into tdx/layers/my-layer/recipes-bsp/u-boot with following content:
# This recipe modify u-boot-toradex_2020.%.bb recipe in the system
#Somewhere it was said Yocto patch automatically, but I will let these here anyway
FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot-toradex:"
SUMMARY = "U-Boot bootloader additions and modification"
# Verdin-imx8mm DTS change for touch and display is in folder 'verdin-imx8mm'
SRC_URI_append_verdin-imx8mm = "\
file://0001-LVDS-support.patch \
"
It seems the patch for uboot DTS is ok in source level but in runtime I can see this error:
Reset cause: POR
DRAM: 2 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
Fail to setup video link
In: serial
Out: serial
Err: serial
Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.1A, Serial# 06803931
Carrier: Toradex Dahlia V1.0C, Serial# 00000000
I hope to get a bit more clear documentation of u-boot configuration and how to adding custom LVDS there, I assume the problem is in missing panel driver support but all this will took quite lot of time.
Br Vesa