1
2
3
4
5
6
7#ifndef _VENTANA_EEPROM_
8#define _VENTANA_EEPROM_
9
10struct ventana_board_info {
11 u8 mac0[6];
12 u8 mac1[6];
13 u8 res0[12];
14 u32 serial;
15 u8 res1[4];
16 u8 mfgdate[4];
17 u8 res2[7];
18
19 u8 sdram_size;
20 u8 sdram_speed;
21 u8 sdram_width;
22
23 u8 cpu_speed;
24 u8 cpu_type;
25 u8 model[16];
26
27 u8 nand_flash_size;
28 u8 spi_flash_size;
29
30
31 u8 config[8];
32
33 u8 res3[4];
34
35 u8 chksum[2];
36};
37
38
39enum {
40 EECONFIG_ETH0,
41 EECONFIG_ETH1,
42 EECONFIG_HDMI_OUT,
43 EECONFIG_SATA,
44 EECONFIG_PCIE,
45 EECONFIG_SSI0,
46 EECONFIG_SSI1,
47 EECONFIG_LCD,
48 EECONFIG_LVDS0,
49 EECONFIG_LVDS1,
50 EECONFIG_USB0,
51 EECONFIG_USB1,
52 EECONFIG_SD0,
53 EECONFIG_SD1,
54 EECONFIG_SD2,
55 EECONFIG_SD3,
56 EECONFIG_UART0,
57 EECONFIG_UART1,
58 EECONFIG_UART2,
59 EECONFIG_UART3,
60 EECONFIG_UART4,
61 EECONFIG_IPU0,
62 EECONFIG_IPU1,
63 EECONFIG_FLEXCAN,
64 EECONFIG_MIPI_DSI,
65 EECONFIG_MIPI_CSI,
66 EECONFIG_TZASC0,
67 EECONFIG_TZASC1,
68 EECONFIG_I2C0,
69 EECONFIG_I2C1,
70 EECONFIG_I2C2,
71 EECONFIG_VPU,
72 EECONFIG_CSI0,
73 EECONFIG_CSI1,
74 EECONFIG_CAAM,
75 EECONFIG_MEZZ,
76 EECONFIG_RES1,
77 EECONFIG_RES2,
78 EECONFIG_RES3,
79 EECONFIG_RES4,
80 EECONFIG_ESPCI0,
81 EECONFIG_ESPCI1,
82 EECONFIG_ESPCI2,
83 EECONFIG_ESPCI3,
84 EECONFIG_ESPCI4,
85 EECONFIG_ESPCI5,
86 EECONFIG_RES5,
87 EECONFIG_RES6,
88 EECONFIG_GPS,
89 EECONFIG_SPIFL0,
90 EECONFIG_SPIFL1,
91 EECONFIG_GSPBATT,
92 EECONFIG_HDMI_IN,
93 EECONFIG_VID_OUT,
94 EECONFIG_VID_IN,
95 EECONFIG_NAND,
96 EECONFIG_RES8,
97 EECONFIG_RES9,
98 EECONFIG_RES10,
99 EECONFIG_RES11,
100 EECONFIG_RES12,
101 EECONFIG_RES13,
102 EECONFIG_RES14,
103 EECONFIG_RES15,
104};
105
106enum {
107 GW54proto,
108 GW51xx,
109 GW52xx,
110 GW53xx,
111 GW54xx,
112 GW551x,
113 GW552x,
114 GW_UNKNOWN,
115 GW_BADCRC,
116};
117
118
119struct ventana_eeprom_config {
120 const char *name;
121 const char *dtalias;
122 int bit;
123};
124
125extern struct ventana_eeprom_config econfig[];
126extern struct ventana_board_info ventana_info;
127
128int read_eeprom(int bus, struct ventana_board_info *);
129
130#endif
131