BOE TD4320 panel
Subsystems (4)
v2 cover BOE TD4320 panel
Add driver for BOE TD4320 DSI panel, used in Xiaomi Redmi Note 7 smartphones.
---
Changes in v2:
- Add supplies
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Barnabás Czémán (2):
dt-bindings: display: panel: Add BOE TD4320
drivers: gpu: drm: panel: Add BOE TD4320
.../bindings/display/panel/boe,td4320.yaml | 65 ++++++ drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-boe-td4320.c | 247 +++++++++++++++++++++ 4 files changed, 322 insertions(+)
---
base-commit: 393d0c54cae31317deaa9043320c5fd9454deabc
change-id: 20250426-lavender-panel-2f144429cc1b
Best regards,
Signature · 1 line
Barnabás Czémán <[email protected]>
PATCH v2 1/2 dt-bindings: display: panel: Add BOE TD4320
Document BOE TD4320 6.3" 2340x1080 panel
found in Xiaomi Redmi Note 7 smartphone.
--- .../bindings/display/panel/boe,td4320.yaml | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+)
Documentation/devicetree/bindings/display/panel/boe,td4320.yaml new file +65 -0
@@ -0,0 +1,65 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/boe,td4320.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: BOE TD4320 MIPI-DSI panels + +maintainers: + - Barnabas Czeman <[email protected]> + +description: + BOE TD4320 6.3" 1080x2340 panel found in Xiaomi Redmi Note 7 smartphone. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + items: + - const: boe,td4320 + + reg: + maxItems: 1 + + iovcc-supply: + description: I/O voltage rail + + vsn-supply: + description: Positive source voltage rail + + vsp-supply: + description: Negative source voltage rail + +required: + - compatible + - reg + - reset-gpios + - port + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "boe,td4320"; + reg = <0>; + backlight = <&backlight>; + reset-gpios = <&tlmm 45 GPIO_ACTIVE_LOW>; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; + }; + +...
Signature · 1 line
2.49.0
Re: [PATCH v2 1/2] dt-bindings: display: panel: Add BOE TD4320
Quoted 7 lines · Barnabás Czémán
Document BOE TD4320 6.3" 2340x1080 panel
found in Xiaomi Redmi Note 7 smartphone.Signed-off-by Barnabás Czémán <[email protected]>--- .../bindings/display/panel/boe,td4320.yaml | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+)
Best regards,
Krzysztof
PATCH v2 2/2 drivers: gpu: drm: panel: Add BOE TD4320
In reply to Barnabás CzémánAdd driver for BOE TD4320 DSI panel, used in Xiaomi Redmi Note 7 mobile phone.
--- drivers/gpu/drm/panel/Kconfig | 9 ++ drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-boe-td4320.c | 247 +++++++++++++++++++++++++++++++ 3 files changed, 257 insertions(+)
drivers/gpu/drm/panel/Kconfig +9 -0
@@ -67,6 +67,15 @@ config DRM_PANEL_BOE_HIMAX8279D 24 bit RGB per pixel. It provides a MIPI DSI interface to the host and has a built-in LED backlight. +config DRM_PANEL_BOE_TD4320 + tristate "BOE TD4320 DSI panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for BOE TD4320 1080x2340 + video mode panel found in Xiaomi Redmi Note 7 smartphones. + config DRM_PANEL_BOE_TH101MB31UIG002_28A tristate "Boe TH101MB31UIG002-28A panel" depends on OF
drivers/gpu/drm/panel/Makefile +1 -0
@@ -5,6 +5,7 @@ obj-$(CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596) += panel-asus-z00t-tm5p5-n35596. obj-$(CONFIG_DRM_PANEL_AUO_A030JTN01) += panel-auo-a030jtn01.o obj-$(CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0) += panel-boe-bf060y8m-aj0.o obj-$(CONFIG_DRM_PANEL_BOE_HIMAX8279D) += panel-boe-himax8279d.o +obj-$(CONFIG_DRM_PANEL_BOE_TD4320) += panel-boe-td4320.o obj-$(CONFIG_DRM_PANEL_BOE_TH101MB31UIG002_28A) += panel-boe-th101mb31ig002-28a.o obj-$(CONFIG_DRM_PANEL_BOE_TV101WUM_LL2) += panel-boe-tv101wum-ll2.o obj-$(CONFIG_DRM_PANEL_BOE_TV101WUM_NL6) += panel-boe-tv101wum-nl6.o
drivers/gpu/drm/panel/panel-boe-td4320.c new file +247 -0
247 lines not on this page · raw message
Signature · 1 line
2.49.0
Neil Armstrong
maintainerRe: [PATCH v2 2/2] drivers: gpu: drm: panel: Add BOE TD4320
Quoted 9 lines · Barnabás Czémán
Add driver for BOE TD4320 DSI panel, used in Xiaomi Redmi Note 7 mobile phone.
Signed-off-by Barnabás Czémán <[email protected]>--- drivers/gpu/drm/panel/Kconfig | 9 ++ drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-boe-td4320.c | 247 +++++++++++++++++++++++++++++++ 3 files changed, 257 insertions(+)
<snip>
drivers/gpu/drm/panel/panel-boe-td4320.c line 199
Quoted 11 lines
drivers/gpu/drm/panel/panel-boe-td4320.c new file +11
-0+ + ctx->dsi = dsi; +mipi_dsi_set_drvdata (dsi, ctx); + + dsi->lanes =4 ; + dsi->format =MIPI_DSI_FMT_RGB888 ; + dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST | +MIPI_DSI_CLOCK_NON_CONTINUOUS ; + +drm_panel_init (&ctx->panel, dev, &boe_td4320_panel_funcs, +DRM_MODE_CONNECTOR_DSI );
Please switch to devm_drm_panel_alloc()
Quoted 39 lines
drivers/gpu/drm/panel/panel-boe-td4320.c new file +38
-0+ ctx->panel.prepare_prev_first = true; + + ret =drm_panel_of_backlight (&ctx->panel); +if (ret) +return dev_err_probe (dev, ret,"Failed to get backlight\n" ); + +drm_panel_add (&ctx->panel); + + ret =mipi_dsi_attach (dsi); +if (ret <0 ) { +drm_panel_remove (&ctx->panel); +return dev_err_probe (dev, ret,"Failed to attach to DSI host\n" ); + } + +return 0 ; +} + +static void boe_td4320_remove (struct mipi_dsi_device *dsi) +{ +struct boe_td4320 *ctx =mipi_dsi_get_drvdata (dsi); +int ret; + + ret =mipi_dsi_detach (dsi); +if (ret <0 ) +dev_err (&dsi->dev,"Failed to detach from DSI host: %d\n" , ret); + +drm_panel_remove (&ctx->panel); +} + +static const struct of_device_id boe_td4320_of_match[] = { + { .compatible ="boe,td4320" }, + {/* sentinel */ } +}; +MODULE_DEVICE_TABLE (of, boe_td4320_of_match); + +static struct mipi_dsi_driver boe_td4320_driver = { + .probe = boe_td4320_probe, + .remove = boe_td4320_remove,
drivers/gpu/drm/panel/panel-boe-td4320.c line 247
Quoted 10 lines
drivers/gpu/drm/panel/panel-boe-td4320.c new file +10
-0+ .driver = { + .name = "panel-boe-td4320", + .of_match_table = boe_td4320_of_match, + }, +}; +module_mipi_dsi_driver (boe_td4320_driver); + +MODULE_AUTHOR ("Barnabas Czeman <[email protected]>" ); +MODULE_DESCRIPTION ("DRM driver for boe td4320 fhdplus video mode dsi panel" ); +MODULE_LICENSE ("GPL" );
Otherwise it looks fine.
Thanks,
Neil