From 8ced014de66e250ca337b4e5b4d29ba4d5173497 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Tue, 7 Mar 2023 16:07:18 +0100 Subject: verdin-am62: add dsi to 10inch lvds panel overlay Add overlay for 10 inch capacitive touch panel connected via DSI to LVDS adapter. Related-to: ELB-5026 Signed-off-by: Marcel Ziswiler --- overlays/Makefile | 1 + ...to-lvds_panel-cap-touch-10inch-lvds_overlay.dts | 142 +++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 overlays/verdin-am62_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts diff --git a/overlays/Makefile b/overlays/Makefile index f26a4e2..546f381 100644 --- a/overlays/Makefile +++ b/overlays/Makefile @@ -50,6 +50,7 @@ dtb-y += colibri-imx7_panel-cap-touch-10inch-lvds_overlay.dtbo dtb-y += colibri-imx7_panel-res-touch-7inch_overlay.dtbo dtb-y += colibri-imx7_spidev_overlay.dtbo dtb-y += colibri-imx7_vga-640x480_overlay.dtbo +dtb-y += verdin-am62_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dtbo dtb-y += verdin-am62_mezzanine_panel-cap-touch-10inch-lvds_overlay.dtbo dtb-y += verdin-am62_mezzanine_panel-lvds-dual-channel-1080p_overlay.dtbo dtb-y += verdin-am62_ov5640_overlay.dtbo diff --git a/overlays/verdin-am62_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts b/overlays/verdin-am62_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts new file mode 100644 index 0000000..35378de --- /dev/null +++ b/overlays/verdin-am62_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// Verdin DSI to LVDS Adapter orderable at Toradex. + +/dts-v1/; +/plugin/; + +#include +#include +#include + +/ { + compatible = "toradex,verdin-am62"; +}; + +&{/} { + backlight: backlight { + compatible = "pwm-backlight"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2s_2_d_out_gpio>; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; + /* Verdin DSI_1_BKL_EN_LVDS (shared with I2S_2_D_OUT from MCASP1, SODIMM 46) */ + enable-gpios = <&main_gpio0 34 GPIO_ACTIVE_HIGH>; + power-supply = <®_3v3>; + /* Verdin PWM_3_DSI/PWM_3_DSI_LVDS (SODIMM 19) */ + pwms = <&epwm1 0 6666667 PWM_POLARITY_INVERTED>; + }; + + panel-lvds { + compatible = "panel-lvds"; + backlight = <&backlight>; + 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 = <3 40 51>; + hfront-porch = <43 80 91>; + 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_in_lvds: endpoint { + remote-endpoint = <&lvds_out_panel>; + }; + }; + }; +}; + +&dsi_bridge { + status = "okay"; +}; + +&dsi_bridge_ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + mipi_dsi_bridge1_out: endpoint { + remote-endpoint = <&dsi84_in>; + }; + }; +}; + +&dss { + status = "okay"; +}; + +/* Verdin PWM_3_DSI */ +&epwm1 { + status = "okay"; +}; + +/* Verdin I2C_1 */ +&main_i2c1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + lvds_ti_sn65dsi84: bridge@2c { + compatible = "ti,sn65dsi84"; + reg = <0x2c>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_dsi1_bkl_en>; + /* Verdin Verdin DSI_1_INT# (SN65DSI84 IRQ, SODIMM 17, unused) */ + /* Verdin DSI_1_BKL_EN (SODIMM 21) */ + enable-gpios = <&main_gpio0 30 GPIO_ACTIVE_HIGH>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dsi84_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@2 { + reg = <2>; + + lvds_out_panel: endpoint { + remote-endpoint = <&panel_in_lvds>; + }; + }; + }; + }; + + atmel_mxt_ts: touch@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + /* + * Verdin DSI_1_INT# + * (TOUCH_INT#, SODIMM 17, also routed to SN65DSI84 IRQ albeit currently unused) + */ + interrupt-parent = <&main_gpio1>; + interrupts = <49 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_dsi1_int>, <&pinctrl_i2s_2_bclk_gpio>; + /* Verdin I2S_2_BCLK (TOUCH_RESET#, SODIMM 42) */ + reset-gpios = <&main_gpio0 35 GPIO_ACTIVE_LOW>; + }; +}; -- cgit v1.2.3