<div dir="ltr"><div dir="ltr">Dear ALL:<div><br><div><p class="gmail-tgt" style="box-sizing:border-box;margin:0px;padding:0px;min-height:26px;line-height:25.9875px;color:rgb(51,51,51);font-family:Arial,"Microsoft YaHei","\005fae\008f6f\0096c5\009ed1","\005b8b\004f53","Malgun Gothic",Meiryo,sans-serif;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:justify;background-color:rgb(247,248,250)"><span class="gmail-tgt" style="box-sizing:border-box;min-height:26px;line-height:26px">Are there any questions about this submission?</span></p><ol><li>
<span class="gmail-tgt" style="box-sizing:border-box;min-height:26px;line-height:25.9875px;font-size:13.6px;font-variant-numeric:normal;font-variant-east-asian:normal">If there are questions? </span><span class="gmail-tgt" style="box-sizing:border-box;min-height:26px;line-height:25.9875px;font-size:13.6px;font-variant-numeric:normal;font-variant-east-asian:normal">What changes do I need to make</span></li><li><span class="gmail-tgt" style="box-sizing:border-box;min-height:26px;line-height:25.9875px;font-size:13.6px;font-variant-numeric:normal;font-variant-east-asian:normal"><span class="gmail-tgt" style="box-sizing:border-box;min-height:26px;line-height:25.9875px;font-size:13.6px;font-variant-numeric:normal;font-variant-east-asian:normal"> If it's okay. </span><span class="gmail-tgt" style="box-sizing:border-box;min-height:26px;line-height:25.9875px;font-size:13.6px;font-variant-numeric:normal;font-variant-east-asian:normal">When the code will show up in drm-musc (git://<a href="http://anongit.freedesktop.org/drm/drm-misc">anongit.freedesktop.org/drm/drm-misc</a>).</span></span></li></ol><div><span style="font-size:13.6px">Can you give me some advice?</span></div><div><br></div><div><span style="font-size:13.6px">thanks</span></div><p></p></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">dbasehore . <<a href="mailto:dbasehore@chromium.org">dbasehore@chromium.org</a>> 于2019年3月27日周三 上午11:12写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Mar 26, 2019 at 12:09 AM Jerry Han <<a href="mailto:jerry.han.hq@gmail.com" target="_blank">jerry.han.hq@gmail.com</a>> wrote:<br>
><br>
> Support Boe Himax8279d 8.0" 1200x1920 TFT LCD panel, it is a MIPI DSI<br>
> panel.<br>
><br>
> V7:<br>
> - Add the information of the reviewer<br>
> - Remove unnecessary delays, The udelay_range code gracefully returns<br>
> without hitting the scheduler on a delay of 0. (Derek)<br>
> - Merge the same data structures, like display_mode and off_cmds (Derek)<br>
> - Optimize the processing of results returned by<br>
> devm_gpiod_get_optional (Derek)<br>
<br>
Looks good to me overall. There's still some duplication on values<br>
like number of lanes, but that's not a blocking concern for me.<br>
<br>
><br>
> V6:<br>
> - Add the information of the reviewer (Sam)<br>
> - Delete unnecessary header files #include <linux/fb.h> (Sam)<br>
> - The config DRM_PANEL_BOE_HIMAX8279D appears twice. Drop one of them (Sam)<br>
> - ADD static, set_gpios function is not used outside this module (Sam)<br>
><br>
> V5:<br>
> - Added changelog<br>
><br>
> V4:<br>
> - Frefix all function maes with boe_ (Sam)<br>
> - Fsed "enable_gpio" replace "reset_gpio", Make it look clearer (Sam)<br>
> - Sort include lines alphabetically (Sam)<br>
> - Fixed entries in the makefile must be sorted alphabetically (Sam)<br>
> - Add send_mipi_cmds function to avoid duplicating the code (Sam)<br>
> - Add the necessary delay(reset_delay_t5) between reset and sending<br>
> the initialization command (Rock wang)<br>
><br>
> V3:<br>
> - Remove unnecessary delays in sending initialization commands (Jitao Shi)<br>
><br>
> V2:<br>
> - Use SPDX identifier (Sam)<br>
> - Use necessary header files replace drmP.h (Sam)<br>
> - Delete unnecessary header files #include <linux/err.h> (Sam)<br>
> - Specifies a GPIOs array to control the reset timing,<br>
> instead of reading "dsi-reset-sequence" data from DTS (Sam)<br>
> - Delete backlight_disable() function when already disabled (Sam)<br>
> - Use devm_of_find_backlight() replace of_find_backlight_by_node() (Sam)<br>
> - Move the necessary data in the DTS to the current file,<br>
> like porch, display_mode and Init code etc. (Sam)<br>
> - Add compatible device "boe,himax8279d10p" (Sam)<br>
><br>
> Signed-off-by: Jerry Han <<a href="mailto:hanxu5@huaqin.corp-partner.google.com" target="_blank">hanxu5@huaqin.corp-partner.google.com</a>><br>
> Reviewed-by: Sam Ravnborg <<a href="mailto:sam@ravnborg.org" target="_blank">sam@ravnborg.org</a>><br>
> Reviewed-by: Derek Basehore <<a href="mailto:dbasehore@chromium.org" target="_blank">dbasehore@chromium.org</a>><br>
> Cc: Jitao Shi <<a href="mailto:jitao.shi@mediatek.com" target="_blank">jitao.shi@mediatek.com</a>><br>
> Cc: Rock wang <<a href="mailto:rock_wang@himax.com.cn" target="_blank">rock_wang@himax.com.cn</a>><br>
> ---<br>
> MAINTAINERS | 6 +<br>
> drivers/gpu/drm/panel/Kconfig | 11 +<br>
> drivers/gpu/drm/panel/Makefile | 1 +<br>
> drivers/gpu/drm/panel/panel-boe-himax8279d.c | 1050 ++++++++++++++++++<br>
> 4 files changed, 1068 insertions(+)<br>
> create mode 100644 drivers/gpu/drm/panel/panel-boe-himax8279d.c<br>
><br>
> diff --git a/MAINTAINERS b/MAINTAINERS<br>
> index f8e63bcc4c1c..267468ca72bb 100644<br>
> --- a/MAINTAINERS<br>
> +++ b/MAINTAINERS<br>
> @@ -4816,6 +4816,12 @@ T: git git://<a href="http://anongit.freedesktop.org/drm/drm-misc" rel="noreferrer" target="_blank">anongit.freedesktop.org/drm/drm-misc</a><br>
> S: Maintained<br>
> F: drivers/gpu/drm/bochs/<br>
><br>
> +DRM DRIVER FOR BOE HIMAX8279D PANELS<br>
> +M: Jerry Han <<a href="mailto:hanxu5@huaqin.corp-partner.google.com" target="_blank">hanxu5@huaqin.corp-partner.google.com</a>><br>
> +S: Maintained<br>
> +F: drivers/gpu/drm/panel/panel-boe-himax8279d.c<br>
> +F: Documentation/devicetree/bindings/display/panel/boe,himax8279d.txt<br>
> +<br>
> DRM DRIVER FOR FARADAY TVE200 TV ENCODER<br>
> M: Linus Walleij <<a href="mailto:linus.walleij@linaro.org" target="_blank">linus.walleij@linaro.org</a>><br>
> T: git git://<a href="http://anongit.freedesktop.org/drm/drm-misc" rel="noreferrer" target="_blank">anongit.freedesktop.org/drm/drm-misc</a><br>
> diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig<br>
> index f53f817356db..fe2f87cc6627 100644<br>
> --- a/drivers/gpu/drm/panel/Kconfig<br>
> +++ b/drivers/gpu/drm/panel/Kconfig<br>
> @@ -17,6 +17,17 @@ config DRM_PANEL_ARM_VERSATILE<br>
> reference designs. The panel is detected using special registers<br>
> in the Versatile family syscon registers.<br>
><br>
> +config DRM_PANEL_BOE_HIMAX8279D<br>
> + tristate "Boe Himax8279d panel"<br>
> + depends on OF<br>
> + depends on DRM_MIPI_DSI<br>
> + depends on BACKLIGHT_CLASS_DEVICE<br>
> + help<br>
> + Say Y here if you want to enable support for Boe Himax8279d<br>
> + TFT-LCD modules. The panel has a 1200x1920 resolution and uses<br>
> + 24 bit RGB per pixel. It provides a MIPI DSI interface to<br>
> + the host and has a built-in LED backlight.<br>
> +<br>
> config DRM_PANEL_LVDS<br>
> tristate "Generic LVDS panel driver"<br>
> depends on OF<br>
> diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile<br>
> index 7834947a53b0..c4814b6f069e 100644<br>
> --- a/drivers/gpu/drm/panel/Makefile<br>
> +++ b/drivers/gpu/drm/panel/Makefile<br>
> @@ -1,5 +1,6 @@<br>
> # SPDX-License-Identifier: GPL-2.0<br>
> obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o<br>
> +obj-$(CONFIG_DRM_PANEL_BOE_HIMAX8279D) += panel-boe-himax8279d.o<br>
> obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o<br>
> obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o<br>
> obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o<br>
> diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c<br>
> new file mode 100644<br>
> index 000000000000..ff5a89e38fd7<br>
> --- /dev/null<br>
> +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c<br>
> @@ -0,0 +1,1050 @@<br>
> +// SPDX-License-Identifier: GPL-2.0<br>
> +/*<br>
> + * Copyright (c) 2019, Huaqin Telecom Technology Co., Ltd<br>
> + *<br>
> + * Author: Jerry Han <<a href="mailto:hanxu5@huaqin.corp-partner.google.com" target="_blank">hanxu5@huaqin.corp-partner.google.com</a>><br>
> + *<br>
> + */<br>
> +<br>
> +#include <linux/backlight.h><br>
> +#include <linux/delay.h><br>
> +#include <linux/kernel.h><br>
> +#include <linux/module.h><br>
> +#include <linux/of.h><br>
> +#include <linux/of_device.h><br>
> +<br>
> +#include <linux/gpio/consumer.h><br>
> +#include <linux/regulator/consumer.h><br>
> +<br>
> +#include <drm/drm_device.h><br>
> +#include <drm/drm_mipi_dsi.h><br>
> +#include <drm/drm_modes.h><br>
> +#include <drm/drm_panel.h><br>
> +#include <drm/drm_print.h><br>
> +<br>
> +#include <video/mipi_display.h><br>
> +<br>
> +struct panel_cmd {<br>
> + size_t len;<br>
> + const char *data;<br>
> +};<br>
> +<br>
> +#define _INIT_CMD(...) { \<br>
> + .len = sizeof((char[]){__VA_ARGS__}), \<br>
> + .data = (char[]){__VA_ARGS__} }<br>
> +<br>
> +struct panel_desc {<br>
> + const struct drm_display_mode *display_mode;<br>
> + unsigned int bpc;<br>
> + unsigned int width_mm;<br>
> + unsigned int height_mm;<br>
> +<br>
> + unsigned int delay_t1;<br>
> + unsigned int reset_delay_t2;<br>
> + unsigned int reset_delay_t3;<br>
> + unsigned int reset_delay_t4;<br>
> + unsigned int reset_delay_t5;<br>
> +<br>
> + unsigned long mode_flags;<br>
> + enum mipi_dsi_pixel_format format;<br>
> + unsigned int lanes;<br>
> + const struct panel_cmd *on_cmds;<br>
> + const struct panel_cmd *off_cmds;<br>
> +};<br>
> +<br>
> +struct panel_info {<br>
> + struct drm_panel base;<br>
> + struct mipi_dsi_device *link;<br>
> + const struct panel_desc *desc;<br>
> +<br>
> + struct backlight_device *backlight;<br>
> + struct gpio_desc *enable_gpio;<br>
> + struct gpio_desc *pp33_gpio;<br>
> + struct gpio_desc *pp18_gpio;<br>
> +<br>
> + bool prepared;<br>
> + bool enabled;<br>
> +};<br>
> +<br>
> +static inline struct panel_info *to_panel_info(struct drm_panel *panel)<br>
> +{<br>
> + return container_of(panel, struct panel_info, base);<br>
> +}<br>
> +<br>
> +static void set_gpios(struct panel_info *pinfo, int enable)<br>
> +{<br>
> + gpiod_set_value(pinfo->enable_gpio, enable);<br>
> + gpiod_set_value(pinfo->pp33_gpio, enable);<br>
> + gpiod_set_value(pinfo->pp18_gpio, enable);<br>
> +}<br>
> +<br>
> +static int send_mipi_cmds(struct drm_panel *panel, const struct panel_cmd *cmds)<br>
> +{<br>
> + struct panel_info *pinfo = to_panel_info(panel);<br>
> + unsigned int i = 0;<br>
> + int err;<br>
> +<br>
> + if (!cmds)<br>
> + return -EFAULT;<br>
> +<br>
> + for (i = 0; cmds[i].len != 0; i++) {<br>
> + const struct panel_cmd *cmd = &cmds[i];<br>
> +<br>
> + if (cmd->len == 2)<br>
> + err = mipi_dsi_dcs_write(pinfo->link,<br>
> + cmd->data[1], NULL, 0);<br>
> + else<br>
> + err = mipi_dsi_dcs_write(pinfo->link,<br>
> + cmd->data[1], cmd->data + 2,<br>
> + cmd->len - 2);<br>
> +<br>
> + if (err < 0)<br>
> + return err;<br>
> +<br>
> + usleep_range((cmd->data[0]) * 1000,<br>
> + (1 + cmd->data[0]) * 1000);<br>
> + }<br>
> +<br>
> + return 0;<br>
> +}<br>
> +<br>
> +static int boe_panel_disable(struct drm_panel *panel)<br>
> +{<br>
> + struct panel_info *pinfo = to_panel_info(panel);<br>
> +<br>
> + backlight_disable(pinfo->backlight);<br>
> +<br>
> + pinfo->enabled = false;<br>
> +<br>
> + return 0;<br>
> +}<br>
> +<br>
> +static int boe_panel_unprepare(struct drm_panel *panel)<br>
> +{<br>
> + struct panel_info *pinfo = to_panel_info(panel);<br>
> + int err;<br>
> +<br>
> + if (!pinfo->prepared)<br>
> + return 0;<br>
> +<br>
> + /* send off code */<br>
> + err = send_mipi_cmds(panel, pinfo->desc->off_cmds);<br>
> + if (err < 0) {<br>
> + DRM_DEV_ERROR(panel->dev,<br>
> + "failed to send DCS Off Code: %d\n", err);<br>
> + goto poweroff;<br>
> + }<br>
> +<br>
> + set_gpios(pinfo, 0);<br>
> +<br>
> + pinfo->prepared = false;<br>
> +<br>
> + return 0;<br>
> +<br>
> +poweroff:<br>
> + set_gpios(pinfo, 0);<br>
> + return err;<br>
> +}<br>
> +<br>
> +static int boe_panel_prepare(struct drm_panel *panel)<br>
> +{<br>
> + struct panel_info *pinfo = to_panel_info(panel);<br>
> + const struct panel_desc *desc = pinfo->desc;<br>
> + int err;<br>
> +<br>
> + if (pinfo->prepared)<br>
> + return 0;<br>
> +<br>
> + gpiod_set_value(pinfo->pp18_gpio, 1);<br>
> + /* T1 (> 5ms) */<br>
> + usleep_range(desc->delay_t1, 1000 + desc->delay_t1);<br>
> + gpiod_set_value(pinfo->pp33_gpio, 1);<br>
> +<br>
> + /* reset sequence */<br>
> + usleep_range(desc->reset_delay_t2, 1000 + desc->reset_delay_t2);<br>
> +<br>
> + gpiod_set_value(pinfo->enable_gpio, 1);<br>
> + usleep_range(desc->reset_delay_t3, 1000 + desc->reset_delay_t3);<br>
> + gpiod_set_value(pinfo->enable_gpio, 0);<br>
> +<br>
> + usleep_range(desc->reset_delay_t4, 1000 + desc->reset_delay_t4);<br>
> + gpiod_set_value(pinfo->enable_gpio, 1);<br>
> +<br>
> + usleep_range(desc->reset_delay_t5, 1000 + desc->reset_delay_t5);<br>
> +<br>
> + /* send init code */<br>
> + err = send_mipi_cmds(panel, pinfo->desc->on_cmds);<br>
> + if (err < 0) {<br>
> + DRM_DEV_ERROR(panel->dev,<br>
> + "failed to send DCS Init Code: %d\n", err);<br>
> + goto poweroff;<br>
> + }<br>
> +<br>
> + pinfo->prepared = true;<br>
> +<br>
> + return 0;<br>
> +<br>
> +poweroff:<br>
> + set_gpios(pinfo, 0);<br>
> + return err;<br>
> +}<br>
> +<br>
> +static int boe_panel_enable(struct drm_panel *panel)<br>
> +{<br>
> + struct panel_info *pinfo = to_panel_info(panel);<br>
> + int ret;<br>
> +<br>
> + if (pinfo->enabled)<br>
> + return 0;<br>
> +<br>
> + ret = backlight_enable(pinfo->backlight);<br>
> + if (ret) {<br>
> + DRM_DEV_ERROR(panel->drm->dev,<br>
> + "Failed to enable backlight %d\n", ret);<br>
> + return ret;<br>
> + }<br>
> +<br>
> + pinfo->enabled = true;<br>
> +<br>
> + return 0;<br>
> +}<br>
> +<br>
> +static int boe_panel_get_modes(struct drm_panel *panel)<br>
> +{<br>
> + struct panel_info *pinfo = to_panel_info(panel);<br>
> + const struct drm_display_mode *m = pinfo->desc->display_mode;<br>
> + struct drm_display_mode *mode;<br>
> +<br>
> + mode = drm_mode_duplicate(panel->drm, m);<br>
> + if (!mode) {<br>
> + DRM_DEV_ERROR(panel->drm->dev, "failed to add mode %ux%u@%u\n",<br>
> + m->hdisplay, m->vdisplay, m->vrefresh);<br>
> + return -ENOMEM;<br>
> + }<br>
> +<br>
> + drm_mode_set_name(mode);<br>
> +<br>
> + drm_mode_probed_add(panel->connector, mode);<br>
> +<br>
> + panel->connector->display_info.width_mm = pinfo->desc->width_mm;<br>
> + panel->connector->display_info.height_mm = pinfo->desc->height_mm;<br>
> + panel->connector->display_info.bpc = pinfo->desc->bpc;<br>
> +<br>
> + return 1;<br>
> +}<br>
> +<br>
> +static const struct drm_panel_funcs panel_funcs = {<br>
> + .disable = boe_panel_disable,<br>
> + .unprepare = boe_panel_unprepare,<br>
> + .prepare = boe_panel_prepare,<br>
> + .enable = boe_panel_enable,<br>
> + .get_modes = boe_panel_get_modes,<br>
> +};<br>
> +<br>
> +static const struct drm_display_mode default_display_mode = {<br>
> + .clock = 159420,<br>
> + .hdisplay = 1200,<br>
> + .hsync_start = 1200 + 80,<br>
> + .hsync_end = 1200 + 80 + 60,<br>
> + .htotal = 1200 + 80 + 60 + 24,<br>
> + .vdisplay = 1920,<br>
> + .vsync_start = 1920 + 10,<br>
> + .vsync_end = 1920 + 10 + 14,<br>
> + .vtotal = 1920 + 10 + 14 + 4,<br>
> + .vrefresh = 60,<br>
> +};<br>
> +<br>
> +static const struct panel_cmd default_off_cmds[] = {<br>
> + _INIT_CMD(0x00, 0x28),<br>
> + _INIT_CMD(0x01, 0x10),<br>
> +<br>
> + {},<br>
> +};<br>
> +<br>
> +/* 8 inch */<br>
> +static const struct panel_cmd boe_himax8279d8p_on_cmds[] = {<br>
> + _INIT_CMD(0x22, 0x10),<br>
> + _INIT_CMD(0x00, 0xB0, 0x05),<br>
> + _INIT_CMD(0x00, 0xB1, 0xE5),<br>
> + _INIT_CMD(0x00, 0xB3, 0x52),<br>
> + _INIT_CMD(0x00, 0xB0, 0x00),<br>
> + _INIT_CMD(0x00, 0xB3, 0x88),<br>
> + _INIT_CMD(0x00, 0xB0, 0x04),<br>
> + _INIT_CMD(0x00, 0xB8, 0x00),<br>
> + _INIT_CMD(0x00, 0xB0, 0x00),<br>
> + _INIT_CMD(0x00, 0xB2, 0x50),<br>
> + _INIT_CMD(0x00, 0xB6, 0x03),<br>
> + _INIT_CMD(0x00, 0xBA, 0x8B),<br>
> + _INIT_CMD(0x00, 0xBF, 0x15),<br>
> + _INIT_CMD(0x00, 0xC0, 0x0F),<br>
> + _INIT_CMD(0x00, 0xC2, 0x0C),<br>
> + _INIT_CMD(0x00, 0xC3, 0x02),<br>
> + _INIT_CMD(0x00, 0xC4, 0x0C),<br>
> + _INIT_CMD(0x00, 0xC5, 0x02),<br>
> + _INIT_CMD(0x00, 0xB0, 0x01),<br>
> + _INIT_CMD(0x00, 0xE0, 0x26),<br>
> + _INIT_CMD(0x00, 0xE1, 0x26),<br>
> + _INIT_CMD(0x00, 0xDC, 0x00),<br>
> + _INIT_CMD(0x00, 0xDD, 0x00),<br>
> + _INIT_CMD(0x00, 0xCC, 0x26),<br>
> + _INIT_CMD(0x00, 0xCD, 0x26),<br>
> + _INIT_CMD(0x00, 0xC8, 0x00),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xD2, 0x04),<br>
> + _INIT_CMD(0x00, 0xD3, 0x04),<br>
> + _INIT_CMD(0x00, 0xE6, 0x03),<br>
> + _INIT_CMD(0x00, 0xE7, 0x03),<br>
> + _INIT_CMD(0x00, 0xC4, 0x08),<br>
> + _INIT_CMD(0x00, 0xC5, 0x08),<br>
> + _INIT_CMD(0x00, 0xD8, 0x07),<br>
> + _INIT_CMD(0x00, 0xD9, 0x07),<br>
> + _INIT_CMD(0x00, 0xC2, 0x06),<br>
> + _INIT_CMD(0x00, 0xC3, 0x06),<br>
> + _INIT_CMD(0x00, 0xD6, 0x05),<br>
> + _INIT_CMD(0x00, 0xD7, 0x05),<br>
> + _INIT_CMD(0x00, 0xC0, 0x0C),<br>
> + _INIT_CMD(0x00, 0xC1, 0x0C),<br>
> + _INIT_CMD(0x00, 0xD4, 0x0B),<br>
> + _INIT_CMD(0x00, 0xD5, 0x0B),<br>
> + _INIT_CMD(0x00, 0xCA, 0x0A),<br>
> + _INIT_CMD(0x00, 0xCB, 0x0A),<br>
> + _INIT_CMD(0x00, 0xDE, 0x09),<br>
> + _INIT_CMD(0x00, 0xDF, 0x09),<br>
> + _INIT_CMD(0x00, 0xC6, 0x26),<br>
> + _INIT_CMD(0x00, 0xC7, 0x26),<br>
> + _INIT_CMD(0x00, 0xCE, 0x00),<br>
> + _INIT_CMD(0x00, 0xCF, 0x00),<br>
> + _INIT_CMD(0x00, 0xDA, 0x26),<br>
> + _INIT_CMD(0x00, 0xDB, 0x26),<br>
> + _INIT_CMD(0x00, 0xE2, 0x00),<br>
> + _INIT_CMD(0x00, 0xE3, 0x00),<br>
> + _INIT_CMD(0x00, 0xB0, 0x02),<br>
> + _INIT_CMD(0x00, 0xC0, 0x00),<br>
> + _INIT_CMD(0x00, 0xC1, 0x07),<br>
> + _INIT_CMD(0x00, 0xC2, 0x0D),<br>
> + _INIT_CMD(0x00, 0xC3, 0x18),<br>
> + _INIT_CMD(0x00, 0xC4, 0x27),<br>
> + _INIT_CMD(0x00, 0xC5, 0x28),<br>
> + _INIT_CMD(0x00, 0xC6, 0x30),<br>
> + _INIT_CMD(0x00, 0xC7, 0x2E),<br>
> + _INIT_CMD(0x00, 0xC8, 0x2F),<br>
> + _INIT_CMD(0x00, 0xC9, 0x1A),<br>
> + _INIT_CMD(0x00, 0xCA, 0x20),<br>
> + _INIT_CMD(0x00, 0xCB, 0x29),<br>
> + _INIT_CMD(0x00, 0xCC, 0x26),<br>
> + _INIT_CMD(0x00, 0xCD, 0x32),<br>
> + _INIT_CMD(0x00, 0xCE, 0x33),<br>
> + _INIT_CMD(0x00, 0xCF, 0x31),<br>
> + _INIT_CMD(0x00, 0xD0, 0x06),<br>
> + _INIT_CMD(0x00, 0xD2, 0x00),<br>
> + _INIT_CMD(0x00, 0xD3, 0x07),<br>
> + _INIT_CMD(0x00, 0xD4, 0x12),<br>
> + _INIT_CMD(0x00, 0xD5, 0x26),<br>
> + _INIT_CMD(0x00, 0xD6, 0x3D),<br>
> + _INIT_CMD(0x00, 0xD7, 0x3F),<br>
> + _INIT_CMD(0x00, 0xD8, 0x3F),<br>
> + _INIT_CMD(0x00, 0xD9, 0x3F),<br>
> + _INIT_CMD(0x00, 0xDA, 0x3F),<br>
> + _INIT_CMD(0x00, 0xDB, 0x3F),<br>
> + _INIT_CMD(0x00, 0xDC, 0x3F),<br>
> + _INIT_CMD(0x00, 0xDD, 0x3F),<br>
> + _INIT_CMD(0x00, 0xDE, 0x3F),<br>
> + _INIT_CMD(0x00, 0xDF, 0x3A),<br>
> + _INIT_CMD(0x00, 0xE0, 0x37),<br>
> + _INIT_CMD(0x00, 0xE1, 0x35),<br>
> + _INIT_CMD(0x00, 0xE2, 0x07),<br>
> + _INIT_CMD(0x00, 0xB0, 0x03),<br>
> + _INIT_CMD(0x00, 0xC8, 0x0B),<br>
> + _INIT_CMD(0x00, 0xC9, 0x07),<br>
> + _INIT_CMD(0x00, 0xC3, 0x00),<br>
> + _INIT_CMD(0x00, 0xE7, 0x00),<br>
> + _INIT_CMD(0x00, 0xC5, 0x2A),<br>
> + _INIT_CMD(0x00, 0xDE, 0x2A),<br>
> + _INIT_CMD(0x00, 0xCA, 0x43),<br>
> + _INIT_CMD(0x00, 0xC9, 0x07),<br>
> + _INIT_CMD(0x00, 0xE4, 0xC0),<br>
> + _INIT_CMD(0x00, 0xE5, 0x0D),<br>
> + _INIT_CMD(0x00, 0xCB, 0x00),<br>
> + _INIT_CMD(0x00, 0xB0, 0x06),<br>
> + _INIT_CMD(0x00, 0xB8, 0xA5),<br>
> + _INIT_CMD(0x00, 0xC0, 0xA5),<br>
> + _INIT_CMD(0x00, 0xC7, 0x0F),<br>
> + _INIT_CMD(0x00, 0xD5, 0x32),<br>
> + _INIT_CMD(0x00, 0xB8, 0x00),<br>
> + _INIT_CMD(0x00, 0xC0, 0x00),<br>
> + _INIT_CMD(0x00, 0xBC, 0x00),<br>
> + _INIT_CMD(0x00, 0xB0, 0x07),<br>
> + _INIT_CMD(0x00, 0xB1, 0x00),<br>
> + _INIT_CMD(0x00, 0xB2, 0x09),<br>
> + _INIT_CMD(0x00, 0xB3, 0x19),<br>
> + _INIT_CMD(0x00, 0xB4, 0x2F),<br>
> + _INIT_CMD(0x00, 0xB5, 0x44),<br>
> + _INIT_CMD(0x00, 0xB6, 0x52),<br>
> + _INIT_CMD(0x00, 0xB7, 0x6A),<br>
> + _INIT_CMD(0x00, 0xB8, 0x8A),<br>
> + _INIT_CMD(0x00, 0xB9, 0xCA),<br>
> + _INIT_CMD(0x00, 0xBA, 0x0C),<br>
> + _INIT_CMD(0x05, 0xBB, 0x87),<br>
> + _INIT_CMD(0x00, 0xBC, 0x06),<br>
> + _INIT_CMD(0x00, 0xBD, 0x0A),<br>
> + _INIT_CMD(0x00, 0xBE, 0x9B),<br>
> + _INIT_CMD(0x00, 0xBF, 0x0C),<br>
> + _INIT_CMD(0x00, 0xC0, 0x3D),<br>
> + _INIT_CMD(0x00, 0xC1, 0x71),<br>
> + _INIT_CMD(0x00, 0xC2, 0x90),<br>
> + _INIT_CMD(0x00, 0xC3, 0xA0),<br>
> + _INIT_CMD(0x00, 0xC4, 0xA8),<br>
> + _INIT_CMD(0x00, 0xC5, 0xB1),<br>
> + _INIT_CMD(0x00, 0xC6, 0xBB),<br>
> + _INIT_CMD(0x00, 0xC7, 0xC0),<br>
> + _INIT_CMD(0x00, 0xC8, 0xC4),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xCA, 0x00),<br>
> + _INIT_CMD(0x00, 0xCB, 0x16),<br>
> + _INIT_CMD(0x00, 0xCC, 0xAF),<br>
> + _INIT_CMD(0x00, 0xCD, 0xFF),<br>
> + _INIT_CMD(0x00, 0xCE, 0xFF),<br>
> + _INIT_CMD(0x00, 0xB0, 0x08),<br>
> + _INIT_CMD(0x00, 0xB1, 0x04),<br>
> + _INIT_CMD(0x00, 0xB2, 0x08),<br>
> + _INIT_CMD(0x00, 0xB3, 0x19),<br>
> + _INIT_CMD(0x00, 0xB4, 0x31),<br>
> + _INIT_CMD(0x00, 0xB5, 0x46),<br>
> + _INIT_CMD(0x00, 0xB6, 0x55),<br>
> + _INIT_CMD(0x00, 0xB7, 0x6E),<br>
> + _INIT_CMD(0x00, 0xB8, 0x92),<br>
> + _INIT_CMD(0x00, 0xB9, 0xD4),<br>
> + _INIT_CMD(0x00, 0xBA, 0x1B),<br>
> + _INIT_CMD(0x05, 0xBB, 0x9B),<br>
> + _INIT_CMD(0x00, 0xBC, 0x28),<br>
> + _INIT_CMD(0x00, 0xBD, 0x2D),<br>
> + _INIT_CMD(0x00, 0xBE, 0xC3),<br>
> + _INIT_CMD(0x00, 0xBF, 0x2F),<br>
> + _INIT_CMD(0x00, 0xC0, 0x62),<br>
> + _INIT_CMD(0x00, 0xC1, 0x99),<br>
> + _INIT_CMD(0x00, 0xC2, 0xAB),<br>
> + _INIT_CMD(0x00, 0xC3, 0xBF),<br>
> + _INIT_CMD(0x00, 0xC4, 0xCF),<br>
> + _INIT_CMD(0x00, 0xC5, 0xDF),<br>
> + _INIT_CMD(0x00, 0xC6, 0xF0),<br>
> + _INIT_CMD(0x00, 0xC7, 0xF9),<br>
> + _INIT_CMD(0x00, 0xC8, 0xFC),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xCA, 0x00),<br>
> + _INIT_CMD(0x00, 0xCB, 0x16),<br>
> + _INIT_CMD(0x00, 0xCC, 0xAF),<br>
> + _INIT_CMD(0x00, 0xCD, 0xFF),<br>
> + _INIT_CMD(0x00, 0xCE, 0xFF),<br>
> + _INIT_CMD(0x00, 0xB0, 0x09),<br>
> + _INIT_CMD(0x00, 0xB1, 0x04),<br>
> + _INIT_CMD(0x00, 0xB2, 0x05),<br>
> + _INIT_CMD(0x00, 0xB3, 0x17),<br>
> + _INIT_CMD(0x00, 0xB4, 0x2E),<br>
> + _INIT_CMD(0x00, 0xB5, 0x42),<br>
> + _INIT_CMD(0x00, 0xB6, 0x51),<br>
> + _INIT_CMD(0x00, 0xB7, 0x69),<br>
> + _INIT_CMD(0x00, 0xB8, 0x88),<br>
> + _INIT_CMD(0x00, 0xB9, 0xC9),<br>
> + _INIT_CMD(0x00, 0xBA, 0x0C),<br>
> + _INIT_CMD(0x05, 0xBB, 0x86),<br>
> + _INIT_CMD(0x00, 0xBC, 0x03),<br>
> + _INIT_CMD(0x00, 0xBD, 0x08),<br>
> + _INIT_CMD(0x00, 0xBE, 0x95),<br>
> + _INIT_CMD(0x00, 0xBF, 0x05),<br>
> + _INIT_CMD(0x00, 0xC0, 0x35),<br>
> + _INIT_CMD(0x00, 0xC1, 0x62),<br>
> + _INIT_CMD(0x00, 0xC2, 0x81),<br>
> + _INIT_CMD(0x00, 0xC3, 0x96),<br>
> + _INIT_CMD(0x00, 0xC4, 0x9E),<br>
> + _INIT_CMD(0x00, 0xC5, 0xA5),<br>
> + _INIT_CMD(0x00, 0xC6, 0xAD),<br>
> + _INIT_CMD(0x00, 0xC7, 0xB1),<br>
> + _INIT_CMD(0x00, 0xC8, 0xB4),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xCA, 0x00),<br>
> + _INIT_CMD(0x00, 0xCB, 0x16),<br>
> + _INIT_CMD(0x00, 0xCC, 0xAF),<br>
> + _INIT_CMD(0x00, 0xCD, 0xFF),<br>
> + _INIT_CMD(0x00, 0xCE, 0xFF),<br>
> + _INIT_CMD(0x00, 0xB0, 0x0A),<br>
> + _INIT_CMD(0x00, 0xB1, 0x00),<br>
> + _INIT_CMD(0x00, 0xB2, 0x09),<br>
> + _INIT_CMD(0x00, 0xB3, 0x19),<br>
> + _INIT_CMD(0x00, 0xB4, 0x2F),<br>
> + _INIT_CMD(0x00, 0xB5, 0x44),<br>
> + _INIT_CMD(0x00, 0xB6, 0x52),<br>
> + _INIT_CMD(0x00, 0xB7, 0x6A),<br>
> + _INIT_CMD(0x00, 0xB8, 0x8A),<br>
> + _INIT_CMD(0x00, 0xB9, 0xCA),<br>
> + _INIT_CMD(0x00, 0xBA, 0x0C),<br>
> + _INIT_CMD(0x05, 0xBB, 0x87),<br>
> + _INIT_CMD(0x00, 0xBC, 0x06),<br>
> + _INIT_CMD(0x00, 0xBD, 0x0A),<br>
> + _INIT_CMD(0x00, 0xBE, 0x9B),<br>
> + _INIT_CMD(0x00, 0xBF, 0x0C),<br>
> + _INIT_CMD(0x00, 0xC0, 0x3D),<br>
> + _INIT_CMD(0x00, 0xC1, 0x71),<br>
> + _INIT_CMD(0x00, 0xC2, 0x90),<br>
> + _INIT_CMD(0x00, 0xC3, 0xA0),<br>
> + _INIT_CMD(0x00, 0xC4, 0xA8),<br>
> + _INIT_CMD(0x00, 0xC5, 0xB1),<br>
> + _INIT_CMD(0x00, 0xC6, 0xBB),<br>
> + _INIT_CMD(0x00, 0xC7, 0xC0),<br>
> + _INIT_CMD(0x00, 0xC8, 0xC4),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xCA, 0x00),<br>
> + _INIT_CMD(0x00, 0xCB, 0x16),<br>
> + _INIT_CMD(0x00, 0xCC, 0xAF),<br>
> + _INIT_CMD(0x00, 0xCD, 0xFF),<br>
> + _INIT_CMD(0x00, 0xCE, 0xFF),<br>
> + _INIT_CMD(0x00, 0xB0, 0x0B),<br>
> + _INIT_CMD(0x00, 0xB1, 0x04),<br>
> + _INIT_CMD(0x00, 0xB2, 0x08),<br>
> + _INIT_CMD(0x00, 0xB3, 0x19),<br>
> + _INIT_CMD(0x00, 0xB4, 0x31),<br>
> + _INIT_CMD(0x00, 0xB5, 0x46),<br>
> + _INIT_CMD(0x00, 0xB6, 0x55),<br>
> + _INIT_CMD(0x00, 0xB7, 0x6E),<br>
> + _INIT_CMD(0x00, 0xB8, 0x92),<br>
> + _INIT_CMD(0x00, 0xB9, 0xD4),<br>
> + _INIT_CMD(0x00, 0xBA, 0x1B),<br>
> + _INIT_CMD(0x05, 0xBB, 0x9B),<br>
> + _INIT_CMD(0x00, 0xBC, 0x28),<br>
> + _INIT_CMD(0x00, 0xBD, 0x2D),<br>
> + _INIT_CMD(0x00, 0xBE, 0xC3),<br>
> + _INIT_CMD(0x00, 0xBF, 0x2F),<br>
> + _INIT_CMD(0x00, 0xC0, 0x62),<br>
> + _INIT_CMD(0x00, 0xC1, 0x99),<br>
> + _INIT_CMD(0x00, 0xC2, 0xAB),<br>
> + _INIT_CMD(0x00, 0xC3, 0xBF),<br>
> + _INIT_CMD(0x00, 0xC4, 0xCF),<br>
> + _INIT_CMD(0x00, 0xC5, 0xDF),<br>
> + _INIT_CMD(0x00, 0xC6, 0xF0),<br>
> + _INIT_CMD(0x00, 0xC7, 0xF9),<br>
> + _INIT_CMD(0x00, 0xC8, 0xFC),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xCA, 0x00),<br>
> + _INIT_CMD(0x00, 0xCB, 0x16),<br>
> + _INIT_CMD(0x00, 0xCC, 0xAF),<br>
> + _INIT_CMD(0x00, 0xCD, 0xFF),<br>
> + _INIT_CMD(0x00, 0xCE, 0xFF),<br>
> + _INIT_CMD(0x00, 0xB0, 0x0C),<br>
> + _INIT_CMD(0x00, 0xB1, 0x04),<br>
> + _INIT_CMD(0x00, 0xB2, 0x05),<br>
> + _INIT_CMD(0x00, 0xB3, 0x17),<br>
> + _INIT_CMD(0x00, 0xB4, 0x2E),<br>
> + _INIT_CMD(0x00, 0xB5, 0x42),<br>
> + _INIT_CMD(0x00, 0xB6, 0x51),<br>
> + _INIT_CMD(0x00, 0xB7, 0x69),<br>
> + _INIT_CMD(0x00, 0xB8, 0x88),<br>
> + _INIT_CMD(0x00, 0xB9, 0xC9),<br>
> + _INIT_CMD(0x00, 0xBA, 0x0C),<br>
> + _INIT_CMD(0x05, 0xBB, 0x86),<br>
> + _INIT_CMD(0x00, 0xBC, 0x03),<br>
> + _INIT_CMD(0x00, 0xBD, 0x08),<br>
> + _INIT_CMD(0x00, 0xBE, 0x95),<br>
> + _INIT_CMD(0x00, 0xBF, 0x05),<br>
> + _INIT_CMD(0x00, 0xC0, 0x35),<br>
> + _INIT_CMD(0x00, 0xC1, 0x62),<br>
> + _INIT_CMD(0x00, 0xC2, 0x81),<br>
> + _INIT_CMD(0x00, 0xC3, 0x96),<br>
> + _INIT_CMD(0x00, 0xC4, 0x9E),<br>
> + _INIT_CMD(0x00, 0xC5, 0xA5),<br>
> + _INIT_CMD(0x00, 0xC6, 0xAD),<br>
> + _INIT_CMD(0x00, 0xC7, 0xB1),<br>
> + _INIT_CMD(0x00, 0xC8, 0xB4),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xCA, 0x00),<br>
> + _INIT_CMD(0x00, 0xCB, 0x16),<br>
> + _INIT_CMD(0x00, 0xCC, 0xAF),<br>
> + _INIT_CMD(0x00, 0xCD, 0xFF),<br>
> + _INIT_CMD(0x64, 0xCE, 0xFF),<br>
> + _INIT_CMD(0x00, 0xB0, 0x00),<br>
> + _INIT_CMD(0x00, 0xB3, 0x08),<br>
> + _INIT_CMD(0x00, 0xB0, 0x04),<br>
> + _INIT_CMD(0x0A, 0xB8, 0x68),<br>
> + _INIT_CMD(0x78, 0x11),<br>
> + _INIT_CMD(0x14, 0x29),<br>
> +<br>
> + {},<br>
> +};<br>
> +<br>
> +static const struct panel_desc boe_himax8279d8p_panel_desc = {<br>
> + .display_mode = &default_display_mode,<br>
> + .bpc = 8,<br>
> + .width_mm = 107,<br>
> + .height_mm = 172,<br>
> + .delay_t1 = 5000,<br>
> + .reset_delay_t2 = 14000,<br>
> + .reset_delay_t3 = 1000,<br>
> + .reset_delay_t4 = 1000,<br>
> + .reset_delay_t5 = 5000,<br>
> + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |<br>
> + MIPI_DSI_CLOCK_NON_CONTINUOUS | MIPI_DSI_MODE_LPM,<br>
> + .format = MIPI_DSI_FMT_RGB888,<br>
> + .lanes = 4,<br>
> + .on_cmds = boe_himax8279d8p_on_cmds,<br>
> + .off_cmds = default_off_cmds,<br>
> +};<br>
> +<br>
> +/* 10 inch */<br>
> +static const struct panel_cmd boe_himax8279d10p_on_cmds[] = {<br>
> + _INIT_CMD(0x00, 0xB0, 0x05),<br>
> + _INIT_CMD(0x00, 0xB1, 0xE5),<br>
> + _INIT_CMD(0x00, 0xB3, 0x52),<br>
> + _INIT_CMD(0x00, 0xB0, 0x00),<br>
> + _INIT_CMD(0x00, 0xB3, 0x88),<br>
> + _INIT_CMD(0x00, 0xB0, 0x04),<br>
> + _INIT_CMD(0x00, 0xB8, 0x00),<br>
> + _INIT_CMD(0x00, 0xB0, 0x00),<br>
> + _INIT_CMD(0x00, 0xB2, 0x50),<br>
> + _INIT_CMD(0x00, 0xB6, 0x03),<br>
> + _INIT_CMD(0x00, 0xBA, 0x8B),<br>
> + _INIT_CMD(0x00, 0xBF, 0x1A),<br>
> + _INIT_CMD(0x00, 0xC0, 0x0F),<br>
> + _INIT_CMD(0x00, 0xC2, 0x0C),<br>
> + _INIT_CMD(0x00, 0xC3, 0x02),<br>
> + _INIT_CMD(0x00, 0xC4, 0x0C),<br>
> + _INIT_CMD(0x00, 0xC5, 0x02),<br>
> + _INIT_CMD(0x00, 0xB0, 0x01),<br>
> + _INIT_CMD(0x00, 0xE0, 0x26),<br>
> + _INIT_CMD(0x00, 0xE1, 0x26),<br>
> + _INIT_CMD(0x00, 0xDC, 0x00),<br>
> + _INIT_CMD(0x00, 0xDD, 0x00),<br>
> + _INIT_CMD(0x00, 0xCC, 0x26),<br>
> + _INIT_CMD(0x00, 0xCD, 0x26),<br>
> + _INIT_CMD(0x00, 0xC8, 0x00),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xD2, 0x04),<br>
> + _INIT_CMD(0x00, 0xD3, 0x04),<br>
> + _INIT_CMD(0x00, 0xE6, 0x03),<br>
> + _INIT_CMD(0x00, 0xE7, 0x03),<br>
> + _INIT_CMD(0x00, 0xC4, 0x08),<br>
> + _INIT_CMD(0x00, 0xC5, 0x08),<br>
> + _INIT_CMD(0x00, 0xD8, 0x07),<br>
> + _INIT_CMD(0x00, 0xD9, 0x07),<br>
> + _INIT_CMD(0x00, 0xC2, 0x06),<br>
> + _INIT_CMD(0x00, 0xC3, 0x06),<br>
> + _INIT_CMD(0x00, 0xD6, 0x05),<br>
> + _INIT_CMD(0x00, 0xD7, 0x05),<br>
> + _INIT_CMD(0x00, 0xC0, 0x0C),<br>
> + _INIT_CMD(0x00, 0xC1, 0x0C),<br>
> + _INIT_CMD(0x00, 0xD4, 0x0B),<br>
> + _INIT_CMD(0x00, 0xD5, 0x0B),<br>
> + _INIT_CMD(0x00, 0xCA, 0x0A),<br>
> + _INIT_CMD(0x00, 0xCB, 0x0A),<br>
> + _INIT_CMD(0x00, 0xDE, 0x09),<br>
> + _INIT_CMD(0x00, 0xDF, 0x09),<br>
> + _INIT_CMD(0x00, 0xC6, 0x26),<br>
> + _INIT_CMD(0x00, 0xC7, 0x26),<br>
> + _INIT_CMD(0x00, 0xCE, 0x00),<br>
> + _INIT_CMD(0x00, 0xCF, 0x00),<br>
> + _INIT_CMD(0x00, 0xDA, 0x26),<br>
> + _INIT_CMD(0x00, 0xDB, 0x26),<br>
> + _INIT_CMD(0x00, 0xE2, 0x00),<br>
> + _INIT_CMD(0x00, 0xE3, 0x00),<br>
> + _INIT_CMD(0x00, 0xB0, 0x02),<br>
> + _INIT_CMD(0x00, 0xC0, 0x00),<br>
> + _INIT_CMD(0x00, 0xC1, 0x07),<br>
> + _INIT_CMD(0x00, 0xC2, 0x0D),<br>
> + _INIT_CMD(0x00, 0xC3, 0x18),<br>
> + _INIT_CMD(0x00, 0xC4, 0x27),<br>
> + _INIT_CMD(0x00, 0xC5, 0x28),<br>
> + _INIT_CMD(0x00, 0xC6, 0x30),<br>
> + _INIT_CMD(0x00, 0xC7, 0x2E),<br>
> + _INIT_CMD(0x00, 0xC8, 0x2F),<br>
> + _INIT_CMD(0x00, 0xC9, 0x1A),<br>
> + _INIT_CMD(0x00, 0xCA, 0x20),<br>
> + _INIT_CMD(0x00, 0xCB, 0x29),<br>
> + _INIT_CMD(0x00, 0xCC, 0x26),<br>
> + _INIT_CMD(0x00, 0xCD, 0x32),<br>
> + _INIT_CMD(0x00, 0xCE, 0x33),<br>
> + _INIT_CMD(0x00, 0xCF, 0x31),<br>
> + _INIT_CMD(0x00, 0xD0, 0x06),<br>
> + _INIT_CMD(0x00, 0xD2, 0x00),<br>
> + _INIT_CMD(0x00, 0xD3, 0x07),<br>
> + _INIT_CMD(0x00, 0xD4, 0x12),<br>
> + _INIT_CMD(0x00, 0xD5, 0x26),<br>
> + _INIT_CMD(0x00, 0xD6, 0x3D),<br>
> + _INIT_CMD(0x00, 0xD7, 0x3F),<br>
> + _INIT_CMD(0x00, 0xD8, 0x3F),<br>
> + _INIT_CMD(0x00, 0xD9, 0x3F),<br>
> + _INIT_CMD(0x00, 0xDA, 0x3F),<br>
> + _INIT_CMD(0x00, 0xDB, 0x3F),<br>
> + _INIT_CMD(0x00, 0xDC, 0x3F),<br>
> + _INIT_CMD(0x00, 0xDD, 0x3F),<br>
> + _INIT_CMD(0x00, 0xDE, 0x3F),<br>
> + _INIT_CMD(0x00, 0xDF, 0x3A),<br>
> + _INIT_CMD(0x00, 0xE0, 0x37),<br>
> + _INIT_CMD(0x00, 0xE1, 0x35),<br>
> + _INIT_CMD(0x00, 0xE2, 0x07),<br>
> + _INIT_CMD(0x00, 0xB0, 0x03),<br>
> + _INIT_CMD(0x00, 0xC8, 0x0B),<br>
> + _INIT_CMD(0x00, 0xC9, 0x07),<br>
> + _INIT_CMD(0x00, 0xC3, 0x00),<br>
> + _INIT_CMD(0x00, 0xE7, 0x00),<br>
> + _INIT_CMD(0x00, 0xC5, 0x2A),<br>
> + _INIT_CMD(0x00, 0xDE, 0x2A),<br>
> + _INIT_CMD(0x00, 0xCA, 0x43),<br>
> + _INIT_CMD(0x00, 0xC9, 0x07),<br>
> + _INIT_CMD(0x00, 0xE4, 0xC0),<br>
> + _INIT_CMD(0x00, 0xE5, 0x0D),<br>
> + _INIT_CMD(0x00, 0xCB, 0x00),<br>
> + _INIT_CMD(0x00, 0xB0, 0x06),<br>
> + _INIT_CMD(0x00, 0xB8, 0xA5),<br>
> + _INIT_CMD(0x00, 0xC0, 0xA5),<br>
> + _INIT_CMD(0x00, 0xC7, 0x0F),<br>
> + _INIT_CMD(0x00, 0xD5, 0x32),<br>
> + _INIT_CMD(0x00, 0xB8, 0x00),<br>
> + _INIT_CMD(0x00, 0xC0, 0x00),<br>
> + _INIT_CMD(0x00, 0xBC, 0x00),<br>
> + _INIT_CMD(0x00, 0xB0, 0x07),<br>
> + _INIT_CMD(0x00, 0xB1, 0x00),<br>
> + _INIT_CMD(0x00, 0xB2, 0x09),<br>
> + _INIT_CMD(0x00, 0xB3, 0x19),<br>
> + _INIT_CMD(0x00, 0xB4, 0x2F),<br>
> + _INIT_CMD(0x00, 0xB5, 0x44),<br>
> + _INIT_CMD(0x00, 0xB6, 0x52),<br>
> + _INIT_CMD(0x00, 0xB7, 0x6A),<br>
> + _INIT_CMD(0x00, 0xB8, 0x8A),<br>
> + _INIT_CMD(0x00, 0xB9, 0xCA),<br>
> + _INIT_CMD(0x00, 0xBA, 0x0C),<br>
> + _INIT_CMD(0x00, 0xBB, 0x87),<br>
> + _INIT_CMD(0x00, 0xBC, 0x06),<br>
> + _INIT_CMD(0x00, 0xBD, 0x0A),<br>
> + _INIT_CMD(0x00, 0xBE, 0x9B),<br>
> + _INIT_CMD(0x00, 0xBF, 0x0C),<br>
> + _INIT_CMD(0x00, 0xC0, 0x3D),<br>
> + _INIT_CMD(0x00, 0xC1, 0x71),<br>
> + _INIT_CMD(0x00, 0xC2, 0x90),<br>
> + _INIT_CMD(0x00, 0xC3, 0xA0),<br>
> + _INIT_CMD(0x00, 0xC4, 0xA8),<br>
> + _INIT_CMD(0x00, 0xC5, 0xB1),<br>
> + _INIT_CMD(0x00, 0xC6, 0xBB),<br>
> + _INIT_CMD(0x00, 0xC7, 0xC0),<br>
> + _INIT_CMD(0x00, 0xC8, 0xC4),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xCA, 0x00),<br>
> + _INIT_CMD(0x00, 0xCB, 0x16),<br>
> + _INIT_CMD(0x00, 0xCC, 0xAF),<br>
> + _INIT_CMD(0x00, 0xCD, 0xFF),<br>
> + _INIT_CMD(0x00, 0xCE, 0xFF),<br>
> + _INIT_CMD(0x00, 0xB0, 0x08),<br>
> + _INIT_CMD(0x00, 0xB1, 0x04),<br>
> + _INIT_CMD(0x00, 0xB2, 0x08),<br>
> + _INIT_CMD(0x00, 0xB3, 0x19),<br>
> + _INIT_CMD(0x00, 0xB4, 0x31),<br>
> + _INIT_CMD(0x00, 0xB5, 0x46),<br>
> + _INIT_CMD(0x00, 0xB6, 0x55),<br>
> + _INIT_CMD(0x00, 0xB7, 0x6E),<br>
> + _INIT_CMD(0x00, 0xB8, 0x92),<br>
> + _INIT_CMD(0x00, 0xB9, 0xD4),<br>
> + _INIT_CMD(0x00, 0xBA, 0x1B),<br>
> + _INIT_CMD(0x00, 0xBB, 0x9B),<br>
> + _INIT_CMD(0x00, 0xBC, 0x28),<br>
> + _INIT_CMD(0x00, 0xBD, 0x2D),<br>
> + _INIT_CMD(0x00, 0xBE, 0xC3),<br>
> + _INIT_CMD(0x00, 0xBF, 0x2F),<br>
> + _INIT_CMD(0x00, 0xC0, 0x62),<br>
> + _INIT_CMD(0x00, 0xC1, 0x99),<br>
> + _INIT_CMD(0x00, 0xC2, 0xAB),<br>
> + _INIT_CMD(0x00, 0xC3, 0xBF),<br>
> + _INIT_CMD(0x00, 0xC4, 0xCF),<br>
> + _INIT_CMD(0x00, 0xC5, 0xDF),<br>
> + _INIT_CMD(0x00, 0xC6, 0xF0),<br>
> + _INIT_CMD(0x00, 0xC7, 0xF9),<br>
> + _INIT_CMD(0x00, 0xC8, 0xFC),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xCA, 0x00),<br>
> + _INIT_CMD(0x00, 0xCB, 0x16),<br>
> + _INIT_CMD(0x00, 0xCC, 0xAF),<br>
> + _INIT_CMD(0x00, 0xCD, 0xFF),<br>
> + _INIT_CMD(0x00, 0xCE, 0xFF),<br>
> + _INIT_CMD(0x00, 0xB0, 0x09),<br>
> + _INIT_CMD(0x00, 0xB1, 0x04),<br>
> + _INIT_CMD(0x00, 0xB2, 0x05),<br>
> + _INIT_CMD(0x00, 0xB3, 0x17),<br>
> + _INIT_CMD(0x00, 0xB4, 0x2E),<br>
> + _INIT_CMD(0x00, 0xB5, 0x42),<br>
> + _INIT_CMD(0x00, 0xB6, 0x51),<br>
> + _INIT_CMD(0x00, 0xB7, 0x69),<br>
> + _INIT_CMD(0x00, 0xB8, 0x88),<br>
> + _INIT_CMD(0x00, 0xB9, 0xC9),<br>
> + _INIT_CMD(0x00, 0xBA, 0x0C),<br>
> + _INIT_CMD(0x00, 0xBB, 0x86),<br>
> + _INIT_CMD(0x00, 0xBC, 0x03),<br>
> + _INIT_CMD(0x00, 0xBD, 0x08),<br>
> + _INIT_CMD(0x00, 0xBE, 0x95),<br>
> + _INIT_CMD(0x00, 0xBF, 0x05),<br>
> + _INIT_CMD(0x00, 0xC0, 0x35),<br>
> + _INIT_CMD(0x00, 0xC1, 0x62),<br>
> + _INIT_CMD(0x00, 0xC2, 0x81),<br>
> + _INIT_CMD(0x00, 0xC3, 0x96),<br>
> + _INIT_CMD(0x00, 0xC4, 0x9E),<br>
> + _INIT_CMD(0x00, 0xC5, 0xA5),<br>
> + _INIT_CMD(0x00, 0xC6, 0xAD),<br>
> + _INIT_CMD(0x00, 0xC7, 0xB1),<br>
> + _INIT_CMD(0x00, 0xC8, 0xB4),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xCA, 0x00),<br>
> + _INIT_CMD(0x00, 0xCB, 0x16),<br>
> + _INIT_CMD(0x00, 0xCC, 0xAF),<br>
> + _INIT_CMD(0x00, 0xCD, 0xFF),<br>
> + _INIT_CMD(0x00, 0xCE, 0xFF),<br>
> + _INIT_CMD(0x00, 0xB0, 0x0A),<br>
> + _INIT_CMD(0x00, 0xB1, 0x00),<br>
> + _INIT_CMD(0x00, 0xB2, 0x09),<br>
> + _INIT_CMD(0x00, 0xB3, 0x19),<br>
> + _INIT_CMD(0x00, 0xB4, 0x2F),<br>
> + _INIT_CMD(0x00, 0xB5, 0x44),<br>
> + _INIT_CMD(0x00, 0xB6, 0x52),<br>
> + _INIT_CMD(0x00, 0xB7, 0x6A),<br>
> + _INIT_CMD(0x00, 0xB8, 0x8A),<br>
> + _INIT_CMD(0x00, 0xB9, 0xCA),<br>
> + _INIT_CMD(0x00, 0xBA, 0x0C),<br>
> + _INIT_CMD(0x00, 0xBB, 0x87),<br>
> + _INIT_CMD(0x00, 0xBC, 0x06),<br>
> + _INIT_CMD(0x00, 0xBD, 0x0A),<br>
> + _INIT_CMD(0x00, 0xBE, 0x9B),<br>
> + _INIT_CMD(0x00, 0xBF, 0x0C),<br>
> + _INIT_CMD(0x00, 0xC0, 0x3D),<br>
> + _INIT_CMD(0x00, 0xC1, 0x71),<br>
> + _INIT_CMD(0x00, 0xC2, 0x90),<br>
> + _INIT_CMD(0x00, 0xC3, 0xA0),<br>
> + _INIT_CMD(0x00, 0xC4, 0xA8),<br>
> + _INIT_CMD(0x00, 0xC5, 0xB1),<br>
> + _INIT_CMD(0x00, 0xC6, 0xBB),<br>
> + _INIT_CMD(0x00, 0xC7, 0xC0),<br>
> + _INIT_CMD(0x00, 0xC8, 0xC4),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xCA, 0x00),<br>
> + _INIT_CMD(0x00, 0xCB, 0x16),<br>
> + _INIT_CMD(0x00, 0xCC, 0xAF),<br>
> + _INIT_CMD(0x00, 0xCD, 0xFF),<br>
> + _INIT_CMD(0x00, 0xCE, 0xFF),<br>
> + _INIT_CMD(0x00, 0xB0, 0x0B),<br>
> + _INIT_CMD(0x00, 0xB1, 0x04),<br>
> + _INIT_CMD(0x00, 0xB2, 0x08),<br>
> + _INIT_CMD(0x00, 0xB3, 0x19),<br>
> + _INIT_CMD(0x00, 0xB4, 0x31),<br>
> + _INIT_CMD(0x00, 0xB5, 0x46),<br>
> + _INIT_CMD(0x00, 0xB6, 0x55),<br>
> + _INIT_CMD(0x00, 0xB7, 0x6E),<br>
> + _INIT_CMD(0x00, 0xB8, 0x92),<br>
> + _INIT_CMD(0x00, 0xB9, 0xD4),<br>
> + _INIT_CMD(0x00, 0xBA, 0x1B),<br>
> + _INIT_CMD(0x00, 0xBB, 0x9B),<br>
> + _INIT_CMD(0x00, 0xBC, 0x28),<br>
> + _INIT_CMD(0x00, 0xBD, 0x2D),<br>
> + _INIT_CMD(0x00, 0xBE, 0xC3),<br>
> + _INIT_CMD(0x00, 0xBF, 0x2F),<br>
> + _INIT_CMD(0x00, 0xC0, 0x62),<br>
> + _INIT_CMD(0x00, 0xC1, 0x99),<br>
> + _INIT_CMD(0x00, 0xC2, 0xAB),<br>
> + _INIT_CMD(0x00, 0xC3, 0xBF),<br>
> + _INIT_CMD(0x00, 0xC4, 0xCF),<br>
> + _INIT_CMD(0x00, 0xC5, 0xDF),<br>
> + _INIT_CMD(0x00, 0xC6, 0xF0),<br>
> + _INIT_CMD(0x00, 0xC7, 0xF9),<br>
> + _INIT_CMD(0x00, 0xC8, 0xFC),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xCA, 0x00),<br>
> + _INIT_CMD(0x00, 0xCB, 0x16),<br>
> + _INIT_CMD(0x00, 0xCC, 0xAF),<br>
> + _INIT_CMD(0x00, 0xCD, 0xFF),<br>
> + _INIT_CMD(0x00, 0xCE, 0xFF),<br>
> + _INIT_CMD(0x00, 0xB0, 0x0C),<br>
> + _INIT_CMD(0x00, 0xB1, 0x04),<br>
> + _INIT_CMD(0x00, 0xB2, 0x05),<br>
> + _INIT_CMD(0x00, 0xB3, 0x17),<br>
> + _INIT_CMD(0x00, 0xB4, 0x2E),<br>
> + _INIT_CMD(0x00, 0xB5, 0x42),<br>
> + _INIT_CMD(0x00, 0xB6, 0x51),<br>
> + _INIT_CMD(0x00, 0xB7, 0x69),<br>
> + _INIT_CMD(0x00, 0xB8, 0x88),<br>
> + _INIT_CMD(0x00, 0xB9, 0xC9),<br>
> + _INIT_CMD(0x00, 0xBA, 0x0C),<br>
> + _INIT_CMD(0x00, 0xBB, 0x86),<br>
> + _INIT_CMD(0x00, 0xBC, 0x03),<br>
> + _INIT_CMD(0x00, 0xBD, 0x08),<br>
> + _INIT_CMD(0x00, 0xBE, 0x95),<br>
> + _INIT_CMD(0x00, 0xBF, 0x05),<br>
> + _INIT_CMD(0x00, 0xC0, 0x35),<br>
> + _INIT_CMD(0x00, 0xC1, 0x62),<br>
> + _INIT_CMD(0x00, 0xC2, 0x81),<br>
> + _INIT_CMD(0x00, 0xC3, 0x96),<br>
> + _INIT_CMD(0x00, 0xC4, 0x9E),<br>
> + _INIT_CMD(0x00, 0xC5, 0xA5),<br>
> + _INIT_CMD(0x00, 0xC6, 0xAD),<br>
> + _INIT_CMD(0x00, 0xC7, 0xB1),<br>
> + _INIT_CMD(0x00, 0xC8, 0xB4),<br>
> + _INIT_CMD(0x00, 0xC9, 0x00),<br>
> + _INIT_CMD(0x00, 0xCA, 0x00),<br>
> + _INIT_CMD(0x00, 0xCB, 0x16),<br>
> + _INIT_CMD(0x00, 0xCC, 0xAF),<br>
> + _INIT_CMD(0x00, 0xCD, 0xFF),<br>
> + _INIT_CMD(0x00, 0xCE, 0xFF),<br>
> + _INIT_CMD(0x00, 0xB0, 0x00),<br>
> + _INIT_CMD(0x00, 0xB3, 0x08),<br>
> + _INIT_CMD(0x00, 0xB0, 0x04),<br>
> + _INIT_CMD(0x64, 0xB8, 0x68),<br>
> +<br>
> + {},<br>
> +};<br>
> +<br>
> +static const struct panel_desc boe_himax8279d10p_panel_desc = {<br>
> + .display_mode = &default_display_mode,<br>
> + .bpc = 8,<br>
> + .width_mm = 135,<br>
> + .height_mm = 216,<br>
> + .delay_t1 = 5000,<br>
> + .reset_delay_t2 = 14000,<br>
> + .reset_delay_t3 = 1000,<br>
> + .reset_delay_t4 = 1000,<br>
> + .reset_delay_t5 = 5000,<br>
> + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |<br>
> + MIPI_DSI_CLOCK_NON_CONTINUOUS | MIPI_DSI_MODE_LPM,<br>
> + .format = MIPI_DSI_FMT_RGB888,<br>
> + .lanes = 4,<br>
> + .on_cmds = boe_himax8279d10p_on_cmds,<br>
> + .off_cmds = default_off_cmds,<br>
> +};<br>
> +<br>
> +static const struct of_device_id panel_of_match[] = {<br>
> + { .compatible = "boe,himax8279d8p",<br>
> + .data = &boe_himax8279d8p_panel_desc<br>
> + }, { .compatible = "boe,himax8279d10p",<br>
> + .data = &boe_himax8279d10p_panel_desc<br>
> + }, {<br>
> + /* sentinel */<br>
> + }<br>
> +};<br>
> +MODULE_DEVICE_TABLE(of, panel_of_match);<br>
> +<br>
> +static int panel_add(struct panel_info *pinfo)<br>
> +{<br>
> + struct device *dev = &pinfo->link->dev;<br>
> + int ret;<br>
> +<br>
> + pinfo->pp18_gpio = devm_gpiod_get_optional(dev, "pp18", GPIOD_OUT_HIGH);<br>
> + if (IS_ERR(pinfo->pp18_gpio)) {<br>
> + ret = PTR_ERR(pinfo->pp18_gpio);<br>
> + if (ret != -EPROBE_DEFER)<br>
> + DRM_DEV_ERROR(dev, "failed to get pp18 gpio: %d\n",<br>
> + ret);<br>
> + return ret;<br>
> + }<br>
> +<br>
> + pinfo->pp33_gpio = devm_gpiod_get_optional(dev, "pp33", GPIOD_OUT_HIGH);<br>
> + if (IS_ERR(pinfo->pp33_gpio)) {<br>
> + ret = PTR_ERR(pinfo->pp33_gpio);<br>
> + if (ret != -EPROBE_DEFER)<br>
> + DRM_DEV_ERROR(dev, "failed to get pp33 gpio: %d\n",<br>
> + ret);<br>
> + return ret;<br>
> + }<br>
> +<br>
> + pinfo->enable_gpio = devm_gpiod_get_optional(dev, "enable",<br>
> + GPIOD_OUT_HIGH);<br>
> + if (IS_ERR(pinfo->enable_gpio)) {<br>
> + ret = PTR_ERR(pinfo->enable_gpio);<br>
> + if (ret != -EPROBE_DEFER)<br>
> + DRM_DEV_ERROR(dev, "failed to get enable gpio: %d\n",<br>
> + ret);<br>
> + return ret;<br>
> + }<br>
> +<br>
> + pinfo->backlight = devm_of_find_backlight(dev);<br>
> + if (IS_ERR(pinfo->backlight))<br>
> + return PTR_ERR(pinfo->backlight);<br>
> +<br>
> + drm_panel_init(&pinfo->base);<br>
> + pinfo->base.funcs = &panel_funcs;<br>
> + pinfo->base.dev = &pinfo->link->dev;<br>
> +<br>
> + ret = drm_panel_add(&pinfo->base);<br>
> + if (ret < 0)<br>
> + return ret;<br>
> +<br>
> + return 0;<br>
> +}<br>
> +<br>
> +static void panel_del(struct panel_info *pinfo)<br>
> +{<br>
> + if (pinfo->base.dev)<br>
> + drm_panel_remove(&pinfo->base);<br>
> +}<br>
> +<br>
> +static int panel_probe(struct mipi_dsi_device *dsi)<br>
> +{<br>
> + struct panel_info *pinfo;<br>
> + const struct panel_desc *desc;<br>
> + int err;<br>
> +<br>
> + pinfo = devm_kzalloc(&dsi->dev, sizeof(*pinfo), GFP_KERNEL);<br>
> + if (!pinfo)<br>
> + return -ENOMEM;<br>
> +<br>
> + desc = of_device_get_match_data(&dsi->dev);<br>
> + dsi->mode_flags = desc->mode_flags;<br>
> + dsi->format = desc->format;<br>
> + dsi->lanes = desc->lanes;<br>
> + pinfo->desc = desc;<br>
> +<br>
> + pinfo->link = dsi;<br>
> + mipi_dsi_set_drvdata(dsi, pinfo);<br>
> +<br>
> + err = panel_add(pinfo);<br>
> + if (err < 0)<br>
> + return err;<br>
> +<br>
> + return mipi_dsi_attach(dsi);<br>
> +}<br>
> +<br>
> +static int panel_remove(struct mipi_dsi_device *dsi)<br>
> +{<br>
> + struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi);<br>
> + int err;<br>
> +<br>
> + err = boe_panel_unprepare(&pinfo->base);<br>
> + if (err < 0)<br>
> + DRM_DEV_ERROR(&dsi->dev, "failed to unprepare panel: %d\n",<br>
> + err);<br>
> +<br>
> + err = boe_panel_disable(&pinfo->base);<br>
> + if (err < 0)<br>
> + DRM_DEV_ERROR(&dsi->dev, "failed to disable panel: %d\n", err);<br>
> +<br>
> + err = mipi_dsi_detach(dsi);<br>
> + if (err < 0)<br>
> + DRM_DEV_ERROR(&dsi->dev, "failed to detach from DSI host: %d\n",<br>
> + err);<br>
> +<br>
> + drm_panel_detach(&pinfo->base);<br>
> + panel_del(pinfo);<br>
> +<br>
> + return 0;<br>
> +}<br>
> +<br>
> +static void panel_shutdown(struct mipi_dsi_device *dsi)<br>
> +{<br>
> + struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi);<br>
> +<br>
> + boe_panel_disable(&pinfo->base);<br>
> + boe_panel_unprepare(&pinfo->base);<br>
> +}<br>
> +<br>
> +static struct mipi_dsi_driver panel_driver = {<br>
> + .driver = {<br>
> + .name = "panel-boe-himax8279d",<br>
> + .of_match_table = panel_of_match,<br>
> + },<br>
> + .probe = panel_probe,<br>
> + .remove = panel_remove,<br>
> + .shutdown = panel_shutdown,<br>
> +};<br>
> +module_mipi_dsi_driver(panel_driver);<br>
> +<br>
> +MODULE_AUTHOR("Jerry Han <<a href="mailto:hanxu5@huaqin.corp-partner.google.com" target="_blank">hanxu5@huaqin.corp-partner.google.com</a>>");<br>
> +MODULE_DESCRIPTION("Boe Himax8279d driver");<br>
> +MODULE_LICENSE("GPL v2");<br>
> --<br>
> 2.17.1<br>
><br>
</blockquote></div>