精华内容
下载资源
问答
  • AP6212 驱动

    2017-09-02 22:06:56
    ( AP6212新版软件更改方法.zip ) ( AP6212新版软件更改方法.zip ) ( AP6212新版软件更改方法.zip ) ( AP6212新版软件更改方法.zip )
  • AP6212固件

    2018-05-09 13:59:58
    AP6212模块采用的是博通BCM43438的芯片,在WiFi模块加载时需要下载特定的固件才能正常工作
  • 调通sina33下的AP6212A0(WIFI+BT) 大文实验室/大文哥 壹捌陆捌零陆捌捌陆捌贰 wb4916 AT qq.com 完成时间:2017/6/28 12:13 版本:V1.3 本文参照: 《A33 wifi移植说明书.pdf》 还有就是全志R16平台的parrotv...
  • AP6212各个版本固件.zip

    2020-07-20 13:51:54
    AP6212 版本固件
  • AP6212应用参考电路

    2018-09-01 16:21:27
    AP6212有三个版本,应用集成广泛,分享模块应用参考电路
  • AP6212 WFI吞吐量测试
  • ap6212移植

    万次阅读 热门讨论 2015-07-03 11:32:09
    1.ap6212 功能:wifi station、softap、wifi direct、bt、 接口类型:sdio、uart 调试方案:octopus-f1,下面以A83T平台android4.4为例说明ap6212的移植过程 2、软硬件设计部份差异说明 (1) ap6212采用的是...

    1.ap6212

    功能:wifi stationsoftapwifi directbt

    接口类型:sdiouart

    调试方案:octopus-f1,下面以A83T平台android4.4为例说明ap6212的移植过程

    2、软硬件设计部份差异说明

    (1) ap6212采用的是26M晶振,A框去掉,即不需要反相器;

    (2) ap6212硬件上第29悬空,与ap6210不同

    (3)ap6212必须采用bcmhd新驱动1.201.34.x版本,如附件;

    (4)ap6212 firmware部分如附件请覆盖至\hardware\broadcom\wlan\bcmdhd\firmware

    3内核配置

    3.1 .config

    .config中需要配置如下选项,将wifi driver编译进内核

    CONFIG_BCMDHD = y

    CONFIG_BCMDHD_OOB = y

    同时把ap6212驱动代码加到/android/hardware/broadcom/wlan/bcmdhd/firmware路径下。

    3.2 BoardConfig.mk

    BoardConfig.mk文件决定android要加载哪一款wifi模组、是否开启蓝牙和使用哪一款蓝牙模组,要配置成使用ap6212模组并启用wifi和蓝牙功能需要把BoardConfig.mk文件的相关代码修改成如下。

    # wifi and bt configuration

    # 1. Wifi Configuration

    #BOARD_WIFI_VENDOR := realtek

    BOARD_WIFI_VENDOR := broadcom

    # 1.1 broadcom wifi support

    ifeq ($(BOARD_WIFI_VENDOR), broadcom)

        BOARD_WPA_SUPPLICANT_DRIVER := NL80211

        WPA_SUPPLICANT_VERSION      := VER_0_8_X

        BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd

        BOARD_HOSTAPD_DRIVER        := NL80211

        BOARD_HOSTAPD_PRIVATE_LIB   := lib_driver_cmd_bcmdhd

        BOARD_WLAN_DEVICE           := bcmdhd

        WIFI_DRIVER_FW_PATH_PARAM   := "/sys/module/bcmdhd/parameters/firmware_path"

        BOARD_USR_WIFI := ap6212

        include hardware/broadcom/wlan/bcmdhd/firmware/$(BOARD_USR_WIFI)/device-bcm.mk

    endif

    # 2. Bluetooth Configuration

    # make sure BOARD_HAVE_BLUETOOTH is true for every bt vendor

    BOARD_HAVE_BLUETOOTH := true

    BOARD_HAVE_BLUETOOTH_BCM := true

    #BOARD_HAVE_BLUETOOTH_RTK := true

    #BLUETOOTH_HCI_USE_RTK_H5 := true

    BOARD_HAVE_BLUETOOTH_NAME := ap6212

    BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/softwinner/tulip-t1/bluetooth/

    说明:

    1、“#”符号起注释作用;

    2、“BOARD_USR_WIFI := AP6210”宏指明wifi选用ap6212;

    3、“BOARD_HAVE_BLUETOOTH := true”宏指明使用蓝牙;

    4、“BOARD_HAVE_BLUETOOTH_BCM := true”宏指定蓝牙厂商为Broadcom

    5、“BOARD_HAVE_BLUETOOTH_NAME := ap6212”宏指明蓝牙模组名字;

    6、“BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR :=  device/softwinner/tulip-t1/bluetooth/”宏指明配置文件bdroid_buildcfg.h路径;

    注意:

    1、需注释掉#BOARD_HAVE_BLUETOOTH_RTK := true

    2、若不需要蓝牙功能只需要把相关宏注释掉就可以。

    3OARD_USR_WIFI的大小写根据你在3.1中命名规则来写。

    3.3 init.sun8i.rc

    这部分只要注意两点:

    注意:

    1若init.sun50iw1p1.rc文件无修改后代码,可手动添加;

    2、需注释掉realtek wifibluetooth相关内容。

    3.3 octopus-f1

    octopus-f1.mk文件会在编译时拷贝指定文件到特定目录下,使用ap6212需要确认如下修改:

    DEVICE_PACKAGE_OVERLAYS := device/softwinner/octopus-perf/overlay \

                               $(DEVICE_PACKAGE_OVERLAYS)

    PRODUCT_PACKAGES += gatord

    PRODUCT_PACKAGES += \

        ESFileExplorer \

        VideoPlayer \

        Bluetooth

    PRODUCT_PACKAGES += \

        gps.exdroid \

    PRODUCT_COPY_FILES += \

            device/softwinner/octopus-perf/configs/gps.conf:system/etc/gps.conf

    PRODUCT_COPY_FILES += \

        device/softwinner/octopus-perf/kernel:kernel \

        device/softwinner/octopus-perf/fstab.sun8i:root/fstab.sun8i \

        device/softwinner/octopus-perf/init.sun8i.rc:root/init.sun8i.rc \

        device/softwinner/octopus-perf/init.recovery.sun8i.rc:root/init.recovery.sun8i.rc \

        device/softwinner/octopus-perf/ueventd.sun8i.rc:root/ueventd.sun8i.rc \

        device/softwinner/octopus-perf/recovery.fstab:recovery.fstab \

        device/softwinner/octopus-perf/modules/modules/nand.ko:root/nand.ko \

        device/softwinner/octopus-perf/modules/modules/sunxi_tr.ko:root/sunxi_tr.ko \

        device/softwinner/octopus-perf/modules/modules/disp.ko:root/disp.ko \

        device/softwinner/octopus-perf/modules/modules/sw-device.ko:obj/sw-device.ko \

    PRODUCT_COPY_FILES += \

        device/softwinner/octopus-perf/configs/tablet_core_hardware.xml:system/etc/permissions/tablet_core_hardware.xml

    PRODUCT_COPY_FILES += \

        device/softwinner/octopus-perf/configs/camera.cfg:system/etc/camera.cfg \

        device/softwinner/octopus-perf/configs/cfg-Gallery2.xml:system/etc/cfg-Gallery2.xml \

        device/softwinner/octopus-perf/configs/gsensor.cfg:system/usr/gsensor.cfg \

        device/softwinner/octopus-perf/configs/media_profiles.xml:system/etc/media_profiles.xml \

        device/softwinner/octopus-perf/configs/sunxi-keyboard.kl:system/usr/keylayout/sunxi-keyboard.kl \

            device/softwinner/octopus-perf/configs/sunxi-ir.kl:system/usr/keylayout/sunxi-ir.kl \

        device/softwinner/octopus-perf/configs/tp.idc:system/usr/idc/tp.idc

    PRODUCT_COPY_FILES += \

        frameworks/native/data/etc/android.hardware.touchscreen.multitouch.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.xml \

        frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \

        frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml

    PRODUCT_COPY_FILES += \

        device/softwinner/octopus-perf/bluetooth/bt_vendor.conf:system/etc/bluetooth/bt_vendor.conf

    PRODUCT_COPY_FILES += \

        device/softwinner/octopus-perf/bluetooth/bt_vendor.conf:system/etc/bluetooth/bt_vendor.conf

    PRODUCT_COPY_FILES += \

        frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml   \

        frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml

    # Low mem(memory <= 512M) device should not copy android.software.managed_users.xml

    PRODUCT_COPY_FILES += \

        frameworks/native/data/etc/android.software.managed_users.xml:system/etc/permissions/android.software.managed_users.xml

    PRODUCT_COPY_FILES += \

            device/softwinner/octopus-perf/media/bootanimation.zip:system/media/bootanimation.zip \

    #camera config for camera detector

    PRODUCT_COPY_FILES += \

            device/softwinner/octopus-perf/hawkview/sensor_list_cfg.ini:system/etc/hawkview/sensor_list_cfg.ini

    # Radio Packages and Configuration Flie

    $(call inherit-product, device/softwinner/common/rild/radio_common.mk)

    #$(call inherit-product, device/softwinner/common/ril_modem/huawei/mu509/huawei_mu509.mk)

    #$(call inherit-product, device/softwinner/common/ril_modem/Oviphone/em55/oviphone_em55.mk)

    #sensor

    PRODUCT_COPY_FILES += \

            device/softwinner/octopus-perf/sensor.sh:system/bin/sensor.sh

    注意:

    1android.hardware.wifi.xml拷贝到指定目录,以使设置界面显示wifi

    2android.hardware.wifi.direct.xml是在wifi设备中显示wifi direct选项

    3android.hardware.bluetooth.xml是在setting界面中显示蓝牙

    4、“PRODUCT_PACKAGES +=  Bluetooth”指定去编译Bluetooth.apk

    3.4config.xml

    config.xml文件路径:\android5.1\device\softwinner\tulip-t1\overlay\frameworks\base\core\res\res

    \values\config.xml

    要打开蓝牙功能,需要在config.xml中把蓝牙的bt-pan网口打开,修改的部分代码如下。 

    <!-- List of regexpressions describing the interface (if any) that represent tetherable

          Wifi interfaces.  If the device doesn't want to support tethering over Wifi this

             should be empty.  An example would be "softap.*" -->

    <!--  default: disable Softap feature -->

    <string-array translatable="false" name="config_tether_wifi_regexs">

    <item>"wlan0"</item>

    </string-array>

    -->

    <!-- List of regexpressions describing the interface (if any) that represent tetherable

             bluetooth interfaces.  If the device doesn't want to support tethering over bluetooth this

             should be empty. -->

        <!--  default: disable Bluetooth PAN feature -->

        <string-array translatable="false" name="config_tether_bluetooth_regexs">

            <item>"bt-pan"</item>

    </string-array>

    <!-- List of regexpressions describing the interface (if any) that represent tetherable

    注:若相应平台该目录下没config.xml文件,可到其他相应平台对应目录下拷贝一份。

    3.5 vnd_<product>.txt

    蓝牙配置文件 设置波特率,uart设备文件和firmware路径(初始值),调试信息配置

    文件路径: device\softwinner\tulip-t1\bluetooth

    创建vnd_$( product).txt文件,如vnd_tulip-t1.txt

    #Set baudrate to 1500000

    UART_TARGET_BAUD_RATE=1500000

    BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyS1"

    FW_PATCHFILE_LOCATION = "/system/vendor/modules/"

    LPM_IDLE_TIMEOUT_MULTIPLE = 5

    #LPM_SLEEP_MODE = FALSE

    BT_WAKE_VIA_PROC = TRUE

    BTVND_DBG = TRUE

    BTHW_DBG = TRUE

    VNDUSERIAL_DBG = TRUE

    UPIO_DBG = TRUE

    3.6 bt_vendor.conf

    文件路径:device\softwinner\tulip-t1\bluetooth

    # UART device port where Bluetooth controller is attached

    UartPort = /dev/ttyS1

    # Firmware patch file location

    FwPatchFilePath = /system/vendor/modules/

    #Firmware name

    FwPatchFileName = bcm20710a1.hcd

    3.7 bdroid_buildcfg.h

    android5.1\device\softwinner\tulip-t1\bluetooth\bdroid_buildcfg.h主要配置打开蓝牙时显示的本机名字。

    #ifndef _BDROID_BUILDCFG_H

    #define _BDROID_BUILDCFG_H

    #define BTM_DEF_LOCAL_NAME "tulip-t1"

    #define BTA_DM_COD {0x1A, 0x01, 0x14}

    #define BTIF_HF_SERVICES (BTA_HSP_SERVICE_MASK)

    #define BTIF_HF_SERVICE_NAMES  { BTIF_HSAG_SERVICE_NAME }

    #endif

    3.8 引脚配置

      ap6212引脚在lichee\tools\pack\chips\sun8iw6p1\configs\ f1\sys_config.fex中定义,需根据具体的原理图做相应的配置,需要配置的选项有:

    ;wifi/bt/fm/gps/nfc modules configuration

    ;module_num:   

    ;  1- ap6181(wifi) 2- ap6210(wifi+bt) 3- rtl8188eu(wifi)

    ;  4- rtl8723au(wifi+bt)  5- rtl8723bs(wifi+bt) 6- esp8089(wifi)

    ;  7- ap6476(wifi+bt+fm+gps)

    ;  8- ap6330(wifi+bt+fm) gb9663(wifi+bt+fm) ap6212(wifi+bt+fm)

    ;module_power1: ""- bat, "axp_dldo1"- axp dldo1

    ;module_power1_vol: power1 voltage, mv; not used for module_power1 is ""

    ;module_power2: ""- bat, "axp_dldo2"- axp dldo2

    ;module_power2_vol: power2 voltage, mv; not used for module_power2 is ""

    ;module_power3: ""- bat, "axp_dldo2"- axp dldo2

    ;module_power3_vol: power3 voltage, mv; not used for module_power3 is ""

    ;power_switch:  module power switch io when bat supply

    ;chip_en:       enable chip io

    ;lpo_use_apclk: ""- not use, "losc_out"- a23/33, "ac10032k1""ac10032k2""ac10032k3"- a80/a83 

    ;--------------------------------------------------------------------------------

    [rf_para]

    module_num          = 2

    module_power1       = "vcc-wifi-io"

    module_power1_vol   = 3300000

    module_power2       = ""

    module_power2_vol   = 

    module_power3       = ""

    module_power3_vol   = 

    power_switch        =

    chip_en             = 

    lpo_use_apclk       = "ac10032k2"

    说明:

    1、“;”符号起注释作用

    2、“module_num” 宏表示选用哪一款wifi模组;

    3、“module_power1”宏表示给模组供电的是axp的哪路ldo,一般选vcc-wifi-io(参见[pmu1_regu]);

    4、“module_power1_vol”宏设置ldo的供电电压,ap6212供电电压为3.3V

    5、“lpo_use_apclk”选择32k时钟源,根据原理图配置,一般选ac10032k2。

    Wifi部分

    ;wifi configuration

    ;wifi_used:      0-not use, 1- use

    ;wifi_sdc_id:    0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3

    ;wifi_usbc_id:   0- USB0, 1- USB1, 2- USB2

    ;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0)

    ;wl_reg_on:      wifi function enable io

    ;wl_host_wake:   wifi device wake-up host

    ;wl_host_wake_invert: whether wl_host_wake use inverter between ap and module

    ;                     0: not used, 1: used   

    ;--------------------------------------------------------------------------------

    [wifi_para]

    wifi_used             = 1

    wifi_sdc_id           = 1

    wifi_usbc_id          = 1

    wifi_usbc_type        = 1

    wl_reg_on             = port:PL02<1><default><default><0>

    wl_host_wake          = port:PL03<4><default><default><0>

    wl_host_wake_invert   = 0

    说明:

    1、“;”符号起注释作用

    2、“wifi_used”宏赋值为1表示使用wifi,为0表示不使用;

    3、“wifi_sdc_id”宏表示SDIO接口wifi使用哪个MMC 控制器 ;

    4、“wl_reg_on”宏表示wifi使能脚,打开wifi的过程,会拉高,根据原理图配置;

    5、“wl_host_wake”宏表示wifi唤醒主控功能(WL-WAKE-AP),根据实际原理图配置。

    蓝牙部份

    ;bluetooth configuration

    ;bt_used:       0- no used, 1- used

    ;bt_uard_id: 0- uart0, 1- uart1, 2- uart2

    ;bt_rst_n:      bt function enable io

    ;bt_wake:       host wake-up bluetooth device

    ;bt_wak_host:   bt device wake-up host 

    ;bt_host_wake_invert: whether bt_host_wake use inverter between ap and module

    ;                     0: not used, 1: used

    ;--------------------------------------------------------------------------------

    [bt_para]

    bt_used               = 1

    bt_uart_id            = 1  

    bt_rst_n              = port:PL04<1><default><default><0>

    bt_wake               = port:PH10<1><default><default><0>

    bt_host_wake          = port:PL05<4><default><default><0>

    bt_host_wake_invert   = 0

    说明:

    1、“bt_used”宏赋值为1表示使用蓝牙,为0表示不使用;

    2、“bt_uart_id”宏表示蓝牙所使用的是哪个uart

    3、“bt_rst_n”宏表示蓝牙使能脚,蓝牙打开时会拉高,根据实际原理图配置;

    4、“bt_wake”宏表示主控唤醒蓝牙(AP-WAKE-BT,根据实际原理图配置;

    5、“bt_host_wake”宏表示蓝牙唤醒主控(BT-WAKE-AP,根据实际原理图配置。

    4. 常见问题

    硬件checklist

    1. 26M晶振电路不需要接反相器,XTAL_IN/XTAL_OUT直接接模块Pin 10 /Pin 11;

    2. 32K时钟波形正常输出;

    3. Pin 22 VDDIO 电压(3.3V)

    4. Pin 9 VBAT接电池有电压;

    5. Pin 29 VDD_TCXO需要悬空;

    软件checklist

    1. Wifi和蓝牙都打不开?
    请确认确认/system/vendor/modules/是否有以下文件,名字是否正确?
    bcmhd.ko
    fw_bcm43438a0.bin
    fw_bcm43438a0_apsta.bin
    fw_bcm43438a0_p2p.bin
    nvram.txt
    如果没有这些文件,说明编译的时候没有编到,请检查是否BoardConfig.mk大小写以及hardware\broadcom\wlan\bcmdhd\firmware\firmware-bcm.mk是否有加ap6212

    2. 蓝牙打不开?
    先确认4.1.5有加,再确认4.1.7波特率是否设置正确,另外改了Boardconfig.mk需要make clean

    3. 蓝牙打开后搜不到设备?
    先确认是否加天线,再确认确认4.1.5的FwPatchFileName是否正确;

    其他:

    1. 搜不到5G 信号? 搜不到某些蓝牙设备?某些路由器连接不上?
    晶振存在频偏,请尝试从小到大更换26M晶振起振电路上的两个谐振电容。

    展开全文
  • AP6212A固件4.2.tgz

    2020-03-04 14:59:40
    AMPAK台湾正基WIFI模块固件资料,AP6212A原厂硬件设计参考资料,AP6212A固件资料最新版本.原厂设计指导!更多资讯详细咨询深圳市世联芯科技有限公司,需要别的正基技术资料请留言或私信
  • AP6212硬件数据手册.zip

    2020-07-20 13:50:43
    AP6212硬件数据手册 WiFi/BT使用手册和数据手册
  • Broadcom_AP6212.rar

    2019-05-17 19:21:00
    i.mx平台下移植AP6212,三个固件版本,并区分固件的方法。
  • AP6212 firmware 驱动 程序
  • AP6212模块原理图.pdf

    2020-03-21 17:31:18
    AP6212datasheet WiFi+Bluetooth 4.0+FM RX SIP Module Spec Sheet
  • AP6212 固件

    2019-10-31 14:28:57
    #AP6212_NVRAM_V1.0.1_20160606 2.4 GHz, 20 MHz BW mode The following parameter values are just placeholders, need to be updated. manfid=0x2d0 prodid=0x0726 vendid=0x14e4 devid=0x4...

    需要完整文件请留言或私聊
    #AP6212_NVRAM_V1.0.1_20160606

    2.4 GHz, 20 MHz BW mode

    The following parameter values are just placeholders, need to be updated.

    manfid=0x2d0
    prodid=0x0726
    vendid=0x14e4
    devid=0x43e2
    boardtype=0x0726
    boardrev=0x1101
    boardnum=22
    macaddr=00:90:4c:c5:12:38
    sromrev=11
    boardflags=0x00404201
    xtalfreq=26000
    nocrc=1
    ag0=255
    aa2g=1
    ccode=ALL

    pa0itssit=0x20
    extpagain2g=0

    #PA parameters for 2.4GHz, measured at CHIP OUTPUT
    pa2ga0=-168,7161,-820
    AvVmid_c0=0x0,0xc8
    cckpwroffset0=5

    PPR params

    maxp2ga0=90
    txpwrbckof=6
    cckbw202gpo=0x5555
    legofdmbw202gpo=0x77777777
    mcsbw202gpo=0xaaaaaaaa

    OFDM IIR :

    ofdmdigfilttype=7

    PAPD mode:

    papdmode=2

    il0macaddr=00:90:4c:c5:12:38
    wl0id=0x431b

    #OOB parameters
    hostwake=0x40
    hostrdy=0x41
    usbrdy=0x03
    usbrdydelay=100
    deadman_to=0xffffffff

    muxenab: 0x1 for UART enable, 0x10 for Host awake

    muxenab=0x10

    CLDO PWM voltage settings - 0x4 - 1.1 volt

    #cldo_pwm=0x4
    glitch_based_crsmin=1

    展开全文
  • 修改AP6212A0所使用的配置文件nvram_ap6210.txt为nvram_ap6212.txt     大文实验室/大文哥 壹捌陆捌零陆捌捌陆捌贰 wb4916 AT qq.com 完成时间:2017/6/27 16:15 版本:V1.0     1、借用AP6210的配置打开WIFI+BT...

    修改AP6212A0所使用的配置文件nvram_ap6210.txt为nvram_ap6212.txt

     

     

    大文实验室/大文哥

    壹捌陆捌零陆捌捌陆捌贰

    wb4916 AT qq.com

    完成时间:2017/6/27 16:15

    版本:V1.0

     

     

    1、借用AP6210的配置打开WIFI+BT了,但是为了规范化,还是将配置文件由nvram_ap6210.txt修改为nvram_ap6212.txt,规范化!

    shell@astar-y3:/ $

    shell@astar-y3:/ $ cd /system/vendor/modules/                                  

    shell@astar-y3:/system/vendor/modules $ ll *.txt

    -rw-r--r-- root     root          956 2017-06-26 17:18 nvram_ap6210.txt

    shell@astar-y3:/system/vendor/modules $ ll *.bin

    -rw-r--r-- root     root       378595 2017-06-26 17:18 fw_bcm43438a0.bin

    -rw-r--r-- root     root       309352 2017-06-26 17:18 fw_bcm43438a0_apsta.bin

    -rw-r--r-- root     root       336323 2017-06-26 17:18 fw_bcm43438a0_p2p.bin

    shell@astar-y3:/system/vendor/modules $

    shell@astar-y3:/system/vendor/modules $ ll bcm*

    -rw-r--r-- root     root        26020 2017-06-26 17:18 bcm43438a0.hcd

    -rw-r--r-- root     root       748856 2017-06-26 17:18 bcmdhd.ko

    shell@astar-y3:/system/vendor/modules $

    shell@astar-y3:/system/vendor/modules $

     

     

     

     

    2、偶然原因使用grep搜索nvram_ap6210.txt

    rootroot@rootroot-E400:~$

    rootroot@rootroot-E400:~$ cd wyb/ap6212a0_a33_sc3817r/

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r$

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r$ cd lichee/linux-3.4/drivers/net/wireless/bcmdhd/

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$grep nvram_ap6210.txt . -R

    ./dhd_common.c:  bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6210.txt", MOD_PARAM_PATHLEN-1);

    匹配到二进制文件 ./bcmdhd.o

    匹配到二进制文件 ./dhd_common.o

    匹配到二进制文件 ./bcmdhd.ko

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$

     

     

    R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd\dhd_common.c

    void

    dhd_common_init(osl_t *osh)

    {

    int select_type = 0;

    //aw checkout which wifi had select

    select_type = wifi_pm_get_mod_type();

    #ifdef CONFIG_BCMDHD_FW_PATH

    //select ap6181 or ap6210 or ap6476

    if (select_type == 1 || select_type == 2 || select_type == 7) {

    bcm_strncpy_s(fw_path, sizeof(fw_path), "/system/vendor/modules/fw_bcm40181a2.bin", MOD_PARAM_PATHLEN-1);

    }

    #else /* CONFIG_BCMDHD_FW_PATH */

    fw_path[0] = '\0';

    #endif /* CONFIG_BCMDHD_FW_PATH */

    #ifdef CONFIG_BCMDHD_NVRAM_PATH

    switch (select_type)

    {

    //ap6181

    case 1:

      bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6181.txt", MOD_PARAM_PATHLEN-1);

      break;

      

    //ap6210

    case 2:

      bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6210.txt", MOD_PARAM_PATHLEN-1);

      break;

      

    //ap6476

    case 7:

    bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6476.txt", MOD_PARAM_PATHLEN-1);

    break;

    default:

    break;

    }

    #else /* CONFIG_BCMDHD_NVRAM_PATH */

    nv_path[0] = '\0';

    #endif /* CONFIG_BCMDHD_NVRAM_PATH */

    #ifdef CONFIG_BCMDHD_CONFIG_PATH

    bcm_strncpy_s(conf_path, sizeof(conf_path), "/system/vendor/modules/config.txt", MOD_PARAM_PATHLEN-1);

    #else /* CONFIG_BCMDHD_CONFIG_PATH */

    conf_path[0] = '\0';

    #endif /* CONFIG_BCMDHD_CONFIG_PATH */

    #ifdef SOFTAP

    fw_path2[0] = '\0';

    #endif

    }

     

     

    发现最大WIFI类型是7:ap6476,那就是配置AP6212的类型为8即可了!

    R:\wyb\ap6212a0_a33_sc3817r\lichee\tools\pack\chips\sun8iw5p1\configs\y3\sys_config.fex

    ;--------------------------------------------------------------------------------

    ; gps gpio configuration

    ; gps_spi_id:     the index of SPI controller. 0: SPI0, 1: SPI1, 2: SPI2, 15: no SPI used

    ; gps_spi_cs_num: the chip select number of SPI controller. 0: SPI CS0, 1: SPI CS1

    ; gps_lradc:      the lradc number for GPS used. 0 and 1 is valid, set 2 if not use lradc

    ;--------------------------------------------------------------------------------

    [gps_para]

     

    ;--------------------------------------------------------------------------------

    ;wifi configuration

    ;wifi_sdc_id:    0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3

    ;wifi_usbc_id:   0- USB0, 1- USB1, 2- USB2

    ;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0)

    ;wifi_mod_sel:   0- none, 1- ap6181, 2- ap6210(wifi+bt),

    ;                3 - rtl8188eu, 4- rtl8723au(wifi+bt),

    ;                5 - rtl8723bs, 6- esp8089

    ;                7 - ap6476,    8- ap6212(wifi+bt)

    ;--------------------------------------------------------------------------------

    [wifi_para]

    wifi_used          = 1

    wifi_sdc_id        = 1

    wifi_usbc_id       = 1

    wifi_usbc_type     = 1

    wifi_mod_sel       = 8

    wifi_power         = "axp22_dldo1"

    wifi_power_ext1    = "axp22_dldo2"

    wifi_power_ext2    = "axp22_aldo1"

    wifi_power_switch  =

    ;wifi_power_switch  = port:power0<1><0><default><0>

     

    ; 1 - ap6181 sdio wifi gpio config

    ;ap6xxx_wl_regon      = port:PL06<1><default><default><0>

    ;ap6xxx_wl_host_wake  = port:PL07<4><default><default><0>

    ;ap6xxx_lpo_use_apclk = 1

     

    ; 2 - ap6210 sdio wifi gpio config

    ap6xxx_wl_regon      = port:PL06<1><default><default><0>

    ;ap6xxx_wl_regon      = port:PD13<1><default><default><0>

    ap6xxx_wl_host_wake  = port:PL07<4><default><default><0>

    ap6xxx_bt_regon      = port:PL08<1><default><default><0>

    ap6xxx_bt_wake       = port:PL10<1><default><default><0>

    ap6xxx_bt_host_wake  = port:PL09<4><default><default><0>

    ap6xxx_lpo_use_apclk = 1

     

     

     

     

    3、发现问题:

    [    0.658155] [exstandby]leave extended_standby_enable_wakeup_src : wakeup_gpio_group 0x0

    [    0.658179] [wifi]: select wifi: rtl8189es !!

    [    0.658516] [rtl8189es]: exec rtl8189es_wifi_gpio_init

    [    0.658532] [rtl8189es]: module power name axp22_dldo1

    [    0.658544] [rtl8189es]: module power ext1 name axp22_dldo2

    [    0.658555] [rtl8189es]: module power ext2 name axp22_aldo1

    [    0.658566] [rtl8189es]: get rtl8189es rtl8189es_shdn gpio failed

    [    0.658576] [rtl8189es]: rtl8189es module power set by axp.

    [    0.658775] [rtl8189es]: first time

    [    0.659126] [rtl8189es]: regulator on.

    [    0.761057] gpio rtl8189es_shdn set val 0, act val 0

    [    0.761095] [wifi_pm]: wifi gpio init is OK !!

     

     

    [   15.656191] gpio rtl8189es_shdn set val 1, act val 1

    [   15.761750] [rtl8189es]: sdio wifi power state: on

    [   15.767106] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   15.767277] =========== WLAN placed in POWER ON ========

    [   15.784182] [mmc]: sdc1 card_power_on start...

    [   15.789109] [mmc]: sdc1 power_supply is null

    [   15.793857] [mmc]: sdc1 card_power_on ok

    [   15.810037] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   15.820279] [mmc]: mclk 0xf1c2008c 0x8002000e

    [   15.902360] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   15.911305] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   15.919450] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   15.929676] [mmc]: mclk 0xf1c2008c 0x8002000e

    [   15.991965] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   16.002195] [mmc]: mclk 0xf1c2008c 0x8002000e

    [   16.063891] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8,  RTO !!

    [   16.071934] *******************Try sdio*******************

    [   16.078823] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   16.087668] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   16.096538] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   16.105383] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   16.113418] *******************Try sd *******************

    [   16.120218] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   16.129151] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   16.138093] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   16.147028] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   16.155169] *******************Try mmc*******************

    [   16.161182] [mmc]: sdc1 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   16.171406] [mmc]: mclk 0xf1c2008c 0x8002000e

    [   16.232099] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1,  RTO !!

    [   16.240146] [mmc]: mmc not poweroff notifiy

    [   16.242077] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   16.254692] [mmc]: sdc1 card_power_off start...

    [   16.259714] [mmc]: sdc1 power_supply is null

    [   16.264462] [mmc]: sdc1 card_power_off ok

    [   16.271504] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   16.282686] [mmc]: sdc1 card_power_on start...

    [   16.287612] [mmc]: sdc1 power_supply is null

    [   16.292380] [mmc]: sdc1 card_power_on ok

    [   16.310033] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   16.320267] [mmc]: mclk 0xf1c2008c 0x80030009

    [   16.402614] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   16.411817] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   16.419959] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   16.430184] [mmc]: mclk 0xf1c2008c 0x80030009

    [   16.492539] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   16.502767] [mmc]: mclk 0xf1c2008c 0x80030009

    [   16.564741] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8,  RTO !!

     

     

     

     

    4、确认rtl8189es的WIFI类型为8AP6212配置为8肯定冲突了!

    R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\arch\arm\mach-sunxi\rf\wifi_pm.c

    struct wifi_pm_ops wifi_select_pm_ops;

    static char* wifi_mod[] = {" ",

    "ap6181",  /* 1 - AP6181*/

    "ap6210",  /* 2 - AP6210*/

    "rtl8188eu",  /* 3 - RTL8188EU*/

    "rtl8723au",  /* 4 - RTL8723AU*/

    "rtl8723bs",  /* 5 - RTL8723BS*/

    "esp8089", /* 6 - ESP8089*/

    "ap6476",  /* 7 - AP6476*/

    "rtl8189es",  /* 8 - rtl8189es*/

    "ap6212", /* 9 - AP6212*/

    };

     

     

    R:\wyb\ap6212a0_a33_sc3817r\lichee\tools\pack\chips\sun8iw5p1\configs\y3\sys_config.fex

    ;--------------------------------------------------------------------------------

    ; gps gpio configuration

    ; gps_spi_id:     the index of SPI controller. 0: SPI0, 1: SPI1, 2: SPI2, 15: no SPI used

    ; gps_spi_cs_num: the chip select number of SPI controller. 0: SPI CS0, 1: SPI CS1

    ; gps_lradc:      the lradc number for GPS used. 0 and 1 is valid, set 2 if not use lradc

    ;--------------------------------------------------------------------------------

    [gps_para]

     

    ;--------------------------------------------------------------------------------

    ;wifi configuration

    ;wifi_sdc_id:    0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3

    ;wifi_usbc_id:   0- USB0, 1- USB1, 2- USB2

    ;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0)

    ;wifi_mod_sel:   0- none, 1- ap6181, 2- ap6210(wifi+bt),

    ;                3 - rtl8188eu, 4- rtl8723au(wifi+bt),

    ;                5 - rtl8723bs, 6- esp8089

    ;                7 - ap6476,    8- rtl8189es

    ;                9- ap6212(wifi+bt)

    ;--------------------------------------------------------------------------------

    [wifi_para]

    wifi_used          = 1

    wifi_sdc_id        = 1

    wifi_usbc_id       = 1

    wifi_usbc_type     = 1

    wifi_mod_sel       = 9

     

     

    编译lichee之后,

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd ../android/

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ source build/envsetup.sh

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ lunch

         9. astar_y3-eng

    Which would you like? [aosp_arm-eng] 9

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ extract-bsp 

    /home/rootroot/wyb/ap6212a0_a33_sc3817r/android/device/*/astar-y3/bImage copied!

    /home/rootroot/wyb/ap6212a0_a33_sc3817r/android/device/*/astar-y3/modules copied!

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ make bootimage

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ pack -d

     

     

     

     

    5、还是有问题(WIFI没有上电):[wifi_pm]: wrong sdio module select 9 !

    [    0.658361] [wifi]: select wifi: ap6212 !!

    [    0.658709] [wifi_pm]: wrong sdio module select 9 !

    [    0.658743] [wifi_pm]: wifi gpio init is OK !!

     

     

    [    8.406311] [wifi_pm]: wifi_used = 0 or no power ctrl, please check your config !!

    [    8.414885] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    8.415058] =========== WLAN placed in POWER ON ========

    [    8.431966] [mmc]: sdc1 card_power_on start...

    [    8.436893] [mmc]: sdc1 power_supply is null

    [    8.441641] [mmc]: sdc1 card_power_on ok

    [    8.460042] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    8.470284] [mmc]: mclk 0xf1c2008c 0x8002000e

    [    8.552363] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [    8.561318] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [    8.569468] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    8.579702] [mmc]: mclk 0xf1c2008c 0x8002000e

    [    8.641992] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    8.652219] [mmc]: mclk 0xf1c2008c 0x8002000e

    [    8.713911] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8,  RTO !!

    [    8.721957] *******************Try sdio*******************

    [    8.728845] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [    8.737691] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [    8.746528] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [    8.755373] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [    8.763409] *******************Try sd *******************

    [    8.770208] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [    8.779143] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [    8.788086] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [    8.797023] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [    8.805163] *******************Try mmc*******************

    [    8.811177] [mmc]: sdc1 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    8.821407] [mmc]: mclk 0xf1c2008c 0x8002000e

    [    8.882101] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1,  RTO !!

    [    8.890146] [mmc]: mmc not poweroff notifiy

    [    8.892079] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    8.904691] [mmc]: sdc1 card_power_off start...

    [    8.909712] [mmc]: sdc1 power_supply is null

    [    8.914457] [mmc]: sdc1 card_power_off ok

    [    8.921501] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    8.932684] [mmc]: sdc1 card_power_on start...

    [    8.937609] [mmc]: sdc1 power_supply is null

    [    8.942357] [mmc]: sdc1 card_power_on ok

    [    8.960033] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    8.970267] [mmc]: mclk 0xf1c2008c 0x80030009

    [    9.052633] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [    9.061843] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [    9.069984] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    9.080218] [mmc]: mclk 0xf1c2008c 0x80030009

    [    9.142626] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    9.152852] [mmc]: mclk 0xf1c2008c 0x80030009

    [    9.214821] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8,  RTO !!

    [    9.222866] *******************Try sdio*******************

    [    9.230020] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [    9.239134] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [    9.248237] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [    9.257350] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [    9.265393] *******************Try sd *******************

    [    9.272467] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [    9.281670] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [    9.290877] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [    9.300084] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [    9.308212] *******************Try mmc*******************

    [    9.314216] [mmc]: sdc1 set ios: clk 300000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    9.324442] [mmc]: mclk 0xf1c2008c 0x80030009

    [    9.385411] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1,  RTO !!

    [    9.393447] [mmc]: mmc not poweroff notifiy

    [    9.395382] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    9.407991] [mmc]: sdc1 card_power_off start...

    [    9.413025] [mmc]: sdc1 power_supply is null

    [    9.417766] [mmc]: sdc1 card_power_off ok

    [    9.424812] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    9.436003] [mmc]: sdc1 card_power_on start...

    [    9.440943] [mmc]: sdc1 power_supply is null

    [    9.445676] [mmc]: sdc1 card_power_on ok

    [    9.470032] [mmc]: sdc1 set ios: clk 200000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    9.480253] [mmc]: mclk 0xf1c2008c 0x8003000e

    [    9.563150] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [    9.572900] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [    9.581034] [mmc]: sdc1 set ios: clk 200000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    9.591262] [mmc]: mclk 0xf1c2008c 0x8003000e

    [    9.653918] [mmc]: sdc1 set ios: clk 200000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    9.664143] [mmc]: mclk 0xf1c2008c 0x8003000e

    [    9.726680] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8,  RTO !!

    [    9.734725] *******************Try sdio*******************

    [    9.742425] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [    9.752080] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [    9.761720] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [    9.771365] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [    9.779398] *******************Try sd *******************

    [    9.787010] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [    9.796750] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [    9.806495] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [    9.816235] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [    9.824366] *******************Try mmc*******************

    [    9.830371] [mmc]: sdc1 set ios: clk 200000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    9.840602] [mmc]: mclk 0xf1c2008c 0x8003000e

    [    9.902131] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1,  RTO !!

    [    9.910163] [mmc]: mmc not poweroff notifiy

    [    9.912089] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    9.924698] [mmc]: sdc1 card_power_off start...

    [    9.929719] [mmc]: sdc1 power_supply is null

    [    9.934474] [mmc]: sdc1 card_power_off ok

    [    9.941508] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    9.952699] [mmc]: sdc1 card_power_on start...

    [    9.957625] [mmc]: sdc1 power_supply is null

    [    9.962372] [mmc]: sdc1 card_power_on ok

    [    9.980032] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [    9.990263] [mmc]: mclk 0xf1c2008c 0x80030009

    [   10.072631] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   10.081860] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   10.089993] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   10.100227] [mmc]: mclk 0xf1c2008c 0x80030009

    [   10.162626] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   10.172857] [mmc]: mclk 0xf1c2008c 0x80030009

    [   10.234830] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8,  RTO !!

    [   10.242867] *******************Try sdio*******************

    [   10.250027] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   10.259130] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   10.268244] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   10.277347] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   10.285389] *******************Try sd *******************

    [   10.292467] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   10.301680] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   10.310880] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   10.320090] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   10.328219] *******************Try mmc*******************

    [   10.334233] [mmc]: sdc1 set ios: clk 150000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   10.344453] [mmc]: mclk 0xf1c2008c 0x80030009

    [   10.405431] [mmc]: *** sunxi_mci_dump_errinfo(L773):

    [   10.410058] failed to power up wifi chip, retry again (4 left) **

    [   10.410064]

    [   10.410157] [wifi_pm]: wifi_used = 0 or no power ctrl, please check your config !!

    [   10.410182] =========== WLAN placed in POWER OFF ========

    [   10.410245] [wifi_pm]: wifi_used = 0 or no power ctrl, please check your config !!

    [   10.410457] =========== WLAN placed in POWER ON ========

    [   10.415402] smc 1 err, cmd 1,  RTO !!

    [   10.415402] [mmc]: mmc not poweroff notifiy

    [   10.415402] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   10.466692] [mmc]: sdc1 card_power_off start...

    [   10.471728] [mmc]: sdc1 power_supply is null

    [   10.476461] [mmc]: sdc1 card_power_off ok

    [   10.483527] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   10.494713] [mmc]: sdc1 card_power_on start...

    [   10.499647] [mmc]: sdc1 power_supply is null

    [   10.504396] [mmc]: sdc1 card_power_on ok

    [   10.520039] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   10.530273] [mmc]: mclk 0xf1c2008c 0x8002000e

    [   10.612360] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   10.621312] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   10.629446] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   10.639676] [mmc]: mclk 0xf1c2008c 0x8002000e

    [   10.701960] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   10.712178] [mmc]: mclk 0xf1c2008c 0x8002000e

    [   10.773877] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8,  RTO !!

    [   10.781920] *******************Try sdio*******************

    [   10.788807] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   10.797650] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   10.806490] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   10.815332] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   10.823368] *******************Try sd *******************

    [   10.830157] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   10.839090] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   10.848032] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   10.856967] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   10.865107] *******************Try mmc*******************

    [   10.871119] [mmc]: sdc1 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   10.881350] [mmc]: mclk 0xf1c2008c 0x8002000e

    [   10.942043] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1,  RTO !!

    [   10.950085] [mmc]: mmc not poweroff notifiy

    [   10.952021] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   10.964633] [mmc]: sdc1 card_power_off start...

    [   10.969656] [mmc]: sdc1 power_supply is null

    [   10.974402] [mmc]: sdc1 card_power_off ok

    [   10.981437] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   10.992622] [mmc]: sdc1 card_power_on start...

    [   10.997556] [mmc]: sdc1 power_supply is null

    [   11.002304] [mmc]: sdc1 card_power_on ok

    [   11.020039] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   11.030277] [mmc]: mclk 0xf1c2008c 0x80030009

    [   11.112626] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   11.121835] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   11.129977] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   11.140203] [mmc]: mclk 0xf1c2008c 0x80030009

    [   11.202601] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   11.212826] [mmc]: mclk 0xf1c2008c 0x80030009

    [   11.274800] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8,  RTO !!

    [   11.282843] *******************Try sdio*******************

    [   11.289996] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   11.299106] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   11.308213] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   11.317323] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   11.325358] *******************Try sd *******************

    [   11.332439] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   11.341643] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   11.350853] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   11.360053] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   11.368190] *******************Try mmc*******************

    [   11.374194] [mmc]: sdc1 set ios: clk 300000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   11.384424] [mmc]: mclk 0xf1c2008c 0x80030009

    [   11.445405] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1,  RTO !!

    [   11.453445] [mmc]: mmc not poweroff notifiy

    [   11.455368] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   11.467991] [mmc]: sdc1 card_power_off start...

    [   11.473027] [mmc]: sdc1 power_supply is null

    [   11.477759] [mmc]: sdc1 card_power_off ok

    [   11.484810] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   11.495995] [mmc]: sdc1 card_power_on start...

    [   11.500935] [mmc]: sdc1 power_supply is null

    [   11.505667] [mmc]: sdc1 card_power_on ok

    [   11.530032] [mmc]: sdc1 set ios: clk 200000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   11.540254] [mmc]: mclk 0xf1c2008c 0x8003000e

    [   11.623152] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   11.632906] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   11.641043] [mmc]: sdc1 set ios: clk 200000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   11.651272] [mmc]: mclk 0xf1c2008c 0x8003000e

    [   11.713930] [mmc]: sdc1 set ios: clk 200000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   11.724155] [mmc]: mclk 0xf1c2008c 0x8003000e

    [   11.786692] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8,  RTO !!

    [   11.794728] *******************Try sdio*******************

    [   11.802437] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   11.812072] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   11.821717] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   11.831362] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   11.839394] *******************Try sd *******************

    [   11.847007] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   11.856747] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   11.866492] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   11.876227] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   11.884367] *******************Try mmc*******************

    [   11.890373] [mmc]: sdc1 set ios: clk 200000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   11.900603] [mmc]: mclk 0xf1c2008c 0x8003000e

    [   11.962133] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1,  RTO !!

    [   11.970168] [mmc]: mmc not poweroff notifiy

    [   11.972090] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   11.984710] [mmc]: sdc1 card_power_off start...

    [   11.989732] [mmc]: sdc1 power_supply is null

    [   11.994478] [mmc]: sdc1 card_power_off ok

    [   12.001519] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   12.012699] [mmc]: sdc1 card_power_on start...

    [   12.017624] [mmc]: sdc1 power_supply is null

    [   12.022371] [mmc]: sdc1 card_power_on ok

    [   12.040040] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   12.050271] [mmc]: mclk 0xf1c2008c 0x80030009

    [   12.132619] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   12.141827] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52,  RTO !!

    [   12.149967] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   12.160192] [mmc]: mclk 0xf1c2008c 0x80030009

    [   12.222601] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   12.232826] [mmc]: mclk 0xf1c2008c 0x80030009

    [   12.294798] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8,  RTO !!

    [   12.302837] *******************Try sdio*******************

    [   12.309991] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   12.319102] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   12.328208] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   12.337311] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5,  RTO !!

    [   12.345354] *******************Try sd *******************

    [   12.352431] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   12.361635] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   12.370835] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   12.380041] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55,  RTO !!

    [   12.388170] *******************Try mmc*******************

    [   12.394187] [mmc]: sdc1 set ios: clk 150000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B

    [   12.404410] [mmc]: mclk 0xf1c2008c 0x80030009

    [   12.410041]

    [   12.410044] failed to power up wifi chip, retry again (3 left) **

    [   12.410049]

    [   12.420182] [wifi_pm]: wifi_used = 0 or no power ctrl, please check your config !!

    [   12.428589] =========== WLAN placed in POWER OFF ========

    [   12.434641] [wifi_pm]: wifi_used = 0 or no power ctrl, please check your config !!

    [   12.443260] =========== WLAN placed in POWER ON ========

     

     

     

     

    6、查找问题:[wifi_pm]: wrong sdio module select 9 !

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ grep "wrong sdio module select" . -R

    ./linux-3.4/arch/arm/mach-sunxi/rf/wifi_pm.c:wifi_pm_msg("wrong sdio module select %d !\n", ops->module_sel.val);

     

     

    R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\arch\arm\mach-sunxi\rf\wifi_pm.c

    static int __devinit wifi_pm_probe(struct platform_device *pdev)

    {

    struct wifi_pm_ops *ops = &wifi_select_pm_ops;

     

    switch (ops->module_sel.val) {

    case 1: /* AP6181 */

    ap6xxx_gpio_init();

    break;

    case 2: /* AP6210 */

    ap6xxx_gpio_init();

    break;

    case 3: /* RTL8188EU */

    rtl8188eu_gpio_init();

    break;

    case 4: /* RTL8723AU */

    rtl8723au_gpio_init();

    break;

    case 5: /* RTL8723BS */

    rtl8723bs_gpio_init();

    break;

    case 6: /* ESP8089 */

    esp8089_gpio_init();

    break;

    case 7: /* AP6476 */

    ap6xxx_gpio_init();

    break;

    case 8: /* rtl8189es */

    rtl8189es_gpio_init();

    break;

    case 9: /* AP6212 */

    ap6xxx_gpio_init();

    break;

    default:

    wifi_pm_msg("wrong sdio module select %d !\n", ops->module_sel.val);

    }

     

    awwifi_procfs_attach();

    wifi_pm_msg("wifi gpio init is OK !!\n");

    return 0;

    }

     

     

    修改之后,需要清除lichee,然后再make bootimage,然后打包:

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ./build.sh config

     

    Welcome to mkscript setup progress

    All available chips:

       0. sun8iw5p1

    Choice: 0

    All available platforms:

       0. android

       1. dragonboard

       2. linux

    Choice: 0

    All available kernel:

       0. linux-3.4

    Choice: 0

    All available boards:

       0. evb

       1. maple

       2. redwood

       3. y2

       4. y3

    Choice: 4

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd linux-3.4/

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4$ make clean

      CLEAN   .

      CLEAN   drivers/tty/vt

      CLEAN   kernel

      CLEAN   lib

      CLEAN   security/apparmor

      CLEAN   security/selinux

      CLEAN   usr

      CLEAN   .tmp_versions

      CLEAN   vmlinux System.map .tmp_kallsyms1.o .tmp_kallsyms1.S .tmp_kallsyms2.o .tmp_kallsyms2.S .tmp_vmlinux1 .tmp_vmlinux2 .tmp_System.map

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4$ rm output/ -rf

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4$ cd ..

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ rm out/ -rf

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ./build.sh 

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd ../android/

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ source build/envsetup.sh

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ lunch

         9. astar_y3-eng

    Which would you like? [aosp_arm-eng] 9

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ extract-bsp 

    /home/rootroot/wyb/ap6212a0_a33_sc3817r/android/device/*/astar-y3/bImage copied!

    /home/rootroot/wyb/ap6212a0_a33_sc3817r/android/device/*/astar-y3/modules copied!

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ make bootimage

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ pack -d

     

     

     

     

    7、

    [   66.680039] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired

    [   66.690024] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle

    [   68.647096] sndpcm_unmute,line:1099

    [   69.406631] init: waitpid returned pid 1133, status = 0000ff00

    [   69.413165] init: process 'preinstall', pid 1133 exited

    [   74.926558] init: computing context for service '/system/bin/wpa_supplicant'

    [   74.934908] init: starting 'p2p_supplicant'

    [   74.944376] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010'

    [   74.995472] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin

    [   75.005264]

    [   75.005267] Dongle Host Driver, version 1.88.45.3 (r420671)

    [   75.005272] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 16:53:23

    [   75.021110] wl_android_wifi_on in 1

    [   75.024978] wl_android_wifi_on in 2: g_wifi_on=0

    [   75.030154] gpio ap6xxx_wl_regon set val 1, act val 1

    [   75.135767] [ap6xxx]: sdio wifi power state: on

    [   75.141015] =========== WLAN going back to live  ========

    [   75.147003] sdio_reset_comm():

    [   75.150410] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   75.160762] [mmc]: mclk 0xf1c2008c 0x8140030b

    [   75.222089] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   75.232440] [mmc]: mclk 0xf1c2008c 0x8140030b

    [   75.291058] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   75.301298] [mmc]: mclk 0xf1c2008c 0x80430309

    [   75.361628] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   75.371774] [mmc]: mclk 0xf1c2008c 0x80030009

    [   75.443773] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)

    [   75.451880] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

    [   75.460015] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

    [   75.469737] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)

    [   75.590337] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   75.600482] [mmc]: mclk 0xf1c2008c 0x80030009

    [   75.660400] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   75.670779] [mmc]: mclk 0xf1c2008c 0x8100000b

    [   75.730701] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   75.741057] [mmc]: mclk 0xf1c2008c 0x8140030b

    [   75.801267]

    [   75.801272]

    [   75.801274] dhd_bus_devreset: == WLAN ON ==

    [   75.809221] dhd_bus_devreset called when dongle is not in reset

    [   75.815805] Will call dhd_bus_start instead

    [   75.820515] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin

    [   75.830280] dhd_bus_devreset: dhd_bus_start fail with -100

    [   75.836371] dhd_dev_reset: dhd_bus_devreset: -100

    [   75.841606] dhd_prot_ioctl : bus is down. we have nothing to do

    [   75.848191] dhd_bus_devreset:  WLAN OFF DONE

    [   75.853024] gpio ap6xxx_wl_regon set val 0, act val 0

    [   75.958643] [ap6xxx]: sdio wifi power state: off

    [   75.963860] =========== WLAN placed in RESET ========

    [   75.969534] wl_android_wifi_on: Failed

    [   75.973795] dhd_open : wl_android_wifi_on failed (-100)

    [   75.979620] wl_android_wifi_off in 1

    [   75.983682] wl_android_wifi_off in 2: g_wifi_on=0

    [   75.988968] wl_android_wifi_off out

    [   75.998631] init: waitpid returned pid 1251, status = 0000ff00

    [   76.005173] init: process 'p2p_supplicant', pid 1251 exited

    [   76.675241] healthd: battery l=100 v=0 t=30.0 h=2 st=5 c=0 chg=au

    [   76.740026] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired

    [   76.746692] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle

    [   77.357333] CPU Budget:update CPU 0 cpufreq max to 1200000 min to 120000

    [   77.364842] [dsm] store_scene: 0

    [   78.408672] [rfkill]: rfkill set power 1

    [   78.413132] [rfkill]: no bt module matched !!

    [   78.631287] [rfkill]: rfkill set power 0

    [   78.635662] [rfkill]: no bt module matched !!

    [   80.391225] CPU2: shutdown

    [   80.394284] [hotplug]: cpu(1) try to kill cpu(2)

    [   80.399453] [hotplug]: cpu2 is killed! .

    [   80.901824] CPU3: shutdown

    [   80.904895] [hotplug]: cpu(1) try to kill cpu(3)

    [   80.910202] [hotplug]: cpu3 is killed! .

    [   84.374138] [rfkill]: rfkill set power 1

    [   84.378502] [rfkill]: no bt module matched !!

    [   86.760041] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired

    [   86.766784] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle

    [   86.773616] [BT_LPM] bluesleep_sleep_work: going to sleep...

    [   90.901474] CPU1: shutdown

    [   90.904567] [hotplug]: cpu(0) try to kill cpu(1)

    [   90.909751] [hotplug]: cpu1 is killed! .

    [   95.155325] init: computing context for service '/system/bin/wpa_supplicant'

    [   95.163801] init: starting 'p2p_supplicant'

    [   95.171413] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010'

    [   95.211519] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin

    [   95.221378]

    [   95.221384] Dongle Host Driver, version 1.88.45.3 (r420671)

    [   95.221393] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 16:53:23

    [   95.237310] wl_android_wifi_on in 1

    [   95.241213] wl_android_wifi_on in 2: g_wifi_on=0

    [   95.246371] gpio ap6xxx_wl_regon set val 1, act val 1

    [   95.363212] [ap6xxx]: sdio wifi power state: on

    [   95.380345] =========== WLAN going back to live  ========

    [   95.386356] sdio_reset_comm():

    [   95.389761] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   95.405357] [mmc]: mclk 0xf1c2008c 0x8140030b

    [   95.467447] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   95.478022] [mmc]: mclk 0xf1c2008c 0x8140030b

    [   95.538993] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   95.549286] [mmc]: mclk 0xf1c2008c 0x80430309

    [   95.609704] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   95.619871] [mmc]: mclk 0xf1c2008c 0x80030009

    [   95.694323] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)

    [   95.703244] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

    [   95.712070] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

    [   95.722683] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)

    [   95.866175] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   95.876981] [mmc]: mclk 0xf1c2008c 0x80030009

    [   95.937386] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   95.950287] [mmc]: mclk 0xf1c2008c 0x8100000b

    [   96.010914] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   96.022462] [mmc]: mclk 0xf1c2008c 0x8140030b

    [   96.084035]

    [   96.084073]

    [   96.084097] dhd_bus_devreset: == WLAN ON ==

    [   96.103579] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4

    [   96.114767] DHD: dongle ram size is set to 524288(orig 524288) at 0x0

    [   96.125899] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin

    [   96.141142] Final fw_path=(null)

    [   96.144894] Final nv_path=(null)

    [   96.148612] Final conf_path=(null)

    [   90.910854] CPU1: Booted secondary processor

    [   98.170035] bcmsdh_sdmmc: enable F2 failed:-62bcmsdh_sdmmc: Failed to Write byte F0:@0x00002=06, Err: -62

    [  100.190051] bcmsdh_sdmmc: enable F2 failed:-62bcmsdh_sdmmc: Failed to Write byte F0:@0x00002=06, Err: -62

    [  102.210048] bcmsdh_sdmmc: enable F2 failed:-62bcmsdh_sdmmc: Failed to Write byte F0:@0x00002=06, Err: -62

    [  102.407286] CPU1: shutdown

    [  102.410899] [hotplug]: cpu(0) try to kill cpu(1)

    [  102.416440] [hotplug]: cpu1 is killed! .

    [  105.260547] dhd_bus_init: enable 0x06, ready 0x02 (waited 3006383us)

    [  105.268508] bcmsdh_set_drvdata: Enter

    [  105.273110] bcmsdh_register_oob_intr: Enter

    [  105.278248] bcmsdh_register_oob_intr: IRQ=7 Type=414

    [  105.285032]

    [  105.285062] bcmdhd wakeup 0

    [  105.290651] dhd_conf_set_band: Set band 0

    [  105.295397] dhd_prot_ioctl : bus is down. we have nothing to do

    [  105.303998] dhd_check_hang: Event HANG send up due to  re=0 te=0 e=-1 s=0

    [  105.311680] CONFIG-ERROR) dhd_conf_set_band: WLC_SET_BAND setting failed -1

    [  105.319496] dhd_prot_ioctl : bus is down. we have nothing to do

    [  105.326177] dhd_check_hang: Event HANG send up due to  re=0 te=0 e=-1 s=0

    [  105.333819] dhd_preinit_ioctls: can't get MAC address , error=-1

    [  105.340592] dhd_prot_ioctl : bus is down. we have nothing to do

    [  105.347236] dhd_check_hang: Event HANG send up due to  re=0 te=0 e=-1 s=0

    [  105.357054] bcmsdh_set_irq: Flag = 0

    [  105.361076] dhd_bus_devreset:  WLAN OFF DONE

    [  105.365932] gpio ap6xxx_wl_regon set val 0, act val 0

    [  105.472154] [ap6xxx]: sdio wifi power state: off

    [  105.477284] =========== WLAN placed in RESET ========

    [  105.482947] wl_android_wifi_on: Failed

    [  105.487113] dhd_open : wl_android_wifi_on failed (-14)

    [  105.492841] wl_android_wifi_off in 1

    [  105.496821] wl_android_wifi_off in 2: g_wifi_on=0

    [  105.504325] wl_android_wifi_off out

    [  105.508229] CFG80211-ERROR) wl_cfg80211_hang : In : chip crash eventing

    [  105.522511] init: waitpid returned pid 1410, status = 0000ff00

    [  105.529045] init: process 'p2p_supplicant', pid 1410 exited

    [  105.537868] cfg80211: Calling CRDA to update world regulatory domain

    [  102.414498] CPU1: Booted secondary processor

    [   80.400727] CPU2: Booted secondary processor

    [  109.407299] CPU2: shutdown

    [  109.411008] [hotplug]: cpu(0) try to kill cpu(2)

    [  109.416436] [hotplug]: cpu2 is killed! .

    [  109.917486] CPU1: shutdown

    [  109.921130] [hotplug]: cpu(0) try to kill cpu(1)

    [  109.926638] [hotplug]: cpu1 is killed! .

    [  111.400815] [rfkill]: rfkill set power 1

    [  111.405237] [rfkill]: no bt module matched !!

    [  109.924650] CPU1: Booted secondary processor

    [  109.414588] CPU2: Booted secondary processor

    [  115.907605] CPU2: shutdown

    [  115.911287] [hotplug]: cpu(0) try to kill cpu(2)

    [  115.916979] [hotplug]: cpu2 is killed! .

    [  117.407493] CPU1: shutdown

    [  117.411123] [hotplug]: cpu(0) try to kill cpu(1)

    [  117.416666] [hotplug]: cpu1 is killed! .

    [  117.414612] CPU1: Booted secondary processor

    [  121.901773] CPU1: shutdown

    [  121.904835] [hotplug]: cpu(0) try to kill cpu(1)

    [  121.910165] [hotplug]: cpu1 is killed! .

     

    shell@astar-y3:/ $

     

     

     

     

    8、错误:

    dhd_bus_devreset: dhd_bus_start fail with -100

    Final fw_path=(null)

    也就是nvram_ap6212.txt的加载错误!

     

     

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ grep fw_path . -R

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_common.c:char fw_path[MOD_PARAM_PATHLEN];

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_common.c:char fw_path2[MOD_PARAM_PATHLEN];

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_common.c:bcm_strncpy_s(fw_path, sizeof(fw_path), "/system/vendor/modules/fw_bcm40181a2.bin", MOD_PARAM_PATHLEN-1);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_common.c: fw_path[0] = '\0';

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_common.c: fw_path2[0] = '\0';

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: char *fw_path; /* module_param: path to firmware image */

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: uint32  fw_path_len;

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: fw_path_len = strlen(bus->fw_path);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: if (fw_path_len > len-1) {

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: if (fw_path_len) {

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: bcopy(bus->fw_path, arg, fw_path_len);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: ((uchar*)arg)[fw_path_len] = 0;

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: bus->fw_path = fw_path; /* ordinary one */

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: bus->fw_path = fw_path2;

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: DHD_INFO(("[softap] new fw path: %s\n", (bus->fw_path[0] ? bus->fw_path : "NULL")));

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c:                          char *pfw_path, char *pnv_path, char *pconf_path)

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: bus->fw_path = pfw_path;

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: dhd_conf_set_fw_path(bus->dhd, bus->fw_path);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: printk("Final fw_path=%s\n", bus->fw_path);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c:dhdsdio_download_code_file(struct dhd_bus *bus, char *pfw_path)

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: DHD_INFO(("%s: download firmware %s\n", __FUNCTION__, pfw_path));

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: image = dhd_os_open_image(pfw_path);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: printk("%s: Open firmware file failed %s\n", __FUNCTION__, pfw_path);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: if ((bus->fw_path == NULL) || (bus->fw_path[0] == '\0')) {

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: if ((bus->fw_path != NULL) && (bus->fw_path[0] != '\0')) {

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: if (dhdsdio_download_code_file(bus, bus->fw_path)) {

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: dhd_conf_set_fw_name_by_chip(dhdp, fw_path, firmware_path); // terence

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: dhd_conf_set_fw_name_by_chip(dhdp, fw_path, firmware_path);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_bus.h: char *fw_path, char *nv_path, char *conf_path);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: bcm_strncpy_s(src, sizeof(fw_path), fw_path, MOD_PARAM_PATHLEN-1);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c:dhd_conf_set_fw_path(dhd_pub_t *dhd, char *fw_path)

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: if (dhd->conf->fw_path[0]) {

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: strcpy(fw_path, dhd->conf->fw_path);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: printf("%s: fw_path is changed to %s\n", __FUNCTION__, fw_path);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: len_val = process_config_vars(bufp, len, pick, "fw_path=");

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: memcpy(dhd->conf->fw_path, pick, len_val);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: printf("%s: fw_path = %s\n", __FUNCTION__, dhd->conf->fw_path);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd.h:extern char fw_path[MOD_PARAM_PATHLEN];

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd.h:extern char fw_path2[MOD_PARAM_PATHLEN];

    ./linux-3.4/drivers/net/wireless/bcmdhd/wl_android.c: bcm_strncpy_s(fw_path, sizeof(fw_path),

    ./linux-3.4/drivers/net/wireless/bcmdhd/wl_android.c: if (strstr(fw_path, "apsta") != NULL) {

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.h: char fw_path[MOD_PARAM_PATHLEN]; /* Firmware path */

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.h:void dhd_conf_set_fw_path(dhd_pub_t *dhd, char *fw_path);

    匹配到二进制文件 ./linux-3.4/drivers/net/wireless/bcmdhd/wl_android.o

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: dhd_conf_set_fw_name_by_chip(&dhd->pub, fw_path, firmware_path);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: dhd_conf_set_fw_name_by_chip(&dhd->pub, fw_path, firmware_path);

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: (fw_path[0] != '\0') && (nv_path[0] != '\0')) {

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: fw_path, nv_path, conf_path))) {

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: __FUNCTION__, fw_path, nv_path, conf_path));

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: DHD_TRACE(("Firmware = %s\n", fw_path));

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: if ((!op_mode && strstr(fw_path, "_apsta") != NULL) ||

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: if ((!op_mode && strstr(fw_path, "_p2p") != NULL) ||

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: (!op_mode && strstr(fw_path, "_ibss") != NULL)) {

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$

     

     

    很容易定位到这里:

    ./linux-3.4/drivers/net/wireless/bcmdhd/dhd_common.c:bcm_strncpy_s(fw_path, sizeof(fw_path), "/system/vendor/modules/fw_bcm40181a2.bin", MOD_PARAM_PATHLEN-1);

    R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd\dhd_common.c

    void

    dhd_common_init(osl_t *osh)

    {

    int select_type = 0;

    //aw checkout which wifi had select

    select_type = wifi_pm_get_mod_type();

    #ifdef CONFIG_BCMDHD_FW_PATH

    //select ap6181 or ap6210 or ap6476

    if (select_type == 1 || select_type == 2 || select_type == 7) {

    bcm_strncpy_s(fw_path, sizeof(fw_path), "/system/vendor/modules/fw_bcm40181a2.bin", MOD_PARAM_PATHLEN-1);

    }

    #else /* CONFIG_BCMDHD_FW_PATH */

    fw_path[0] = '\0';

    #endif /* CONFIG_BCMDHD_FW_PATH */

    #ifdef CONFIG_BCMDHD_NVRAM_PATH

    switch (select_type)

    {

    //ap6181

    case 1:

      bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6181.txt", MOD_PARAM_PATHLEN-1);

      break;

      

    //ap6210

    case 2:

      bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6210.txt", MOD_PARAM_PATHLEN-1);

      break;

    //ap6476

    case 7:

    bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6476.txt", MOD_PARAM_PATHLEN-1);

    break;

    //ap6212

    case 9:

      bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6212.txt", MOD_PARAM_PATHLEN-1);

      break;

    default:

    break;

    }

    #else /* CONFIG_BCMDHD_NVRAM_PATH */

    nv_path[0] = '\0';

    #endif /* CONFIG_BCMDHD_NVRAM_PATH */

    #ifdef CONFIG_BCMDHD_CONFIG_PATH

    bcm_strncpy_s(conf_path, sizeof(conf_path), "/system/vendor/modules/config.txt", MOD_PARAM_PATHLEN-1);

    #else /* CONFIG_BCMDHD_CONFIG_PATH */

    conf_path[0] = '\0';

    #endif /* CONFIG_BCMDHD_CONFIG_PATH */

    #ifdef SOFTAP

    fw_path2[0] = '\0';

    #endif

    }

     

     

     

     

    9、

    Microsoft Windows [版本 6.1.7600]

    版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

     

    C:\Users\Administrator>

     

    C:\Users\Administrator>cd R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd

     

    C:\Users\Administrator>r:

     

    R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb push bcmdhd.ko /system/vendor/modules/

    failed to copy 'bcmdhd.ko' to '/system/vendor/modules//bcmdhd.ko': Read-only file system

     

    R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb remount

    remount succeeded

     

    R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb push bcmdhd.ko /system/vendor/modules/

    2479 KB/s (749040 bytes in 0.295s)

     

    R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>

     

     

    shell@astar-y3:/ $ cd /system/vendor/modules/                                  

    shell@astar-y3:/system/vendor/modules $ ll bcm*

    -rw-r--r-- root     root        26020 2017-06-26 17:18 bcm43438a0.hcd

    -rw-rw-rw- root     root       749040 2017-06-27 15:23 bcmdhd.ko

    shell@astar-y3:/system/vendor/modules $ su

    shell@astar-y3:/system/vendor/modules # chmod 644 bcmdhd.ko                    

    shell@astar-y3:/system/vendor/modules # ll bcm*

    -rw-r--r-- root     root        26020 2017-06-26 17:18 bcm43438a0.hcd

    -rw-r--r-- root     root       749040 2017-06-27 15:23 bcmdhd.ko

    shell@astar-y3:/system/vendor/modules # sync

    shell@astar-y3:/system/vendor/modules # reboot

     

     

     

     

    10、找不到:/system/vendor/modules/nvram_ap6212.txt

    dhdsdio_download_nvram: Open nvram file failed 

     

    shell@astar-y3:/ $ [   42.979794] CPU3: shutdown

    [   42.983481] [hotplug]: cpu(0) try to kill cpu(3)

    [   42.989021] [hotplug]: cpu3 is killed! .

    [   43.145481] init: computing context for service '/system/bin/wpa_supplicant'

    [   43.155451] init: starting 'p2p_supplicant'

    [   43.171263] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010'

    [   43.294995] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin

    [   43.304815] net_ratelimit: 1 callbacks suppressed

    [   43.310091]

    [   43.310097] Dongle Host Driver, version 1.88.45.3 (r420671)

    [   43.310105] Compiled in drivers/net/wireless/bcmdhd on Jun 27 2017 at 15:23:29

    [   43.325963] wl_android_wifi_on in 1

    [   43.329838] wl_android_wifi_on in 2: g_wifi_on=0

    [   43.335001] gpio ap6xxx_wl_regon set val 1, act val 1

    [   43.440645] [ap6xxx]: sdio wifi power state: on

    [   43.445880] =========== WLAN going back to live  ========

    [   43.451895] sdio_reset_comm():

    [   43.455299] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   43.465732] [mmc]: mclk 0xf1c2008c 0x8140030b

    [   43.472301] CPU2: shutdown

    [   43.475353] [hotplug]: cpu(1) try to kill cpu(2)

    [   43.480613] [hotplug]: cpu2 is killed! .

    [   43.527728] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   43.538189] [mmc]: mclk 0xf1c2008c 0x8140030b

    [   43.599097] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   43.609455] [mmc]: mclk 0xf1c2008c 0x80430309

    [   43.669865] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   43.680175] [mmc]: mclk 0xf1c2008c 0x80030009

    [   43.752520] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)

    [   43.760698] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

    [   43.768875] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

    [   43.778715] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)

    [   43.902224] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   43.912536] [mmc]: mclk 0xf1c2008c 0x80030009

    [   43.968936] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   43.979479] [mmc]: mclk 0xf1c2008c 0x8100000b

    [   43.991980] CPU1: shutdown

    [   43.995071] [hotplug]: cpu(0) try to kill cpu(1)

    [   44.000490] [hotplug]: cpu1 is killed! .

    [   44.039571] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

    [   44.050247] [mmc]: mclk 0xf1c2008c 0x8140030b

    [   44.110664]

    [   44.110672]

    [   44.110677] dhd_bus_devreset: == WLAN ON ==

    [   44.123333] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4

    [   44.131953] DHD: dongle ram size is set to 524288(orig 524288) at 0x0

    [   44.140615] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin

    [   44.153199] dhd_conf_download_config: Ignore config file /system/vendor/modules/config.txt

    [   44.162566] Final fw_path=/system/vendor/modules/fw_bcm43438a0.bin

    [   44.169514] Final nv_path=/system/vendor/modules/nvram_ap6212.txt

    [   44.176370] Final conf_path=/system/vendor/modules/config.txt

    [   44.260174] dhdsdio_download_nvram: Open nvram file failed /system/vendor/modules/nvram_ap6212.txt

    [   44.270227] _dhdsdio_download_firmware: dongle nvram file download failed

    [   44.277815] dhd_dev_reset: dhd_bus_devreset: -35

    [   44.283049] dhd_prot_ioctl : bus is down. we have nothing to do

    [   44.289642] dhd_dev_reset: dhd_bus_devreset: -35

    [   44.294901] gpio ap6xxx_wl_regon set val 0, act val 0

    [   44.401205] [ap6xxx]: sdio wifi power state: off

    [   44.406335] =========== WLAN placed in RESET ========

    [   44.411984] wl_android_wifi_on: Failed

    [   44.416150] dhd_open : wl_android_wifi_on failed (-35)

    [   44.421889] wl_android_wifi_off in 1

    [   44.425861] wl_android_wifi_off in 2: g_wifi_on=0

    [   44.433284] wl_android_wifi_off out

    [   44.443722] init: waitpid returned pid 1023, status = 0000ff00

    [   44.450458] init: process 'p2p_supplicant', pid 1023 exited

     

    shell@astar-y3:/ $

     

     

     

     

    11、补一个nvram_ap6212.txt

    R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb remount

    remount succeeded

     

     

    shell@astar-y3:/ $

    shell@astar-y3:/ $ cd /system/vendor/modules/                                  

    shell@astar-y3:/system/vendor/modules $ ll *.txt

    -rw-r--r-- root     root          956 2017-06-26 17:18 nvram_ap6210.txt

    shell@astar-y3:/system/vendor/modules $ su

    shell@astar-y3:/system/vendor/modules # cp nvram_ap6210.txt nvram_ap6212.txt

    shell@astar-y3:/system/vendor/modules # ll *.txt

    -rw-r--r-- root     root          956 2017-06-26 17:18 nvram_ap6210.txt

    -rw------- root     root          956 2017-06-27 15:49 nvram_ap6212.txt

    shell@astar-y3:/system/vendor/modules # chmod 644 nvram_ap6212.txt         

    shell@astar-y3:/system/vendor/modules # ll bcm*

    -rw-r--r-- root     root        26020 2017-06-26 17:18 bcm43438a0.hcd

    -rw-r--r-- root     root       749040 2017-06-27 15:23 bcmdhd.ko

    shell@astar-y3:/system/vendor/modules # sync

    shell@astar-y3:/system/vendor/modules # reboot

     

     

    可以上网了!但是蓝牙/BT不通:

    shell@astar-y3:/system/vendor/modules $ [  306.892503] CPU2: shutdown

    [  306.895563] [hotplug]: cpu(0) try to kill cpu(2)

    [  306.900810] [hotplug]: cpu2 is killed! .

    [  307.888949] sndpcm_unmute,line:1099

    [  306.902007] CPU2: Booted secondary processor

    [  309.902889] healthd: battery l=100 v=0 t=30.0 h=2 st=5 c=0 chg=au

    [  310.132975] [rfkill]: rfkill set power 1

    [  310.137333] [rfkill]: no bt module matched !!

    [  310.360913] [rfkill]: rfkill set power 0

    [  310.365374] [rfkill]: no bt module matched !!

    [  310.901818] CPU2: shutdown

    [  310.904863] [hotplug]: cpu(0) try to kill cpu(2)

    [  310.910348] [hotplug]: cpu2 is killed! .

    [  310.920063] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired

    [  310.926735] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle

    [  310.933623] [BT_LPM] bluesleep_sleep_work: going to sleep...

    [  312.901369] CPU1: shutdown

    [  312.904549] [hotplug]: cpu(0) try to kill cpu(1)

    [  312.909746] [hotplug]: cpu1 is killed! .

    [  312.910865] CPU1: Booted secondary processor

    shell@astar-y3:/system/vendor/modules $

    shell@astar-y3:/system/vendor/modules $ [  319.557922] [rfkill]: rfkill set power 1

    [  319.567108] [rfkill]: no bt module matched !!

    [  343.122717] [rfkill]: rfkill set power 1

    [  343.127266] [rfkill]: no bt module matched !!

    [  369.909912] healthd: battery l=100 v=0 t=30.0 h=2 st=5 c=0 chg=au

     

    shell@astar-y3:/system/vendor/modules $

     

     

     

     

    12、

    同样的目录:R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\arch\arm\mach-sunxi\rf

    找到BT的PM控制引脚:

    R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\arch\arm\mach-sunxi\rf\bt_pm.c

    static int rfkill_set_power(void *data, bool blocked)

    {

        unsigned int mod_sel = wifi_pm_get_mod_type();

     

        RF_MSG("rfkill set power %d\n", blocked);

     

        switch (mod_sel)

        {

            case 2: /* ap6210 */

                if (!blocked) {

                    wifi_pm_gpio_ctrl("ap6xxx_bt_regon", 1);

                } else {

                    wifi_pm_gpio_ctrl("ap6xxx_bt_regon", 0);

                }

                break;

            case 4: /* realtek rtl8723au */

                if (!blocked) {

                    wifi_pm_gpio_ctrl("rtl8723au_bt", 1);

                } else {

                    wifi_pm_gpio_ctrl("rtl8723au_bt", 0);

                }

                break;

            case 5: /* realtek rtl8723bs */

                if (!blocked) {

                    wifi_pm_gpio_ctrl("rtl8723bs_bt_regon", 1);

                } else {

                    wifi_pm_gpio_ctrl("rtl8723bs_bt_regon", 0);

                }

                break;

            case 7: /* ap6476 */

                if (!blocked) {

                    wifi_pm_gpio_ctrl("ap6xxx_bt_regon", 1);

                } else {

                    wifi_pm_gpio_ctrl("ap6xxx_bt_regon", 0);

                }

                break;

            case 9: /* ap6212 */

                if (!blocked) {

                    wifi_pm_gpio_ctrl("ap6xxx_bt_regon", 1);

                } else {

                    wifi_pm_gpio_ctrl("ap6xxx_bt_regon", 0);

                }

                break;

            default:

                RF_MSG("no bt module matched !!\n");

        }

     

        msleep(10);

        return 0;

    }

     

     

    make bootimage之后,重新打包刷机之后BT通了

    WIFI又不通了。^_需要加:

    shell@astar-y3:/system/vendor/modules/nvram_ap6212.txt

    替换:

    shell@astar-y3:/system/vendor/modules/bcmdhd.ko

     

     

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd ../android/

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ source build/envsetup.sh

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ lunch

         9. astar_y3-eng

    Which would you like? [aosp_arm-eng] 9

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ extract-bsp 

    /home/rootroot/wyb/ap6212a0_a33_sc3817r/android/device/*/astar-y3/bImage copied!

    /home/rootroot/wyb/ap6212a0_a33_sc3817r/android/device/*/astar-y3/modules copied!

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ make bootimage

    rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ pack -d

     

     

    展开全文
  • R:\wyb\ap6181+ap6212a0_r16_tinav2.1\package\firmware\ap6212\fw_bcm40181a2_apsta.bin R:\wyb\ap6181+ap6212a0_r16_tinav2.1\package\firmware\ap6212\fw_bcm40181a2_p2p.bin R:\wyb\ap6181+ap6212a0_r16_tinav...
  • AP6212A 固件

    2019-10-31 14:31:10
    注:需要正基技术资料或技术问题可在下方留言#AP6212A_NVRAM_V1.0.1_20160606 2.4 GHz, 20 MHz BW mode The following parameter values are just placeholders, need to be updated. manfid=0x2d0 prodid=0x0726 ...

    **#AP6212A_NVRAM_V1.0.1_20160606

    2.4 GHz, 20 MHz BW mode

    The following parameter values are just placeholders, need to be updated.

    manfid=0x2d0
    prodid=0x0726
    vendid=0x14e4
    devid=0x43e2
    boardtype=0x0726
    boardrev=0x1101
    boardnum=22
    macaddr=00:90:4c:c5:12:38
    sromrev=11
    boardflags=0x00404201
    xtalfreq=26000
    nocrc=1
    ag0=255
    aa2g=1
    ccode=ALL

    pa0itssit=0x20
    extpagain2g=0

    #PA parameters for 2.4GHz, measured at CHIP OUTPUT
    pa2ga0=-215,5267,-656
    AvVmid_c0=0x0,0xc8
    cckpwroffset0=5

    PPR params

    maxp2ga0=80
    txpwrbckof=6
    cckbw202gpo=0x6666
    legofdmbw202gpo=0xaaaaaaaa
    mcsbw202gpo=0xbbbbbbbb

    OFDM IIR :

    ofdmdigfilttype=18
    ofdmdigfilttypebe=18

    PAPD mode:

    papdmode=2

    il0macaddr=00:90:4c:c5:12:38
    wl0id=0x431b

    #OOB parameters
    hostwake=0x40
    hostrdy=0x41
    usbrdy=0x03
    usbrdydelay=100
    deadman_to=0xffffffff

    muxenab: 0x1 for UART enable, 0x10 for Host awake

    muxenab=0x10

    CLDO PWM voltage settings - 0x4 - 1.1 volt

    #cldo_pwm=0x4
    glitch_based_crsmin=1

    展开全文
  • AP6212 蓝牙调试步骤

    千次阅读 2019-12-13 12:03:16
    AP6212蓝牙调试步骤 注:该方法为帮助AMPAK正基在启用蓝牙传输文件收不到的问题,应用于所有AP6XXX系列带蓝牙的模块。还有一份关于蓝牙的说明文件,有需要的下方留言 (本司有代理这个模块,有正基这块需求或问题...
  • 21ov2710_mipi+ap6212a1

    2018-08-06 11:33:52
    21ov2710_mipi+ap6212a1版本23_20180803_1028没有外层目录_验证通过但是非常卡错误多5分钟之后死掉.7z 情严重注意:ov2710是1lane。如果你配置为2lane你就爽歪歪了!
  • 全志R16的开发板SC3817匹配AP6212A1(WIFI+BT模块) 现阶段只解决了识别P6212A1的WIFI+BT,识别P6212A0的WIFI。BT待修改为自动识别! 开发板:索智的SC3817。 模块:更换SC3817上面的AP6212A0, 1、 R:\wyb\...
  • BT模块:AP6212(该芯片有bt+wifi功能) 测试步骤 1.加载bcmdhd驱动 2.rfkill来控制bt的供电 3.执行brcm_patchram_plus程序控制ap6212的工作方式以及固件下载 以上三个命令我写入了脚本openbt.sh #!/bin/s...
  • 正基AP6212芯片中,写出了AP6212(wifi+bt4.2),想问一下,这个BT4.2是指的BLE还是经典模式
  • 注:系统中自带的模块没有AP6212,相近的只有AP6210,设置为AP6210,直接添加固件也可以正常使用。 此文是手动添加AP6212的例程。 1、在设备树中修改 wifi 芯片为 ap6212, kernel/arch/arm/boot/dts/rk3288-tb...
  • rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ find . -name netfilter.mk ./package/kernel/linux/modules/netfilter.mk ./build/netfilter.mk rootroot@cm-System-Product-Name:/home/...
  • [Linux驱动炼成记] 06-博通WIFI模组AP6212配置 2019-02-20阅读7530 Buildroot 配置 Kernel -> wifi modle -> AP6212 Kernel -> wifi modle -> wifi fw local path (wifi固件路径) 相关安装包主要是...
  • AP6212最新驱动源码 bcmdhd.1.579.77.41.x.7z 从FAe获得,亲测移植可用,有需要的请下载,仅限学习使用。
  • anx9807_a83t5_lcd+ap6212_20160927.tar.gz
  • 调通sina33下的AP6212A0(WIFI+BT) 大文实验室/大文哥 壹捌陆捌零陆捌捌陆捌贰 wb4916 AT qq.com 完成时间:2017/6/26 11:01 版本:V1.1 本文参照: 《A33 wifi移植说明书.pdf》 还有就是全志R16的parrotv1.1的...
  • 目前我这有个项目使用的是PX30 android8.1 + AP6212,就拿此案例作为演示 2.wifi配置流程 2.1 Wifi的dts查看 wireless-wlan { compatible = "wlan-platdata"; wifi_chip_type = "AP6210"; //需要参考原理图...

空空如也

空空如也

1 2 3 4 5 ... 8
收藏数 154
精华内容 61
关键字:

ap6212