Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2016 Toradex, Inc. |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 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, |
Marcel Ziswiler | 2658c8e | 2019-04-09 17:25:32 +0200 | [diff] [blame] | 28 | COLIBRI_PXA310, /* 5 */ |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 29 | COLIBRI_PXA320_IT, |
| 30 | COLIBRI_PXA300_XT, |
| 31 | COLIBRI_PXA270_312MHZ, |
| 32 | COLIBRI_PXA270_520MHZ, |
Marcel Ziswiler | 2658c8e | 2019-04-09 17:25:32 +0200 | [diff] [blame] | 33 | COLIBRI_VF50, /* 10 */ |
| 34 | COLIBRI_VF61, /* not currently on sale */ |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 35 | COLIBRI_VF61_IT, |
| 36 | COLIBRI_VF50_IT, |
| 37 | COLIBRI_IMX6S, |
Marcel Ziswiler | 2658c8e | 2019-04-09 17:25:32 +0200 | [diff] [blame] | 38 | COLIBRI_IMX6DL, /* 15 */ |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 39 | COLIBRI_IMX6S_IT, |
| 40 | COLIBRI_IMX6DL_IT, |
Marcel Ziswiler | 2658c8e | 2019-04-09 17:25:32 +0200 | [diff] [blame] | 41 | /* 18 */ |
| 42 | /* 19 */ |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 43 | COLIBRI_T20_256MB = 20, |
| 44 | COLIBRI_T20_512MB, |
| 45 | COLIBRI_T20_512MB_IT, |
| 46 | COLIBRI_T30, |
| 47 | COLIBRI_T20_256MB_IT, |
Marcel Ziswiler | 2658c8e | 2019-04-09 17:25:32 +0200 | [diff] [blame] | 48 | APALIS_T30_2GB, /* 25 */ |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 49 | APALIS_T30_1GB, |
| 50 | APALIS_IMX6Q, |
| 51 | APALIS_IMX6Q_IT, |
| 52 | APALIS_IMX6D, |
Marcel Ziswiler | 2658c8e | 2019-04-09 17:25:32 +0200 | [diff] [blame] | 53 | COLIBRI_T30_IT, /* 30 */ |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 54 | APALIS_T30_IT, |
| 55 | COLIBRI_IMX7S, |
| 56 | COLIBRI_IMX7D, |
| 57 | APALIS_TK1_2GB, |
Marcel Ziswiler | 2658c8e | 2019-04-09 17:25:32 +0200 | [diff] [blame] | 58 | APALIS_IMX6D_IT, /* 35 */ |
Stefan Agner | 01875e9 | 2018-05-30 19:01:47 +0200 | [diff] [blame] | 59 | COLIBRI_IMX6ULL, |
Marcel Ziswiler | 2658c8e | 2019-04-09 17:25:32 +0200 | [diff] [blame] | 60 | APALIS_IMX8QM_WIFI_BT_IT, |
| 61 | COLIBRI_IMX8QXP_WIFI_BT_IT, |
Stefan Agner | 01875e9 | 2018-05-30 19:01:47 +0200 | [diff] [blame] | 62 | COLIBRI_IMX7D_EMMC, |
| 63 | COLIBRI_IMX6ULL_WIFI_BT_IT, /* 40 */ |
| 64 | COLIBRI_IMX7D_EPDC, |
Marcel Ziswiler | 2658c8e | 2019-04-09 17:25:32 +0200 | [diff] [blame] | 65 | APALIS_TK1_4GB, /* not currently on sale */ |
Gerard Salvatella | 5ab3b1d | 2019-04-09 17:24:07 +0200 | [diff] [blame] | 66 | COLIBRI_T20_512MB_IT_SETEK, |
| 67 | COLIBRI_IMX6ULL_IT, |
| 68 | COLIBRI_IMX6ULL_WIFI_BT, /* 45 */ |
Marcel Ziswiler | f60ffec | 2019-04-09 17:25:33 +0200 | [diff] [blame^] | 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, |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 76 | }; |
| 77 | |
| 78 | extern const char * const toradex_modules[]; |
| 79 | extern bool valid_cfgblock; |
| 80 | extern struct toradex_hw tdx_hw_tag; |
| 81 | extern struct toradex_eth_addr tdx_eth_addr; |
| 82 | extern u32 tdx_serial; |
| 83 | |
| 84 | int read_tdx_cfg_block(void); |
| 85 | |
| 86 | #endif /* _TDX_CFG_BLOCK_H */ |