coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c File Reference
#include <arch/cache.h>
#include <boot/coreboot_tables.h>
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
#include <device/i2c_simple.h>
#include <drivers/ti/tps65090/tps65090.h>
#include <soc/clk.h>
#include <soc/dp.h>
#include <soc/dp-core.h>
#include <soc/gpio.h>
#include <soc/i2c.h>
#include <soc/periph.h>
#include <soc/power.h>
#include <soc/tmu.h>
#include <soc/usb.h>
#include <symbols.h>
#include <framebuffer_info.h>
#include "exynos5250.h"
Include dependency graph for mainboard.c:

Go to the source code of this file.

Macros

#define MMC0_GPIO_PIN   (58)
 
#define DRAM_START   ((uintptr_t)_dram/MiB)
 
#define DRAM_SIZE   CONFIG_DRAM_SIZE_MB
 
#define DRAM_END   (DRAM_START + DRAM_SIZE) /* plus one... */
 
#define LCD_T3_DELAY_MS   60
 
#define LCD_T5_DELAY_MS   10
 
#define LCD_T6_DELAY_MS   10
 
#define TPS65090_BUS   4 /* Daisy-specific */
 
#define FET1_CTRL   0x0f
 
#define FET4_CTRL   0x12
 
#define FET6_CTRL   0x14
 
#define MAX_DP_TRIES   5
 

Functions

static void exynos_dp_bridge_setup (void)
 
static void exynos_dp_bridge_init (void)
 
static int exynos_dp_hotplug (void)
 
static void exynos_dp_reset (void)
 
static void backlight_pwm (void)
 
static void backlight_en (void)
 
static void lcd_vdd (void)
 
static void backlight_vdd (void)
 
static void sdmmc_vdd (void)
 
static void prepare_usb (void)
 
static void setup_usb (void)
 
static void disable_usb30_pll (void)
 
static void setup_storage (void)
 
static void gpio_init (void)
 
static void mainboard_init (struct device *dev)
 
static void mainboard_enable (struct device *dev)
 
void lb_board (struct lb_header *header)
 

Variables

static enum exynos5_gpio_pin dp_pd_l = GPIO_Y25
 
static enum exynos5_gpio_pin dp_rst_l = GPIO_X15
 
static enum exynos5_gpio_pin dp_hpd = GPIO_X07
 
static enum exynos5_gpio_pin usb_host_vbus = GPIO_X11
 
static enum exynos5_gpio_pin usb_drd_vbus = GPIO_X27
 
static struct video_info dp_video_info
 
struct chip_operations mainboard_ops
 

Macro Definition Documentation

◆ DRAM_END

#define DRAM_END   (DRAM_START + DRAM_SIZE) /* plus one... */

Definition at line 29 of file mainboard.c.

◆ DRAM_SIZE

#define DRAM_SIZE   CONFIG_DRAM_SIZE_MB

Definition at line 28 of file mainboard.c.

◆ DRAM_START

#define DRAM_START   ((uintptr_t)_dram/MiB)

Definition at line 27 of file mainboard.c.

◆ FET1_CTRL

#define FET1_CTRL   0x0f

Definition at line 110 of file mainboard.c.

◆ FET4_CTRL

#define FET4_CTRL   0x12

Definition at line 111 of file mainboard.c.

◆ FET6_CTRL

#define FET6_CTRL   0x14

Definition at line 112 of file mainboard.c.

◆ LCD_T3_DELAY_MS

#define LCD_T3_DELAY_MS   60

Definition at line 90 of file mainboard.c.

◆ LCD_T5_DELAY_MS

#define LCD_T5_DELAY_MS   10

Definition at line 92 of file mainboard.c.

◆ LCD_T6_DELAY_MS

#define LCD_T6_DELAY_MS   10

Definition at line 93 of file mainboard.c.

◆ MAX_DP_TRIES

#define MAX_DP_TRIES   5

Definition at line 173 of file mainboard.c.

◆ MMC0_GPIO_PIN

#define MMC0_GPIO_PIN   (58)

Definition at line 24 of file mainboard.c.

◆ TPS65090_BUS

#define TPS65090_BUS   4 /* Daisy-specific */

Definition at line 108 of file mainboard.c.

Function Documentation

◆ backlight_en()

static void backlight_en ( void  )
static

Definition at line 102 of file mainboard.c.

References gpio_direction_output(), and GPIO_X30.

Referenced by mainboard_init().

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

◆ backlight_pwm()

static void backlight_pwm ( void  )
static

Definition at line 95 of file mainboard.c.

References GPIO_B20, gpio_direction_output(), LCD_T6_DELAY_MS, and udelay().

Referenced by mainboard_init().

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

◆ backlight_vdd()

static void backlight_vdd ( void  )
static

Definition at line 120 of file mainboard.c.

References FET1_CTRL, LCD_T5_DELAY_MS, TPS65090_BUS, tps65090_fet_enable(), and udelay().

Referenced by mainboard_init().

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

◆ disable_usb30_pll()

static void disable_usb30_pll ( void  )
static

