1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2013 Gateworks Corporation
6 #ifndef _VENTANA_EEPROM_
7 #define _VENTANA_EEPROM_
9 struct ventana_board_info {
10 u8 mac0[6]; /* 0x00: MAC1 */
11 u8 mac1[6]; /* 0x06: MAC2 */
12 u8 res0[12]; /* 0x0C: reserved */
13 u32 serial; /* 0x18: Serial Number (read only) */
14 u8 res1[4]; /* 0x1C: reserved */
15 u8 mfgdate[4]; /* 0x20: MFG date (read only) */
16 u8 res2[7]; /* 0x24 */
18 u8 sdram_size; /* 0x2B: (16 << n) MB */
19 u8 sdram_speed; /* 0x2C: (33.333 * n) MHz */
20 u8 sdram_width; /* 0x2D: (8 << n) bit */
22 u8 cpu_speed; /* 0x2E: (33.333 * n) MHz */
23 u8 cpu_type; /* 0x2F: 7=imx6q, 8=imx6dl */
24 u8 model[16]; /* 0x30: model string */
26 u8 nand_flash_size; /* 0x40: (8 << (n-1)) MB */
27 u8 spi_flash_size; /* 0x41: (4 << (n-1)) MB */
29 /* Config1: SoC Peripherals */
30 u8 config[8]; /* 0x42: loading options */
32 u8 res3[4]; /* 0x4A */
34 u8 chksum[2]; /* 0x4E */
106 GW54proto, /* original GW5400-A prototype */
122 struct ventana_eeprom_config {
123 const char *name; /* name of item */
124 const char *dtalias; /* name of dt node to remove if not set */
125 int bit; /* bit within config */
128 extern struct ventana_eeprom_config econfig[];
129 extern struct ventana_board_info ventana_info;
131 int read_eeprom(int bus, struct ventana_board_info *);