1 /* 2 * Copyright (c) 2024 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 /** 8 * @file 9 * @addtogroup nrf_wifi_fw_if Wi-Fi driver and firmware interface 10 * @{ 11 * @brief nRF70 patch version. 12 */ 13 #ifndef _PATCH_INFO_H 14 #define _PATCH_INFO_H 15 16 #include "common/pack_def.h" 17 18 #ifndef BIT 19 #define BIT(x) (1 << (x)) 20 #endif /* BIT */ 21 22 #define NRF_WIFI_PATCH_SIGNATURE 0xDEAD1EAF 23 /* SHA256 hash length */ 24 #define NRF_WIFI_PATCH_HASH_LEN 32 25 /* 2 - LMAC and 2 - UMAC */ 26 #define NRF_WIFI_PATCH_NUM_IMAGES (2 + 2) 27 28 enum nrf70_feature_flags { 29 NRF70_FEAT_SYSTEM_MODE = BIT(0), 30 NRF70_FEAT_RADIO_TEST = BIT(1), 31 NRF70_FEAT_SCAN_ONLY = BIT(2), 32 NRF70_FEAT_SYSTEM_WITH_RAW_MODES = BIT(3), 33 NRF70_FEAT_OFFLOADED_RAW_TX = BIT(4), 34 }; 35 36 enum nrf70_image_ids { 37 NRF70_IMAGE_UMAC_PRI = 0, 38 NRF70_IMAGE_UMAC_SEC, 39 NRF70_IMAGE_LMAC_PRI, 40 NRF70_IMAGE_LMAC_SEC, 41 }; 42 43 struct nrf70_fw_image { 44 unsigned int type; 45 unsigned int len; 46 /* Data follows */ 47 unsigned char data[]; 48 } __NRF_WIFI_PKD; 49 50 struct nrf70_fw_image_info { 51 unsigned int signature; 52 unsigned int num_images; 53 unsigned int version; 54 unsigned int feature_flags; 55 unsigned int len; 56 /* Protects against image corruption */ 57 unsigned char hash[NRF_WIFI_PATCH_HASH_LEN]; 58 unsigned char data[]; 59 } __NRF_WIFI_PKD; 60 61 62 #define RPU_FAMILY (1) 63 #define RPU_MAJOR_VERSION (2) 64 #define RPU_MINOR_VERSION (13) 65 #define RPU_PATCH_VERSION (21) 66 67 /** 68 * @} 69 */ 70 #endif /* _PATCH_INFO_H */ 71