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