// SPDX-License-Identifier: GPL-2.0 /** * DT Overlay for Waveshare 4.3inch touchscreen panel interfaced with DSI on * * Adapted from RPi 7-inch panel overlay for BeagleY-AI * * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ */ /dts-v1/; /plugin/; #include #include /* * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ */ &{/chosen} { overlays { k3-am67a-beagley-ai-dsi-waveshare-4.3inch-panel.kernel = __TIMESTAMP__; }; }; &{/} { mipi_switch: mipi-switch { oe-pin { default-state = "off"; }; sel-pin { default-state = "off"; }; }; panel0 { compatible = "waveshare,4.3inch-dsi", "simple-panel"; backlight = <&display_reg>; power-supply = <&display_reg>; /* Define panel dimensions - typically 480x272 for 4.3" */ width-mm = <95>; height-mm = <54>; panel-timing { clock-frequency = <9000000>; hactive = <480>; vactive = <272>; hfront-porch = <8>; hback-porch = <8>; hsync-len = <4>; vfront-porch = <4>; vback-porch = <4>; vsync-len = <4>; }; port { panel_in: endpoint { remote-endpoint = <&panel_bridge_out>; }; }; }; bridge_reg: bridge-regulator { compatible = "regulator-fixed"; regulator-name = "bridge-reg"; gpio = <&display_reg 0 0>; vin-supply = <&display_reg>; enable-active-high; }; }; &dphy_tx0 { status = "okay"; }; &dsi0_csi1_i2c { #address-cells = <1>; #size-cells = <0>; display_reg: regulator@45 { compatible = "raspberrypi,7inch-touchscreen-panel-regulator"; reg = <0x45>; gpio-controller; #gpio-cells = <2>; }; }; &dsi0 { status = "okay"; #address-cells = <1>; #size-cells = <0>; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; dsi0_out: endpoint { remote-endpoint = <&panel_bridge_in>; }; }; port@1 { reg = <1>; dsi0_in: endpoint { remote-endpoint = <&dss1_dpi1_out>; }; }; }; bridge@0 { status = "okay"; compatible = "toshiba,tc358762"; /* Assuming same bridge chip */ reg = <0>; vddc-supply = <&bridge_reg>; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; panel_bridge_in: endpoint { remote-endpoint = <&dsi0_out>; }; }; port@1 { reg = <1>; panel_bridge_out: endpoint { remote-endpoint = <&panel_in>; }; }; }; }; }; &dss1_ports { #address-cells = <1>; #size-cells = <0>; /* DSS1-VP2: DSI Output */ port@1 { reg = <1>; dss1_dpi1_out: endpoint { remote-endpoint = <&dsi0_in>; }; }; };