This module contains WILC ASIC specific internal APIs.
Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.
#include "../../common/include/nm_common.h"
Data Structures | |
struct | tstrM2mRev |
Macros | |
#define | BOOTROM_REG (0xc000c) |
#define | EFUSED_MAC(value) (value & 0xffff0000) |
#define | GET_CHIPID() nmi_get_chipid() |
#define | IRG_FLAGS_OFFSET 0 |
#define | ISNMC1000(id) (((id & 0xfffff000) == 0x100000) ? 1 : 0) |
#define | ISNMC1500(id) (((id & 0xfffff000) == 0x150000) ? 1 : 0) |
#define | M2M_FINISH_BOOT_ROM 0x10add09eUL |
#define | M2M_FINISH_INIT_STATE 0x02532636UL |
#define | M2M_START_FIRMWARE 0xef522f61UL |
#define | M2M_START_PS_FIRMWARE 0x94992610UL |
#define | M2M_WAIT_FOR_HOST_REG (0x207bc) |
#define | NMI_CHIPID (NMI_PERIPH_REG_BASE) |
#define | NMI_GP_REG_1 0x14a0 |
#define | NMI_PERIPH_REG_BASE 0x1000 |
#define | NMI_REV_REG (0x207ac) |
#define | NMI_STATE_REG (0x108c) |
#define | NMI_VMM_BASE 0x150000 |
#define | NMI_VMM_CORE_CFG (NMI_VMM_BASE+0x14) |
#define | REV(id) ( ((id) & 0x00000fff ) ) |
#define | REV_B0 (0x2B0) |
#define | rNMI_GP_REG_0 (0x149c) |
#define | rPA_CONTROL (WIFI_PERIPH_BASE+0x9804) |
#define | WIFI_PERIPH_BASE 0x00000000 |
Functions | |
sint8 | chip_deinit (void) |
void | chip_idle (void) |
sint8 | chip_reset (void) |
sint8 | chip_reset_and_cpu_halt (void) |
sint8 | chip_sleep (void) |
sint8 | chip_wake (void) |
sint8 | cpu_start (void) |
sint8 | enable_interrupts (void) |
sint8 | firmware_download (void) |
sint8 | get_gpio_val (uint8 gpio, uint8 *val) |
sint8 | is_valid_gpio (uint8 gpio) |
uint32 | nmi_get_chipid (void) |
sint8 | nmi_get_mac_address (uint8 *pu8MacAddr) |
sint8 | nmi_get_otp_mac_address (uint8 *pu8MacAddr, uint8 *pu8IsValid) |
uint32 | nmi_get_rfrevid (void) |
void | nmi_set_sys_clk_src_to_xo (void) |
void | nmi_update_pll (void) |
sint8 | pullup_ctrl (uint32 pinmask, uint8 enable) |
void | restore_pmu_settings_after_global_reset (void) |
sint8 | set_gpio_dir (uint8 gpio, uint8 dir) |
sint8 | set_gpio_val (uint8 gpio, uint8 val) |
sint8 | wait_for_bootrom (void) |
sint8 | wait_for_firmware_start (void) |
#define BOOTROM_REG (0xc000c) |
#define EFUSED_MAC | ( | value | ) | (value & 0xffff0000) |
Referenced by nmi_get_otp_mac_address().
#define GET_CHIPID | ( | ) | nmi_get_chipid() |
#define IRG_FLAGS_OFFSET 0 |
Referenced by hif_isr().
#define ISNMC1000 | ( | id | ) | (((id & 0xfffff000) == 0x100000) ? 1 : 0) |
#define ISNMC1500 | ( | id | ) | (((id & 0xfffff000) == 0x150000) ? 1 : 0) |
#define M2M_FINISH_BOOT_ROM 0x10add09eUL |
#define M2M_FINISH_INIT_STATE 0x02532636UL |
Referenced by wait_for_firmware_start().
#define M2M_START_FIRMWARE 0xef522f61UL |
#define M2M_START_PS_FIRMWARE 0x94992610UL |
#define M2M_WAIT_FOR_HOST_REG (0x207bc) |
#define NMI_CHIPID (NMI_PERIPH_REG_BASE) |
#define NMI_GP_REG_1 0x14a0 |
#define NMI_PERIPH_REG_BASE 0x1000 |
#define NMI_REV_REG (0x207ac) |
Referenced by cpu_start(), and nm_get_firmware_info().
#define NMI_STATE_REG (0x108c) |
Referenced by cpu_start(), and wait_for_firmware_start().
#define NMI_VMM_BASE 0x150000 |
#define NMI_VMM_CORE_CFG (NMI_VMM_BASE+0x14) |
Referenced by cpu_start().
#define REV | ( | id | ) | ( ((id) & 0x00000fff ) ) |
#define REV_B0 (0x2B0) |
#define rNMI_GP_REG_0 (0x149c) |
Referenced by nmi_get_mac_address(), and nmi_get_otp_mac_address().
#define rPA_CONTROL (WIFI_PERIPH_BASE+0x9804) |
#define WIFI_PERIPH_BASE 0x00000000 |
sint8 chip_deinit | ( | void | ) |
stop the firmware, need a re-download
References M2M_DBG, M2M_ERR, M2M_SUCCESS, nm_read_reg_with_ret(), nm_write_reg(), and NMI_GLB_RESET_0.
Referenced by nm_drv_deinit().
void chip_idle | ( | void | ) |
References nm_read_reg_with_ret(), and nm_write_reg().
sint8 chip_reset | ( | void | ) |
sint8 chip_reset_and_cpu_halt | ( | void | ) |
sint8 chip_sleep | ( | void | ) |
References M2M_ERR, M2M_SUCCESS, nm_read_reg_with_ret(), and nm_write_reg().
Referenced by hif_chip_sleep().
sint8 chip_wake | ( | void | ) |
References M2M_ERR, M2M_ERR_TIME_OUT, M2M_SUCCESS, nm_bus_reset(), nm_read_reg_with_ret(), nm_write_reg(), and WAKUP_TRAILS_TIMEOUT.
Referenced by hif_chip_wake().
sint8 cpu_start | ( | void | ) |
reset regs
Go...
References M2M_ERR, M2M_ERR_BUS_FAIL, M2M_SUCCESS, nm_bsp_sleep(), nm_read_reg_with_ret(), nm_write_reg(), NMI_GLB_RESET_0, NMI_REV_REG, NMI_STATE_REG, and NMI_VMM_CORE_CFG.
Referenced by nm_drv_init().
sint8 enable_interrupts | ( | void | ) |
interrupt pin mux select
interrupt enable
References M2M_ERR_BUS_FAIL, M2M_SUCCESS, nm_read_reg_with_ret(), nm_write_reg(), NMI_INTR_ENABLE, and NMI_PIN_MUX_0.
Referenced by nm_drv_init().
sint8 firmware_download | ( | void | ) |
References M2M_DBG, m2m_memcpy(), M2M_SUCCESS, nm_read_reg_with_ret(), nm_write_block(), and nm_write_reg().
Referenced by nm_drv_init().
References M2M_SUCCESS, and nm_read_reg_with_ret().
Referenced by gpio_ioctl().
Referenced by m2m_wifi_set_antenna_mode().
uint32 nmi_get_chipid | ( | void | ) |
Referenced by atCmd_ChipInfo_Handler(), nm_drv_init(), and nm_get_firmware_info().
References M2M_SUCCESS, nm_read_block(), nm_read_reg_with_ret(), and rNMI_GP_REG_0.
Referenced by m2m_wifi_get_mac_address().
References EFUSED_MAC, M2M_DBG, m2m_memset(), M2M_SUCCESS, nm_read_block(), nm_read_reg_with_ret(), and rNMI_GP_REG_0.
Referenced by m2m_wifi_get_otp_mac_address().
uint32 nmi_get_rfrevid | ( | void | ) |
References M2M_SUCCESS, and nm_read_reg_with_ret().
Referenced by atCmd_ChipInfo_Handler().
void nmi_set_sys_clk_src_to_xo | ( | void | ) |
References nm_read_reg(), nm_write_reg(), and nmi_update_pll().
Referenced by chip_reset().
void nmi_update_pll | ( | void | ) |
References nm_read_reg(), and nm_write_reg().
Referenced by nmi_set_sys_clk_src_to_xo().
References M2M_ERR, M2M_SUCCESS, nm_read_reg_with_ret(), and nm_write_reg().
Referenced by m2m_periph_pullup_ctrl().
void restore_pmu_settings_after_global_reset | ( | void | ) |
References nm_write_reg().
Referenced by chip_reset().
References M2M_SUCCESS, nm_read_reg_with_ret(), and nm_write_reg().
Referenced by gpio_ioctl().
References M2M_SUCCESS, nm_read_reg_with_ret(), and nm_write_reg().
Referenced by gpio_ioctl().
sint8 wait_for_bootrom | ( | void | ) |
Referenced by nm_drv_init().
sint8 wait_for_firmware_start | ( | void | ) |
References M2M_DBG, M2M_ERR_INIT, M2M_FINISH_INIT_STATE, M2M_SUCCESS, nm_bsp_sleep(), nm_read_reg(), nm_write_reg(), NMI_STATE_REG, and TIMEOUT.
Referenced by nm_drv_init().