tdo_panel: bcm2712-gpu: Add dsi panel driver;#7316
tdo_panel: bcm2712-gpu: Add dsi panel driver;#7316flash-fea wants to merge 1 commit intoraspberrypi:rpi-6.12.yfrom
Conversation
flash-fea
commented
Apr 15, 2026
ccab473 to
8cb9447
Compare
- 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>
|
I should tell you that this PR will never get merged as it stands because it targets rpi-6.12.y, which is now frozen except for bug fixes. rpi-6.18.y will be the source of the next released kernel, and PRs adding new features should be submitted against it. |
|
You'll need to rebase/cherry-pick your changes onto a local 6.18 branch, then force push it to GitHub and change the base branch by editing the PR (click the pencil icon labelled "Edit title"). |
|
OK,thanks,rpi-6.18.y can use module 4B? |
|
Here are some other things that I think will need to be changed before we consider merging this:
I don't understand your question - please ask it another way. |
6by9
left a comment
There was a problem hiding this comment.
Sorry I had this under review before you'd moved it to 6.18.
Seeing as your email address is at shtdo.com, are you actually representing TDO as the manufacturer, and is this a product that you are launching for the Pi?
Ideally the driver should be upstreamed to the mainline Linux kernel via the dri-devel mailing list, but for products specifically targeting the Pi (such as Waveshare's panels) we have accepted panel drivers here (eg panel-waveshare-dsi and panel-waveshare-dsi-v2).
The V1 Waveshare panels have generally used chips such as ChipOne ICN6211 DSI to parallel bridges with a microcontroller on the board to configure it. That means the driver is very simple but also bespoke to them rather than the panel manufacturer.
Their V2 panels are native DSI, and hence have configuration sequences. It would be nice to identify the actual panel in those cases, but it's not worth us making the fuss. If upstreamed then the questions would be asked again.
| Info: Enable the Tdo DSI screen,keep adding. | ||
| Requires vc4-kms-v3d to be loaded. | ||
| Load: dtoverlay=vc4-kms-dsi-tdo-panel,<param>=<val> | ||
| Params: tl034wvs03 4.0" 480x480 2lane |
There was a problem hiding this comment.
| @@ -0,0 +1,69 @@ | |||
| /* | |||
| * Device Tree overlay for Waveshare DSI Touchscreens | |||
There was a problem hiding this comment.
I'm confused as to whether this is a Waveshare product using the TDO display, or TDO submitting this.
| compatible = "tdo,4.0-dsi-tl040wvs17"; | ||
| status = "okay"; | ||
| reg = <0>; | ||
| reset-gpios = <&gpio 47 1>; // Dummy GPIO , Unused or change |
There was a problem hiding this comment.
The driver uses devm_gpiod_get_optional, so there's no need for a reset-gpio at all.
| TDO Y17P controller. | ||
|
|
||
| config DRM_PANEL_TDO_DSI_V1 | ||
| tristate "TDO touchscreen panels V1" |
There was a problem hiding this comment.
What does a V1 display mean in this terminology? Is there a better family name for these panels?
| @@ -0,0 +1,491 @@ | |||
| // SPDX-License-Identifier: GPL-2.0 | |||
| /* | |||
| * Copyright (C) 2024 Waveshare International Limited | |||
| struct drm_display_mode *mode; | ||
|
|
||
| mode = drm_mode_duplicate(connector->dev, ctx->desc->mode); | ||
| dev_err(&ctx->dsi->dev, "%ux,%ux,%ux\n", ctx->desc->mode->hdisplay, |
| struct tdo_panel *ctx; | ||
| int ret; | ||
|
|
||
| dev_err(&dsi->dev, "dsi panel: %s\n", |
| struct tdo_panel *ctx = mipi_dsi_get_drvdata(dsi); | ||
|
|
||
| if (ctx->reset) { | ||
| dev_info(&dsi->dev, "shutdown\n"); |
| .mode_flags = MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO | | ||
| MIPI_DSI_MODE_LPM | MIPI_DSI_CLOCK_NON_CONTINUOUS, | ||
| .lanes = 2, | ||
| .format = MIPI_DSI_FMT_RGB888, |
There was a problem hiding this comment.
Realistically do you make any displays in this range that only support something other than RGB888? If not then hardcode dsi->format = MIPI_DSI_FMT_RGB888 at line 412, and remove this from the desc structure.
| static const struct of_device_id tdo_panel_of_match[] = { | ||
| { .compatible = "tdo,4.0-dsi-tl034wvs03", &tdo_panel_tl034wvs03_desc }, | ||
| { .compatible = "tdo,4.0-dsi-tl040wvs17", &tdo_panel_tl040wvs17_desc }, | ||
| { .compatible = "tdo,4.0-dsi-tl040hds31", &tdo_panel_tl040hds31_desc }, |
There was a problem hiding this comment.
All of these compatible strings should be documented in a dtbinding file. I would have expected just tdo,tl034wvs03 etc, as the part number infers that it is a DSI screen and the size.
(Again is tl034wvs03 actually 4.0" in size?)