blob: d37d68a825ffeccbdb4a36fb6ad991ab3791f131 [file] [log] [blame]
Bo-Chen Chen49465162022-11-30 14:47:41 +08001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <boardid.h>
4#include <gpio.h>
5#include <soc/gpio_common.h>
6#include <string.h>
7
8#include "gpio.h"
9#include "panel.h"
10
11static void configure_mipi_pwm_backlight(void)
12{
13 gpio_output(GPIO_AP_DISP_BKLTEN, 0);
14 gpio_output(GPIO_MIPI_PANEL_BL_PWM, 0);
15}
16
Bo-Chen Chenc07ccd92022-11-30 18:34:54 +080017static void configure_edp_aux_backlight(void)
18{
19 /* TODO: Add edp aux backlight for MUTTO_B152731E1 when we get MUTTO_B152731E1 */
20}
21
Bo-Chen Chen49465162022-11-30 14:47:41 +080022static void power_on_mipi_boe_nv110c9m_l60(void)
23{
24 /* TODO: Add the poweron for BOE_NV110C9M_L60 when we get BOE_NV110C9M_L60 */
25}
26
Bo-Chen Chenc07ccd92022-11-30 18:34:54 +080027static void power_on_edp_mutto_b152731e1(void)
28{
29 /* TODO: Add the poweron for MUTTO_B152731E1 when we get MUTTO_B152731E1 */
30}
31
Bo-Chen Chen49465162022-11-30 14:47:41 +080032static struct panel_description panels[] = {
33 [1] = {
34 .name = "BOE_NV110C9M_L60",
35 .power_on = power_on_mipi_boe_nv110c9m_l60,
36 .configure_panel_backlight = configure_mipi_pwm_backlight,
37 .disp_path = DISP_PATH_MIPI,
38 },
Bo-Chen Chenc07ccd92022-11-30 18:34:54 +080039 [11] = {
40 .name = "MUTTO_B152731E1",
41 .power_on = power_on_edp_mutto_b152731e1,
42 .configure_panel_backlight = configure_edp_aux_backlight,
43 .disp_path = DISP_PATH_EDP,
44 },
Bo-Chen Chen49465162022-11-30 14:47:41 +080045};
46
47struct panel_description *get_panel_description(uint32_t panel_id)
48{
49 if (panel_id >= ARRAY_SIZE(panels))
50 return NULL;
51
52 return &panels[panel_id];
53}