Skip to content

Commit

Permalink
dtoverlays: Add an overlay for the Waveshare DSI screens
Browse files Browse the repository at this point in the history
They come in varying sizes, but all have the same MCU for
power control and touch controller.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
  • Loading branch information
6by9 committed Apr 20, 2023
1 parent 65390d8 commit 1aee9ad
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
vc4-kms-dsi-7inch.dtbo \
vc4-kms-dsi-lt070me05000.dtbo \
vc4-kms-dsi-lt070me05000-v2.dtbo \
vc4-kms-dsi-waveshare-panel.dtbo \
vc4-kms-kippah-7inch.dtbo \
vc4-kms-v3d.dtbo \
vc4-kms-v3d-pi4.dtbo \
Expand Down
15 changes: 15 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -4493,6 +4493,21 @@ Load: dtoverlay=vc4-kms-dsi-lt070me05000-v2
Params: <None>


Name: vc4-kms-dsi-waveshare-panel
Info: Enable a Waveshare DSI touchscreen
Includes the Goodix driver for the touchscreen element.
Requires vc4-kms-v3d to be loaded.
Load: dtoverlay=vc4-kms-dsi-waveshare-panel,<param>=<val>
2_8_inch 2.8" 480x640
3_4_inch 3.4" 800x800 round
4_0_inch 4.0" 480x800
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
11_9_inch 11.9" 320x1480


Name: vc4-kms-kippah-7inch
Info: This overlay is now deprecated - see vc4-kms-dpi-panel,kippah-7inch
Load: <Deprecated>
Expand Down
117 changes: 117 additions & 0 deletions arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/*
* Device Tree overlay for Waveshare DSI Touchscreens
*
*/

/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2835";

fragment@0 {
target = <&dsi1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port {
dsi_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
};
};

fragment@1 {
target-path = "/";
__overlay__ {
};
};

fragment@2 {
target = <&i2c_csi_dsi>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

panel: panel_disp1@45 {
reg = <0x45>;
compatible = "waveshare,10.1inch-panel";

port {
panel_in: endpoint {
remote-endpoint = <&dsi_out>;
};
};
};

touch: goodix@14 {
reg = <0x14>;
compatible = "goodix,gt911";
};
};
};

fragment@3 {
target = <&i2c0if>;
__overlay__ {
status = "okay";
};
};

fragment@4 {
target = <&i2c0mux>;
__overlay__ {
status = "okay";
};
};

__overrides__ {
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?";
invy = <&touch>,"touchscreen-inverted-y?";
swapxy = <&touch>,"touchscreen-swapped-x-y?";
};
};

0 comments on commit 1aee9ad

Please sign in to comment.