cnss: Add optional property to control wlan_en gpio for Dual-Wifi platforms
The WIFI PCIe Clock is controlled by WLAN_EN gpio. On Dual-WiFi Platforms, QCA WIFI SDIO chip clock sourced by PCIe Clock. Turning off WLAN_EN gpio would result in SDIO WIFI Functional Failures. Control the gpio, based on the platform. CRs-Fixed: 990796 Change-Id: I1399cd8aa53d1c6fd6b8ff0c5cce66b978770dbd Signed-off-by: Komal Seelam <kseelam@codeaurora.org> Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
This commit is contained in:
parent
639f0df4a0
commit
ae275bab72
2 changed files with 15 additions and 0 deletions
|
@ -42,6 +42,8 @@ Optional properties:
|
|||
- reg-names: Names of the memory regions defined in reg entry
|
||||
- wlan-bootstrap-gpio: WLAN_BOOTSTRAP GPIO signal specified by QCA6174
|
||||
which should be drived depending on platforms
|
||||
- qcom,is-dual-wifi-enabled: Boolean property to control wlan enable(wlan-en)
|
||||
gpio on dual-wifi platforms.
|
||||
|
||||
Example:
|
||||
|
||||
|
|
|
@ -223,6 +223,10 @@ struct index_file {
|
|||
u8 file_name[13];
|
||||
};
|
||||
|
||||
struct cnss_dual_wifi {
|
||||
bool is_dual_wifi_enabled;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_mac_addr - Structure to hold WLAN MAC Address
|
||||
* @mac_addr: MAC address
|
||||
|
@ -300,6 +304,7 @@ static struct cnss_data {
|
|||
int wlan_bootstrap_gpio;
|
||||
atomic_t auto_suspended;
|
||||
bool monitor_wake_intr;
|
||||
struct cnss_dual_wifi dual_wifi_info;
|
||||
} *penv;
|
||||
|
||||
static unsigned int pcie_link_down_panic;
|
||||
|
@ -576,6 +581,11 @@ static void cnss_wlan_gpio_set(struct cnss_wlan_gpio_info *info, bool state)
|
|||
return;
|
||||
}
|
||||
|
||||
if (state == WLAN_EN_LOW && penv->dual_wifi_info.is_dual_wifi_enabled) {
|
||||
pr_debug("%s Dual WiFi enabled\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
gpio_set_value(info->num, state);
|
||||
info->state = state;
|
||||
|
||||
|
@ -2899,6 +2909,9 @@ static int cnss_probe(struct platform_device *pdev)
|
|||
|
||||
penv->subsys_handle = subsystem_get(penv->subsysdesc.name);
|
||||
|
||||
if (of_property_read_bool(dev->of_node, "qcom,is-dual-wifi-enabled"))
|
||||
penv->dual_wifi_info.is_dual_wifi_enabled = true;
|
||||
|
||||
if (of_property_read_u32(dev->of_node, "qcom,wlan-ramdump-dynamic",
|
||||
&ramdump_size) == 0) {
|
||||
penv->ramdump_addr = dma_alloc_coherent(&pdev->dev,
|
||||
|
|
Loading…
Add table
Reference in a new issue