coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c File Reference
#include <boardid.h>
#include <bootmode.h>
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
#include <drivers/parade/ps8640/ps8640.h>
#include <edid.h>
#include <gpio.h>
#include <soc/da9212.h>
#include <soc/ddp.h>
#include <soc/dsi.h>
#include <soc/i2c.h>
#include <soc/mt6311.h>
#include <soc/mt6391.h>
#include <soc/mtcmos.h>
#include <soc/pll.h>
#include <soc/usb.h>
#include <framebuffer_info.h>
Include dependency graph for mainboard.c:

Go to the source code of this file.

Enumerations

enum  { CODEC_I2C_BUS = 0 , EXT_BUCK_I2C_BUS = 1 }
 

Functions

static void configure_ext_buck (void)
 
static void configure_touchscreen (void)
 
static void configure_audio (void)
 
static void configure_usb (void)
 
static void configure_usb_hub (void)
 
static void configure_backlight (void)
 
static void configure_display (void)
 
static int read_edid_from_ps8640 (struct edid *edid)
 
static void display_startup (void)
 
static void mainboard_init (struct device *dev)
 
static void mainboard_enable (struct device *dev)
 

Variables

struct chip_operations mainboard_ops
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CODEC_I2C_BUS 
EXT_BUCK_I2C_BUS 

Definition at line 22 of file mainboard.c.

Function Documentation

◆ configure_audio()

static void configure_audio ( void  )
static

Definition at line 60 of file mainboard.c.

References board_id(), CODEC_I2C_BUS, GPIO, gpio_output(), gpio_set_mode(), KHz, LDO_1P8, LDO_VCAMA, LDO_VCAMD, mdelay(), mt6391_configure_ldo(), mt6391_gpio_output(), MT6391_KP_COL4, MT6391_KP_COL5, mt_pll_set_aud_div(), mtcmos_audio_power_on(), and mtk_i2c_bus_init().

Referenced by mainboard_init().

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

◆ configure_backlight()

static void configure_backlight ( void  )
static

Definition at line 140 of file mainboard.c.

References board_id(), GPIO, and gpio_output().

Referenced by mainboard_init().

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

◆ configure_display()

static void configure_display ( void  )
static

Definition at line 159 of file mainboard.c.

References board_id(), GPIO, gpio_output(), LDO_3P3, LDO_VGP2, mdelay(), mt6391_configure_ldo(), and udelay().

Referenced by mainboard_init().

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

◆ configure_ext_buck()

static void configure_ext_buck ( void  )
static

Definition at line 27 of file mainboard.c.

References board_id(), da9212_probe(), EXT_BUCK_I2C_BUS, GPIO, gpio_output(), mt6311_probe(), mt6391_gpio_output(), MT6391_KP_ROW3, MT6391_KP_ROW4, mtk_i2c_bus_init(), and udelay().

Referenced by mainboard_init().

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

◆ configure_touchscreen()

static void configure_touchscreen ( void  )
static

Definition at line 50 of file mainboard.c.

References board_id(), GPIO, gpio_output(), and udelay().

Referenced by mainboard_init().

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

References board_id(), GPIO, gpio_input_pullup(), gpio_output(), and setup_usb_host().

Referenced by mainboard_init().

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

◆ configure_usb_hub()

static void configure_usb_hub ( void  )
static

Definition at line 132 of file mainboard.c.

References board_id(), GPIO, and gpio_output().

Referenced by mainboard_init().

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

◆ display_startup()

static void display_startup ( void  )
static

◆ mainboard_enable()

static void mainboard_enable ( struct device dev)
static

Definition at line 260 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

◆ read_edid_from_ps8640()

static int read_edid_from_ps8640 ( struct edid edid)
static

Definition at line 184 of file mainboard.c.

References BIOS_ERR, board_id(), i2c_bus, mtk_i2c_bus_init(), printk, ps8640_get_edid(), and ps8640_init().

Referenced by display_startup().

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

Definition at line 260 of file mainboard.c.