Skip to content

Commit

Permalink
dtoverlay: Preconfigure touch orientation for different variants
Browse files Browse the repository at this point in the history
  • Loading branch information
6by9 committed Apr 15, 2023
1 parent 1fc6d1e commit 0abb915
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 10 deletions.
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -4479,7 +4479,7 @@ Load: dtoverlay=vc4-kms-dsi-waveshare-panel,<param>=<val>
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


Expand Down
47 changes: 38 additions & 9 deletions arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
touch: goodix@14 {
reg = <0x14>;
compatible = "goodix,gt911";

};
};
};
Expand All @@ -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?";
Expand Down

0 comments on commit 0abb915

Please sign in to comment.