Definition at line 178 of file mainboard.c.

References gpio_direction_output(), and GPIO_Y11.

Referenced by mainboard_init().

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

◆ exynos_dp_bridge_init()

static void exynos_dp_bridge_init ( void  )
static

Definition at line 51 of file mainboard.c.

References dp_pd_l, dp_rst_l, gpio_set_value(), and udelay().

Referenced by mainboard_init().

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

◆ exynos_dp_bridge_setup()

static void exynos_dp_bridge_setup ( void  )
static

Definition at line 36 of file mainboard.c.

References dp_pd_l, dp_rst_l, exynos_pinmux_dphpd(), gpio_cfg_pin(), GPIO_OUTPUT, GPIO_PULL_NONE, gpio_set_pull(), gpio_set_value(), and udelay().

Referenced by mainboard_init().

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

◆ exynos_dp_hotplug()

static int exynos_dp_hotplug ( void  )
static

Definition at line 68 of file mainboard.c.

References dp_hpd, and gpio_get_value().

Referenced by mainboard_init().

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

◆ exynos_dp_reset()

static void exynos_dp_reset ( void  )
static

Definition at line 74 of file mainboard.c.

References dp_pd_l, dp_rst_l, gpio_set_value(), and udelay().

Referenced by exynos_dp_init_dp(), and mainboard_init().

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

◆ gpio_init()

static void gpio_init ( void  )
static

◆ lb_board()

void lb_board ( struct lb_header header)

Definition at line 325 of file mainboard.c.

References dma, dma_coherent(), header, lb_new_record(), LB_TAG_DMA, and REGION_SIZE.

Here is the call graph for this function:

◆ lcd_vdd()

static void lcd_vdd ( void  )
static

Definition at line 114 of file mainboard.c.

References FET6_CTRL, TPS65090_BUS, and tps65090_fet_enable().

Referenced by mainboard_init().

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

◆ mainboard_enable()

◆ mainboard_init()

◆ prepare_usb()

static void prepare_usb ( void  )
static

Definition at line 137 of file mainboard.c.

References reset_usb_drd_dwc3().

Referenced by mainboard_init().

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

◆ sdmmc_vdd()

static void sdmmc_vdd ( void  )
static

Definition at line 127 of file mainboard.c.

References FET4_CTRL, TPS65090_BUS, and tps65090_fet_enable().

Referenced by mainboard_init().

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

◆ setup_storage()

static void setup_storage ( void  )
static

Definition at line 185 of file mainboard.c.

References BIOS_CRIT, clock_set_mshci(), exynos_pinmux_sdmmc0(), exynos_pinmux_sdmmc2(), gpio_direction_output(), GPIO_DRV_4X, GPIO_PULL_NONE, gpio_set_drv(), gpio_set_pull(), MMC0_GPIO_PIN, PERIPH_ID_SDMMC0, PERIPH_ID_SDMMC2, and printk.

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

Referenced by mainboard_init().

Here is the caller graph for this function:

Variable Documentation

◆ dp_hpd

enum exynos5_gpio_pin dp_hpd = GPIO_X07
static

Definition at line 1 of file mainboard.c.

Referenced by exynos_dp_hotplug().

◆ dp_pd_l

enum exynos5_gpio_pin dp_pd_l = GPIO_Y25
static

Definition at line 1 of file mainboard.c.

Referenced by exynos_dp_bridge_init(), exynos_dp_bridge_setup(), and exynos_dp_reset().

◆ dp_rst_l

enum exynos5_gpio_pin dp_rst_l = GPIO_X15
static

Definition at line 1 of file mainboard.c.

Referenced by exynos_dp_bridge_init(), exynos_dp_bridge_setup(), and exynos_dp_reset().

◆ dp_video_info

struct video_info dp_video_info
static
Initial value:
= {
.name = (char *)"eDP-LVDS NXP PTN3460",
.h_sync_polarity = 0,
.v_sync_polarity = 0,
.interlaced = 0,
.ycbcr_coeff = COLOR_YCBCR601,
.lane_count = LANE_COUNT2,
}
@ COLOR_RGB
Definition: dp-core.h:37
link_rate
Definition: dp-core.h:15
@ LANE_COUNT2
Definition: dp-core.h:23
color_space
Definition: edp.h:571
color_depth
Definition: edp.h:577
@ COLOR_8
Definition: edp.h:579
@ LINK_RATE_2_70GBPS
Definition: edp.h:586
dynamic_range
Definition: edp.h:543
@ VESA
Definition: edp.h:544
@ COLOR_YCBCR601
Definition: edp.h:539

Definition at line 143 of file mainboard.c.

Referenced by mainboard_init().

◆ mainboard_ops

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

Definition at line 295 of file mainboard.c.

◆ usb_drd_vbus

enum exynos5_gpio_pin usb_drd_vbus = GPIO_X27
static

Definition at line 127 of file mainboard.c.

◆ usb_host_vbus

enum exynos5_gpio_pin usb_host_vbus = GPIO_X11
static

Definition at line 127 of file mainboard.c.