// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright (c) Toradex
*
* Toradex DSI to LVDS Adapter on Aquila DSI_1 with Capacitive Touch Display
* 10.1" V2 Used on Development Board (J44). DSI_1 is exposed via a Samtec
* LSS-130 connector.
*
* https://developer.toradex.com/hardware/accessories/displays/capacitive-touch-display-101inch-lvds
* https://www.toradex.com/accessories/capacitive-touch-display-10.1-inch-lvds
* https://developer.toradex.com/hardware/accessories/add-ons/dsi-lvds-adapter
* https://www.toradex.com/accessories/verdin-dsi-to-lvds-adapter
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
&{/} {
backlight_pwm3: backlight-pwm3 {
compatible = "pwm-backlight";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_19_dsi_1>;
brightness-levels = <0 45 63 88 119 158 203 255>;
default-brightness-level = <4>;
/* Aquila GPIO_19_DSI_1 (AQUILA B44) - DSI_1_BKL_EN_LVDS */
enable-gpios = <&main_gpio0 13 GPIO_ACTIVE_HIGH>;
/* Aquila PWM_3_DSI (AQUILA B46) - PWM_3_DSI_LVDS */
pwms = <&main_ehrpwm5 0 6666667 0>;
};
panel-lvds-bridge {
compatible = "optologic,scx1001511ggc49", "panel-lvds";
backlight = <&backlight_pwm3>;
data-mapping = "vesa-24";
height-mm = <136>;
width-mm = <217>;
/*
* The timings here are different from the nominal ones for the
* SCX1001511GGC49 display. The clock-frequency, along with the
* other timings, are adjusted from experimentation to work
* consistently with the DSI to LVDS bridge (TI SN65DSI84)
* across Toradex modules that use it.
*/
panel-timing {
clock-frequency = <70000000>;
hactive = <1280>;
hback-porch = <55>;
hfront-porch = <55>;
hsync-len = <45>;
vactive = <800>;
vback-porch = <5>;
vfront-porch = <5>;
vsync-len = <3>;
de-active = <1>;
hsync-active = <0>;
vsync-active = <0>;
pixelclk-active = <0>;
};
port {
panel_lvds_bridge_in: endpoint {
remote-endpoint = <&dsi_lvds_bridge_out>;
};
};
};
};
&dphy_tx0 {
status = "okay";
};
&dsi0 {
status = "okay";
};
&dsi0_ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
dsi0_out: endpoint {
remote-endpoint = <&dsi_lvds_bridge_in>;
};
};
port@1 {
reg = <1>;
dsi0_in: endpoint {
remote-endpoint = <&dpi2_out>;
};
};
};
&dss_ports {
#address-cells = <1>;
#size-cells = <0>;
port@2 {
reg = <2>;
dpi2_out: endpoint {
remote-endpoint = <&dsi0_in>;
};
};
};
&i2c_dsi_0 {
#address-cells = <1>;
#size-cells = <0>;
bridge@2c {
compatible = "ti,sn65dsi84";
reg = <0x2c>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_20_dsi_1>;
/* Aquila GPIO_20_DSI_1 (AQUILA B45) - LVDS_EN */
enable-gpios = <&main_gpio0 18 GPIO_ACTIVE_HIGH>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
dsi_lvds_bridge_in: endpoint {
remote-endpoint = <&dsi0_out>;
data-lanes = <1 2 3 4>;
};
};
port@2 {
reg = <2>;
dsi_lvds_bridge_out: endpoint {
remote-endpoint = <&panel_lvds_bridge_in>;
};
};
};
};
touchscreen@41 {
compatible = "ilitek,ili251x";
reg = <0x41>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_17_dsi_1>, <&pinctrl_gpio_18_dsi_1>;
/* Aquila GPIO_17_DSI_1 (AQUILA B42) - TOUCH_INT# */
/* Rising edge avoids spurious interrupts from the noisy falling edge. */
interrupt-parent = <&main_gpio0>;
interrupts = <12 IRQ_TYPE_EDGE_RISING>;
/* Aquila GPIO_18_DSI_1 (AQUILA B43) - TOUCH_RESET# */
reset-gpios = <&main_gpio0 31 GPIO_ACTIVE_LOW>;
};
};