Linux驱动之——WIFI&BT驱动调试

                                                                          WIFI&&蓝牙模块驱动调试

该模块在kernel 设备树配置如下:

    wireless-bluetooth {
        compatible = "bluetooth-platdata";
        clocks = <&rk818 1>;
        clock-names = "ext_clock";
    
        pinctrl-names = "default","rts_gpio";
        pinctrl-0 = <&uart0_rts>;
        pinctrl-1 = <&uart0_gpios>;                                                                                                            
        uart_rts_gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
    
        BT,power_gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
        BT,wake_gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
        BT,wake_host_irq = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>;
        status = "okay";
    }; 
    wireless-wlan {                                                                                                                            
        compatible = "wlan-platdata";
        rockchip,grf = <&grf>;
        /* wifi_chip_type - wifi chip define
        * ap6210, ap6330, ap6335
        * rtl8188eu, rtl8723bs, rtl8723bu
        * esp8089
        */
        wifi_chip_type = "ap6212";
        sdio_vref = <1800>;
        WIFI,host_wake_irq = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
        status = "okay";
    };

    sdio_pwrseq: sdio-pwrseq {                                                                                                                 
        compatible = "mmc-pwrseq-simple";
        clocks = <&rk818 1>;
        clock-names = "ext_clock";
        pinctrl-names = "default";
        pinctrl-0 = <&wifi_enable_h>;

        /*
         * On the module itself this is one of these (depending
         * on the actual card populated):
         * - SDIO_RESET_L_WL_REG_ON
         * - PDN (power down when low)
         */
        reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
    };

&uart0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;                                                                                                   
};

BT 驱动代码路径:

net/rfkill/rfkill-bt.c

net/bluetooth

drivers/bluetooth/

WIFI 驱动代码路径:

drivers/net/wireless/rockchip_wlan/rkwifi/rk_wifi_config.c               // 配置wifi固件路径

net/rfkill/rfkill-wlan.c    //  wifi 模块驱动

发布了52 篇原创文章 · 获赞 81 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/xiaoma_2018/article/details/85159551