From 85e4729bdd48993832b8b82a3ca0a214e1552569 Mon Sep 17 00:00:00 2001 From: Joao Paulo Goncalves Date: Tue, 5 Dec 2023 16:10:14 -0300 Subject: verdin-imx8mp: Add mallow lvds overlay Add overlay for lvds display for mallow v1.1 using native lvds interface of verdin imx8mp. Related-to: ELB-5219 Signed-off-by: Joao Paulo Goncalves --- overlays/Makefile | 1 + ...-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts | 135 +++++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 overlays/verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts diff --git a/overlays/Makefile b/overlays/Makefile index ec9b2f0..41ace9b 100644 --- a/overlays/Makefile +++ b/overlays/Makefile @@ -61,6 +61,7 @@ dtb-y += verdin-imx8mp_mezzanine_panel-lvds-dual-channel-1080p_overlay.dtbo dtb-y += verdin-imx8mp_nau8822-btl_overlay.dtbo dtb-y += verdin-imx8mp_ov5640_overlay.dtbo dtb-y += verdin-imx8mp_panel-cap-touch-10inch-dsi_overlay.dtbo +dtb-y += verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo dtb-y += verdin-imx8mp_spidev_overlay.dtbo targets += $(dtb-y) diff --git a/overlays/verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts b/overlays/verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts new file mode 100644 index 0000000..139770b --- /dev/null +++ b/overlays/verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// Verdin iMX8M Plus single-channel LVDS + +/dts-v1/; +/plugin/; + + +#include +#include +#include +#include "imx8mp-pinfunc.h" + + +/ { + compatible = "toradex,verdin-imx8mp"; +}; + +&{/} { + backlight_lvds_native: backlight-lvds-native { + compatible = "pwm-backlight"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2s_2_d_out_dsi_1_bkl_en>; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; + /* Verdin I2S_2_D_OUT as GPIO (SODIMM 46) */ + enable-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; + /* Verdin PWM_2 (SODIMM 16) */ + pwms = <&pwm2 0 6666667 PWM_POLARITY_INVERTED>; + status = "okay"; + }; + + panel-lvds-native { + compatible = "panel-lvds"; + backlight = <&backlight_lvds_native>; + data-mapping = "vesa-24"; + height-mm = <136>; + width-mm = <217>; + + panel-timing { + clock-frequency = <68900000 71100000 73400000>; + de-active = <1>; + hactive = <1280 1280 1280>; + hback-porch = <23 60 71>; + hfront-porch = <23 60 71>; + hsync-active = <0>; + hsync-len = <15 40 47>; + pixelclk-active = <1>; /* positive edge */ + vactive = <800 800 800>; + vback-porch = <5 7 10>; + vfront-porch = <5 7 10>; + vsync-active = <0>; + vsync-len = <6 9 12>; + }; + + port { + panel_lvds_native_in: endpoint { + remote-endpoint = <&lvds_out>; + }; + }; + }; +}; + +&gpu_2d { + status = "okay"; +}; + +&gpu_3d { + status = "okay"; +}; + +/* Verdin I2C_2_DSI */ +&i2c2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + touch@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2s_2_d_in_gpio>, + <&pinctrl_i2s_2_sync_gpio>; + /* Verdin I2S_2_SYNC as GPIO (SODIMM 44) */ + interrupt-parent = <&gpio4>; + interrupts = <31 IRQ_TYPE_EDGE_FALLING>; + /* Verdin I2S_2_D_IN as GPIO (SODIMM 48) */ + reset-gpios = <&gpio4 30 GPIO_ACTIVE_LOW>; + status = "okay"; + }; +}; + +&lcdif2 { + status = "okay"; +}; + +&ldb { + status = "okay"; +}; + +&ldb_phy { + status = "okay"; +}; + +&lvds_out{ + remote-endpoint = <&panel_lvds_native_in>; +}; + +&mix_gpu_ml { + status = "okay"; +}; + +&ml_vipsi { + status = "okay"; +}; + +/* Verdin PWM_2 */ +&pwm2 { + status = "okay"; +}; + +&iomuxc { + pinctrl_i2s_2_d_in_gpio: gpio4io30grp { + fsl,pins = + ; /* SODIMM 48 */ + }; + + pinctrl_i2s_2_sync_gpio: gpio4io31grp { + fsl,pins = + ; /* SODIMM 44 */ + }; +}; -- cgit v1.2.3