ARM: dts: at91: sama5d2_icp: fix i2c eeprom compatible
[platform/kernel/u-boot.git] / board / toradex / common / tdx-cfg-block.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (c) 2016-2020 Toradex
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, /* 5 */
29         COLIBRI_PXA320_IT,
30         COLIBRI_PXA300_XT,
31         COLIBRI_PXA270_312MHZ,
32         COLIBRI_PXA270_520MHZ,
33         COLIBRI_VF50, /* 10 */
34         COLIBRI_VF61, /* not currently on sale */
35         COLIBRI_VF61_IT,
36         COLIBRI_VF50_IT,
37         COLIBRI_IMX6S,
38         COLIBRI_IMX6DL, /* 15 */
39         COLIBRI_IMX6S_IT,
40         COLIBRI_IMX6DL_IT,
41         /* 18 */
42         /* 19 */
43         COLIBRI_T20_256MB = 20,
44         COLIBRI_T20_512MB,
45         COLIBRI_T20_512MB_IT,
46         COLIBRI_T30,
47         COLIBRI_T20_256MB_IT,
48         APALIS_T30_2GB, /* 25 */
49         APALIS_T30_1GB,
50         APALIS_IMX6Q,
51         APALIS_IMX6Q_IT,
52         APALIS_IMX6D,
53         COLIBRI_T30_IT, /* 30 */
54         APALIS_T30_IT,
55         COLIBRI_IMX7S,
56         COLIBRI_IMX7D,
57         APALIS_TK1_2GB,
58         APALIS_IMX6D_IT, /* 35 */
59         COLIBRI_IMX6ULL,
60         APALIS_IMX8QM_WIFI_BT_IT,
61         COLIBRI_IMX8QXP_WIFI_BT_IT,
62         COLIBRI_IMX7D_EMMC,
63         COLIBRI_IMX6ULL_WIFI_BT_IT, /* 40 */
64         COLIBRI_IMX7D_EPDC,
65         APALIS_TK1_4GB, /* not currently on sale */
66         COLIBRI_T20_512MB_IT_SETEK,
67         COLIBRI_IMX6ULL_IT,
68         COLIBRI_IMX6ULL_WIFI_BT, /* 45 */
69         APALIS_IMX8QXP_WIFI_BT_IT,
70         APALIS_IMX8QM_IT,
71         APALIS_IMX8QP_WIFI_BT,
72         APALIS_IMX8QP,
73         COLIBRI_IMX8QXP_IT, /* 50 */
74         COLIBRI_IMX8DX_WIFI_BT,
75         COLIBRI_IMX8DX,
76         APALIS_IMX8QXP,
77         APALIS_IMX8DXP,
78         VERDIN_IMX8MMQ_WIFI_BT_IT,
79         VERDIN_IMX8MNSL,
80         VERDIN_IMX8MMDL,
81 };
82
83 enum {
84         DAHLIA = 155,
85         VERDIN_DEVELOPMENT_BOARD = 156,
86 };
87
88 enum {
89         VERDIN_DSI_TO_HDMI_ADAPTER = 157,
90         VERDIN_DSI_TO_LVDS_ADAPTER = 159,
91 };
92
93 extern const char * const toradex_modules[];
94 extern const char * const toradex_carrier_boards[];
95 extern bool valid_cfgblock;
96 extern struct toradex_hw tdx_hw_tag;
97 extern struct toradex_hw tdx_car_hw_tag;
98 extern struct toradex_eth_addr tdx_eth_addr;
99 extern u32 tdx_serial;
100 extern u32 tdx_car_serial;
101
102 int read_tdx_cfg_block(void);
103 int read_tdx_cfg_block_carrier(void);
104
105 int try_migrate_tdx_cfg_block_carrier(void);
106
107 #endif /* _TDX_CFG_BLOCK_H */