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  rk3399_grf_regs
 
struct  rk3399_pmugrf_regs
 
struct  rk3399_pmusgrf_regs
 

Macros

#define UART2A_SEL   RK_CLRSETBITS(3 << 10, 0 << 10)
 
#define UART2B_SEL   RK_CLRSETBITS(3 << 10, 1 << 10)
 
#define UART2C_SEL   RK_CLRSETBITS(3 << 10, 2 << 10)
 
#define PWM3_SEL_A   RK_CLRBITS(1 << 5)
 
#define PWM3_SEL_B   RK_SETBITS(1 << 5)
 
#define IOMUX_UART2A   RK_CLRSETBITS(3 << 2 | 3 << 0, 2 << 2 | 2 << 0)
 
#define IOMUX_UART2B   RK_CLRSETBITS(3 << 2 | 3 << 0, 2 << 2 | 2 << 0)
 
#define IOMUX_UART2C   RK_CLRSETBITS(3 << 8 | 3 << 6, 1 << 8 | 1 << 6)
 
#define IOMUX_SPI0
 
#define IOMUX_SPI1_RX   RK_CLRSETBITS(3 << 14, 2 << 14)
 
#define IOMUX_SPI1_CSCLKTX
 
#define IOMUX_SPI2
 
#define IOMUX_SPI5
 
#define IOMUX_SDMMC
 
#define IOMUX_I2C0_SCL   RK_CLRSETBITS(3 << 0, 2 << 0)
 
#define IOMUX_I2C0_SDA   RK_CLRSETBITS(3 << 14, 2 << 14)
 
#define IOMUX_I2S0_SD0   RK_SETBITS(1 << 14 | 1 << 6 | 1 << 4 | 1 << 2 | 1 << 0)
 
#define IOMUX_I2SCLK   RK_SETBITS(1 << 0)
 
#define IOMUX_PWM_0   RK_SETBITS(1 << 4)
 
#define IOMUX_PWM_1   RK_SETBITS(1 << 12)
 
#define IOMUX_PWM_2   RK_SETBITS(1 << 6)
 
#define IOMUX_PWM_3_A   RK_SETBITS(1 << 12)
 
#define IOMUX_PWM_3_B   RK_SETBITS(1 << 12)
 
#define IOMUX_TSADC_INT   RK_CLRSETBITS(3 << 12, 1 << 12)
 
#define IOMUX_EDP_HOTPLUG   RK_CLRSETBITS(3 << 14, 2 << 14)
 

Functions

 check_member (rk3399_grf_regs, emmcphy_status, 0xf7a0)
 
 check_member (rk3399_pmugrf_regs, os_reg3, 0x30c)
 
 check_member (rk3399_pmusgrf_regs, slv_secure_con4, 0xe3d4)
 

Variables

static struct rk3399_grf_regs *const rk3399_grf = (void *)GRF_BASE
 
static struct rk3399_pmugrf_regs *const rk3399_pmugrf = (void *)PMUGRF_BASE
 
static struct rk3399_pmusgrf_regs *const rk3399_pmusgrf = (void *)PMUSGRF_BASE
 

Macro Definition Documentation

◆ IOMUX_EDP_HOTPLUG

#define IOMUX_EDP_HOTPLUG   RK_CLRSETBITS(3 << 14, 2 << 14)

Definition at line 355 of file grf.h.

◆ IOMUX_I2C0_SCL

#define IOMUX_I2C0_SCL   RK_CLRSETBITS(3 << 0, 2 << 0)

Definition at line 343 of file grf.h.

◆ IOMUX_I2C0_SDA

#define IOMUX_I2C0_SDA   RK_CLRSETBITS(3 << 14, 2 << 14)

Definition at line 344 of file grf.h.

◆ IOMUX_I2S0_SD0

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

Definition at line 346 of file grf.h.

◆ IOMUX_I2SCLK

#define IOMUX_I2SCLK   RK_SETBITS(1 << 0)

Definition at line 347 of file grf.h.

◆ IOMUX_PWM_0

#define IOMUX_PWM_0   RK_SETBITS(1 << 4)

Definition at line 349 of file grf.h.

◆ IOMUX_PWM_1

