Debian Codegraph @

src/mainboard/google/corsola/panel_starmie.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <console/console.h>
4 #include <soc/tps65132s.h>
5
6 #include "gpio.h"
7 #include "panel.h"
8
9 static void mipi_panel_power_on(void)
10 {
11 struct tps65132s_cfg config = {
12 .i2c_bus = PMIC_I2C_BUS,
13 .en = GPIO_EN_PP3300_DISP_X,
14 .sync = GPIO_EN_PP3300_SDBRDG_X,
15 };
16 tps65132s_power_on(&config);
17 }
18
19 static struct panel_description starmie_panels[] = {
20 /* K&D panel vendor and ILI9882T chip,
21 K&D and STA panel are identical except manufacturer_name. */
22 [6] = {
23 .configure_backlight = backlight_control,
24 .power_on = mipi_panel_power_on,
25 .name = "STA_ILI9882T",
26 .disp_path = DISP_PATH_MIPI,
27 .orientation = LB_FB_ORIENTATION_LEFT_UP,
28 },
29 /* STA panel vendor and ILI9882T chip */
30 [9] = {
31 .configure_backlight = backlight_control,
32 .power_on = mipi_panel_power_on,
33 .name = "STA_ILI9882T",
34 .disp_path = DISP_PATH_MIPI,
35 .orientation = LB_FB_ORIENTATION_LEFT_UP,
36 },
37 /* STA panel vendor and HIMAX83102_J02 chip */
38 [10] = {
39 .configure_backlight = backlight_control,
40 .power_on = mipi_panel_power_on,
41 .name = "STA_HIMAX83102_J02",
42 .disp_path = DISP_PATH_MIPI,
43 .orientation = LB_FB_ORIENTATION_LEFT_UP,
44 },
45 };
46
47 struct panel_description *get_panel_description(void)
48 {
49 uint32_t id = panel_id() & 0xF;
50 if (id >= ARRAY_SIZE(starmie_panels))
51 return NULL;
52
53 return &starmie_panels[id];
54 }