Lines Matching +full:panel +full:- +full:timing
5 * SPDX-License-Identifier: Apache-2.0
42 const struct otm8009a_config *cfg = dev->config; in otm8009a_dcs_write()
45 ret = mipi_dsi_dcs_write(cfg->mipi_dsi, cfg->channel, cmd, buf, len); in otm8009a_dcs_write()
56 const struct otm8009a_config *cfg = dev->config; in otm8009a_mcs_write()
61 ret = mipi_dsi_dcs_write(cfg->mipi_dsi, cfg->channel, OTM8009A_MCS_ADRSFT, &scmd, 1); in otm8009a_mcs_write()
66 ret = mipi_dsi_dcs_write(cfg->mipi_dsi, cfg->channel, cmd >> 8, buf, len); in otm8009a_mcs_write()
76 const struct otm8009a_config *cfg = dev->config; in otm8009a_check_id()
80 ret = mipi_dsi_dcs_read(cfg->mipi_dsi, cfg->channel, OTM8009A_CMD_ID1, &id, sizeof(id)); in otm8009a_check_id()
82 LOG_ERR("Read panel ID failed! (%d)", ret); in otm8009a_check_id()
83 return -EIO; in otm8009a_check_id()
88 return -EINVAL; in otm8009a_check_id()
96 struct otm8009a_data *data = dev->data; in otm8009a_configure()
212 /* set pump 5 vgh voltage from -12.0v downto -9.0v */ in otm8009a_configure()
220 /* panel driving mode */ in otm8009a_configure()
229 /* VCOM Voltage settings from -1.0000v downto -1.2625v */ in otm8009a_configure()
259 /* source driver timing setting */ in otm8009a_configure()
265 /* panel type setting */ in otm8009a_configure()
332 /* Panel Control Setting 1 */ in otm8009a_configure()
435 /* gamma correction 2.2- */ in otm8009a_configure()
459 switch (data->dsi_pixel_format) { in otm8009a_configure()
467 LOG_ERR("Unsupported pixel format 0x%x!", data->dsi_pixel_format); in otm8009a_configure()
468 return -ENOTSUP; in otm8009a_configure()
477 if (data->orientation == DISPLAY_ORIENTATION_NORMAL) { in otm8009a_configure()
479 } else if (data->orientation == DISPLAY_ORIENTATION_ROTATED_90) { in otm8009a_configure()
481 } else if (data->orientation == DISPLAY_ORIENTATION_ROTATED_180) { in otm8009a_configure()
483 } else if (data->orientation == DISPLAY_ORIENTATION_ROTATED_270) { in otm8009a_configure()
494 sys_put_be16(data->xres, (uint8_t *)&buf[2]); in otm8009a_configure()
502 sys_put_be16(data->yres, (uint8_t *)&buf[2]); in otm8009a_configure()
553 const struct otm8009a_config *cfg = dev->config; in otm8009a_blanking_on()
556 if (cfg->backlight.port != NULL) { in otm8009a_blanking_on()
557 ret = gpio_pin_set_dt(&cfg->backlight, 0); in otm8009a_blanking_on()
569 const struct otm8009a_config *cfg = dev->config; in otm8009a_blanking_off()
572 if (cfg->backlight.port != NULL) { in otm8009a_blanking_off()
573 ret = gpio_pin_set_dt(&cfg->backlight, 1); in otm8009a_blanking_off()
586 return -ENOTSUP; in otm8009a_write()
597 const struct otm8009a_config *cfg = dev->config; in otm8009a_get_capabilities()
598 struct otm8009a_data *data = dev->data; in otm8009a_get_capabilities()
601 capabilities->x_resolution = cfg->width; in otm8009a_get_capabilities()
602 capabilities->y_resolution = cfg->height; in otm8009a_get_capabilities()
603 capabilities->supported_pixel_formats = data->pixel_format; in otm8009a_get_capabilities()
604 capabilities->current_pixel_format = data->pixel_format; in otm8009a_get_capabilities()
605 capabilities->current_orientation = data->orientation; in otm8009a_get_capabilities()
618 const struct otm8009a_config *cfg = dev->config; in otm8009a_init()
619 struct otm8009a_data *data = dev->data; in otm8009a_init()
623 if (cfg->reset.port) { in otm8009a_init()
624 if (!gpio_is_ready_dt(&cfg->reset)) { in otm8009a_init()
626 return -ENODEV; in otm8009a_init()
628 ret = gpio_pin_configure_dt(&cfg->reset, GPIO_OUTPUT_INACTIVE); in otm8009a_init()
634 ret = gpio_pin_set_dt(&cfg->reset, 1); in otm8009a_init()
643 if (cfg->rotation == 0) { in otm8009a_init()
644 data->xres = cfg->width; in otm8009a_init()
645 data->yres = cfg->height; in otm8009a_init()
646 data->orientation = DISPLAY_ORIENTATION_NORMAL; in otm8009a_init()
647 } else if (cfg->rotation == 90) { in otm8009a_init()
648 data->xres = cfg->height; in otm8009a_init()
649 data->yres = cfg->width; in otm8009a_init()
650 data->orientation = DISPLAY_ORIENTATION_ROTATED_90; in otm8009a_init()
651 } else if (cfg->rotation == 180) { in otm8009a_init()
652 data->xres = cfg->width; in otm8009a_init()
653 data->yres = cfg->height; in otm8009a_init()
654 data->orientation = DISPLAY_ORIENTATION_ROTATED_180; in otm8009a_init()
655 } else if (cfg->rotation == 270) { in otm8009a_init()
656 data->xres = cfg->height; in otm8009a_init()
657 data->yres = cfg->width; in otm8009a_init()
658 data->orientation = DISPLAY_ORIENTATION_ROTATED_270; in otm8009a_init()
661 /* attach to MIPI-DSI host */ in otm8009a_init()
662 mdev.data_lanes = cfg->data_lanes; in otm8009a_init()
663 mdev.pixfmt = data->dsi_pixel_format; in otm8009a_init()
666 mdev.timings.hactive = data->xres; in otm8009a_init()
670 mdev.timings.vactive = data->yres; in otm8009a_init()
675 ret = mipi_dsi_attach(cfg->mipi_dsi, cfg->channel, &mdev); in otm8009a_init()
677 LOG_ERR("MIPI-DSI attach failed! (%d)", ret); in otm8009a_init()
683 LOG_ERR("Panel ID check failed! (%d)", ret); in otm8009a_init()