forked from mfdl/MTKPreloaderParser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemi_structures.h
798 lines (749 loc) · 19.5 KB
/
emi_structures.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
#ifndef STRUCTURES_H
#define STRUCTURES_H
#include <QtCore>
typedef quint8 qchar;
typedef quint16 qshort;
typedef quint32 quint;
typedef quint64 qlong;
typedef QByteArray qbyte;
typedef QString qstr;
using namespace std;
#define UFS_VENDOR_MICRON_MP 0x12C
#define UFS_VENDOR_MICRON_ES 0x02C
#define UFS_VENDOR_TOSHIBA 0x198
#define UFS_VENDOR_SAMSUNG 0x1CE
#define UFS_VENDOR_SKHYNIX 0x1AD
#define MTK_BLOADER_INFO_BEGIN "MTK_BLOADER_INFO_v"
namespace mtkPreloader {
//!MTK_BLOADER_INFO_v08_EMMC
typedef struct EMIInfoV08
{
struct
{
quint m_type{0x00};
char m_emmc_id[12]{0x00};
quint m_dram_rank_size[4]{1024*0124}; //FIX_ME
} emi_cfg;
public:
unsigned int emi_len[34];
} EMIInfoV08;
//!MTK_BLOADER_INFO_v10_EMMC
typedef struct EMIInfoV10 //MT6589 , MT8135
{
struct
{
quint m_sub_ver{0x00}; //# Sub_version checking for flash tool
quint m_type{0x00}; //#type
quint m_id_length{0x00}; // # EMMC ID checking length
quint fw_id_length{0x00}; //# FW ID checking length
char m_emmc_id[16]{0x00}; //#id
char m_fw_id[8]{0x00}; // #fw id
union {
quint dramc0[17];//EMI settings len = 0x44
};
//end to end should be 0x4f
quint m_dram_rank_size[4]{0x00};
int MMD; //MMD info, for 6589 just has two types MMD1 and MMD2.
int m_reserved[8];
} emi_cfg;
public:
unsigned int emi_len[46]; //bc000000
} EMIInfoV10;//https://github.com/cakehonolulu/android_kernel_bq_Aquaris5HD/blob/d08666e5144f8a1de123d46a63ff9c4442e31799/mediatek/build/tools/emigen/MT6589/emigen.pl
//!MTK_BLOADER_INFO_v11_EMMC
typedef struct EMIInfoV11
{
struct
{
quint m_type{0x00};
char m_emmc_id[16]{0x00};
quint m_id_length{0x00};
union {
quint dramc0[30];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[42];
} EMIInfoV11;
//!MTK_BLOADER_INFO_v12_EMMC
typedef struct EMIInfoV12
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[17];
};
quint m_dram_rank_size[4]{0x00};
quint m_reserved0[10]{0x00};
union DDR
{
struct _LPDDR1
{
unsigned int m_mode_reg;
unsigned int m_ext_mode_reg; // dram driving strength -> customized
} lp_ddr1;
struct _LPDDR2
{
unsigned int m_mode_reg_1;
unsigned int m_mode_reg_2;
unsigned int m_mode_reg_3;
unsigned int m_mode_reg_5; //vendor ID
unsigned int m_mode_reg_10;
unsigned int m_mode_reg_63;
} lp_ddr2;
struct _LPDDR3
{
unsigned int m_mode_reg_1;
unsigned int m_mode_reg_2;
unsigned int m_mode_reg_3;
unsigned int m_mode_reg_5; //vendor ID
unsigned int m_mode_reg_10;
unsigned int m_mode_reg_63;
} lp_ddr3;
struct _PCDDR3
{
unsigned int m_mode_reg_0;
unsigned int m_mode_reg_1;
unsigned int m_mode_reg_2;
unsigned int m_mode_reg_3;
} pc_ddr3;
} m_ddr;
} emi_cfg;
public:
unsigned int emi_len[47];
} EMIInfoV12;
//!MTK_BLOADER_INFO_v13_EMMC
typedef struct EMIInfoV13
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[17];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[47];
} EMIInfoV13;
//!MTK_BLOADER_INFO_v14_EMMC
typedef struct EMIInfoV14
{
struct
{
quint m_type{0x00};
char m_emmc_id[12]{0x00};
quint m_dram_rank_size[4]{1024*0124}; //FIX_ME
} emi_cfg;
public:
unsigned int emi_len[42];
} EMIInfoV14;
//!MTK_BLOADER_INFO_v15_EMMC
typedef struct EMIInfoV15
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
quint m_reserved0[6]{0x00};//NO_IDEA!
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[14];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[44];
} EMIInfoV15;
//!MTK_BLOADER_INFO_v16_EMMC
typedef struct EMIInfoV16
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[17];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[47];
} EMIInfoV16;
//!MTK_BLOADER_INFO_v17_EMMC
typedef struct EMIInfoV17
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[14];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[44];
} EMIInfoV17;
//!MTK_BLOADER_INFO_v18_EMMC
typedef struct EMIInfoV18 //for MT8590
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[17];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[47];
} EMIInfoV18;
//!MTK_BLOADER_INFO_v19_EMMC
typedef struct EMIInfoV19 //for 8173
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[14];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[44];
} EMIInfoV19;
//!MTK_BLOADER_INFO_v20_EMMC
typedef struct EMIInfoV20
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[17];
};
quint m_dram_rank_size[4]{0x00};
quint m_reserved[10]{0x00};
union
{
struct
{
quint LPDDR2_MODE_REG_1;
quint LPDDR2_MODE_REG_2;
quint LPDDR2_MODE_REG_3;
quint LPDDR2_MODE_REG_5;
quint LPDDR2_MODE_REG_10;
quint LPDDR2_MODE_REG_63;
};
struct
{
quint DDR1_MODE_REG;
quint DDR1_EXT_MODE_REG;
};
struct
{
quint PCDDR3_MODE_REG0;
quint PCDDR3_MODE_REG1;
quint PCDDR3_MODE_REG2;
quint PCDDR3_MODE_REG3;
quint PCDDR3_MODE_REG4;
quint PCDDR3_MODE_REG5;
};
struct
{
quint LPDDR3_MODE_REG_1;
quint LPDDR3_MODE_REG_2;
quint LPDDR3_MODE_REG_3;
quint LPDDR3_MODE_REG_5;
quint LPDDR3_MODE_REG_10;
quint LPDDR3_MODE_REG_63;
};
};
} emi_cfg;
public:
unsigned int emi_len[47];
} EMIInfoV20;
//!MTK_BLOADER_INFO_v21_EMMC
typedef struct EMIInfoV21
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[17];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[47];
} EMIInfoV21;
//!MTK_BLOADER_INFO_v22_EMMC
typedef struct EMIInfoV22
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[14];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[44];
} EMIInfoV22;
//!MTK_BLOADER_INFO_v23_EMMC
typedef struct EMIInfoV23
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[14];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[38];
} EMIInfoV23;
//!MTK_BLOADER_INFO_v24_EMMC
typedef struct EMIInfoV24 //FIX_ME
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[14];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[44];
} EMIInfoV24;
//!MTK_BLOADER_INFO_v25_EMMC
typedef struct EMIInfoV25
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[5]; //fix_me to detect the correct dram led fix this container.
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[40];
} EMIInfoV25;
//!MTK_BLOADER_INFO_v27_EMMC
typedef struct EMIInfoV27
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[17];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[47];
} EMIInfoV27;
//!MTK_BLOADER_INFO_v28_EMMC
typedef struct EMIInfoV28
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_reserved0[10]{0x00};//FIX!
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[17];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[36+1];
} EMIInfoV28;
//!MTK_BLOADER_INFO_v30_EMMC
typedef struct EMIInfoV30
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
quint emi_cona_val{0x00};//@0x3000
quint emi_conh_val{0x00};
union {
quint DRAMC_ACTIME_UNION[8];
quint dramc0[8];//AC_TIMING_EXTERNAL_T AcTimeEMI;
};
qlong m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[40];
} EMIInfoV30;
//!MTK_BLOADER_INFO_v31_EMMC
typedef struct EMIInfoV31
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
quint emi_cona_val{0x00};//@0x3000
quint emi_conh_val{0x00};
union {
quint DRAMC_ACTIME_UNION[8];
quint AcTimeEMI[8];//AC_TIMING_EXTERNAL_T AcTimeEMI;
};
qlong m_dram_rank_size[4]{0x00};
} emi_cfg;//FOR_DV_SIMULATION_USED
public:
unsigned int emi_len[40];
} EMIInfoV31;
//!MTK_BLOADER_INFO_v32_EMMC
typedef struct EMIInfoV32
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
union {
quint dramc0[17];
};
quint m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[47];
} EMIInfoV32;
//!MTK_BLOADER_INFO_v35_EMMC
typedef struct EMIInfoV35
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
quint emi_cona_val{0x00};//@0x3000
quint emi_conh_val{0x00};
union {
quint DRAMC_ACTIME_UNION[8];
quint AcTimeEMI[8];//AC_TIMING_EXTERNAL_T AcTimeEMI;
};
qlong m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[40];
} EMIInfoV35;
//!MTK_BLOADER_INFO_v36_EMMC
typedef struct EMIInfoV36
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
quint emi_cona_val{0x00};//@0x3000
quint emi_conh_val{0x00};
union {
quint DRAMC_ACTIME_UNION[8];
quint AcTimeEMI[8];//AC_TIMING_EXTERNAL_T AcTimeEMI;
};
qlong m_dram_rank_size[4]{0x00}; //!# combo rule in preloader must support same emmc id with different rank size
} emi_cfg;
public:
unsigned int emi_len[40];
} EMIInfoV36;
//!MTK_BLOADER_INFO_v38_EMMC
typedef struct EMIInfoV38
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
quint emi_cona_val{0x00};//@0x3000
quint emi_conh_val{0x00};
union {
quint DRAMC_ACTIME_UNION[8];
quint AcTimeEMI[8];//AC_TIMING_EXTERNAL_T AcTimeEMI;
};
qlong m_dram_rank_size[4]{0x00};
} emi_cfg;//!custom/evb6763_64_emmc/inc/custom_MemoryDevice.h
public:
unsigned int emi_len[40];
} EMIInfoV38;
//!MTK_BLOADER_INFO_v39_eMMC + UFS //COMBO_BEGIN
typedef struct EMIInfoV39
{
//!H9HQ16AFAMMDAR / H9HCNNNFAMMLXR-NEE / K4UCE3Q4AA-MGCR - 8GB (4+4) Byte Mode
struct //MT29VZZZAD8GQFSL-046 - 4GB -Normal mode (4+0), //MT53E2G32D4 - 8GB (4+4) Normal Mode
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_emmc_id[16]{0x00};
char m_fw_id[8]{0x00};
quint emi_cona_val{0x00};/* EMI_CONA_VAL */
quint emi_conh_val{0x00}; /* EMI_CONH_VAL */
union {
quint DRAMC_ACTIME_UNION[8];
//0x00000000,/* U 00 */
//0x00000000,/* U 01 */
//0x00000000,/* U 02 */
//0x00000000,/* U 03 */
//0x00000000,/* U 04 */
//0x00000000,/* U 05 */
//0x00000000,/* U 06 */
//0x00000000,/* U 07 */
};
qlong m_dram_rank_size[4]{0x00};
} emi_cfg;//!custom/evb6763_64_emmc/inc/custom_MemoryDevice.h
public:
unsigned int emi_len[40];
} EMIInfoV39;
//!MTK_BLOADER_INFO_v49_UFS + V52
typedef struct EMIInfoV49 // H9HCNNNFAMMLXR-NEE / K4UCE3Q4AA-MGCR - 8GB (4+4) Byte Mode
{
struct
{
quint m_type{0x00};
quint m_id_length{0x00};
char m_ufs_id[16]{0x00};
qlong m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[21];
} EMIInfoV49;
//!MTK_BLOADER_INFO_v46_UFS
typedef struct EMIInfoV46
{
struct
{
quint m_type{0x00};
quint m_id_length{0x00};
quint m_reserved0[8]{0x00};//FIX!
char m_ufs_id[16]{0x00};
qlong m_dram_rank_size[4]{0x00};
} emi_cfg;
public:
unsigned int emi_len[21];
} EMIInfoV46;
//!MTK_BLOADER_INFO_v51_UFS
typedef struct EMIInfoV51 //FIX_ME
{
struct
{
quint m_sub_ver{0x00};
quint m_type{0x00};
quint m_id_length{0x00};
quint fw_id_length{0x00};
char m_ufs_id[16]{0x00};
char m_fw_id[8]{0x00};
quint emi_cona_val{0x00};/* EMI_CONA_VAL */
quint emi_conh_val{0x00}; /* EMI_CONH_VAL */
union {
quint DRAMC_ACTIME_UNION[8];
//0x00000000,/* U 00 */
//0x00000000,/* U 01 */
//0x00000000,/* U 02 */
//0x00000000,/* U 03 */
//0x00000000,/* U 04 */
//0x00000000,/* U 05 */
//0x00000000,/* U 06 */
//0x00000000,/* U 07 */
};
qlong m_dram_rank_size[4]{0x00};
} emi_cfg;//!custom/evb6763_64_emmc/inc/custom_MemoryDevice.h
public:
unsigned int emi_len[40];
} EMIInfoV51;
typedef struct MTKEMIInfo
{
union
{
EMIInfoV08 emi_v08;
EMIInfoV10 emi_v10;
EMIInfoV11 emi_v11;
EMIInfoV12 emi_v12;
EMIInfoV13 emi_v13;
EMIInfoV14 emi_v14;
EMIInfoV15 emi_v15;
EMIInfoV16 emi_v16;
EMIInfoV17 emi_v17;
EMIInfoV18 emi_v18;
EMIInfoV19 emi_v19;
EMIInfoV20 emi_v20;
EMIInfoV21 emi_v21;
EMIInfoV22 emi_v22;
EMIInfoV23 emi_v23;
EMIInfoV24 emi_v24;
EMIInfoV25 emi_v25;
EMIInfoV27 emi_v27;
EMIInfoV28 emi_v28;
EMIInfoV30 emi_v30;
EMIInfoV31 emi_v31;
EMIInfoV32 emi_v32;
EMIInfoV35 emi_v35;
EMIInfoV36 emi_v36;
EMIInfoV38 emi_v38;
EMIInfoV39 emi_v39;
EMIInfoV46 emi_v46;
EMIInfoV49 emi_v49;
EMIInfoV51 emi_v51;
} emi_cfg = {};
public:
qstr index{};
qstr flash_id{};
qstr manufacturer_id{};
qstr manufacturer{};
qstr ProductName{};
qstr OEMApplicationId{};
qstr CardBGA{};
qstr dram_type{};
qstr dram_size{};
qbyte m_emi_info{};
qsizetype m_emi_ver{};
}MTKEMIInfo;
typedef struct
{
quint magic;
qshort size;
qshort type;
qint8 id[12];
quint file_version;
qshort file_type;
qint8 flash_dev;
qint8 sig_type;
quint load_addr;
quint length;
quint max_size;
quint content_offset;
quint sig_length;
quint jump_offset;
quint addr;
} gfh_info_t;
}
namespace mmcCARD {
typedef struct emmc_card_info_cid_t
{
public:
qchar mid{0x00}; /* Manufacturer ID */
qchar cbx{0x00}; /* Reserved(6)+Card/BGA(2) */ //- Only lower 2 bit valid
qchar oid{0x00}; /* OEM/Application ID */
qchar pnm0{0x00}; /* Product name [0] */
qchar pnm1{0x00}; /* Product name [1] */
qchar pnm2{0x00}; /* Product name [2] */
qchar pnm3{0x00}; /* Product name [3] */
qchar pnm4{0x00}; /* Product name [4] */
qchar pnm5{0x00}; /* Product name [5] */
qchar pdrv{0x00}; /* Product revision */
qchar psn0{0x00}; /* Serial Number [0] */
qchar psn1{0x00}; /* Serial Number [1] */
qchar psn2{0x00}; /* Serial Number [2] */
qchar psn3{0x00}; /* Serial Number [3] */
qchar mdt{0x00}; /* Manufacturer date */
qchar crc7{0x00}; /* CRC7 + stuff bit*/ //--Only top 7 bit
}mmc_cid_t;
typedef struct CIDInfo
{
qstr ManufacturerId{};
qstr Manufacturer{};
qstr CardBGA{};
qstr OEMApplicationId{};
qstr ProductName{};
qstr ProductRevision{};
qstr ProductSerialNumber{};
qstr ManufacturingDate{};
}CIDInfo;
}
#endif // STRUCTURES_H