dt-bindings: backlight: add VIEWE 7KF82 I2C backlight
Subsystems (9)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v5 1/6 dt-bindings: display: add VIEWE 7KF82 JD9365TX panel
Add the device tree binding for the VIEWE 7KF82 720x1280 Jadard JD9365TX MIPI-DSI panel, and register the viewe vendor prefix.
--- .../bindings/display/panel/viewe,7kf82.yaml | 67 +++++++++++++++++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + 2 files changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/viewe,7kf82.yaml
Documentation/devicetree/bindings/display/panel/viewe,7kf82.yaml new file +67 -0
@@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/viewe,7kf82.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: VIEWE 7.0" 720x1280 Jadard JD9365TX MIPI-DSI in-cell panel + +maintainers: + - Hefei <[email protected]> + +description: | + The VIEWE 7KF82 module is a 720x1280 RGB888 video-mode MIPI-DSI panel + based on Jadard JD9365TX. It uses two DSI data lanes and exposes in-cell + touch over I2C on the same FPC. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: viewe,7kf82 + + reg: + maxItems: 1 + + vdd-supply: + description: Panel VDD supply, usually 3.3V + + iovcc-supply: + description: Panel IO voltage supply, usually 3.3V + + reset-gpios: true + backlight: true + rotation: true + port: true + +required: + - compatible + - reg + - vdd-supply + - iovcc-supply + - port + +additionalProperties: false + +examples: + - | + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "viewe,7kf82"; + reg = <0>; + vdd-supply = <®_vdd>; + iovcc-supply = <®_iovcc>; + backlight = <&viewe_bl>; + + port { + endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; + }; +...
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -1739,6 +1739,8 @@ patternProperties: description: Vicor Corporation "^videostrong,.*": description: Videostrong Technology Co., Ltd. + "^viewe,.*": + description: VIEWE Technology Co., Ltd. "^virtio,.*": description: Virtual I/O Device Specification, developed by the OASIS consortium "^virtual,.*":
Signature · 1 line
2.55.0.windows.5
PATCH v5 2/6 dt-bindings: input: add Jadard JD9365TX touchscreen
In reply to a message not in the archiveDocument the in-cell I2C touch companion used on JD9365TX modules. Many FPCs omit the interrupt line; boards may still wire one.
--- .../input/touchscreen/jadard,jd9365tx.yaml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/jadard,jd9365tx.yaml
Documentation/devicetree/bindings/input/touchscreen/jadard,jd9365tx.yaml new file +63 -0
@@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/touchscreen/jadard,jd9365tx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Jadard JD9365TX in-cell touchscreen + +maintainers: + - Hefei <[email protected]> + +description: | + In-cell touch integrated with Jadard JD9365TX DSI panels. Many module FPCs + expose only the I2C bus; some boards also wire an interrupt GPIO. The + touch controller is commonly powered from the same rails as the panel. + +allOf: + - $ref: touchscreen.yaml# + +properties: + compatible: + const: jadard,jd9365tx + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + poll-interval: true + + vdd-supply: + description: Analog / touch power supply + + iovcc-supply: + description: Digital I/O power supply + + reset-gpios: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + touchscreen@68 { + compatible = "jadard,jd9365tx"; + reg = <0x68>; + vdd-supply = <®_vdd>; + iovcc-supply = <®_iovcc>; + touchscreen-size-x = <720>; + touchscreen-size-y = <1280>; + poll-interval = <16>; + }; + }; +...
Signature · 1 line
2.55.0.windows.5
PATCH v5 3/6 dt-bindings: backlight: add VIEWE 7KF82 I2C backlight
In reply to a message not in the archiveDocument the I2C backlight MCU on the VIEWE 7KF82 module (address 0x45, register 0x86, brightness 0..255).
--- .../leds/backlight/viewe,7kf82-backlight.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/viewe,7kf82-backlight.yaml
Documentation/devicetree/bindings/leds/backlight/viewe,7kf82-backlight.yaml new file +46 -0
@@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/backlight/viewe,7kf82-backlight.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: VIEWE 7KF82 I2C panel backlight + +maintainers: + - Hefei <[email protected]> + +description: | + I2C backlight MCU used on the VIEWE 7KF82 DSI module. Protocol is device + address 0x45, register 0x86, brightness 0..255. A discrete MCU part number + is not exposed on the FPC silk; the binding is therefore keyed to the + module. + +allOf: + - $ref: common.yaml# + +properties: + compatible: + const: viewe,7kf82-backlight + + reg: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + backlight@45 { + compatible = "viewe,7kf82-backlight"; + reg = <0x45>; + default-brightness = <200>; + }; + }; +...
Signature · 1 line
2.55.0.windows.5
PATCH v5 4/6 drm/panel: add VIEWE JD9365TX 7 inch DSI panel
In reply to a message not in the archiveAdd a DRM panel driver for the VIEWE 7KF82 720x1280 Jadard JD9365TX 2-lane MIPI-DSI module. The TX command set differs from JD9365DA (page select 0xDE, unlock 0xDF, lane config 0xCC).
--- drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-viewe-jd9365tx.c | 340 +++++++++++++++++++ 3 files changed, 352 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-viewe-jd9365tx.c
drivers/gpu/drm/panel/Kconfig +11 -0
@@ -1141,6 +1141,17 @@ config DRM_PANEL_TRULY_NT35597_WQXGA Say Y here if you want to enable support for Truly NT35597 WQXGA Dual DSI Video Mode panel +config DRM_PANEL_VIEWE_JD9365TX + tristate "VIEWE 7\" JD9365TX DSI panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here to enable the VIEWE 7" 720x1280 Jadard JD9365TX + MIPI-DSI panel. + + If unsure, say N. + config DRM_PANEL_VISIONOX_G2647FB105 tristate "Visionox G2647FB105" depends on OF
drivers/gpu/drm/panel/Makefile +1 -0
@@ -113,6 +113,7 @@ obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o +obj-$(CONFIG_DRM_PANEL_VIEWE_JD9365TX) += panel-viewe-jd9365tx.o obj-$(CONFIG_DRM_PANEL_VISIONOX_G2647FB105) += panel-visionox-g2647fb105.o obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o obj-$(CONFIG_DRM_PANEL_VISIONOX_RM692E5) += panel-visionox-rm692e5.o
drivers/gpu/drm/panel/panel-viewe-jd9365tx.c new file +340 -0
340 lines not on this page · raw message
Signature · 1 line
2.55.0.windows.5
[email protected]
AI reviewRe: [PATCH v5 4/6] drm/panel: add VIEWE JD9365TX 7 inch DSI panel
Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] drm/panel: build failure in jd9365tx_probe() from removed orientation API - [Low] drm/panel…
Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [High] drm/panel: build failure in jd9365tx_probe() from removed orientation API
- [Low] drm/panel: jd9365tx_send_cmds() duplicates mipi_dsi_dcs_write_seq_multi()
--
commit 42ee7a955bd94a5de5a014d27ef8d93f0daadee3
Author: Hefei <[email protected]>
drm/panel: add VIEWE JD9365TX 7 inch DSI panel
This commit adds a DRM panel driver for the VIEWE 7KF82 720x1280 Jadard JD9365TX 2-lane MIPI-DSI module.
Quoted 5 lines
drivers/gpu/drm/panel/panel-viewe-jd9365tx.c new file +0
-0
[ ... ]
Quoted 17 lines
drivers/gpu/drm/panel/panel-viewe-jd9365tx.c new file +17
-0+struct jd9365tx_cmd { +u8 len; +u8 data[64 ]; +u16 delay_ms; +}; + +#define JD_CMD (...) { \ + .len = sizeof((u8[]){ __VA_ARGS__ }), \ + .data = { __VA_ARGS__ }, \ + .delay_ms = 0, \ +} + +#define JD_CMD_DELAY (ms, ...) { \ + .len = sizeof((u8[]){ __VA_ARGS__ }), \ + .data = { __VA_ARGS__ }, \ + .delay_ms = (ms), \ +}
[ ... ]
Quoted 14 lines
drivers/gpu/drm/panel/panel-viewe-jd9365tx.c new file +14
-0+static int jd9365tx_send_cmds (struct mipi_dsi_device *dsi, +const struct jd9365tx_cmd *cmds, +unsigned int count) +{ +unsigned int i; +int ret; + +for (i =0 ; i < count; i++) { +const struct jd9365tx_cmd *cmd = &cmds[i]; + +if (cmd->len) { + ret =mipi_dsi_dcs_write_buffer (dsi, cmd->data, cmd->len); +if (ret <0 ) { + dev_err(&dsi->dev,
drivers/gpu/drm/panel/panel-viewe-jd9365tx.c line 138
Quoted 10 lines
drivers/gpu/drm/panel/panel-viewe-jd9365tx.c new file +10
-0+"DCS write 0x%02x failed: %d\n" , + cmd->data[0], ret); +return ret; + } + } +if (cmd->delay_ms) +msleep (cmd->delay_ms); + } +return 0 ; +}
[Severity: Low]
This isn't a bug, but could jd9365tx_prepare() use mipi_dsi_dcs_write_seq_multi() and mipi_dsi_msleep() directly on dsi_ctx instead of defining struct jd9365tx_cmd, JD_CMD*(), and jd9365tx_send_cmds()? That would avoid duplicating the DCS sequence helper and padding every command entry to 64 bytes.
[ ... ]
Quoted 2 lines
drivers/gpu/drm/panel/panel-viewe-jd9365tx.c new file +2
-0+static int jd9365tx_probe (struct mipi_dsi_device *dsi) +{
[ ... ]
drivers/gpu/drm/panel/panel-viewe-jd9365tx.c line 295
Quoted 3 lines
drivers/gpu/drm/panel/panel-viewe-jd9365tx.c new file +3
-0+ ret =of_drm_get_panel_orientation (dev->of_node, &ctx->orientation); +if (ret <0 ) +return dev_err_probe (dev, ret,"failed to get orientation\n" );
[Severity: High]
Does this fail to build when CONFIG_DRM_PANEL_VIEWE_JD9365TX is enabled? Commit b5a8b1f2a973 ("drm/panel: Use drm_of_get_panel_orientation()") removed of_drm_get_panel_orientation() in favor of drm_of_get_panel_orientation() in <drm/drm_of.h>.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
PATCH v5 5/6 Input: add Jadard JD9365TX in-cell touchscreen driver
In reply to a message not in the archiveAdd a polling I2C driver for the JD9365TX in-cell touch controller. Typical module FPCs expose I2C only, so the driver polls coordinate SRAM after opening the controller backdoor.
--- drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/jadard_jd9365tx.c | 352 ++++++++++++++++++++ 3 files changed, 365 insertions(+) create mode 100644 drivers/input/touchscreen/jadard_jd9365tx.c
drivers/input/touchscreen/Kconfig +12 -0
@@ -540,6 +540,18 @@ config TOUCHSCREEN_IPROC To compile this driver as a module, choose M here: the module will be called bcm_iproc_tsc. +config TOUCHSCREEN_JADARD_JD9365TX + tristate "Jadard JD9365TX in-cell touchscreen" + depends on I2C + help + Say Y here if you have a Jadard JD9365TX in-cell touchscreen. + The driver polls over I2C when no interrupt line is wired. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called jadard_jd9365tx. + config TOUCHSCREEN_S6SY761 tristate "Samsung S6SY761 Touchscreen driver" depends on I2C
drivers/input/touchscreen/Makefile +1 -0
@@ -59,6 +59,7 @@ obj-$(CONFIG_TOUCHSCREEN_IMAGIS) += imagis.o obj-$(CONFIG_TOUCHSCREEN_IMX6UL_TSC) += imx6ul_tsc.o obj-$(CONFIG_TOUCHSCREEN_INEXIO) += inexio.o obj-$(CONFIG_TOUCHSCREEN_IPROC) += bcm_iproc_tsc.o +obj-$(CONFIG_TOUCHSCREEN_JADARD_JD9365TX) += jadard_jd9365tx.o obj-$(CONFIG_TOUCHSCREEN_LPC32XX) += lpc32xx_ts.o obj-$(CONFIG_TOUCHSCREEN_MAX11801) += max11801_ts.o obj-$(CONFIG_TOUCHSCREEN_MXS_LRADC) += mxs-lradc-ts.o
drivers/input/touchscreen/jadard_jd9365tx.c new file +352 -0
352 lines not on this page · raw message
Signature · 1 line
2.55.0.windows.5
PATCH v5 6/6 backlight: add VIEWE 7KF82 I2C backlight driver
In reply to a message not in the archiveDrive the VIEWE 7KF82 backlight MCU over I2C (register 0x86). The MCU has no public discrete part number on the FPC silk.
--- drivers/video/backlight/Kconfig | 7 +++ drivers/video/backlight/Makefile | 1 + drivers/video/backlight/viewe_bl_i2c.c | 82 ++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 drivers/video/backlight/viewe_bl_i2c.c
drivers/video/backlight/Kconfig +7 -0
@@ -501,6 +501,13 @@ config BACKLIGHT_LED If you have a LCD backlight adjustable by LED class driver, say Y to enable this driver. +config BACKLIGHT_VIEWE_I2C + tristate "VIEWE I2C backlight" + depends on I2C + help + Backlight driver for VIEWE DSI panels. Brightness is written to + the panel MCU at I2C address 0x45, register 0x86. + endif # BACKLIGHT_CLASS_DEVICE endmenu
drivers/video/backlight/Makefile +1 -0
@@ -61,3 +61,4 @@ obj-$(CONFIG_BACKLIGHT_WM831X) += wm831x_bl.o obj-$(CONFIG_BACKLIGHT_ARCXCNN) += arcxcnn_bl.o obj-$(CONFIG_BACKLIGHT_RAVE_SP) += rave-sp-backlight.o obj-$(CONFIG_BACKLIGHT_LED) += led_bl.o +obj-$(CONFIG_BACKLIGHT_VIEWE_I2C) += viewe_bl_i2c.o
drivers/video/backlight/viewe_bl_i2c.c new file +82 -0
82 lines not on this page · raw message
Signature · 1 line
2.55.0.windows.5