summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/panel
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/panel')
-rw-r--r--drivers/gpu/drm/panel/Kconfig9
-rw-r--r--drivers/gpu/drm/panel/Makefile1
-rw-r--r--drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c2757
-rw-r--r--drivers/gpu/drm/panel/panel-edp.c68
-rw-r--r--drivers/gpu/drm/panel/panel-himax-hx83102.c706
-rw-r--r--drivers/gpu/drm/panel/panel-himax-hx8394.c3
-rw-r--r--drivers/gpu/drm/panel/panel-ilitek-ili9341.c7
-rw-r--r--drivers/gpu/drm/panel/panel-ilitek-ili9882t.c830
-rw-r--r--drivers/gpu/drm/panel/panel-innolux-p079zca.c332
-rw-r--r--drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c48
-rw-r--r--drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c28
-rw-r--r--drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c28
-rw-r--r--drivers/gpu/drm/panel/panel-lg-sw43408.c74
-rw-r--r--drivers/gpu/drm/panel/panel-novatek-nt36672a.c29
-rw-r--r--drivers/gpu/drm/panel/panel-novatek-nt36672e.c647
-rw-r--r--drivers/gpu/drm/panel/panel-raydium-rm692e5.c10
-rw-r--r--drivers/gpu/drm/panel/panel-samsung-atna33xc20.c36
-rw-r--r--drivers/gpu/drm/panel/panel-simple.c156
-rw-r--r--drivers/gpu/drm/panel/panel-sitronix-st7703.c35
-rw-r--r--drivers/gpu/drm/panel/panel-sony-acx565akm.c6
-rw-r--r--drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c28
21 files changed, 3060 insertions, 2778 deletions
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index 2ae0eb0638f3..bf4eadfe21cb 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -145,6 +145,15 @@ config DRM_PANEL_LVDS
handling of power supplies or control signals. It implements automatic
backlight handling if the panel is attached to a backlight controller.
+config DRM_PANEL_HIMAX_HX83102
+ tristate "Himax HX83102-based panels"
+ depends on OF
+ depends on DRM_MIPI_DSI
+ depends on BACKLIGHT_CLASS_DEVICE
+ help
+ Say Y if you want to enable support for panels based on the
+ Himax HX83102 controller.
+
config DRM_PANEL_HIMAX_HX83112A
tristate "Himax HX83112A-based DSI panel"
depends on OF
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
index f0203f6e02f4..051b75b3df7b 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_DRM_PANEL_EBBG_FT8719) += panel-ebbg-ft8719.o
obj-$(CONFIG_DRM_PANEL_ELIDA_KD35T133) += panel-elida-kd35t133.o
obj-$(CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02) += panel-feixin-k101-im2ba02.o
obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d.o
+obj-$(CONFIG_DRM_PANEL_HIMAX_HX83102) += panel-himax-hx83102.o
obj-$(CONFIG_DRM_PANEL_HIMAX_HX83112A) += panel-himax-hx83112a.o
obj-$(CONFIG_DRM_PANEL_HIMAX_HX8394) += panel-himax-hx8394.o
obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o
diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
index 0ffe8f8c01de..ce919a980875 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
@@ -17,6 +17,8 @@
#include <video/mipi_display.h>
+struct boe_panel;
+
struct panel_desc {
const struct drm_display_mode *modes;
unsigned int bpc;
@@ -32,7 +34,7 @@ struct panel_desc {
unsigned long mode_flags;
enum mipi_dsi_pixel_format format;
- const struct panel_init_cmd *init_cmds;
+ int (*init)(struct boe_panel *boe);
unsigned int lanes;
bool discharge_on_disable;
bool lp11_before_reset;
@@ -50,1409 +52,1351 @@ struct boe_panel {
struct regulator *avee;
struct regulator *avdd;
struct gpio_desc *enable_gpio;
-
- bool prepared;
};
-enum dsi_cmd_type {
- INIT_DCS_CMD,
- DELAY_CMD,
-};
+static int boe_tv110c9m_init(struct boe_panel *boe)
+{
+ struct mipi_dsi_multi_context ctx = { .dsi = boe->dsi };
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x05, 0xd9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x07, 0x78);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x08, 0x5a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0d, 0x63);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0e, 0x91);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0f, 0x73);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x95, 0xe6);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x96, 0xf0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x30, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6d, 0x66);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x75, 0xa2);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x77, 0x3b);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x00, 0x08, 0x00, 0x23, 0x00, 0x4d, 0x00, 0x6d,
+ 0x00, 0x89, 0x00, 0xa1, 0x00, 0xb6, 0x00, 0xc9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x00, 0xda, 0x01, 0x13, 0x01, 0x3c, 0x01, 0x7e,
+ 0x01, 0xab, 0x01, 0xf7, 0x02, 0x2f, 0x02, 0x31);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x02, 0x67, 0x02, 0xa6, 0x02, 0xd1, 0x03, 0x08,
+ 0x03, 0x2e, 0x03, 0x5b, 0x03, 0x6b, 0x03, 0x7b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x03, 0x8e, 0x03, 0xa2, 0x03, 0xb7, 0x03, 0xe7,
+ 0x03, 0xfd, 0x03, 0xff);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x00, 0x08, 0x00, 0x23, 0x00, 0x4d, 0x00, 0x6d,
+ 0x00, 0x89, 0x00, 0xa1, 0x00, 0xb6, 0x00, 0xc9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x00, 0xda, 0x01, 0x13, 0x01, 0x3c, 0x01, 0x7e,
+ 0x01, 0xab, 0x01, 0xf7, 0x02, 0x2f, 0x02, 0x31);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x02, 0x67, 0x02, 0xa6, 0x02, 0xd1, 0x03, 0x08,
+ 0x03, 0x2e, 0x03, 0x5b, 0x03, 0x6b, 0x03, 0x7b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x03, 0x8e, 0x03, 0xa2, 0x03, 0xb7, 0x03, 0xe7,
+ 0x03, 0xfd, 0x03, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x00, 0x08, 0x00, 0x23, 0x00, 0x4d, 0x00, 0x6d,
+ 0x00, 0x89, 0x00, 0xa1, 0x00, 0xb6, 0x00, 0xc9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0x00, 0xda, 0x01, 0x13, 0x01, 0x3c, 0x01, 0x7e,
+ 0x01, 0xab, 0x01, 0xf7, 0x02, 0x2f, 0x02, 0x31);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x02, 0x67, 0x02, 0xa6, 0x02, 0xd1, 0x03, 0x08,
+ 0x03, 0x2e, 0x03, 0x5b, 0x03, 0x6b, 0x03, 0x7b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0x03, 0x8e, 0x03, 0xa2, 0x03, 0xb7, 0x03, 0xe7,
+ 0x03, 0xfd, 0x03, 0xff);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x21);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x45, 0x00, 0x65,
+ 0x00, 0x81, 0x00, 0x99, 0x00, 0xae, 0x00, 0xc1);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x00, 0xd2, 0x01, 0x0b, 0x01, 0x34, 0x01, 0x76,
+ 0x01, 0xa3, 0x01, 0xef, 0x02, 0x27, 0x02, 0x29);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x02, 0x5f, 0x02, 0x9e, 0x02, 0xc9, 0x03, 0x00,
+ 0x03, 0x26, 0x03, 0x53, 0x03, 0x63, 0x03, 0x73);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x03, 0x86, 0x03, 0x9a, 0x03, 0xaf, 0x03, 0xdf,
+ 0x03, 0xf5, 0x03, 0xe0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x45, 0x00, 0x65,
+ 0x00, 0x81, 0x00, 0x99, 0x00, 0xae, 0x00, 0xc1);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x00, 0xd2, 0x01, 0x0b, 0x01, 0x34, 0x01, 0x76,
+ 0x01, 0xa3, 0x01, 0xef, 0x02, 0x27, 0x02, 0x29);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x02, 0x5f, 0x02, 0x9e, 0x02, 0xc9, 0x03, 0x00,
+ 0x03, 0x26, 0x03, 0x53, 0x03, 0x63, 0x03, 0x73);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x03, 0x86, 0x03, 0x9a, 0x03, 0xaf, 0x03, 0xdf,
+ 0x03, 0xf5, 0x03, 0xe0);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x45, 0x00, 0x65,
+ 0x00, 0x81, 0x00, 0x99, 0x00, 0xae, 0x00, 0xc1);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0x00, 0xd2, 0x01, 0x0b, 0x01, 0x34, 0x01, 0x76,
+ 0x01, 0xa3, 0x01, 0xef, 0x02, 0x27, 0x02, 0x29);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x02, 0x5f, 0x02, 0x9e, 0x02, 0xc9, 0x03, 0x00,
+ 0x03, 0x26, 0x03, 0x53, 0x03, 0x63, 0x03, 0x73);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0x03, 0x86, 0x03, 0x9a, 0x03, 0xaf, 0x03, 0xdf,
+ 0x03, 0xf5, 0x03, 0xe0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x24);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x01, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x02, 0x1c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x03, 0x1c);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x04, 0x1d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x05, 0x1d);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x06, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x07, 0x04);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x08, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x09, 0x0f);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0a, 0x0e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0b, 0x0e);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0c, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0d, 0x0d);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0e, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0f, 0x0c);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x10, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x11, 0x08);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x12, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x13, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x14, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x15, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x16, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x17, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x18, 0x1c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x19, 0x1c);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1a, 0x1d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1b, 0x1d);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1c, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1d, 0x04);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1e, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1f, 0x0f);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x20, 0x0e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x21, 0x0e);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x22, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x23, 0x0d);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x24, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x25, 0x0c);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x26, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x27, 0x08);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x28, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x29, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2a, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2b, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2d, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2f, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x30, 0x44);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x33, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x34, 0x32);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x37, 0x44);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x38, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x39, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3a, 0x5d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3b, 0x60);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3d, 0x42);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3f, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x43, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x47, 0x66);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4a, 0x5d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4b, 0x60);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4c, 0x91);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4d, 0x21);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4e, 0x43);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x51, 0x12);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x52, 0x34);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x55, 0x82, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x56, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x58, 0x21);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x59, 0x30);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5a, 0x60);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5b, 0x50);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5e, 0x00, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5f, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x65, 0x82);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7e, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7f, 0x3c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x82, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x97, 0xc0);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x05, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x05, 0x05, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x91, 0x44);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x92, 0xa9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x93, 0x1a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x94, 0x96);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd7, 0x55);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xda, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xde, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdb, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdc, 0xa9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdd, 0x22);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdf, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe0, 0xa9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe1, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe2, 0xa9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe3, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe4, 0xa9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe5, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe6, 0xa9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5c, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x8d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x8e, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x90);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x25);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x05, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x19, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1f, 0x60);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x20, 0x50);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x26, 0x60);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x27, 0x50);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x33, 0x60);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x34, 0x50);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3f, 0xe0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x40, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x44, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x45, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x48, 0x60);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x49, 0x50);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5b, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5c, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5e, 0xd0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x61, 0x60);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x62, 0x50);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xf1, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x2a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x64, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x67, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6a, 0x16);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x70, 0x30);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa2, 0xf3);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa3, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa4, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa5, 0xff);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd6, 0x08);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x26);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x00, 0xa1);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x02, 0x31);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x04, 0x28);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x06, 0x30);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0c, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0d, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0f, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x11, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x12, 0x50);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x13, 0x56);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x14, 0x57);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x15, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x16, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x17, 0xa0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x18, 0x86);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x19, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1a, 0x7f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1b, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1c, 0xbf);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x22, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x23, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2a, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2b, 0x7f);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1e, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1f, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x24, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x25, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2f, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x30, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x31, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x32, 0x7d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x39, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3a, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x20, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x33, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x34, 0x78);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x35, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x9e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x4e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa9, 0x49);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xaa, 0x4b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xab, 0x48);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xac, 0x43);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xad, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xae, 0x50);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xaf, 0x44);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x54);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x4e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x4d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x4c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x41);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x47);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x53);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x3e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x51);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0x3c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x3b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbc, 0x45);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbd, 0x55);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbe, 0x3d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbf, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x52);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x4a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0x39);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0x3a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0x42);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x27);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x56, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x58, 0x80);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x59, 0x75);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5a, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5b, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5c, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5e, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5f, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x60, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x61, 0x2e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x62, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x63, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x64, 0x43);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x65, 0x2d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x66, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x67, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x68, 0x44);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x78, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x2a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x22, 0x2f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x23, 0x08);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x24, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x25, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x26, 0xf8);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x27, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x28, 0x1a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x29, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2a, 0x1a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2b, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2d, 0x1a);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x23);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x00, 0x80);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x07, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0xe0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x14, 0x60);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x16, 0xc0);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0xf0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3a, 0x08);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x18, 0x40);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x35, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x51, 0x00, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x53, 0x24);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x55, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0x13);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3b, 0x03, 0x96, 0x1a, 0x04, 0x04);
+
+ mipi_dsi_msleep(&ctx, 100);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x11);
+
+ mipi_dsi_msleep(&ctx, 200);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x29);
+
+ mipi_dsi_msleep(&ctx, 100);
-struct panel_init_cmd {
- enum dsi_cmd_type type;
- size_t len;
- const char *data;
+ return 0;
};
-#define _INIT_DCS_CMD(...) { \
- .type = INIT_DCS_CMD, \
- .len = sizeof((char[]){__VA_ARGS__}), \
- .data = (char[]){__VA_ARGS__} }
-
-#define _INIT_DELAY_CMD(...) { \
- .type = DELAY_CMD,\
- .len = sizeof((char[]){__VA_ARGS__}), \
- .data = (char[]){__VA_ARGS__} }
-
-static const struct panel_init_cmd boe_tv110c9m_init_cmd[] = {
- _INIT_DCS_CMD(0xFF, 0x20),
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0x05, 0xD9),
- _INIT_DCS_CMD(0x07, 0x78),
- _INIT_DCS_CMD(0x08, 0x5A),
- _INIT_DCS_CMD(0x0D, 0x63),
- _INIT_DCS_CMD(0x0E, 0x91),
- _INIT_DCS_CMD(0x0F, 0x73),
- _INIT_DCS_CMD(0x95, 0xE6),
- _INIT_DCS_CMD(0x96, 0xF0),
- _INIT_DCS_CMD(0x30, 0x00),
- _INIT_DCS_CMD(0x6D, 0x66),
- _INIT_DCS_CMD(0x75, 0xA2),
- _INIT_DCS_CMD(0x77, 0x3B),
+static int inx_hj110iz_init(struct boe_panel *boe)
+{
+ struct mipi_dsi_multi_context ctx = { .dsi = boe->dsi };
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x05, 0xd1);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x06, 0xc0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x07, 0x87);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x08, 0x4b);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0d, 0x63);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0e, 0x91);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0f, 0x69);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x94, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x95, 0xf5);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x96, 0xf5);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x9d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x9e, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x69, 0x98);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x75, 0xa2);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x77, 0xb3);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x58, 0x43);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x24);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x91, 0x44);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x92, 0x4c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x94, 0x86);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x60, 0x96);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x61, 0xd0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x63, 0x70);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0xca);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x00, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x01, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x02, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x03, 0x29);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x04, 0x22);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x05, 0x22);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x06, 0x0b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x07, 0x1d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x08, 0x1c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x09, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0a, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0b, 0x09);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0c, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0d, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0e, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0f, 0x0e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x10, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x11, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x12, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x13, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x14, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x15, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x16, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x17, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x18, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x19, 0x29);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1a, 0x22);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1b, 0x22);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1c, 0x0b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1d, 0x1d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1e, 0x1c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1f, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x20, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x21, 0x09);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x22, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x23, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x24, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x25, 0x0e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x26, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x27, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x28, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x29, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2a, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2b, 0x03);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2f, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x30, 0x35);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x37, 0xa7);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x39, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3a, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3b, 0x32);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3d, 0x12);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3f, 0x33);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x40, 0x31);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x41, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x42, 0x42);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x47, 0x77);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x48, 0x77);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4a, 0x45);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4b, 0x45);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4c, 0x14);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4d, 0x21);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4e, 0x43);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4f, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x55, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x56, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x58, 0x21);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x59, 0x70);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5a, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5b, 0x32);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5c, 0x88);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5e, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5f, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7a, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7b, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7c, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7e, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7f, 0x3c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x80, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x81, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x82, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x97, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0x10);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd7, 0x55);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd8, 0x55);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd9, 0x23);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xda, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdc, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdd, 0x55);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xde, 0x27);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdf, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe0, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe1, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe2, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe3, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe4, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe5, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe6, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe7, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe8, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe9, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xea, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xeb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xee, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xef, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xf0, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x05, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x05, 0x05, 0x00, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x25);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x05, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xf1, 0x10);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1e, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1f, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x20, 0x32);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x25, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x26, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x27, 0x32);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3f, 0x80);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x40, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x43, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x44, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x45, 0x46);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x48, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x49, 0x32);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5b, 0x80);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5c, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5d, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5e, 0x32);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5f, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x60, 0x32);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x61, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x62, 0x32);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x68, 0x0c);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6c, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6e, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x78, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x79, 0xc5);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7a, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7b, 0xb0);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x26);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x00, 0xa1);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x02, 0x31);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0a, 0xf4);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x04, 0x50);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x06, 0x30);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0c, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0d, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0f, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x11, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x12, 0x50);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x13, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x14, 0x58);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x15, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x16, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x17, 0xa0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x18, 0x86);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x22, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x23, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x19, 0x0e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1a, 0x31);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1b, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1c, 0x29);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2a, 0x0e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2b, 0x31);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1e, 0x62);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1f, 0x62);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2f, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x30, 0x62);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x31, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x32, 0x7f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x33, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x34, 0x89);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x35, 0x67);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x39, 0x0b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3a, 0x62);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3b, 0x06);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x89);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x4e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa9, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xaa, 0x3e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xab, 0x3d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xac, 0x3c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xad, 0x3b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xae, 0x3a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xaf, 0x39);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x38);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x27);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd0, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd1, 0x54);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xde, 0x43);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdf, 0x02);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x18);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x56, 0x06);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x58, 0x80);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x59, 0x78);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5a, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5b, 0x18);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5c, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5d, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5e, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5f, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x60, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x61, 0x1c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x62, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x63, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x64, 0x44);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x65, 0x1b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x66, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x67, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x68, 0x44);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x98, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x9b, 0xbe);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xab, 0x14);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbc, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbd, 0x28);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x2a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x22, 0x2f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x23, 0x08);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x24, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x25, 0x62);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x26, 0xf8);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x27, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x28, 0x1a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x29, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2a, 0x1a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2b, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2d, 0x1a);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x64, 0x96);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x65, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x66, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x67, 0x96);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x68, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x69, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6a, 0x96);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6b, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6c, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x70, 0x92);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x71, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x72, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x79, 0x96);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7a, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x88, 0x96);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x89, 0x10);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa2, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa3, 0x30);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa4, 0xc0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa5, 0x03);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe8, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x97, 0x3c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x98, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x99, 0x95);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x9a, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x9b, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x9c, 0x0b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x9d, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x9e, 0x90);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x25);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x13, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x14, 0xd7);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdb, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdc, 0xd7);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x17, 0xcf);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x19, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1b, 0x5b);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x20);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x24, 0x00, 0x38,
+ 0x00, 0x4c, 0x00, 0x5e, 0x00, 0x6f, 0x00, 0x7e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x00, 0x8c, 0x00, 0xbe, 0x00, 0xe5, 0x01, 0x27,
+ 0x01, 0x58, 0x01, 0xa8, 0x01, 0xe8, 0x01, 0xea);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x02, 0x28, 0x02, 0x71, 0x02, 0x9e, 0x02, 0xda,
+ 0x03, 0x00, 0x03, 0x31, 0x03, 0x40, 0x03, 0x51);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x03, 0x62, 0x03, 0x75, 0x03, 0x89, 0x03, 0x9c,
+ 0x03, 0xaa, 0x03, 0xb2);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x27, 0x00, 0x3d,
+ 0x00, 0x52, 0x00, 0x64, 0x00, 0x75, 0x00, 0x84);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x00, 0x93, 0x00, 0xc5, 0x00, 0xec, 0x01, 0x2c,
+ 0x01, 0x5d, 0x01, 0xac, 0x01, 0xec, 0x01, 0xee);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x02, 0x2b, 0x02, 0x73, 0x02, 0xa0, 0x02, 0xdb,
+ 0x03, 0x01, 0x03, 0x31, 0x03, 0x41, 0x03, 0x51);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x03, 0x63, 0x03, 0x75, 0x03, 0x89, 0x03, 0x9c,
+ 0x03, 0xaa, 0x03, 0xb2);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x2a, 0x00, 0x40,
+ 0x00, 0x56, 0x00, 0x68, 0x00, 0x7a, 0x00, 0x89);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0x00, 0x98, 0x00, 0xc9, 0x00, 0xf1, 0x01, 0x30,
+ 0x01, 0x61, 0x01, 0xb0, 0x01, 0xef, 0x01, 0xf1);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x02, 0x2e, 0x02, 0x76, 0x02, 0xa3, 0x02, 0xdd,
+ 0x03, 0x02, 0x03, 0x32, 0x03, 0x42, 0x03, 0x53);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0x03, 0x66, 0x03, 0x75, 0x03, 0x89, 0x03, 0x9c,
+ 0x03, 0xaa, 0x03, 0xb2);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x21);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x24, 0x00, 0x38,
+ 0x00, 0x4c, 0x00, 0x5e, 0x00, 0x6f, 0x00, 0x7e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x00, 0x8c, 0x00, 0xbe, 0x00, 0xe5, 0x01, 0x27,
+ 0x01, 0x58, 0x01, 0xa8, 0x01, 0xe8, 0x01, 0xea);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x02, 0x28, 0x02, 0x71, 0x02, 0x9e, 0x02, 0xda,
+ 0x03, 0x00, 0x03, 0x31, 0x03, 0x40, 0x03, 0x51);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x03, 0x62, 0x03, 0x77, 0x03, 0x90, 0x03, 0xac,
+ 0x03, 0xca, 0x03, 0xda);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x27, 0x00, 0x3d,
+ 0x00, 0x52, 0x00, 0x64, 0x00, 0x75, 0x00, 0x84);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x00, 0x93, 0x00, 0xc5, 0x00, 0xec, 0x01, 0x2c,
+ 0x01, 0x5d, 0x01, 0xac, 0x01, 0xec, 0x01, 0xee);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x02, 0x2b, 0x02, 0x73, 0x02, 0xa0, 0x02, 0xdb,
+ 0x03, 0x01, 0x03, 0x31, 0x03, 0x41, 0x03, 0x51);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x03, 0x63, 0x03, 0x77, 0x03, 0x90, 0x03, 0xac,
+ 0x03, 0xca, 0x03, 0xda);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x2a, 0x00, 0x40,
+ 0x00, 0x56, 0x00, 0x68, 0x00, 0x7a, 0x00, 0x89);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0x00, 0x98, 0x00, 0xc9, 0x00, 0xf1, 0x01, 0x30,
+ 0x01, 0x61, 0x01, 0xb0, 0x01, 0xef, 0x01, 0xf1);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x02, 0x2e, 0x02, 0x76, 0x02, 0xa3, 0x02, 0xdd,
+ 0x03, 0x02, 0x03, 0x32, 0x03, 0x42, 0x03, 0x53);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0x03, 0x66, 0x03, 0x77, 0x03, 0x90, 0x03, 0xac,
+ 0x03, 0xca, 0x03, 0xda);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0xf0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3a, 0x08);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0x01);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x20);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x18, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x10);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xff, 0x10);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x35, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3b, 0x03, 0xae, 0x1a, 0x04, 0x04);
+
+ mipi_dsi_msleep(&ctx, 100);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x11);
+
+ mipi_dsi_msleep(&ctx, 200);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x29);
+
+ mipi_dsi_msleep(&ctx, 100);
- _INIT_DCS_CMD(0xB0, 0x00, 0x08, 0x00, 0x23, 0x00, 0x4D, 0x00, 0x6D, 0x00, 0x89, 0x00, 0xA1, 0x00, 0xB6, 0x00, 0xC9),
- _INIT_DCS_CMD(0xB1, 0x00, 0xDA, 0x01, 0x13, 0x01, 0x3C, 0x01, 0x7E, 0x01, 0xAB, 0x01, 0xF7, 0x02, 0x2F, 0x02, 0x31),
- _INIT_DCS_CMD(0xB2, 0x02, 0x67, 0x02, 0xA6, 0x02, 0xD1, 0x03, 0x08, 0x03, 0x2E, 0x03, 0x5B, 0x03, 0x6B, 0x03, 0x7B),
- _INIT_DCS_CMD(0xB3, 0x03, 0x8E, 0x03, 0xA2, 0x03, 0xB7, 0x03, 0xE7, 0x03, 0xFD, 0x03, 0xFF),
-
- _INIT_DCS_CMD(0xB4, 0x00, 0x08, 0x00, 0x23, 0x00, 0x4D, 0x00, 0x6D, 0x00, 0x89, 0x00, 0xA1, 0x00, 0xB6, 0x00, 0xC9),
- _INIT_DCS_CMD(0xB5, 0x00, 0xDA, 0x01, 0x13, 0x01, 0x3C, 0x01, 0x7E, 0x01, 0xAB, 0x01, 0xF7, 0x02, 0x2F, 0x02, 0x31),
- _INIT_DCS_CMD(0xB6, 0x02, 0x67, 0x02, 0xA6, 0x02, 0xD1, 0x03, 0x08, 0x03, 0x2E, 0x03, 0x5B, 0x03, 0x6B, 0x03, 0x7B),
- _INIT_DCS_CMD(0xB7, 0x03, 0x8E, 0x03, 0xA2, 0x03, 0xB7, 0x03, 0xE7, 0x03, 0xFD, 0x03, 0xFF),
- _INIT_DCS_CMD(0xB8, 0x00, 0x08, 0x00, 0x23, 0x00, 0x4D, 0x00, 0x6D, 0x00, 0x89, 0x00, 0xA1, 0x00, 0xB6, 0x00, 0xC9),
- _INIT_DCS_CMD(0xB9, 0x00, 0xDA, 0x01, 0x13, 0x01, 0x3C, 0x01, 0x7E, 0x01, 0xAB, 0x01, 0xF7, 0x02, 0x2F, 0x02, 0x31),
- _INIT_DCS_CMD(0xBA, 0x02, 0x67, 0x02, 0xA6, 0x02, 0xD1, 0x03, 0x08, 0x03, 0x2E, 0x03, 0x5B, 0x03, 0x6B, 0x03, 0x7B),
- _INIT_DCS_CMD(0xBB, 0x03, 0x8E, 0x03, 0xA2, 0x03, 0xB7, 0x03, 0xE7, 0x03, 0xFD, 0x03, 0xFF),
-
- _INIT_DCS_CMD(0xFF, 0x21),
- _INIT_DCS_CMD(0xFB, 0x01),
-
- _INIT_DCS_CMD(0xB0, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x45, 0x00, 0x65, 0x00, 0x81, 0x00, 0x99, 0x00, 0xAE, 0x00, 0xC1),
- _INIT_DCS_CMD(0xB1, 0x00, 0xD2, 0x01, 0x0B, 0x01, 0x34, 0x01, 0x76, 0x01, 0xA3, 0x01, 0xEF, 0x02, 0x27, 0x02, 0x29),
- _INIT_DCS_CMD(0xB2, 0x02, 0x5F, 0x02, 0x9E, 0x02, 0xC9, 0x03, 0x00, 0x03, 0x26, 0x03, 0x53, 0x03, 0x63, 0x03, 0x73),
-
- _INIT_DCS_CMD(0xB3, 0x03, 0x86, 0x03, 0x9A, 0x03, 0xAF, 0x03, 0xDF, 0x03, 0xF5, 0x03, 0xE0),
- _INIT_DCS_CMD(0xB4, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x45, 0x00, 0x65, 0x00, 0x81, 0x00, 0x99, 0x00, 0xAE, 0x00, 0xC1),
- _INIT_DCS_CMD(0xB5, 0x00, 0xD2, 0x01, 0x0B, 0x01, 0x34, 0x01, 0x76, 0x01, 0xA3, 0x01, 0xEF, 0x02, 0x27, 0x02, 0x29),
- _INIT_DCS_CMD(0xB6, 0x02, 0x5F, 0x02, 0x9E, 0x02, 0xC9, 0x03, 0x00, 0x03, 0x26, 0x03, 0x53, 0x03, 0x63, 0x03, 0x73),
- _INIT_DCS_CMD(0xB7, 0x03, 0x86, 0x03, 0x9A, 0x03, 0xAF, 0x03, 0xDF, 0x03, 0xF5, 0x03, 0xE0),
-
- _INIT_DCS_CMD(0xB8, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x45, 0x00, 0x65, 0x00, 0x81, 0x00, 0x99, 0x00, 0xAE, 0x00, 0xC1),
- _INIT_DCS_CMD(0xB9, 0x00, 0xD2, 0x01, 0x0B, 0x01, 0x34, 0x01, 0x76, 0x01, 0xA3, 0x01, 0xEF, 0x02, 0x27, 0x02, 0x29),
- _INIT_DCS_CMD(0xBA, 0x02, 0x5F, 0x02, 0x9E, 0x02, 0xC9, 0x03, 0x00, 0x03, 0x26, 0x03, 0x53, 0x03, 0x63, 0x03, 0x73),
-
- _INIT_DCS_CMD(0xBB, 0x03, 0x86, 0x03, 0x9A, 0x03, 0xAF, 0x03, 0xDF, 0x03, 0xF5, 0x03, 0xE0),
- _INIT_DCS_CMD(0xFF, 0x24),
- _INIT_DCS_CMD(0xFB, 0x01),
-
- _INIT_DCS_CMD(0x00, 0x00),
- _INIT_DCS_CMD(0x01, 0x00),
-
- _INIT_DCS_CMD(0x02, 0x1C),
- _INIT_DCS_CMD(0x03, 0x1C),
-
- _INIT_DCS_CMD(0x04, 0x1D),
- _INIT_DCS_CMD(0x05, 0x1D),
-
- _INIT_DCS_CMD(0x06, 0x04),
- _INIT_DCS_CMD(0x07, 0x04),
-
- _INIT_DCS_CMD(0x08, 0x0F),
- _INIT_DCS_CMD(0x09, 0x0F),
-
- _INIT_DCS_CMD(0x0A, 0x0E),
- _INIT_DCS_CMD(0x0B, 0x0E),
-
- _INIT_DCS_CMD(0x0C, 0x0D),
- _INIT_DCS_CMD(0x0D, 0x0D),
-
- _INIT_DCS_CMD(0x0E, 0x0C),
- _INIT_DCS_CMD(0x0F, 0x0C),
-
- _INIT_DCS_CMD(0x10, 0x08),
- _INIT_DCS_CMD(0x11, 0x08),
-
- _INIT_DCS_CMD(0x12, 0x00),
- _INIT_DCS_CMD(0x13, 0x00),
- _INIT_DCS_CMD(0x14, 0x00),
- _INIT_DCS_CMD(0x15, 0x00),
-
- _INIT_DCS_CMD(0x16, 0x00),
- _INIT_DCS_CMD(0x17, 0x00),
-
- _INIT_DCS_CMD(0x18, 0x1C),
- _INIT_DCS_CMD(0x19, 0x1C),
-
- _INIT_DCS_CMD(0x1A, 0x1D),
- _INIT_DCS_CMD(0x1B, 0x1D),
-
- _INIT_DCS_CMD(0x1C, 0x04),
- _INIT_DCS_CMD(0x1D, 0x04),
-
- _INIT_DCS_CMD(0x1E, 0x0F),
- _INIT_DCS_CMD(0x1F, 0x0F),
-
- _INIT_DCS_CMD(0x20, 0x0E),
- _INIT_DCS_CMD(0x21, 0x0E),
-
- _INIT_DCS_CMD(0x22, 0x0D),
- _INIT_DCS_CMD(0x23, 0x0D),
-
- _INIT_DCS_CMD(0x24, 0x0C),
- _INIT_DCS_CMD(0x25, 0x0C),
-
- _INIT_DCS_CMD(0x26, 0x08),
- _INIT_DCS_CMD(0x27, 0x08),
-
- _INIT_DCS_CMD(0x28, 0x00),
- _INIT_DCS_CMD(0x29, 0x00),
- _INIT_DCS_CMD(0x2A, 0x00),
- _INIT_DCS_CMD(0x2B, 0x00),
-
- _INIT_DCS_CMD(0x2D, 0x20),
- _INIT_DCS_CMD(0x2F, 0x0A),
- _INIT_DCS_CMD(0x30, 0x44),
- _INIT_DCS_CMD(0x33, 0x0C),
- _INIT_DCS_CMD(0x34, 0x32),
-
- _INIT_DCS_CMD(0x37, 0x44),
- _INIT_DCS_CMD(0x38, 0x40),
- _INIT_DCS_CMD(0x39, 0x00),
- _INIT_DCS_CMD(0x3A, 0x5D),
- _INIT_DCS_CMD(0x3B, 0x60),
- _INIT_DCS_CMD(0x3D, 0x42),
- _INIT_DCS_CMD(0x3F, 0x06),
- _INIT_DCS_CMD(0x43, 0x06),
- _INIT_DCS_CMD(0x47, 0x66),
- _INIT_DCS_CMD(0x4A, 0x5D),
- _INIT_DCS_CMD(0x4B, 0x60),
- _INIT_DCS_CMD(0x4C, 0x91),
- _INIT_DCS_CMD(0x4D, 0x21),
- _INIT_DCS_CMD(0x4E, 0x43),
- _INIT_DCS_CMD(0x51, 0x12),
- _INIT_DCS_CMD(0x52, 0x34),
- _INIT_DCS_CMD(0x55, 0x82, 0x02),
- _INIT_DCS_CMD(0x56, 0x04),
- _INIT_DCS_CMD(0x58, 0x21),
- _INIT_DCS_CMD(0x59, 0x30),
- _INIT_DCS_CMD(0x5A, 0x60),
- _INIT_DCS_CMD(0x5B, 0x50),
- _INIT_DCS_CMD(0x5E, 0x00, 0x06),
- _INIT_DCS_CMD(0x5F, 0x00),
- _INIT_DCS_CMD(0x65, 0x82),
- _INIT_DCS_CMD(0x7E, 0x20),
- _INIT_DCS_CMD(0x7F, 0x3C),
- _INIT_DCS_CMD(0x82, 0x04),
- _INIT_DCS_CMD(0x97, 0xC0),
-
- _INIT_DCS_CMD(0xB6, 0x05, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0x00, 0x00),
- _INIT_DCS_CMD(0x91, 0x44),
- _INIT_DCS_CMD(0x92, 0xA9),
- _INIT_DCS_CMD(0x93, 0x1A),
- _INIT_DCS_CMD(0x94, 0x96),
- _INIT_DCS_CMD(0xD7, 0x55),
- _INIT_DCS_CMD(0xDA, 0x0A),
- _INIT_DCS_CMD(0xDE, 0x08),
- _INIT_DCS_CMD(0xDB, 0x05),
- _INIT_DCS_CMD(0xDC, 0xA9),
- _INIT_DCS_CMD(0xDD, 0x22),
-
- _INIT_DCS_CMD(0xDF, 0x05),
- _INIT_DCS_CMD(0xE0, 0xA9),
- _INIT_DCS_CMD(0xE1, 0x05),
- _INIT_DCS_CMD(0xE2, 0xA9),
- _INIT_DCS_CMD(0xE3, 0x05),
- _INIT_DCS_CMD(0xE4, 0xA9),
- _INIT_DCS_CMD(0xE5, 0x05),
- _INIT_DCS_CMD(0xE6, 0xA9),
- _INIT_DCS_CMD(0x5C, 0x00),
- _INIT_DCS_CMD(0x5D, 0x00),
- _INIT_DCS_CMD(0x8D, 0x00),
- _INIT_DCS_CMD(0x8E, 0x00),
- _INIT_DCS_CMD(0xB5, 0x90),
- _INIT_DCS_CMD(0xFF, 0x25),
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0x05, 0x00),
- _INIT_DCS_CMD(0x19, 0x07),
- _INIT_DCS_CMD(0x1F, 0x60),
- _INIT_DCS_CMD(0x20, 0x50),
- _INIT_DCS_CMD(0x26, 0x60),
- _INIT_DCS_CMD(0x27, 0x50),
- _INIT_DCS_CMD(0x33, 0x60),
- _INIT_DCS_CMD(0x34, 0x50),
- _INIT_DCS_CMD(0x3F, 0xE0),
- _INIT_DCS_CMD(0x40, 0x00),
- _INIT_DCS_CMD(0x44, 0x00),
- _INIT_DCS_CMD(0x45, 0x40),
- _INIT_DCS_CMD(0x48, 0x60),
- _INIT_DCS_CMD(0x49, 0x50),
- _INIT_DCS_CMD(0x5B, 0x00),
- _INIT_DCS_CMD(0x5C, 0x00),
- _INIT_DCS_CMD(0x5D, 0x00),
- _INIT_DCS_CMD(0x5E, 0xD0),
- _INIT_DCS_CMD(0x61, 0x60),
- _INIT_DCS_CMD(0x62, 0x50),
- _INIT_DCS_CMD(0xF1, 0x10),
- _INIT_DCS_CMD(0xFF, 0x2A),
- _INIT_DCS_CMD(0xFB, 0x01),
-
- _INIT_DCS_CMD(0x64, 0x16),
- _INIT_DCS_CMD(0x67, 0x16),
- _INIT_DCS_CMD(0x6A, 0x16),
-
- _INIT_DCS_CMD(0x70, 0x30),
-
- _INIT_DCS_CMD(0xA2, 0xF3),
- _INIT_DCS_CMD(0xA3, 0xFF),
- _INIT_DCS_CMD(0xA4, 0xFF),
- _INIT_DCS_CMD(0xA5, 0xFF),
-
- _INIT_DCS_CMD(0xD6, 0x08),
-
- _INIT_DCS_CMD(0xFF, 0x26),
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0x00, 0xA1),
-
- _INIT_DCS_CMD(0x02, 0x31),
- _INIT_DCS_CMD(0x04, 0x28),
- _INIT_DCS_CMD(0x06, 0x30),
- _INIT_DCS_CMD(0x0C, 0x16),
- _INIT_DCS_CMD(0x0D, 0x0D),
- _INIT_DCS_CMD(0x0F, 0x00),
- _INIT_DCS_CMD(0x11, 0x00),
- _INIT_DCS_CMD(0x12, 0x50),
- _INIT_DCS_CMD(0x13, 0x56),
- _INIT_DCS_CMD(0x14, 0x57),
- _INIT_DCS_CMD(0x15, 0x00),
- _INIT_DCS_CMD(0x16, 0x10),
- _INIT_DCS_CMD(0x17, 0xA0),
- _INIT_DCS_CMD(0x18, 0x86),
- _INIT_DCS_CMD(0x19, 0x0D),
- _INIT_DCS_CMD(0x1A, 0x7F),
- _INIT_DCS_CMD(0x1B, 0x0C),
- _INIT_DCS_CMD(0x1C, 0xBF),
- _INIT_DCS_CMD(0x22, 0x00),
- _INIT_DCS_CMD(0x23, 0x00),
- _INIT_DCS_CMD(0x2A, 0x0D),
- _INIT_DCS_CMD(0x2B, 0x7F),
-
- _INIT_DCS_CMD(0x1D, 0x00),
- _INIT_DCS_CMD(0x1E, 0x65),
- _INIT_DCS_CMD(0x1F, 0x65),
- _INIT_DCS_CMD(0x24, 0x00),
- _INIT_DCS_CMD(0x25, 0x65),
- _INIT_DCS_CMD(0x2F, 0x05),
- _INIT_DCS_CMD(0x30, 0x65),
- _INIT_DCS_CMD(0x31, 0x05),
- _INIT_DCS_CMD(0x32, 0x7D),
- _INIT_DCS_CMD(0x39, 0x00),
- _INIT_DCS_CMD(0x3A, 0x65),
- _INIT_DCS_CMD(0x20, 0x01),
- _INIT_DCS_CMD(0x33, 0x11),
- _INIT_DCS_CMD(0x34, 0x78),
- _INIT_DCS_CMD(0x35, 0x16),
- _INIT_DCS_CMD(0xC8, 0x04),
- _INIT_DCS_CMD(0xC9, 0x9E),
- _INIT_DCS_CMD(0xCA, 0x4E),
- _INIT_DCS_CMD(0xCB, 0x00),
-
- _INIT_DCS_CMD(0xA9, 0x49),
- _INIT_DCS_CMD(0xAA, 0x4B),
- _INIT_DCS_CMD(0xAB, 0x48),
- _INIT_DCS_CMD(0xAC, 0x43),
- _INIT_DCS_CMD(0xAD, 0x40),
- _INIT_DCS_CMD(0xAE, 0x50),
- _INIT_DCS_CMD(0xAF, 0x44),
- _INIT_DCS_CMD(0xB0, 0x54),
- _INIT_DCS_CMD(0xB1, 0x4E),
- _INIT_DCS_CMD(0xB2, 0x4D),
- _INIT_DCS_CMD(0xB3, 0x4C),
- _INIT_DCS_CMD(0xB4, 0x41),
- _INIT_DCS_CMD(0xB5, 0x47),
- _INIT_DCS_CMD(0xB6, 0x53),
- _INIT_DCS_CMD(0xB7, 0x3E),
- _INIT_DCS_CMD(0xB8, 0x51),
- _INIT_DCS_CMD(0xB9, 0x3C),
- _INIT_DCS_CMD(0xBA, 0x3B),
- _INIT_DCS_CMD(0xBB, 0x46),
- _INIT_DCS_CMD(0xBC, 0x45),
- _INIT_DCS_CMD(0xBD, 0x55),
- _INIT_DCS_CMD(0xBE, 0x3D),
- _INIT_DCS_CMD(0xBF, 0x3F),
- _INIT_DCS_CMD(0xC0, 0x52),
- _INIT_DCS_CMD(0xC1, 0x4A),
- _INIT_DCS_CMD(0xC2, 0x39),
- _INIT_DCS_CMD(0xC3, 0x4F),
- _INIT_DCS_CMD(0xC4, 0x3A),
- _INIT_DCS_CMD(0xC5, 0x42),
- _INIT_DCS_CMD(0xFF, 0x27),
- _INIT_DCS_CMD(0xFB, 0x01),
-
- _INIT_DCS_CMD(0x56, 0x06),
- _INIT_DCS_CMD(0x58, 0x80),
- _INIT_DCS_CMD(0x59, 0x75),
- _INIT_DCS_CMD(0x5A, 0x00),
- _INIT_DCS_CMD(0x5B, 0x02),
- _INIT_DCS_CMD(0x5C, 0x00),
- _INIT_DCS_CMD(0x5D, 0x00),
- _INIT_DCS_CMD(0x5E, 0x20),
- _INIT_DCS_CMD(0x5F, 0x10),
- _INIT_DCS_CMD(0x60, 0x00),
- _INIT_DCS_CMD(0x61, 0x2E),
- _INIT_DCS_CMD(0x62, 0x00),
- _INIT_DCS_CMD(0x63, 0x01),
- _INIT_DCS_CMD(0x64, 0x43),
- _INIT_DCS_CMD(0x65, 0x2D),
- _INIT_DCS_CMD(0x66, 0x00),
- _INIT_DCS_CMD(0x67, 0x01),
- _INIT_DCS_CMD(0x68, 0x44),
-
- _INIT_DCS_CMD(0x00, 0x00),
- _INIT_DCS_CMD(0x78, 0x00),
- _INIT_DCS_CMD(0xC3, 0x00),
-
- _INIT_DCS_CMD(0xFF, 0x2A),
- _INIT_DCS_CMD(0xFB, 0x01),
-
- _INIT_DCS_CMD(0x22, 0x2F),
- _INIT_DCS_CMD(0x23, 0x08),
-
- _INIT_DCS_CMD(0x24, 0x00),
- _INIT_DCS_CMD(0x25, 0x65),
- _INIT_DCS_CMD(0x26, 0xF8),
- _INIT_DCS_CMD(0x27, 0x00),
- _INIT_DCS_CMD(0x28, 0x1A),
- _INIT_DCS_CMD(0x29, 0x00),
- _INIT_DCS_CMD(0x2A, 0x1A),
- _INIT_DCS_CMD(0x2B, 0x00),
- _INIT_DCS_CMD(0x2D, 0x1A),
-
- _INIT_DCS_CMD(0xFF, 0x23),
- _INIT_DCS_CMD(0xFB, 0x01),
-
- _INIT_DCS_CMD(0x00, 0x80),
- _INIT_DCS_CMD(0x07, 0x00),
-
- _INIT_DCS_CMD(0xFF, 0xE0),
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0x14, 0x60),
- _INIT_DCS_CMD(0x16, 0xC0),
-
- _INIT_DCS_CMD(0xFF, 0xF0),
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0x3A, 0x08),
-
- _INIT_DCS_CMD(0xFF, 0x10),
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0xB9, 0x01),
- _INIT_DCS_CMD(0xFF, 0x20),
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0x18, 0x40),
-
- _INIT_DCS_CMD(0xFF, 0x10),
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0xB9, 0x02),
- _INIT_DCS_CMD(0x35, 0x00),
- _INIT_DCS_CMD(0x51, 0x00, 0xFF),
- _INIT_DCS_CMD(0x53, 0x24),
- _INIT_DCS_CMD(0x55, 0x00),
- _INIT_DCS_CMD(0xBB, 0x13),
- _INIT_DCS_CMD(0x3B, 0x03, 0x96, 0x1A, 0x04, 0x04),
- _INIT_DELAY_CMD(100),
- _INIT_DCS_CMD(0x11),
- _INIT_DELAY_CMD(200),
- _INIT_DCS_CMD(0x29),
- _INIT_DELAY_CMD(100),
- {},
+ return 0;
};
-static const struct panel_init_cmd inx_hj110iz_init_cmd[] = {
- _INIT_DCS_CMD(0xFF, 0x20),
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0x05, 0xD1),
- _INIT_DCS_CMD(0x06, 0xC0),
- _INIT_DCS_CMD(0x07, 0x87),
- _INIT_DCS_CMD(0x08, 0x4B),
-
- _INIT_DCS_CMD(0x0D, 0x63),
- _INIT_DCS_CMD(0x0E, 0x91),
- _INIT_DCS_CMD(0x0F, 0x69),
- _INIT_DCS_CMD(0x94, 0x00),
- _INIT_DCS_CMD(0x95, 0xF5),
- _INIT_DCS_CMD(0x96, 0xF5),
- _INIT_DCS_CMD(0x9D, 0x00),
- _INIT_DCS_CMD(0x9E, 0x00),
- _INIT_DCS_CMD(0x69, 0x98),
- _INIT_DCS_CMD(0x75, 0xA2),
- _INIT_DCS_CMD(0x77, 0xB3),
-
- _INIT_DCS_CMD(0x58, 0x43),
- _INIT_DCS_CMD(0xFF, 0x24),
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0x91, 0x44),
- _INIT_DCS_CMD(0x92, 0x4C),
- _INIT_DCS_CMD(0x94, 0x86),
- _INIT_DCS_CMD(0x60, 0x96),
- _INIT_DCS_CMD(0x61, 0xD0),
- _INIT_DCS_CMD(0x63, 0x70),
- _INIT_DCS_CMD(0xC2, 0xCA),
-
- _INIT_DCS_CMD(0x00, 0x03),
- _INIT_DCS_CMD(0x01, 0x03),
- _INIT_DCS_CMD(0x02, 0x03),
- _INIT_DCS_CMD(0x03, 0x29),
- _INIT_DCS_CMD(0x04, 0x22),
- _INIT_DCS_CMD(0x05, 0x22),
- _INIT_DCS_CMD(0x06, 0x0B),
- _INIT_DCS_CMD(0x07, 0x1D),
- _INIT_DCS_CMD(0x08, 0x1C),
- _INIT_DCS_CMD(0x09, 0x05),
- _INIT_DCS_CMD(0x0A, 0x08),
- _INIT_DCS_CMD(0x0B, 0x09),
- _INIT_DCS_CMD(0x0C, 0x0A),
- _INIT_DCS_CMD(0x0D, 0x0C),
- _INIT_DCS_CMD(0x0E, 0x0D),
- _INIT_DCS_CMD(0x0F, 0x0E),
- _INIT_DCS_CMD(0x10, 0x0F),
- _INIT_DCS_CMD(0x11, 0x10),
- _INIT_DCS_CMD(0x12, 0x11),
- _INIT_DCS_CMD(0x13, 0x04),
- _INIT_DCS_CMD(0x14, 0x00),
- _INIT_DCS_CMD(0x15, 0x03),
- _INIT_DCS_CMD(0x16, 0x03),
- _INIT_DCS_CMD(0x17, 0x03),
- _INIT_DCS_CMD(0x18, 0x03),
- _INIT_DCS_CMD(0x19, 0x29),
- _INIT_DCS_CMD(0x1A, 0x22),
- _INIT_DCS_CMD(0x1B, 0x22),
- _INIT_DCS_CMD(0x1C, 0x0B),
- _INIT_DCS_CMD(0x1D, 0x1D),
- _INIT_DCS_CMD(0x1E, 0x1C),
- _INIT_DCS_CMD(0x1F, 0x05),
- _INIT_DCS_CMD(0x20, 0x08),
- _INIT_DCS_CMD(0x21, 0x09),
- _INIT_DCS_CMD(0x22, 0x0A),
- _INIT_DCS_CMD(0x23, 0x0C),
- _INIT_DCS_CMD(0x24, 0x0D),
- _INIT_DCS_CMD(0x25, 0x0E),
- _INIT_DCS_CMD(0x26, 0x0F),
- _INIT_DCS_CMD(0x27, 0x10),
- _INIT_DCS_CMD(0x28, 0x11),
- _INIT_DCS_CMD(0x29, 0x04),
- _INIT_DCS_CMD(0x2A, 0x00),
- _INIT_DCS_CMD(0x2B, 0x03),
-
- _INIT_DCS_CMD(0x2F, 0x0A),
- _INIT_DCS_CMD(0x30, 0x35),
- _INIT_DCS_CMD(0x37, 0xA7),
- _INIT_DCS_CMD(0x39, 0x00),
- _INIT_DCS_CMD(0x3A, 0x46),
- _INIT_DCS_CMD(0x3B, 0x32),
- _INIT_DCS_CMD(0x3D, 0x12),
-
- _INIT_DCS_CMD(0x3F, 0x33),
- _INIT_DCS_CMD(0x40, 0x31),
- _INIT_DCS_CMD(0x41, 0x40),
- _INIT_DCS_CMD(0x42, 0x42),
- _INIT_DCS_CMD(0x47, 0x77),
- _INIT_DCS_CMD(0x48, 0x77),
- _INIT_DCS_CMD(0x4A, 0x45),
- _INIT_DCS_CMD(0x4B, 0x45),
- _INIT_DCS_CMD(0x4C, 0x14),
-
- _INIT_DCS_CMD(0x4D, 0x21),
- _INIT_DCS_CMD(0x4E, 0x43),
- _INIT_DCS_CMD(0x4F, 0x65),
- _INIT_DCS_CMD(0x55, 0x06),
- _INIT_DCS_CMD(0x56, 0x06),
- _INIT_DCS_CMD(0x58, 0x21),
- _INIT_DCS_CMD(0x59, 0x70),
- _INIT_DCS_CMD(0x5A, 0x46),
- _INIT_DCS_CMD(0x5B, 0x32),
- _INIT_DCS_CMD(0x5C, 0x88),
- _INIT_DCS_CMD(0x5E, 0x00, 0x00),
- _INIT_DCS_CMD(0x5F, 0x00),
-
- _INIT_DCS_CMD(0x7A, 0xFF),
- _INIT_DCS_CMD(0x7B, 0xFF),
- _INIT_DCS_CMD(0x7C, 0x00),
- _INIT_DCS_CMD(0x7D, 0x00),
- _INIT_DCS_CMD(0x7E, 0x20),
- _INIT_DCS_CMD(0x7F, 0x3C),
- _INIT_DCS_CMD(0x80, 0x00),
- _INIT_DCS_CMD(0x81, 0x00),
- _INIT_DCS_CMD(0x82, 0x08),
- _INIT_DCS_CMD(0x97, 0x02),
- _INIT_DCS_CMD(0xC5, 0x10),
-
- _INIT_DCS_CMD(0xD7, 0x55),
- _INIT_DCS_CMD(0xD8, 0x55),
- _INIT_DCS_CMD(0xD9, 0x23),
- _INIT_DCS_CMD(0xDA, 0x05),
- _INIT_DCS_CMD(0xDB, 0x01),
- _INIT_DCS_CMD(0xDC, 0x65),
- _INIT_DCS_CMD(0xDD, 0x55),
- _INIT_DCS_CMD(0xDE, 0x27),
- _INIT_DCS_CMD(0xDF, 0x01),
- _INIT_DCS_CMD(0xE0, 0x65),
- _INIT_DCS_CMD(0xE1, 0x01),
- _INIT_DCS_CMD(0xE2, 0x65),
- _INIT_DCS_CMD(0xE3, 0x01),
- _INIT_DCS_CMD(0xE4, 0x65),
- _INIT_DCS_CMD(0xE5, 0x01),
- _INIT_DCS_CMD(0xE6, 0x65),
- _INIT_DCS_CMD(0xE7, 0x00),
- _INIT_DCS_CMD(0xE8, 0x00),
- _INIT_DCS_CMD(0xE9, 0x01),
- _INIT_DCS_CMD(0xEA, 0x65),
- _INIT_DCS_CMD(0xEB, 0x01),
- _INIT_DCS_CMD(0xEE, 0x65),
- _INIT_DCS_CMD(0xEF, 0x01),
- _INIT_DCS_CMD(0xF0, 0x65),
- _INIT_DCS_CMD(0xB6, 0x05, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0x00, 0x00),
-
- _INIT_DCS_CMD(0xFF, 0x25),
-
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0x05, 0x00),
- _INIT_DCS_CMD(0xF1, 0x10),
-
- _INIT_DCS_CMD(0x1E, 0x00),
- _INIT_DCS_CMD(0x1F, 0x46),
- _INIT_DCS_CMD(0x20, 0x32),
-
- _INIT_DCS_CMD(0x25, 0x00),
- _INIT_DCS_CMD(0x26, 0x46),
- _INIT_DCS_CMD(0x27, 0x32),
-
- _INIT_DCS_CMD(0x3F, 0x80),
- _INIT_DCS_CMD(0x40, 0x00),
- _INIT_DCS_CMD(0x43, 0x00),
-
- _INIT_DCS_CMD(0x44, 0x46),
- _INIT_DCS_CMD(0x45, 0x46),
-
- _INIT_DCS_CMD(0x48, 0x46),
- _INIT_DCS_CMD(0x49, 0x32),
-
- _INIT_DCS_CMD(0x5B, 0x80),
-
- _INIT_DCS_CMD(0x5C, 0x00),
- _INIT_DCS_CMD(0x5D, 0x46),
- _INIT_DCS_CMD(0x5E, 0x32),
-
- _INIT_DCS_CMD(0x5F, 0x46),
- _INIT_DCS_CMD(0x60, 0x32),
-
- _INIT_DCS_CMD(0x61, 0x46),
- _INIT_DCS_CMD(0x62, 0x32),
- _INIT_DCS_CMD(0x68, 0x0C),
-
- _INIT_DCS_CMD(0x6C, 0x0D),
- _INIT_DCS_CMD(0x6E, 0x0D),
- _INIT_DCS_CMD(0x78, 0x00),
- _INIT_DCS_CMD(0x79, 0xC5),
- _INIT_DCS_CMD(0x7A, 0x0C),
- _INIT_DCS_CMD(0x7B, 0xB0),
-
- _INIT_DCS_CMD(0xFF, 0x26),
- _INIT_DCS_CMD(0xFB, 0x01),
-
- _INIT_DCS_CMD(0x00, 0xA1),
- _INIT_DCS_CMD(0x02, 0x31),
- _INIT_DCS_CMD(0x0A, 0xF4),
- _INIT_DCS_CMD(0x04, 0x50),
- _INIT_DCS_CMD(0x06, 0x30),
- _INIT_DCS_CMD(0x0C, 0x16),
- _INIT_DCS_CMD(0x0D, 0x0D),
- _INIT_DCS_CMD(0x0F, 0x00),
- _INIT_DCS_CMD(0x11, 0x00),
- _INIT_DCS_CMD(0x12, 0x50),
- _INIT_DCS_CMD(0x13, 0x40),
- _INIT_DCS_CMD(0x14, 0x58),
- _INIT_DCS_CMD(0x15, 0x00),
- _INIT_DCS_CMD(0x16, 0x10),
- _INIT_DCS_CMD(0x17, 0xA0),
- _INIT_DCS_CMD(0x18, 0x86),
- _INIT_DCS_CMD(0x22, 0x00),
- _INIT_DCS_CMD(0x23, 0x00),
-
- _INIT_DCS_CMD(0x19, 0x0E),
- _INIT_DCS_CMD(0x1A, 0x31),
- _INIT_DCS_CMD(0x1B, 0x0D),
- _INIT_DCS_CMD(0x1C, 0x29),
- _INIT_DCS_CMD(0x2A, 0x0E),
- _INIT_DCS_CMD(0x2B, 0x31),
-
- _INIT_DCS_CMD(0x1D, 0x00),
- _INIT_DCS_CMD(0x1E, 0x62),
- _INIT_DCS_CMD(0x1F, 0x62),
-
- _INIT_DCS_CMD(0x2F, 0x06),
- _INIT_DCS_CMD(0x30, 0x62),
- _INIT_DCS_CMD(0x31, 0x06),
- _INIT_DCS_CMD(0x32, 0x7F),
- _INIT_DCS_CMD(0x33, 0x11),
- _INIT_DCS_CMD(0x34, 0x89),
- _INIT_DCS_CMD(0x35, 0x67),
-
- _INIT_DCS_CMD(0x39, 0x0B),
- _INIT_DCS_CMD(0x3A, 0x62),
- _INIT_DCS_CMD(0x3B, 0x06),
-
- _INIT_DCS_CMD(0xC8, 0x04),
- _INIT_DCS_CMD(0xC9, 0x89),
- _INIT_DCS_CMD(0xCA, 0x4E),
- _INIT_DCS_CMD(0xCB, 0x00),
- _INIT_DCS_CMD(0xA9, 0x3F),
- _INIT_DCS_CMD(0xAA, 0x3E),
- _INIT_DCS_CMD(0xAB, 0x3D),
- _INIT_DCS_CMD(0xAC, 0x3C),
- _INIT_DCS_CMD(0xAD, 0x3B),
- _INIT_DCS_CMD(0xAE, 0x3A),
- _INIT_DCS_CMD(0xAF, 0x39),
- _INIT_DCS_CMD(0xB0, 0x38),
-
- _INIT_DCS_CMD(0xFF, 0x27),
- _INIT_DCS_CMD(0xFB, 0x01),
-
- _INIT_DCS_CMD(0xD0, 0x11),
- _INIT_DCS_CMD(0xD1, 0x54),
- _INIT_DCS_CMD(0xDE, 0x43),
- _INIT_DCS_CMD(0xDF, 0x02),
-
- _INIT_DCS_CMD(0xC0, 0x18),
- _INIT_DCS_CMD(0xC1, 0x00),
- _INIT_DCS_CMD(0xC2, 0x00),
- _INIT_DCS_CMD(0x00, 0x00),
- _INIT_DCS_CMD(0xC3, 0x00),
- _INIT_DCS_CMD(0x56, 0x06),
-
- _INIT_DCS_CMD(0x58, 0x80),
- _INIT_DCS_CMD(0x59, 0x78),
- _INIT_DCS_CMD(0x5A, 0x00),
- _INIT_DCS_CMD(0x5B, 0x18),
- _INIT_DCS_CMD(0x5C, 0x00),
- _INIT_DCS_CMD(0x5D, 0x01),
- _INIT_DCS_CMD(0x5E, 0x20),
- _INIT_DCS_CMD(0x5F, 0x10),
- _INIT_DCS_CMD(0x60, 0x00),
- _INIT_DCS_CMD(0x61, 0x1C),
- _INIT_DCS_CMD(0x62, 0x00),
- _INIT_DCS_CMD(0x63, 0x01),
- _INIT_DCS_CMD(0x64, 0x44),
- _INIT_DCS_CMD(0x65, 0x1B),
- _INIT_DCS_CMD(0x66, 0x00),
- _INIT_DCS_CMD(0x67, 0x01),
- _INIT_DCS_CMD(0x68, 0x44),
-
- _INIT_DCS_CMD(0x98, 0x01),
- _INIT_DCS_CMD(0xB4, 0x03),
- _INIT_DCS_CMD(0x9B, 0xBE),
-
- _INIT_DCS_CMD(0xAB, 0x14),
- _INIT_DCS_CMD(0xBC, 0x08),
- _INIT_DCS_CMD(0xBD, 0x28),
-
- _INIT_DCS_CMD(0xFF, 0x2A),
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0x22, 0x2F),
- _INIT_DCS_CMD(0x23, 0x08),
-
- _INIT_DCS_CMD(0x24, 0x00),
- _INIT_DCS_CMD(0x25, 0x62),
- _INIT_DCS_CMD(0x26, 0xF8),
- _INIT_DCS_CMD(0x27, 0x00),
- _INIT_DCS_CMD(0x28, 0x1A),
- _INIT_DCS_CMD(0x29, 0x00),
- _INIT_DCS_CMD(0x2A, 0x1A),
- _INIT_DCS_CMD(0x2B, 0x00),
- _INIT_DCS_CMD(0x2D, 0x1A),
-
- _INIT_DCS_CMD(0x64, 0x96),
- _INIT_DCS_CMD(0x65, 0x10),
- _INIT_DCS_CMD(0x66, 0x00),
- _INIT_DCS_CMD(0x67, 0x96),
- _INIT_DCS_CMD(0x68, 0x10),
- _INIT_DCS_CMD(0x69, 0x00),
- _INIT_DCS_CMD(0x6A, 0x96),
- _INIT_DCS_CMD(0x6B, 0x10),
- _INIT_DCS_CMD(0x6C, 0x00),
- _INIT_DCS_CMD(0x70, 0x92),
- _INIT_DCS_CMD(0x71, 0x10),
- _INIT_DCS_CMD(0x72, 0x00),
- _INIT_DCS_CMD(0x79, 0x96),
- _INIT_DCS_CMD(0x7A, 0x10),
- _INIT_DCS_CMD(0x88, 0x96),
- _INIT_DCS_CMD(0x89, 0x10),
-
- _INIT_DCS_CMD(0xA2, 0x3F),
- _INIT_DCS_CMD(0xA3, 0x30),
- _INIT_DCS_CMD(0xA4, 0xC0),
- _INIT_DCS_CMD(0xA5, 0x03),
-
- _INIT_DCS_CMD(0xE8, 0x00),
-
- _INIT_DCS_CMD(0x97, 0x3C),
- _INIT_DCS_CMD(0x98, 0x02),
- _INIT_DCS_CMD(0x99, 0x95),
- _INIT_DCS_CMD(0x9A, 0x06),
- _INIT_DCS_CMD(0x9B, 0x00),
- _INIT_DCS_CMD(0x9C, 0x0B),
- _INIT_DCS_CMD(0x9D, 0x0A),
- _INIT_DCS_CMD(0x9E, 0x90),
-
- _INIT_DCS_CMD(0xFF, 0x25),
- _INIT_DCS_CMD(0x13, 0x02),
- _INIT_DCS_CMD(0x14, 0xD7),
- _INIT_DCS_CMD(0xDB, 0x02),
- _INIT_DCS_CMD(0xDC, 0xD7),
- _INIT_DCS_CMD(0x17, 0xCF),
- _INIT_DCS_CMD(0x19, 0x0F),
- _INIT_DCS_CMD(0x1B, 0x5B),
-
- _INIT_DCS_CMD(0xFF, 0x20),
-
- _INIT_DCS_CMD(0xB0, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x24, 0x00, 0x38, 0x00, 0x4C, 0x00, 0x5E, 0x00, 0x6F, 0x00, 0x7E),
- _INIT_DCS_CMD(0xB1, 0x00, 0x8C, 0x00, 0xBE, 0x00, 0xE5, 0x01, 0x27, 0x01, 0x58, 0x01, 0xA8, 0x01, 0xE8, 0x01, 0xEA),
- _INIT_DCS_CMD(0xB2, 0x02, 0x28, 0x02, 0x71, 0x02, 0x9E, 0x02, 0xDA, 0x03, 0x00, 0x03, 0x31, 0x03, 0x40, 0x03, 0x51),
- _INIT_DCS_CMD(0xB3, 0x03, 0x62, 0x03, 0x75, 0x03, 0x89, 0x03, 0x9C, 0x03, 0xAA, 0x03, 0xB2),
-
- _INIT_DCS_CMD(0xB4, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x27, 0x00, 0x3D, 0x00, 0x52, 0x00, 0x64, 0x00, 0x75, 0x00, 0x84),
- _INIT_DCS_CMD(0xB5, 0x00, 0x93, 0x00, 0xC5, 0x00, 0xEC, 0x01, 0x2C, 0x01, 0x5D, 0x01, 0xAC, 0x01, 0xEC, 0x01, 0xEE),
- _INIT_DCS_CMD(0xB6, 0x02, 0x2B, 0x02, 0x73, 0x02, 0xA0, 0x02, 0xDB, 0x03, 0x01, 0x03, 0x31, 0x03, 0x41, 0x03, 0x51),
- _INIT_DCS_CMD(0xB7, 0x03, 0x63, 0x03, 0x75, 0x03, 0x89, 0x03, 0x9C, 0x03, 0xAA, 0x03, 0xB2),
-
- _INIT_DCS_CMD(0xB8, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x2A, 0x00, 0x40, 0x00, 0x56, 0x00, 0x68, 0x00, 0x7A, 0x00, 0x89),
- _INIT_DCS_CMD(0xB9, 0x00, 0x98, 0x00, 0xC9, 0x00, 0xF1, 0x01, 0x30, 0x01, 0x61, 0x01, 0xB0, 0x01, 0xEF, 0x01, 0xF1),
- _INIT_DCS_CMD(0xBA, 0x02, 0x2E, 0x02, 0x76, 0x02, 0xA3, 0x02, 0xDD, 0x03, 0x02, 0x03, 0x32, 0x03, 0x42, 0x03, 0x53),
- _INIT_DCS_CMD(0xBB, 0x03, 0x66, 0x03, 0x75, 0x03, 0x89, 0x03, 0x9C, 0x03, 0xAA, 0x03, 0xB2),
-
- _INIT_DCS_CMD(0xFF, 0x21),
- _INIT_DCS_CMD(0xB0, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x24, 0x00, 0x38, 0x00, 0x4C, 0x00, 0x5E, 0x00, 0x6F, 0x00, 0x7E),
- _INIT_DCS_CMD(0xB1, 0x00, 0x8C, 0x00, 0xBE, 0x00, 0xE5, 0x01, 0x27, 0x01, 0x58, 0x01, 0xA8, 0x01, 0xE8, 0x01, 0xEA),
- _INIT_DCS_CMD(0xB2, 0x02, 0x28, 0x02, 0x71, 0x02, 0x9E, 0x02, 0xDA, 0x03, 0x00, 0x03, 0x31, 0x03, 0x40, 0x03, 0x51),
- _INIT_DCS_CMD(0xB3, 0x03, 0x62, 0x03, 0x77, 0x03, 0x90, 0x03, 0xAC, 0x03, 0xCA, 0x03, 0xDA),
-
- _INIT_DCS_CMD(0xB4, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x27, 0x00, 0x3D, 0x00, 0x52, 0x00, 0x64, 0x00, 0x75, 0x00, 0x84),
- _INIT_DCS_CMD(0xB5, 0x00, 0x93, 0x00, 0xC5, 0x00, 0xEC, 0x01, 0x2C, 0x01, 0x5D, 0x01, 0xAC, 0x01, 0xEC, 0x01, 0xEE),
- _INIT_DCS_CMD(0xB6, 0x02, 0x2B, 0x02, 0x73, 0x02, 0xA0, 0x02, 0xDB, 0x03, 0x01, 0x03, 0x31, 0x03, 0x41, 0x03, 0x51),
- _INIT_DCS_CMD(0xB7, 0x03, 0x63, 0x03, 0x77, 0x03, 0x90, 0x03, 0xAC, 0x03, 0xCA, 0x03, 0xDA),
-
- _INIT_DCS_CMD(0xB8, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x2A, 0x00, 0x40, 0x00, 0x56, 0x00, 0x68, 0x00, 0x7A, 0x00, 0x89),
- _INIT_DCS_CMD(0xB9, 0x00, 0x98, 0x00, 0xC9, 0x00, 0xF1, 0x01, 0x30, 0x01, 0x61, 0x01, 0xB0, 0x01, 0xEF, 0x01, 0xF1),
- _INIT_DCS_CMD(0xBA, 0x02, 0x2E, 0x02, 0x76, 0x02, 0xA3, 0x02, 0xDD, 0x03, 0x02, 0x03, 0x32, 0x03, 0x42, 0x03, 0x53),
- _INIT_DCS_CMD(0xBB, 0x03, 0x66, 0x03, 0x77, 0x03, 0x90, 0x03, 0xAC, 0x03, 0xCA, 0x03, 0xDA),
-
- _INIT_DCS_CMD(0xFF, 0xF0),
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0x3A, 0x08),
-
- _INIT_DCS_CMD(0xFF, 0x10),
- _INIT_DCS_CMD(0xB9, 0x01),
-
- _INIT_DCS_CMD(0xFF, 0x20),
-
- _INIT_DCS_CMD(0x18, 0x40),
- _INIT_DCS_CMD(0xFF, 0x10),
-
- _INIT_DCS_CMD(0xB9, 0x02),
- _INIT_DCS_CMD(0xFF, 0x10),
-
- _INIT_DCS_CMD(0xFB, 0x01),
- _INIT_DCS_CMD(0xB0, 0x01),
- _INIT_DCS_CMD(0x35, 0x00),
- _INIT_DCS_CMD(0x3B, 0x03, 0xAE, 0x1A, 0x04, 0x04),
- _INIT_DELAY_CMD(100),
- _INIT_DCS_CMD(0x11),
- _INIT_DELAY_CMD(200),
- _INIT_DCS_CMD(0x29),
- _INIT_DELAY_CMD(100),
- {},
-};
+static int boe_init(struct boe_panel *boe)
+{
+ struct mipi_dsi_multi_context ctx = { .dsi = boe->dsi };
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0xe5);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x52);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x88);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x8b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbf, 0x1a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe0, 0x26);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe1, 0x26);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdc, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdd, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcc, 0x26);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd, 0x26);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd2, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd3, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe6, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe7, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0x09);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0x09);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd8, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd9, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0x0b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0x0b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd6, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd7, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd4, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd5, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xde, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdf, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0x17);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0x26);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0x31);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0x1c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc6, 0x2c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc7, 0x33);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0x31);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x37);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x37);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x37);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcc, 0x39);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd, 0x2e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xce, 0x2f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcf, 0x2f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd0, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd2, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd3, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd4, 0x17);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd5, 0x26);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd6, 0x31);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd7, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd8, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd9, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xda, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdb, 0x37);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdc, 0x37);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdd, 0x37);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xde, 0x39);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdf, 0x2e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe0, 0x2f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe1, 0x2f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe2, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0x0b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe7, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0x2a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xde, 0x2a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x43);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe4, 0xc0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe5, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0xa5);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0xa5);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc7, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd5, 0x32);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbc, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x25);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x39);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x4e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x72);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x97);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0xdc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x22);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0xa4);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbc, 0x2b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbd, 0x2f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbe, 0xa9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbf, 0x25);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x61);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x97);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0xb2);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0xcd);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0xd9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0xe7);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc6, 0xf4);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc7, 0xfa);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0xfc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcc, 0xaf);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xce, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x24);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x39);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x72);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x98);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0xdc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x23);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0xa6);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbc, 0x2c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbd, 0x30);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbe, 0xaa);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbf, 0x26);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x62);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x9b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0xb5);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0xcf);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0xdb);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0xe8);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc6, 0xf5);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc7, 0xfa);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0xfc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcc, 0xaf);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xce, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x09);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x24);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x3b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x73);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x99);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0xe0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x26);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0xad);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbc, 0x36);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbd, 0x3a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbe, 0xae);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbf, 0x2a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x66);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x9e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0xb8);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0xd1);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0xdd);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0xe9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc6, 0xf6);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc7, 0xfa);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0xfc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcc, 0xaf);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xce, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x25);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x39);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x4e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x72);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x97);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0xdc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x22);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0xa4);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbc, 0x2b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbd, 0x2f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbe, 0xa9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbf, 0x25);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x61);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x97);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0xb2);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0xcd);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0xd9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0xe7);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc6, 0xf4);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc7, 0xfa);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0xfc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcc, 0xaf);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xce, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x0b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x24);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x39);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x72);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x98);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0xdc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x23);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0xa6);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbc, 0x2c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbd, 0x30);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbe, 0xaa);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbf, 0x26);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x62);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x9b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0xb5);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0xcf);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0xdb);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0xe8);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc6, 0xf5);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc7, 0xfa);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0xfc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcc, 0xaf);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xce, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb2, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb4, 0x24);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5, 0x3b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb6, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb7, 0x73);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x99);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0xe0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x26);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbb, 0xad);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbc, 0x36);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbd, 0x3a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbe, 0xae);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbf, 0x2a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x66);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x9e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0xb8);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0xd1);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0xdd);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0xe9);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc6, 0xf6);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc7, 0xfa);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0xfc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcc, 0xaf);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xce, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb3, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb8, 0x68);
+
+ mipi_dsi_msleep(&ctx, 150);
-static const struct panel_init_cmd boe_init_cmd[] = {
- _INIT_DCS_CMD(0xB0, 0x05),
- _INIT_DCS_CMD(0xB1, 0xE5),
- _INIT_DCS_CMD(0xB3, 0x52),
- _INIT_DCS_CMD(0xB0, 0x00),
- _INIT_DCS_CMD(0xB3, 0x88),
- _INIT_DCS_CMD(0xB0, 0x04),
- _INIT_DCS_CMD(0xB8, 0x00),
- _INIT_DCS_CMD(0xB0, 0x00),
- _INIT_DCS_CMD(0xB6, 0x03),
- _INIT_DCS_CMD(0xBA, 0x8B),
- _INIT_DCS_CMD(0xBF, 0x1A),
- _INIT_DCS_CMD(0xC0, 0x0F),
- _INIT_DCS_CMD(0xC2, 0x0C),
- _INIT_DCS_CMD(0xC3, 0x02),
- _INIT_DCS_CMD(0xC4, 0x0C),
- _INIT_DCS_CMD(0xC5, 0x02),
- _INIT_DCS_CMD(0xB0, 0x01),
- _INIT_DCS_CMD(0xE0, 0x26),
- _INIT_DCS_CMD(0xE1, 0x26),
- _INIT_DCS_CMD(0xDC, 0x00),
- _INIT_DCS_CMD(0xDD, 0x00),
- _INIT_DCS_CMD(0xCC, 0x26),
- _INIT_DCS_CMD(0xCD, 0x26),
- _INIT_DCS_CMD(0xC8, 0x00),
- _INIT_DCS_CMD(0xC9, 0x00),
- _INIT_DCS_CMD(0xD2, 0x03),
- _INIT_DCS_CMD(0xD3, 0x03),
- _INIT_DCS_CMD(0xE6, 0x04),
- _INIT_DCS_CMD(0xE7, 0x04),
- _INIT_DCS_CMD(0xC4, 0x09),
- _INIT_DCS_CMD(0xC5, 0x09),
- _INIT_DCS_CMD(0xD8, 0x0A),
- _INIT_DCS_CMD(0xD9, 0x0A),
- _INIT_DCS_CMD(0xC2, 0x0B),
- _INIT_DCS_CMD(0xC3, 0x0B),
- _INIT_DCS_CMD(0xD6, 0x0C),
- _INIT_DCS_CMD(0xD7, 0x0C),
- _INIT_DCS_CMD(0xC0, 0x05),
- _INIT_DCS_CMD(0xC1, 0x05),
- _INIT_DCS_CMD(0xD4, 0x06),
- _INIT_DCS_CMD(0xD5, 0x06),
- _INIT_DCS_CMD(0xCA, 0x07),
- _INIT_DCS_CMD(0xCB, 0x07),
- _INIT_DCS_CMD(0xDE, 0x08),
- _INIT_DCS_CMD(0xDF, 0x08),
- _INIT_DCS_CMD(0xB0, 0x02),
- _INIT_DCS_CMD(0xC0, 0x00),
- _INIT_DCS_CMD(0xC1, 0x0D),
- _INIT_DCS_CMD(0xC2, 0x17),
- _INIT_DCS_CMD(0xC3, 0x26),
- _INIT_DCS_CMD(0xC4, 0x31),
- _INIT_DCS_CMD(0xC5, 0x1C),
- _INIT_DCS_CMD(0xC6, 0x2C),
- _INIT_DCS_CMD(0xC7, 0x33),
- _INIT_DCS_CMD(0xC8, 0x31),
- _INIT_DCS_CMD(0xC9, 0x37),
- _INIT_DCS_CMD(0xCA, 0x37),
- _INIT_DCS_CMD(0xCB, 0x37),
- _INIT_DCS_CMD(0xCC, 0x39),
- _INIT_DCS_CMD(0xCD, 0x2E),
- _INIT_DCS_CMD(0xCE, 0x2F),
- _INIT_DCS_CMD(0xCF, 0x2F),
- _INIT_DCS_CMD(0xD0, 0x07),
- _INIT_DCS_CMD(0xD2, 0x00),
- _INIT_DCS_CMD(0xD3, 0x0D),
- _INIT_DCS_CMD(0xD4, 0x17),
- _INIT_DCS_CMD(0xD5, 0x26),
- _INIT_DCS_CMD(0xD6, 0x31),
- _INIT_DCS_CMD(0xD7, 0x3F),
- _INIT_DCS_CMD(0xD8, 0x3F),
- _INIT_DCS_CMD(0xD9, 0x3F),
- _INIT_DCS_CMD(0xDA, 0x3F),
- _INIT_DCS_CMD(0xDB, 0x37),
- _INIT_DCS_CMD(0xDC, 0x37),
- _INIT_DCS_CMD(0xDD, 0x37),
- _INIT_DCS_CMD(0xDE, 0x39),
- _INIT_DCS_CMD(0xDF, 0x2E),
- _INIT_DCS_CMD(0xE0, 0x2F),
- _INIT_DCS_CMD(0xE1, 0x2F),
- _INIT_DCS_CMD(0xE2, 0x07),
- _INIT_DCS_CMD(0xB0, 0x03),
- _INIT_DCS_CMD(0xC8, 0x0B),
- _INIT_DCS_CMD(0xC9, 0x07),
- _INIT_DCS_CMD(0xC3, 0x00),
- _INIT_DCS_CMD(0xE7, 0x00),
- _INIT_DCS_CMD(0xC5, 0x2A),
- _INIT_DCS_CMD(0xDE, 0x2A),
- _INIT_DCS_CMD(0xCA, 0x43),
- _INIT_DCS_CMD(0xC9, 0x07),
- _INIT_DCS_CMD(0xE4, 0xC0),
- _INIT_DCS_CMD(0xE5, 0x0D),
- _INIT_DCS_CMD(0xCB, 0x00),
- _INIT_DCS_CMD(0xB0, 0x06),
- _INIT_DCS_CMD(0xB8, 0xA5),
- _INIT_DCS_CMD(0xC0, 0xA5),
- _INIT_DCS_CMD(0xC7, 0x0F),
- _INIT_DCS_CMD(0xD5, 0x32),
- _INIT_DCS_CMD(0xB8, 0x00),
- _INIT_DCS_CMD(0xC0, 0x00),
- _INIT_DCS_CMD(0xBC, 0x00),
- _INIT_DCS_CMD(0xB0, 0x07),
- _INIT_DCS_CMD(0xB1, 0x00),
- _INIT_DCS_CMD(0xB2, 0x02),
- _INIT_DCS_CMD(0xB3, 0x0F),
- _INIT_DCS_CMD(0xB4, 0x25),
- _INIT_DCS_CMD(0xB5, 0x39),
- _INIT_DCS_CMD(0xB6, 0x4E),
- _INIT_DCS_CMD(0xB7, 0x72),
- _INIT_DCS_CMD(0xB8, 0x97),
- _INIT_DCS_CMD(0xB9, 0xDC),
- _INIT_DCS_CMD(0xBA, 0x22),
- _INIT_DCS_CMD(0xBB, 0xA4),
- _INIT_DCS_CMD(0xBC, 0x2B),
- _INIT_DCS_CMD(0xBD, 0x2F),
- _INIT_DCS_CMD(0xBE, 0xA9),
- _INIT_DCS_CMD(0xBF, 0x25),
- _INIT_DCS_CMD(0xC0, 0x61),
- _INIT_DCS_CMD(0xC1, 0x97),
- _INIT_DCS_CMD(0xC2, 0xB2),
- _INIT_DCS_CMD(0xC3, 0xCD),
- _INIT_DCS_CMD(0xC4, 0xD9),
- _INIT_DCS_CMD(0xC5, 0xE7),
- _INIT_DCS_CMD(0xC6, 0xF4),
- _INIT_DCS_CMD(0xC7, 0xFA),
- _INIT_DCS_CMD(0xC8, 0xFC),
- _INIT_DCS_CMD(0xC9, 0x00),
- _INIT_DCS_CMD(0xCA, 0x00),
- _INIT_DCS_CMD(0xCB, 0x16),
- _INIT_DCS_CMD(0xCC, 0xAF),
- _INIT_DCS_CMD(0xCD, 0xFF),
- _INIT_DCS_CMD(0xCE, 0xFF),
- _INIT_DCS_CMD(0xB0, 0x08),
- _INIT_DCS_CMD(0xB1, 0x04),
- _INIT_DCS_CMD(0xB2, 0x05),
- _INIT_DCS_CMD(0xB3, 0x11),
- _INIT_DCS_CMD(0xB4, 0x24),
- _INIT_DCS_CMD(0xB5, 0x39),
- _INIT_DCS_CMD(0xB6, 0x4F),
- _INIT_DCS_CMD(0xB7, 0x72),
- _INIT_DCS_CMD(0xB8, 0x98),
- _INIT_DCS_CMD(0xB9, 0xDC),
- _INIT_DCS_CMD(0xBA, 0x23),
- _INIT_DCS_CMD(0xBB, 0xA6),
- _INIT_DCS_CMD(0xBC, 0x2C),
- _INIT_DCS_CMD(0xBD, 0x30),
- _INIT_DCS_CMD(0xBE, 0xAA),
- _INIT_DCS_CMD(0xBF, 0x26),
- _INIT_DCS_CMD(0xC0, 0x62),
- _INIT_DCS_CMD(0xC1, 0x9B),
- _INIT_DCS_CMD(0xC2, 0xB5),
- _INIT_DCS_CMD(0xC3, 0xCF),
- _INIT_DCS_CMD(0xC4, 0xDB),
- _INIT_DCS_CMD(0xC5, 0xE8),
- _INIT_DCS_CMD(0xC6, 0xF5),
- _INIT_DCS_CMD(0xC7, 0xFA),
- _INIT_DCS_CMD(0xC8, 0xFC),
- _INIT_DCS_CMD(0xC9, 0x00),
- _INIT_DCS_CMD(0xCA, 0x00),
- _INIT_DCS_CMD(0xCB, 0x16),
- _INIT_DCS_CMD(0xCC, 0xAF),
- _INIT_DCS_CMD(0xCD, 0xFF),
- _INIT_DCS_CMD(0xCE, 0xFF),
- _INIT_DCS_CMD(0xB0, 0x09),
- _INIT_DCS_CMD(0xB1, 0x04),
- _INIT_DCS_CMD(0xB2, 0x02),
- _INIT_DCS_CMD(0xB3, 0x16),
- _INIT_DCS_CMD(0xB4, 0x24),
- _INIT_DCS_CMD(0xB5, 0x3B),
- _INIT_DCS_CMD(0xB6, 0x4F),
- _INIT_DCS_CMD(0xB7, 0x73),
- _INIT_DCS_CMD(0xB8, 0x99),
- _INIT_DCS_CMD(0xB9, 0xE0),
- _INIT_DCS_CMD(0xBA, 0x26),
- _INIT_DCS_CMD(0xBB, 0xAD),
- _INIT_DCS_CMD(0xBC, 0x36),
- _INIT_DCS_CMD(0xBD, 0x3A),
- _INIT_DCS_CMD(0xBE, 0xAE),
- _INIT_DCS_CMD(0xBF, 0x2A),
- _INIT_DCS_CMD(0xC0, 0x66),
- _INIT_DCS_CMD(0xC1, 0x9E),
- _INIT_DCS_CMD(0xC2, 0xB8),
- _INIT_DCS_CMD(0xC3, 0xD1),
- _INIT_DCS_CMD(0xC4, 0xDD),
- _INIT_DCS_CMD(0xC5, 0xE9),
- _INIT_DCS_CMD(0xC6, 0xF6),
- _INIT_DCS_CMD(0xC7, 0xFA),
- _INIT_DCS_CMD(0xC8, 0xFC),
- _INIT_DCS_CMD(0xC9, 0x00),
- _INIT_DCS_CMD(0xCA, 0x00),
- _INIT_DCS_CMD(0xCB, 0x16),
- _INIT_DCS_CMD(0xCC, 0xAF),
- _INIT_DCS_CMD(0xCD, 0xFF),
- _INIT_DCS_CMD(0xCE, 0xFF),
- _INIT_DCS_CMD(0xB0, 0x0A),
- _INIT_DCS_CMD(0xB1, 0x00),
- _INIT_DCS_CMD(0xB2, 0x02),
- _INIT_DCS_CMD(0xB3, 0x0F),
- _INIT_DCS_CMD(0xB4, 0x25),
- _INIT_DCS_CMD(0xB5, 0x39),
- _INIT_DCS_CMD(0xB6, 0x4E),
- _INIT_DCS_CMD(0xB7, 0x72),
- _INIT_DCS_CMD(0xB8, 0x97),
- _INIT_DCS_CMD(0xB9, 0xDC),
- _INIT_DCS_CMD(0xBA, 0x22),
- _INIT_DCS_CMD(0xBB, 0xA4),
- _INIT_DCS_CMD(0xBC, 0x2B),
- _INIT_DCS_CMD(0xBD, 0x2F),
- _INIT_DCS_CMD(0xBE, 0xA9),
- _INIT_DCS_CMD(0xBF, 0x25),
- _INIT_DCS_CMD(0xC0, 0x61),
- _INIT_DCS_CMD(0xC1, 0x97),
- _INIT_DCS_CMD(0xC2, 0xB2),
- _INIT_DCS_CMD(0xC3, 0xCD),
- _INIT_DCS_CMD(0xC4, 0xD9),
- _INIT_DCS_CMD(0xC5, 0xE7),
- _INIT_DCS_CMD(0xC6, 0xF4),
- _INIT_DCS_CMD(0xC7, 0xFA),
- _INIT_DCS_CMD(0xC8, 0xFC),
- _INIT_DCS_CMD(0xC9, 0x00),
- _INIT_DCS_CMD(0xCA, 0x00),
- _INIT_DCS_CMD(0xCB, 0x16),
- _INIT_DCS_CMD(0xCC, 0xAF),
- _INIT_DCS_CMD(0xCD, 0xFF),
- _INIT_DCS_CMD(0xCE, 0xFF),
- _INIT_DCS_CMD(0xB0, 0x0B),
- _INIT_DCS_CMD(0xB1, 0x04),
- _INIT_DCS_CMD(0xB2, 0x05),
- _INIT_DCS_CMD(0xB3, 0x11),
- _INIT_DCS_CMD(0xB4, 0x24),
- _INIT_DCS_CMD(0xB5, 0x39),
- _INIT_DCS_CMD(0xB6, 0x4F),
- _INIT_DCS_CMD(0xB7, 0x72),
- _INIT_DCS_CMD(0xB8, 0x98),
- _INIT_DCS_CMD(0xB9, 0xDC),
- _INIT_DCS_CMD(0xBA, 0x23),
- _INIT_DCS_CMD(0xBB, 0xA6),
- _INIT_DCS_CMD(0xBC, 0x2C),
- _INIT_DCS_CMD(0xBD, 0x30),
- _INIT_DCS_CMD(0xBE, 0xAA),
- _INIT_DCS_CMD(0xBF, 0x26),
- _INIT_DCS_CMD(0xC0, 0x62),
- _INIT_DCS_CMD(0xC1, 0x9B),
- _INIT_DCS_CMD(0xC2, 0xB5),
- _INIT_DCS_CMD(0xC3, 0xCF),
- _INIT_DCS_CMD(0xC4, 0xDB),
- _INIT_DCS_CMD(0xC5, 0xE8),
- _INIT_DCS_CMD(0xC6, 0xF5),
- _INIT_DCS_CMD(0xC7, 0xFA),
- _INIT_DCS_CMD(0xC8, 0xFC),
- _INIT_DCS_CMD(0xC9, 0x00),
- _INIT_DCS_CMD(0xCA, 0x00),
- _INIT_DCS_CMD(0xCB, 0x16),
- _INIT_DCS_CMD(0xCC, 0xAF),
- _INIT_DCS_CMD(0xCD, 0xFF),
- _INIT_DCS_CMD(0xCE, 0xFF),
- _INIT_DCS_CMD(0xB0, 0x0C),
- _INIT_DCS_CMD(0xB1, 0x04),
- _INIT_DCS_CMD(0xB2, 0x02),
- _INIT_DCS_CMD(0xB3, 0x16),
- _INIT_DCS_CMD(0xB4, 0x24),
- _INIT_DCS_CMD(0xB5, 0x3B),
- _INIT_DCS_CMD(0xB6, 0x4F),
- _INIT_DCS_CMD(0xB7, 0x73),
- _INIT_DCS_CMD(0xB8, 0x99),
- _INIT_DCS_CMD(0xB9, 0xE0),
- _INIT_DCS_CMD(0xBA, 0x26),
- _INIT_DCS_CMD(0xBB, 0xAD),
- _INIT_DCS_CMD(0xBC, 0x36),
- _INIT_DCS_CMD(0xBD, 0x3A),
- _INIT_DCS_CMD(0xBE, 0xAE),
- _INIT_DCS_CMD(0xBF, 0x2A),
- _INIT_DCS_CMD(0xC0, 0x66),
- _INIT_DCS_CMD(0xC1, 0x9E),
- _INIT_DCS_CMD(0xC2, 0xB8),
- _INIT_DCS_CMD(0xC3, 0xD1),
- _INIT_DCS_CMD(0xC4, 0xDD),
- _INIT_DCS_CMD(0xC5, 0xE9),
- _INIT_DCS_CMD(0xC6, 0xF6),
- _INIT_DCS_CMD(0xC7, 0xFA),
- _INIT_DCS_CMD(0xC8, 0xFC),
- _INIT_DCS_CMD(0xC9, 0x00),
- _INIT_DCS_CMD(0xCA, 0x00),
- _INIT_DCS_CMD(0xCB, 0x16),
- _INIT_DCS_CMD(0xCC, 0xAF),
- _INIT_DCS_CMD(0xCD, 0xFF),
- _INIT_DCS_CMD(0xCE, 0xFF),
- _INIT_DCS_CMD(0xB0, 0x00),
- _INIT_DCS_CMD(0xB3, 0x08),
- _INIT_DCS_CMD(0xB0, 0x04),
- _INIT_DCS_CMD(0xB8, 0x68),
- _INIT_DELAY_CMD(150),
- {},
+ return 0;
};
-static const struct panel_init_cmd auo_kd101n80_45na_init_cmd[] = {
- _INIT_DELAY_CMD(24),
- _INIT_DCS_CMD(0x11),
- _INIT_DELAY_CMD(120),
- _INIT_DCS_CMD(0x29),
- _INIT_DELAY_CMD(120),
- {},
-};
+static int auo_kd101n80_45na_init(struct boe_panel *boe)
+{
+ struct mipi_dsi_multi_context ctx = { .dsi = boe->dsi };
-static const struct panel_init_cmd auo_b101uan08_3_init_cmd[] = {
- _INIT_DELAY_CMD(24),
- _INIT_DCS_CMD(0xB0, 0x01),
- _INIT_DCS_CMD(0xC0, 0x48),
- _INIT_DCS_CMD(0xC1, 0x48),
- _INIT_DCS_CMD(0xC2, 0x47),
- _INIT_DCS_CMD(0xC3, 0x47),
- _INIT_DCS_CMD(0xC4, 0x46),
- _INIT_DCS_CMD(0xC5, 0x46),
- _INIT_DCS_CMD(0xC6, 0x45),
- _INIT_DCS_CMD(0xC7, 0x45),
- _INIT_DCS_CMD(0xC8, 0x64),
- _INIT_DCS_CMD(0xC9, 0x64),
- _INIT_DCS_CMD(0xCA, 0x4F),
- _INIT_DCS_CMD(0xCB, 0x4F),
- _INIT_DCS_CMD(0xCC, 0x40),
- _INIT_DCS_CMD(0xCD, 0x40),
- _INIT_DCS_CMD(0xCE, 0x66),
- _INIT_DCS_CMD(0xCF, 0x66),
- _INIT_DCS_CMD(0xD0, 0x4F),
- _INIT_DCS_CMD(0xD1, 0x4F),
- _INIT_DCS_CMD(0xD2, 0x41),
- _INIT_DCS_CMD(0xD3, 0x41),
- _INIT_DCS_CMD(0xD4, 0x48),
- _INIT_DCS_CMD(0xD5, 0x48),
- _INIT_DCS_CMD(0xD6, 0x47),
- _INIT_DCS_CMD(0xD7, 0x47),
- _INIT_DCS_CMD(0xD8, 0x46),
- _INIT_DCS_CMD(0xD9, 0x46),
- _INIT_DCS_CMD(0xDA, 0x45),
- _INIT_DCS_CMD(0xDB, 0x45),
- _INIT_DCS_CMD(0xDC, 0x64),
- _INIT_DCS_CMD(0xDD, 0x64),
- _INIT_DCS_CMD(0xDE, 0x4F),
- _INIT_DCS_CMD(0xDF, 0x4F),
- _INIT_DCS_CMD(0xE0, 0x40),
- _INIT_DCS_CMD(0xE1, 0x40),
- _INIT_DCS_CMD(0xE2, 0x66),
- _INIT_DCS_CMD(0xE3, 0x66),
- _INIT_DCS_CMD(0xE4, 0x4F),
- _INIT_DCS_CMD(0xE5, 0x4F),
- _INIT_DCS_CMD(0xE6, 0x41),
- _INIT_DCS_CMD(0xE7, 0x41),
- _INIT_DELAY_CMD(150),
- {},
-};
+ msleep(24);
-static const struct panel_init_cmd starry_qfh032011_53g_init_cmd[] = {
- _INIT_DCS_CMD(0xB0, 0x01),
- _INIT_DCS_CMD(0xC3, 0x4F),
- _INIT_DCS_CMD(0xC4, 0x40),
- _INIT_DCS_CMD(0xC5, 0x40),
- _INIT_DCS_CMD(0xC6, 0x40),
- _INIT_DCS_CMD(0xC7, 0x40),
- _INIT_DCS_CMD(0xC8, 0x4D),
- _INIT_DCS_CMD(0xC9, 0x52),
- _INIT_DCS_CMD(0xCA, 0x51),
- _INIT_DCS_CMD(0xCD, 0x5D),
- _INIT_DCS_CMD(0xCE, 0x5B),
- _INIT_DCS_CMD(0xCF, 0x4B),
- _INIT_DCS_CMD(0xD0, 0x49),
- _INIT_DCS_CMD(0xD1, 0x47),
- _INIT_DCS_CMD(0xD2, 0x45),
- _INIT_DCS_CMD(0xD3, 0x41),
- _INIT_DCS_CMD(0xD7, 0x50),
- _INIT_DCS_CMD(0xD8, 0x40),
- _INIT_DCS_CMD(0xD9, 0x40),
- _INIT_DCS_CMD(0xDA, 0x40),
- _INIT_DCS_CMD(0xDB, 0x40),
- _INIT_DCS_CMD(0xDC, 0x4E),
- _INIT_DCS_CMD(0xDD, 0x52),
- _INIT_DCS_CMD(0xDE, 0x51),
- _INIT_DCS_CMD(0xE1, 0x5E),
- _INIT_DCS_CMD(0xE2, 0x5C),
- _INIT_DCS_CMD(0xE3, 0x4C),
- _INIT_DCS_CMD(0xE4, 0x4A),
- _INIT_DCS_CMD(0xE5, 0x48),
- _INIT_DCS_CMD(0xE6, 0x46),
- _INIT_DCS_CMD(0xE7, 0x42),
- _INIT_DCS_CMD(0xB0, 0x03),
- _INIT_DCS_CMD(0xBE, 0x03),
- _INIT_DCS_CMD(0xCC, 0x44),
- _INIT_DCS_CMD(0xC8, 0x07),
- _INIT_DCS_CMD(0xC9, 0x05),
- _INIT_DCS_CMD(0xCA, 0x42),
- _INIT_DCS_CMD(0xCD, 0x3E),
- _INIT_DCS_CMD(0xCF, 0x60),
- _INIT_DCS_CMD(0xD2, 0x04),
- _INIT_DCS_CMD(0xD3, 0x04),
- _INIT_DCS_CMD(0xD4, 0x01),
- _INIT_DCS_CMD(0xD5, 0x00),
- _INIT_DCS_CMD(0xD6, 0x03),
- _INIT_DCS_CMD(0xD7, 0x04),
- _INIT_DCS_CMD(0xD9, 0x01),
- _INIT_DCS_CMD(0xDB, 0x01),
- _INIT_DCS_CMD(0xE4, 0xF0),
- _INIT_DCS_CMD(0xE5, 0x0A),
- _INIT_DCS_CMD(0xB0, 0x00),
- _INIT_DCS_CMD(0xCC, 0x08),
- _INIT_DCS_CMD(0xC2, 0x08),
- _INIT_DCS_CMD(0xC4, 0x10),
- _INIT_DCS_CMD(0xB0, 0x02),
- _INIT_DCS_CMD(0xC0, 0x00),
- _INIT_DCS_CMD(0xC1, 0x0A),
- _INIT_DCS_CMD(0xC2, 0x20),
- _INIT_DCS_CMD(0xC3, 0x24),
- _INIT_DCS_CMD(0xC4, 0x23),
- _INIT_DCS_CMD(0xC5, 0x29),
- _INIT_DCS_CMD(0xC6, 0x23),
- _INIT_DCS_CMD(0xC7, 0x1C),
- _INIT_DCS_CMD(0xC8, 0x19),
- _INIT_DCS_CMD(0xC9, 0x17),
- _INIT_DCS_CMD(0xCA, 0x17),
- _INIT_DCS_CMD(0xCB, 0x18),
- _INIT_DCS_CMD(0xCC, 0x1A),
- _INIT_DCS_CMD(0xCD, 0x1E),
- _INIT_DCS_CMD(0xCE, 0x20),
- _INIT_DCS_CMD(0xCF, 0x23),
- _INIT_DCS_CMD(0xD0, 0x07),
- _INIT_DCS_CMD(0xD1, 0x00),
- _INIT_DCS_CMD(0xD2, 0x00),
- _INIT_DCS_CMD(0xD3, 0x0A),
- _INIT_DCS_CMD(0xD4, 0x13),
- _INIT_DCS_CMD(0xD5, 0x1C),
- _INIT_DCS_CMD(0xD6, 0x1A),
- _INIT_DCS_CMD(0xD7, 0x13),
- _INIT_DCS_CMD(0xD8, 0x17),
- _INIT_DCS_CMD(0xD9, 0x1C),
- _INIT_DCS_CMD(0xDA, 0x19),
- _INIT_DCS_CMD(0xDB, 0x17),
- _INIT_DCS_CMD(0xDC, 0x17),
- _INIT_DCS_CMD(0xDD, 0x18),
- _INIT_DCS_CMD(0xDE, 0x1A),
- _INIT_DCS_CMD(0xDF, 0x1E),
- _INIT_DCS_CMD(0xE0, 0x20),
- _INIT_DCS_CMD(0xE1, 0x23),
- _INIT_DCS_CMD(0xE2, 0x07),
- _INIT_DCS_CMD(0X11),
- _INIT_DELAY_CMD(120),
- _INIT_DCS_CMD(0X29),
- _INIT_DELAY_CMD(80),
- {},
-};
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x11);
-static const struct panel_init_cmd starry_himax83102_j02_init_cmd[] = {
- _INIT_DCS_CMD(0xB9, 0x83, 0x10, 0x21, 0x55, 0x00),
- _INIT_DCS_CMD(0xB1, 0x2C, 0xB5, 0xB5, 0x31, 0xF1, 0x31, 0xD7, 0x2F, 0x36, 0x36, 0x36, 0x36, 0x1A, 0x8B, 0x11,
- 0x65, 0x00, 0x88, 0xFA, 0xFF, 0xFF, 0x8F, 0xFF, 0x08, 0x74, 0x33),
- _INIT_DCS_CMD(0xB2, 0x00, 0x47, 0xB0, 0x80, 0x00, 0x12, 0x72, 0x3C, 0xA3, 0x03, 0x03, 0x00, 0x00, 0x88, 0xF5),
- _INIT_DCS_CMD(0xB4, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x63, 0x5C, 0x63, 0x5C, 0x01, 0x9E),
- _INIT_DCS_CMD(0xE9, 0xCD),
- _INIT_DCS_CMD(0xBA, 0x84),
- _INIT_DCS_CMD(0xE9, 0x3F),
- _INIT_DCS_CMD(0xBC, 0x1B, 0x04),
- _INIT_DCS_CMD(0xBE, 0x20),
- _INIT_DCS_CMD(0xBF, 0xFC, 0xC4),
- _INIT_DCS_CMD(0xC0, 0x36, 0x36, 0x22, 0x11, 0x22, 0xA0, 0x61, 0x08, 0xF5, 0x03),
- _INIT_DCS_CMD(0xE9, 0xCC),
- _INIT_DCS_CMD(0xC7, 0x80),
- _INIT_DCS_CMD(0xE9, 0x3F),
- _INIT_DCS_CMD(0xE9, 0xC6),
- _INIT_DCS_CMD(0xC8, 0x97),
- _INIT_DCS_CMD(0xE9, 0x3F),
- _INIT_DCS_CMD(0xC9, 0x00, 0x1E, 0x13, 0x88, 0x01),
- _INIT_DCS_CMD(0xCB, 0x08, 0x13, 0x07, 0x00, 0x0F, 0x33),
- _INIT_DCS_CMD(0xCC, 0x02),
- _INIT_DCS_CMD(0xE9, 0xC4),
- _INIT_DCS_CMD(0xD0, 0x03),
- _INIT_DCS_CMD(0xE9, 0x3F),
- _INIT_DCS_CMD(0xD1, 0x37, 0x06, 0x00, 0x02, 0x04, 0x0C, 0xFF),
- _INIT_DCS_CMD(0xD2, 0x1F, 0x11, 0x1F),
- _INIT_DCS_CMD(0xD3, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x37, 0x47, 0x34, 0x3B, 0x12, 0x12, 0x03,
- 0x03, 0x32, 0x10, 0x10, 0x00, 0x10, 0x32, 0x10, 0x08, 0x00, 0x08, 0x32, 0x17, 0x94, 0x07, 0x94, 0x00, 0x00),
- _INIT_DCS_CMD(0xD5, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x19, 0x19, 0x40, 0x40, 0x1A, 0x1A,
- 0x1B, 0x1B, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x20, 0x21, 0x28, 0x29, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18),
- _INIT_DCS_CMD(0xD6, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x40, 0x40, 0x19, 0x19, 0x1A, 0x1A,
- 0x1B, 0x1B, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x29, 0x28, 0x21, 0x20, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18),
- _INIT_DCS_CMD(0xD8, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA,
- 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0),
- _INIT_DCS_CMD(0xE0, 0x00, 0x09, 0x14, 0x1E, 0x26, 0x48, 0x61, 0x67, 0x6C, 0x67, 0x7D, 0x7F, 0x80, 0x8B, 0x87, 0x8F, 0x98, 0xAB,
- 0xAB, 0x55, 0x5C, 0x68, 0x73, 0x00, 0x09, 0x14, 0x1E, 0x26, 0x48, 0x61, 0x67, 0x6C, 0x67, 0x7D, 0x7F, 0x80, 0x8B, 0x87, 0x8F, 0x98, 0xAB, 0xAB, 0x55, 0x5C, 0x68, 0x73),
- _INIT_DCS_CMD(0xE7, 0x0E, 0x10, 0x10, 0x21, 0x2B, 0x9A, 0x02, 0x54, 0x9A, 0x14, 0x14, 0x00, 0x00, 0x00, 0x00, 0x12, 0x05, 0x02, 0x02, 0x10),
- _INIT_DCS_CMD(0xBD, 0x01),
- _INIT_DCS_CMD(0xB1, 0x01, 0xBF, 0x11),
- _INIT_DCS_CMD(0xCB, 0x86),
- _INIT_DCS_CMD(0xD2, 0x3C, 0xFA),
- _INIT_DCS_CMD(0xD3, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0C, 0x01),
- _INIT_DCS_CMD(0xE7, 0x02, 0x00, 0x28, 0x01, 0x7E, 0x0F, 0x7E, 0x10, 0xA0, 0x00, 0x00, 0x20, 0x40, 0x50, 0x40),
- _INIT_DCS_CMD(0xBD, 0x02),
- _INIT_DCS_CMD(0xD8, 0xFF, 0xFF, 0xBF, 0xFE, 0xAA, 0xA0, 0xFF, 0xFF, 0xBF, 0xFE, 0xAA, 0xA0),
- _INIT_DCS_CMD(0xE7, 0xFE, 0x04, 0xFE, 0x04, 0xFE, 0x04, 0x03, 0x03, 0x03, 0x26, 0x00, 0x26, 0x81, 0x02, 0x40, 0x00, 0x20, 0x9E, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00),
- _INIT_DCS_CMD(0xBD, 0x03),
- _INIT_DCS_CMD(0xE9, 0xC6),
- _INIT_DCS_CMD(0xB4, 0x03, 0xFF, 0xF8),
- _INIT_DCS_CMD(0xE9, 0x3F),
- _INIT_DCS_CMD(0xD8, 0x00, 0x2A, 0xAA, 0xA8, 0x00, 0x00, 0x00, 0x2A, 0xAA, 0xA8, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x2A, 0xAA, 0xA8,
- 0x00, 0x00, 0x00, 0x2A, 0xAA, 0xA8, 0x00, 0x00),
- _INIT_DCS_CMD(0xBD, 0x00),
- _INIT_DCS_CMD(0xE9, 0xC4),
- _INIT_DCS_CMD(0xBA, 0x96),
- _INIT_DCS_CMD(0xE9, 0x3F),
- _INIT_DCS_CMD(0xBD, 0x01),
- _INIT_DCS_CMD(0xE9, 0xC5),
- _INIT_DCS_CMD(0xBA, 0x4F),
- _INIT_DCS_CMD(0xE9, 0x3F),
- _INIT_DCS_CMD(0xBD, 0x00),
- _INIT_DCS_CMD(0x11),
- _INIT_DELAY_CMD(120),
- _INIT_DCS_CMD(0x29),
- {},
-};
+ mipi_dsi_msleep(&ctx, 120);
-static inline struct boe_panel *to_boe_panel(struct drm_panel *panel)
-{
- return container_of(panel, struct boe_panel, base);
-}
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x29);
+
+ mipi_dsi_msleep(&ctx, 120);
-static int boe_panel_init_dcs_cmd(struct boe_panel *boe)
-{
- struct mipi_dsi_device *dsi = boe->dsi;
- struct drm_panel *panel = &boe->base;
- int i, err = 0;
-
- if (boe->desc->init_cmds) {
- const struct panel_init_cmd *init_cmds = boe->desc->init_cmds;
-
- for (i = 0; init_cmds[i].len != 0; i++) {
- const struct panel_init_cmd *cmd = &init_cmds[i];
-
- switch (cmd->type) {
- case DELAY_CMD:
- msleep(cmd->data[0]);
- err = 0;
- break;
-
- case INIT_DCS_CMD:
- err = mipi_dsi_dcs_write(dsi, cmd->data[0],
- cmd->len <= 1 ? NULL :
- &cmd->data[1],
- cmd->len - 1);
- break;
-
- default:
- err = -EINVAL;
- }
-
- if (err < 0) {
- dev_err(panel->dev,
- "failed to write command %u\n", i);
- return err;
- }
- }
- }
return 0;
-}
+};
-static int boe_panel_enter_sleep_mode(struct boe_panel *boe)
+static int auo_b101uan08_3_init(struct boe_panel *boe)
{
- struct mipi_dsi_device *dsi = boe->dsi;
- int ret;
-
- dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
+ struct mipi_dsi_multi_context ctx = { .dsi = boe->dsi };
+
+ msleep(24);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x48);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x48);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0x47);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0x47);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc6, 0x45);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc7, 0x45);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0x64);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x64);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcc, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xce, 0x66);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcf, 0x66);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd0, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd1, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd2, 0x41);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd3, 0x41);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd4, 0x48);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd5, 0x48);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd6, 0x47);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd7, 0x47);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd8, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd9, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xda, 0x45);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdb, 0x45);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdc, 0x64);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdd, 0x64);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xde, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdf, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe0, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe1, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe2, 0x66);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe3, 0x66);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe4, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe5, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe6, 0x41);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe7, 0x41);
+
+ mipi_dsi_msleep(&ctx, 150);
- ret = mipi_dsi_dcs_set_display_off(dsi);
- if (ret < 0)
- return ret;
+ return 0;
+};
- ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
- if (ret < 0)
- return ret;
+static int starry_qfh032011_53g_init(struct boe_panel *boe)
+{
+ struct mipi_dsi_multi_context ctx = { .dsi = boe->dsi };
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc6, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc7, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0x4d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x52);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x51);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd, 0x5d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xce, 0x5b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcf, 0x4b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd0, 0x49);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd1, 0x47);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd2, 0x45);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd3, 0x41);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd7, 0x50);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd8, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd9, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xda, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdb, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdc, 0x4e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdd, 0x52);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xde, 0x51);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe1, 0x5e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe2, 0x5c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe3, 0x4c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe4, 0x4a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe5, 0x48);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe6, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe7, 0x42);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbe, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcc, 0x44);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x42);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd, 0x3e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcf, 0x60);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd2, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd3, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd4, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd5, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd6, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd7, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd9, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe4, 0xf0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe5, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcc, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0x24);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0x23);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0x29);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc6, 0x23);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc7, 0x1c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0x19);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0x17);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x17);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x18);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcc, 0x1a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd, 0x1e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xce, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcf, 0x23);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd0, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd1, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd2, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd3, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd4, 0x13);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd5, 0x1c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd6, 0x1a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd7, 0x13);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd8, 0x17);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd9, 0x1c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xda, 0x19);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdb, 0x17);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdc, 0x17);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdd, 0x18);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xde, 0x1a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdf, 0x1e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe0, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe1, 0x23);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe2, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0X11);
+
+ mipi_dsi_msleep(&ctx, 120);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0X29);
+
+ mipi_dsi_msleep(&ctx, 80);
return 0;
+};
+
+static inline struct boe_panel *to_boe_panel(struct drm_panel *panel)
+{
+ return container_of(panel, struct boe_panel, base);
}
static int boe_panel_disable(struct drm_panel *panel)
{
struct boe_panel *boe = to_boe_panel(panel);
- int ret;
+ struct mipi_dsi_multi_context ctx = { .dsi = boe->dsi };
- ret = boe_panel_enter_sleep_mode(boe);
- if (ret < 0) {
- dev_err(panel->dev, "failed to set panel off: %d\n", ret);
- return ret;
- }
+ boe->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
- msleep(150);
+ mipi_dsi_dcs_set_display_off_multi(&ctx);
+ mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
- return 0;
+ mipi_dsi_msleep(&ctx, 150);
+
+ return ctx.accum_err;
}
static int boe_panel_unprepare(struct drm_panel *panel)
{
struct boe_panel *boe = to_boe_panel(panel);
- if (!boe->prepared)
- return 0;
-
if (boe->desc->discharge_on_disable) {
regulator_disable(boe->avee);
regulator_disable(boe->avdd);
@@ -1471,8 +1415,6 @@ static int boe_panel_unprepare(struct drm_panel *panel)
regulator_disable(boe->pp3300);
}
- boe->prepared = false;
-
return 0;
}
@@ -1481,9 +1423,6 @@ static int boe_panel_prepare(struct drm_panel *panel)
struct boe_panel *boe = to_boe_panel(panel);
int ret;
- if (boe->prepared)
- return 0;
-
gpiod_set_value(boe->enable_gpio, 0);
usleep_range(1000, 1500);
@@ -1507,7 +1446,11 @@ static int boe_panel_prepare(struct drm_panel *panel)
usleep_range(10000, 11000);
if (boe->desc->lp11_before_reset) {
- mipi_dsi_dcs_nop(boe->dsi);
+ ret = mipi_dsi_dcs_nop(boe->dsi);
+ if (ret < 0) {
+ dev_err(&boe->dsi->dev, "Failed to send NOP: %d\n", ret);
+ goto poweroff;
+ }
usleep_range(1000, 2000);
}
gpiod_set_value(boe->enable_gpio, 1);
@@ -1517,24 +1460,20 @@ static int boe_panel_prepare(struct drm_panel *panel)
gpiod_set_value(boe->enable_gpio, 1);
usleep_range(6000, 10000);
- ret = boe_panel_init_dcs_cmd(boe);
- if (ret < 0) {
- dev_err(panel->dev, "failed to init panel: %d\n", ret);
+ ret = boe->desc->init(boe);
+ if (ret < 0)
goto poweroff;
- }
-
- boe->prepared = true;
return 0;
poweroff:
+ gpiod_set_value(boe->enable_gpio, 0);
regulator_disable(boe->avee);
poweroffavdd:
regulator_disable(boe->avdd);
poweroff1v8:
usleep_range(5000, 7000);
regulator_disable(boe->pp1800);
- gpiod_set_value(boe->enable_gpio, 0);
return ret;
}
@@ -1571,7 +1510,7 @@ static const struct panel_desc boe_tv110c9m_desc = {
| MIPI_DSI_MODE_VIDEO_HSE
| MIPI_DSI_CLOCK_NON_CONTINUOUS
| MIPI_DSI_MODE_VIDEO_BURST,
- .init_cmds = boe_tv110c9m_init_cmd,
+ .init = boe_tv110c9m_init,
};
static const struct drm_display_mode inx_hj110iz_default_mode = {
@@ -1600,7 +1539,7 @@ static const struct panel_desc inx_hj110iz_desc = {
| MIPI_DSI_MODE_VIDEO_HSE
| MIPI_DSI_CLOCK_NON_CONTINUOUS
| MIPI_DSI_MODE_VIDEO_BURST,
- .init_cmds = inx_hj110iz_init_cmd,
+ .init = inx_hj110iz_init,
};
static const struct drm_display_mode boe_tv101wum_nl6_default_mode = {
@@ -1626,7 +1565,7 @@ static const struct panel_desc boe_tv101wum_nl6_desc = {
.format = MIPI_DSI_FMT_RGB888,
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_LPM,
- .init_cmds = boe_init_cmd,
+ .init = boe_init,
.discharge_on_disable = false,
};
@@ -1653,7 +1592,7 @@ static const struct panel_desc auo_kd101n80_45na_desc = {
.format = MIPI_DSI_FMT_RGB888,
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_LPM,
- .init_cmds = auo_kd101n80_45na_init_cmd,
+ .init = auo_kd101n80_45na_init,
.discharge_on_disable = true,
};
@@ -1681,7 +1620,7 @@ static const struct panel_desc boe_tv101wum_n53_desc = {
.format = MIPI_DSI_FMT_RGB888,
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_LPM,
- .init_cmds = boe_init_cmd,
+ .init = boe_init,
};
static const struct drm_display_mode auo_b101uan08_3_default_mode = {
@@ -1708,7 +1647,7 @@ static const struct panel_desc auo_b101uan08_3_desc = {
.format = MIPI_DSI_FMT_RGB888,
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_LPM,
- .init_cmds = auo_b101uan08_3_init_cmd,
+ .init = auo_b101uan08_3_init,
.lp11_before_reset = true,
};
@@ -1736,7 +1675,7 @@ static const struct panel_desc boe_tv105wum_nw0_desc = {
.format = MIPI_DSI_FMT_RGB888,
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_LPM,
- .init_cmds = boe_init_cmd,
+ .init = boe_init,
.lp11_before_reset = true,
};
@@ -1763,35 +1702,7 @@ static const struct panel_desc starry_qfh032011_53g_desc = {
.format = MIPI_DSI_FMT_RGB888,
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_LPM,
- .init_cmds = starry_qfh032011_53g_init_cmd,
- .lp11_before_reset = true,
-};
-
-static const struct drm_display_mode starry_himax83102_j02_default_mode = {
- .clock = 162680,
- .hdisplay = 1200,
- .hsync_start = 1200 + 60,
- .hsync_end = 1200 + 60 + 20,
- .htotal = 1200 + 60 + 20 + 40,
- .vdisplay = 1920,
- .vsync_start = 1920 + 116,
- .vsync_end = 1920 + 116 + 8,
- .vtotal = 1920 + 116 + 8 + 12,
- .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
-};
-
-static const struct panel_desc starry_himax83102_j02_desc = {
- .modes = &starry_himax83102_j02_default_mode,
- .bpc = 8,
- .size = {
- .width_mm = 141,
- .height_mm = 226,
- },
- .lanes = 4,
- .format = MIPI_DSI_FMT_RGB888,
- .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
- MIPI_DSI_MODE_LPM,
- .init_cmds = starry_himax83102_j02_init_cmd,
+ .init = starry_qfh032011_53g_init,
.lp11_before_reset = true,
};
@@ -1922,21 +1833,11 @@ static int boe_panel_probe(struct mipi_dsi_device *dsi)
return ret;
}
-static void boe_panel_shutdown(struct mipi_dsi_device *dsi)
-{
- struct boe_panel *boe = mipi_dsi_get_drvdata(dsi);
-
- drm_panel_disable(&boe->base);
- drm_panel_unprepare(&boe->base);
-}
-
static void boe_panel_remove(struct mipi_dsi_device *dsi)
{
struct boe_panel *boe = mipi_dsi_get_drvdata(dsi);
int ret;
- boe_panel_shutdown(dsi);
-
ret = mipi_dsi_detach(dsi);
if (ret < 0)
dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret);
@@ -1970,9 +1871,6 @@ static const struct of_device_id boe_of_match[] = {
{ .compatible = "starry,2081101qfh032011-53g",
.data = &starry_qfh032011_53g_desc
},
- { .compatible = "starry,himax83102-j02",
- .data = &starry_himax83102_j02_desc
- },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, boe_of_match);
@@ -1984,7 +1882,6 @@ static struct mipi_dsi_driver boe_panel_driver = {
},
.probe = boe_panel_probe,
.remove = boe_panel_remove,
- .shutdown = boe_panel_shutdown,
};
module_mipi_dsi_driver(boe_panel_driver);
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index 6db277efcbb7..67ab6915d6e4 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -222,11 +222,8 @@ struct edp_panel_entry {
struct panel_edp {
struct drm_panel base;
- bool enabled;
bool no_hpd;
- bool prepared;
-
ktime_t prepared_time;
ktime_t powered_on_time;
ktime_t unprepared_time;
@@ -395,14 +392,9 @@ static int panel_edp_disable(struct drm_panel *panel)
{
struct panel_edp *p = to_panel_edp(panel);
- if (!p->enabled)
- return 0;
-
if (p->desc->delay.disable)
msleep(p->desc->delay.disable);
- p->enabled = false;
-
return 0;
}
@@ -420,17 +412,11 @@ static int panel_edp_suspend(struct device *dev)
static int panel_edp_unprepare(struct drm_panel *panel)
{
- struct panel_edp *p = to_panel_edp(panel);
int ret;
- /* Unpreparing when already unprepared is a no-op */
- if (!p->prepared)
- return 0;
-
ret = pm_runtime_put_sync_suspend(panel->dev);
if (ret < 0)
return ret;
- p->prepared = false;
return 0;
}
@@ -542,21 +528,14 @@ static int panel_edp_resume(struct device *dev)
static int panel_edp_prepare(struct drm_panel *panel)
{
- struct panel_edp *p = to_panel_edp(panel);
int ret;
- /* Preparing when already prepared is a no-op */
- if (p->prepared)
- return 0;
-
ret = pm_runtime_get_sync(panel->dev);
if (ret < 0) {
pm_runtime_put_autosuspend(panel->dev);
return ret;
}
- p->prepared = true;
-
return 0;
}
@@ -565,9 +544,6 @@ static int panel_edp_enable(struct drm_panel *panel)
struct panel_edp *p = to_panel_edp(panel);
unsigned int delay;
- if (p->enabled)
- return 0;
-
delay = p->desc->delay.enable;
/*
@@ -598,8 +574,6 @@ static int panel_edp_enable(struct drm_panel *panel)
panel_edp_wait(p->powered_on_time, p->desc->delay.powered_on_to_enable);
- p->enabled = true;
-
return 0;
}
@@ -869,7 +843,6 @@ static int panel_edp_probe(struct device *dev, const struct panel_desc *desc,
if (!panel)
return -ENOMEM;
- panel->enabled = false;
panel->prepared_time = 0;
panel->desc = desc;
panel->aux = aux;
@@ -971,13 +944,34 @@ err_finished_ddc_init:
return err;
}
-static void panel_edp_remove(struct device *dev)
+static void panel_edp_shutdown(struct device *dev)
{
struct panel_edp *panel = dev_get_drvdata(dev);
- drm_panel_remove(&panel->base);
+ /*
+ * NOTE: the following two calls don't really belong here. It is the
+ * responsibility of a correctly written DRM modeset driver to call
+ * drm_atomic_helper_shutdown() at shutdown time and that should
+ * cause the panel to be disabled / unprepared if needed. For now,
+ * however, we'll keep these calls due to the sheer number of
+ * different DRM modeset drivers used with panel-edp. The fact that
+ * we're calling these and _also_ the drm_atomic_helper_shutdown()
+ * will try to disable/unprepare means that we can get a warning about
+ * trying to disable/unprepare an already disabled/unprepared panel,
+ * but that's something we'll have to live with until we've confirmed
+ * that all DRM modeset drivers are properly calling
+ * drm_atomic_helper_shutdown().
+ */
drm_panel_disable(&panel->base);
drm_panel_unprepare(&panel->base);
+}
+
+static void panel_edp_remove(struct device *dev)
+{
+ struct panel_edp *panel = dev_get_drvdata(dev);
+
+ drm_panel_remove(&panel->base);
+ panel_edp_shutdown(dev);
pm_runtime_dont_use_autosuspend(dev);
pm_runtime_disable(dev);
@@ -988,14 +982,6 @@ static void panel_edp_remove(struct device *dev)
panel->drm_edid = NULL;
}
-static void panel_edp_shutdown(struct device *dev)
-{
- struct panel_edp *panel = dev_get_drvdata(dev);
-
- drm_panel_disable(&panel->base);
- drm_panel_unprepare(&panel->base);
-}
-
static const struct display_timing auo_b101ean01_timing = {
.pixelclock = { 65300000, 72500000, 75000000 },
.hactive = { 1280, 1280, 1280 },
@@ -1983,8 +1969,10 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('A', 'U', 'O', 0x1062, &delay_200_500_e50, "B120XAN01.0"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x125c, &delay_200_500_e50, "Unknown"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x145c, &delay_200_500_e50, "B116XAB01.4"),
+ EDP_PANEL_ENTRY('A', 'U', 'O', 0x1999, &delay_200_500_e50, "Unknown"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x1e9b, &delay_200_500_e50, "B133UAN02.1"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x1ea5, &delay_200_500_e50, "B116XAK01.6"),
+ EDP_PANEL_ENTRY('A', 'U', 'O', 0x203d, &delay_200_500_e50, "B140HTN02.0"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x208d, &delay_200_500_e50, "B140HTN02.1"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x235c, &delay_200_500_e50, "B116XTN02.3"),
EDP_PANEL_ENTRY('A', 'U', 'O', 0x239b, &delay_200_500_e50, "B116XAN06.1"),
@@ -2005,6 +1993,8 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0607, &delay_200_500_e200, "Unknown"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0608, &delay_200_500_e50, "NT116WHM-N11"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x0609, &delay_200_500_e50_po2e200, "NT116WHM-N21 V4.1"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x0623, &delay_200_500_e200, "NT116WHM-N21 V4.0"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0668, &delay_200_500_e200, "Unknown"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x068f, &delay_200_500_e200, "Unknown"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x06e5, &delay_200_500_e200, "Unknown"),
@@ -2020,6 +2010,7 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0771, &delay_200_500_e200, "Unknown"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0786, &delay_200_500_p2e80, "NV116WHM-T01"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x0797, &delay_200_500_e200, "Unknown"),
+ EDP_PANEL_ENTRY('B', 'O', 'E', 0x07a8, &delay_200_500_e50_po2e200, "NT116WHM-N21"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x07d1, &boe_nv133fhm_n61.delay, "NV133FHM-N61"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x07d3, &delay_200_500_e200, "Unknown"),
EDP_PANEL_ENTRY('B', 'O', 'E', 0x07f6, &delay_200_500_e200, "NT140FHM-N44"),
@@ -2067,6 +2058,7 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('C', 'M', 'N', 0x1157, &delay_200_500_e80_d50, "N116BGE-EA2"),
EDP_PANEL_ENTRY('C', 'M', 'N', 0x115b, &delay_200_500_e80_d50, "N116BCN-EB1"),
EDP_PANEL_ENTRY('C', 'M', 'N', 0x115e, &delay_200_500_e80_d50, "N116BCA-EA1"),
+ EDP_PANEL_ENTRY('C', 'M', 'N', 0x1160, &delay_200_500_e80_d50, "N116BCJ-EAK"),
EDP_PANEL_ENTRY('C', 'M', 'N', 0x1247, &delay_200_500_e80_d50, "N120ACA-EA1"),
EDP_PANEL_ENTRY('C', 'M', 'N', 0x142b, &delay_200_500_e80_d50, "N140HCA-EAC"),
EDP_PANEL_ENTRY('C', 'M', 'N', 0x142e, &delay_200_500_e80_d50, "N140BGA-EA4"),
@@ -2094,6 +2086,7 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('K', 'D', 'B', 0x0624, &kingdisplay_kd116n21_30nv_a010.delay, "116N21-30NV-A010"),
EDP_PANEL_ENTRY('K', 'D', 'B', 0x1118, &delay_200_500_e50, "KD116N29-30NK-A005"),
EDP_PANEL_ENTRY('K', 'D', 'B', 0x1120, &delay_200_500_e80_d50, "116N29-30NK-C007"),
+ EDP_PANEL_ENTRY('K', 'D', 'B', 0x1212, &delay_200_500_e50, "KD116N0930A16"),
EDP_PANEL_ENTRY('K', 'D', 'C', 0x044f, &delay_200_500_e50, "KD116N9-30NH-F3"),
EDP_PANEL_ENTRY('K', 'D', 'C', 0x05f1, &delay_200_500_e80_d50, "KD116N5-30NV-G7"),
@@ -2113,6 +2106,7 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('S', 'H', 'P', 0x1511, &delay_200_500_e50, "LQ140M1JW48"),
EDP_PANEL_ENTRY('S', 'H', 'P', 0x1523, &sharp_lq140m1jw46.delay, "LQ140M1JW46"),
+ EDP_PANEL_ENTRY('S', 'H', 'P', 0x153a, &delay_200_500_e50, "LQ140T1JH01"),
EDP_PANEL_ENTRY('S', 'H', 'P', 0x154c, &delay_200_500_p2e100, "LQ116M1JW10"),
EDP_PANEL_ENTRY('S', 'T', 'A', 0x0100, &delay_100_500_e200, "2081116HHD028001-51D"),
diff --git a/drivers/gpu/drm/panel/panel-himax-hx83102.c b/drivers/gpu/drm/panel/panel-himax-hx83102.c
new file mode 100644
index 000000000000..6009a3fe1b8f
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-himax-hx83102.c
@@ -0,0 +1,706 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Driver for panels based on Himax HX83102 controller, such as:
+ *
+ * - Starry 10.51" WUXGA MIPI-DSI panel
+ *
+ * Based on drivers/gpu/drm/panel/panel-himax-hx8394.c
+ */
+
+#include <linux/delay.h>
+#include <linux/gpio/consumer.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/regulator/consumer.h>
+
+#include <drm/drm_connector.h>
+#include <drm/drm_crtc.h>
+#include <drm/drm_mipi_dsi.h>
+#include <drm/drm_panel.h>
+
+#include <video/mipi_display.h>
+
+/* Manufacturer specific DSI commands */
+#define HX83102_SETPOWER 0xb1
+#define HX83102_SETDISP 0xb2
+#define HX83102_SETCYC 0xb4
+#define HX83102_SETEXTC 0xb9
+#define HX83102_SETMIPI 0xba
+#define HX83102_SETVDC 0xbc
+#define HX83102_SETBANK 0xbd
+#define HX83102_UNKNOWN_BE 0xbe
+#define HX83102_SETPTBA 0xbf
+#define HX83102_SETSTBA 0xc0
+#define HX83102_SETTCON 0xc7
+#define HX83102_SETRAMDMY 0xc8
+#define HX83102_SETPWM 0xc9
+#define HX83102_SETCLOCK 0xcb
+#define HX83102_SETPANEL 0xcc
+#define HX83102_SETCASCADE 0xd0
+#define HX83102_SETPCTRL 0xd1
+#define HX83102_UNKNOWN_D2 0xd2
+#define HX83102_SETGIP0 0xd3
+#define HX83102_SETGIP1 0xd5
+#define HX83102_SETGIP2 0xd6
+#define HX83102_SETGIP3 0xd8
+#define HX83102_SETGMA 0xe0
+#define HX83102_UNKNOWN_E1 0xe1
+#define HX83102_SETTP1 0xe7
+#define HX83102_SETSPCCMD 0xe9
+
+struct hx83102 {
+ struct drm_panel base;
+ struct mipi_dsi_device *dsi;
+
+ const struct hx83102_panel_desc *desc;
+
+ enum drm_panel_orientation orientation;
+ struct regulator *pp1800;
+ struct regulator *avee;
+ struct regulator *avdd;
+ struct gpio_desc *enable_gpio;
+};
+
+struct hx83102_panel_desc {
+ const struct drm_display_mode *modes;
+
+ /**
+ * @width_mm: width of the panel's active display area
+ * @height_mm: height of the panel's active display area
+ */
+ struct {
+ unsigned int width_mm;
+ unsigned int height_mm;
+ } size;
+
+ int (*init)(struct hx83102 *ctx);
+};
+
+static inline struct hx83102 *panel_to_hx83102(struct drm_panel *panel)
+{
+ return container_of(panel, struct hx83102, base);
+}
+
+static void hx83102_enable_extended_cmds(struct mipi_dsi_multi_context *dsi_ctx, bool enable)
+{
+ if (enable)
+ mipi_dsi_dcs_write_seq_multi(dsi_ctx, HX83102_SETEXTC, 0x83, 0x10, 0x21, 0x55, 0x00);
+ else
+ mipi_dsi_dcs_write_seq_multi(dsi_ctx, HX83102_SETEXTC, 0x00, 0x00, 0x00);
+}
+
+static int starry_himax83102_j02_init(struct hx83102 *ctx)
+{
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
+
+ hx83102_enable_extended_cmds(&dsi_ctx, true);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPOWER, 0x2c, 0xb5, 0xb5, 0x31, 0xf1,
+ 0x31, 0xd7, 0x2f, 0x36, 0x36, 0x36, 0x36, 0x1a, 0x8b, 0x11,
+ 0x65, 0x00, 0x88, 0xfa, 0xff, 0xff, 0x8f, 0xff, 0x08, 0x74,
+ 0x33);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETDISP, 0x00, 0x47, 0xb0, 0x80, 0x00,
+ 0x12, 0x72, 0x3c, 0xa3, 0x03, 0x03, 0x00, 0x00, 0x88, 0xf5);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCYC, 0x76, 0x76, 0x76, 0x76, 0x76,
+ 0x76, 0x63, 0x5c, 0x63, 0x5c, 0x01, 0x9e);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xcd);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETMIPI, 0x84);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETVDC, 0x1b, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_UNKNOWN_BE, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPTBA, 0xfc, 0xc4);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSTBA, 0x36, 0x36, 0x22, 0x11, 0x22,
+ 0xa0, 0x61, 0x08, 0xf5, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTCON, 0x80);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc6);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETRAMDMY, 0x97);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPWM, 0x00, 0x1e, 0x13, 0x88, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCLOCK, 0x08, 0x13, 0x07, 0x00, 0x0f, 0x33);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPANEL, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc4);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCASCADE, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPCTRL, 0x37, 0x06, 0x00, 0x02, 0x04, 0x0c,
+ 0xff);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_UNKNOWN_D2, 0x1f, 0x11, 0x1f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x08, 0x37, 0x47, 0x34, 0x3b, 0x12, 0x12, 0x03, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x10, 0x32, 0x10, 0x08, 0x00, 0x08, 0x32,
+ 0x17, 0x94, 0x07, 0x94, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP1, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x18, 0x18, 0x18, 0x18, 0x19, 0x19, 0x40, 0x40, 0x1a, 0x1a, 0x1b,
+ 0x1b, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x20, 0x21,
+ 0x28, 0x29, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x18, 0x18, 0x18, 0x18, 0x18);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP2, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x18, 0x18, 0x18, 0x18, 0x40, 0x40, 0x19, 0x19, 0x1a, 0x1a, 0x1b,
+ 0x1b, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x29, 0x28,
+ 0x21, 0x20, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x18, 0x18, 0x18, 0x18, 0x18);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP3, 0xaa, 0xba, 0xea, 0xaa, 0xaa, 0xa0,
+ 0xaa, 0xba, 0xea, 0xaa, 0xaa, 0xa0, 0xaa, 0xba, 0xea, 0xaa, 0xaa,
+ 0xa0, 0xaa, 0xba, 0xea, 0xaa, 0xaa, 0xa0, 0xaa, 0xba, 0xea, 0xaa,
+ 0xaa, 0xa0, 0xaa, 0xba, 0xea, 0xaa, 0xaa, 0xa0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGMA, 0x00, 0x09, 0x14, 0x1e, 0x26, 0x48,
+ 0x61, 0x67, 0x6c, 0x67, 0x7d, 0x7f, 0x80, 0x8b, 0x87, 0x8f, 0x98,
+ 0xab, 0xab, 0x55, 0x5c, 0x68, 0x73, 0x00, 0x09, 0x14, 0x1e, 0x26,
+ 0x48, 0x61, 0x67, 0x6c, 0x67, 0x7d, 0x7f, 0x80, 0x8b, 0x87, 0x8f,
+ 0x98, 0xab, 0xab, 0x55, 0x5c, 0x68, 0x73);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTP1, 0x0e, 0x10, 0x10, 0x21, 0x2b, 0x9a,
+ 0x02, 0x54, 0x9a, 0x14, 0x14, 0x00, 0x00, 0x00, 0x00, 0x12, 0x05,
+ 0x02, 0x02, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPOWER, 0x01, 0xbf, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCLOCK, 0x86);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_UNKNOWN_D2, 0x3c, 0xfa);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP0, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x0c, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTP1, 0x02, 0x00, 0x28, 0x01, 0x7e, 0x0f,
+ 0x7e, 0x10, 0xa0, 0x00, 0x00, 0x20, 0x40, 0x50, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP3, 0xff, 0xff, 0xbf, 0xfe, 0xaa, 0xa0,
+ 0xff, 0xff, 0xbf, 0xfe, 0xaa, 0xa0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTP1, 0xfe, 0x04, 0xfe, 0x04, 0xfe, 0x04,
+ 0x03, 0x03, 0x03, 0x26, 0x00, 0x26, 0x81, 0x02, 0x40, 0x00, 0x20,
+ 0x9e, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc6);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCYC, 0x03, 0xff, 0xf8);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP3, 0x00, 0x2a, 0xaa, 0xa8, 0x00, 0x00,
+ 0x00, 0x2a, 0xaa, 0xa8, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xfc, 0x00,
+ 0x00, 0x00, 0x3f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x2a, 0xaa, 0xa8,
+ 0x00, 0x00, 0x00, 0x2a, 0xaa, 0xa8, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc4);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETMIPI, 0x96);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc5);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETMIPI, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x00);
+
+ return dsi_ctx.accum_err;
+};
+
+static int boe_nv110wum_init(struct hx83102 *ctx)
+{
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
+
+ msleep(60);
+
+ hx83102_enable_extended_cmds(&dsi_ctx, true);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPOWER, 0x2c, 0xaf, 0xaf, 0x2b, 0xeb, 0x42,
+ 0xe1, 0x4d, 0x36, 0x36, 0x36, 0x36, 0x1a, 0x8b, 0x11, 0x65, 0x00,
+ 0x88, 0xfa, 0xff, 0xff, 0x8f, 0xff, 0x08, 0x9a, 0x33);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETDISP, 0x00, 0x47, 0xb0, 0x80, 0x00, 0x12,
+ 0x71, 0x3c, 0xa3, 0x11, 0x00, 0x00, 0x00, 0x88, 0xf5, 0x22, 0x8f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCYC, 0x49, 0x49, 0x32, 0x32, 0x14, 0x32,
+ 0x84, 0x6e, 0x84, 0x6e, 0x01, 0x9c);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xcd);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETMIPI, 0x84);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETVDC, 0x1b, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_UNKNOWN_BE, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPTBA, 0xfc, 0x84);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSTBA, 0x36, 0x36, 0x22, 0x00, 0x00, 0xa0,
+ 0x61, 0x08, 0xf5, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTCON, 0x80);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc6);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETRAMDMY, 0x97);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPWM, 0x00, 0x1e, 0x30, 0xd4, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCLOCK, 0x08, 0x13, 0x07, 0x00, 0x0f, 0x34);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPANEL, 0x02, 0x03, 0x44);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc4);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCASCADE, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPCTRL, 0x37, 0x06, 0x00, 0x02, 0x04, 0x0c, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_UNKNOWN_D2, 0x1f, 0x11, 0x1f, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04,
+ 0x08, 0x04, 0x08, 0x37, 0x37, 0x64, 0x4b, 0x11, 0x11, 0x03, 0x03, 0x32,
+ 0x10, 0x0e, 0x00, 0x0e, 0x32, 0x10, 0x0a, 0x00, 0x0a, 0x32, 0x17, 0x98,
+ 0x07, 0x98, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP1, 0x18, 0x18, 0x18, 0x18, 0x1e, 0x1e,
+ 0x1e, 0x1e, 0x1f, 0x1f, 0x1f, 0x1f, 0x24, 0x24, 0x24, 0x24, 0x07, 0x06,
+ 0x07, 0x06, 0x05, 0x04, 0x05, 0x04, 0x03, 0x02, 0x03, 0x02, 0x01, 0x00,
+ 0x01, 0x00, 0x21, 0x20, 0x21, 0x20, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x18, 0x18);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP3, 0xaf, 0xaa, 0xaa, 0xaa, 0xaa, 0xa0,
+ 0xaf, 0xaa, 0xaa, 0xaa, 0xaa, 0xa0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGMA, 0x00, 0x05, 0x0d, 0x14, 0x1b, 0x2c,
+ 0x44, 0x49, 0x51, 0x4c, 0x67, 0x6c, 0x71, 0x80, 0x7d, 0x84, 0x8d, 0xa0,
+ 0xa0, 0x4f, 0x58, 0x64, 0x73, 0x00, 0x05, 0x0d, 0x14, 0x1b, 0x2c, 0x44,
+ 0x49, 0x51, 0x4c, 0x67, 0x6c, 0x71, 0x80, 0x7d, 0x84, 0x8d, 0xa0, 0xa0,
+ 0x4f, 0x58, 0x64, 0x73);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTP1, 0x07, 0x10, 0x10, 0x1a, 0x26, 0x9e,
+ 0x00, 0x53, 0x9b, 0x14, 0x14);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_UNKNOWN_E1, 0x11, 0x00, 0x00, 0x89, 0x30, 0x80,
+ 0x07, 0x80, 0x02, 0x58, 0x00, 0x14, 0x02, 0x58, 0x02, 0x58, 0x02, 0x00,
+ 0x02, 0x2c, 0x00, 0x20, 0x02, 0x02, 0x00, 0x08, 0x00, 0x0c, 0x05, 0x0e,
+ 0x04, 0x94, 0x18, 0x00, 0x10, 0xf0, 0x03, 0x0c, 0x20, 0x00, 0x06, 0x0b,
+ 0x0b, 0x33, 0x0e);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP3, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xa0,
+ 0xff, 0xff, 0xff, 0xff, 0xfa, 0xa0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPOWER, 0x01, 0xbf, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCLOCK, 0x86);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_UNKNOWN_D2, 0x96);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc9);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP0, 0x84);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xd1);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_UNKNOWN_E1, 0xf6, 0x2b, 0x34, 0x2b, 0x74, 0x3b,
+ 0x74, 0x6b, 0x74);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTP1, 0x02, 0x00, 0x2b, 0x01, 0x7e, 0x0f,
+ 0x7e, 0x10, 0xa0, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCYC, 0x02, 0x00, 0xbb, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP3, 0xff, 0xaf, 0xff, 0xff, 0xfa, 0xa0,
+ 0xff, 0xaf, 0xff, 0xff, 0xfa, 0xa0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTP1, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01,
+ 0x00, 0x00, 0x00, 0x23, 0x00, 0x23, 0x81, 0x02, 0x40, 0x00, 0x20, 0x65,
+ 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP3, 0xaa, 0xaf, 0xaa, 0xaa, 0xa0, 0x00,
+ 0xaa, 0xaf, 0xaa, 0xaa, 0xa0, 0x00, 0xaa, 0xaf, 0xaa, 0xaa, 0xa0, 0x00,
+ 0xaa, 0xaf, 0xaa, 0xaa, 0xa0, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc6);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCYC, 0x03, 0xff, 0xf8);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_UNKNOWN_E1, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc4);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETMIPI, 0x96);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc5);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETMIPI, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x00);
+ hx83102_enable_extended_cmds(&dsi_ctx, false);
+
+ mipi_dsi_msleep(dsi_ctx, 50);
+
+ return dsi_ctx.accum_err;
+};
+
+static int ivo_t109nw41_init(struct hx83102 *ctx)
+{
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
+
+ msleep(60);
+
+ hx83102_enable_extended_cmds(&dsi_ctx, true);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPOWER, 0x2c, 0xed, 0xed, 0x0f, 0xcf, 0x42,
+ 0xf5, 0x39, 0x36, 0x36, 0x36, 0x36, 0x32, 0x8b, 0x11, 0x65, 0x00, 0x88,
+ 0xfa, 0xff, 0xff, 0x8f, 0xff, 0x08, 0xd6, 0x33);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETDISP, 0x00, 0x47, 0xb0, 0x80, 0x00, 0x12,
+ 0x71, 0x3c, 0xa3, 0x22, 0x20, 0x00, 0x00, 0x88, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCYC, 0x35, 0x35, 0x43, 0x43, 0x35, 0x35,
+ 0x30, 0x7a, 0x30, 0x7a, 0x01, 0x9d);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xcd);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETMIPI, 0x84);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETVDC, 0x1b, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_UNKNOWN_BE, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPTBA, 0xfc, 0xc4);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSTBA, 0x34, 0x34, 0x22, 0x11, 0x22, 0xa0,
+ 0x31, 0x08, 0xf5, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTCON, 0x80);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xd3);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTCON, 0x22);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc6);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETRAMDMY, 0x97);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPWM, 0x00, 0x1e, 0x13, 0x88, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCLOCK, 0x08, 0x13, 0x07, 0x00, 0x0f, 0x34);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPANEL, 0x02, 0x03, 0x44);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc4);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCASCADE, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPCTRL, 0x07, 0x06, 0x00, 0x02, 0x04, 0x2c,
+ 0xff);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x08, 0x08, 0x08, 0x37, 0x07, 0x64, 0x7c, 0x11, 0x11, 0x03, 0x03, 0x32,
+ 0x10, 0x0e, 0x00, 0x0e, 0x32, 0x17, 0x97, 0x07, 0x97, 0x32, 0x00, 0x02,
+ 0x00, 0x02, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP1, 0x25, 0x24, 0x25, 0x24, 0x18, 0x18,
+ 0x18, 0x18, 0x07, 0x06, 0x07, 0x06, 0x05, 0x04, 0x05, 0x04, 0x03, 0x02,
+ 0x03, 0x02, 0x01, 0x00, 0x01, 0x00, 0x1e, 0x1e, 0x1e, 0x1e, 0x1f, 0x1f,
+ 0x1f, 0x1f, 0x21, 0x20, 0x21, 0x20, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x18, 0x18);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP3, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa0,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGMA, 0x04, 0x04, 0x06, 0x0a, 0x0a, 0x05,
+ 0x12, 0x14, 0x17, 0x13, 0x2c, 0x33, 0x39, 0x4b, 0x4c, 0x56, 0x61, 0x78,
+ 0x7a, 0x41, 0x50, 0x68, 0x73, 0x04, 0x04, 0x06, 0x0a, 0x0a, 0x05, 0x12,
+ 0x14, 0x17, 0x13, 0x2c, 0x33, 0x39, 0x4b, 0x4c, 0x56, 0x61, 0x78, 0x7a,
+ 0x41, 0x50, 0x68, 0x73);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTP1, 0x07, 0x10, 0x10, 0x1a, 0x26, 0x9e,
+ 0x00, 0x4f, 0xa0, 0x14, 0x14, 0x00, 0x00, 0x00, 0x00, 0x12, 0x0a, 0x02,
+ 0x02, 0x00, 0x33, 0x02, 0x04, 0x18, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPOWER, 0x01, 0x7f, 0x11, 0xfd);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCLOCK, 0x86);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP0, 0x00, 0x00, 0x04, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa0,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTP1, 0x02, 0x00, 0x2b, 0x01, 0x7e, 0x0f,
+ 0x7e, 0x10, 0xa0, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETPTBA, 0xf2);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCLOCK, 0x03, 0x07, 0x00, 0x10, 0x79);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETGIP3, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xa0,
+ 0xff, 0xff, 0xff, 0xff, 0xfa, 0xa0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETTP1, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01,
+ 0x00, 0x00, 0x00, 0x23, 0x00, 0x23, 0x81, 0x02, 0x40, 0x00, 0x20, 0x6e,
+ 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa0,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa0, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xa0,
+ 0xff, 0xff, 0xff, 0xff, 0xfa, 0xa0, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa0,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc6);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETCYC, 0x03, 0xff, 0xf8);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_UNKNOWN_E1, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_UNKNOWN_D2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc4);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETMIPI, 0x96);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0xc5);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETMIPI, 0x4f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETSPCCMD, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, HX83102_SETBANK, 0x00);
+ hx83102_enable_extended_cmds(&dsi_ctx, false);
+
+ mipi_dsi_msleep(dsi_ctx, 60);
+
+ return dsi_ctx.accum_err;
+};
+
+static const struct drm_display_mode starry_mode = {
+ .clock = 162680,
+ .hdisplay = 1200,
+ .hsync_start = 1200 + 60,
+ .hsync_end = 1200 + 60 + 20,
+ .htotal = 1200 + 60 + 20 + 40,
+ .vdisplay = 1920,
+ .vsync_start = 1920 + 116,
+ .vsync_end = 1920 + 116 + 8,
+ .vtotal = 1920 + 116 + 8 + 12,
+ .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
+};
+
+static const struct hx83102_panel_desc starry_desc = {
+ .modes = &starry_mode,
+ .size = {
+ .width_mm = 141,
+ .height_mm = 226,
+ },
+ .init = starry_himax83102_j02_init,
+};
+
+static const struct drm_display_mode boe_tv110wum_default_mode = {
+ .clock = 167700,
+ .hdisplay = 1200,
+ .hsync_start = 1200 + 75,
+ .hsync_end = 1200 + 75 + 20,
+ .htotal = 1200 + 75 + 20 + 65,
+ .vdisplay = 1920,
+ .vsync_start = 1920 + 115,
+ .vsync_end = 1920 + 115 + 8,
+ .vtotal = 1920 + 115 + 8 + 12,
+ .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
+};
+
+static const struct hx83102_panel_desc boe_nv110wum_desc = {
+ .modes = &boe_tv110wum_default_mode,
+ .size = {
+ .width_mm = 147,
+ .height_mm = 235,
+ },
+ .init = boe_nv110wum_init,
+};
+
+static const struct drm_display_mode ivo_t109nw41_default_mode = {
+ .clock = 167700,
+ .hdisplay = 1200,
+ .hsync_start = 1200 + 75,
+ .hsync_end = 1200 + 75 + 20,
+ .htotal = 1200 + 75 + 20 + 65,
+ .vdisplay = 1920,
+ .vsync_start = 1920 + 115,
+ .vsync_end = 1920 + 115 + 8,
+ .vtotal = 1920 + 115 + 8 + 12,
+ .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
+};
+
+static const struct hx83102_panel_desc ivo_t109nw41_desc = {
+ .modes = &ivo_t109nw41_default_mode,
+ .size = {
+ .width_mm = 147,
+ .height_mm = 235,
+ },
+ .init = ivo_t109nw41_init,
+};
+
+static int hx83102_enable(struct drm_panel *panel)
+{
+ msleep(130);
+ return 0;
+}
+
+static int hx83102_disable(struct drm_panel *panel)
+{
+ struct hx83102 *ctx = panel_to_hx83102(panel);
+ struct mipi_dsi_device *dsi = ctx->dsi;
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
+
+ dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
+
+ mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
+ mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
+
+ mipi_dsi_msleep(&dsi_ctx, 150);
+
+ return dsi_ctx.accum_err;
+}
+
+static int hx83102_unprepare(struct drm_panel *panel)
+{
+ struct hx83102 *ctx = panel_to_hx83102(panel);
+
+ gpiod_set_value(ctx->enable_gpio, 0);
+ usleep_range(1000, 2000);
+ regulator_disable(ctx->avee);
+ regulator_disable(ctx->avdd);
+ usleep_range(5000, 7000);
+ regulator_disable(ctx->pp1800);
+
+ return 0;
+}
+
+static int hx83102_prepare(struct drm_panel *panel)
+{
+ struct hx83102 *ctx = panel_to_hx83102(panel);
+ struct mipi_dsi_device *dsi = ctx->dsi;
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
+
+ gpiod_set_value(ctx->enable_gpio, 0);
+ usleep_range(1000, 1500);
+
+ dsi_ctx.accum_err = regulator_enable(ctx->pp1800);
+ if (dsi_ctx.accum_err)
+ return dsi_ctx.accum_err;
+
+ usleep_range(3000, 5000);
+
+ dsi_ctx.accum_err = regulator_enable(ctx->avdd);
+ if (dsi_ctx.accum_err)
+ goto poweroff1v8;
+ dsi_ctx.accum_err = regulator_enable(ctx->avee);
+ if (dsi_ctx.accum_err)
+ goto poweroffavdd;
+
+ usleep_range(10000, 11000);
+
+ mipi_dsi_dcs_nop_multi(&dsi_ctx);
+ if (dsi_ctx.accum_err)
+ goto poweroff;
+
+ usleep_range(1000, 2000);
+
+ gpiod_set_value(ctx->enable_gpio, 1);
+ usleep_range(1000, 2000);
+ gpiod_set_value(ctx->enable_gpio, 0);
+ usleep_range(1000, 2000);
+ gpiod_set_value(ctx->enable_gpio, 1);
+ usleep_range(6000, 10000);
+
+ dsi_ctx.accum_err = ctx->desc->init(ctx);
+
+ mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
+ mipi_dsi_msleep(dsi_ctx, 120);
+ mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
+ if (dsi_ctx.accum_err)
+ goto poweroff;
+
+ return 0;
+
+poweroff:
+ gpiod_set_value(ctx->enable_gpio, 0);
+ regulator_disable(ctx->avee);
+poweroffavdd:
+ regulator_disable(ctx->avdd);
+poweroff1v8:
+ usleep_range(5000, 7000);
+ regulator_disable(ctx->pp1800);
+
+ return dsi_ctx.accum_err;
+}
+
+static int hx83102_get_modes(struct drm_panel *panel,
+ struct drm_connector *connector)
+{
+ struct hx83102 *ctx = panel_to_hx83102(panel);
+ const struct drm_display_mode *m = ctx->desc->modes;
+ struct drm_display_mode *mode;
+
+ mode = drm_mode_duplicate(connector->dev, m);
+
+ mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
+ drm_mode_set_name(mode);
+ drm_mode_probed_add(connector, mode);
+
+ connector->display_info.width_mm = ctx->desc->size.width_mm;
+ connector->display_info.height_mm = ctx->desc->size.height_mm;
+ connector->display_info.bpc = 8;
+
+ return 1;
+}
+
+static enum drm_panel_orientation hx83102_get_orientation(struct drm_panel *panel)
+{
+ struct hx83102 *ctx = panel_to_hx83102(panel);
+
+ return ctx->orientation;
+}
+
+static const struct drm_panel_funcs hx83102_drm_funcs = {
+ .disable = hx83102_disable,
+ .unprepare = hx83102_unprepare,
+ .prepare = hx83102_prepare,
+ .enable = hx83102_enable,
+ .get_modes = hx83102_get_modes,
+ .get_orientation = hx83102_get_orientation,
+};
+
+static int hx83102_panel_add(struct hx83102 *ctx)
+{
+ struct device *dev = &ctx->dsi->dev;
+ int err;
+
+ ctx->avdd = devm_regulator_get(dev, "avdd");
+ if (IS_ERR(ctx->avdd))
+ return PTR_ERR(ctx->avdd);
+
+ ctx->avee = devm_regulator_get(dev, "avee");
+ if (IS_ERR(ctx->avee))
+ return PTR_ERR(ctx->avee);
+
+ ctx->pp1800 = devm_regulator_get(dev, "pp1800");
+ if (IS_ERR(ctx->pp1800))
+ return PTR_ERR(ctx->pp1800);
+
+ ctx->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
+ if (IS_ERR(ctx->enable_gpio))
+ return dev_err_probe(dev, PTR_ERR(ctx->enable_gpio), "Cannot get enable GPIO\n");
+
+ ctx->base.prepare_prev_first = true;
+
+ drm_panel_init(&ctx->base, dev, &hx83102_drm_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+ err = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation);
+ if (err < 0)
+ return dev_err_probe(dev, err, "failed to get orientation\n");
+
+ err = drm_panel_of_backlight(&ctx->base);
+ if (err)
+ return err;
+
+ ctx->base.funcs = &hx83102_drm_funcs;
+ ctx->base.dev = &ctx->dsi->dev;
+
+ drm_panel_add(&ctx->base);
+
+ return 0;
+}
+
+static int hx83102_probe(struct mipi_dsi_device *dsi)
+{
+ struct hx83102 *ctx;
+ int ret;
+ const struct hx83102_panel_desc *desc;
+
+ ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL);
+ if (!ctx)
+ return -ENOMEM;
+
+ desc = of_device_get_match_data(&dsi->dev);
+ dsi->lanes = 4;
+ dsi->format = MIPI_DSI_FMT_RGB888;
+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
+ MIPI_DSI_MODE_LPM;
+ ctx->desc = desc;
+ ctx->dsi = dsi;
+ ret = hx83102_panel_add(ctx);
+ if (ret < 0)
+ return ret;
+
+ mipi_dsi_set_drvdata(dsi, ctx);
+
+ ret = mipi_dsi_attach(dsi);
+ if (ret)
+ drm_panel_remove(&ctx->base);
+
+ return ret;
+}
+
+static void hx83102_remove(struct mipi_dsi_device *dsi)
+{
+ struct hx83102 *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);
+
+ if (ctx->base.dev)
+ drm_panel_remove(&ctx->base);
+}
+
+static const struct of_device_id hx83102_of_match[] = {
+ { .compatible = "boe,nv110wum-l60",
+ .data = &boe_nv110wum_desc
+ },
+ { .compatible = "ivo,t109nw41",
+ .data = &ivo_t109nw41_desc
+ },
+ { .compatible = "starry,himax83102-j02",
+ .data = &starry_desc
+ },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, hx83102_of_match);
+
+static struct mipi_dsi_driver hx83102_driver = {
+ .probe = hx83102_probe,
+ .remove = hx83102_remove,
+ .driver = {
+ .name = "panel-himax-hx83102",
+ .of_match_table = hx83102_of_match,
+ },
+};
+module_mipi_dsi_driver(hx83102_driver);
+
+MODULE_AUTHOR("Cong Yang <yangcong5@huaqin.corp-partner.google.com>");
+MODULE_DESCRIPTION("DRM driver for Himax HX83102 based MIPI DSI panels");
+MODULE_LICENSE("GPL");
diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c
index ff0dc08b9829..cb9f46e853de 100644
--- a/drivers/gpu/drm/panel/panel-himax-hx8394.c
+++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c
@@ -370,8 +370,7 @@ static int hx8394_enable(struct drm_panel *panel)
sleep_in:
/* This will probably fail, but let's try orderly power off anyway. */
- ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
- if (!ret)
+ if (!mipi_dsi_dcs_enter_sleep_mode(dsi))
msleep(50);
return ret;
diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c
index b933380b7eb7..775d5d5e828c 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c
@@ -32,7 +32,7 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
@@ -651,7 +651,7 @@ static int ili9341_dbi_probe(struct spi_device *spi, struct gpio_desc *dc,
spi_set_drvdata(spi, drm);
- drm_fbdev_generic_setup(drm, 0);
+ drm_fbdev_dma_setup(drm, 0);
return 0;
}
@@ -723,7 +723,8 @@ static int ili9341_probe(struct spi_device *spi)
if (!strcmp(id->name, "sf-tc240t-9370-t"))
return ili9341_dpi_probe(spi, dc, reset);
- else if (!strcmp(id->name, "yx240qv29"))
+
+ if (!strcmp(id->name, "yx240qv29"))
return ili9341_dbi_probe(spi, dc, reset);
return -ENODEV;
diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
index 267a5307041c..266a087fe14c 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
@@ -15,6 +15,8 @@
#include <video/mipi_display.h>
+struct ili9882t;
+
/*
* Use this descriptor struct to describe different panels using the
* Ilitek ILI9882T display controller.
@@ -34,7 +36,7 @@ struct panel_desc {
unsigned long mode_flags;
enum mipi_dsi_pixel_format format;
- const struct panel_init_cmd *init_cmds;
+ int (*init)(struct ili9882t *boe);
unsigned int lanes;
};
@@ -52,371 +54,363 @@ struct ili9882t {
struct gpio_desc *enable_gpio;
};
-enum dsi_cmd_type {
- INIT_DCS_CMD,
- DELAY_CMD,
-};
-
-struct panel_init_cmd {
- enum dsi_cmd_type type;
- size_t len;
- const char *data;
-};
-
-#define _INIT_DCS_CMD(...) { \
- .type = INIT_DCS_CMD, \
- .len = sizeof((char[]){__VA_ARGS__}), \
- .data = (char[]){__VA_ARGS__} }
-
-#define _INIT_DELAY_CMD(...) { \
- .type = DELAY_CMD,\
- .len = sizeof((char[]){__VA_ARGS__}), \
- .data = (char[]){__VA_ARGS__} }
-
/* ILI9882-specific commands, add new commands as you decode them */
#define ILI9882T_DCS_SWITCH_PAGE 0xFF
-#define _INIT_SWITCH_PAGE_CMD(page) \
- _INIT_DCS_CMD(ILI9882T_DCS_SWITCH_PAGE, 0x98, 0x82, (page))
-
-static const struct panel_init_cmd starry_ili9882t_init_cmd[] = {
- _INIT_DELAY_CMD(5),
- _INIT_SWITCH_PAGE_CMD(0x01),
- _INIT_DCS_CMD(0x00, 0x42),
- _INIT_DCS_CMD(0x01, 0x11),
- _INIT_DCS_CMD(0x02, 0x00),
- _INIT_DCS_CMD(0x03, 0x00),
-
- _INIT_DCS_CMD(0x04, 0x01),
- _INIT_DCS_CMD(0x05, 0x11),
- _INIT_DCS_CMD(0x06, 0x00),
- _INIT_DCS_CMD(0x07, 0x00),
-
- _INIT_DCS_CMD(0x08, 0x80),
- _INIT_DCS_CMD(0x09, 0x81),
- _INIT_DCS_CMD(0x0A, 0x71),
- _INIT_DCS_CMD(0x0B, 0x00),
-
- _INIT_DCS_CMD(0x0C, 0x00),
- _INIT_DCS_CMD(0x0E, 0x1A),
-
- _INIT_DCS_CMD(0x24, 0x00),
- _INIT_DCS_CMD(0x25, 0x00),
- _INIT_DCS_CMD(0x26, 0x00),
- _INIT_DCS_CMD(0x27, 0x00),
-
- _INIT_DCS_CMD(0x2C, 0xD4),
- _INIT_DCS_CMD(0xB9, 0x40),
-
- _INIT_DCS_CMD(0xB0, 0x11),
-
- _INIT_DCS_CMD(0xE6, 0x32),
- _INIT_DCS_CMD(0xD1, 0x30),
-
- _INIT_DCS_CMD(0xD6, 0x55),
-
- _INIT_DCS_CMD(0xD0, 0x01),
- _INIT_DCS_CMD(0xE3, 0x93),
- _INIT_DCS_CMD(0xE4, 0x00),
- _INIT_DCS_CMD(0xE5, 0x80),
-
- _INIT_DCS_CMD(0x31, 0x07),
- _INIT_DCS_CMD(0x32, 0x07),
- _INIT_DCS_CMD(0x33, 0x07),
- _INIT_DCS_CMD(0x34, 0x07),
- _INIT_DCS_CMD(0x35, 0x07),
- _INIT_DCS_CMD(0x36, 0x01),
- _INIT_DCS_CMD(0x37, 0x00),
- _INIT_DCS_CMD(0x38, 0x28),
- _INIT_DCS_CMD(0x39, 0x29),
- _INIT_DCS_CMD(0x3A, 0x11),
- _INIT_DCS_CMD(0x3B, 0x13),
- _INIT_DCS_CMD(0x3C, 0x15),
- _INIT_DCS_CMD(0x3D, 0x17),
- _INIT_DCS_CMD(0x3E, 0x09),
- _INIT_DCS_CMD(0x3F, 0x0D),
- _INIT_DCS_CMD(0x40, 0x02),
- _INIT_DCS_CMD(0x41, 0x02),
- _INIT_DCS_CMD(0x42, 0x02),
- _INIT_DCS_CMD(0x43, 0x02),
- _INIT_DCS_CMD(0x44, 0x02),
- _INIT_DCS_CMD(0x45, 0x02),
- _INIT_DCS_CMD(0x46, 0x02),
-
- _INIT_DCS_CMD(0x47, 0x07),
- _INIT_DCS_CMD(0x48, 0x07),
- _INIT_DCS_CMD(0x49, 0x07),
- _INIT_DCS_CMD(0x4A, 0x07),
- _INIT_DCS_CMD(0x4B, 0x07),
- _INIT_DCS_CMD(0x4C, 0x01),
- _INIT_DCS_CMD(0x4D, 0x00),
- _INIT_DCS_CMD(0x4E, 0x28),
- _INIT_DCS_CMD(0x4F, 0x29),
- _INIT_DCS_CMD(0x50, 0x10),
- _INIT_DCS_CMD(0x51, 0x12),
- _INIT_DCS_CMD(0x52, 0x14),
- _INIT_DCS_CMD(0x53, 0x16),
- _INIT_DCS_CMD(0x54, 0x08),
- _INIT_DCS_CMD(0x55, 0x0C),
- _INIT_DCS_CMD(0x56, 0x02),
- _INIT_DCS_CMD(0x57, 0x02),
- _INIT_DCS_CMD(0x58, 0x02),
- _INIT_DCS_CMD(0x59, 0x02),
- _INIT_DCS_CMD(0x5A, 0x02),
- _INIT_DCS_CMD(0x5B, 0x02),
- _INIT_DCS_CMD(0x5C, 0x02),
-
- _INIT_DCS_CMD(0x61, 0x07),
- _INIT_DCS_CMD(0x62, 0x07),
- _INIT_DCS_CMD(0x63, 0x07),
- _INIT_DCS_CMD(0x64, 0x07),
- _INIT_DCS_CMD(0x65, 0x07),
- _INIT_DCS_CMD(0x66, 0x01),
- _INIT_DCS_CMD(0x67, 0x00),
- _INIT_DCS_CMD(0x68, 0x28),
- _INIT_DCS_CMD(0x69, 0x29),
- _INIT_DCS_CMD(0x6A, 0x16),
- _INIT_DCS_CMD(0x6B, 0x14),
- _INIT_DCS_CMD(0x6C, 0x12),
- _INIT_DCS_CMD(0x6D, 0x10),
- _INIT_DCS_CMD(0x6E, 0x0C),
- _INIT_DCS_CMD(0x6F, 0x08),
- _INIT_DCS_CMD(0x70, 0x02),
- _INIT_DCS_CMD(0x71, 0x02),
- _INIT_DCS_CMD(0x72, 0x02),
- _INIT_DCS_CMD(0x73, 0x02),
- _INIT_DCS_CMD(0x74, 0x02),
- _INIT_DCS_CMD(0x75, 0x02),
- _INIT_DCS_CMD(0x76, 0x02),
-
- _INIT_DCS_CMD(0x77, 0x07),
- _INIT_DCS_CMD(0x78, 0x07),
- _INIT_DCS_CMD(0x79, 0x07),
- _INIT_DCS_CMD(0x7A, 0x07),
- _INIT_DCS_CMD(0x7B, 0x07),
- _INIT_DCS_CMD(0x7C, 0x01),
- _INIT_DCS_CMD(0x7D, 0x00),
- _INIT_DCS_CMD(0x7E, 0x28),
- _INIT_DCS_CMD(0x7F, 0x29),
- _INIT_DCS_CMD(0x80, 0x17),
- _INIT_DCS_CMD(0x81, 0x15),
- _INIT_DCS_CMD(0x82, 0x13),
- _INIT_DCS_CMD(0x83, 0x11),
- _INIT_DCS_CMD(0x84, 0x0D),
- _INIT_DCS_CMD(0x85, 0x09),
- _INIT_DCS_CMD(0x86, 0x02),
- _INIT_DCS_CMD(0x87, 0x07),
- _INIT_DCS_CMD(0x88, 0x07),
- _INIT_DCS_CMD(0x89, 0x07),
- _INIT_DCS_CMD(0x8A, 0x07),
- _INIT_DCS_CMD(0x8B, 0x07),
- _INIT_DCS_CMD(0x8C, 0x07),
-
- _INIT_SWITCH_PAGE_CMD(0x02),
- _INIT_DCS_CMD(0x29, 0x3A),
- _INIT_DCS_CMD(0x2A, 0x3B),
-
- _INIT_DCS_CMD(0x06, 0x01),
- _INIT_DCS_CMD(0x07, 0x01),
- _INIT_DCS_CMD(0x08, 0x0C),
- _INIT_DCS_CMD(0x09, 0x44),
-
- _INIT_DCS_CMD(0x3C, 0x0A),
- _INIT_DCS_CMD(0x39, 0x11),
- _INIT_DCS_CMD(0x3D, 0x00),
- _INIT_DCS_CMD(0x3A, 0x0C),
- _INIT_DCS_CMD(0x3B, 0x44),
-
- _INIT_DCS_CMD(0x53, 0x1F),
- _INIT_DCS_CMD(0x5E, 0x40),
- _INIT_DCS_CMD(0x84, 0x00),
-
- _INIT_SWITCH_PAGE_CMD(0x03),
- _INIT_DCS_CMD(0x20, 0x01),
- _INIT_DCS_CMD(0x21, 0x3C),
- _INIT_DCS_CMD(0x22, 0xFA),
-
- _INIT_SWITCH_PAGE_CMD(0x0A),
- _INIT_DCS_CMD(0xE0, 0x01),
- _INIT_DCS_CMD(0xE2, 0x01),
- _INIT_DCS_CMD(0xE5, 0x91),
- _INIT_DCS_CMD(0xE6, 0x3C),
- _INIT_DCS_CMD(0xE7, 0x00),
- _INIT_DCS_CMD(0xE8, 0xFA),
-
- _INIT_SWITCH_PAGE_CMD(0x12),
- _INIT_DCS_CMD(0x87, 0x2C),
-
- _INIT_SWITCH_PAGE_CMD(0x05),
- _INIT_DCS_CMD(0x73, 0xE5),
- _INIT_DCS_CMD(0x7F, 0x6B),
- _INIT_DCS_CMD(0x6D, 0xA4),
- _INIT_DCS_CMD(0x79, 0x54),
- _INIT_DCS_CMD(0x69, 0x97),
- _INIT_DCS_CMD(0x6A, 0x97),
- _INIT_DCS_CMD(0xA5, 0x3F),
- _INIT_DCS_CMD(0x61, 0xDA),
- _INIT_DCS_CMD(0xA7, 0xF1),
- _INIT_DCS_CMD(0x5F, 0x01),
- _INIT_DCS_CMD(0x62, 0x3F),
- _INIT_DCS_CMD(0x1D, 0x90),
- _INIT_DCS_CMD(0x86, 0x87),
-
- _INIT_SWITCH_PAGE_CMD(0x06),
- _INIT_DCS_CMD(0xC0, 0x80),
- _INIT_DCS_CMD(0xC1, 0x07),
- _INIT_DCS_CMD(0xCA, 0x58),
- _INIT_DCS_CMD(0xCB, 0x02),
- _INIT_DCS_CMD(0xCE, 0x58),
- _INIT_DCS_CMD(0xCF, 0x02),
- _INIT_DCS_CMD(0x67, 0x60),
- _INIT_DCS_CMD(0x10, 0x00),
- _INIT_DCS_CMD(0x92, 0x22),
- _INIT_DCS_CMD(0xD3, 0x08),
- _INIT_DCS_CMD(0xD6, 0x55),
- _INIT_DCS_CMD(0xDC, 0x38),
-
- _INIT_SWITCH_PAGE_CMD(0x08),
- _INIT_DCS_CMD(0xE0, 0x00, 0x10, 0x2A, 0x4D, 0x61, 0x56, 0x6A, 0x6E, 0x79, 0x76, 0x8F, 0x95, 0x98, 0xAE, 0xAA, 0xB2, 0xBB, 0xCE, 0xC6, 0xBD, 0xD5, 0xE2, 0xE8),
- _INIT_DCS_CMD(0xE1, 0x00, 0x10, 0x2A, 0x4D, 0x61, 0x56, 0x6A, 0x6E, 0x79, 0x76, 0x8F, 0x95, 0x98, 0xAE, 0xAA, 0xB2, 0xBB, 0xCE, 0xC6, 0xBD, 0xD5, 0xE2, 0xE8),
-
- _INIT_SWITCH_PAGE_CMD(0x04),
- _INIT_DCS_CMD(0xBA, 0x81),
-
- _INIT_SWITCH_PAGE_CMD(0x0C),
- _INIT_DCS_CMD(0x00, 0x02),
- _INIT_DCS_CMD(0x01, 0x00),
- _INIT_DCS_CMD(0x02, 0x03),
- _INIT_DCS_CMD(0x03, 0x01),
- _INIT_DCS_CMD(0x04, 0x03),
- _INIT_DCS_CMD(0x05, 0x02),
- _INIT_DCS_CMD(0x06, 0x04),
- _INIT_DCS_CMD(0x07, 0x03),
- _INIT_DCS_CMD(0x08, 0x03),
- _INIT_DCS_CMD(0x09, 0x04),
- _INIT_DCS_CMD(0x0A, 0x04),
- _INIT_DCS_CMD(0x0B, 0x05),
- _INIT_DCS_CMD(0x0C, 0x04),
- _INIT_DCS_CMD(0x0D, 0x06),
- _INIT_DCS_CMD(0x0E, 0x05),
- _INIT_DCS_CMD(0x0F, 0x07),
- _INIT_DCS_CMD(0x10, 0x04),
- _INIT_DCS_CMD(0x11, 0x08),
- _INIT_DCS_CMD(0x12, 0x05),
- _INIT_DCS_CMD(0x13, 0x09),
- _INIT_DCS_CMD(0x14, 0x05),
- _INIT_DCS_CMD(0x15, 0x0A),
- _INIT_DCS_CMD(0x16, 0x06),
- _INIT_DCS_CMD(0x17, 0x0B),
- _INIT_DCS_CMD(0x18, 0x05),
- _INIT_DCS_CMD(0x19, 0x0C),
- _INIT_DCS_CMD(0x1A, 0x06),
- _INIT_DCS_CMD(0x1B, 0x0D),
- _INIT_DCS_CMD(0x1C, 0x06),
- _INIT_DCS_CMD(0x1D, 0x0E),
- _INIT_DCS_CMD(0x1E, 0x07),
- _INIT_DCS_CMD(0x1F, 0x0F),
- _INIT_DCS_CMD(0x20, 0x06),
- _INIT_DCS_CMD(0x21, 0x10),
- _INIT_DCS_CMD(0x22, 0x07),
- _INIT_DCS_CMD(0x23, 0x11),
- _INIT_DCS_CMD(0x24, 0x07),
- _INIT_DCS_CMD(0x25, 0x12),
- _INIT_DCS_CMD(0x26, 0x08),
- _INIT_DCS_CMD(0x27, 0x13),
- _INIT_DCS_CMD(0x28, 0x07),
- _INIT_DCS_CMD(0x29, 0x14),
- _INIT_DCS_CMD(0x2A, 0x08),
- _INIT_DCS_CMD(0x2B, 0x15),
- _INIT_DCS_CMD(0x2C, 0x08),
- _INIT_DCS_CMD(0x2D, 0x16),
- _INIT_DCS_CMD(0x2E, 0x09),
- _INIT_DCS_CMD(0x2F, 0x17),
- _INIT_DCS_CMD(0x30, 0x08),
- _INIT_DCS_CMD(0x31, 0x18),
- _INIT_DCS_CMD(0x32, 0x09),
- _INIT_DCS_CMD(0x33, 0x19),
- _INIT_DCS_CMD(0x34, 0x09),
- _INIT_DCS_CMD(0x35, 0x1A),
- _INIT_DCS_CMD(0x36, 0x0A),
- _INIT_DCS_CMD(0x37, 0x1B),
- _INIT_DCS_CMD(0x38, 0x0A),
- _INIT_DCS_CMD(0x39, 0x1C),
- _INIT_DCS_CMD(0x3A, 0x0A),
- _INIT_DCS_CMD(0x3B, 0x1D),
- _INIT_DCS_CMD(0x3C, 0x0A),
- _INIT_DCS_CMD(0x3D, 0x1E),
- _INIT_DCS_CMD(0x3E, 0x0A),
- _INIT_DCS_CMD(0x3F, 0x1F),
-
- _INIT_SWITCH_PAGE_CMD(0x04),
- _INIT_DCS_CMD(0xBA, 0x01),
-
- _INIT_SWITCH_PAGE_CMD(0x0E),
- _INIT_DCS_CMD(0x02, 0x0C),
- _INIT_DCS_CMD(0x20, 0x10),
- _INIT_DCS_CMD(0x25, 0x16),
- _INIT_DCS_CMD(0x26, 0xE0),
- _INIT_DCS_CMD(0x27, 0x00),
- _INIT_DCS_CMD(0x29, 0x71),
- _INIT_DCS_CMD(0x2A, 0x46),
- _INIT_DCS_CMD(0x2B, 0x1F),
- _INIT_DCS_CMD(0x2D, 0xC7),
- _INIT_DCS_CMD(0x31, 0x02),
- _INIT_DCS_CMD(0x32, 0xDF),
- _INIT_DCS_CMD(0x33, 0x5A),
- _INIT_DCS_CMD(0x34, 0xC0),
- _INIT_DCS_CMD(0x35, 0x5A),
- _INIT_DCS_CMD(0x36, 0xC0),
- _INIT_DCS_CMD(0x38, 0x65),
- _INIT_DCS_CMD(0x80, 0x3E),
- _INIT_DCS_CMD(0x81, 0xA0),
- _INIT_DCS_CMD(0xB0, 0x01),
- _INIT_DCS_CMD(0xB1, 0xCC),
- _INIT_DCS_CMD(0xC0, 0x12),
- _INIT_DCS_CMD(0xC2, 0xCC),
- _INIT_DCS_CMD(0xC3, 0xCC),
- _INIT_DCS_CMD(0xC4, 0xCC),
- _INIT_DCS_CMD(0xC5, 0xCC),
- _INIT_DCS_CMD(0xC6, 0xCC),
- _INIT_DCS_CMD(0xC7, 0xCC),
- _INIT_DCS_CMD(0xC8, 0xCC),
- _INIT_DCS_CMD(0xC9, 0xCC),
- _INIT_DCS_CMD(0x30, 0x00),
- _INIT_DCS_CMD(0x00, 0x81),
- _INIT_DCS_CMD(0x08, 0x02),
- _INIT_DCS_CMD(0x09, 0x00),
- _INIT_DCS_CMD(0x07, 0x21),
- _INIT_DCS_CMD(0x04, 0x10),
-
- _INIT_SWITCH_PAGE_CMD(0x1E),
- _INIT_DCS_CMD(0x60, 0x00),
- _INIT_DCS_CMD(0x64, 0x00),
- _INIT_DCS_CMD(0x6D, 0x00),
-
- _INIT_SWITCH_PAGE_CMD(0x0B),
- _INIT_DCS_CMD(0xA6, 0x44),
- _INIT_DCS_CMD(0xA7, 0xB6),
- _INIT_DCS_CMD(0xA8, 0x03),
- _INIT_DCS_CMD(0xA9, 0x03),
- _INIT_DCS_CMD(0xAA, 0x51),
- _INIT_DCS_CMD(0xAB, 0x51),
- _INIT_DCS_CMD(0xAC, 0x04),
- _INIT_DCS_CMD(0xBD, 0x92),
- _INIT_DCS_CMD(0xBE, 0xA1),
-
- _INIT_SWITCH_PAGE_CMD(0x05),
- _INIT_DCS_CMD(0x86, 0x87),
-
- _INIT_SWITCH_PAGE_CMD(0x06),
- _INIT_DCS_CMD(0x92, 0x22),
-
- _INIT_SWITCH_PAGE_CMD(0x00),
- _INIT_DCS_CMD(MIPI_DCS_EXIT_SLEEP_MODE),
- _INIT_DELAY_CMD(120),
- _INIT_DCS_CMD(MIPI_DCS_SET_DISPLAY_ON),
- _INIT_DELAY_CMD(20),
- {},
+#define ili9882t_switch_page(ctx, page) \
+ mipi_dsi_dcs_write_seq_multi(ctx, ILI9882T_DCS_SWITCH_PAGE, \
+ 0x98, 0x82, (page))
+
+static int starry_ili9882t_init(struct ili9882t *ili)
+{
+ struct mipi_dsi_multi_context ctx = { .dsi = ili->dsi };
+
+ usleep_range(5000, 5100);
+
+ ili9882t_switch_page(&ctx, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x00, 0x42);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x01, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x02, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x03, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x04, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x05, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x06, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x07, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x08, 0x80);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x09, 0x81);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0a, 0x71);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0b, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0c, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0e, 0x1a);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x24, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x25, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x26, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x27, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2c, 0xd4);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb9, 0x40);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x11);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe6, 0x32);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd1, 0x30);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd6, 0x55);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd0, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe3, 0x93);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe4, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe5, 0x80);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x31, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x32, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x33, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x34, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x35, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x36, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x37, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x38, 0x28);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x39, 0x29);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3a, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3b, 0x13);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3c, 0x15);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3d, 0x17);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3e, 0x09);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3f, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x40, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x41, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x42, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x43, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x44, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x45, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x46, 0x02);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x47, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x48, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x49, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4a, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4b, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4c, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4e, 0x28);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x4f, 0x29);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x50, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x51, 0x12);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x52, 0x14);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x53, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x54, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x55, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x56, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x57, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x58, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x59, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5a, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5b, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5c, 0x02);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x61, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x62, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x63, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x64, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x65, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x66, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x67, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x68, 0x28);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x69, 0x29);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6a, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6b, 0x14);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6c, 0x12);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6d, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6e, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6f, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x70, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x71, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x72, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x73, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x74, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x75, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x76, 0x02);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x77, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x78, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x79, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7a, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7b, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7c, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7e, 0x28);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7f, 0x29);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x80, 0x17);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x81, 0x15);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x82, 0x13);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x83, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x84, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x85, 0x09);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x86, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x87, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x88, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x89, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x8a, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x8b, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x8c, 0x07);
+
+ ili9882t_switch_page(&ctx, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x29, 0x3a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2a, 0x3b);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x06, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x07, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x08, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x09, 0x44);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3c, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x39, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3a, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3b, 0x44);
+
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x53, 0x1f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5e, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x84, 0x00);
+
+ ili9882t_switch_page(&ctx, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x20, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x21, 0x3c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x22, 0xfa);
+
+ ili9882t_switch_page(&ctx, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe0, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe2, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe5, 0x91);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe6, 0x3c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe7, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe8, 0xfa);
+
+ ili9882t_switch_page(&ctx, 0x12);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x87, 0x2c);
+
+ ili9882t_switch_page(&ctx, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x73, 0xe5);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x7f, 0x6b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6d, 0xa4);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x79, 0x54);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x69, 0x97);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6a, 0x97);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa5, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x61, 0xda);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa7, 0xf1);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x5f, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x62, 0x3f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1d, 0x90);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x86, 0x87);
+
+ ili9882t_switch_page(&ctx, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x80);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc1, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xca, 0x58);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xce, 0x58);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcf, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x67, 0x60);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x10, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x92, 0x22);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd3, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xd6, 0x55);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xdc, 0x38);
+
+ ili9882t_switch_page(&ctx, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe0, 0x00, 0x10, 0x2a, 0x4d, 0x61, 0x56, 0x6a, 0x6e,
+ 0x79, 0x76, 0x8f, 0x95, 0x98, 0xae, 0xaa, 0xb2, 0xbb, 0xce,
+ 0xc6, 0xbd, 0xd5, 0xe2, 0xe8);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe1, 0x00, 0x10, 0x2a, 0x4d, 0x61, 0x56, 0x6a, 0x6e,
+ 0x79, 0x76, 0x8f, 0x95, 0x98, 0xae, 0xaa, 0xb2, 0xbb, 0xce,
+ 0xc6, 0xbd, 0xd5, 0xe2, 0xe8);
+
+ ili9882t_switch_page(&ctx, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x81);
+
+ ili9882t_switch_page(&ctx, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x00, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x01, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x02, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x03, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x04, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x05, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x06, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x07, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x08, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x09, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0a, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0b, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0c, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0d, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0e, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x0f, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x10, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x11, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x12, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x13, 0x09);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x14, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x15, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x16, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x17, 0x0b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x18, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x19, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1a, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1b, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1c, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1d, 0x0e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1e, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x1f, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x20, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x21, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x22, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x23, 0x11);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x24, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x25, 0x12);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x26, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x27, 0x13);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x28, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x29, 0x14);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2a, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2b, 0x15);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2c, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2d, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2e, 0x09);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2f, 0x17);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x30, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x31, 0x18);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x32, 0x09);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x33, 0x19);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x34, 0x09);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x35, 0x1a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x36, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x37, 0x1b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x38, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x39, 0x1c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3a, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3b, 0x1d);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3c, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3d, 0x1e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3e, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x3f, 0x1f);
+
+ ili9882t_switch_page(&ctx, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x01);
+
+ ili9882t_switch_page(&ctx, 0x0e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x02, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x20, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x25, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x26, 0xe0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x27, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x29, 0x71);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2a, 0x46);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2b, 0x1f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x2d, 0xc7);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x31, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x32, 0xdf);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x33, 0x5a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x34, 0xc0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x35, 0x5a);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x36, 0xc0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x38, 0x65);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x80, 0x3e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x81, 0xa0);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb1, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x12);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc2, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc3, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc4, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc5, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc6, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc7, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc8, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc9, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x30, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x00, 0x81);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x08, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x09, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x07, 0x21);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x04, 0x10);
+
+ ili9882t_switch_page(&ctx, 0x1e);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x60, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x64, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x6d, 0x00);
+
+ ili9882t_switch_page(&ctx, 0x0b);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa6, 0x44);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa7, 0xb6);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa8, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xa9, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xaa, 0x51);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xab, 0x51);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xac, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbd, 0x92);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xbe, 0xa1);
+
+ ili9882t_switch_page(&ctx, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x86, 0x87);
+
+ ili9882t_switch_page(&ctx, 0x06);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x92, 0x22);
+
+ ili9882t_switch_page(&ctx, 0x00);
+ mipi_dsi_dcs_exit_sleep_mode_multi(&ctx);
+
+ mipi_dsi_msleep(&ctx, 120);
+
+ mipi_dsi_dcs_set_display_on_multi(&ctx);
+
+ mipi_dsi_msleep(&ctx, 20);
+
+ return ctx.accum_err;
};
static inline struct ili9882t *to_ili9882t(struct drm_panel *panel)
@@ -424,97 +418,21 @@ static inline struct ili9882t *to_ili9882t(struct drm_panel *panel)
return container_of(panel, struct ili9882t, base);
}
-static int ili9882t_init_dcs_cmd(struct ili9882t *ili)
-{
- struct mipi_dsi_device *dsi = ili->dsi;
- struct drm_panel *panel = &ili->base;
- int i, err = 0;
-
- if (ili->desc->init_cmds) {
- const struct panel_init_cmd *init_cmds = ili->desc->init_cmds;
-
- for (i = 0; init_cmds[i].len != 0; i++) {
- const struct panel_init_cmd *cmd = &init_cmds[i];
-
- switch (cmd->type) {
- case DELAY_CMD:
- msleep(cmd->data[0]);
- err = 0;
- break;
-
- case INIT_DCS_CMD:
- err = mipi_dsi_dcs_write(dsi, cmd->data[0],
- cmd->len <= 1 ? NULL :
- &cmd->data[1],
- cmd->len - 1);
- break;
-
- default:
- err = -EINVAL;
- }
-
- if (err < 0) {
- dev_err(panel->dev,
- "failed to write command %u\n", i);
- return err;
- }
- }
- }
- return 0;
-}
-
-static int ili9882t_switch_page(struct mipi_dsi_device *dsi, u8 page)
-{
- int ret;
- const struct panel_init_cmd cmd = _INIT_SWITCH_PAGE_CMD(page);
-
- ret = mipi_dsi_dcs_write(dsi, cmd.data[0],
- cmd.len <= 1 ? NULL :
- &cmd.data[1],
- cmd.len - 1);
- if (ret) {
- dev_err(&dsi->dev,
- "error switching panel controller page (%d)\n", ret);
- return ret;
- }
-
- return 0;
-}
-
-static int ili9882t_enter_sleep_mode(struct ili9882t *ili)
-{
- struct mipi_dsi_device *dsi = ili->dsi;
- int ret;
-
- dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
-
- ret = mipi_dsi_dcs_set_display_off(dsi);
- if (ret < 0)
- return ret;
-
- ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
- if (ret < 0)
- return ret;
-
- return 0;
-}
-
static int ili9882t_disable(struct drm_panel *panel)
{
struct ili9882t *ili = to_ili9882t(panel);
- struct mipi_dsi_device *dsi = ili->dsi;
- int ret;
+ struct mipi_dsi_multi_context ctx = { .dsi = ili->dsi };
- ili9882t_switch_page(dsi, 0x00);
- ret = ili9882t_enter_sleep_mode(ili);
- if (ret < 0) {
- dev_err(panel->dev, "failed to set panel off: %d\n", ret);
- return ret;
- }
+ ili9882t_switch_page(&ctx, 0x00);
- msleep(150);
+ ili->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
- return 0;
+ mipi_dsi_dcs_set_display_off_multi(&ctx);
+ mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
+
+ mipi_dsi_msleep(&ctx, 150);
+
+ return ctx.accum_err;
}
static int ili9882t_unprepare(struct drm_panel *panel)
@@ -560,7 +478,11 @@ static int ili9882t_prepare(struct drm_panel *panel)
usleep_range(10000, 11000);
// MIPI needs to keep the LP11 state before the lcm_reset pin is pulled high
- mipi_dsi_dcs_nop(ili->dsi);
+ ret = mipi_dsi_dcs_nop(ili->dsi);
+ if (ret < 0) {
+ dev_err(&ili->dsi->dev, "Failed to send NOP: %d\n", ret);
+ goto poweroff;
+ }
usleep_range(1000, 2000);
gpiod_set_value(ili->enable_gpio, 1);
@@ -570,22 +492,20 @@ static int ili9882t_prepare(struct drm_panel *panel)
gpiod_set_value(ili->enable_gpio, 1);
usleep_range(6000, 10000);
- ret = ili9882t_init_dcs_cmd(ili);
- if (ret < 0) {
- dev_err(panel->dev, "failed to init panel: %d\n", ret);
+ ret = ili->desc->init(ili);
+ if (ret < 0)
goto poweroff;
- }
return 0;
poweroff:
+ gpiod_set_value(ili->enable_gpio, 0);
regulator_disable(ili->avee);
poweroffavdd:
regulator_disable(ili->avdd);
poweroff1v8:
usleep_range(5000, 7000);
regulator_disable(ili->pp1800);
- gpiod_set_value(ili->enable_gpio, 0);
return ret;
}
@@ -620,7 +540,7 @@ static const struct panel_desc starry_ili9882t_desc = {
.format = MIPI_DSI_FMT_RGB888,
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_LPM,
- .init_cmds = starry_ili9882t_init_cmd,
+ .init = starry_ili9882t_init,
};
static int ili9882t_get_modes(struct drm_panel *panel,
diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
index 485178a99910..d95c0d4f3e35 100644
--- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
+++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
@@ -17,14 +17,7 @@
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>
-struct panel_init_cmd {
- size_t len;
- const char *data;
-};
-
-#define _INIT_CMD(...) { \
- .len = sizeof((char[]){__VA_ARGS__}), \
- .data = (char[]){__VA_ARGS__} }
+struct innolux_panel;
struct panel_desc {
const struct drm_display_mode *mode;
@@ -36,7 +29,7 @@ struct panel_desc {
unsigned long flags;
enum mipi_dsi_pixel_format format;
- const struct panel_init_cmd *init_cmds;
+ int (*init)(struct innolux_panel *innolux);
unsigned int lanes;
const char * const *supply_names;
unsigned int num_supplies;
@@ -51,9 +44,6 @@ struct innolux_panel {
struct regulator_bulk_data *supplies;
struct gpio_desc *enable_gpio;
-
- bool prepared;
- bool enabled;
};
static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel)
@@ -61,26 +51,11 @@ static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel)
return container_of(panel, struct innolux_panel, base);
}
-static int innolux_panel_disable(struct drm_panel *panel)
-{
- struct innolux_panel *innolux = to_innolux_panel(panel);
-
- if (!innolux->enabled)
- return 0;
-
- innolux->enabled = false;
-
- return 0;
-}
-
static int innolux_panel_unprepare(struct drm_panel *panel)
{
struct innolux_panel *innolux = to_innolux_panel(panel);
int err;
- if (!innolux->prepared)
- return 0;
-
err = mipi_dsi_dcs_set_display_off(innolux->link);
if (err < 0)
dev_err(panel->dev, "failed to set display off: %d\n", err);
@@ -104,8 +79,6 @@ static int innolux_panel_unprepare(struct drm_panel *panel)
if (err < 0)
return err;
- innolux->prepared = false;
-
return 0;
}
@@ -114,9 +87,6 @@ static int innolux_panel_prepare(struct drm_panel *panel)
struct innolux_panel *innolux = to_innolux_panel(panel);
int err;
- if (innolux->prepared)
- return 0;
-
gpiod_set_value_cansleep(innolux->enable_gpio, 0);
err = regulator_bulk_enable(innolux->desc->num_supplies,
@@ -132,32 +102,10 @@ static int innolux_panel_prepare(struct drm_panel *panel)
/* p079zca: t4, p097pfg: t5 */
usleep_range(20000, 21000);
- if (innolux->desc->init_cmds) {
- const struct panel_init_cmd *cmds =
- innolux->desc->init_cmds;
- unsigned int i;
-
- for (i = 0; cmds[i].len != 0; i++) {
- const struct panel_init_cmd *cmd = &cmds[i];
-
- err = mipi_dsi_generic_write(innolux->link, cmd->data,
- cmd->len);
- if (err < 0) {
- dev_err(panel->dev, "failed to write command %u\n", i);
- goto poweroff;
- }
-
- /*
- * Included by random guessing, because without this
- * (or at least, some delay), the panel sometimes
- * didn't appear to pick up the command sequence.
- */
- err = mipi_dsi_dcs_nop(innolux->link);
- if (err < 0) {
- dev_err(panel->dev, "failed to send DCS nop: %d\n", err);
- goto poweroff;
- }
- }
+ if (innolux->desc->init) {
+ err = innolux->desc->init(innolux);
+ if (err < 0)
+ goto poweroff;
}
err = mipi_dsi_dcs_exit_sleep_mode(innolux->link);
@@ -178,8 +126,6 @@ static int innolux_panel_prepare(struct drm_panel *panel)
/* T7: 5ms */
usleep_range(5000, 6000);
- innolux->prepared = true;
-
return 0;
poweroff:
@@ -189,18 +135,6 @@ poweroff:
return err;
}
-static int innolux_panel_enable(struct drm_panel *panel)
-{
- struct innolux_panel *innolux = to_innolux_panel(panel);
-
- if (innolux->enabled)
- return 0;
-
- innolux->enabled = true;
-
- return 0;
-}
-
static const char * const innolux_p079zca_supply_names[] = {
"power",
};
@@ -250,119 +184,137 @@ static const struct drm_display_mode innolux_p097pfg_mode = {
.vtotal = 2048 + 100 + 2 + 18,
};
+static void innolux_panel_write_multi(struct mipi_dsi_multi_context *ctx,
+ const void *payload, size_t size)
+{
+ mipi_dsi_generic_write_multi(ctx, payload, size);
+
+ /*
+ * Included by random guessing, because without this
+ * (or at least, some delay), the panel sometimes
+ * didn't appear to pick up the command sequence.
+ */
+ mipi_dsi_dcs_nop_multi(ctx);
+}
+
+#define innolux_panel_init_cmd_multi(ctx, seq...) \
+ do { \
+ static const u8 d[] = { seq }; \
+ innolux_panel_write_multi(ctx, d, ARRAY_SIZE(d)); \
+ } while (0)
+
+#define innolux_panel_switch_page(ctx, page) \
+ innolux_panel_init_cmd_multi(ctx, 0xf0, 0x55, 0xaa, 0x52, 0x08, (page))
+
/*
* Display manufacturer failed to provide init sequencing according to
* https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/892065/
* so the init sequence stems from a register dump of a working panel.
*/
-static const struct panel_init_cmd innolux_p097pfg_init_cmds[] = {
- /* page 0 */
- _INIT_CMD(0xF0, 0x55, 0xAA, 0x52, 0x08, 0x00),
- _INIT_CMD(0xB1, 0xE8, 0x11),
- _INIT_CMD(0xB2, 0x25, 0x02),
- _INIT_CMD(0xB5, 0x08, 0x00),
- _INIT_CMD(0xBC, 0x0F, 0x00),
- _INIT_CMD(0xB8, 0x03, 0x06, 0x00, 0x00),
- _INIT_CMD(0xBD, 0x01, 0x90, 0x14, 0x14),
- _INIT_CMD(0x6F, 0x01),
- _INIT_CMD(0xC0, 0x03),
- _INIT_CMD(0x6F, 0x02),
- _INIT_CMD(0xC1, 0x0D),
- _INIT_CMD(0xD9, 0x01, 0x09, 0x70),
- _INIT_CMD(0xC5, 0x12, 0x21, 0x00),
- _INIT_CMD(0xBB, 0x93, 0x93),
-
- /* page 1 */
- _INIT_CMD(0xF0, 0x55, 0xAA, 0x52, 0x08, 0x01),
- _INIT_CMD(0xB3, 0x3C, 0x3C),
- _INIT_CMD(0xB4, 0x0F, 0x0F),
- _INIT_CMD(0xB9, 0x45, 0x45),
- _INIT_CMD(0xBA, 0x14, 0x14),
- _INIT_CMD(0xCA, 0x02),
- _INIT_CMD(0xCE, 0x04),
- _INIT_CMD(0xC3, 0x9B, 0x9B),
- _INIT_CMD(0xD8, 0xC0, 0x03),
- _INIT_CMD(0xBC, 0x82, 0x01),
- _INIT_CMD(0xBD, 0x9E, 0x01),
-
- /* page 2 */
- _INIT_CMD(0xF0, 0x55, 0xAA, 0x52, 0x08, 0x02),
- _INIT_CMD(0xB0, 0x82),
- _INIT_CMD(0xD1, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x82, 0x00, 0xA5,
- 0x00, 0xC1, 0x00, 0xEA, 0x01, 0x0D, 0x01, 0x40),
- _INIT_CMD(0xD2, 0x01, 0x6A, 0x01, 0xA8, 0x01, 0xDC, 0x02, 0x29,
- 0x02, 0x67, 0x02, 0x68, 0x02, 0xA8, 0x02, 0xF0),
- _INIT_CMD(0xD3, 0x03, 0x19, 0x03, 0x49, 0x03, 0x67, 0x03, 0x8C,
- 0x03, 0xA6, 0x03, 0xC7, 0x03, 0xDE, 0x03, 0xEC),
- _INIT_CMD(0xD4, 0x03, 0xFF, 0x03, 0xFF),
- _INIT_CMD(0xE0, 0x00, 0x00, 0x00, 0x86, 0x00, 0xC5, 0x00, 0xE5,
- 0x00, 0xFF, 0x01, 0x26, 0x01, 0x45, 0x01, 0x75),
- _INIT_CMD(0xE1, 0x01, 0x9C, 0x01, 0xD5, 0x02, 0x05, 0x02, 0x4D,
- 0x02, 0x86, 0x02, 0x87, 0x02, 0xC3, 0x03, 0x03),
- _INIT_CMD(0xE2, 0x03, 0x2A, 0x03, 0x56, 0x03, 0x72, 0x03, 0x94,
- 0x03, 0xAC, 0x03, 0xCB, 0x03, 0xE0, 0x03, 0xED),
- _INIT_CMD(0xE3, 0x03, 0xFF, 0x03, 0xFF),
-
- /* page 3 */
- _INIT_CMD(0xF0, 0x55, 0xAA, 0x52, 0x08, 0x03),
- _INIT_CMD(0xB0, 0x00, 0x00, 0x00, 0x00),
- _INIT_CMD(0xB1, 0x00, 0x00, 0x00, 0x00),
- _INIT_CMD(0xB2, 0x00, 0x00, 0x06, 0x04, 0x01, 0x40, 0x85),
- _INIT_CMD(0xB3, 0x10, 0x07, 0xFC, 0x04, 0x01, 0x40, 0x80),
- _INIT_CMD(0xB6, 0xF0, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01,
- 0x40, 0x80),
- _INIT_CMD(0xBA, 0xC5, 0x07, 0x00, 0x04, 0x11, 0x25, 0x8C),
- _INIT_CMD(0xBB, 0xC5, 0x07, 0x00, 0x03, 0x11, 0x25, 0x8C),
- _INIT_CMD(0xC0, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x80, 0x80),
- _INIT_CMD(0xC1, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x80, 0x80),
- _INIT_CMD(0xC4, 0x00, 0x00),
- _INIT_CMD(0xEF, 0x41),
-
- /* page 4 */
- _INIT_CMD(0xF0, 0x55, 0xAA, 0x52, 0x08, 0x04),
- _INIT_CMD(0xEC, 0x4C),
-
- /* page 5 */
- _INIT_CMD(0xF0, 0x55, 0xAA, 0x52, 0x08, 0x05),
- _INIT_CMD(0xB0, 0x13, 0x03, 0x03, 0x01),
- _INIT_CMD(0xB1, 0x30, 0x00),
- _INIT_CMD(0xB2, 0x02, 0x02, 0x00),
- _INIT_CMD(0xB3, 0x82, 0x23, 0x82, 0x9D),
- _INIT_CMD(0xB4, 0xC5, 0x75, 0x24, 0x57),
- _INIT_CMD(0xB5, 0x00, 0xD4, 0x72, 0x11, 0x11, 0xAB, 0x0A),
- _INIT_CMD(0xB6, 0x00, 0x00, 0xD5, 0x72, 0x24, 0x56),
- _INIT_CMD(0xB7, 0x5C, 0xDC, 0x5C, 0x5C),
- _INIT_CMD(0xB9, 0x0C, 0x00, 0x00, 0x01, 0x00),
- _INIT_CMD(0xC0, 0x75, 0x11, 0x11, 0x54, 0x05),
- _INIT_CMD(0xC6, 0x00, 0x00, 0x00, 0x00),
- _INIT_CMD(0xD0, 0x00, 0x48, 0x08, 0x00, 0x00),
- _INIT_CMD(0xD1, 0x00, 0x48, 0x09, 0x00, 0x00),
-
- /* page 6 */
- _INIT_CMD(0xF0, 0x55, 0xAA, 0x52, 0x08, 0x06),
- _INIT_CMD(0xB0, 0x02, 0x32, 0x32, 0x08, 0x2F),
- _INIT_CMD(0xB1, 0x2E, 0x15, 0x14, 0x13, 0x12),
- _INIT_CMD(0xB2, 0x11, 0x10, 0x00, 0x3D, 0x3D),
- _INIT_CMD(0xB3, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D),
- _INIT_CMD(0xB4, 0x3D, 0x32),
- _INIT_CMD(0xB5, 0x03, 0x32, 0x32, 0x09, 0x2F),
- _INIT_CMD(0xB6, 0x2E, 0x1B, 0x1A, 0x19, 0x18),
- _INIT_CMD(0xB7, 0x17, 0x16, 0x01, 0x3D, 0x3D),
- _INIT_CMD(0xB8, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D),
- _INIT_CMD(0xB9, 0x3D, 0x32),
- _INIT_CMD(0xC0, 0x01, 0x32, 0x32, 0x09, 0x2F),
- _INIT_CMD(0xC1, 0x2E, 0x1A, 0x1B, 0x16, 0x17),
- _INIT_CMD(0xC2, 0x18, 0x19, 0x03, 0x3D, 0x3D),
- _INIT_CMD(0xC3, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D),
- _INIT_CMD(0xC4, 0x3D, 0x32),
- _INIT_CMD(0xC5, 0x00, 0x32, 0x32, 0x08, 0x2F),
- _INIT_CMD(0xC6, 0x2E, 0x14, 0x15, 0x10, 0x11),
- _INIT_CMD(0xC7, 0x12, 0x13, 0x02, 0x3D, 0x3D),
- _INIT_CMD(0xC8, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D),
- _INIT_CMD(0xC9, 0x3D, 0x32),
-
- {},
-};
+static int innolux_p097pfg_init(struct innolux_panel *innolux)
+{
+ struct mipi_dsi_multi_context ctx = { .dsi = innolux->link };
+
+ innolux_panel_switch_page(&ctx, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xb1, 0xe8, 0x11);
+ innolux_panel_init_cmd_multi(&ctx, 0xb2, 0x25, 0x02);
+ innolux_panel_init_cmd_multi(&ctx, 0xb5, 0x08, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xbc, 0x0f, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xb8, 0x03, 0x06, 0x00, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xbd, 0x01, 0x90, 0x14, 0x14);
+ innolux_panel_init_cmd_multi(&ctx, 0x6f, 0x01);
+ innolux_panel_init_cmd_multi(&ctx, 0xc0, 0x03);
+ innolux_panel_init_cmd_multi(&ctx, 0x6f, 0x02);
+ innolux_panel_init_cmd_multi(&ctx, 0xc1, 0x0d);
+ innolux_panel_init_cmd_multi(&ctx, 0xd9, 0x01, 0x09, 0x70);
+ innolux_panel_init_cmd_multi(&ctx, 0xc5, 0x12, 0x21, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xbb, 0x93, 0x93);
+
+ innolux_panel_switch_page(&ctx, 0x01);
+ innolux_panel_init_cmd_multi(&ctx, 0xb3, 0x3c, 0x3c);
+ innolux_panel_init_cmd_multi(&ctx, 0xb4, 0x0f, 0x0f);
+ innolux_panel_init_cmd_multi(&ctx, 0xb9, 0x45, 0x45);
+ innolux_panel_init_cmd_multi(&ctx, 0xba, 0x14, 0x14);
+ innolux_panel_init_cmd_multi(&ctx, 0xca, 0x02);
+ innolux_panel_init_cmd_multi(&ctx, 0xce, 0x04);
+ innolux_panel_init_cmd_multi(&ctx, 0xc3, 0x9b, 0x9b);
+ innolux_panel_init_cmd_multi(&ctx, 0xd8, 0xc0, 0x03);
+ innolux_panel_init_cmd_multi(&ctx, 0xbc, 0x82, 0x01);
+ innolux_panel_init_cmd_multi(&ctx, 0xbd, 0x9e, 0x01);
+
+ innolux_panel_switch_page(&ctx, 0x02);
+ innolux_panel_init_cmd_multi(&ctx, 0xb0, 0x82);
+ innolux_panel_init_cmd_multi(&ctx, 0xd1, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x82, 0x00, 0xa5,
+ 0x00, 0xc1, 0x00, 0xea, 0x01, 0x0d, 0x01, 0x40);
+ innolux_panel_init_cmd_multi(&ctx, 0xd2, 0x01, 0x6a, 0x01, 0xa8, 0x01, 0xdc, 0x02, 0x29,
+ 0x02, 0x67, 0x02, 0x68, 0x02, 0xa8, 0x02, 0xf0);
+ innolux_panel_init_cmd_multi(&ctx, 0xd3, 0x03, 0x19, 0x03, 0x49, 0x03, 0x67, 0x03, 0x8c,
+ 0x03, 0xa6, 0x03, 0xc7, 0x03, 0xde, 0x03, 0xec);
+ innolux_panel_init_cmd_multi(&ctx, 0xd4, 0x03, 0xff, 0x03, 0xff);
+ innolux_panel_init_cmd_multi(&ctx, 0xe0, 0x00, 0x00, 0x00, 0x86, 0x00, 0xc5, 0x00, 0xe5,
+ 0x00, 0xff, 0x01, 0x26, 0x01, 0x45, 0x01, 0x75);
+ innolux_panel_init_cmd_multi(&ctx, 0xe1, 0x01, 0x9c, 0x01, 0xd5, 0x02, 0x05, 0x02, 0x4d,
+ 0x02, 0x86, 0x02, 0x87, 0x02, 0xc3, 0x03, 0x03);
+ innolux_panel_init_cmd_multi(&ctx, 0xe2, 0x03, 0x2a, 0x03, 0x56, 0x03, 0x72, 0x03, 0x94,
+ 0x03, 0xac, 0x03, 0xcb, 0x03, 0xe0, 0x03, 0xed);
+ innolux_panel_init_cmd_multi(&ctx, 0xe3, 0x03, 0xff, 0x03, 0xff);
+
+ innolux_panel_switch_page(&ctx, 0x03);
+ innolux_panel_init_cmd_multi(&ctx, 0xb0, 0x00, 0x00, 0x00, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xb1, 0x00, 0x00, 0x00, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xb2, 0x00, 0x00, 0x06, 0x04, 0x01, 0x40, 0x85);
+ innolux_panel_init_cmd_multi(&ctx, 0xb3, 0x10, 0x07, 0xfc, 0x04, 0x01, 0x40, 0x80);
+ innolux_panel_init_cmd_multi(&ctx, 0xb6, 0xf0, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01,
+ 0x40, 0x80);
+ innolux_panel_init_cmd_multi(&ctx, 0xba, 0xc5, 0x07, 0x00, 0x04, 0x11, 0x25, 0x8c);
+ innolux_panel_init_cmd_multi(&ctx, 0xbb, 0xc5, 0x07, 0x00, 0x03, 0x11, 0x25, 0x8c);
+ innolux_panel_init_cmd_multi(&ctx, 0xc0, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x80, 0x80);
+ innolux_panel_init_cmd_multi(&ctx, 0xc1, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x80, 0x80);
+ innolux_panel_init_cmd_multi(&ctx, 0xc4, 0x00, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xef, 0x41);
+
+ innolux_panel_switch_page(&ctx, 0x04);
+ innolux_panel_init_cmd_multi(&ctx, 0xec, 0x4c);
+
+ innolux_panel_switch_page(&ctx, 0x05);
+ innolux_panel_init_cmd_multi(&ctx, 0xb0, 0x13, 0x03, 0x03, 0x01);
+ innolux_panel_init_cmd_multi(&ctx, 0xb1, 0x30, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xb2, 0x02, 0x02, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xb3, 0x82, 0x23, 0x82, 0x9d);
+ innolux_panel_init_cmd_multi(&ctx, 0xb4, 0xc5, 0x75, 0x24, 0x57);
+ innolux_panel_init_cmd_multi(&ctx, 0xb5, 0x00, 0xd4, 0x72, 0x11, 0x11, 0xab, 0x0a);
+ innolux_panel_init_cmd_multi(&ctx, 0xb6, 0x00, 0x00, 0xd5, 0x72, 0x24, 0x56);
+ innolux_panel_init_cmd_multi(&ctx, 0xb7, 0x5c, 0xdc, 0x5c, 0x5c);
+ innolux_panel_init_cmd_multi(&ctx, 0xb9, 0x0c, 0x00, 0x00, 0x01, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xc0, 0x75, 0x11, 0x11, 0x54, 0x05);
+ innolux_panel_init_cmd_multi(&ctx, 0xc6, 0x00, 0x00, 0x00, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xd0, 0x00, 0x48, 0x08, 0x00, 0x00);
+ innolux_panel_init_cmd_multi(&ctx, 0xd1, 0x00, 0x48, 0x09, 0x00, 0x00);
+
+ innolux_panel_switch_page(&ctx, 0x06);
+ innolux_panel_init_cmd_multi(&ctx, 0xb0, 0x02, 0x32, 0x32, 0x08, 0x2f);
+ innolux_panel_init_cmd_multi(&ctx, 0xb1, 0x2e, 0x15, 0x14, 0x13, 0x12);
+ innolux_panel_init_cmd_multi(&ctx, 0xb2, 0x11, 0x10, 0x00, 0x3d, 0x3d);
+ innolux_panel_init_cmd_multi(&ctx, 0xb3, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d);
+ innolux_panel_init_cmd_multi(&ctx, 0xb4, 0x3d, 0x32);
+ innolux_panel_init_cmd_multi(&ctx, 0xb5, 0x03, 0x32, 0x32, 0x09, 0x2f);
+ innolux_panel_init_cmd_multi(&ctx, 0xb6, 0x2e, 0x1b, 0x1a, 0x19, 0x18);
+ innolux_panel_init_cmd_multi(&ctx, 0xb7, 0x17, 0x16, 0x01, 0x3d, 0x3d);
+ innolux_panel_init_cmd_multi(&ctx, 0xb8, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d);
+ innolux_panel_init_cmd_multi(&ctx, 0xb9, 0x3d, 0x32);
+ innolux_panel_init_cmd_multi(&ctx, 0xc0, 0x01, 0x32, 0x32, 0x09, 0x2f);
+ innolux_panel_init_cmd_multi(&ctx, 0xc1, 0x2e, 0x1a, 0x1b, 0x16, 0x17);
+ innolux_panel_init_cmd_multi(&ctx, 0xc2, 0x18, 0x19, 0x03, 0x3d, 0x3d);
+ innolux_panel_init_cmd_multi(&ctx, 0xc3, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d);
+ innolux_panel_init_cmd_multi(&ctx, 0xc4, 0x3d, 0x32);
+ innolux_panel_init_cmd_multi(&ctx, 0xc5, 0x00, 0x32, 0x32, 0x08, 0x2f);
+ innolux_panel_init_cmd_multi(&ctx, 0xc6, 0x2e, 0x14, 0x15, 0x10, 0x11);
+ innolux_panel_init_cmd_multi(&ctx, 0xc7, 0x12, 0x13, 0x02, 0x3d, 0x3d);
+ innolux_panel_init_cmd_multi(&ctx, 0xc8, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d);
+ innolux_panel_init_cmd_multi(&ctx, 0xc9, 0x3d, 0x32);
+
+ return ctx.accum_err;
+}
static const struct panel_desc innolux_p097pfg_panel_desc = {
.mode = &innolux_p097pfg_mode,
@@ -374,7 +326,7 @@ static const struct panel_desc innolux_p097pfg_panel_desc = {
.flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_LPM,
.format = MIPI_DSI_FMT_RGB888,
- .init_cmds = innolux_p097pfg_init_cmds,
+ .init = innolux_p097pfg_init,
.lanes = 4,
.supply_names = innolux_p097pfg_supply_names,
.num_supplies = ARRAY_SIZE(innolux_p097pfg_supply_names),
@@ -407,10 +359,8 @@ static int innolux_panel_get_modes(struct drm_panel *panel,
}
static const struct drm_panel_funcs innolux_panel_funcs = {
- .disable = innolux_panel_disable,
.unprepare = innolux_panel_unprepare,
.prepare = innolux_panel_prepare,
- .enable = innolux_panel_enable,
.get_modes = innolux_panel_get_modes,
};
@@ -510,13 +460,6 @@ static void innolux_panel_remove(struct mipi_dsi_device *dsi)
struct innolux_panel *innolux = mipi_dsi_get_drvdata(dsi);
int err;
- err = drm_panel_unprepare(&innolux->base);
- if (err < 0)
- dev_err(&dsi->dev, "failed to unprepare panel: %d\n", err);
-
- err = drm_panel_disable(&innolux->base);
- if (err < 0)
- dev_err(&dsi->dev, "failed to disable panel: %d\n", err);
err = mipi_dsi_detach(dsi);
if (err < 0)
@@ -525,14 +468,6 @@ static void innolux_panel_remove(struct mipi_dsi_device *dsi)
innolux_panel_del(innolux);
}
-static void innolux_panel_shutdown(struct mipi_dsi_device *dsi)
-{
- struct innolux_panel *innolux = mipi_dsi_get_drvdata(dsi);
-
- drm_panel_unprepare(&innolux->base);
- drm_panel_disable(&innolux->base);
-}
-
static struct mipi_dsi_driver innolux_panel_driver = {
.driver = {
.name = "panel-innolux-p079zca",
@@ -540,7 +475,6 @@ static struct mipi_dsi_driver innolux_panel_driver = {
},
.probe = innolux_panel_probe,
.remove = innolux_panel_remove,
- .shutdown = innolux_panel_shutdown,
};
module_mipi_dsi_driver(innolux_panel_driver);
diff --git a/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c b/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c
index 17f8d80cf2b3..d6b912277196 100644
--- a/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c
+++ b/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c
@@ -23,9 +23,6 @@ struct kingdisplay_panel {
struct regulator *supply;
struct gpio_desc *enable_gpio;
-
- bool prepared;
- bool enabled;
};
struct kingdisplay_panel_cmd {
@@ -185,15 +182,10 @@ static int kingdisplay_panel_disable(struct drm_panel *panel)
struct kingdisplay_panel *kingdisplay = to_kingdisplay_panel(panel);
int err;
- if (!kingdisplay->enabled)
- return 0;
-
err = mipi_dsi_dcs_set_display_off(kingdisplay->link);
if (err < 0)
dev_err(panel->dev, "failed to set display off: %d\n", err);
- kingdisplay->enabled = false;
-
return 0;
}
@@ -202,9 +194,6 @@ static int kingdisplay_panel_unprepare(struct drm_panel *panel)
struct kingdisplay_panel *kingdisplay = to_kingdisplay_panel(panel);
int err;
- if (!kingdisplay->prepared)
- return 0;
-
err = mipi_dsi_dcs_enter_sleep_mode(kingdisplay->link);
if (err < 0) {
dev_err(panel->dev, "failed to enter sleep mode: %d\n", err);
@@ -220,8 +209,6 @@ static int kingdisplay_panel_unprepare(struct drm_panel *panel)
if (err < 0)
return err;
- kingdisplay->prepared = false;
-
return 0;
}
@@ -231,9 +218,6 @@ static int kingdisplay_panel_prepare(struct drm_panel *panel)
int err, regulator_err;
unsigned int i;
- if (kingdisplay->prepared)
- return 0;
-
gpiod_set_value_cansleep(kingdisplay->enable_gpio, 0);
err = regulator_enable(kingdisplay->supply);
@@ -275,8 +259,6 @@ static int kingdisplay_panel_prepare(struct drm_panel *panel)
/* T7: 10ms */
usleep_range(10000, 11000);
- kingdisplay->prepared = true;
-
return 0;
poweroff:
@@ -289,18 +271,6 @@ poweroff:
return err;
}
-static int kingdisplay_panel_enable(struct drm_panel *panel)
-{
- struct kingdisplay_panel *kingdisplay = to_kingdisplay_panel(panel);
-
- if (kingdisplay->enabled)
- return 0;
-
- kingdisplay->enabled = true;
-
- return 0;
-}
-
static const struct drm_display_mode default_mode = {
.clock = 229000,
.hdisplay = 1536,
@@ -341,7 +311,6 @@ static const struct drm_panel_funcs kingdisplay_panel_funcs = {
.disable = kingdisplay_panel_disable,
.unprepare = kingdisplay_panel_unprepare,
.prepare = kingdisplay_panel_prepare,
- .enable = kingdisplay_panel_enable,
.get_modes = kingdisplay_panel_get_modes,
};
@@ -420,14 +389,6 @@ static void kingdisplay_panel_remove(struct mipi_dsi_device *dsi)
struct kingdisplay_panel *kingdisplay = mipi_dsi_get_drvdata(dsi);
int err;
- err = drm_panel_unprepare(&kingdisplay->base);
- if (err < 0)
- dev_err(&dsi->dev, "failed to unprepare panel: %d\n", err);
-
- err = drm_panel_disable(&kingdisplay->base);
- if (err < 0)
- dev_err(&dsi->dev, "failed to disable panel: %d\n", err);
-
err = mipi_dsi_detach(dsi);
if (err < 0)
dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
@@ -435,14 +396,6 @@ static void kingdisplay_panel_remove(struct mipi_dsi_device *dsi)
kingdisplay_panel_del(kingdisplay);
}
-static void kingdisplay_panel_shutdown(struct mipi_dsi_device *dsi)
-{
- struct kingdisplay_panel *kingdisplay = mipi_dsi_get_drvdata(dsi);
-
- drm_panel_unprepare(&kingdisplay->base);
- drm_panel_disable(&kingdisplay->base);
-}
-
static struct mipi_dsi_driver kingdisplay_panel_driver = {
.driver = {
.name = "panel-kingdisplay-kd097d04",
@@ -450,7 +403,6 @@ static struct mipi_dsi_driver kingdisplay_panel_driver = {
},
.probe = kingdisplay_panel_probe,
.remove = kingdisplay_panel_remove,
- .shutdown = kingdisplay_panel_shutdown,
};
module_mipi_dsi_driver(kingdisplay_panel_driver);
diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c
index 1a26205701b5..292aa26a456d 100644
--- a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c
+++ b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c
@@ -36,7 +36,6 @@ struct ltk050h3146w {
struct regulator *vci;
struct regulator *iovcc;
const struct ltk050h3146w_desc *panel_desc;
- bool prepared;
};
static const struct ltk050h3146w_cmd page1_cmds[] = {
@@ -521,9 +520,6 @@ static int ltk050h3146w_unprepare(struct drm_panel *panel)
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
int ret;
- if (!ctx->prepared)
- return 0;
-
ret = mipi_dsi_dcs_set_display_off(dsi);
if (ret < 0) {
dev_err(ctx->dev, "failed to set display off: %d\n", ret);
@@ -539,8 +535,6 @@ static int ltk050h3146w_unprepare(struct drm_panel *panel)
regulator_disable(ctx->iovcc);
regulator_disable(ctx->vci);
- ctx->prepared = false;
-
return 0;
}
@@ -550,9 +544,6 @@ static int ltk050h3146w_prepare(struct drm_panel *panel)
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
int ret;
- if (ctx->prepared)
- return 0;
-
dev_dbg(ctx->dev, "Resetting the panel\n");
ret = regulator_enable(ctx->vci);
if (ret < 0) {
@@ -593,8 +584,6 @@ static int ltk050h3146w_prepare(struct drm_panel *panel)
msleep(50);
- ctx->prepared = true;
-
return 0;
disable_iovcc:
@@ -684,27 +673,11 @@ static int ltk050h3146w_probe(struct mipi_dsi_device *dsi)
return 0;
}
-static void ltk050h3146w_shutdown(struct mipi_dsi_device *dsi)
-{
- struct ltk050h3146w *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = drm_panel_unprepare(&ctx->panel);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret);
-
- ret = drm_panel_disable(&ctx->panel);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret);
-}
-
static void ltk050h3146w_remove(struct mipi_dsi_device *dsi)
{
struct ltk050h3146w *ctx = mipi_dsi_get_drvdata(dsi);
int ret;
- ltk050h3146w_shutdown(dsi);
-
ret = mipi_dsi_detach(dsi);
if (ret < 0)
dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
@@ -736,7 +709,6 @@ static struct mipi_dsi_driver ltk050h3146w_driver = {
},
.probe = ltk050h3146w_probe,
.remove = ltk050h3146w_remove,
- .shutdown = ltk050h3146w_shutdown,
};
module_mipi_dsi_driver(ltk050h3146w_driver);
diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c b/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c
index a4c9a5cb9811..6b18cf00fd4a 100644
--- a/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c
+++ b/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c
@@ -40,7 +40,6 @@ struct ltk500hd1829 {
struct regulator *vcc;
struct regulator *iovcc;
const struct ltk500hd1829_desc *panel_desc;
- bool prepared;
};
static const struct ltk500hd1829_cmd ltk101b4029w_init[] = {
@@ -492,9 +491,6 @@ static int ltk500hd1829_unprepare(struct drm_panel *panel)
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
int ret;
- if (!ctx->prepared)
- return 0;
-
ret = mipi_dsi_dcs_set_display_off(dsi);
if (ret < 0)
dev_err(panel->dev, "failed to set display off: %d\n", ret);
@@ -510,8 +506,6 @@ static int ltk500hd1829_unprepare(struct drm_panel *panel)
regulator_disable(ctx->iovcc);
regulator_disable(ctx->vcc);
- ctx->prepared = false;
-
return 0;
}
@@ -522,9 +516,6 @@ static int ltk500hd1829_prepare(struct drm_panel *panel)
unsigned int i;
int ret;
- if (ctx->prepared)
- return 0;
-
ret = regulator_enable(ctx->vcc);
if (ret < 0) {
dev_err(ctx->dev, "Failed to enable vci supply: %d\n", ret);
@@ -568,8 +559,6 @@ static int ltk500hd1829_prepare(struct drm_panel *panel)
goto disable_iovcc;
}
- ctx->prepared = true;
-
return 0;
disable_iovcc:
@@ -673,27 +662,11 @@ static int ltk500hd1829_probe(struct mipi_dsi_device *dsi)
return 0;
}
-static void ltk500hd1829_shutdown(struct mipi_dsi_device *dsi)
-{
- struct ltk500hd1829 *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = drm_panel_unprepare(&ctx->panel);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret);
-
- ret = drm_panel_disable(&ctx->panel);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret);
-}
-
static void ltk500hd1829_remove(struct mipi_dsi_device *dsi)
{
struct ltk500hd1829 *ctx = mipi_dsi_get_drvdata(dsi);
int ret;
- ltk500hd1829_shutdown(dsi);
-
ret = mipi_dsi_detach(dsi);
if (ret < 0)
dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret);
@@ -721,7 +694,6 @@ static struct mipi_dsi_driver ltk500hd1829_driver = {
},
.probe = ltk500hd1829_probe,
.remove = ltk500hd1829_remove,
- .shutdown = ltk500hd1829_shutdown,
};
module_mipi_dsi_driver(ltk500hd1829_driver);
diff --git a/drivers/gpu/drm/panel/panel-lg-sw43408.c b/drivers/gpu/drm/panel/panel-lg-sw43408.c
index 2b3a73696dce..f3dcc39670ea 100644
--- a/drivers/gpu/drm/panel/panel-lg-sw43408.c
+++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c
@@ -40,83 +40,83 @@ static inline struct sw43408_panel *to_panel_info(struct drm_panel *panel)
static int sw43408_unprepare(struct drm_panel *panel)
{
- struct sw43408_panel *ctx = to_panel_info(panel);
+ struct sw43408_panel *sw43408 = to_panel_info(panel);
+ struct mipi_dsi_multi_context ctx = { .dsi = sw43408->link };
int ret;
- ret = mipi_dsi_dcs_set_display_off(ctx->link);
- if (ret < 0)
- dev_err(panel->dev, "set_display_off cmd failed ret = %d\n", ret);
+ mipi_dsi_dcs_set_display_off_multi(&ctx);
- ret = mipi_dsi_dcs_enter_sleep_mode(ctx->link);
- if (ret < 0)
- dev_err(panel->dev, "enter_sleep cmd failed ret = %d\n", ret);
+ mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
- msleep(100);
+ mipi_dsi_msleep(&ctx, 100);
- gpiod_set_value(ctx->reset_gpio, 1);
+ gpiod_set_value(sw43408->reset_gpio, 1);
+
+ ret = regulator_bulk_disable(ARRAY_SIZE(sw43408->supplies), sw43408->supplies);
- return regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
+ return ret ? : ctx.accum_err;
}
static int sw43408_program(struct drm_panel *panel)
{
- struct sw43408_panel *ctx = to_panel_info(panel);
+ struct sw43408_panel *sw43408 = to_panel_info(panel);
+ struct mipi_dsi_multi_context ctx = { .dsi = sw43408->link };
struct drm_dsc_picture_parameter_set pps;
- mipi_dsi_dcs_write_seq(ctx->link, MIPI_DCS_SET_GAMMA_CURVE, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&ctx, MIPI_DCS_SET_GAMMA_CURVE, 0x02);
- mipi_dsi_dcs_set_tear_on(ctx->link, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
+ mipi_dsi_dcs_set_tear_on_multi(&ctx, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
- mipi_dsi_dcs_write_seq(ctx->link, 0x53, 0x0c, 0x30);
- mipi_dsi_dcs_write_seq(ctx->link, 0x55, 0x00, 0x70, 0xdf, 0x00, 0x70, 0xdf);
- mipi_dsi_dcs_write_seq(ctx->link, 0xf7, 0x01, 0x49, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x53, 0x0c, 0x30);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x55, 0x00, 0x70, 0xdf, 0x00, 0x70, 0xdf);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xf7, 0x01, 0x49, 0x0c);
- mipi_dsi_dcs_exit_sleep_mode(ctx->link);
+ mipi_dsi_dcs_exit_sleep_mode_multi(&ctx);
- msleep(135);
+ mipi_dsi_msleep(&ctx, 135);
/* COMPRESSION_MODE moved after setting the PPS */
- mipi_dsi_dcs_write_seq(ctx->link, 0xb0, 0xac);
- mipi_dsi_dcs_write_seq(ctx->link, 0xe5,
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0xac);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xe5,
0x00, 0x3a, 0x00, 0x3a, 0x00, 0x0e, 0x10);
- mipi_dsi_dcs_write_seq(ctx->link, 0xb5,
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb5,
0x75, 0x60, 0x2d, 0x5d, 0x80, 0x00, 0x0a, 0x0b,
0x00, 0x05, 0x0b, 0x00, 0x80, 0x0d, 0x0e, 0x40,
0x00, 0x0c, 0x00, 0x16, 0x00, 0xb8, 0x00, 0x80,
0x0d, 0x0e, 0x40, 0x00, 0x0c, 0x00, 0x16, 0x00,
0xb8, 0x00, 0x81, 0x00, 0x03, 0x03, 0x03, 0x01,
0x01);
- msleep(85);
- mipi_dsi_dcs_write_seq(ctx->link, 0xcd,
+ mipi_dsi_msleep(&ctx, 85);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcd,
0x00, 0x00, 0x00, 0x19, 0x19, 0x19, 0x19, 0x19,
0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19,
0x16, 0x16);
- mipi_dsi_dcs_write_seq(ctx->link, 0xcb, 0x80, 0x5c, 0x07, 0x03, 0x28);
- mipi_dsi_dcs_write_seq(ctx->link, 0xc0, 0x02, 0x02, 0x0f);
- mipi_dsi_dcs_write_seq(ctx->link, 0x55, 0x04, 0x61, 0xdb, 0x04, 0x70, 0xdb);
- mipi_dsi_dcs_write_seq(ctx->link, 0xb0, 0xca);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xcb, 0x80, 0x5c, 0x07, 0x03, 0x28);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xc0, 0x02, 0x02, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0x55, 0x04, 0x61, 0xdb, 0x04, 0x70, 0xdb);
+ mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0xca);
+
+ mipi_dsi_dcs_set_display_on_multi(&ctx);
- mipi_dsi_dcs_set_display_on(ctx->link);
+ mipi_dsi_msleep(&ctx, 50);
- msleep(50);
+ sw43408->link->mode_flags &= ~MIPI_DSI_MODE_LPM;
- ctx->link->mode_flags &= ~MIPI_DSI_MODE_LPM;
+ drm_dsc_pps_payload_pack(&pps, sw43408->link->dsc);
- drm_dsc_pps_payload_pack(&pps, ctx->link->dsc);
- mipi_dsi_picture_parameter_set(ctx->link, &pps);
+ mipi_dsi_picture_parameter_set_multi(&ctx, &pps);
- ctx->link->mode_flags |= MIPI_DSI_MODE_LPM;
+ sw43408->link->mode_flags |= MIPI_DSI_MODE_LPM;
/*
* This panel uses PPS selectors with offset:
* PPS 1 if pps_identifier is 0
* PPS 2 if pps_identifier is 1
*/
- mipi_dsi_compression_mode_ext(ctx->link, true,
- MIPI_DSI_COMPRESSION_DSC, 1);
-
- return 0;
+ mipi_dsi_compression_mode_ext_multi(&ctx, true,
+ MIPI_DSI_COMPRESSION_DSC, 1);
+ return ctx.accum_err;
}
static int sw43408_prepare(struct drm_panel *panel)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
index 3886372415c2..c2abd20e0734 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
@@ -72,8 +72,6 @@ struct nt36672a_panel {
struct regulator_bulk_data supplies[ARRAY_SIZE(nt36672a_regulator_names)];
struct gpio_desc *reset_gpio;
-
- bool prepared;
};
static inline struct nt36672a_panel *to_nt36672a_panel(struct drm_panel *panel)
@@ -119,9 +117,6 @@ static int nt36672a_panel_unprepare(struct drm_panel *panel)
struct nt36672a_panel *pinfo = to_nt36672a_panel(panel);
int ret;
- if (!pinfo->prepared)
- return 0;
-
/* send off cmds */
ret = nt36672a_send_cmds(panel, pinfo->desc->off_cmds,
pinfo->desc->num_off_cmds);
@@ -147,8 +142,6 @@ static int nt36672a_panel_unprepare(struct drm_panel *panel)
if (ret < 0)
dev_err(panel->dev, "power_off failed ret = %d\n", ret);
- pinfo->prepared = false;
-
return ret;
}
@@ -179,9 +172,6 @@ static int nt36672a_panel_prepare(struct drm_panel *panel)
struct nt36672a_panel *pinfo = to_nt36672a_panel(panel);
int err;
- if (pinfo->prepared)
- return 0;
-
err = nt36672a_panel_power_on(pinfo);
if (err < 0)
goto poweroff;
@@ -221,8 +211,6 @@ static int nt36672a_panel_prepare(struct drm_panel *panel)
msleep(120);
- pinfo->prepared = true;
-
return 0;
poweroff:
@@ -668,14 +656,6 @@ static void nt36672a_panel_remove(struct mipi_dsi_device *dsi)
struct nt36672a_panel *pinfo = mipi_dsi_get_drvdata(dsi);
int err;
- err = drm_panel_unprepare(&pinfo->base);
- if (err < 0)
- dev_err(&dsi->dev, "failed to unprepare panel: %d\n", err);
-
- err = drm_panel_disable(&pinfo->base);
- if (err < 0)
- dev_err(&dsi->dev, "failed to disable panel: %d\n", err);
-
err = mipi_dsi_detach(dsi);
if (err < 0)
dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
@@ -683,14 +663,6 @@ static void nt36672a_panel_remove(struct mipi_dsi_device *dsi)
drm_panel_remove(&pinfo->base);
}
-static void nt36672a_panel_shutdown(struct mipi_dsi_device *dsi)
-{
- struct nt36672a_panel *pinfo = mipi_dsi_get_drvdata(dsi);
-
- drm_panel_disable(&pinfo->base);
- drm_panel_unprepare(&pinfo->base);
-}
-
static const struct of_device_id tianma_fhd_video_of_match[] = {
{ .compatible = "tianma,fhd-video", .data = &tianma_fhd_video_panel_desc },
{ },
@@ -704,7 +676,6 @@ static struct mipi_dsi_driver nt36672a_panel_driver = {
},
.probe = nt36672a_panel_probe,
.remove = nt36672a_panel_remove,
- .shutdown = nt36672a_panel_shutdown,
};
module_mipi_dsi_driver(nt36672a_panel_driver);
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
index 20b7bfe4aa12..e81a70147259 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
@@ -33,7 +33,7 @@ struct panel_desc {
enum mipi_dsi_pixel_format format;
unsigned int lanes;
const char *panel_name;
- int (*init_sequence)(struct mipi_dsi_device *dsi);
+ void (*init_sequence)(struct mipi_dsi_multi_context *ctx);
};
struct nt36672e_panel {
@@ -49,295 +49,293 @@ static inline struct nt36672e_panel *to_nt36672e_panel(struct drm_panel *panel)
return container_of(panel, struct nt36672e_panel, panel);
}
-static int nt36672e_1080x2408_60hz_init(struct mipi_dsi_device *dsi)
+static void nt36672e_1080x2408_60hz_init(struct mipi_dsi_multi_context *ctx)
{
- mipi_dsi_dcs_write_seq(dsi, 0xff, 0x10);
- mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0xb0, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0xc0, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0xc1, 0x89, 0x28, 0x00, 0x08, 0x00, 0xaa, 0x02,
- 0x0e, 0x00, 0x2b, 0x00, 0x07, 0x0d, 0xb7, 0x0c, 0xb7);
-
- mipi_dsi_dcs_write_seq(dsi, 0xc2, 0x1b, 0xa0);
- mipi_dsi_dcs_write_seq(dsi, 0xff, 0x20);
- mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x01, 0x66);
- mipi_dsi_dcs_write_seq(dsi, 0x06, 0x40);
- mipi_dsi_dcs_write_seq(dsi, 0x07, 0x38);
- mipi_dsi_dcs_write_seq(dsi, 0x2f, 0x83);
- mipi_dsi_dcs_write_seq(dsi, 0x69, 0x91);
- mipi_dsi_dcs_write_seq(dsi, 0x95, 0xd1);
- mipi_dsi_dcs_write_seq(dsi, 0x96, 0xd1);
- mipi_dsi_dcs_write_seq(dsi, 0xf2, 0x64);
- mipi_dsi_dcs_write_seq(dsi, 0xf3, 0x54);
- mipi_dsi_dcs_write_seq(dsi, 0xf4, 0x64);
- mipi_dsi_dcs_write_seq(dsi, 0xf5, 0x54);
- mipi_dsi_dcs_write_seq(dsi, 0xf6, 0x64);
- mipi_dsi_dcs_write_seq(dsi, 0xf7, 0x54);
- mipi_dsi_dcs_write_seq(dsi, 0xf8, 0x64);
- mipi_dsi_dcs_write_seq(dsi, 0xf9, 0x54);
- mipi_dsi_dcs_write_seq(dsi, 0xff, 0x24);
- mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x01, 0x0f);
- mipi_dsi_dcs_write_seq(dsi, 0x03, 0x0c);
- mipi_dsi_dcs_write_seq(dsi, 0x05, 0x1d);
- mipi_dsi_dcs_write_seq(dsi, 0x08, 0x2f);
- mipi_dsi_dcs_write_seq(dsi, 0x09, 0x2e);
- mipi_dsi_dcs_write_seq(dsi, 0x0a, 0x2d);
- mipi_dsi_dcs_write_seq(dsi, 0x0b, 0x2c);
- mipi_dsi_dcs_write_seq(dsi, 0x11, 0x17);
- mipi_dsi_dcs_write_seq(dsi, 0x12, 0x13);
- mipi_dsi_dcs_write_seq(dsi, 0x13, 0x15);
- mipi_dsi_dcs_write_seq(dsi, 0x15, 0x14);
- mipi_dsi_dcs_write_seq(dsi, 0x16, 0x16);
- mipi_dsi_dcs_write_seq(dsi, 0x17, 0x18);
- mipi_dsi_dcs_write_seq(dsi, 0x1b, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x1d, 0x1d);
- mipi_dsi_dcs_write_seq(dsi, 0x20, 0x2f);
- mipi_dsi_dcs_write_seq(dsi, 0x21, 0x2e);
- mipi_dsi_dcs_write_seq(dsi, 0x22, 0x2d);
- mipi_dsi_dcs_write_seq(dsi, 0x23, 0x2c);
- mipi_dsi_dcs_write_seq(dsi, 0x29, 0x17);
- mipi_dsi_dcs_write_seq(dsi, 0x2a, 0x13);
- mipi_dsi_dcs_write_seq(dsi, 0x2b, 0x15);
- mipi_dsi_dcs_write_seq(dsi, 0x2f, 0x14);
- mipi_dsi_dcs_write_seq(dsi, 0x30, 0x16);
- mipi_dsi_dcs_write_seq(dsi, 0x31, 0x18);
- mipi_dsi_dcs_write_seq(dsi, 0x32, 0x04);
- mipi_dsi_dcs_write_seq(dsi, 0x34, 0x10);
- mipi_dsi_dcs_write_seq(dsi, 0x35, 0x1f);
- mipi_dsi_dcs_write_seq(dsi, 0x36, 0x1f);
- mipi_dsi_dcs_write_seq(dsi, 0x4d, 0x14);
- mipi_dsi_dcs_write_seq(dsi, 0x4e, 0x36);
- mipi_dsi_dcs_write_seq(dsi, 0x4f, 0x36);
- mipi_dsi_dcs_write_seq(dsi, 0x53, 0x36);
- mipi_dsi_dcs_write_seq(dsi, 0x71, 0x30);
- mipi_dsi_dcs_write_seq(dsi, 0x79, 0x11);
- mipi_dsi_dcs_write_seq(dsi, 0x7a, 0x82);
- mipi_dsi_dcs_write_seq(dsi, 0x7b, 0x8f);
- mipi_dsi_dcs_write_seq(dsi, 0x7d, 0x04);
- mipi_dsi_dcs_write_seq(dsi, 0x80, 0x04);
- mipi_dsi_dcs_write_seq(dsi, 0x81, 0x04);
- mipi_dsi_dcs_write_seq(dsi, 0x82, 0x13);
- mipi_dsi_dcs_write_seq(dsi, 0x84, 0x31);
- mipi_dsi_dcs_write_seq(dsi, 0x85, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x86, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x87, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x90, 0x13);
- mipi_dsi_dcs_write_seq(dsi, 0x92, 0x31);
- mipi_dsi_dcs_write_seq(dsi, 0x93, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x94, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x95, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x9c, 0xf4);
- mipi_dsi_dcs_write_seq(dsi, 0x9d, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0xa0, 0x0f);
- mipi_dsi_dcs_write_seq(dsi, 0xa2, 0x0f);
- mipi_dsi_dcs_write_seq(dsi, 0xa3, 0x02);
- mipi_dsi_dcs_write_seq(dsi, 0xa4, 0x04);
- mipi_dsi_dcs_write_seq(dsi, 0xa5, 0x04);
- mipi_dsi_dcs_write_seq(dsi, 0xc6, 0xc0);
- mipi_dsi_dcs_write_seq(dsi, 0xc9, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0xd9, 0x80);
- mipi_dsi_dcs_write_seq(dsi, 0xe9, 0x02);
- mipi_dsi_dcs_write_seq(dsi, 0xff, 0x25);
- mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x18, 0x22);
- mipi_dsi_dcs_write_seq(dsi, 0x19, 0xe4);
- mipi_dsi_dcs_write_seq(dsi, 0x21, 0x40);
- mipi_dsi_dcs_write_seq(dsi, 0x66, 0xd8);
- mipi_dsi_dcs_write_seq(dsi, 0x68, 0x50);
- mipi_dsi_dcs_write_seq(dsi, 0x69, 0x10);
- mipi_dsi_dcs_write_seq(dsi, 0x6b, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x6d, 0x0d);
- mipi_dsi_dcs_write_seq(dsi, 0x6e, 0x48);
- mipi_dsi_dcs_write_seq(dsi, 0x72, 0x41);
- mipi_dsi_dcs_write_seq(dsi, 0x73, 0x4a);
- mipi_dsi_dcs_write_seq(dsi, 0x74, 0xd0);
- mipi_dsi_dcs_write_seq(dsi, 0x77, 0x62);
- mipi_dsi_dcs_write_seq(dsi, 0x79, 0x7e);
- mipi_dsi_dcs_write_seq(dsi, 0x7d, 0x03);
- mipi_dsi_dcs_write_seq(dsi, 0x7e, 0x15);
- mipi_dsi_dcs_write_seq(dsi, 0x7f, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x84, 0x4d);
- mipi_dsi_dcs_write_seq(dsi, 0xcf, 0x80);
- mipi_dsi_dcs_write_seq(dsi, 0xd6, 0x80);
- mipi_dsi_dcs_write_seq(dsi, 0xd7, 0x80);
- mipi_dsi_dcs_write_seq(dsi, 0xef, 0x20);
- mipi_dsi_dcs_write_seq(dsi, 0xf0, 0x84);
- mipi_dsi_dcs_write_seq(dsi, 0xff, 0x26);
- mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x81, 0x0f);
- mipi_dsi_dcs_write_seq(dsi, 0x83, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x84, 0x03);
- mipi_dsi_dcs_write_seq(dsi, 0x85, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x86, 0x03);
- mipi_dsi_dcs_write_seq(dsi, 0x87, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x88, 0x05);
- mipi_dsi_dcs_write_seq(dsi, 0x8a, 0x1a);
- mipi_dsi_dcs_write_seq(dsi, 0x8b, 0x11);
- mipi_dsi_dcs_write_seq(dsi, 0x8c, 0x24);
- mipi_dsi_dcs_write_seq(dsi, 0x8e, 0x42);
- mipi_dsi_dcs_write_seq(dsi, 0x8f, 0x11);
- mipi_dsi_dcs_write_seq(dsi, 0x90, 0x11);
- mipi_dsi_dcs_write_seq(dsi, 0x91, 0x11);
- mipi_dsi_dcs_write_seq(dsi, 0x9a, 0x80);
- mipi_dsi_dcs_write_seq(dsi, 0x9b, 0x04);
- mipi_dsi_dcs_write_seq(dsi, 0x9c, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x9d, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x9e, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0xff, 0x27);
- mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x01, 0x68);
- mipi_dsi_dcs_write_seq(dsi, 0x20, 0x81);
- mipi_dsi_dcs_write_seq(dsi, 0x21, 0x6a);
- mipi_dsi_dcs_write_seq(dsi, 0x25, 0x81);
- mipi_dsi_dcs_write_seq(dsi, 0x26, 0x94);
- mipi_dsi_dcs_write_seq(dsi, 0x6e, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x6f, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x70, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x71, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x72, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x75, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x76, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x77, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0x7d, 0x09);
- mipi_dsi_dcs_write_seq(dsi, 0x7e, 0x67);
- mipi_dsi_dcs_write_seq(dsi, 0x80, 0x23);
- mipi_dsi_dcs_write_seq(dsi, 0x82, 0x09);
- mipi_dsi_dcs_write_seq(dsi, 0x83, 0x67);
- mipi_dsi_dcs_write_seq(dsi, 0x88, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x89, 0x10);
- mipi_dsi_dcs_write_seq(dsi, 0xa5, 0x10);
- mipi_dsi_dcs_write_seq(dsi, 0xa6, 0x23);
- mipi_dsi_dcs_write_seq(dsi, 0xa7, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0xb6, 0x40);
- mipi_dsi_dcs_write_seq(dsi, 0xe5, 0x02);
- mipi_dsi_dcs_write_seq(dsi, 0xe6, 0xd3);
- mipi_dsi_dcs_write_seq(dsi, 0xeb, 0x03);
- mipi_dsi_dcs_write_seq(dsi, 0xec, 0x28);
- mipi_dsi_dcs_write_seq(dsi, 0xff, 0x2a);
- mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x00, 0x91);
- mipi_dsi_dcs_write_seq(dsi, 0x03, 0x20);
- mipi_dsi_dcs_write_seq(dsi, 0x07, 0x50);
- mipi_dsi_dcs_write_seq(dsi, 0x0a, 0x70);
- mipi_dsi_dcs_write_seq(dsi, 0x0c, 0x04);
- mipi_dsi_dcs_write_seq(dsi, 0x0d, 0x40);
- mipi_dsi_dcs_write_seq(dsi, 0x0f, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x11, 0xe0);
- mipi_dsi_dcs_write_seq(dsi, 0x15, 0x0f);
- mipi_dsi_dcs_write_seq(dsi, 0x16, 0xa4);
- mipi_dsi_dcs_write_seq(dsi, 0x19, 0x0f);
- mipi_dsi_dcs_write_seq(dsi, 0x1a, 0x78);
- mipi_dsi_dcs_write_seq(dsi, 0x1b, 0x23);
- mipi_dsi_dcs_write_seq(dsi, 0x1d, 0x36);
- mipi_dsi_dcs_write_seq(dsi, 0x1e, 0x3e);
- mipi_dsi_dcs_write_seq(dsi, 0x1f, 0x3e);
- mipi_dsi_dcs_write_seq(dsi, 0x20, 0x3e);
- mipi_dsi_dcs_write_seq(dsi, 0x28, 0xfd);
- mipi_dsi_dcs_write_seq(dsi, 0x29, 0x12);
- mipi_dsi_dcs_write_seq(dsi, 0x2a, 0xe1);
- mipi_dsi_dcs_write_seq(dsi, 0x2d, 0x0a);
- mipi_dsi_dcs_write_seq(dsi, 0x30, 0x49);
- mipi_dsi_dcs_write_seq(dsi, 0x33, 0x96);
- mipi_dsi_dcs_write_seq(dsi, 0x34, 0xff);
- mipi_dsi_dcs_write_seq(dsi, 0x35, 0x40);
- mipi_dsi_dcs_write_seq(dsi, 0x36, 0xde);
- mipi_dsi_dcs_write_seq(dsi, 0x37, 0xf9);
- mipi_dsi_dcs_write_seq(dsi, 0x38, 0x45);
- mipi_dsi_dcs_write_seq(dsi, 0x39, 0xd9);
- mipi_dsi_dcs_write_seq(dsi, 0x3a, 0x49);
- mipi_dsi_dcs_write_seq(dsi, 0x4a, 0xf0);
- mipi_dsi_dcs_write_seq(dsi, 0x7a, 0x09);
- mipi_dsi_dcs_write_seq(dsi, 0x7b, 0x40);
- mipi_dsi_dcs_write_seq(dsi, 0x7f, 0xf0);
- mipi_dsi_dcs_write_seq(dsi, 0x83, 0x0f);
- mipi_dsi_dcs_write_seq(dsi, 0x84, 0xa4);
- mipi_dsi_dcs_write_seq(dsi, 0x87, 0x0f);
- mipi_dsi_dcs_write_seq(dsi, 0x88, 0x78);
- mipi_dsi_dcs_write_seq(dsi, 0x89, 0x23);
- mipi_dsi_dcs_write_seq(dsi, 0x8b, 0x36);
- mipi_dsi_dcs_write_seq(dsi, 0x8c, 0x7d);
- mipi_dsi_dcs_write_seq(dsi, 0x8d, 0x7d);
- mipi_dsi_dcs_write_seq(dsi, 0x8e, 0x7d);
- mipi_dsi_dcs_write_seq(dsi, 0xff, 0x20);
- mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0xb0, 0x00, 0x00, 0x00, 0x17, 0x00, 0x49, 0x00,
- 0x6a, 0x00, 0x89, 0x00, 0x9f, 0x00, 0xb6, 0x00, 0xc8);
- mipi_dsi_dcs_write_seq(dsi, 0xb1, 0x00, 0xd9, 0x01, 0x10, 0x01, 0x3a, 0x01,
- 0x7a, 0x01, 0xa9, 0x01, 0xf2, 0x02, 0x2d, 0x02, 0x2e);
- mipi_dsi_dcs_write_seq(dsi, 0xb2, 0x02, 0x64, 0x02, 0xa3, 0x02, 0xca, 0x03,
- 0x00, 0x03, 0x1e, 0x03, 0x4a, 0x03, 0x59, 0x03, 0x6a);
- mipi_dsi_dcs_write_seq(dsi, 0xb3, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
- 0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0xb4, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
- 0x71, 0x00, 0x90, 0x00, 0xa7, 0x00, 0xbf, 0x00, 0xd1);
- mipi_dsi_dcs_write_seq(dsi, 0xb5, 0x00, 0xe2, 0x01, 0x1a, 0x01, 0x43, 0x01,
- 0x83, 0x01, 0xb2, 0x01, 0xfa, 0x02, 0x34, 0x02, 0x36);
- mipi_dsi_dcs_write_seq(dsi, 0xb6, 0x02, 0x6b, 0x02, 0xa8, 0x02, 0xd0, 0x03,
- 0x03, 0x03, 0x21, 0x03, 0x4d, 0x03, 0x5b, 0x03, 0x6b);
- mipi_dsi_dcs_write_seq(dsi, 0xb7, 0x03, 0x7e, 0x03, 0x94, 0x03, 0xac, 0x03,
- 0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0xb8, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
- 0x72, 0x00, 0x92, 0x00, 0xa8, 0x00, 0xbf, 0x00, 0xd1);
- mipi_dsi_dcs_write_seq(dsi, 0xb9, 0x00, 0xe2, 0x01, 0x18, 0x01, 0x42, 0x01,
- 0x81, 0x01, 0xaf, 0x01, 0xf5, 0x02, 0x2f, 0x02, 0x31);
- mipi_dsi_dcs_write_seq(dsi, 0xba, 0x02, 0x68, 0x02, 0xa6, 0x02, 0xcd, 0x03,
- 0x01, 0x03, 0x1f, 0x03, 0x4a, 0x03, 0x59, 0x03, 0x6a);
- mipi_dsi_dcs_write_seq(dsi, 0xbb, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
- 0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0xff, 0x21);
- mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0xb0, 0x00, 0x00, 0x00, 0x17, 0x00, 0x49, 0x00,
- 0x6a, 0x00, 0x89, 0x00, 0x9f, 0x00, 0xb6, 0x00, 0xc8);
- mipi_dsi_dcs_write_seq(dsi, 0xb1, 0x00, 0xd9, 0x01, 0x10, 0x01, 0x3a, 0x01,
- 0x7a, 0x01, 0xa9, 0x01, 0xf2, 0x02, 0x2d, 0x02, 0x2e);
- mipi_dsi_dcs_write_seq(dsi, 0xb2, 0x02, 0x64, 0x02, 0xa3, 0x02, 0xca, 0x03,
- 0x00, 0x03, 0x1e, 0x03, 0x4a, 0x03, 0x59, 0x03, 0x6a);
- mipi_dsi_dcs_write_seq(dsi, 0xb3, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
- 0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0xb4, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
- 0x71, 0x00, 0x90, 0x00, 0xa7, 0x00, 0xbf, 0x00, 0xd1);
- mipi_dsi_dcs_write_seq(dsi, 0xb5, 0x00, 0xe2, 0x01, 0x1a, 0x01, 0x43, 0x01,
- 0x83, 0x01, 0xb2, 0x01, 0xfa, 0x02, 0x34, 0x02, 0x36);
- mipi_dsi_dcs_write_seq(dsi, 0xb6, 0x02, 0x6b, 0x02, 0xa8, 0x02, 0xd0, 0x03,
- 0x03, 0x03, 0x21, 0x03, 0x4d, 0x03, 0x5b, 0x03, 0x6b);
- mipi_dsi_dcs_write_seq(dsi, 0xb7, 0x03, 0x7e, 0x03, 0x94, 0x03, 0xac, 0x03,
- 0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0xb8, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
- 0x72, 0x00, 0x92, 0x00, 0xa8, 0x00, 0xbf, 0x00, 0xd1);
- mipi_dsi_dcs_write_seq(dsi, 0xb9, 0x00, 0xe2, 0x01, 0x18, 0x01, 0x42, 0x01,
- 0x81, 0x01, 0xaf, 0x01, 0xf5, 0x02, 0x2f, 0x02, 0x31);
- mipi_dsi_dcs_write_seq(dsi, 0xba, 0x02, 0x68, 0x02, 0xa6, 0x02, 0xcd, 0x03,
- 0x01, 0x03, 0x1f, 0x03, 0x4a, 0x03, 0x59, 0x03, 0x6a);
- mipi_dsi_dcs_write_seq(dsi, 0xbb, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
- 0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
- mipi_dsi_dcs_write_seq(dsi, 0xff, 0x2c);
- mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x61, 0x1f);
- mipi_dsi_dcs_write_seq(dsi, 0x62, 0x1f);
- mipi_dsi_dcs_write_seq(dsi, 0x7e, 0x03);
- mipi_dsi_dcs_write_seq(dsi, 0x6a, 0x14);
- mipi_dsi_dcs_write_seq(dsi, 0x6b, 0x36);
- mipi_dsi_dcs_write_seq(dsi, 0x6c, 0x36);
- mipi_dsi_dcs_write_seq(dsi, 0x6d, 0x36);
- mipi_dsi_dcs_write_seq(dsi, 0x53, 0x04);
- mipi_dsi_dcs_write_seq(dsi, 0x54, 0x04);
- mipi_dsi_dcs_write_seq(dsi, 0x55, 0x04);
- mipi_dsi_dcs_write_seq(dsi, 0x56, 0x0f);
- mipi_dsi_dcs_write_seq(dsi, 0x58, 0x0f);
- mipi_dsi_dcs_write_seq(dsi, 0x59, 0x0f);
- mipi_dsi_dcs_write_seq(dsi, 0xff, 0xf0);
- mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x5a, 0x00);
-
- mipi_dsi_dcs_write_seq(dsi, 0xff, 0x10);
- mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01);
- mipi_dsi_dcs_write_seq(dsi, 0x51, 0xff);
- mipi_dsi_dcs_write_seq(dsi, 0x53, 0x24);
- mipi_dsi_dcs_write_seq(dsi, 0x55, 0x01);
-
- return 0;
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x10);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb0, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xc0, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xc1, 0x89, 0x28, 0x00, 0x08, 0x00, 0xaa, 0x02,
+ 0x0e, 0x00, 0x2b, 0x00, 0x07, 0x0d, 0xb7, 0x0c, 0xb7);
+
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xc2, 0x1b, 0xa0);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x20);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x01, 0x66);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x06, 0x40);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x07, 0x38);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x2f, 0x83);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x69, 0x91);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x95, 0xd1);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x96, 0xd1);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xf2, 0x64);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xf3, 0x54);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xf4, 0x64);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xf5, 0x54);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xf6, 0x64);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xf7, 0x54);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xf8, 0x64);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xf9, 0x54);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x24);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x01, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x03, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x05, 0x1d);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x08, 0x2f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x09, 0x2e);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x0a, 0x2d);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x0b, 0x2c);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x11, 0x17);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x12, 0x13);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x13, 0x15);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x15, 0x14);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x16, 0x16);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x17, 0x18);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x1b, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x1d, 0x1d);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x20, 0x2f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x21, 0x2e);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x22, 0x2d);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x23, 0x2c);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x29, 0x17);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x2a, 0x13);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x2b, 0x15);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x2f, 0x14);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x30, 0x16);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x31, 0x18);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x32, 0x04);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x34, 0x10);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x35, 0x1f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x36, 0x1f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x4d, 0x14);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x4e, 0x36);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x4f, 0x36);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x53, 0x36);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x71, 0x30);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x79, 0x11);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x7a, 0x82);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x7b, 0x8f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x7d, 0x04);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x80, 0x04);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x81, 0x04);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x82, 0x13);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x84, 0x31);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x85, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x86, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x87, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x90, 0x13);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x92, 0x31);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x93, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x94, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x95, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x9c, 0xf4);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x9d, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xa0, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xa2, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xa3, 0x02);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xa4, 0x04);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xa5, 0x04);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xc6, 0xc0);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xc9, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xd9, 0x80);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xe9, 0x02);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x25);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x18, 0x22);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x19, 0xe4);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x21, 0x40);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x66, 0xd8);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x68, 0x50);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x69, 0x10);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x6b, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x6d, 0x0d);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x6e, 0x48);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x72, 0x41);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x73, 0x4a);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x74, 0xd0);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x77, 0x62);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x79, 0x7e);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x7d, 0x03);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x7e, 0x15);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x7f, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x84, 0x4d);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xcf, 0x80);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xd6, 0x80);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xd7, 0x80);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xef, 0x20);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xf0, 0x84);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x26);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x81, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x83, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x84, 0x03);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x85, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x86, 0x03);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x87, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x88, 0x05);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x8a, 0x1a);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x8b, 0x11);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x8c, 0x24);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x8e, 0x42);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x8f, 0x11);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x90, 0x11);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x91, 0x11);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x9a, 0x80);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x9b, 0x04);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x9c, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x9d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x9e, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x27);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x01, 0x68);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x20, 0x81);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x21, 0x6a);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x25, 0x81);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x26, 0x94);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x6e, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x6f, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x70, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x71, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x72, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x75, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x76, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x77, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x7d, 0x09);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x7e, 0x67);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x80, 0x23);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x82, 0x09);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x83, 0x67);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x88, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x89, 0x10);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xa5, 0x10);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xa6, 0x23);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xa7, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb6, 0x40);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xe5, 0x02);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xe6, 0xd3);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xeb, 0x03);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xec, 0x28);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x2a);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x00, 0x91);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x03, 0x20);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x07, 0x50);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x0a, 0x70);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x0c, 0x04);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x0d, 0x40);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x0f, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x11, 0xe0);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x15, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x16, 0xa4);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x19, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x1a, 0x78);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x1b, 0x23);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x1d, 0x36);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x1e, 0x3e);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x1f, 0x3e);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x20, 0x3e);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x28, 0xfd);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x29, 0x12);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x2a, 0xe1);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x2d, 0x0a);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x30, 0x49);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x33, 0x96);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x34, 0xff);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x35, 0x40);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x36, 0xde);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x37, 0xf9);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x38, 0x45);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x39, 0xd9);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x3a, 0x49);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x4a, 0xf0);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x7a, 0x09);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x7b, 0x40);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x7f, 0xf0);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x83, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x84, 0xa4);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x87, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x88, 0x78);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x89, 0x23);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x8b, 0x36);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x8c, 0x7d);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x8d, 0x7d);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x8e, 0x7d);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x20);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb0, 0x00, 0x00, 0x00, 0x17, 0x00, 0x49, 0x00,
+ 0x6a, 0x00, 0x89, 0x00, 0x9f, 0x00, 0xb6, 0x00, 0xc8);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb1, 0x00, 0xd9, 0x01, 0x10, 0x01, 0x3a, 0x01,
+ 0x7a, 0x01, 0xa9, 0x01, 0xf2, 0x02, 0x2d, 0x02, 0x2e);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb2, 0x02, 0x64, 0x02, 0xa3, 0x02, 0xca, 0x03,
+ 0x00, 0x03, 0x1e, 0x03, 0x4a, 0x03, 0x59, 0x03, 0x6a);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb3, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
+ 0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb4, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
+ 0x71, 0x00, 0x90, 0x00, 0xa7, 0x00, 0xbf, 0x00, 0xd1);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb5, 0x00, 0xe2, 0x01, 0x1a, 0x01, 0x43, 0x01,
+ 0x83, 0x01, 0xb2, 0x01, 0xfa, 0x02, 0x34, 0x02, 0x36);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb6, 0x02, 0x6b, 0x02, 0xa8, 0x02, 0xd0, 0x03,
+ 0x03, 0x03, 0x21, 0x03, 0x4d, 0x03, 0x5b, 0x03, 0x6b);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb7, 0x03, 0x7e, 0x03, 0x94, 0x03, 0xac, 0x03,
+ 0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb8, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
+ 0x72, 0x00, 0x92, 0x00, 0xa8, 0x00, 0xbf, 0x00, 0xd1);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb9, 0x00, 0xe2, 0x01, 0x18, 0x01, 0x42, 0x01,
+ 0x81, 0x01, 0xaf, 0x01, 0xf5, 0x02, 0x2f, 0x02, 0x31);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xba, 0x02, 0x68, 0x02, 0xa6, 0x02, 0xcd, 0x03,
+ 0x01, 0x03, 0x1f, 0x03, 0x4a, 0x03, 0x59, 0x03, 0x6a);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xbb, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
+ 0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x21);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb0, 0x00, 0x00, 0x00, 0x17, 0x00, 0x49, 0x00,
+ 0x6a, 0x00, 0x89, 0x00, 0x9f, 0x00, 0xb6, 0x00, 0xc8);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb1, 0x00, 0xd9, 0x01, 0x10, 0x01, 0x3a, 0x01,
+ 0x7a, 0x01, 0xa9, 0x01, 0xf2, 0x02, 0x2d, 0x02, 0x2e);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb2, 0x02, 0x64, 0x02, 0xa3, 0x02, 0xca, 0x03,
+ 0x00, 0x03, 0x1e, 0x03, 0x4a, 0x03, 0x59, 0x03, 0x6a);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb3, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
+ 0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb4, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
+ 0x71, 0x00, 0x90, 0x00, 0xa7, 0x00, 0xbf, 0x00, 0xd1);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb5, 0x00, 0xe2, 0x01, 0x1a, 0x01, 0x43, 0x01,
+ 0x83, 0x01, 0xb2, 0x01, 0xfa, 0x02, 0x34, 0x02, 0x36);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb6, 0x02, 0x6b, 0x02, 0xa8, 0x02, 0xd0, 0x03,
+ 0x03, 0x03, 0x21, 0x03, 0x4d, 0x03, 0x5b, 0x03, 0x6b);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb7, 0x03, 0x7e, 0x03, 0x94, 0x03, 0xac, 0x03,
+ 0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb8, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x51, 0x00,
+ 0x72, 0x00, 0x92, 0x00, 0xa8, 0x00, 0xbf, 0x00, 0xd1);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xb9, 0x00, 0xe2, 0x01, 0x18, 0x01, 0x42, 0x01,
+ 0x81, 0x01, 0xaf, 0x01, 0xf5, 0x02, 0x2f, 0x02, 0x31);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xba, 0x02, 0x68, 0x02, 0xa6, 0x02, 0xcd, 0x03,
+ 0x01, 0x03, 0x1f, 0x03, 0x4a, 0x03, 0x59, 0x03, 0x6a);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xbb, 0x03, 0x7d, 0x03, 0x93, 0x03, 0xab, 0x03,
+ 0xc8, 0x03, 0xec, 0x03, 0xfe, 0x00, 0x00);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x2c);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x61, 0x1f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x62, 0x1f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x7e, 0x03);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x6a, 0x14);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x6b, 0x36);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x6c, 0x36);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x6d, 0x36);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x53, 0x04);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x54, 0x04);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x55, 0x04);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x56, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x58, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x59, 0x0f);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0xf0);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x5a, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xff, 0x10);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x51, 0xff);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x53, 0x24);
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x55, 0x01);
}
static int nt36672e_power_on(struct nt36672e_panel *ctx)
@@ -379,68 +377,46 @@ static int nt36672e_power_off(struct nt36672e_panel *ctx)
return ret;
}
-static int nt36672e_on(struct nt36672e_panel *ctx)
+static int nt36672e_on(struct nt36672e_panel *nt36672e)
{
- struct mipi_dsi_device *dsi = ctx->dsi;
- const struct panel_desc *desc = ctx->desc;
- int ret = 0;
+ struct mipi_dsi_multi_context ctx = { .dsi = nt36672e->dsi };
+ const struct panel_desc *desc = nt36672e->desc;
- dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+ nt36672e->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
- if (desc->init_sequence) {
- ret = desc->init_sequence(dsi);
- if (ret < 0) {
- dev_err(&dsi->dev, "panel init sequence failed: %d\n", ret);
- return ret;
- }
- }
+ if (desc->init_sequence)
+ desc->init_sequence(&ctx);
- ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
- if (ret < 0) {
- dev_err(&dsi->dev, "Failed to exit sleep mode: %d\n", ret);
- return ret;
- }
- msleep(120);
+ mipi_dsi_dcs_exit_sleep_mode_multi(&ctx);
+ mipi_dsi_msleep(&ctx, 120);
- ret = mipi_dsi_dcs_set_display_on(dsi);
- if (ret < 0) {
- dev_err(&dsi->dev, "Failed to set display on: %d\n", ret);
- return ret;
- }
- msleep(100);
+ mipi_dsi_dcs_set_display_on_multi(&ctx);
- return 0;
+ mipi_dsi_msleep(&ctx, 100);
+
+ return ctx.accum_err;
}
-static int nt36672e_off(struct nt36672e_panel *ctx)
+static int nt36672e_off(struct nt36672e_panel *panel)
{
- struct mipi_dsi_device *dsi = ctx->dsi;
- int ret = 0;
+ struct mipi_dsi_multi_context ctx = { .dsi = panel->dsi };
- dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
+ panel->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
- ret = mipi_dsi_dcs_set_display_off(dsi);
- if (ret < 0) {
- dev_err(&dsi->dev, "Failed to set display off: %d\n", ret);
- return ret;
- }
- msleep(20);
+ mipi_dsi_dcs_set_display_off_multi(&ctx);
+ mipi_dsi_msleep(&ctx, 20);
- ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
- if (ret < 0) {
- dev_err(&dsi->dev, "Failed to enter sleep mode: %d\n", ret);
- return ret;
- }
- msleep(60);
+ mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
+ mipi_dsi_msleep(&ctx, 60);
- return 0;
+ return ctx.accum_err;
}
static int nt36672e_panel_prepare(struct drm_panel *panel)
{
struct nt36672e_panel *ctx = to_nt36672e_panel(panel);
struct mipi_dsi_device *dsi = ctx->dsi;
- int ret = 0;
+ int ret;
ret = nt36672e_power_on(ctx);
if (ret < 0)
@@ -448,7 +424,6 @@ static int nt36672e_panel_prepare(struct drm_panel *panel)
ret = nt36672e_on(ctx);
if (ret < 0) {
- dev_err(&dsi->dev, "Failed to initialize panel: %d\n", ret);
if (nt36672e_power_off(ctx))
dev_err(&dsi->dev, "power off failed\n");
return ret;
@@ -461,11 +436,9 @@ static int nt36672e_panel_unprepare(struct drm_panel *panel)
{
struct nt36672e_panel *ctx = to_nt36672e_panel(panel);
struct mipi_dsi_device *dsi = ctx->dsi;
- int ret = 0;
+ int ret;
- ret = nt36672e_off(ctx);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to un-initialize panel: %d\n", ret);
+ nt36672e_off(ctx);
ret = nt36672e_power_off(ctx);
if (ret < 0)
diff --git a/drivers/gpu/drm/panel/panel-raydium-rm692e5.c b/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
index a613ba5b816c..21d97f6b8a2f 100644
--- a/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
+++ b/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
@@ -23,7 +23,6 @@ struct rm692e5_panel {
struct drm_dsc_config dsc;
struct regulator_bulk_data supplies[3];
struct gpio_desc *reset_gpio;
- bool prepared;
};
static inline struct rm692e5_panel *to_rm692e5_panel(struct drm_panel *panel)
@@ -171,9 +170,6 @@ static int rm692e5_prepare(struct drm_panel *panel)
struct device *dev = &ctx->dsi->dev;
int ret;
- if (ctx->prepared)
- return 0;
-
ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
if (ret < 0) {
dev_err(dev, "Failed to enable regulators: %d\n", ret);
@@ -213,8 +209,6 @@ static int rm692e5_prepare(struct drm_panel *panel)
mipi_dsi_generic_write_seq(ctx->dsi, 0xfe, 0x00);
- ctx->prepared = true;
-
return 0;
}
@@ -222,13 +216,9 @@ static int rm692e5_unprepare(struct drm_panel *panel)
{
struct rm692e5_panel *ctx = to_rm692e5_panel(panel);
- if (!ctx->prepared)
- return 0;
-
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
- ctx->prepared = false;
return 0;
}
diff --git a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c
index a9f0d214a900..9a482a744b8c 100644
--- a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c
+++ b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c
@@ -25,8 +25,6 @@
struct atana33xc20_panel {
struct drm_panel base;
- bool prepared;
- bool enabled;
bool el3_was_on;
bool no_hpd;
@@ -143,13 +141,8 @@ static int atana33xc20_disable(struct drm_panel *panel)
{
struct atana33xc20_panel *p = to_atana33xc20(panel);
- /* Disabling when already disabled is a no-op */
- if (!p->enabled)
- return 0;
-
gpiod_set_value_cansleep(p->el_on3_gpio, 0);
p->el_on3_off_time = ktime_get_boottime();
- p->enabled = false;
/*
* Keep track of the fact that EL_ON3 was on but we haven't power
@@ -173,10 +166,6 @@ static int atana33xc20_enable(struct drm_panel *panel)
{
struct atana33xc20_panel *p = to_atana33xc20(panel);
- /* Enabling when already enabled is a no-op */
- if (p->enabled)
- return 0;
-
/*
* Once EL_ON3 drops we absolutely need a power cycle before the next
* enable or the backlight will never come on again. The code ensures
@@ -195,20 +184,14 @@ static int atana33xc20_enable(struct drm_panel *panel)
atana33xc20_wait(p->powered_on_time, 400);
gpiod_set_value_cansleep(p->el_on3_gpio, 1);
- p->enabled = true;
return 0;
}
static int atana33xc20_unprepare(struct drm_panel *panel)
{
- struct atana33xc20_panel *p = to_atana33xc20(panel);
int ret;
- /* Unpreparing when already unprepared is a no-op */
- if (!p->prepared)
- return 0;
-
/*
* Purposely do a put_sync, don't use autosuspend. The panel's tcon
* seems to sometimes crash when you stop giving it data and this is
@@ -220,26 +203,19 @@ static int atana33xc20_unprepare(struct drm_panel *panel)
ret = pm_runtime_put_sync_suspend(panel->dev);
if (ret < 0)
return ret;
- p->prepared = false;
return 0;
}
static int atana33xc20_prepare(struct drm_panel *panel)
{
- struct atana33xc20_panel *p = to_atana33xc20(panel);
int ret;
- /* Preparing when already prepared is a no-op */
- if (p->prepared)
- return 0;
-
ret = pm_runtime_get_sync(panel->dev);
if (ret < 0) {
pm_runtime_put_autosuspend(panel->dev);
return ret;
}
- p->prepared = true;
return 0;
}
@@ -351,21 +327,10 @@ static void atana33xc20_remove(struct dp_aux_ep_device *aux_ep)
struct atana33xc20_panel *panel = dev_get_drvdata(dev);
drm_panel_remove(&panel->base);
- drm_panel_disable(&panel->base);
- drm_panel_unprepare(&panel->base);
drm_edid_free(panel->drm_edid);
}
-static void atana33xc20_shutdown(struct dp_aux_ep_device *aux_ep)
-{
- struct device *dev = &aux_ep->dev;
- struct atana33xc20_panel *panel = dev_get_drvdata(dev);
-
- drm_panel_disable(&panel->base);
- drm_panel_unprepare(&panel->base);
-}
-
static const struct of_device_id atana33xc20_dt_match[] = {
{ .compatible = "samsung,atna33xc20", },
{ /* sentinal */ }
@@ -386,7 +351,6 @@ static struct dp_aux_ep_driver atana33xc20_driver = {
},
.probe = atana33xc20_probe,
.remove = atana33xc20_remove,
- .shutdown = atana33xc20_shutdown,
};
static int __init atana33xc20_init(void)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index dcb6d0b6ced0..9b9e078ec8aa 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -138,9 +138,6 @@ struct panel_desc {
struct panel_simple {
struct drm_panel base;
- bool enabled;
-
- bool prepared;
ktime_t unprepared_time;
@@ -290,14 +287,9 @@ static int panel_simple_disable(struct drm_panel *panel)
{
struct panel_simple *p = to_panel_simple(panel);
- if (!p->enabled)
- return 0;
-
if (p->desc->delay.disable)
msleep(p->desc->delay.disable);
- p->enabled = false;
-
return 0;
}
@@ -317,18 +309,12 @@ static int panel_simple_suspend(struct device *dev)
static int panel_simple_unprepare(struct drm_panel *panel)
{
- struct panel_simple *p = to_panel_simple(panel);
int ret;
- /* Unpreparing when already unprepared is a no-op */
- if (!p->prepared)
- return 0;
-
pm_runtime_mark_last_busy(panel->dev);
ret = pm_runtime_put_autosuspend(panel->dev);
if (ret < 0)
return ret;
- p->prepared = false;
return 0;
}
@@ -356,21 +342,14 @@ static int panel_simple_resume(struct device *dev)
static int panel_simple_prepare(struct drm_panel *panel)
{
- struct panel_simple *p = to_panel_simple(panel);
int ret;
- /* Preparing when already prepared is a no-op */
- if (p->prepared)
- return 0;
-
ret = pm_runtime_get_sync(panel->dev);
if (ret < 0) {
pm_runtime_put_autosuspend(panel->dev);
return ret;
}
- p->prepared = true;
-
return 0;
}
@@ -378,14 +357,9 @@ static int panel_simple_enable(struct drm_panel *panel)
{
struct panel_simple *p = to_panel_simple(panel);
- if (p->enabled)
- return 0;
-
if (p->desc->delay.enable)
msleep(p->desc->delay.enable);
- p->enabled = true;
-
return 0;
}
@@ -609,7 +583,6 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
if (!panel)
return -ENOMEM;
- panel->enabled = false;
panel->desc = desc;
panel->supply = devm_regulator_get(dev, "power");
@@ -743,26 +716,39 @@ free_ddc:
return err;
}
-static void panel_simple_remove(struct device *dev)
+static void panel_simple_shutdown(struct device *dev)
{
struct panel_simple *panel = dev_get_drvdata(dev);
- drm_panel_remove(&panel->base);
+ /*
+ * NOTE: the following two calls don't really belong here. It is the
+ * responsibility of a correctly written DRM modeset driver to call
+ * drm_atomic_helper_shutdown() at shutdown time and that should
+ * cause the panel to be disabled / unprepared if needed. For now,
+ * however, we'll keep these calls due to the sheer number of
+ * different DRM modeset drivers used with panel-simple. The fact that
+ * we're calling these and _also_ the drm_atomic_helper_shutdown()
+ * will try to disable/unprepare means that we can get a warning about
+ * trying to disable/unprepare an already disabled/unprepared panel,
+ * but that's something we'll have to live with until we've confirmed
+ * that all DRM modeset drivers are properly calling
+ * drm_atomic_helper_shutdown().
+ */
drm_panel_disable(&panel->base);
drm_panel_unprepare(&panel->base);
-
- pm_runtime_dont_use_autosuspend(dev);
- pm_runtime_disable(dev);
- if (panel->ddc)
- put_device(&panel->ddc->dev);
}
-static void panel_simple_shutdown(struct device *dev)
+static void panel_simple_remove(struct device *dev)
{
struct panel_simple *panel = dev_get_drvdata(dev);
- drm_panel_disable(&panel->base);
- drm_panel_unprepare(&panel->base);
+ drm_panel_remove(&panel->base);
+ panel_simple_shutdown(dev);
+
+ pm_runtime_dont_use_autosuspend(dev);
+ pm_runtime_disable(dev);
+ if (panel->ddc)
+ put_device(&panel->ddc->dev);
}
static const struct drm_display_mode ampire_am_1280800n3tzqw_t00h_mode = {
@@ -2870,6 +2856,35 @@ static const struct panel_desc lg_lb070wv8 = {
.connector_type = DRM_MODE_CONNECTOR_LVDS,
};
+static const struct drm_display_mode lincolntech_lcd185_101ct_mode = {
+ .clock = 155127,
+ .hdisplay = 1920,
+ .hsync_start = 1920 + 128,
+ .hsync_end = 1920 + 128 + 20,
+ .htotal = 1920 + 128 + 20 + 12,
+ .vdisplay = 1200,
+ .vsync_start = 1200 + 19,
+ .vsync_end = 1200 + 19 + 4,
+ .vtotal = 1200 + 19 + 4 + 20,
+};
+
+static const struct panel_desc lincolntech_lcd185_101ct = {
+ .modes = &lincolntech_lcd185_101ct_mode,
+ .bpc = 8,
+ .num_modes = 1,
+ .size = {
+ .width = 217,
+ .height = 136,
+ },
+ .delay = {
+ .prepare = 50,
+ .disable = 50,
+ },
+ .bus_flags = DRM_BUS_FLAG_DE_HIGH,
+ .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
+ .connector_type = DRM_MODE_CONNECTOR_LVDS,
+};
+
static const struct display_timing logictechno_lt161010_2nh_timing = {
.pixelclock = { 26400000, 33300000, 46800000 },
.hactive = { 800, 800, 800 },
@@ -3026,6 +3041,64 @@ static const struct panel_desc logicpd_type_28 = {
.connector_type = DRM_MODE_CONNECTOR_DPI,
};
+static const struct drm_display_mode microtips_mf_101hiebcaf0_c_mode = {
+ .clock = 150275,
+ .hdisplay = 1920,
+ .hsync_start = 1920 + 32,
+ .hsync_end = 1920 + 32 + 52,
+ .htotal = 1920 + 32 + 52 + 24,
+ .vdisplay = 1200,
+ .vsync_start = 1200 + 24,
+ .vsync_end = 1200 + 24 + 8,
+ .vtotal = 1200 + 24 + 8 + 3,
+};
+
+static const struct panel_desc microtips_mf_101hiebcaf0_c = {
+ .modes = &microtips_mf_101hiebcaf0_c_mode,
+ .bpc = 8,
+ .num_modes = 1,
+ .size = {
+ .width = 217,
+ .height = 136,
+ },
+ .delay = {
+ .prepare = 50,
+ .disable = 50,
+ },
+ .bus_flags = DRM_BUS_FLAG_DE_HIGH,
+ .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
+ .connector_type = DRM_MODE_CONNECTOR_LVDS,
+};
+
+static const struct drm_display_mode microtips_mf_103hieb0ga0_mode = {
+ .clock = 93301,
+ .hdisplay = 1920,
+ .hsync_start = 1920 + 72,
+ .hsync_end = 1920 + 72 + 72,
+ .htotal = 1920 + 72 + 72 + 72,
+ .vdisplay = 720,
+ .vsync_start = 720 + 3,
+ .vsync_end = 720 + 3 + 3,
+ .vtotal = 720 + 3 + 3 + 2,
+};
+
+static const struct panel_desc microtips_mf_103hieb0ga0 = {
+ .modes = &microtips_mf_103hieb0ga0_mode,
+ .bpc = 8,
+ .num_modes = 1,
+ .size = {
+ .width = 244,
+ .height = 92,
+ },
+ .delay = {
+ .prepare = 50,
+ .disable = 50,
+ },
+ .bus_flags = DRM_BUS_FLAG_DE_HIGH,
+ .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
+ .connector_type = DRM_MODE_CONNECTOR_LVDS,
+};
+
static const struct drm_display_mode mitsubishi_aa070mc01_mode = {
.clock = 30400,
.hdisplay = 800,
@@ -4645,6 +4718,9 @@ static const struct of_device_id platform_of_match[] = {
.compatible = "lg,lb070wv8",
.data = &lg_lb070wv8,
}, {
+ .compatible = "lincolntech,lcd185-101ct",
+ .data = &lincolntech_lcd185_101ct,
+ }, {
.compatible = "logicpd,type28",
.data = &logicpd_type_28,
}, {
@@ -4663,6 +4739,12 @@ static const struct of_device_id platform_of_match[] = {
.compatible = "logictechno,lttd800480070-l6wh-rt",
.data = &logictechno_lttd800480070_l6wh_rt,
}, {
+ .compatible = "microtips,mf-101hiebcaf0",
+ .data = &microtips_mf_101hiebcaf0_c,
+ }, {
+ .compatible = "microtips,mf-103hieb0ga0",
+ .data = &microtips_mf_103hieb0ga0,
+ }, {
.compatible = "mitsubishi,aa070mc01-ca1",
.data = &mitsubishi_aa070mc01,
}, {
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
index 7d8302cca091..77b30e045a57 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
@@ -58,7 +58,6 @@ struct st7703 {
struct gpio_desc *reset_gpio;
struct regulator *vcc;
struct regulator *iovcc;
- bool prepared;
struct dentry *debugfs;
const struct st7703_panel_desc *desc;
@@ -752,13 +751,9 @@ static int st7703_unprepare(struct drm_panel *panel)
{
struct st7703 *ctx = panel_to_st7703(panel);
- if (!ctx->prepared)
- return 0;
-
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
regulator_disable(ctx->iovcc);
regulator_disable(ctx->vcc);
- ctx->prepared = false;
return 0;
}
@@ -768,9 +763,6 @@ static int st7703_prepare(struct drm_panel *panel)
struct st7703 *ctx = panel_to_st7703(panel);
int ret;
- if (ctx->prepared)
- return 0;
-
dev_dbg(ctx->dev, "Resetting the panel\n");
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
@@ -793,8 +785,6 @@ static int st7703_prepare(struct drm_panel *panel)
gpiod_set_value_cansleep(ctx->reset_gpio, 0);
usleep_range(15000, 20000);
- ctx->prepared = true;
-
return 0;
}
@@ -854,7 +844,13 @@ static int allpixelson_set(void *data, u64 val)
dev_dbg(ctx->dev, "Setting all pixels on\n");
mipi_dsi_generic_write_seq(dsi, ST7703_CMD_ALL_PIXEL_ON);
msleep(val * 1000);
- /* Reset the panel to get video back */
+
+ /*
+ * Reset the panel to get video back. NOTE: This isn't a
+ * particularly safe thing to do in general because it assumes
+ * that the screen was on to begin with, but this is just a
+ * debugfs file so it's not a huge deal.
+ */
drm_panel_disable(&ctx->panel);
drm_panel_unprepare(&ctx->panel);
drm_panel_prepare(&ctx->panel);
@@ -941,27 +937,11 @@ static int st7703_probe(struct mipi_dsi_device *dsi)
return 0;
}
-static void st7703_shutdown(struct mipi_dsi_device *dsi)
-{
- struct st7703 *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = drm_panel_unprepare(&ctx->panel);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret);
-
- ret = drm_panel_disable(&ctx->panel);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret);
-}
-
static void st7703_remove(struct mipi_dsi_device *dsi)
{
struct st7703 *ctx = mipi_dsi_get_drvdata(dsi);
int ret;
- st7703_shutdown(dsi);
-
ret = mipi_dsi_detach(dsi);
if (ret < 0)
dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
@@ -985,7 +965,6 @@ MODULE_DEVICE_TABLE(of, st7703_of_match);
static struct mipi_dsi_driver st7703_driver = {
.probe = st7703_probe,
.remove = st7703_remove,
- .shutdown = st7703_shutdown,
.driver = {
.name = DRV_NAME,
.of_match_table = st7703_of_match,
diff --git a/drivers/gpu/drm/panel/panel-sony-acx565akm.c b/drivers/gpu/drm/panel/panel-sony-acx565akm.c
index 3d6a286056a0..73ba93ff00fe 100644
--- a/drivers/gpu/drm/panel/panel-sony-acx565akm.c
+++ b/drivers/gpu/drm/panel/panel-sony-acx565akm.c
@@ -454,9 +454,6 @@ static int acx565akm_power_on(struct acx565akm_panel *lcd)
static void acx565akm_power_off(struct acx565akm_panel *lcd)
{
- if (!lcd->enabled)
- return;
-
acx565akm_set_display_state(lcd, 0);
acx565akm_set_sleep_mode(lcd, 1);
lcd->enabled = false;
@@ -655,9 +652,6 @@ static void acx565akm_remove(struct spi_device *spi)
if (lcd->has_bc)
acx565akm_backlight_cleanup(lcd);
-
- drm_panel_disable(&lcd->panel);
- drm_panel_unprepare(&lcd->panel);
}
static const struct of_device_id acx565akm_of_match[] = {
diff --git a/drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c b/drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c
index 8670386498a4..22a14006765e 100644
--- a/drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c
+++ b/drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c
@@ -52,7 +52,6 @@ struct xpp055c272 {
struct gpio_desc *reset_gpio;
struct regulator *vci;
struct regulator *iovcc;
- bool prepared;
};
static inline struct xpp055c272 *panel_to_xpp055c272(struct drm_panel *panel)
@@ -136,9 +135,6 @@ static int xpp055c272_unprepare(struct drm_panel *panel)
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
int ret;
- if (!ctx->prepared)
- return 0;
-
ret = mipi_dsi_dcs_set_display_off(dsi);
if (ret < 0)
dev_err(ctx->dev, "failed to set display off: %d\n", ret);
@@ -152,8 +148,6 @@ static int xpp055c272_unprepare(struct drm_panel *panel)
regulator_disable(ctx->iovcc);
regulator_disable(ctx->vci);
- ctx->prepared = false;
-
return 0;
}
@@ -163,9 +157,6 @@ static int xpp055c272_prepare(struct drm_panel *panel)
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
int ret;
- if (ctx->prepared)
- return 0;
-
dev_dbg(ctx->dev, "Resetting the panel\n");
ret = regulator_enable(ctx->vci);
if (ret < 0) {
@@ -209,8 +200,6 @@ static int xpp055c272_prepare(struct drm_panel *panel)
msleep(50);
- ctx->prepared = true;
-
return 0;
disable_iovcc:
@@ -317,27 +306,11 @@ static int xpp055c272_probe(struct mipi_dsi_device *dsi)
return 0;
}
-static void xpp055c272_shutdown(struct mipi_dsi_device *dsi)
-{
- struct xpp055c272 *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = drm_panel_unprepare(&ctx->panel);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret);
-
- ret = drm_panel_disable(&ctx->panel);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret);
-}
-
static void xpp055c272_remove(struct mipi_dsi_device *dsi)
{
struct xpp055c272 *ctx = mipi_dsi_get_drvdata(dsi);
int ret;
- xpp055c272_shutdown(dsi);
-
ret = mipi_dsi_detach(dsi);
if (ret < 0)
dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
@@ -358,7 +331,6 @@ static struct mipi_dsi_driver xpp055c272_driver = {
},
.probe = xpp055c272_probe,
.remove = xpp055c272_remove,
- .shutdown = xpp055c272_shutdown,
};
module_mipi_dsi_driver(xpp055c272_driver);