WIFI / BT 驅動之—設備樹配置

                                                                    WIFI / 藍牙模塊設備樹配置

 

AP6212 模塊在設備樹中配置如下:

    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>;                                                                                                   
};

藍牙驅動代碼路徑:

net/rfkill/rfkill-bt.c,net/bluetooth,drivers/bluetooth/

WIFI 驅動代碼路徑:

配置wifi固件路徑 drivers/net/wireless/rockchip_wlan/rkwifi/rk_wifi_config.c ,wifi 模塊驅動 net/rfkill/rfkill-wlan.c

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章