coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ebi2.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /*
4  * Taken from U-Boot.
5  */
6 #ifndef __SOC_QUALCOMM_IPQ806X_EBI2_H_
7 #define __SOC_QUALCOMM_IPQ806X_EBI2_H_
8 
9 #include <stdint.h>
10 
11 #define EBI2CR_BASE (0x1A600000)
12 
13 struct ebi2cr_regs {
14  uint32_t chip_select_cfg0; /* 0x00000000 */
15  uint32_t cfg; /* 0x00000004 */
16  uint32_t hw_info; /* 0x00000008 */
17  uint8_t reserved0[20];
18  uint32_t lcd_cfg0; /* 0x00000020 */
19  uint32_t lcd_cfg1; /* 0x00000024 */
20  uint8_t reserved1[8];
21  uint32_t arbiter_cfg; /* 0x00000030 */
22  uint8_t reserved2[28];
23  uint32_t debug_sel; /* 0x00000050 */
24  uint32_t crc_cfg; /* 0x00000054 */
25  uint32_t crc_reminder_cfg; /* 0x00000058 */
26  uint32_t nand_adm_mux; /* 0x0000005C */
27  uint32_t mutex_addr_offset; /* 0x00000060 */
28  uint32_t misr_value; /* 0x00000064 */
29  uint32_t clkon_cfg; /* 0x00000068 */
30  uint32_t core_clkon_cfg; /* 0x0000006C */
31 };
32 
33 /* Register: EBI2_CHIP_SELECT_CFG0 */
34 #define CS7_CFG_MASK 0x00001000
35 #define CS7_CFG_DISABLE 0x00000000
36 #define CS7_CFG_GENERAL_SRAM_MEMORY_INTERFACE 0x00001000
37 #define CS7_CFG(i) ((i) << 12)
38 
39 #define CS6_CFG_MASK 0x00000800
40 #define CS6_CFG_DISABLE 0x00000000
41 #define CS6_CFG_GENERAL_SRAM_MEMORY_INTERFACE 0x00000800
42 #define CS6_CFG(i) ((i) << 11)
43 
44 #define ETM_CS_CFG_MASK 0x00000400
45 #define ETM_CS_CFG_DISABLE 0x00000000
46 #define ETM_CS_CFG_GENERAL_SRAM_MEMORY_INTERFACE 0x00000400
47 #define ETM_CS_CFG(i) ((i) << 10)
48 
49 #define CS5_CFG_MASK 0x00000300
50 #define CS5_CFG_DISABLE 0x00000000
51 #define CS5_CFG_LCD_DEVICE_CONNECTED 0x00000100
52 #define CS5_CFG_LCD_DEVICE_CHIP_ENABLE 0x00000200
53 #define CS5_CFG_GENERAL_SRAM_MEMORY_INTERFACE 0x00000300
54 #define CS5_CFG(i) ((i) << 8)
55 
56 #define CS4_CFG_MASK 0x000000c0
57 #define CS4_CFG_DISABLE 0x00000000
58 #define CS4_CFG_LCD_DEVICE_CONNECTED 0x00000040
59 #define CS4_CFG_GENERAL_SRAM_MEMORY_INTERFACE 0x000000C0
60 #define CS4_CFG(i) ((i) << 6)
61 
62 #define CS3_CFG_MASK 0x00000020
63 #define CS3_CFG_DISABLE 0x00000000
64 #define CS3_CFG_GENERAL_SRAM_MEMORY_INTERFACE 0x00000020
65 #define CS3_CFG(i) ((i) << 5)
66 
67 #define CS2_CFG_MASK 0x00000010
68 #define CS2_CFG_DISABLE 0x00000000
69 #define CS2_CFG_GENERAL_SRAM_MEMORY_INTERFACE 0x00000010
70 #define CS2_CFG(i) ((i) << 4)
71 
72 #define CS1_CFG_MASK 0x0000000c
73 #define CS1_CFG_DISABLE 0x00000000
74 #define CS1_CFG_SERIAL_FLASH_DEVICE 0x00000004
75 #define CS1_CFG_GENERAL_SRAM_MEMORY_INTERFACE 0x00000008
76 #define CS1_CFG(i) ((i) << 2)
77 
78 #define CS0_CFG_MASK 0x00000003
79 #define CS0_CFG_DISABLE 0x00000000
80 #define CS0_CFG_SERIAL_FLASH_DEVICE 0x00000001
81 #define CS0_CFG_GENERAL_SRAM_MEMORY_INTERFACE 0x00000002
82 #define CS0_CFG(i) ((i) << 0)
83 
84 #endif
unsigned int uint32_t
Definition: stdint.h:14
unsigned char uint8_t
Definition: stdint.h:8
uint32_t chip_select_cfg0
Definition: ebi2.h:11
uint32_t arbiter_cfg
Definition: ebi2.h:18
uint32_t debug_sel
Definition: ebi2.h:20
uint32_t misr_value
Definition: ebi2.h:25
uint32_t cfg
Definition: ebi2.h:12
uint32_t clkon_cfg
Definition: ebi2.h:26
uint32_t lcd_cfg0
Definition: ebi2.h:15
uint8_t reserved2[28]
Definition: ebi2.h:19
uint32_t crc_reminder_cfg
Definition: ebi2.h:22
uint8_t reserved0[20]
Definition: ebi2.h:14
uint32_t lcd_cfg1
Definition: ebi2.h:16
uint32_t mutex_addr_offset
Definition: ebi2.h:24
uint32_t nand_adm_mux
Definition: ebi2.h:23
uint32_t core_clkon_cfg
Definition: ebi2.h:27
uint8_t reserved1[8]
Definition: ebi2.h:17
uint32_t hw_info
Definition: ebi2.h:13
uint32_t crc_cfg
Definition: ebi2.h:21