difos/target/linux/bcm27xx/patches-6.12/950-0991-arch-arm-boot-dts-overlays-Add-Waveshare-DSI-TOUCH-s.patch
Álvaro Fernández Rojas 8f9e91ad03 bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-05-21 11:32:18 +02:00

152 lines
4.7 KiB
Diff

From 24651c7e1150dce0e6decf0c5dec51ce710b84fb Mon Sep 17 00:00:00 2001
From: Waveshare_Team <support@waveshare.com>
Date: Tue, 8 Apr 2025 20:28:58 +0800
Subject: [PATCH] arch/arm/boot/dts/overlays : Add Waveshare DSI-TOUCH series
panels Device Tree support
Add the device tree for the Waveshare DSI-TOUCH series panels.
Signed-off-by: Waveshare_Team <support@waveshare.com>
---
arch/arm/boot/dts/overlays/Makefile | 1 +
arch/arm/boot/dts/overlays/README | 20 ++++
...vc4-kms-dsi-waveshare-panel-v2-overlay.dts | 94 +++++++++++++++++++
3 files changed, 115 insertions(+)
create mode 100644 arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-v2-overlay.dts
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -336,6 +336,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
vc4-kms-dsi-lt070me05000-v2.dtbo \
vc4-kms-dsi-waveshare-800x480.dtbo \
vc4-kms-dsi-waveshare-panel.dtbo \
+ vc4-kms-dsi-waveshare-panel-v2.dtbo \
vc4-kms-kippah-7inch.dtbo \
vc4-kms-v3d.dtbo \
vc4-kms-v3d-pi4.dtbo \
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -5567,6 +5567,26 @@ Params: 2_8_inch 2.8" 480
the default DSI1 and i2c_csi_dsi).
+Name: vc4-kms-dsi-waveshare-panel-v2
+Info: Enable the Waveshare DSI-TOUCH series screen
+ Requires vc4-kms-v3d to be loaded.
+Load: dtoverlay=vc4-kms-dsi-waveshare-panel-v2,<param>
+Params: 5_0_inch_a 5.0" 720x1280 2lane
+ 5_5_inch_a 5.5" 720x1280 2lane
+ 7_0_inch_a 7.0" A 720x1280 2lane
+ 7_0_inch_b 7.0" B 720x1280 2lane
+ 8_0_inch_a 8.0" 800x1280 2lane
+ 8_0_inch_a_4lane 8.0" 800x1280 4lane
+ 10_1_inch_a 10.1" 800x1280 2lane
+ 10_1_inch_a_4lane 10.1" 800x1280 4lane
+ disable_touch Disable the touch controller
+ invx Touchscreen inverted x axis
+ invy Touchscreen inverted y axis
+ swapxy Touchscreen swapped x y axis
+ dsi0 Use DSI0 and i2c_csi_dsi0 (rather than
+ the default DSI1 and i2c_csi_dsi).
+
+
Name: vc4-kms-kippah-7inch
Info: This overlay is now deprecated - see vc4-kms-dpi-panel,kippah-7inch
Load: <Deprecated>
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-v2-overlay.dts
@@ -0,0 +1,94 @@
+/*
+ * vc4-kms-dsi-waveshare-panel-v2-overlay.dts
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "brcm,bcm2835";
+
+ i2c_frag: fragment@0 {
+ target = <&i2c_csi_dsi>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ display_mcu: display_mcu@45 {
+ compatible = "waveshare,touchscreen-panel-regulator";
+ reg = <0x45>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ enable-gpio = <&display_mcu 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ touch: goodix@5d {
+ compatible = "goodix,gt9271";
+ reg = <0x5d>;
+ reset-gpio = <&display_mcu 9 GPIO_ACTIVE_HIGH>;
+ };
+ };
+ };
+
+ dsi_frag: fragment@1 {
+ target = <&dsi1>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ port {
+ dsi_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+
+ dsi_panel: dsi_panel@0 {
+ reg = <0>;
+ compatible = "waveshare,10.1-dsi-touch-a";
+ reset-gpio = <&display_mcu 1 GPIO_ACTIVE_HIGH>;
+ backlight = <&display_mcu>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&i2c0if>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@3 {
+ target = <&i2c0mux>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ __overrides__ {
+ 5_0_inch_a = <&dsi_panel>, "compatible=waveshare,5.0-dsi-touch-a";
+ 5_5_inch_a = <&dsi_panel>, "compatible=waveshare,5.5-dsi-touch-a";
+ 7_0_inch_a = <&dsi_panel>, "compatible=waveshare,7.0-dsi-touch-a";
+ 7_0_inch_b = <&dsi_panel>, "compatible=waveshare,7.0-dsi-touch-b";
+ 8_0_inch_a = <&dsi_panel>, "compatible=waveshare,8.0-dsi-touch-a";
+ 8_0_inch_a_4lane = <&dsi_panel>, "compatible=waveshare,8.0-dsi-touch-a-4lane";
+ 10_1_inch_a = <&dsi_panel>, "compatible=waveshare,10.1-dsi-touch-a";
+ 10_1_inch_a_4lane = <&dsi_panel>, "compatible=waveshare,10.1-dsi-touch-a-4lane";
+ disable_touch = <&touch>, "status=disabled";
+ invx = <&touch>,"touchscreen-inverted-x?";
+ invy = <&touch>,"touchscreen-inverted-y?";
+ swapxy = <&touch>,"touchscreen-swapped-x-y?";
+ dsi0 = <&dsi_frag>, "target:0=",<&dsi0>,
+ <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>;
+ };
+};