nrfxlib API 0.1.0
Loading...
Searching...
No Matches
pal.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
12#ifndef __PAL_H__
13#define __PAL_H__
14
15#include "hal_api.h"
16
17#define SOC_BOOT_SUCCESS 0
18#define SOC_BOOT_FAIL 1
19#define SOC_BOOT_ERRORS 2
20
21#ifdef CONFIG_NRF_WIFI_LOW_POWER
22#define SOC_MMAP_ADDR_RPU_PS_CTRL 0x3FFFFC
23#endif /* CONFIG_NRF_WIFI_LOW_POWER */
24
25#define DEFAULT_IMGPCI_VENDOR_ID 0x0700
26#define DEFAULT_IMGPCI_DEVICE_ID PCI_ANY_ID
27#define PCIE_BAR_OFFSET_WLAN_RPU 0x0
28#define PCIE_DMA_MASK 0xFFFFFFFF
29
30
31#define SOC_MMAP_ADDR_OFFSET_PKTRAM_HOST_VIEW 0x0C0000
32#define SOC_MMAP_ADDR_OFFSET_PKTRAM_RPU_VIEW 0x380000
33
34#ifdef RPU_CONFIG_72
35#define SOC_MMAP_ADDR_OFFSET_GRAM_PKD 0xC00000
36#define SOC_MMAP_ADDR_OFFSET_SYSBUS 0xE00000
37#define SOC_MMAP_ADDR_OFFSET_PBUS 0xE40000
38#else
39#define SOC_MMAP_ADDR_OFFSET_GRAM_PKD 0x80000
40#define SOC_MMAP_ADDR_OFFSET_SYSBUS 0x00000
41#define SOC_MMAP_ADDR_OFFSET_PBUS 0x40000
42
43static const unsigned int SOC_MMAP_ADDR_OFFSETS_MCU[] = {
44 0x100000,
45 0x200000
46};
47
48#endif /* RPU_CONFIG_72 */
49
50#define RPU_MCU_CORE_INDIRECT_BASE 0xC0000000
51
52#define NRF_WIFI_FW_LMAC_PATCH_LOC_PRI "img/wlan/nrf_wifi_lmac_patch_pri.bimg"
53#define NRF_WIFI_FW_LMAC_PATCH_LOC_SEC "img/wlan/nrf_wifi_lmac_patch_sec.bin"
54#define NRF_WIFI_FW_UMAC_PATCH_LOC_PRI "img/wlan/nrf_wifi_umac_patch_pri.bimg"
55#define NRF_WIFI_FW_UMAC_PATCH_LOC_SEC "img/wlan/nrf_wifi_umac_patch_sec.bin"
56
61};
62
67};
68
69bool pal_check_rpu_mcu_regions(enum RPU_PROC_TYPE proc, unsigned int addr_val);
70
72{
73 switch (mem_type) {
80 default:
82 }
83}
84
85enum nrf_wifi_status pal_rpu_addr_offset_get(unsigned int rpu_addr,
86 unsigned long *addr_offset,
87 enum RPU_PROC_TYPE proc);
88
89
90#ifdef CONFIG_NRF_WIFI_LOW_POWER
91unsigned long pal_rpu_ps_ctrl_reg_addr_get(void);
92#endif /* CONFIG_NRF_WIFI_LOW_POWER */
93
95 enum nrf_wifi_fw_subtype fw_subtype);
96
97#endif /* __PAL_H__ */
Header containing API declarations for the HAL Layer of the Wi-Fi driver.
HAL_RPU_MEM_TYPE
Definition: hal_mem.h:16
@ HAL_RPU_MEM_TYPE_CORE_SCRATCH
Definition: hal_mem.h:26
@ HAL_RPU_MEM_TYPE_CORE_ROM
Definition: hal_mem.h:22
@ HAL_RPU_MEM_TYPE_CORE_RET
Definition: hal_mem.h:24
RPU_PROC_TYPE
Enumeration of RPU processor types.
Definition: hal_structs.h:32
nrf_wifi_status
The status of an operation performed by the RPU driver.
Definition: osal_structs.h:29
nrf_wifi_fw_type
Definition: pal.h:57
@ NRF_WIFI_FW_TYPE_MAX
Definition: pal.h:60
@ NRF_WIFI_FW_TYPE_LMAC_PATCH
Definition: pal.h:58
@ NRF_WIFI_FW_TYPE_UMAC_PATCH
Definition: pal.h:59
enum nrf_wifi_status pal_rpu_addr_offset_get(unsigned int rpu_addr, unsigned long *addr_offset, enum RPU_PROC_TYPE proc)
static const unsigned int SOC_MMAP_ADDR_OFFSETS_MCU[]
Definition: pal.h:43
bool pal_check_rpu_mcu_regions(enum RPU_PROC_TYPE proc, unsigned int addr_val)
char * pal_ops_get_fw_loc(enum nrf_wifi_fw_type fw_type, enum nrf_wifi_fw_subtype fw_subtype)
nrf_wifi_fw_subtype
Definition: pal.h:63
@ NRF_WIFI_FW_SUBTYPE_MAX
Definition: pal.h:66
@ NRF_WIFI_FW_SUBTYPE_PRI
Definition: pal.h:64
@ NRF_WIFI_FW_SUBTYPE_SEC
Definition: pal.h:65
static enum RPU_MCU_ADDR_REGIONS pal_mem_type_to_region(enum HAL_RPU_MEM_TYPE mem_type)
Definition: pal.h:71
RPU_MCU_ADDR_REGIONS
Definition: rpu_if.h:25
@ RPU_MCU_ADDR_REGION_SCRATCH
Definition: rpu_if.h:28
@ RPU_MCU_ADDR_REGION_ROM
Definition: rpu_if.h:26
@ RPU_MCU_ADDR_REGION_MAX
Definition: rpu_if.h:29
@ RPU_MCU_ADDR_REGION_RETENTION
Definition: rpu_if.h:27