Skip to content

Commit 89afec1

Browse files
author
kun_liu
committed
tdo_panel: bcm2712-gpu: Add dsi panel driver;
- Add vc4-kms-dsi-panel-overlay.dts for tdo panel compatiable. - Simplify add panel-tdo-dsi-v1.c as module to driver tdo panel. - __overrides__ parameter can be add in config.txt for customers. Signed-off-by: kun_liu <kun_liu@shtdo.com>
1 parent bc0c440 commit 89afec1

File tree

7 files changed

+589
-0
lines changed

7 files changed

+589
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
343343
vc4-kms-dsi-ili9881-7inch.dtbo \
344344
vc4-kms-dsi-lt070me05000.dtbo \
345345
vc4-kms-dsi-lt070me05000-v2.dtbo \
346+
vc4-kms-dsi-tdo-panel.dtbo \
346347
vc4-kms-dsi-waveshare-800x480.dtbo \
347348
vc4-kms-dsi-waveshare-panel.dtbo \
348349
vc4-kms-dsi-waveshare-panel-v2.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5865,6 +5865,18 @@ Load: dtoverlay=vc4-kms-dsi-lt070me05000-v2
58655865
Params: <None>
58665866

58675867

5868+
Name: vc4-kms-dsi-tdo-panel
5869+
Info: Enable the Tdo DSI screen,keep adding.
5870+
Requires vc4-kms-v3d to be loaded.
5871+
Load: dtoverlay=vc4-kms-dsi-tdo-panel,<param>=<val>
5872+
Params: tl034wvs03 4.0" 480x480 2lane
5873+
tl040wvs17 4.0" 480x480 2lane
5874+
tl040hds31 4.0" 720x720 2lane
5875+
rotate Display rotation {0,90,180,270}
5876+
dsi0 Use DSI0 and i2c_csi_dsi0 (rather than
5877+
the default DSI1 and i2c_csi_dsi).
5878+
5879+
58685880
Name: vc4-kms-dsi-waveshare-800x480
58695881
Info: Enable the Waveshare 4.3" 800x480 DSI screen.
58705882
It tries to look like the Pi 7" display, but won't accept some of the
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* Device Tree overlay for Waveshare DSI Touchscreens
3+
*
4+
*/
5+
6+
/dts-v1/;
7+
/plugin/;
8+
9+
/ {
10+
compatible = "brcm,bcm2835";
11+
12+
dsi_frag: fragment@0 {
13+
target = <&dsi1>;
14+
__overlay__ {
15+
#address-cells = <1>;
16+
#size-cells = <0>;
17+
status = "okay";
18+
port {
19+
dsi_out: endpoint {
20+
remote-endpoint = <&panel_in>;
21+
};
22+
};
23+
24+
panel: panel_dsi1@0 {
25+
compatible = "tdo,4.0-dsi-tl040wvs17";
26+
status = "okay";
27+
reg = <0>;
28+
reset-gpios = <&gpio 47 1>; // Dummy GPIO , Unused or change
29+
port {
30+
panel_in: endpoint {
31+
remote-endpoint = <&dsi_out>;
32+
};
33+
};
34+
};
35+
};
36+
};
37+
38+
i2c_frag: fragment@1 {
39+
target = <&i2c_csi_dsi>;
40+
i2cbus: __overlay__ {
41+
#address-cells = <1>;
42+
#size-cells = <0>;
43+
status = "okay";
44+
};
45+
};
46+
47+
fragment@2 {
48+
target = <&i2c0if>;
49+
__overlay__ {
50+
status = "okay";
51+
};
52+
};
53+
54+
fragment@3 {
55+
target = <&i2c0mux>;
56+
__overlay__ {
57+
status = "okay";
58+
};
59+
};
60+
61+
__overrides__ {
62+
tl034wvs03 = <&panel>, "compatible=tdo,4.0-dsi-tl034wvs03";
63+
tl040wvs17 = <&panel>, "compatible=tdo,4.0-dsi-tl040wvs17";
64+
tl040hds31 = <&panel>, "compatible=tdo,4.0-dsi-tl040hds31";
65+
rotation = <&panel>, "rotation:0";
66+
dsi0 = <&dsi_frag>, "target:0=",<&dsi0>,
67+
<&i2c_frag>, "target:0=",<&i2c_csi_dsi0>;
68+
};
69+
};

arch/arm64/configs/bcm2711_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,7 @@ CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m
10861086
CONFIG_DRM_PANEL_SITRONIX_ST7701=m
10871087
CONFIG_DRM_PANEL_SIMPLE=m
10881088
CONFIG_DRM_PANEL_TPO_Y17P=m
1089+
CONFIG_DRM_PANEL_TDO_DSI_V1=m
10891090
CONFIG_DRM_PANEL_WAVESHARE_TOUCHSCREEN=m
10901091
CONFIG_DRM_PANEL_WAVESHARE_TOUCHSCREEN_V2=m
10911092
CONFIG_DRM_DISPLAY_CONNECTOR=m

drivers/gpu/drm/panel/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,20 @@ config DRM_PANEL_TPO_Y17P
940940
Say Y if you want to enable support for panels based on the
941941
TDO Y17P controller.
942942

943+
config DRM_PANEL_TDO_DSI_V1
944+
tristate "TDO touchscreen panels V1"
945+
depends on DRM_MIPI_DSI
946+
depends on I2C
947+
depends on BACKLIGHT_CLASS_DEVICE
948+
help
949+
Say Y here if you want to enable support for TDO DSI
950+
touchscreen panels, e.g. tl034wvs03, tl040hds31, etc.
951+
This driver provides MIPI DSI display interface.
952+
It also handles backlight control via the backlight
953+
class device.
954+
To compile this driver as a module, choose M here; the
955+
module will be called panel-tdo-dsi-v1.
956+
943957
config DRM_PANEL_TPO_TD028TTEC1
944958
tristate "Toppoly (TPO) TD028TTEC1 panel driver"
945959
depends on OF && SPI

drivers/gpu/drm/panel/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ obj-$(CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521) += panel-sony-tulip-truly-nt355
9494
obj-$(CONFIG_DRM_PANEL_STARTEK_KD070FHFID015) += panel-startek-kd070fhfid015.o
9595
obj-$(CONFIG_DRM_PANEL_TDO_TL070WSH30) += panel-tdo-tl070wsh30.o
9696
obj-$(CONFIG_DRM_PANEL_TPO_Y17P) += panel-tdo-y17p.o
97+
obj-$(CONFIG_DRM_PANEL_TDO_DSI_V1) += panel-tdo-dsi-v1.o
9798
obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o
9899
obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o
99100
obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o

0 commit comments

Comments
 (0)