18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: ISC */ 28c2ecf20Sopenharmony_ci/* Copyright (c) 2015 Qualcomm Atheros, Inc. 38c2ecf20Sopenharmony_ci * Copyright (c) 2018, The Linux Foundation. All rights reserved. 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci/* This file contains the definitions for the boot loader 78c2ecf20Sopenharmony_ci * for the Qualcomm "Sparrow" 60 Gigabit wireless solution. 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci#ifndef BOOT_LOADER_EXPORT_H_ 108c2ecf20Sopenharmony_ci#define BOOT_LOADER_EXPORT_H_ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_cistruct bl_dedicated_registers_v1 { 138c2ecf20Sopenharmony_ci __le32 boot_loader_ready; /* 0x880A3C driver will poll 148c2ecf20Sopenharmony_ci * this Dword until BL will 158c2ecf20Sopenharmony_ci * set it to 1 (initial value 168c2ecf20Sopenharmony_ci * should be 0) 178c2ecf20Sopenharmony_ci */ 188c2ecf20Sopenharmony_ci __le32 boot_loader_struct_version; /* 0x880A40 BL struct ver. */ 198c2ecf20Sopenharmony_ci __le16 rf_type; /* 0x880A44 connected RF ID */ 208c2ecf20Sopenharmony_ci __le16 rf_status; /* 0x880A46 RF status, 218c2ecf20Sopenharmony_ci * 0 is OK else error 228c2ecf20Sopenharmony_ci */ 238c2ecf20Sopenharmony_ci __le32 baseband_type; /* 0x880A48 board type ID */ 248c2ecf20Sopenharmony_ci u8 mac_address[6]; /* 0x880A4c BL mac address */ 258c2ecf20Sopenharmony_ci u8 bl_version_major; /* 0x880A52 BL ver. major */ 268c2ecf20Sopenharmony_ci u8 bl_version_minor; /* 0x880A53 BL ver. minor */ 278c2ecf20Sopenharmony_ci __le16 bl_version_subminor; /* 0x880A54 BL ver. subminor */ 288c2ecf20Sopenharmony_ci __le16 bl_version_build; /* 0x880A56 BL ver. build */ 298c2ecf20Sopenharmony_ci /* valid only for version 2 and above */ 308c2ecf20Sopenharmony_ci __le32 bl_assert_code; /* 0x880A58 BL Assert code */ 318c2ecf20Sopenharmony_ci __le32 bl_assert_blink; /* 0x880A5C BL Assert Branch */ 328c2ecf20Sopenharmony_ci __le32 bl_shutdown_handshake; /* 0x880A60 BL cleaner shutdown */ 338c2ecf20Sopenharmony_ci __le32 bl_reserved[21]; /* 0x880A64 - 0x880AB4 */ 348c2ecf20Sopenharmony_ci __le32 bl_magic_number; /* 0x880AB8 BL Magic number */ 358c2ecf20Sopenharmony_ci} __packed; 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci/* the following struct is the version 0 struct */ 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_cistruct bl_dedicated_registers_v0 { 408c2ecf20Sopenharmony_ci __le32 boot_loader_ready; /* 0x880A3C driver will poll 418c2ecf20Sopenharmony_ci * this Dword until BL will 428c2ecf20Sopenharmony_ci * set it to 1 (initial value 438c2ecf20Sopenharmony_ci * should be 0) 448c2ecf20Sopenharmony_ci */ 458c2ecf20Sopenharmony_ci#define BL_READY (1) /* ready indication */ 468c2ecf20Sopenharmony_ci __le32 boot_loader_struct_version; /* 0x880A40 BL struct ver. */ 478c2ecf20Sopenharmony_ci __le32 rf_type; /* 0x880A44 connected RF ID */ 488c2ecf20Sopenharmony_ci __le32 baseband_type; /* 0x880A48 board type ID */ 498c2ecf20Sopenharmony_ci u8 mac_address[6]; /* 0x880A4c BL mac address */ 508c2ecf20Sopenharmony_ci} __packed; 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci/* bits for bl_shutdown_handshake */ 538c2ecf20Sopenharmony_ci#define BL_SHUTDOWN_HS_GRTD BIT(0) 548c2ecf20Sopenharmony_ci#define BL_SHUTDOWN_HS_RTD BIT(1) 558c2ecf20Sopenharmony_ci#define BL_SHUTDOWN_HS_PROT_VER(x) WIL_GET_BITS(x, 28, 31) 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#endif /* BOOT_LOADER_EXPORT_H_ */ 58