dt-bindings: Add vendor prefix for Elida
Subsystems (5)
Heiko Stuebner
maintainerPATCH 1/3 dt-bindings: Add vendor prefix for Elida
From: Heiko Stuebner <heiko.stuebner-SN7IsUiht6C/[email protected]>
Shenzen Elida Technology Co. Ltd. is a Chinese TFT manufacturer.
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -285,6 +285,8 @@ patternProperties: description: Elan Microelectronic Corp. "^elgin,.*": description: Elgin S/A. + "^elida,.*": + description: Shenzhen Elida Technology Co., Ltd. "^embest,.*": description: Shenzhen Embest Technology Co., Ltd. "^emlid,.*":
Signature · 1 line
2.24.1
Heiko Stuebner
maintainerPATCH 2/3 dt-bindings: display: panel: Add binding document for Elida KD35T133
From: Heiko Stuebner <heiko.stuebner-SN7IsUiht6C/[email protected]>
The KD35T133 is a 3.5" 320x480 DSI display used in the RK3326-based Odroid Go Advance handheld device.
--- .../display/panel/elida,kd35t133.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/elida,kd35t133.yaml
Documentation/devicetree/bindings/display/panel/elida,kd35t133.yaml new file +49 -0
@@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/elida,kd35t133.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Elida KD35T133 3.5in 320x480 DSI panel + +maintainers: + - Heiko Stuebner <heiko.stuebner-SN7IsUiht6C/[email protected]> + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: elida,kd35t133 + reg: true + backlight: true + reset-gpios: true + iovcc-supply: + description: regulator that supplies the iovcc voltage + vdd-supply: + description: regulator that supplies the vdd voltage + +required: + - compatible + - reg + - backlight + - iovcc-supply + - vdd-supply + +additionalProperties: false + +examples: + - | + dsi@ff450000 { + #address-cells = <1>; + #size-cells = <0>; + panel@0 { + compatible = "elida,kd35t133"; + reg = <0>; + backlight = <&backlight>; + iovcc-supply = <&vcc_1v8>; + vdd-supply = <&vcc3v3_lcd>; + }; + }; + +...
Signature · 1 line
2.24.1
Heiko Stuebner
maintainerPATCH 3/3 drm/panel: add panel driver for Elida KD35T133 panels
In reply to Heiko StuebnerFrom: Heiko Stuebner <heiko.stuebner-SN7IsUiht6C/[email protected]>
Panel driver for the KD35T133 display from Elida, used for example in the rk3326-based Odroid Go Advance handheld.
--- drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-elida-kd35t133.c | 352 +++++++++++++++++++ 3 files changed, 363 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-elida-kd35t133.c
drivers/gpu/drm/panel/Kconfig +10 -0
@@ -50,6 +50,16 @@ config DRM_PANEL_SIMPLE that it can be automatically turned off when the panel goes into a low power state. +config DRM_PANEL_ELIDA_KD35T133 + tristate "Elida KD35T133 panel driver" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for the Elida + KD35T133 controller for 320x480 LCD panels with MIPI-DSI + system interfaces. + config DRM_PANEL_FEIYANG_FY07024DI26A30D tristate "Feiyang FY07024DI26A30-D MIPI-DSI LCD panel" depends on OF
drivers/gpu/drm/panel/Makefile +1 -0
@@ -3,6 +3,7 @@ obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o obj-$(CONFIG_DRM_PANEL_BOE_HIMAX8279D) += panel-boe-himax8279d.o obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o +obj-$(CONFIG_DRM_PANEL_ELIDA_KD35T133) += panel-elida-kd35t133.o obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o
drivers/gpu/drm/panel/panel-elida-kd35t133.c new file +352 -0
352 lines not on this page · raw message
Signature · 1 line
2.24.1
Re: [PATCH 3/3] drm/panel: add panel driver for Elida KD35T133 panels
On 23/02/2020 3:07 pm, Heiko Stuebner wrote:
[...]
drivers/gpu/drm/panel/panel-elida-kd35t133.c line 57
Quoted 4 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c new file +4
-0+#define dsi_generic_write_seq(dsi, cmd, seq...) do { \ + static const u8 d[] = { seq }; \ + int ret; \ + ret = mipi_dsi_dcs_write(dsi, cmd, d, ARRAY_SIZE(d)); \
Nit: in the rocktech driver, dsi_generic_write_seq() is wrapping mipi_dsi_generic_write() which seems logically self-consistent. Therefore shouldn't this wrapper be called something like dsi_dcs_write_seq()? I have no idea what any of this actually means, but the dissonance is enough to make my reviewer-sense tingle ;)
Robin.
Quoted 3 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c new file +3
-0+if (ret <0 ) \ +return ret; \ + }while (0 )
Re: [PATCH 3/3] drm/panel: add panel driver for Elida KD35T133 panels
In reply to Heiko StuebnerQuoted 8 lines · Heiko Stuebner
drivers/gpu/drm/panel/panel-elida-kd35t133.c new file +8
-0+static int kd35t133_unprepare (struct drm_panel *panel) +{ +struct kd35t133 *ctx =panel_to_kd35t133 (panel); +struct mipi_dsi_device *dsi =to_mipi_dsi_device (ctx->dev); +int ret; + +if (!ctx->prepared) +return 0 ;
drivers/gpu/drm/panel/panel-elida-kd35t133.c line 113
Quoted 10 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c new file +10
-0+ + ret =mipi_dsi_dcs_set_display_off (dsi); +if (ret <0 ) +DRM_DEV_ERROR (ctx->dev,"failed to set display off: %d\n" , + ret); + +mipi_dsi_dcs_enter_sleep_mode (dsi); +if (ret <0 ) { +DRM_DEV_ERROR (ctx->dev,"failed to enter sleep mode: %d\n" , + ret);
It looks like you forgot to assign the return value from mipi_dsi_dcs_enter_sleep_mode() to ret.
Quoted 10 lines
drivers/gpu/drm/panel/panel-elida-kd35t133.c new file +10
-0+return ret; + } + +regulator_disable (ctx->iovcc); +regulator_disable (ctx->vdd); + + ctx->prepared = false; + +return 0 ; +}