coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
grf.h File Reference
#include <soc/addressmap.h>
#include <soc/soc.h>
#include <types.h>
Include dependency graph for grf.h:

Go to the source code of this file.

Data Structures

struct  rk3288_grf_gpio_lh
 
struct  rk3288_grf_regs
 
struct  rk3288_sgrf_regs
 

Macros

#define IOMUX_I2C1   RK_CLRSETBITS(3 << 10 | 3 << 8, 1 << 10 | 1 << 8)
 
#define IOMUX_I2C2   RK_SETBITS(1 << 4 | 1 << 2)
 
#define IOMUX_I2C3   RK_SETBITS(1 << 2 | 1 << 0)
 
#define IOMUX_I2C4   RK_SETBITS(1 << 8 | 1 << 4)
 
#define IOMUX_I2C5SDA   RK_CLRSETBITS(3 << 12, 1 << 12)
 
#define IOMUX_I2C5SCL   RK_CLRSETBITS(3 << 0, 1 << 0)
 
#define IOMUX_SPI0
 
#define IOMUX_SPI2_CSCLK   RK_CLRSETBITS(3 << 14 | 3 << 12, 1 << 14 | 1 << 12)
 
#define IOMUX_SPI2_TXRX   RK_CLRSETBITS(3 << 2 | 3 << 0, 1 << 2 | 1 << 0)
 
#define IOMUX_I2S   RK_SETBITS(1 << 8 | 1 << 6 | 1 << 4 | 1 << 2 | 1 << 0)
 
#define IOMUX_I2SCLK   RK_SETBITS(1 << 0)
 
#define IOMUX_UART2   RK_CLRSETBITS(7 << 12 | 3 << 8, 1 << 12 | 1 << 8)
 
#define IOMUX_LCDC   RK_SETBITS(1 << 6 | 1 << 4 | 1 << 2 | 1 << 0)
 
#define IOMUX_SDMMC0
 
#define IOMUX_EMMCDATA
 
#define IOMUX_EMMCPWREN   RK_CLRSETBITS(0x3 << 2, 0x2 << 2)
 
#define IOMUX_EMMCCMD   RK_CLRSETBITS(0x3f, 2 << 4 | 2 << 2 | 2 << 0)
 
#define IOMUX_PWM1   RK_SETBITS(1 << 2)
 
#define IOMUX_EDP_HOTPLUG   RK_CLRSETBITS(0x3 << 6, 0x2 << 6)
 
#define IOMUX_HDMI_EDP_I2C_SDA   RK_CLRSETBITS(0x3 << 12, 2 << 12)
 
#define IOMUX_HDMI_EDP_I2C_SCL   RK_CLRSETBITS(0x3 << 0, 2 << 0)
 
#define IOMUX_GPIO(iomux_clrsetbits)   ((iomux_clrsetbits) & (0xffff << 16))
 

Functions

 check_member (rk3288_grf_gpio_lh, h, 0x4)
 
 check_member (rk3288_grf_regs, soc_con16, 0x3a8)
 
 check_member (rk3288_sgrf_regs, fast_boot_addr, 0x0120)
 

Variables

static struct rk3288_grf_regs *const rk3288_grf = (void *)GRF_BASE
 
static struct rk3288_sgrf_regs *const rk3288_sgrf = (void *)GRF_SECURE_BASE
 

Macro Definition Documentation

◆ IOMUX_EDP_HOTPLUG

#define IOMUX_EDP_HOTPLUG   RK_CLRSETBITS(0x3 << 6, 0x2 << 6)

Definition at line 206 of file grf.h.

◆ IOMUX_EMMCCMD

#define IOMUX_EMMCCMD   RK_CLRSETBITS(0x3f, 2 << 4 | 2 << 2 | 2 << 0)

Definition at line 204 of file grf.h.

◆ IOMUX_EMMCDATA

#define IOMUX_EMMCDATA
Value:
RK_CLRSETBITS(0xffff, 2 << 14 | 2 << 12 | 2 << 10 |\
2 << 8 | 2 << 6 | 2 << 4 |\
2 << 2 | 2 << 0)
#define RK_CLRSETBITS(clr, set)
Definition: soc.h:8

Definition at line 200 of file grf.h.

◆ IOMUX_EMMCPWREN

#define IOMUX_EMMCPWREN   RK_CLRSETBITS(0x3 << 2, 0x2 << 2)

Definition at line 203 of file grf.h.

