coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c File Reference
#include <assert.h>
#include <bl31.h>
#include <boardid.h>
#include <bootmode.h>
#include <cbfs.h>
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
#include <ec/google/chromeec/ec.h>
#include <edid.h>
#include <framebuffer_info.h>
#include <gpio.h>
#include <soc/ddp.h>
#include <soc/dsi.h>
#include <soc/gpio.h>
#include <soc/mmu_operations.h>
#include <soc/mtcmos.h>
#include <soc/spm.h>
#include <soc/usb.h>
#include <string.h>
#include "panel.h"
#include <arm-trusted-firmware/include/export/plat/mediatek/common/plat_params_exp.h>
Include dependency graph for mainboard.c:

Go to the source code of this file.

Functions

static void configure_emmc (void)
 
static void configure_usb (void)
 
static void configure_audio (void)
 
static void configure_ec (void)
 
struct panel_description __weakget_panel_description (int panel_id)
 
static void configure_panel_backlight (void)
 
static void power_on_panel (struct panel_description *panel)
 
struct panel_descriptionget_panel_from_cbfs (struct panel_description *desc)
 
static struct panel_descriptionget_active_panel (void)
 
static bool configure_display (void)
 
static void register_reset_to_bl31 (void)
 
static void mainboard_init (struct device *dev)
 
static void mainboard_enable (struct device *dev)
 

Variables

struct chip_operations mainboard_ops
 

Function Documentation

◆ configure_audio()

static void configure_audio ( void  )
static

Definition at line 48 of file mainboard.c.

References GPIO, gpio_set_mode(), and mtcmos_audio_power_on().

Referenced by mainboard_init().

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

◆ configure_display()

◆ configure_ec()

static void configure_ec ( void  )
static

Definition at line 60 of file mainboard.c.

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

Referenced by mainboard_init().

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

◆ configure_emmc()

static void configure_emmc ( void  )
static

Definition at line 29 of file mainboard.c.

References ARRAY_SIZE, GPIO, GPIO_PULL_ENABLE, GPIO_PULL_UP, and gpio_set_pull().

Referenced by mainboard_init().

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

◆ configure_panel_backlight()

static void configure_panel_backlight ( void  )
static

Definition at line 76 of file mainboard.c.

References GPIO, and gpio_output().

Referenced by configure_display().

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

◆ configure_usb()

static void configure_usb ( void  )
static

Definition at line 43 of file mainboard.c.

References setup_usb_host().

Referenced by mainboard_init().

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

◆ get_active_panel()

static struct panel_description* get_active_panel ( void  )
static

Definition at line 124 of file mainboard.c.

References edid::ascii_string, assert, BIOS_ERR, BIOS_INFO, panel_serializable_data::edid, get_panel_description(), edid_mode::ha, edid::manufacturer_name, edid::mode, name, NULL, panel_id(), printk, edid_mode::refresh, panel_description::s, sku_id(), and edid_mode::va.

Referenced by configure_display().

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

◆ get_panel_description()

struct panel_description __weak* get_panel_description ( int  panel_id)

Definition at line 68 of file mainboard.c.

References BIOS_ERR, NULL, and printk.

Referenced by get_active_panel().

Here is the caller graph for this function:

◆ get_panel_from_cbfs()

struct panel_description* get_panel_from_cbfs ( struct panel_description desc)

Definition at line 100 of file mainboard.c.

References BIOS_ERR, buffer, cbfs_load(), panel_description::name, NULL, printk, raw, panel_description::s, and snprintf().

Referenced by get_panel_description().

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 217 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 195 of file mainboard.c.

References BIOS_ERR, BIOS_INFO, configure_audio(), configure_display(), configure_ec(), configure_emmc(), configure_usb(), display_init_required(), printk, register_reset_to_bl31(), and spm_init().

Referenced by mainboard_enable().

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

◆ power_on_panel()

static void power_on_panel ( struct panel_description panel)
static

Definition at line 82 of file mainboard.c.

References GPIO_LCM_RST_1V8, gpio_output(), GPIO_PP1800_LCM_EN, GPIO_PP3300_LCM_EN, GPIO_PPVARN_LCD_EN, GPIO_PPVARP_LCD_EN, mdelay(), and panel_description::power_on.

Referenced by configure_display().

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

◆ register_reset_to_bl31()

static void register_reset_to_bl31 ( void  )
static

Definition at line 184 of file mainboard.c.

References GPIO_RESET, and register_bl31_aux_param().

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:217

Definition at line 217 of file mainboard.c.