#define IOMUX_PWM_1   RK_SETBITS(1 << 12)

Definition at line 350 of file grf.h.

◆ IOMUX_PWM_2

#define IOMUX_PWM_2   RK_SETBITS(1 << 6)

Definition at line 351 of file grf.h.

◆ IOMUX_PWM_3_A

#define IOMUX_PWM_3_A   RK_SETBITS(1 << 12)

Definition at line 352 of file grf.h.

◆ IOMUX_PWM_3_B

#define IOMUX_PWM_3_B   RK_SETBITS(1 << 12)

Definition at line 353 of file grf.h.

◆ IOMUX_SDMMC

#define IOMUX_SDMMC
Value:
RK_CLRSETBITS(0xfff, 1 << 10 | 1 << 8 | 1 << 6 |\
1 << 4 | 1 << 2 | 1 << 0)
#define RK_CLRSETBITS(clr, set)
Definition: soc.h:8

Definition at line 341 of file grf.h.

◆ IOMUX_SPI0

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

Definition at line 332 of file grf.h.

◆ IOMUX_SPI1_CSCLKTX

#define IOMUX_SPI1_CSCLKTX
Value:
RK_CLRSETBITS(0x3f << 0, 2 << 4 |\
2 << 2 | 2 << 0)

Definition at line 335 of file grf.h.

◆ IOMUX_SPI1_RX

#define IOMUX_SPI1_RX   RK_CLRSETBITS(3 << 14, 2 << 14)

Definition at line 334 of file grf.h.

◆ IOMUX_SPI2

#define IOMUX_SPI2
Value:
RK_CLRSETBITS(0xff << 2, 1 << 8 | 1 << 6 |\
1 << 4 | 1 << 2)

Definition at line 337 of file grf.h.

◆ IOMUX_SPI5

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

Definition at line 339 of file grf.h.

◆ IOMUX_TSADC_INT

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

Definition at line 354 of file grf.h.

◆ IOMUX_UART2A

#define IOMUX_UART2A   RK_CLRSETBITS(3 << 2 | 3 << 0, 2 << 2 | 2 << 0)

Definition at line 329 of file grf.h.

◆ IOMUX_UART2B

#define IOMUX_UART2B   RK_CLRSETBITS(3 << 2 | 3 << 0, 2 << 2 | 2 << 0)

Definition at line 330 of file grf.h.

◆ IOMUX_UART2C

#define IOMUX_UART2C   RK_CLRSETBITS(3 << 8 | 3 << 6, 1 << 8 | 1 << 6)

Definition at line 331 of file grf.h.

◆ PWM3_SEL_A

#define PWM3_SEL_A   RK_CLRBITS(1 << 5)

Definition at line 326 of file grf.h.

◆ PWM3_SEL_B

#define PWM3_SEL_B   RK_SETBITS(1 << 5)

Definition at line 327 of file grf.h.

◆ UART2A_SEL

#define UART2A_SEL   RK_CLRSETBITS(3 << 10, 0 << 10)

Definition at line 323 of file grf.h.

◆ UART2B_SEL

#define UART2B_SEL   RK_CLRSETBITS(3 << 10, 1 << 10)

Definition at line 324 of file grf.h.

◆ UART2C_SEL

#define UART2C_SEL   RK_CLRSETBITS(3 << 10, 2 << 10)

Definition at line 325 of file grf.h.

Function Documentation

◆ check_member() [1/3]

check_member ( rk3399_grf_regs  ,
emmcphy_status  ,
0xf7a0   
)

◆ check_member() [2/3]

check_member ( rk3399_pmugrf_regs  ,
os_reg3  ,
0x30c   
)

◆ check_member() [3/3]

check_member ( rk3399_pmusgrf_regs  ,
slv_secure_con4  ,
0xe3d4   
)

Variable Documentation

◆ rk3399_grf

◆ rk3399_pmugrf

◆ rk3399_pmusgrf

struct rk3399_pmusgrf_regs* const rk3399_pmusgrf = (void *)PMUSGRF_BASE
static

Definition at line 321 of file grf.h.

Referenced by bootblock_soc_init(), and rkclk_configure_ddr().