From: Vitor Soares <[email protected]>

Add a device tree overlay for the Toradex Capacitive Touch Display 7"
DSI on the Verdin DSI_1 interface. The display features an internal
Texas Instruments SN65DSI83 DSI-to-LVDS bridge driving a Riverdi
RVT70HSLNWCA0 7" WSVGA IPS TFT LCD panel. The touch input is provided
by an Ilitek ILI2132 capacitive touch controller.

Link: 
https://developer.toradex.com/hardware/accessories/displays/capacitive-touch-display-7inch-dsi
Link: 
https://developer.toradex.com/hardware/accessories/add-ons/dsi-display-adapter/
Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Vitor Soares <[email protected]>
---
 arch/arm64/boot/dts/ti/Makefile               |   5 +
 ...m625-verdin-panel-cap-touch-7inch-dsi.dtso | 132 ++++++++++++++++++
 2 files changed, 137 insertions(+)
 create mode 100644 
arch/arm64/boot/dts/ti/k3-am625-verdin-panel-cap-touch-7inch-dsi.dtso

diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
index dc397bc693ac..14898f8ab0e2 100644
--- a/arch/arm64/boot/dts/ti/Makefile
+++ b/arch/arm64/boot/dts/ti/Makefile
@@ -42,6 +42,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-nonwifi-yavia.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-nonwifi-zinnia.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-panel-cap-touch-10inch-dsi.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-panel-cap-touch-10inch-lvds.dtbo
+dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-panel-cap-touch-7inch-dsi.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-dahlia-dsi-to-hdmi.dtb
 dtb-$(CONFIG_ARCH_K3) += 
k3-am625-verdin-wifi-dahlia-panel-cap-touch-10inch-dsi.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-dahlia.dtb
@@ -223,6 +224,9 @@ k3-am625-sk-hdmi-audio-dtbs := k3-am625-sk.dtb 
k3-am62x-sk-hdmi-audio.dtbo
 k3-am625-verdin-wifi-dev-dsi-to-lvds-panel-cap-touch-10inch-dtbs := \
        k3-am625-verdin-wifi-dev.dtb \
        k3-am625-verdin-dsi-to-lvds-panel-cap-touch-10inch.dtbo
+k3-am625-verdin-wifi-dev-panel-cap-touch-7inch-dsi-dtbs := \
+       k3-am625-verdin-wifi-dev.dtb \
+       k3-am625-verdin-panel-cap-touch-7inch-dsi.dtbo
 k3-am625-verdin-wifi-mallow-panel-cap-touch-10inch-lvds-dtbs := \
        k3-am625-verdin-wifi-mallow.dtb \
        k3-am625-verdin-panel-cap-touch-10inch-lvds.dtbo
@@ -328,6 +332,7 @@ dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
        k3-am625-sk-csi2-tevi-ov5640.dtb \
        k3-am625-sk-hdmi-audio.dtb \
        k3-am625-verdin-wifi-dev-dsi-to-lvds-panel-cap-touch-10inch.dtb \
+       k3-am625-verdin-wifi-dev-panel-cap-touch-7inch-dsi.dtb \
        k3-am625-verdin-wifi-mallow-panel-cap-touch-10inch-lvds.dtb \
        k3-am62-lp-sk-hdmi-audio.dtb \
        k3-am62-lp-sk-nand.dtb \
