Bo-Chen Chen | 4946516 | 2022-11-30 14:47:41 +0800 | [diff] [blame^] | 1 | /* 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 | |
| 11 | static 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 | |
| 17 | static void power_on_mipi_boe_nv110c9m_l60(void) |
| 18 | { |
| 19 | /* TODO: Add the poweron for BOE_NV110C9M_L60 when we get BOE_NV110C9M_L60 */ |
| 20 | } |
| 21 | |
| 22 | static struct panel_description panels[] = { |
| 23 | [1] = { |
| 24 | .name = "BOE_NV110C9M_L60", |
| 25 | .power_on = power_on_mipi_boe_nv110c9m_l60, |
| 26 | .configure_panel_backlight = configure_mipi_pwm_backlight, |
| 27 | .disp_path = DISP_PATH_MIPI, |
| 28 | }, |
| 29 | }; |
| 30 | |
| 31 | struct panel_description *get_panel_description(uint32_t panel_id) |
| 32 | { |
| 33 | if (panel_id >= ARRAY_SIZE(panels)) |
| 34 | return NULL; |
| 35 | |
| 36 | return &panels[panel_id]; |
| 37 | } |