Skip to content

tdo_panel: bcm2712-gpu: Add dsi panel driver;#7316

Closed
flash-fea wants to merge 1 commit intoraspberrypi:rpi-6.12.yfrom
flash-fea:rpi-6.12.y
Closed

tdo_panel: bcm2712-gpu: Add dsi panel driver;#7316
flash-fea wants to merge 1 commit intoraspberrypi:rpi-6.12.yfrom
flash-fea:rpi-6.12.y

Conversation

@flash-fea
Copy link
Copy Markdown

- Add vc4-kms-dsi-panel-overlay.dts for tdo panel compatiable all in use.
- Simplify add panel-tdo-dsi-v1.c as module to driver tdo panel.
- __overrides__ parameter can be add in config.txt for customers.

@flash-fea flash-fea force-pushed the rpi-6.12.y branch 2 times, most recently from ccab473 to 8cb9447 Compare April 15, 2026 09:15
    - 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>
@pelwell
Copy link
Copy Markdown
Contributor

pelwell commented Apr 15, 2026

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.

@pelwell pelwell changed the base branch from rpi-6.12.y to rpi-6.18.y April 15, 2026 09:42
@pelwell pelwell changed the base branch from rpi-6.18.y to rpi-6.12.y April 15, 2026 09:43
@pelwell
Copy link
Copy Markdown
Contributor

pelwell commented Apr 15, 2026

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").

@flash-fea
Copy link
Copy Markdown
Author

OK,thanks,rpi-6.18.y can use module 4B?

@pelwell
Copy link
Copy Markdown
Contributor

pelwell commented Apr 15, 2026

Here are some other things that I think will need to be changed before we consider merging this:

  1. Please also add CONFIG_DRM_PANEL_TDO_DSI_V1=m to the other 4 defconfig files - arch/arm/configs/bcmrpi_defconfig, arch/arm/configs/bcm2709_defconfig, arch/arm64/configs/bcm2711_rt_defconfig and arch/arm64/configs/bcm2712_defconfig.
  2. Please split the code into 3 commits:
  • one for the .c code, Kconfig and module Makefile changes,
  • one for the overlay, README and dts Makefile changes, and
  • one for the _defconfig changes.

rpi-6.18.y can use module 4B?

I don't understand your question - please ask it another way.

@flash-fea flash-fea closed this Apr 16, 2026
Copy link
Copy Markdown
Contributor

@6by9 6by9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,69 @@
/*
* Device Tree overlay for Waveshare DSI Touchscreens
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waveshare again.

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,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debugging line left in.

struct tdo_panel *ctx;
int ret;

dev_err(&dsi->dev, "dsi panel: %s\n",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug line.

struct tdo_panel *ctx = mipi_dsi_get_drvdata(dsi);

if (ctx->reset) {
dev_info(&dsi->dev, "shutdown\n");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug line

.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,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 },
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants