Re: [PATCH v2 07/10] video: add support of panel rm68200
Hi yannick On 03/02/2018 04:44 PM, yannick fertre wrote: > Support for Raydium rm68200 720p dsi 2dl video mode panel. > > Signed-off-by: yannick fertre> --- > drivers/video/Kconfig | 8 + > drivers/video/Makefile | 1 + > drivers/video/raydium-rm68200.c | 329 > > 3 files changed, 338 insertions(+) > create mode 100644 drivers/video/raydium-rm68200.c > > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig > index 0f641d7..2561c59 100644 > --- a/drivers/video/Kconfig > +++ b/drivers/video/Kconfig > @@ -328,6 +328,14 @@ config VIDEO_LCD_ORISETECH_OTM8009A > ---help--- > Support for Orise Tech otm8009a 480p dsi 2dl video mode panel. > > +config VIDEO_LCD_RAYDIUM_RM68200 > + bool "RM68200 DSI LCD panel support" > + depends on DM_VIDEO > + select VIDEO_MIPI_DSI > + default n > + ---help--- > + Support for Raydium rm68200 720x1280 dsi 2dl video mode panel. > + > config VIDEO_LCD_SSD2828 > bool "SSD2828 bridge chip" > default n > diff --git a/drivers/video/Makefile b/drivers/video/Makefile > index 50be569..1a6c8d3 100644 > --- a/drivers/video/Makefile > +++ b/drivers/video/Makefile > @@ -38,6 +38,7 @@ obj-$(CONFIG_VIDEO_DA8XX) += da8xx-fb.o videomodes.o > obj-$(CONFIG_VIDEO_LCD_ANX9804) += anx9804.o > obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o > obj-$(CONFIG_VIDEO_LCD_ORISETECH_OTM8009A) += orisetech_otm8009a.o > +obj-$(CONFIG_VIDEO_LCD_RAYDIUM_RM68200) += raydium-rm68200.o > obj-$(CONFIG_VIDEO_LCD_SSD2828) += ssd2828.o > obj-$(CONFIG_VIDEO_MB862xx) += mb862xx.o videomodes.o > obj-$(CONFIG_VIDEO_MX3) += mx3fb.o videomodes.o > diff --git a/drivers/video/raydium-rm68200.c b/drivers/video/raydium-rm68200.c > new file mode 100644 > index 000..46afb58 > --- /dev/null > +++ b/drivers/video/raydium-rm68200.c > @@ -0,0 +1,329 @@ > +/* > + * Copyright (C) 2018 STMicroelectronics - All Rights Reserved > + * Author(s): Yannick Fertre for STMicroelectronics. > + * Philippe Cornu for STMicroelectronics. > + * > + * This rm68200 panel driver is based on the panel driver from > + * drivers/gpu/drm/panel/panel-raydium-rm68200.c (kernel linux) > + * > + * SPDX-License-Identifier: GPL-2.0 > + */ > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +DECLARE_GLOBAL_DATA_PTR; > + > +#define DRV_NAME "raydium_rm68200" > + > +/*** Manufacturer Command Set ***/ > +#define MCS_CMD_MODE_SW 0xFE /* CMD Mode Switch */ > +#define MCS_CMD1_UCS 0x00 /* User Command Set (UCS = CMD1) */ > +#define MCS_CMD2_P0 0x01 /* Manufacture Command Set Page0 (CMD2 P0) */ > +#define MCS_CMD2_P1 0x02 /* Manufacture Command Set Page1 (CMD2 P1) */ > +#define MCS_CMD2_P2 0x03 /* Manufacture Command Set Page2 (CMD2 P2) */ > +#define MCS_CMD2_P3 0x04 /* Manufacture Command Set Page3 (CMD2 P3) */ > + > +/* CMD2 P0 commands (Display Options and Power) */ > +#define MCS_STBCTR 0x12 /* TE1 Output Setting Zig-Zag Connection */ > +#define MCS_SGOPCTR 0x16 /* Source Bias Current */ > +#define MCS_SDCTR0x1A /* Source Output Delay Time */ > +#define MCS_INVCTR 0x1B /* Inversion Type */ > +#define MCS_EXT_PWR_IC 0x24 /* External PWR IC Control */ > +#define MCS_SETAVDD 0x27 /* PFM Control for AVDD Output */ > +#define MCS_SETAVEE 0x29 /* PFM Control for AVEE Output */ > +#define MCS_BT2CTR 0x2B /* DDVDL Charge Pump Control */ > +#define MCS_BT3CTR 0x2F /* VGH Charge Pump Control */ > +#define MCS_BT4CTR 0x34 /* VGL Charge Pump Control */ > +#define MCS_VCMCTR 0x46 /* VCOM Output Level Control */ > +#define MCS_SETVGN 0x52 /* VG M/S N Control */ > +#define MCS_SETVGP 0x54 /* VG M/S P Control */ > +#define MCS_SW_CTRL 0x5F /* Interface Control for PFM and MIPI */ > + > +/* CMD2 P2 commands (GOA Timing Control) - no description in datasheet */ > +#define GOA_VSTV10x00 > +#define GOA_VSTV20x07 > +#define GOA_VCLK10x0E > +#define GOA_VCLK20x17 > +#define GOA_VCLK_OPT10x20 > +#define GOA_BICLK1 0x2A > +#define GOA_BICLK2 0x37 > +#define GOA_BICLK3 0x44 > +#define GOA_BICLK4 0x4F > +#define GOA_BICLK_OPT1 0x5B > +#define GOA_BICLK_OPT2 0x60 > +#define MCS_GOA_GPO1 0x6D > +#define MCS_GOA_GPO2 0x71 > +#define MCS_GOA_EQ 0x74 > +#define MCS_GOA_CLK_GALLON 0x7C > +#define MCS_GOA_FS_SEL0 0x7E > +#define MCS_GOA_FS_SEL1 0x87 > +#define MCS_GOA_FS_SEL2 0x91 > +#define MCS_GOA_FS_SEL3 0x9B > +#define MCS_GOA_BS_SEL0 0xAC > +#define MCS_GOA_BS_SEL1 0xB5 > +#define MCS_GOA_BS_SEL2 0xBF > +#define MCS_GOA_BS_SEL3 0xC9 > +#define MCS_GOA_BS_SEL4 0xD3 > + > +/* CMD2 P3 commands (Gamma) */ > +#define MCS_GAMMA_VP 0x60 /* Gamma VP1~VP16 */ > +#define MCS_GAMMA_VN 0x70 /* Gamma VN1~VN16 */ > + > +struct rm68200_panel_priv { > + struct udevice *reg; > + struct
Re: [PATCH v2 07/10] video: add support of panel rm68200
Hi yannick On 03/02/2018 04:44 PM, yannick fertre wrote: > Support for Raydium rm68200 720p dsi 2dl video mode panel. > > Signed-off-by: yannick fertre > --- > drivers/video/Kconfig | 8 + > drivers/video/Makefile | 1 + > drivers/video/raydium-rm68200.c | 329 > > 3 files changed, 338 insertions(+) > create mode 100644 drivers/video/raydium-rm68200.c > > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig > index 0f641d7..2561c59 100644 > --- a/drivers/video/Kconfig > +++ b/drivers/video/Kconfig > @@ -328,6 +328,14 @@ config VIDEO_LCD_ORISETECH_OTM8009A > ---help--- > Support for Orise Tech otm8009a 480p dsi 2dl video mode panel. > > +config VIDEO_LCD_RAYDIUM_RM68200 > + bool "RM68200 DSI LCD panel support" > + depends on DM_VIDEO > + select VIDEO_MIPI_DSI > + default n > + ---help--- > + Support for Raydium rm68200 720x1280 dsi 2dl video mode panel. > + > config VIDEO_LCD_SSD2828 > bool "SSD2828 bridge chip" > default n > diff --git a/drivers/video/Makefile b/drivers/video/Makefile > index 50be569..1a6c8d3 100644 > --- a/drivers/video/Makefile > +++ b/drivers/video/Makefile > @@ -38,6 +38,7 @@ obj-$(CONFIG_VIDEO_DA8XX) += da8xx-fb.o videomodes.o > obj-$(CONFIG_VIDEO_LCD_ANX9804) += anx9804.o > obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o > obj-$(CONFIG_VIDEO_LCD_ORISETECH_OTM8009A) += orisetech_otm8009a.o > +obj-$(CONFIG_VIDEO_LCD_RAYDIUM_RM68200) += raydium-rm68200.o > obj-$(CONFIG_VIDEO_LCD_SSD2828) += ssd2828.o > obj-$(CONFIG_VIDEO_MB862xx) += mb862xx.o videomodes.o > obj-$(CONFIG_VIDEO_MX3) += mx3fb.o videomodes.o > diff --git a/drivers/video/raydium-rm68200.c b/drivers/video/raydium-rm68200.c > new file mode 100644 > index 000..46afb58 > --- /dev/null > +++ b/drivers/video/raydium-rm68200.c > @@ -0,0 +1,329 @@ > +/* > + * Copyright (C) 2018 STMicroelectronics - All Rights Reserved > + * Author(s): Yannick Fertre for STMicroelectronics. > + * Philippe Cornu for STMicroelectronics. > + * > + * This rm68200 panel driver is based on the panel driver from > + * drivers/gpu/drm/panel/panel-raydium-rm68200.c (kernel linux) > + * > + * SPDX-License-Identifier: GPL-2.0 > + */ > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +DECLARE_GLOBAL_DATA_PTR; > + > +#define DRV_NAME "raydium_rm68200" > + > +/*** Manufacturer Command Set ***/ > +#define MCS_CMD_MODE_SW 0xFE /* CMD Mode Switch */ > +#define MCS_CMD1_UCS 0x00 /* User Command Set (UCS = CMD1) */ > +#define MCS_CMD2_P0 0x01 /* Manufacture Command Set Page0 (CMD2 P0) */ > +#define MCS_CMD2_P1 0x02 /* Manufacture Command Set Page1 (CMD2 P1) */ > +#define MCS_CMD2_P2 0x03 /* Manufacture Command Set Page2 (CMD2 P2) */ > +#define MCS_CMD2_P3 0x04 /* Manufacture Command Set Page3 (CMD2 P3) */ > + > +/* CMD2 P0 commands (Display Options and Power) */ > +#define MCS_STBCTR 0x12 /* TE1 Output Setting Zig-Zag Connection */ > +#define MCS_SGOPCTR 0x16 /* Source Bias Current */ > +#define MCS_SDCTR0x1A /* Source Output Delay Time */ > +#define MCS_INVCTR 0x1B /* Inversion Type */ > +#define MCS_EXT_PWR_IC 0x24 /* External PWR IC Control */ > +#define MCS_SETAVDD 0x27 /* PFM Control for AVDD Output */ > +#define MCS_SETAVEE 0x29 /* PFM Control for AVEE Output */ > +#define MCS_BT2CTR 0x2B /* DDVDL Charge Pump Control */ > +#define MCS_BT3CTR 0x2F /* VGH Charge Pump Control */ > +#define MCS_BT4CTR 0x34 /* VGL Charge Pump Control */ > +#define MCS_VCMCTR 0x46 /* VCOM Output Level Control */ > +#define MCS_SETVGN 0x52 /* VG M/S N Control */ > +#define MCS_SETVGP 0x54 /* VG M/S P Control */ > +#define MCS_SW_CTRL 0x5F /* Interface Control for PFM and MIPI */ > + > +/* CMD2 P2 commands (GOA Timing Control) - no description in datasheet */ > +#define GOA_VSTV10x00 > +#define GOA_VSTV20x07 > +#define GOA_VCLK10x0E > +#define GOA_VCLK20x17 > +#define GOA_VCLK_OPT10x20 > +#define GOA_BICLK1 0x2A > +#define GOA_BICLK2 0x37 > +#define GOA_BICLK3 0x44 > +#define GOA_BICLK4 0x4F > +#define GOA_BICLK_OPT1 0x5B > +#define GOA_BICLK_OPT2 0x60 > +#define MCS_GOA_GPO1 0x6D > +#define MCS_GOA_GPO2 0x71 > +#define MCS_GOA_EQ 0x74 > +#define MCS_GOA_CLK_GALLON 0x7C > +#define MCS_GOA_FS_SEL0 0x7E > +#define MCS_GOA_FS_SEL1 0x87 > +#define MCS_GOA_FS_SEL2 0x91 > +#define MCS_GOA_FS_SEL3 0x9B > +#define MCS_GOA_BS_SEL0 0xAC > +#define MCS_GOA_BS_SEL1 0xB5 > +#define MCS_GOA_BS_SEL2 0xBF > +#define MCS_GOA_BS_SEL3 0xC9 > +#define MCS_GOA_BS_SEL4 0xD3 > + > +/* CMD2 P3 commands (Gamma) */ > +#define MCS_GAMMA_VP 0x60 /* Gamma VP1~VP16 */ > +#define MCS_GAMMA_VN 0x70 /* Gamma VN1~VN16 */ > + > +struct rm68200_panel_priv { > + struct udevice *reg; > + struct udevice *backlight; > + struct gpio_desc reset; > +}; > + > +static
[PATCH v2 07/10] video: add support of panel rm68200
Support for Raydium rm68200 720p dsi 2dl video mode panel. Signed-off-by: yannick fertre--- drivers/video/Kconfig | 8 + drivers/video/Makefile | 1 + drivers/video/raydium-rm68200.c | 329 3 files changed, 338 insertions(+) create mode 100644 drivers/video/raydium-rm68200.c diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 0f641d7..2561c59 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -328,6 +328,14 @@ config VIDEO_LCD_ORISETECH_OTM8009A ---help--- Support for Orise Tech otm8009a 480p dsi 2dl video mode panel. +config VIDEO_LCD_RAYDIUM_RM68200 + bool "RM68200 DSI LCD panel support" + depends on DM_VIDEO + select VIDEO_MIPI_DSI + default n + ---help--- + Support for Raydium rm68200 720x1280 dsi 2dl video mode panel. + config VIDEO_LCD_SSD2828 bool "SSD2828 bridge chip" default n diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 50be569..1a6c8d3 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -38,6 +38,7 @@ obj-$(CONFIG_VIDEO_DA8XX) += da8xx-fb.o videomodes.o obj-$(CONFIG_VIDEO_LCD_ANX9804) += anx9804.o obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o obj-$(CONFIG_VIDEO_LCD_ORISETECH_OTM8009A) += orisetech_otm8009a.o +obj-$(CONFIG_VIDEO_LCD_RAYDIUM_RM68200) += raydium-rm68200.o obj-$(CONFIG_VIDEO_LCD_SSD2828) += ssd2828.o obj-$(CONFIG_VIDEO_MB862xx) += mb862xx.o videomodes.o obj-$(CONFIG_VIDEO_MX3) += mx3fb.o videomodes.o diff --git a/drivers/video/raydium-rm68200.c b/drivers/video/raydium-rm68200.c new file mode 100644 index 000..46afb58 --- /dev/null +++ b/drivers/video/raydium-rm68200.c @@ -0,0 +1,329 @@ +/* + * Copyright (C) 2018 STMicroelectronics - All Rights Reserved + * Author(s): Yannick Fertre for STMicroelectronics. + * Philippe Cornu for STMicroelectronics. + * + * This rm68200 panel driver is based on the panel driver from + * drivers/gpu/drm/panel/panel-raydium-rm68200.c (kernel linux) + * + * SPDX-License-Identifier: GPL-2.0 + */ +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +#define DRV_NAME "raydium_rm68200" + +/*** Manufacturer Command Set ***/ +#define MCS_CMD_MODE_SW0xFE /* CMD Mode Switch */ +#define MCS_CMD1_UCS 0x00 /* User Command Set (UCS = CMD1) */ +#define MCS_CMD2_P00x01 /* Manufacture Command Set Page0 (CMD2 P0) */ +#define MCS_CMD2_P10x02 /* Manufacture Command Set Page1 (CMD2 P1) */ +#define MCS_CMD2_P20x03 /* Manufacture Command Set Page2 (CMD2 P2) */ +#define MCS_CMD2_P30x04 /* Manufacture Command Set Page3 (CMD2 P3) */ + +/* CMD2 P0 commands (Display Options and Power) */ +#define MCS_STBCTR 0x12 /* TE1 Output Setting Zig-Zag Connection */ +#define MCS_SGOPCTR0x16 /* Source Bias Current */ +#define MCS_SDCTR 0x1A /* Source Output Delay Time */ +#define MCS_INVCTR 0x1B /* Inversion Type */ +#define MCS_EXT_PWR_IC 0x24 /* External PWR IC Control */ +#define MCS_SETAVDD0x27 /* PFM Control for AVDD Output */ +#define MCS_SETAVEE0x29 /* PFM Control for AVEE Output */ +#define MCS_BT2CTR 0x2B /* DDVDL Charge Pump Control */ +#define MCS_BT3CTR 0x2F /* VGH Charge Pump Control */ +#define MCS_BT4CTR 0x34 /* VGL Charge Pump Control */ +#define MCS_VCMCTR 0x46 /* VCOM Output Level Control */ +#define MCS_SETVGN 0x52 /* VG M/S N Control */ +#define MCS_SETVGP 0x54 /* VG M/S P Control */ +#define MCS_SW_CTRL0x5F /* Interface Control for PFM and MIPI */ + +/* CMD2 P2 commands (GOA Timing Control) - no description in datasheet */ +#define GOA_VSTV1 0x00 +#define GOA_VSTV2 0x07 +#define GOA_VCLK1 0x0E +#define GOA_VCLK2 0x17 +#define GOA_VCLK_OPT1 0x20 +#define GOA_BICLK1 0x2A +#define GOA_BICLK2 0x37 +#define GOA_BICLK3 0x44 +#define GOA_BICLK4 0x4F +#define GOA_BICLK_OPT1 0x5B +#define GOA_BICLK_OPT2 0x60 +#define MCS_GOA_GPO1 0x6D +#define MCS_GOA_GPO2 0x71 +#define MCS_GOA_EQ 0x74 +#define MCS_GOA_CLK_GALLON 0x7C +#define MCS_GOA_FS_SEL00x7E +#define MCS_GOA_FS_SEL10x87 +#define MCS_GOA_FS_SEL20x91 +#define MCS_GOA_FS_SEL30x9B +#define MCS_GOA_BS_SEL00xAC +#define MCS_GOA_BS_SEL10xB5 +#define MCS_GOA_BS_SEL20xBF +#define MCS_GOA_BS_SEL30xC9 +#define MCS_GOA_BS_SEL40xD3 + +/* CMD2 P3 commands (Gamma) */ +#define MCS_GAMMA_VP 0x60 /* Gamma VP1~VP16 */ +#define MCS_GAMMA_VN 0x70 /* Gamma VN1~VN16 */ + +struct rm68200_panel_priv { + struct udevice *reg; + struct udevice *backlight; + struct gpio_desc reset; +}; + +static void rm68200_dcs_write_buf(struct udevice *dev, const void *data, + size_t len) +{ + struct mipi_dsi_panel_plat *plat =
[PATCH v2 07/10] video: add support of panel rm68200
Support for Raydium rm68200 720p dsi 2dl video mode panel. Signed-off-by: yannick fertre --- drivers/video/Kconfig | 8 + drivers/video/Makefile | 1 + drivers/video/raydium-rm68200.c | 329 3 files changed, 338 insertions(+) create mode 100644 drivers/video/raydium-rm68200.c diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 0f641d7..2561c59 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -328,6 +328,14 @@ config VIDEO_LCD_ORISETECH_OTM8009A ---help--- Support for Orise Tech otm8009a 480p dsi 2dl video mode panel. +config VIDEO_LCD_RAYDIUM_RM68200 + bool "RM68200 DSI LCD panel support" + depends on DM_VIDEO + select VIDEO_MIPI_DSI + default n + ---help--- + Support for Raydium rm68200 720x1280 dsi 2dl video mode panel. + config VIDEO_LCD_SSD2828 bool "SSD2828 bridge chip" default n diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 50be569..1a6c8d3 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -38,6 +38,7 @@ obj-$(CONFIG_VIDEO_DA8XX) += da8xx-fb.o videomodes.o obj-$(CONFIG_VIDEO_LCD_ANX9804) += anx9804.o obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o obj-$(CONFIG_VIDEO_LCD_ORISETECH_OTM8009A) += orisetech_otm8009a.o +obj-$(CONFIG_VIDEO_LCD_RAYDIUM_RM68200) += raydium-rm68200.o obj-$(CONFIG_VIDEO_LCD_SSD2828) += ssd2828.o obj-$(CONFIG_VIDEO_MB862xx) += mb862xx.o videomodes.o obj-$(CONFIG_VIDEO_MX3) += mx3fb.o videomodes.o diff --git a/drivers/video/raydium-rm68200.c b/drivers/video/raydium-rm68200.c new file mode 100644 index 000..46afb58 --- /dev/null +++ b/drivers/video/raydium-rm68200.c @@ -0,0 +1,329 @@ +/* + * Copyright (C) 2018 STMicroelectronics - All Rights Reserved + * Author(s): Yannick Fertre for STMicroelectronics. + * Philippe Cornu for STMicroelectronics. + * + * This rm68200 panel driver is based on the panel driver from + * drivers/gpu/drm/panel/panel-raydium-rm68200.c (kernel linux) + * + * SPDX-License-Identifier: GPL-2.0 + */ +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +#define DRV_NAME "raydium_rm68200" + +/*** Manufacturer Command Set ***/ +#define MCS_CMD_MODE_SW0xFE /* CMD Mode Switch */ +#define MCS_CMD1_UCS 0x00 /* User Command Set (UCS = CMD1) */ +#define MCS_CMD2_P00x01 /* Manufacture Command Set Page0 (CMD2 P0) */ +#define MCS_CMD2_P10x02 /* Manufacture Command Set Page1 (CMD2 P1) */ +#define MCS_CMD2_P20x03 /* Manufacture Command Set Page2 (CMD2 P2) */ +#define MCS_CMD2_P30x04 /* Manufacture Command Set Page3 (CMD2 P3) */ + +/* CMD2 P0 commands (Display Options and Power) */ +#define MCS_STBCTR 0x12 /* TE1 Output Setting Zig-Zag Connection */ +#define MCS_SGOPCTR0x16 /* Source Bias Current */ +#define MCS_SDCTR 0x1A /* Source Output Delay Time */ +#define MCS_INVCTR 0x1B /* Inversion Type */ +#define MCS_EXT_PWR_IC 0x24 /* External PWR IC Control */ +#define MCS_SETAVDD0x27 /* PFM Control for AVDD Output */ +#define MCS_SETAVEE0x29 /* PFM Control for AVEE Output */ +#define MCS_BT2CTR 0x2B /* DDVDL Charge Pump Control */ +#define MCS_BT3CTR 0x2F /* VGH Charge Pump Control */ +#define MCS_BT4CTR 0x34 /* VGL Charge Pump Control */ +#define MCS_VCMCTR 0x46 /* VCOM Output Level Control */ +#define MCS_SETVGN 0x52 /* VG M/S N Control */ +#define MCS_SETVGP 0x54 /* VG M/S P Control */ +#define MCS_SW_CTRL0x5F /* Interface Control for PFM and MIPI */ + +/* CMD2 P2 commands (GOA Timing Control) - no description in datasheet */ +#define GOA_VSTV1 0x00 +#define GOA_VSTV2 0x07 +#define GOA_VCLK1 0x0E +#define GOA_VCLK2 0x17 +#define GOA_VCLK_OPT1 0x20 +#define GOA_BICLK1 0x2A +#define GOA_BICLK2 0x37 +#define GOA_BICLK3 0x44 +#define GOA_BICLK4 0x4F +#define GOA_BICLK_OPT1 0x5B +#define GOA_BICLK_OPT2 0x60 +#define MCS_GOA_GPO1 0x6D +#define MCS_GOA_GPO2 0x71 +#define MCS_GOA_EQ 0x74 +#define MCS_GOA_CLK_GALLON 0x7C +#define MCS_GOA_FS_SEL00x7E +#define MCS_GOA_FS_SEL10x87 +#define MCS_GOA_FS_SEL20x91 +#define MCS_GOA_FS_SEL30x9B +#define MCS_GOA_BS_SEL00xAC +#define MCS_GOA_BS_SEL10xB5 +#define MCS_GOA_BS_SEL20xBF +#define MCS_GOA_BS_SEL30xC9 +#define MCS_GOA_BS_SEL40xD3 + +/* CMD2 P3 commands (Gamma) */ +#define MCS_GAMMA_VP 0x60 /* Gamma VP1~VP16 */ +#define MCS_GAMMA_VN 0x70 /* Gamma VN1~VN16 */ + +struct rm68200_panel_priv { + struct udevice *reg; + struct udevice *backlight; + struct gpio_desc reset; +}; + +static void rm68200_dcs_write_buf(struct udevice *dev, const void *data, + size_t len) +{ + struct mipi_dsi_panel_plat *plat = dev_get_platdata(dev); + struct mipi_dsi_device *device = plat->device; + +