From 0abb9150dbf1a40a1e0671f19c97f27a1855c0b0 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Sat, 15 Apr 2023 11:50:21 +0100 Subject: [PATCH] dtoverlay: Preconfigure touch orientation for different variants --- arch/arm/boot/dts/overlays/README | 2 +- .../vc4-kms-dsi-waveshare-panel-overlay.dts | 47 +++++++++++++++---- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index 226322bafc042..b1c2973a9a712 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -4479,7 +4479,7 @@ Load: dtoverlay=vc4-kms-dsi-waveshare-panel,= 7_0_inchC 7.0" C 1024x600 7_9_inch 7.9" 400x1280 8_0_inch 8.0" 1280x800 - 10_1_inch 10.1" 1280x800 (default) + 10_1_inch 10.1" 1280x800 11_9_inch 11.9" 320x1480 diff --git a/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts index 388bbb904055d..296601d5ee15d 100644 --- a/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts +++ b/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts @@ -50,7 +50,6 @@ touch: goodix@14 { reg = <0x14>; compatible = "goodix,gt911"; - }; }; }; @@ -70,15 +69,45 @@ }; __overrides__ { - 2_8_inch = <&panel>, "compatible=waveshare,2.8inch-panel"; - 3_4_inch = <&panel>, "compatible=waveshare,3.4inch-panel"; - 4_0_inch = <&panel>, "compatible=waveshare,4.0inch-panel"; - 7_0_inchC = <&panel>, "compatible=waveshare,7.0inch-c-panel"; - 7_9_inch = <&panel>, "compatible=waveshare,7.9inch-panel"; - 8_0_inch = <&panel>, "compatible=waveshare,8.0inch-panel"; - 10_1_inch = <&panel>, "compatible=waveshare,10.1inch-panel"; - 11_9_inch = <&panel>, "compatible=waveshare,11.9inch-panel"; + 2_8_inch = <&panel>, "compatible=waveshare,2.8inch-panel", + <&touch>, "touchscreen-size-x:0=480", + <&touch>, "touchscreen-size-y:0=640", + <&touch>, "touchscreen-inverted-y?", + <&touch>, "touchscreen-swapped-x-y?"; + 3_4_inch = <&panel>, "compatible=waveshare,3.4inch-panel", + <&touch>, "touchscreen-size-x:0=800", + <&touch>, "touchscreen-size-y:0=800"; + 4_0_inch = <&panel>, "compatible=waveshare,4.0inch-panel", + <&touch>, "touchscreen-size-x:0=480", + <&touch>, "touchscreen-size-y:0=800", + <&touch>, "touchscreen-inverted-y?", + <&touch>, "touchscreen-swapped-x-y?"; + 7_0_inchC = <&panel>, "compatible=waveshare,7.0inch-c-panel", + <&touch>, "touchscreen-size-x:0=1024", + <&touch>, "touchscreen-size-y:0=600"; + 7_9_inch = <&panel>, "compatible=waveshare,7.9inch-panel", + <&touch>, "touchscreen-size-x:0=400", + <&touch>, "touchscreen-size-y:0=1280", + <&touch>, "touchscreen-inverted-x?", + <&touch>, "touchscreen-inverted-y?"; + 8_0_inch = <&panel>, "compatible=waveshare,8.0inch-panel", + <&touch>, "touchscreen-size-x:0=800", + <&touch>, "touchscreen-size-y:0=1280", + <&touch>, "touchscreen-inverted-x?", + <&touch>, "touchscreen-swapped-x-y?"; + 10_1_inch = <&panel>, "compatible=waveshare,10.1inch-panel", + <&touch>, "touchscreen-size-x:0=800", + <&touch>, "touchscreen-size-y:0=1280", + <&touch>, "touchscreen-inverted-x?", + <&touch>, "touchscreen-swapped-x-y?"; + 11_9_inch = <&panel>, "compatible=waveshare,11.9inch-panel", + <&touch>, "touchscreen-size-x:0=320", + <&touch>, "touchscreen-size-y:0=1480", + <&touch>, "touchscreen-inverted-x?", + <&touch>, "touchscreen-swapped-x-y?"; disable_touch = <&touch>, "status=disabled"; + + /* Drop these once the above configurations are confirmed */ sizex = <&touch>,"touchscreen-size-x:0"; sizey = <&touch>,"touchscreen-size-y:0"; invx = <&touch>,"touchscreen-inverted-x?";