Callisto4Bootloader: src/bootloader_types.h Source File

Callisto4Bootloader

bootloader_types.h
Go to the documentation of this file.
1
15 #ifndef BOOTLOADER_TYPES_H_
16 #define BOOTLOADER_TYPES_H_
17
18 #include <stdint.h>
19
25 typedef struct
26 {
27 uint32_t tag;
28 union {
29 struct {
30 uint32_t bugfix:8;
31 uint32_t minor:8;
32 uint32_t major:8;
33 uint32_t V:8;
34 } B;
35 uint32_t R;
36 } version;
37 uint8_t reserved1[4];
38 uint8_t readSampleClkSrc;
41 uint8_t csHoldTime;
43 uint8_t csSetupTime;
45 uint8_t columnAdressWidth;
48 uint8_t deviceModeCfgEnable;
51 uint8_t reserved2;
52 uint16_t waitTimeCfgCommands;
59 union {
60 struct {
61 uint32_t numLutSeq:8;
62 uint32_t startLut:8;
63 uint32_t reserved:16;
64 } B;
65 uint32_t R;
66 } deviceModeSeq;
67 uint32_t deviceModeArg;
68 uint8_t configCmdEnable;
71 uint8_t reserved3[3];
72 uint8_t configCmdSeqs[12];
73 uint8_t reserved4[4];
74 uint8_t cfgCmdArgs[12];
75 uint8_t reserved5[4];
76 union {
77 struct {
78 uint32_t Bit0:1;
79 uint32_t Bit1:1;
80 uint32_t Bit2:1;
81 uint32_t Bit3:1;
82 uint32_t Bit4:1;
84 uint32_t Bit5:1;
85 uint32_t Bit6:1;
86 } B;
87 uint32_t R;
88 } controllerMiscOption;
89 uint8_t deviceType;
91 uint8_t sflashPadType;
95 uint8_t serialClkFreq;
106 uint8_t lutCustomSeqEnable;
108 uint8_t reserved6[8];
109 uint32_t sflashA1Size;
111 uint32_t sflashA2Size;
113 uint32_t sflashB1Size;
115 uint32_t sflashB2Size;
117 uint32_t csPadSettingOverride;
118 uint32_t sclkPadSettingOverride;
119 uint32_t dataPadSettingOverride;
120 uint32_t dqsPadSettingOverride;
121 uint32_t timeoutInMs;
125 uint32_t commandInterval;
127 union {
128 struct {
129 uint32_t DLLA:16;
130 uint32_t DLLB:16;
131 } B;
132 uint32_t R;
133 } dataValidTimeDLLA;
139 uint16_t busyOffset;
140 uint16_t busyBitPolarity;
142 uint8_t lookupTable[256];
143 uint8_t lutCustomSeq[48];
144 uint8_t reserved7[16];
145 } FlexSPI_Header_t;
146
150 typedef struct
151 {
152 FlexSPI_Header_t memCfg;
153 uint32_t pageSize;
154 uint32_t sectorSize;
155 uint32_t ipCmdSerialClkFreq;
166 uint8_t reserved[52];
167 } serialNOR_t;
168
183 typedef struct
184 {
185 union
186 {
187 struct
188 {
189 uint32_t tag:8;
190 uint32_t length:16;
193 uint32_t version:8;
194 } B;
195 uint32_t R;
196 } header;
197 uint32_t entry;
198 uint32_t reserved1;
199 uint32_t dcd;
201 uint32_t bootData;
202 uint32_t self;
203 uint32_t csf;
205 uint32_t reserved2;
206 } IVT_t;
207
209 typedef struct
210 {
211 uint32_t bootStart;
212 uint32_t length;
213 uint32_t plugin;
214 } BPT_t;
215
233 typedef struct
234 {
235
236 union
237 {
238 struct
239 {
240 uint32_t tag:8;
241 uint32_t length:16;
244 uint32_t version:8;
245 } B;
246 uint32_t R;
247 } header;
248 } DCD_t;
249 #endif /* BOOTLOADER_TYPES_H_ */
FlexSPI_Header_t::startLut
uint32_t startLut
Bit[15:8] - starting LUT index of Device mode configuration command.
Definition: bootloader_types.h:62
IVT_t::dcd
uint32_t dcd
Definition: bootloader_types.h:199
IVT_t::entry
uint32_t entry
Definition: bootloader_types.h:197
FlexSPI_Header_t::reserved2
uint8_t reserved2
Definition: bootloader_types.h:51
BPT_t::plugin
uint32_t plugin
Definition: bootloader_types.h:213
FlexSPI_Header_t::Bit4
uint32_t Bit4
Safe Configuration Frequency enable set to 1 for the devices that support DDR Read instructions.
Definition: bootloader_types.h:82
FlexSPI_Header_t::busyBitPolarity
uint16_t busyBitPolarity
Definition: bootloader_types.h:140
FlexSPI_Header_t::configCmdEnable
uint8_t configCmdEnable
Config Command Enable feature 0 – Disabled 1 – Enabled.
Definition: bootloader_types.h:68
FlexSPI_Header_t::busyOffset
uint16_t busyOffset
Definition: bootloader_types.h:139
IVT_t::csf
uint32_t csf
Definition: bootloader_types.h:203
FlexSPI_Header_t::numLutSeq
uint32_t numLutSeq
Bit[7:0] - number of LUT sequences for Device mode configuration command.
Definition: bootloader_types.h:61
FlexSPI_Header_t::bugfix
uint32_t bugfix
Definition: bootloader_types.h:30
FlexSPI_Header_t::readSampleClkSrc
uint8_t readSampleClkSrc
Definition: bootloader_types.h:38
FlexSPI_Header_t::R
uint32_t R
Definition: bootloader_types.h:35
FlexSPI_Header_t::deviceModeArg
uint32_t deviceModeArg
Device Mode argument, effective only when deviceModeCfgEnable = 1.
Definition: bootloader_types.h:67
FlexSPI_Header_t::dqsPadSettingOverride
uint32_t dqsPadSettingOverride
Definition: bootloader_types.h:120
IVT_t::reserved2
uint32_t reserved2
Definition: bootloader_types.h:205
FlexSPI_Header_t::waitTimeCfgCommands
uint16_t waitTimeCfgCommands
Wait time for all configuration commands, unit 100us.
Definition: bootloader_types.h:52
BPT_t
Definition: bootloader_types.h:209
FlexSPI_Header_t::tag
uint32_t tag
Definition: bootloader_types.h:27
FlexSPI_Header_t::reserved
uint32_t reserved
Bit[31:16] - must be 0.
Definition: bootloader_types.h:63
serialNOR_t::ipCmdSerialClkFreq
uint32_t ipCmdSerialClkFreq
Chip specific value, not used by ROM 0 – No change, keep current serial clock unchanged 1 – 30 MHz 2 ...
Definition: bootloader_types.h:155
FlexSPI_Header_t::DLLA
uint32_t DLLA
Definition: bootloader_types.h:129
FlexSPI_Header_t::sflashA1Size
uint32_t sflashA1Size
Definition: bootloader_types.h:109
FlexSPI_Header_t::csSetupTime
uint8_t csSetupTime
Serial Flash CS setup time Recommended default value is 0x03.
Definition: bootloader_types.h:43
DCD_t::length
uint32_t length
Definition: bootloader_types.h:241
FlexSPI_Header_t::Bit2
uint32_t Bit2
ParallelModeEnable, must set to 0 for this silicon.
Definition: bootloader_types.h:80
DCD_t::R
uint32_t R
Register representation.
Definition: bootloader_types.h:246
FlexSPI_Header_t::csPadSettingOverride
uint32_t csPadSettingOverride
Definition: bootloader_types.h:117
FlexSPI_Header_t::serialClkFreq
uint8_t serialClkFreq
Definition: bootloader_types.h:95
IVT_t::bootData
uint32_t bootData
Definition: bootloader_types.h:201
FlexSPI_Header_t::timeoutInMs
uint32_t timeoutInMs
Maximum wait time during read busy status.
Definition: bootloader_types.h:121
serialNOR_t::sectorSize
uint32_t sectorSize
Definition: bootloader_types.h:154
FlexSPI_Header_t::sflashB1Size
uint32_t sflashB1Size
Definition: bootloader_types.h:113
serialNOR_t::pageSize
uint32_t pageSize
Definition: bootloader_types.h:153
FlexSPI_Header_t::sflashA2Size
uint32_t sflashA2Size
Definition: bootloader_types.h:111
FlexSPI_Header_t::deviceType
uint8_t deviceType
Definition: bootloader_types.h:89
serialNOR_t
Serial NOR configuration block Contains FlexSPIheader common block and NOR specific configuration.
Definition: bootloader_types.h:150
FlexSPI_Header_t::sflashPadType
uint8_t sflashPadType
Definition: bootloader_types.h:91
DCD_t::tag
uint32_t tag
Definition: bootloader_types.h:240
FlexSPI_Header_t::lutCustomSeqEnable
uint8_t lutCustomSeqEnable
Definition: bootloader_types.h:106
BPT_t::length
uint32_t length
Definition: bootloader_types.h:212
FlexSPI_Header_t::deviceModeCfgEnable
uint8_t deviceModeCfgEnable
Device Mode Configuration Enable feature 0 – Disabled 1 – Enabled.
Definition: bootloader_types.h:48
DCD_t::version
uint32_t version
Definition: bootloader_types.h:244
FlexSPI_Header_t::Bit1
uint32_t Bit1
CK2 enable, must set to 0 in this silicon.
Definition: bootloader_types.h:79
FlexSPI_Header_t::commandInterval
uint32_t commandInterval
Definition: bootloader_types.h:125
IVT_t::R
uint32_t R
Register representation.
Definition: bootloader_types.h:195
FlexSPI_Header_t::Bit3
uint32_t Bit3
wordAddressableEnable.
Definition: bootloader_types.h:81
DCD_t
Device Configuration Data (DCD)
Definition: bootloader_types.h:233
serialNOR_t::memCfg
FlexSPI_Header_t memCfg
Definition: bootloader_types.h:152
FlexSPI_Header_t::Bit0
uint32_t Bit0
Differential clock enable.
Definition: bootloader_types.h:78
FlexSPI_Header_t::sclkPadSettingOverride
uint32_t sclkPadSettingOverride
Definition: bootloader_types.h:118
FlexSPI_Header_t::Bit5
uint32_t Bit5
– Pad Setting Override Enable.
Definition: bootloader_types.h:84
IVT_t::length
uint32_t length
Definition: bootloader_types.h:190
FlexSPI_Header_t::Bit6
uint32_t Bit6
– DDR Mode Enable, set to 1 for device supports DDR read command.
Definition: bootloader_types.h:85
BPT_t::bootStart
uint32_t bootStart
Definition: bootloader_types.h:211
IVT_t::reserved1
uint32_t reserved1
Definition: bootloader_types.h:198
FlexSPI_Header_t::minor
uint32_t minor
Definition: bootloader_types.h:31
FlexSPI_Header_t::V
uint32_t V
Definition: bootloader_types.h:33
FlexSPI_Header_t::columnAdressWidth
uint8_t columnAdressWidth
Definition: bootloader_types.h:45
IVT_t::tag
uint32_t tag
Definition: bootloader_types.h:189
FlexSPI_Header_t::dataPadSettingOverride
uint32_t dataPadSettingOverride
Definition: bootloader_types.h:119
FlexSPI_Header_t::DLLB
uint32_t DLLB
Definition: bootloader_types.h:130
FlexSPI_Header_t::sflashB2Size
uint32_t sflashB2Size
Definition: bootloader_types.h:115
FlexSPI_Header_t::major
uint32_t major
Definition: bootloader_types.h:32
IVT_t::version
uint32_t version
Definition: bootloader_types.h:193
IVT_t
Structure to overlay on Image Vector Table.
Definition: bootloader_types.h:183
FlexSPI_Header_t
FlexSPI Configuration Block.
Definition: bootloader_types.h:25
FlexSPI_Header_t::csHoldTime
uint8_t csHoldTime
Definition: bootloader_types.h:41