961bb4394fa01c96f810c6b605972767b50711af
[oweals/u-boot.git] / board / toradex / common / tdx-cfg-block.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (c) 2016 Toradex, Inc.
4  */
5
6 #ifndef _TDX_CFG_BLOCK_H
7 #define _TDX_CFG_BLOCK_H
8
9 #include "tdx-common.h"
10
11 struct toradex_hw {
12         u16 ver_major;
13         u16 ver_minor;
14         u16 ver_assembly;
15         u16 prodid;
16 };
17
18 struct toradex_eth_addr {
19         u32 oui:24;
20         u32 nic:24;
21 } __attribute__((__packed__));
22
23 enum {
24         COLIBRI_PXA270_V1_312MHZ = 1,
25         COLIBRI_PXA270_V1_520MHZ,
26         COLIBRI_PXA320,
27         COLIBRI_PXA300,
28         COLIBRI_PXA310,
29         COLIBRI_PXA320_IT,
30         COLIBRI_PXA300_XT,
31         COLIBRI_PXA270_312MHZ,
32         COLIBRI_PXA270_520MHZ,
33         COLIBRI_VF50, /* not currently on sale */
34         COLIBRI_VF61,
35         COLIBRI_VF61_IT,
36         COLIBRI_VF50_IT,
37         COLIBRI_IMX6S,
38         COLIBRI_IMX6DL,
39         COLIBRI_IMX6S_IT,
40         COLIBRI_IMX6DL_IT,
41         COLIBRI_T20_256MB = 20,
42         COLIBRI_T20_512MB,
43         COLIBRI_T20_512MB_IT,
44         COLIBRI_T30,
45         COLIBRI_T20_256MB_IT,
46         APALIS_T30_2GB,
47         APALIS_T30_1GB,
48         APALIS_IMX6Q,
49         APALIS_IMX6Q_IT,
50         APALIS_IMX6D,
51         COLIBRI_T30_IT,
52         APALIS_T30_IT,
53         COLIBRI_IMX7S,
54         COLIBRI_IMX7D,
55         APALIS_TK1_2GB,
56         APALIS_IMX6D_IT,
57         COLIBRI_IMX6ULL,
58         APALIS_IMX8QM, /* 37 */
59         COLIBRI_IMX8X,
60         COLIBRI_IMX7D_EMMC,
61         COLIBRI_IMX6ULL_WIFI_BT_IT, /* 40 */
62         COLIBRI_IMX7D_EPDC,
63         APALIS_TK1_4GB,
64         COLIBRI_T20_512MB_IT_SETEK,
65         COLIBRI_IMX6ULL_IT,
66         COLIBRI_IMX6ULL_WIFI_BT, /* 45 */
67 };
68
69 extern const char * const toradex_modules[];
70 extern bool valid_cfgblock;
71 extern struct toradex_hw tdx_hw_tag;
72 extern struct toradex_eth_addr tdx_eth_addr;
73 extern u32 tdx_serial;
74
75 int read_tdx_cfg_block(void);
76
77 #endif /* _TDX_CFG_BLOCK_H */