1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2016-2020 Toradex
6 #ifndef _TDX_CFG_BLOCK_H
7 #define _TDX_CFG_BLOCK_H
9 #include "tdx-common.h"
18 struct toradex_eth_addr {
21 } __attribute__((__packed__));
29 COLIBRI_PXA270_V1_312MHZ = 1,
30 COLIBRI_PXA270_V1_520MHZ,
33 COLIBRI_PXA310, /* 5 */
36 COLIBRI_PXA270_312MHZ,
37 COLIBRI_PXA270_520MHZ,
38 COLIBRI_VF50, /* 10 */
43 COLIBRI_IMX6DL, /* 15 */
48 COLIBRI_T20_256MB = 20,
53 APALIS_T30_2GB, /* 25 */
58 COLIBRI_T30_IT, /* 30 */
63 APALIS_IMX6D_IT, /* 35 */
65 APALIS_IMX8QM_WIFI_BT_IT,
66 COLIBRI_IMX8QXP_WIFI_BT_IT,
68 COLIBRI_IMX6ULL_WIFI_BT_IT, /* 40 */
71 COLIBRI_T20_512MB_IT_SETEK,
73 COLIBRI_IMX6ULL_WIFI_BT, /* 45 */
74 APALIS_IMX8QXP_WIFI_BT_IT,
76 APALIS_IMX8QP_WIFI_BT,
78 COLIBRI_IMX8QXP_IT, /* 50 */
79 COLIBRI_IMX8DX_WIFI_BT,
83 VERDIN_IMX8MMQ_WIFI_BT_IT, /* 55 */
84 VERDIN_IMX8MNQ_WIFI_BT,
86 VERDIN_IMX8MPQ_WIFI_BT_IT,
88 VERDIN_IMX8MMDL_WIFI_BT_IT, /* 60 */
90 COLIBRI_IMX6ULL_IT_EMMC,
92 VERDIN_IMX8MPQ_2GB_WIFI_BT_IT,
93 VERDIN_IMX8MPQL_IT, /* 65 */
94 VERDIN_IMX8MPQ_8GB_WIFI_BT,
95 APALIS_IMX8QM_8GB_WIFI_BT_IT,
96 VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN,
101 VERDIN_DEVELOPMENT_BOARD = 156,
105 VERDIN_DSI_TO_HDMI_ADAPTER = 157,
106 VERDIN_DSI_TO_LVDS_ADAPTER = 159,
109 extern const struct toradex_som toradex_modules[];
110 extern const char * const toradex_carrier_boards[];
111 extern bool valid_cfgblock;
112 extern struct toradex_hw tdx_hw_tag;
113 extern struct toradex_hw tdx_car_hw_tag;
114 extern struct toradex_eth_addr tdx_eth_addr;
115 extern u32 tdx_serial;
116 extern u32 tdx_car_serial;
118 int read_tdx_cfg_block(void);
119 int read_tdx_cfg_block_carrier(void);
121 int try_migrate_tdx_cfg_block_carrier(void);
123 void get_mac_from_serial(u32 tdx_serial, struct toradex_eth_addr *eth_addr);
125 #endif /* _TDX_CFG_BLOCK_H */