Platform driver used to handle msm specific platform requirement for 11ad chipset connected to msm platform Takes care of platform support like: - power switch through dedicated GPIO - bus frequency voting - SMMU attachment This is a snapshot of commit Iee67284b71fab87c2b4a002d7e67d24ef83a9ac9 ("Revert "msm_11ad: keep rf_clk3 on during wil6210 activity""). Change-Id: I3d19fe54197c48b9d846b32c619bf5f2a14dbf5b CRs-Fixed: 2143032 Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>tirimbino
parent
bca90e2faa
commit
658ae03583
@ -0,0 +1,63 @@ |
||||
wil6210 - Qualcomm Technologies Inc. 802.11ad Wireless Driver |
||||
|
||||
wil6210 driver is responsible for managing 802.11ad chipset |
||||
connected to MSM over PCIe interface. |
||||
|
||||
The platform data is needed in order to perform proper |
||||
bus-scaling and SMMU initialization by the driver. |
||||
|
||||
Required properties: |
||||
|
||||
- compatible: "qcom,wil6210" |
||||
- qcom,smmu-support: Boolean flag indicating whether PCIe has SMMU support |
||||
- qcom,smmu-s1-en: Boolean flag indicating whether SMMU stage1 should be enabled |
||||
- qcom,smmu-fast-map: Boolean flag indicating whether SMMU fast mapping should be enabled |
||||
- qcom,smmu-coherent: Boolean flag indicating SMMU dma and page table coherency |
||||
- qcom,smmu-mapping: specifies the base address and size of SMMU space |
||||
- qcom,pcie-parent: phandle for the PCIe root complex to which 11ad card is connected |
||||
- Refer to "Documentation/devicetree/bindings/arm/msm/msm_bus.txt" for |
||||
the below optional properties: |
||||
- qcom,msm-bus,name |
||||
- qcom,msm-bus,num-cases |
||||
- qcom,msm-bus,num-paths |
||||
- qcom,msm-bus,vectors-KBps |
||||
|
||||
Optional properties: |
||||
- qcom,sleep-clk-en: GPIO for sleep clock used for low power modes by 11ad card |
||||
- qcom,wigig-en: Enable GPIO connected to 11ad card |
||||
- qcom,use-ext-supply: Boolean flag to indicate if 11ad SIP uses external power supply |
||||
- vdd-supply: phandle to 11ad VDD regulator node |
||||
- vddio-supply: phandle to 11ad VDDIO regulator node |
||||
- qcom,use-ext-clocks: Boolean flag to indicate if 11ad SIP uses external clocks |
||||
- clocks : List of phandle and clock specifier pairs |
||||
- clock-names : List of clock input name strings sorted in the same |
||||
order as the clocks property. |
||||
- qcom,keep-radio-on-during-sleep: Boolean flag to indicate if to suspend to d3hot |
||||
instead of turning off the device |
||||
|
||||
Example: |
||||
wil6210: qcom,wil6210 { |
||||
compatible = "qcom,wil6210"; |
||||
qcom,smmu-support; |
||||
qcom,smmu-s1-en; |
||||
qcom,smmu-fast-map; |
||||
qcom,smmu-coherent; |
||||
qcom,smmu-mapping = <0x20000000 0xe0000000>; |
||||
qcom,pcie-parent = <&pcie1>; |
||||
qcom,wigig-en = <&tlmm 94 0>; |
||||
qcom,msm-bus,name = "wil6210"; |
||||
qcom,msm-bus,num-cases = <2>; |
||||
qcom,msm-bus,num-paths = <1>; |
||||
qcom,msm-bus,vectors-KBps = |
||||
<100 512 0 0>, |
||||
<100 512 600000 800000>; /* ~4.6Gbps (MCS12) */ |
||||
qcom,use-ext-supply; |
||||
vdd-supply= <&pm8998_s7>; |
||||
vddio-supply= <&pm8998_s5>; |
||||
qcom,use-ext-clocks; |
||||
clocks = <&clock_gcc clk_rf_clk3>, |
||||
<&clock_gcc clk_rf_clk3_pin>; |
||||
clock-names = "rf_clk3_clk", "rf_clk3_pin_clk"; |
||||
qcom,keep-radio-on-during-sleep; |
||||
}; |
||||
|
@ -0,0 +1,9 @@ |
||||
obj-$(CONFIG_MSM_11AD) += msm_11ad_proxy.o
|
||||
|
||||
msm_11ad_proxy-y := msm_11ad.o
|
||||
subdir-ccflags-y += -D__CHECK_ENDIAN__
|
||||
|
||||
# need to locate wil_platform.h
|
||||
WIL_11AD_PATH = drivers/net/wireless/ath/wil6210
|
||||
subdir-ccflags-y += -I$(WIL_11AD_PATH)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,40 @@ |
||||
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
|
||||
* |
||||
* This program is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License version 2 and |
||||
* only version 2 as published by the Free Software Foundation. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
*/ |
||||
#ifndef __MSM_11AD_H__ |
||||
#define __MSM_11AD_H__ |
||||
|
||||
struct device; |
||||
struct wil_platform_ops; |
||||
struct wil_platform_rops; |
||||
|
||||
/* msm_11ad_dev_init - call when binding to device, during probe()
|
||||
* @dev: device structure of pci device |
||||
* @ops: pointer to operations supported by platform driver |
||||
* Will be filled by this function call |
||||
* @rops: pointer to callback functions provided by wil device driver. |
||||
* the platform driver copies the structure contents to its |
||||
* internal storage. May be NULL if device driver does not |
||||
* support rops. |
||||
* @wil_handle: context for wil device driver, will be provided |
||||
* when platform driver invokes any of the callback |
||||
* functions in rops. May be NULL if rops is also NULL |
||||
*/ |
||||
void *msm_11ad_dev_init(struct device *dev, struct wil_platform_ops *ops, |
||||
const struct wil_platform_rops *rops, void *wil_handle); |
||||
|
||||
/* call on insmod */ |
||||
int msm_11ad_modinit(void); |
||||
|
||||
/* call on rmmod */ |
||||
void msm_11ad_modexit(void); |
||||
|
||||
#endif /* __MSM_11AD_H__ */ |
Loading…
Reference in new issue