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