1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <soc/i2c.h>
4
5 #include "gpio.h"
6 #include "panel.h"
7
8 #define PMIC_TPS65132_I2C I2C3
9
power_on_mipi_boe_tv110c9m_ll0(void)10 static void power_on_mipi_boe_tv110c9m_ll0(void)
11 {
12 const struct tps65132s_reg_setting reg_settings[] = {
13 { PMIC_TPS65132_VPOS, 0x11, 0x1f },
14 { PMIC_TPS65132_VNEG, 0x11, 0x1f },
15 { PMIC_TPS65132_DLYX, 0x95, 0xff },
16 { PMIC_TPS65132_ASSDD, 0x5b, 0xff },
17 };
18 const struct tps65132s_cfg cfg = {
19 .i2c_bus = PMIC_TPS65132_I2C,
20 .en = GPIO_EN_PPVAR_MIPI_DISP,
21 .sync = GPIO_EN_PPVAR_MIPI_DISP_150MA,
22 .settings = reg_settings,
23 .setting_counts = ARRAY_SIZE(reg_settings),
24 };
25 power_on_mipi_panel(&cfg);
26 }
27
28 static struct panel_description panels[] = {
29 [1] = {
30 .name = "BOE_TV110C9M_LL0",
31 .power_on = power_on_mipi_boe_tv110c9m_ll0,
32 .configure_backlight = configure_mipi_pwm_backlight,
33 .orientation = LB_FB_ORIENTATION_BOTTOM_UP,
34 .disp_path = DISP_PATH_MIPI,
35 .pwm_ctrl_gpio = true,
36 },
37 };
38
get_panel_description(uint32_t panel_id)39 struct panel_description *get_panel_description(uint32_t panel_id)
40 {
41 /* Only PANEL_ID_LOW_CHANNEL value is valid for the reference board. */
42 uint32_t id = panel_id & 0xF;
43
44 if (id >= ARRAY_SIZE(panels))
45 return NULL;
46
47 return &panels[id];
48 }
49