Add Visionox G2647FB105 panel support
Subsystems (4)
v2 cover Add Visionox G2647FB105 panel support
This patch series adds support for the Visionox G2647FB105 panel, used in:
- Xiaomi Mi Note 10 / CC9 Pro (sm7150-xiaomi-tucana)
- Xiaomi Mi Note 10 Lite (sm7150-xiaomi-toco)
Testing has been done by me on sm7150-xiaomi-tucana. According to the downstream DTS, this driver should be fully compatible with the sm7150-xiaomi-toco (unfortunately not tested) without requiring any modifications.
Changes in v2:
- Describe the power configuration in commit message (and fix the sentence style) in patch 1
- Add Krzysztof's Reviewed-by tag to patch 1
- Use a static const struct for supplies in patch 2
- Fix identations in patch 2
Link to v1: https://lore.kernel.org/all/[email protected]/
Alexander Baransky (2):
dt-bindings: display: panel: Add Visionox G2647FB105 drm/panel: Add Visionox G2647FB105 panel driver
.../display/panel/visionox,g2647fb105.yaml | 79 +++++ drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-visionox-g2647fb105.c | 282 ++++++++++++++++++ 4 files changed, 371 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/visionox,g2647fb105.yaml create mode 100644 drivers/gpu/drm/panel/panel-visionox-g2647fb105.c
Signature · 1 line
2.49.0
PATCH v2 1/2 dt-bindings: display: panel: Add Visionox G2647FB105
Add a DT binding for the Visionox G2647FB105, a 6.47 inch 1080x2340 MIPI-DSI CMD mode AMOLED panel used in:
- Xiaomi Mi Note 10 / CC9 Pro (sm7150-xiaomi-tucana)
- Xiaomi Mi Note 10 Lite (sm7150-xiaomi-toco)
Xiaomi likes to use different panels in various revisions of the same device. A factory panel even can be replaced with another model in a service center.
So, the power configuration of this panel is similar to
some Samsung AMOLED panels, e.g. samsung,ams639rq08, which can be found on other sm7150 Xiaomi devices. Even though Samsung panels weren't used in sm7150-xiaomi-tucana and toco, the described voltage rails exist (confirmed by schematics of the device).
--- .../display/panel/visionox,g2647fb105.yaml | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/visionox,g2647fb105.yaml
Documentation/devicetree/bindings/display/panel/visionox,g2647fb105.yaml new file +79 -0
@@ -0,0 +1,79 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/visionox,g2647fb105.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Visionox G2647FB105 6.47" 1080x2340 MIPI-DSI Panel + +maintainers: + - Alexander Baransky <[email protected]> + +description: + The Visionox G2647FB105 is a 6.47 inch 1080x2340 MIPI-DSI CMD mode OLED panel. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: visionox,g2647fb105 + + reg: + maxItems: 1 + + vdd3p3-supply: + description: 3.3V source voltage rail + + vddio-supply: + description: I/O source voltage rail + + vsn-supply: + description: Negative source voltage rail + + vsp-supply: + description: Positive source voltage rail + + reset-gpios: true + port: true + +required: + - compatible + - reg + - vdd3p3-supply + - vddio-supply + - vsn-supply + - vsp-supply + - reset-gpios + - port + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "visionox,g2647fb105"; + reg = <0>; + + vdd3p3-supply = <&vreg_l7c_3p0>; + vddio-supply = <&vreg_l13a_1p8>; + vsn-supply = <&vreg_ibb>; + vsp-supply = <&vreg_lab>; + + reset-gpios = <&pm6150l_gpios 9 GPIO_ACTIVE_LOW>; + + port { + panel_in: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + }; + }; + +...
Signature · 1 line
2.49.0
PATCH v2 2/2 drm/panel: Add Visionox G2647FB105 panel driver
In reply to Alexander BaranskyAdd the driver for Visionox G2647FB105 6.47" FHD Plus CMD mode AMOLED panel support found in:
- Xiaomi Mi Note 10 / CC9 Pro (sm7150-xiaomi-tucana)
- Xiaomi Mi Note 10 Lite (sm7150-xiaomi-toco)
--- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-visionox-g2647fb105.c | 282 ++++++++++++++++++ 3 files changed, 292 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-visionox-g2647fb105.c
drivers/gpu/drm/panel/Kconfig +9 -0
@@ -977,6 +977,15 @@ 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_VISIONOX_G2647FB105 + tristate "Visionox G2647FB105" + 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 Visionox + G2647FB105 (2340x1080@60Hz) AMOLED DSI cmd mode panel. + config DRM_PANEL_VISIONOX_R66451 tristate "Visionox R66451" depends on OF
drivers/gpu/drm/panel/Makefile +1 -0
@@ -99,6 +99,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_VISIONOX_G2647FB105) += panel-visionox-g2647fb105.o obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o obj-$(CONFIG_DRM_PANEL_VISIONOX_VTDR6130) += panel-visionox-vtdr6130.o obj-$(CONFIG_DRM_PANEL_VISIONOX_R66451) += panel-visionox-r66451.o
drivers/gpu/drm/panel/panel-visionox-g2647fb105.c new file +282 -0
282 lines not on this page · raw message
Signature · 1 line
2.49.0
Re: [PATCH v2 2/2] drm/panel: Add Visionox G2647FB105 panel driver
Quoted 23 lines · Alexander Baransky
Add the driver for Visionox G2647FB105 6.47" FHD Plus CMD mode AMOLED panel support found in:
- Xiaomi Mi Note 10 / CC9 Pro (sm7150-xiaomi-tucana)
- Xiaomi Mi Note 10 Lite (sm7150-xiaomi-toco)Signed-off-by Alexander Baransky <[email protected]>--- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-visionox-g2647fb105.c | 282 ++++++++++++++++++ 3 files changed, 292 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-visionox-g2647fb105.cdrivers/gpu/drm/panel/panel-visionox-g2647fb105.c new file +10
-0+ +static int visionox_g2647fb105_prepare (struct drm_panel *panel) +{ +struct visionox_g2647fb105 *ctx =to_visionox_g2647fb105 (panel); +struct device *dev = &ctx->dsi->dev; +int ret; + + ret =regulator_bulk_enable (ARRAY_SIZE (visionox_g2647fb105_supplies), ctx->supplies); +if (ret <0 ) { +dev_err (dev,"Failed to enable regulators: %d\n" , ret);
drivers/gpu/drm/panel/panel-visionox-g2647fb105.c line 109
Quoted 10 lines
drivers/gpu/drm/panel/panel-visionox-g2647fb105.c new file +10
-0+return ret; + } + +visionox_g2647fb105_reset (ctx); + + ret =visionox_g2647fb105_on (ctx); +if (ret <0 ) { +dev_err (dev,"Failed to initialize panel: %d\n" , ret); +gpiod_set_value_cansleep (ctx->reset_gpio,1 ); +regulator_bulk_disable (ARRAY_SIZE (visionox_g2647fb105_supplies), ctx->supplies);
Unfortunately, you can't disable the regulators here. panel bridge doesn't check for an error (and it can not further propagate an error), so if visionox_g2647fb105_on() fails, then there will be an extra call to regulator_bulk_disable() in visionox_g2647fb105_unprepare().
drivers/gpu/drm/panel/panel-visionox-g2647fb105.c line 115
Quoted 6 lines
drivers/gpu/drm/panel/panel-visionox-g2647fb105.c new file +6
-0+return ret; + } + +return 0 ; +} +
LGTM otherwise
Signature · 2 lines
With best wishes Dmitry