14 #include <soc/clock.h>
15 #include <soc/display.h>
24 #include <arm-trusted-firmware/include/export/plat/rockchip/common/plat_params_exp.h>
62 static struct bl_aux_param_rk_apio param_apio = {
64 .type = BL_AUX_PARAM_RK_SUSPEND_APIO,
88 if (!
CONFIG(GRU_BASEBOARD_SCARLET)) {
89 static struct bl_aux_param_gpio param_p15_en = {
90 .h = { .type = BL_AUX_PARAM_RK_SUSPEND_GPIO },
91 .gpio = { .polarity = ARM_TF_GPIO_LEVEL_LOW },
96 static struct bl_aux_param_gpio param_p18_audio_en = {
97 .h = { .type = BL_AUX_PARAM_RK_SUSPEND_GPIO },
98 .gpio = { .polarity = ARM_TF_GPIO_LEVEL_LOW },
104 static struct bl_aux_param_gpio param_p30_en = {
105 .h = { .type = BL_AUX_PARAM_RK_SUSPEND_GPIO },
106 .gpio = { .polarity = ARM_TF_GPIO_LEVEL_LOW },
114 static struct bl_aux_param_gpio param_reset = {
116 .type = BL_AUX_PARAM_RK_RESET_GPIO,
131 static struct bl_aux_param_gpio param_poweroff = {
133 .type = BL_AUX_PARAM_RK_POWEROFF_GPIO,
155 if (
CONFIG(GRU_BASEBOARD_SCARLET))
169 if (
CONFIG(GRU_BASEBOARD_SCARLET))
196 (2 << 0) | (2 << 3) |
197 (2 << 6) | (2 << 9) | (2 << 12)));
217 if (!
CONFIG(GRU_BASEBOARD_SCARLET))
230 if (
CONFIG(BOARD_GOOGLE_SCARLET)) {
333 if (
CONFIG(GRU_HAS_WLAN_RESET))
335 if (!
CONFIG(GRU_BASEBOARD_SCARLET)) {
361 if (
CONFIG(GRU_BASEBOARD_SCARLET))
364 if (
CONFIG(BOARD_GOOGLE_GRU))
401 MIPI_INIT_CMD(0xD1, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x82, 0x00, 0xA5,
402 0x00, 0xC1, 0x00, 0xEA, 0x01, 0x0D, 0x01, 0x40),
403 MIPI_INIT_CMD(0xD2, 0x01, 0x6A, 0x01, 0xA8, 0x01, 0xDC, 0x02, 0x29,
404 0x02, 0x67, 0x02, 0x68, 0x02, 0xA8, 0x02, 0xF0),
405 MIPI_INIT_CMD(0xD3, 0x03, 0x19, 0x03, 0x49, 0x03, 0x67, 0x03, 0x8C,
406 0x03, 0xA6, 0x03, 0xC7, 0x03, 0xDE, 0x03, 0xEC),
408 MIPI_INIT_CMD(0xE0, 0x00, 0x00, 0x00, 0x86, 0x00, 0xC5, 0x00, 0xE5,
409 0x00, 0xFF, 0x01, 0x26, 0x01, 0x45, 0x01, 0x75),
410 MIPI_INIT_CMD(0xE1, 0x01, 0x9C, 0x01, 0xD5, 0x02, 0x05, 0x02, 0x4D,
411 0x02, 0x86, 0x02, 0x87, 0x02, 0xC3, 0x03, 0x03),
412 MIPI_INIT_CMD(0xE2, 0x03, 0x2A, 0x03, 0x56, 0x03, 0x72, 0x03, 0x94,
413 0x03, 0xAC, 0x03, 0xCB, 0x03, 0xE0, 0x03, 0xED),
420 MIPI_INIT_CMD(0xB2, 0x00, 0x00, 0x06, 0x04, 0x01, 0x40, 0x85),
421 MIPI_INIT_CMD(0xB3, 0x10, 0x07, 0xFC, 0x04, 0x01, 0x40, 0x80),
422 MIPI_INIT_CMD(0xB6, 0xF0, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01,
424 MIPI_INIT_CMD(0xBA, 0xC5, 0x07, 0x00, 0x04, 0x11, 0x25, 0x8C),
425 MIPI_INIT_CMD(0xBB, 0xC5, 0x07, 0x00, 0x03, 0x11, 0x25, 0x8C),
426 MIPI_INIT_CMD(0xC0, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x80, 0x80),
427 MIPI_INIT_CMD(0xC1, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x80, 0x80),
442 MIPI_INIT_CMD(0xB5, 0x00, 0xD4, 0x72, 0x11, 0x11, 0xAB, 0x0A),
617 .display_on_udelay = 120000,
618 .video_mode_udelay = 5000,
623 .
name =
"1536x2048@60Hz",
624 .pixel_clock = 216000,
640 .display_on_udelay = 120000,
641 .video_mode_udelay = 5000,
646 .
name =
"1536x2048@60Hz",
647 .pixel_clock = 220000,
struct chip_operations mainboard_ops
static void write32(void *addr, uint32_t val)
void * memcpy(void *dest, const void *src, size_t n)
#define assert(statement)
void register_bl31_aux_param(struct bl_aux_param_header *param)
int display_init_required(void)
#define printk(level,...)
void mdelay(unsigned int msecs)
int google_chromeec_set_usb_pd_role(uint8_t port, enum usb_pd_control_role role)
@ USB_PD_CTRL_ROLE_FORCE_SINK
@ USB_PD_CTRL_ROLE_TOGGLE_ON
#define GPIO_P18V_AUDIO_PWREN
static void usb_power_cycle(int port)
static void mainboard_init(struct device *dev)
static struct panel_init_command kd097d04_init_commands[]
static void register_poweroff_to_bl31(void)
const struct mipi_panel_data inx097pfg_panel
static const struct edid_mode inx097pfg_edid_mode
static void configure_codec(void)
static void configure_sdmmc(void)
static void configure_display(void)
static void configure_touchpad(void)
static void assert_wifi_reset(void)
static struct panel_init_command innolux_p097pfg_init_cmds[]
static void register_gpio_suspend(void)
static void register_apio_suspend(void)
static void setup_usb(int port)
static void configure_emmc(void)
const struct mipi_panel_data kd097d04_panel
static void prepare_backlight_i2c(void)
void mainboard_power_on_backlight(void)
static void mainboard_enable(struct device *dev)
static void register_reset_to_bl31(void)
static const struct edid_mode kd097d04_edid_mode
const struct mipi_panel_data * mainboard_get_mipi_mode(struct edid_mode *edid_mode)
void gpio_input(gpio_t gpio)
void gpio_output(gpio_t gpio, int value)
void gpio_input_pulldown(gpio_t gpio)
void gpio_input_pullup(gpio_t gpio)
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
#define IOMUX_EDP_HOTPLUG
static struct rk3399_pmugrf_regs *const rk3399_pmugrf
static struct rk3399_grf_regs *const rk3399_grf
#define RK_CLRSETBITS(clr, set)
#define MIPI_INIT_CMD(...)
void i2c_init(unsigned int bus)
void rkclk_configure_i2s(unsigned int hz)
void rkclk_configure_emmc(void)
void setup_usb_otg0(void)
void setup_usb_otg1(void)
void(* enable_dev)(struct device *dev)
void(* init)(struct device *dev)
struct device_operations * ops