coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c File Reference
#include <bootmode.h>
#include <cbfs.h>
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
#include <device/i2c_simple.h>
#include <device/mmio.h>
#include <mipi/panel.h>
#include <drivers/ti/sn65dsi86bridge/sn65dsi86bridge.h>
#include <drivers/parade/ps8640/ps8640.h>
#include <edid.h>
#include <framebuffer_info.h>
#include <soc/display/mipi_dsi.h>
#include <soc/display/mdssreg.h>
#include <soc/qupv3_config_common.h>
#include <soc/qup_se_handlers_common.h>
#include <soc/qupv3_i2c_common.h>
#include <soc/qcom_qup_se.h>
#include <soc/usb/usb_common.h>
#include <soc/usb/qusb_phy.h>
#include "board.h"
#include <soc/addressmap.h>
Include dependency graph for mainboard.c:

Go to the source code of this file.

Macros

#define BRIDGE_BUS   QUPV3_0_SE2
 
#define BRIDGE_SN65DSI86_CHIP   0x2d
 
#define BRIDGE_PS8640_CHIP   0x08
 

Functions

static void setup_usb (void)
 
static void qi2s_configure_gpios (void)
 
static void load_qup_fw (void)
 
static bool is_ps8640_bridge (void)
 
static void power_on_sn65dsi86_bridge (void)
 
static void power_on_ps8640_bridge (void)
 
static void configure_mipi_panel (void)
 
static struct panel_serializable_dataget_mipi_panel (enum lb_fb_orientation *orientation)
 
static enum cb_err display_init (struct panel_serializable_data *panel)
 
static void display_startup (void)
 
static void configure_sdhci (void)
 
static void mainboard_init (struct device *dev)
 
static void mainboard_enable (struct device *dev)
 

Variables

static struct usb_board_data usb0_board_data
 
struct chip_operations mainboard_ops
 

Macro Definition Documentation

◆ BRIDGE_BUS

#define BRIDGE_BUS   QUPV3_0_SE2

Definition at line 26 of file mainboard.c.

◆ BRIDGE_PS8640_CHIP

#define BRIDGE_PS8640_CHIP   0x08

Definition at line 28 of file mainboard.c.

◆ BRIDGE_SN65DSI86_CHIP

#define BRIDGE_SN65DSI86_CHIP   0x2d

Definition at line 27 of file mainboard.c.

Function Documentation

◆ configure_mipi_panel()

static void configure_mipi_panel ( void  )
static

Definition at line 127 of file mainboard.c.

References CONFIG, GPIO_AVDD_LCD_ENABLE, GPIO_AVEE_LCD_ENABLE, GPIO_MIPI_1V8_ENABLE, gpio_output(), GPIO_TP_EN, GPIO_VDD_RESET_1V8, mdelay(), panel_id(), and sku_id().

Referenced by display_startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configure_sdhci()

static void configure_sdhci ( void  )
static

Definition at line 280 of file mainboard.c.

References SDC1_TLMM_CFG_ADDR, SDC2_TLMM_CFG_ADDR, and write32().

Referenced by mainboard_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ display_init()

static enum cb_err display_init ( struct panel_serializable_data panel)
static

Definition at line 156 of file mainboard.c.

References BIOS_ERR, cbfs_map(), CONFIG, LB_FB_ORIENTATION_LEFT_UP, NULL, panel_id(), printk, and sku_id().

Referenced by display_startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ display_startup()

◆ get_mipi_panel()

static struct panel_serializable_data* get_mipi_panel ( enum lb_fb_orientation orientation)
static

Definition at line 156 of file mainboard.c.

Referenced by display_startup().

Here is the caller graph for this function:

◆ is_ps8640_bridge()

static bool is_ps8640_bridge ( void  )
static

Definition at line 75 of file mainboard.c.

References board_id(), CONFIG, and sku_id().

Referenced by display_startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_qup_fw()

static void load_qup_fw ( void  )
static

Definition at line 56 of file mainboard.c.

References CONFIG, FIFO, MIXED, QUPV3_0_SE1, QUPV3_0_SE3, QUPV3_0_SE4, QUPV3_0_SE5, QUPV3_1_SE1, QUPV3_1_SE2, QUPV3_1_SE3, QUPV3_1_SE4, QUPV3_1_SE5, qupv3_se_fw_load_and_init(), SE_PROTOCOL_I2C, SE_PROTOCOL_SPI, and SE_PROTOCOL_UART.

Referenced by mainboard_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mainboard_enable()

static void mainboard_enable ( struct device dev)
static

Definition at line 302 of file mainboard.c.

References device_operations::init, mainboard_init(), and device::ops.

Here is the call graph for this function:

◆ mainboard_init()

static void mainboard_init ( struct device dev)
static

Definition at line 288 of file mainboard.c.

References CONFIG, configure_sdhci(), display_startup(), GPIO_FP_RST_L, gpio_output(), load_qup_fw(), qi2s_configure_gpios(), and setup_usb().

Referenced by mainboard_enable().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ power_on_ps8640_bridge()

static void power_on_ps8640_bridge ( void  )
static

Definition at line 101 of file mainboard.c.

References BIOS_INFO, GPIO_EN_PP3300_DX_EDP, gpio_output(), GPIO_PS8640_EDP_BRIDGE_3V3_ENABLE, GPIO_PS8640_EDP_BRIDGE_PD_L, GPIO_PS8640_EDP_BRIDGE_RST_L, mdelay(), and printk.

Referenced by display_startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ power_on_sn65dsi86_bridge()

static void power_on_sn65dsi86_bridge ( void  )
static

Definition at line 90 of file mainboard.c.

References BIOS_INFO, GPIO_EDP_BRIDGE_ENABLE, GPIO_EN_PP3300_DX_EDP, gpio_output(), and printk.

Referenced by display_startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ qi2s_configure_gpios()

static void qi2s_configure_gpios ( void  )
static

Definition at line 44 of file mainboard.c.

References GPIO, GPIO_8MA, gpio_configure(), GPIO_NO_PULL, and GPIO_OUTPUT.

Referenced by mainboard_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_usb()

static void setup_usb ( void  )
static

Definition at line 36 of file mainboard.c.

References GPIO, gpio_output(), setup_usb_host0(), and usb0_board_data.

Referenced by mainboard_init().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ mainboard_ops

struct chip_operations mainboard_ops
Initial value:
= {
.enable_dev = mainboard_enable,
}
static void mainboard_enable(struct device *dev)
Definition: mainboard.c:302

Definition at line 302 of file mainboard.c.

◆ usb0_board_data

struct usb_board_data usb0_board_data
static
Initial value:
= {
.pll_bias_control_2 = 0x22,
.imp_ctrl1 = 0x08,
.port_tune1 = 0xc5,
}

Definition at line 1 of file mainboard.c.

Referenced by setup_usb().