diff --git 
a/arch/arm64/boot/dts/ti/k3-am625-verdin-panel-cap-touch-7inch-dsi.dtso 
b/arch/arm64/boot/dts/ti/k3-am625-verdin-panel-cap-touch-7inch-dsi.dtso
new file mode 100644
index 000000000000..0fa8306324b3
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am625-verdin-panel-cap-touch-7inch-dsi.dtso
@@ -0,0 +1,132 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) Toradex
+ *
+ * Toradex Capacitive Touch Display 7" on Verdin DSI_1.
+ * On Dahlia (X17) and Development Board (X48), DSI_1 is exposed via a
+ * Samtec LSS-130 connector and requires the Toradex DSI Display Adapter
+ * to convert to FFC/FPC connector.
+ *
+ * 
https://developer.toradex.com/hardware/accessories/displays/capacitive-touch-display-7inch-dsi
+ * https://www.toradex.com/accessories/capacitive-touch-display-7-inch-dsi
+ * 
https://developer.toradex.com/hardware/accessories/add-ons/dsi-display-adapter
+ * https://www.toradex.com/accessories/verdin-dsi-display-adapter
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pwm/pwm.h>
+
+&{/} {
+       backlight_pwm3: backlight-pwm3 {
+               compatible = "pwm-backlight";
+               brightness-levels = <0 45 63 88 119 158 203 255>;
+               default-brightness-level = <4>;
+               power-supply = <&reg_3v3>;
+               /* Verdin PWM_3_DSI (SODIMM 19) - PWM_3_DSI_LVDS */
+               pwms = <&epwm1 0 6666667 0>;
+       };
+
+       panel-lvds-bridge {
+               compatible = "riverdi,rvt70hslnwca0", "panel-lvds";
+               backlight = <&backlight_pwm3>;
+               data-mapping = "vesa-24";
+               height-mm = <86>;
+               width-mm = <154>;
+
+               panel-timing {
+                       clock-frequency = <51200000>;
+                       de-active = <1>;
+                       hactive = <1024>;
+                       hback-porch = <160 160 160>;
+                       hfront-porch = <16 160 216>;
+                       hsync-active = <0>;
+                       hsync-len = <1 5 140>;
+                       pixelclk-active = <1>;
+                       vactive = <600>;
+                       vback-porch = <23 23 23>;
+                       vfront-porch = <1 12 126>;
+                       vsync-active = <0>;
+                       vsync-len = <1 10 20>;
+               };
+
+               port {
+                       panel_lvds_bridge_in: endpoint {
+                               remote-endpoint = <&dsi_lvds_bridge_out>;
+                       };
+               };
+       };
+};
+
+&dsi_bridge {
+       status = "okay";
+};
+
+&dsi_bridge_ports {
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       port@1 {
+               reg = <1>;
+
+               dsi_bridge_out: endpoint {
+                       remote-endpoint = <&dsi_lvds_bridge_in>;
+               };
+       };
+};
+
+&dss {
+       status = "okay";
+};
+
+/* Verdin I2C_2_DSI */
+&main_i2c2 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       bridge@2c {
+               compatible = "ti,sn65dsi83";
+               reg = <0x2c>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_dsi1_bkl_en>;
+               /* Verdin GPIO_10_DSI (SODIMM 21) - DSI_1_BKL_EN */
+               enable-gpios = <&main_gpio0 30 GPIO_ACTIVE_HIGH>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+
+                               dsi_lvds_bridge_in: endpoint {
+                                       remote-endpoint = <&dsi_bridge_out>;
+                                       data-lanes = <1 2 3 4>;
+                               };
+                       };
+
+                       port@2 {
+                               reg = <2>;
+
+                               dsi_lvds_bridge_out: endpoint {
+                                       remote-endpoint = 
<&panel_lvds_bridge_in>;
+                               };
+                       };
+               };
+       };
+
+       touch@41 {
+               compatible = "ilitek,ili2132";
+               reg = <0x41>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_dsi1_int>, <&pinctrl_i2s_2_bclk_gpio>;
+               /* Verdin GPIO_9_DSI (SODIMM 17) - TOUCH_INT# */
+               interrupt-parent = <&main_gpio1>;
+               interrupts = <49 IRQ_TYPE_EDGE_RISING>;
+               /* Verdin I2S_2_BCLK (SODIMM 42) - TOUCH_RESET# */
+               reset-gpios = <&main_gpio0 35 GPIO_ACTIVE_LOW>;
+       };
+};
-- 
2.54.0

Reply via email to