diff options
| -rw-r--r-- | Documentation/devicetree/bindings/net/wireless/qcom,wcn3990-wifi.txt | 20 | ||||
| -rw-r--r-- | arch/arm/boot/dts/qcom/msm8998.dtsi | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/snoc.c | 30 |
3 files changed, 38 insertions, 14 deletions
diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,wcn3990-wifi.txt b/Documentation/devicetree/bindings/net/wireless/qcom,wcn3990-wifi.txt index 626ca2124366..acc850773210 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,wcn3990-wifi.txt +++ b/Documentation/devicetree/bindings/net/wireless/qcom,wcn3990-wifi.txt @@ -9,8 +9,26 @@ receive(RX)/transmit(TX) control. Required properties: - compatible: "qcom,wcn3990-wifi"; + - reg: Memory regions defined as starting address and size + - reg-names: Names of the memory regions defined in reg entry + - interrupts: Copy engine interrupt table Example: - qcom,msm_ath10k@18000000 { + msm_ath10k_wlan: qcom,msm_ath10k_wlan@18800000 { compatible = "qcom,wcn3990-wifi"; + reg = <0x18800000 0x800000>; + reg-names = "membase"; + interrupts = + <0 130 0 /* CE0 */ >, + <0 131 0 /* CE1 */ >, + <0 132 0 /* CE2 */ >, + <0 133 0 /* CE3 */ >, + <0 134 0 /* CE4 */ >, + <0 135 0 /* CE5 */ >, + <0 136 0 /* CE6 */ >, + <0 137 0 /* CE7 */ >, + <0 138 0 /* CE8 */ >, + <0 139 0 /* CE9 */ >, + <0 140 0 /* CE10 */ >, + <0 141 0 /* CE11 */ >; }; diff --git a/arch/arm/boot/dts/qcom/msm8998.dtsi b/arch/arm/boot/dts/qcom/msm8998.dtsi index 66ca39ee6ebc..02b7a44ee0d2 100644 --- a/arch/arm/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm/boot/dts/qcom/msm8998.dtsi @@ -3068,6 +3068,8 @@ msm_ath10k_wlan: qcom,msm_ath10k_wlan { status = "disabled"; compatible = "qcom,wcn3990-wifi"; + reg = <0x18800000 0x800000>; + reg-names = "membase"; interrupts = <0 413 0 /* CE0 */ >, <0 414 0 /* CE1 */ >, diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index d24c09455e41..dc5f6fdaa9dc 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -1002,24 +1002,28 @@ static void ath10k_snoc_free_irq(struct ath10k *ar) static int ath10k_snoc_get_soc_info(struct ath10k *ar) { - int ret; - struct icnss_soc_info soc_info; + struct resource *res; struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); + struct platform_device *pdev; - memset(&soc_info, 0, sizeof(soc_info)); - - ret = icnss_get_soc_info(&soc_info); - if (ret < 0) { - ath10k_err(ar, "%s: icnss_get_soc_info error = %d", - __func__, ret); - return ret; + pdev = ar_snoc->dev; + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "membase"); + if (!res) { + ath10k_err(ar, "Memory base not found in DT\n"); + return -EINVAL; } - ar_snoc->mem = soc_info.v_addr; - ar_snoc->mem_pa = soc_info.p_addr; + ar_snoc->mem_pa = res->start; + ar_snoc->mem = devm_ioremap(&pdev->dev, ar_snoc->mem_pa, + resource_size(res)); + if (!ar_snoc->mem) { + ath10k_err(ar, "Memory base ioremap failed: phy addr: %pa\n", + &ar_snoc->mem_pa); + return -EINVAL; + } - ar_snoc->target_info.soc_version = soc_info.soc_id; - ar_snoc->target_info.target_version = soc_info.soc_id; + ar_snoc->target_info.soc_version = ATH10K_HW_WCN3990; + ar_snoc->target_info.target_version = ATH10K_HW_WCN3990; ar_snoc->target_info.target_revision = 0; ath10k_dbg(ar, ATH10K_DBG_SNOC, |
