wireless/bcm43xxx: add support of bcm43013 chip
Reference: https://www.broadcom.cn/bcm43013 Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
7e1f906b74
commit
c7fd1a113f
@ -11,6 +11,12 @@ config IEEE80211_BROADCOM_HAVE_CLM
|
||||
bool
|
||||
default n
|
||||
|
||||
config IEEE80211_BROADCOM_BCM43013
|
||||
bool "Broadcom 43013 chip support"
|
||||
depends on IEEE80211_BROADCOM_FULLMAC
|
||||
default n
|
||||
select IEEE80211_BROADCOM_HAVE_CLM
|
||||
|
||||
config IEEE80211_BROADCOM_BCM43362
|
||||
bool "Broadcom 43362 chip support"
|
||||
depends on IEEE80211_BROADCOM_FULLMAC
|
||||
@ -31,7 +37,8 @@ config IEEE80211_BROADCOM_BCM43455
|
||||
config IEEE80211_BROADCOM_FWFILES
|
||||
bool "Firmware files"
|
||||
default y
|
||||
depends on IEEE80211_BROADCOM_BCM43362 || \
|
||||
depends on IEEE80211_BROADCOM_BCM43013 || \
|
||||
IEEE80211_BROADCOM_BCM43362 || \
|
||||
IEEE80211_BROADCOM_BCM43438 || \
|
||||
IEEE80211_BROADCOM_BCM43455
|
||||
---help---
|
||||
|
@ -33,6 +33,10 @@ ifeq ($(CONFIG_IEEE80211_BROADCOM_FULLMAC_SDIO),y)
|
||||
CSRCS += bcmf_sdpcm.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_IEEE80211_BROADCOM_BCM43013),y)
|
||||
CSRCS += bcmf_chip_43013.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_IEEE80211_BROADCOM_BCM43362),y)
|
||||
CSRCS += bcmf_chip_43362.c
|
||||
endif
|
||||
|
83
drivers/wireless/ieee80211/bcm43xxx/bcmf_chip_43013.c
Normal file
83
drivers/wireless/ieee80211/bcm43xxx/bcmf_chip_43013.c
Normal file
@ -0,0 +1,83 @@
|
||||
/****************************************************************************
|
||||
* drivers/wireless/ieee80211/bcm43xxx/bcmf_chip_43013.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "bcmf_sdio.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define WRAPPER_REGISTER_OFFSET 0x100000
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
extern const char bcm43013_nvram_image[];
|
||||
extern const unsigned int bcm43013_nvram_image_len;
|
||||
|
||||
#ifndef CONFIG_IEEE80211_BROADCOM_FWFILES
|
||||
extern const uint8_t bcm43013_firmware_image[];
|
||||
extern const unsigned int bcm43013_firmware_image_len;
|
||||
#endif
|
||||
|
||||
const struct bcmf_sdio_chip bcmf_43013_config_sdio =
|
||||
{
|
||||
/* General chip stats */
|
||||
|
||||
.ram_base = 0,
|
||||
.ram_size = 0xa0000,
|
||||
|
||||
/* Backplane architecture */
|
||||
|
||||
.core_base =
|
||||
{
|
||||
[CHIPCOMMON_CORE_ID] = 0x18000000, /* Chipcommon core register base */
|
||||
[DOT11MAC_CORE_ID] = 0x18001000, /* dot11mac core register base */
|
||||
[SDIOD_CORE_ID] = 0x18002000, /* SDIOD Device core register base */
|
||||
[WLAN_ARMCM3_CORE_ID] = 0x18003000 + /* ARMCM3 core register base */
|
||||
WRAPPER_REGISTER_OFFSET,
|
||||
[SOCSRAM_CORE_ID] = 0x18004000 + /* SOCSRAM core register base */
|
||||
WRAPPER_REGISTER_OFFSET
|
||||
},
|
||||
|
||||
/* Firmware images */
|
||||
|
||||
/* TODO find something smarter than using image_len references */
|
||||
|
||||
.nvram_image = (FAR uint8_t *)bcm43013_nvram_image,
|
||||
.nvram_image_size = (FAR unsigned int *)&bcm43013_nvram_image_len,
|
||||
|
||||
#ifndef CONFIG_IEEE80211_BROADCOM_FWFILES
|
||||
.firmware_image = (FAR uint8_t *)bcm43013_firmware_image,
|
||||
.firmware_image_size = (FAR unsigned int *)&bcm43013_firmware_image_len,
|
||||
#endif
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
@ -439,11 +439,13 @@ int bcmf_core_upload_firmware(FAR struct bcmf_sdio_dev_s *sbus)
|
||||
|
||||
switch (sbus->cur_chip_id)
|
||||
{
|
||||
#if defined(CONFIG_IEEE80211_BROADCOM_BCM43362) || \
|
||||
#if defined(CONFIG_IEEE80211_BROADCOM_BCM43013) || \
|
||||
defined(CONFIG_IEEE80211_BROADCOM_BCM43362) || \
|
||||
defined(CONFIG_IEEE80211_BROADCOM_BCM43438)
|
||||
|
||||
case SDIO_DEVICE_ID_BROADCOM_43362:
|
||||
case SDIO_DEVICE_ID_BROADCOM_43430:
|
||||
case SDIO_DEVICE_ID_BROADCOM_43013:
|
||||
/* Disable ARMCM3 core and reset SOCRAM core to set device in
|
||||
* firmware upload mode
|
||||
*/
|
||||
@ -521,11 +523,13 @@ int bcmf_core_upload_firmware(FAR struct bcmf_sdio_dev_s *sbus)
|
||||
|
||||
switch (sbus->cur_chip_id)
|
||||
{
|
||||
#if defined(CONFIG_IEEE80211_BROADCOM_BCM43362) || \
|
||||
#if defined(CONFIG_IEEE80211_BROADCOM_BCM43013) || \
|
||||
defined(CONFIG_IEEE80211_BROADCOM_BCM43362) || \
|
||||
defined(CONFIG_IEEE80211_BROADCOM_BCM43438)
|
||||
|
||||
case SDIO_DEVICE_ID_BROADCOM_43362:
|
||||
case SDIO_DEVICE_ID_BROADCOM_43430:
|
||||
case SDIO_DEVICE_ID_BROADCOM_43013:
|
||||
up_mdelay(10);
|
||||
bcmf_core_reset(sbus, WLAN_ARMCM3_CORE_ID, 0, 0, 0);
|
||||
|
||||
|
@ -75,6 +75,9 @@
|
||||
|
||||
/* Supported chip configurations */
|
||||
|
||||
#ifdef CONFIG_IEEE80211_BROADCOM_BCM43013
|
||||
extern const struct bcmf_sdio_chip bcmf_43013_config_sdio;
|
||||
#endif
|
||||
#ifdef CONFIG_IEEE80211_BROADCOM_BCM43362
|
||||
extern const struct bcmf_sdio_chip bcmf_43362_config_sdio;
|
||||
#endif
|
||||
@ -813,6 +816,13 @@ int bcmf_chipinitialize(FAR struct bcmf_sdio_dev_s *sbus)
|
||||
|
||||
switch (chipid)
|
||||
{
|
||||
#ifdef CONFIG_IEEE80211_BROADCOM_BCM43013
|
||||
case SDIO_DEVICE_ID_BROADCOM_43013:
|
||||
wlinfo("bcm43013 chip detected\n");
|
||||
sbus->chip = (struct bcmf_sdio_chip *)&bcmf_43013_config_sdio;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IEEE80211_BROADCOM_BCM43362
|
||||
case SDIO_DEVICE_ID_BROADCOM_43362:
|
||||
wlinfo("bcm43362 chip detected\n");
|
||||
|
@ -36,6 +36,7 @@
|
||||
|
||||
/* SDIO device ID */
|
||||
|
||||
#define SDIO_DEVICE_ID_BROADCOM_43013 43013
|
||||
#define SDIO_DEVICE_ID_BROADCOM_43143 43143
|
||||
#define SDIO_DEVICE_ID_BROADCOM_43241 0x4324
|
||||
#define SDIO_DEVICE_ID_BROADCOM_4329 0x4329
|
||||
@ -85,7 +86,8 @@ enum
|
||||
CHIPCOMMON_CORE_ID = 0,
|
||||
DOT11MAC_CORE_ID,
|
||||
SDIOD_CORE_ID,
|
||||
#if defined(CONFIG_IEEE80211_BROADCOM_BCM43362) || \
|
||||
#if defined(CONFIG_IEEE80211_BROADCOM_BCM43013) || \
|
||||
defined(CONFIG_IEEE80211_BROADCOM_BCM43362) || \
|
||||
defined(CONFIG_IEEE80211_BROADCOM_BCM43438)
|
||||
WLAN_ARMCM3_CORE_ID,
|
||||
SOCSRAM_CORE_ID,
|
||||
|
Loading…
Reference in New Issue
Block a user