Skip to content

Commit ccab473

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 ccab473

7 files changed

Lines changed: 588 additions & 0 deletions

File tree

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
346346
vc4-kms-dsi-waveshare-800x480.dtbo \
347347
vc4-kms-dsi-waveshare-panel.dtbo \
348348
vc4-kms-dsi-waveshare-panel-v2.dtbo \
349+
vc4-kms-dsi-tdo-panel.dtbo \
349350
vc4-kms-kippah-7inch.dtbo \
350351
vc4-kms-v3d.dtbo \
351352
vc4-kms-v3d-pi4.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5948,6 +5948,17 @@ Params: 3_4_inch_c 3.4" 800x800 2lane
59485948
the default DSI1 and i2c_csi_dsi).
59495949

59505950

5951+
Name: vc4-kms-dsi-tdo-panel
5952+
Info: Enable the Tdo DSI screen,keep adding.
5953+
Requires vc4-kms-v3d to be loaded.
5954+
Load: dtoverlay=vc4-kms-dsi-tdo-panel,<param>
5955+
Params: tl034wvs03 4.0" 480x480 2lane
5956+
tl040wvs17 4.0" 480x480 2lane
5957+
tl040hds31 4.0" 720x720 2lane
5958+
dsi0 Use DSI0 and i2c_csi_dsi0 (rather than
5959+
the default DSI1 and i2c_csi_dsi).
5960+
5961+
59515962
Name: vc4-kms-kippah-7inch
59525963
Info: This overlay is now deprecated - see vc4-kms-dpi-panel,kippah-7inch
59535964
Load: <Deprecated>
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)