diff options
author | Hiago De Franco <hiago.franco@toradex.com> | 2025-06-05 13:31:20 -0300 |
---|---|---|
committer | Hiago De Franco <hiago.franco@toradex.com> | 2025-06-11 08:53:43 -0300 |
commit | db54912669b43d053090dfc9f3d4b6aee03acb02 (patch) | |
tree | b40c4ecf7bae0486ad261d30a4f19746a58a8167 | |
parent | 086200fb2bb74cd27970bf08497f0f6164ffd523 (diff) |
toradex-smarc-imx8mp: panel-cap-touch-10inch-lvds: add overlay
Add overlay for Capacitive Touch LVDS 10' display for Toradex SMARC
iMX8MP using the upstream kernel.
Related-to: ELB-6417
Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
-rw-r--r-- | overlays/Makefile | 1 | ||||
-rw-r--r-- | overlays/toradex-smarc-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts | 113 |
2 files changed, 114 insertions, 0 deletions
diff --git a/overlays/Makefile b/overlays/Makefile index 3a59f31..0f22470 100644 --- a/overlays/Makefile +++ b/overlays/Makefile @@ -56,6 +56,7 @@ dtb-y += colibri-imx7_spidev_overlay.dtbo dtb-y += colibri-imx7_vga-640x480_overlay.dtbo dtb-y += colibri-imx8x_hmp_overlay.dtbo dtb-y += toradex-smarc-imx8mp_dsi-to-hdmi_overlay.dtbo +dtb-y += toradex-smarc-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo dtb-y += toradex-smarc-imx8mp_spi0-cs0_spidev_overlay.dtbo dtb-y += toradex-smarc-imx8mp_spi0-cs1_spidev_overlay.dtbo dtb-y += toradex-smarc-imx8mp_spi1-cs0_spidev_overlay.dtbo diff --git a/overlays/toradex-smarc-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts b/overlays/toradex-smarc-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts new file mode 100644 index 0000000..a5d6db0 --- /dev/null +++ b/overlays/toradex-smarc-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts @@ -0,0 +1,113 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2025 Toradex + * + * Capacitive Touch Display 10.1" LVDS + * + * https://developer.toradex.com/hardware/accessories/displays/capacitive-touch-display-101inch-lvds + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/clock/imx8mp-clock.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/pwm/pwm.h> + +/ { + compatible = "toradex,smarc-imx8mp"; +}; + +&{/} { + backlight_lcd0: backlight-lcd0 { + compatible = "pwm-backlight"; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; + /* SMARC LCD0_BKLT_EN */ + enable-gpios = <&som_gpio_expander 5 GPIO_ACTIVE_HIGH>; + /* SMARC LCD0_BKLT_PWM */ + pwms = <&pwm2 0 6666667 PWM_POLARITY_INVERTED>; + }; + + panel-lvds0 { + compatible = "panel-lvds"; + backlight = <&backlight_lcd0>; + 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>; + vactive = <800 800 800>; + vback-porch = <5 7 10>; + vfront-porch = <5 7 10>; + vsync-active = <0>; + vsync-len = <6 9 12>; + }; + + port { + panel_lvds0_in: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + }; +}; + +/* SMARC I2C_LCD */ +&i2c2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + touch@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + /* SMARC GPIO06 */ + interrupt-parent = <&gpio4>; + interrupts = <29 IRQ_TYPE_EDGE_FALLING>; + /* SMARC GPIO04 */ + reset-gpios = <&gpio4 18 GPIO_ACTIVE_LOW>; + }; +}; + +&lcdif2 { + status = "okay"; +}; + +&lvds_bridge { + assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>, + <&clk IMX8MP_VIDEO_PLL1>; + /* + * This display uses 71.1 MHz pixel clock, so IMX8MP_VIDEO_PLL1 needs + * to be 7 times 71.1MHz, or 497.7 MHz as the internal divider will + * always divide the output LVDS clock by 7. + */ + assigned-clock-rates = <0>, <497700000>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + ldb_lvds_ch0: endpoint { + remote-endpoint = <&panel_lvds0_in>; + }; + }; + }; +}; + +/* SMARC LCD0_BKLT_PWM */ +&pwm2 { + status = "okay"; +}; |