linux/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Panels based on the Ilitek ILI9882T display controller.
 */
#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>

struct ili9882t;

/*
 * Use this descriptor struct to describe different panels using the
 * Ilitek ILI9882T display controller.
 */
struct panel_desc {};

struct ili9882t {};

/* ILI9882-specific commands, add new commands as you decode them */
#define ILI9882T_DCS_SWITCH_PAGE

#define ili9882t_switch_page(ctx, 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)
{}

static int ili9882t_disable(struct drm_panel *panel)
{}

static int ili9882t_unprepare(struct drm_panel *panel)
{}

static int ili9882t_prepare(struct drm_panel *panel)
{}

static int ili9882t_enable(struct drm_panel *panel)
{}

static const struct drm_display_mode starry_ili9882t_default_mode =;

static const struct panel_desc starry_ili9882t_desc =;

static int ili9882t_get_modes(struct drm_panel *panel,
			      struct drm_connector *connector)
{}

static enum drm_panel_orientation ili9882t_get_orientation(struct drm_panel *panel)
{}

static const struct drm_panel_funcs ili9882t_funcs =;

static int ili9882t_add(struct ili9882t *ili)
{}

static int ili9882t_probe(struct mipi_dsi_device *dsi)
{}

static void ili9882t_remove(struct mipi_dsi_device *dsi)
{}

static const struct of_device_id ili9882t_of_match[] =;
MODULE_DEVICE_TABLE(of, ili9882t_of_match);

static struct mipi_dsi_driver ili9882t_driver =;
module_mipi_dsi_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();