◆ IOMUX_GPIO

#define IOMUX_GPIO (   iomux_clrsetbits)    ((iomux_clrsetbits) & (0xffff << 16))

Definition at line 212 of file grf.h.

◆ IOMUX_HDMI_EDP_I2C_SCL

#define IOMUX_HDMI_EDP_I2C_SCL   RK_CLRSETBITS(0x3 << 0, 2 << 0)

Definition at line 208 of file grf.h.

◆ IOMUX_HDMI_EDP_I2C_SDA

#define IOMUX_HDMI_EDP_I2C_SDA   RK_CLRSETBITS(0x3 << 12, 2 << 12)

Definition at line 207 of file grf.h.

◆ IOMUX_I2C1

#define IOMUX_I2C1   RK_CLRSETBITS(3 << 10 | 3 << 8, 1 << 10 | 1 << 8)

Definition at line 184 of file grf.h.

◆ IOMUX_I2C2

#define IOMUX_I2C2   RK_SETBITS(1 << 4 | 1 << 2)

Definition at line 185 of file grf.h.

◆ IOMUX_I2C3

#define IOMUX_I2C3   RK_SETBITS(1 << 2 | 1 << 0)

Definition at line 186 of file grf.h.

◆ IOMUX_I2C4

#define IOMUX_I2C4   RK_SETBITS(1 << 8 | 1 << 4)

Definition at line 187 of file grf.h.

◆ IOMUX_I2C5SCL

#define IOMUX_I2C5SCL   RK_CLRSETBITS(3 << 0, 1 << 0)

Definition at line 189 of file grf.h.

◆ IOMUX_I2C5SDA

#define IOMUX_I2C5SDA   RK_CLRSETBITS(3 << 12, 1 << 12)

Definition at line 188 of file grf.h.

◆ IOMUX_I2S

#define IOMUX_I2S   RK_SETBITS(1 << 8 | 1 << 6 | 1 << 4 | 1 << 2 | 1 << 0)

Definition at line 194 of file grf.h.

◆ IOMUX_I2SCLK

#define IOMUX_I2SCLK   RK_SETBITS(1 << 0)

Definition at line 195 of file grf.h.

◆ IOMUX_LCDC

#define IOMUX_LCDC   RK_SETBITS(1 << 6 | 1 << 4 | 1 << 2 | 1 << 0)

Definition at line 197 of file grf.h.

◆ IOMUX_PWM1

#define IOMUX_PWM1   RK_SETBITS(1 << 2)

Definition at line 205 of file grf.h.

◆ IOMUX_SDMMC0

#define IOMUX_SDMMC0
Value:
RK_CLRSETBITS(0x17ff, 1 << 12 | 1 << 10 | 1 << 8 |\
1 << 6 | 1 << 4 | 1 << 2 | 1 << 0)

Definition at line 198 of file grf.h.

◆ IOMUX_SPI0

#define IOMUX_SPI0
Value:
RK_CLRSETBITS(0xff << 8, 1 << 14 | 1 << 12 | \
1 << 10 | 1 << 8)

Definition at line 190 of file grf.h.

◆ IOMUX_SPI2_CSCLK

#define IOMUX_SPI2_CSCLK   RK_CLRSETBITS(3 << 14 | 3 << 12, 1 << 14 | 1 << 12)

Definition at line 192 of file grf.h.

◆ IOMUX_SPI2_TXRX

#define IOMUX_SPI2_TXRX   RK_CLRSETBITS(3 << 2 | 3 << 0, 1 << 2 | 1 << 0)

Definition at line 193 of file grf.h.

◆ IOMUX_UART2

#define IOMUX_UART2   RK_CLRSETBITS(7 << 12 | 3 << 8, 1 << 12 | 1 << 8)

Definition at line 196 of file grf.h.

Function Documentation

◆ check_member() [1/3]

check_member ( rk3288_grf_gpio_lh  ,
,
0x4   
)

◆ check_member() [2/3]

check_member ( rk3288_grf_regs  ,
soc_con16  ,
0x3a8   
)

◆ check_member() [3/3]

check_member ( rk3288_sgrf_regs  ,
fast_boot_addr  ,
0x0120   
)

Variable Documentation

◆ rk3288_grf

◆ rk3288_sgrf

struct rk3288_sgrf_regs* const rk3288_sgrf = (void *)GRF_SECURE_BASE
static

Definition at line 182 of file grf.h.

Referenced by dram_all_config().