linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Enable ath10k wcn3990 wifi driver support on sdm845
@ 2018-09-21  9:09 Govind Singh
  2018-09-21  9:09 ` [PATCH 1/4] dt: bindings: add missing dt properties for WCN3990 wifi node Govind Singh
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Govind Singh @ 2018-09-21  9:09 UTC (permalink / raw)
  To: ath10k, robh+dt, andy.gross, devicetree
  Cc: linux-wireless, briannorris, Govind Singh

This series enables ath10k wifi driver support for WCN3990 target
on sdm845 SOC. This series also updates the missing dt binding documentation
and adds optional iommu property.

sdm845 dtsi changes in this series are based on top of
https://patchwork.kernel.org/cover/10573121/ change.

Govind Singh (4):
  dt: bindings: add missing dt properties for WCN3990 wifi node
  dts: arm64/sdm845: Add WCN3990 WLAN module device node
  dt: bindings: add bindings for wifi iommu node
  dts: arm64/sdm845: Enable iommu for WCN3990 wifi module device node

 .../bindings/net/wireless/qcom,ath10k.txt     | 27 ++++++++++++++-----
 arch/arm64/boot/dts/qcom/sdm845-mtp.dts       |  7 +++++
 arch/arm64/boot/dts/qcom/sdm845.dtsi          | 26 ++++++++++++++++++
 3 files changed, 53 insertions(+), 7 deletions(-)

-- 
2.17.0

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] dt: bindings: add missing dt properties for WCN3990 wifi node
  2018-09-21  9:09 [PATCH 0/4] Enable ath10k wcn3990 wifi driver support on sdm845 Govind Singh
@ 2018-09-21  9:09 ` Govind Singh
       [not found]   ` <5baa1b0a.1c69fb81.c0b19.4038@mx.google.com>
  2018-09-21  9:09 ` [PATCH 2/4] dts: arm64/sdm845: Add WCN3990 WLAN module device node Govind Singh
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Govind Singh @ 2018-09-21  9:09 UTC (permalink / raw)
  To: ath10k, robh+dt, andy.gross, devicetree
  Cc: linux-wireless, briannorris, Govind Singh

Add missing optional properties in WCN3990 wifi node.

Signed-off-by: Govind Singh <govinds@codeaurora.org>
---
 .../bindings/net/wireless/qcom,ath10k.txt     | 22 +++++++++++++------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
index 7fd4e8ce4149..22dea7d83ee8 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
@@ -37,12 +37,14 @@ Optional properties:
 - clocks: List of clock specifiers, must contain an entry for each required
           entry in clock-names.
 - clock-names: Should contain the clock names "wifi_wcss_cmd", "wifi_wcss_ref",
-               "wifi_wcss_rtc".
-- interrupts: List of interrupt lines. Must contain an entry
-	      for each entry in the interrupt-names property.
+               "wifi_wcss_rtc", "cxo_ref_clk_pin", "smmu_aggre2_noc_clk".
+- interrupts: List of interrupt lines. Must contain interrupt-names property
+	      per entry for "qcom,ath10k", "qcom,ipq4019-wifi" compatible
+	      targets.
 - interrupt-names: Must include the entries for MSI interrupt
 		   names ("msi0" to "msi15") and legacy interrupt
-		   name ("legacy"),
+		   name ("legacy") for "qcom,ath10k", "qcom,ipq4019-wifi"
+		   compatible targets.
 - qcom,msi_addr: MSI interrupt address.
 - qcom,msi_base: Base value to add before writing MSI data into
 		MSI address register.
@@ -55,7 +57,8 @@ Optional properties:
 - qcom,ath10k-pre-calibration-data : pre calibration data as an array,
 				     the length can vary between hw versions.
 - <supply-name>-supply: handle to the regulator device tree node
-			   optional "supply-name" is "vdd-0.8-cx-mx".
+			   optional "supply-name" are "vdd-0.8-cx-mx",
+			   "vdd-1.8-xo", "vdd-1.3-rfa" and "vdd-3.3-ch0".
 
 Example (to supply the calibration data alone):
 
@@ -133,8 +136,10 @@ wifi@18000000 {
 		compatible = "qcom,wcn3990-wifi";
 		reg = <0x18800000 0x800000>;
 		reg-names = "membase";
-		clocks = <&clock_gcc clk_aggre2_noc_clk>;
-		clock-names = "smmu_aggre2_noc_clk"
+		clocks = <&clock_gcc clk_aggre2_noc_clk>,
+			 <&clock_gcc clk_rf_clk2_pin>;
+		clock-names = "smmu_aggre2_noc_clk",
+			      "cxo_ref_clk_pin";
 		interrupts =
 			   <0 130 0 /* CE0 */ >,
 			   <0 131 0 /* CE1 */ >,
@@ -149,4 +154,7 @@ wifi@18000000 {
 			   <0 140 0 /* CE10 */ >,
 			   <0 141 0 /* CE11 */ >;
 		vdd-0.8-cx-mx-supply = <&pm8998_l5>;
+		vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
+		vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
+		vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
 };
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/4] dts: arm64/sdm845: Add WCN3990 WLAN module device node
  2018-09-21  9:09 [PATCH 0/4] Enable ath10k wcn3990 wifi driver support on sdm845 Govind Singh
  2018-09-21  9:09 ` [PATCH 1/4] dt: bindings: add missing dt properties for WCN3990 wifi node Govind Singh
@ 2018-09-21  9:09 ` Govind Singh
  2018-09-23  2:35   ` kbuild test robot
                     ` (2 more replies)
  2018-09-21  9:09 ` [PATCH 3/4] dt: bindings: add bindings for wifi iommu node Govind Singh
  2018-09-21  9:09 ` [PATCH 4/4] dts: arm64/sdm845: Enable iommu for WCN3990 wifi module device node Govind Singh
  3 siblings, 3 replies; 11+ messages in thread
From: Govind Singh @ 2018-09-21  9:09 UTC (permalink / raw)
  To: ath10k, robh+dt, andy.gross, devicetree
  Cc: linux-wireless, briannorris, Govind Singh

Add device node for the ath10k SNOC platform driver probe
and add resources required for WCN3990 on SDM845 soc.

Signed-off-by: Govind Singh <govinds@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/sdm845-mtp.dts |  7 +++++++
 arch/arm64/boot/dts/qcom/sdm845.dtsi    | 25 +++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
index eedfaf8922e2..4de57f7df93c 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
@@ -440,3 +440,10 @@
 		bias-pull-up;
 	};
 };
+
+&wifi {
+	vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
+	vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
+	vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
+	vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
+};
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index e080072cdfdb..b0b107641e74 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -86,6 +86,11 @@
 			reg = <0 0x86200000 0 0x2d00000>;
 			no-map;
 		};
+
+		wlan_msa_mem: reserved-memory@96700000 {
+			no-map;
+			reg = <0 0x96700000 0 0x100000>;
+		};
 	};
 
 	cpus {
@@ -1200,5 +1205,25 @@
 				status = "disabled";
 			};
 		};
+
+		qcom,wifi {
+			compatible = "qcom,wcn3990-wifi";
+			reg = <0x18800000 0x800000>;
+			reg-names = "membase";
+			memory-region = <&wlan_msa_mem>;
+			interrupts =
+				<0 413 0 /* CE0 */ >,
+				<0 414 0 /* CE1 */ >,
+				<0 415 0 /* CE2 */ >,
+				<0 416 0 /* CE3 */ >,
+				<0 417 0 /* CE4 */ >,
+				<0 418 0 /* CE5 */ >,
+				<0 420 0 /* CE6 */ >,
+				<0 421 0 /* CE7 */ >,
+				<0 422 0 /* CE8 */ >,
+				<0 423 0 /* CE9 */ >,
+				<0 424 0 /* CE10 */ >,
+				<0 425 0 /* CE11 */ >;
+		};
 	};
 };
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/4] dt: bindings: add bindings for wifi iommu node
  2018-09-21  9:09 [PATCH 0/4] Enable ath10k wcn3990 wifi driver support on sdm845 Govind Singh
  2018-09-21  9:09 ` [PATCH 1/4] dt: bindings: add missing dt properties for WCN3990 wifi node Govind Singh
  2018-09-21  9:09 ` [PATCH 2/4] dts: arm64/sdm845: Add WCN3990 WLAN module device node Govind Singh
@ 2018-09-21  9:09 ` Govind Singh
       [not found]   ` <5baa1b0b.1c69fb81.79d38.4171@mx.google.com>
  2018-09-21  9:09 ` [PATCH 4/4] dts: arm64/sdm845: Enable iommu for WCN3990 wifi module device node Govind Singh
  3 siblings, 1 reply; 11+ messages in thread
From: Govind Singh @ 2018-09-21  9:09 UTC (permalink / raw)
  To: ath10k, robh+dt, andy.gross, devicetree
  Cc: linux-wireless, briannorris, Govind Singh

WCN3990 wifi module can optionally make use of the IOMMU.
Add binding documentation for phandle to the IOMMU and
the stream id of wifi iommu block.

Signed-off-by: Govind Singh <govinds@codeaurora.org>
---
 .../devicetree/bindings/net/wireless/qcom,ath10k.txt         | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
index 22dea7d83ee8..07e58008c665 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
@@ -59,6 +59,10 @@ Optional properties:
 - <supply-name>-supply: handle to the regulator device tree node
 			   optional "supply-name" are "vdd-0.8-cx-mx",
 			   "vdd-1.8-xo", "vdd-1.3-rfa" and "vdd-3.3-ch0".
+- iommus:
+	Usage: optional
+	Value type: <prop-encoded-array>
+	Definition: A list of phandle and IOMMU specifier pairs.
 
 Example (to supply the calibration data alone):
 
@@ -157,4 +161,5 @@ wifi@18000000 {
 		vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
 		vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
 		vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
+		iommus = <&apps_smmu 0x0040 0x1>;
 };
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] dts: arm64/sdm845: Enable iommu for WCN3990 wifi module device node
  2018-09-21  9:09 [PATCH 0/4] Enable ath10k wcn3990 wifi driver support on sdm845 Govind Singh
                   ` (2 preceding siblings ...)
  2018-09-21  9:09 ` [PATCH 3/4] dt: bindings: add bindings for wifi iommu node Govind Singh
@ 2018-09-21  9:09 ` Govind Singh
  3 siblings, 0 replies; 11+ messages in thread
From: Govind Singh @ 2018-09-21  9:09 UTC (permalink / raw)
  To: ath10k, robh+dt, andy.gross, devicetree
  Cc: linux-wireless, briannorris, Govind Singh

WCN3990 wifi module can optionally make use of the IOMMU.
Add phandle to the iommu and stream id of wifi iommu block.

Signed-off-by: Govind Singh <govinds@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index b0b107641e74..5f5848cb1699 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -1224,6 +1224,7 @@
 				<0 423 0 /* CE9 */ >,
 				<0 424 0 /* CE10 */ >,
 				<0 425 0 /* CE11 */ >;
+			iommus = <&apps_smmu 0x0040 0x1>;
 		};
 	};
 };
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] dts: arm64/sdm845: Add WCN3990 WLAN module device node
  2018-09-21  9:09 ` [PATCH 2/4] dts: arm64/sdm845: Add WCN3990 WLAN module device node Govind Singh
@ 2018-09-23  2:35   ` kbuild test robot
  2018-09-23  6:04   ` kbuild test robot
  2018-09-24 17:11   ` Brian Norris
  2 siblings, 0 replies; 11+ messages in thread
From: kbuild test robot @ 2018-09-23  2:35 UTC (permalink / raw)
  To: Govind Singh
  Cc: kbuild-all, ath10k, robh+dt, andy.gross, devicetree,
	linux-wireless, briannorris, Govind Singh

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

Hi Govind,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on agross/for-next]
[also build test ERROR on v4.19-rc4 next-20180921]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Govind-Singh/Enable-ath10k-wcn3990-wifi-driver-support-on-sdm845/20180923-061400
base:   https://git.kernel.org/pub/scm/linux/kernel/git/agross/linux.git for-next
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=arm64 

All errors (new ones prefixed by >>):

   Error: arch/arm64/boot/dts/qcom/sdm845-mtp.dts:62.1-6 Label or path wifi not found
>> FATAL ERROR: Syntax error parsing input tree

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39543 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] dts: arm64/sdm845: Add WCN3990 WLAN module device node
  2018-09-21  9:09 ` [PATCH 2/4] dts: arm64/sdm845: Add WCN3990 WLAN module device node Govind Singh
  2018-09-23  2:35   ` kbuild test robot
@ 2018-09-23  6:04   ` kbuild test robot
  2018-09-24 17:11   ` Brian Norris
  2 siblings, 0 replies; 11+ messages in thread
From: kbuild test robot @ 2018-09-23  6:04 UTC (permalink / raw)
  To: Govind Singh
  Cc: kbuild-all, ath10k, robh+dt, andy.gross, devicetree,
	linux-wireless, briannorris, Govind Singh

[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]

Hi Govind,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on agross/for-next]
[also build test ERROR on v4.19-rc4 next-20180921]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Govind-Singh/Enable-ath10k-wcn3990-wifi-driver-support-on-sdm845/20180923-061400
base:   https://git.kernel.org/pub/scm/linux/kernel/git/agross/linux.git for-next
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=arm64 

All errors (new ones prefixed by >>):

>> Error: arch/arm64/boot/dts/qcom/sdm845-mtp.dts:62.1-6 Label or path wifi not found
   FATAL ERROR: Syntax error parsing input tree

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59906 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] dts: arm64/sdm845: Add WCN3990 WLAN module device node
  2018-09-21  9:09 ` [PATCH 2/4] dts: arm64/sdm845: Add WCN3990 WLAN module device node Govind Singh
  2018-09-23  2:35   ` kbuild test robot
  2018-09-23  6:04   ` kbuild test robot
@ 2018-09-24 17:11   ` Brian Norris
  2018-09-25 12:15     ` Govind Singh
  2 siblings, 1 reply; 11+ messages in thread
From: Brian Norris @ 2018-09-24 17:11 UTC (permalink / raw)
  To: Govind Singh; +Cc: ath10k, robh+dt, andy.gross, devicetree, linux-wireless

Hi,

On Fri, Sep 21, 2018 at 02:39:05PM +0530, Govind Singh wrote:
> Add device node for the ath10k SNOC platform driver probe
> and add resources required for WCN3990 on SDM845 soc.
> 
> Signed-off-by: Govind Singh <govinds@codeaurora.org>
> ---
>  arch/arm64/boot/dts/qcom/sdm845-mtp.dts |  7 +++++++
>  arch/arm64/boot/dts/qcom/sdm845.dtsi    | 25 +++++++++++++++++++++++++
>  2 files changed, 32 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
> index eedfaf8922e2..4de57f7df93c 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
> @@ -440,3 +440,10 @@
>  		bias-pull-up;
>  	};
>  };
> +
> +&wifi {

As the bots have already told you, you missed adding a 'wifi' label to
sdm845.dtsi, so this reference doesn't compile.

> +	vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
> +	vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
> +	vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
> +	vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
> +};
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index e080072cdfdb..b0b107641e74 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -86,6 +86,11 @@
>  			reg = <0 0x86200000 0 0x2d00000>;
>  			no-map;
>  		};
> +
> +		wlan_msa_mem: reserved-memory@96700000 {
> +			no-map;
> +			reg = <0 0x96700000 0 0x100000>;
> +		};
>  	};
>  
>  	cpus {
> @@ -1200,5 +1205,25 @@
>  				status = "disabled";
>  			};
>  		};
> +
> +		qcom,wifi {

That's not a legit node name. Nodes should (a) have a generic name and
(b) include a unit address when the node contains a 'reg' property. [1]

So, how about 'wifi@18800000'? (And include the 'wifi:' label, since you
want to refer to it in other files.)

Also, this seems like the kind of device that should remain 'status =
"disabled"' in the top-level DTSI, and be overridden with 'status =
"okay"' in the child DTS.

Brian

[1] See:
https://elinux.org/Device_Tree_Usage#Node_Names
https://elinux.org/images/c/cf/Power_ePAPR_APPROVED_v1.1.pdf

> +			compatible = "qcom,wcn3990-wifi";
> +			reg = <0x18800000 0x800000>;
> +			reg-names = "membase";
> +			memory-region = <&wlan_msa_mem>;
> +			interrupts =
> +				<0 413 0 /* CE0 */ >,
> +				<0 414 0 /* CE1 */ >,
> +				<0 415 0 /* CE2 */ >,
> +				<0 416 0 /* CE3 */ >,
> +				<0 417 0 /* CE4 */ >,
> +				<0 418 0 /* CE5 */ >,
> +				<0 420 0 /* CE6 */ >,
> +				<0 421 0 /* CE7 */ >,
> +				<0 422 0 /* CE8 */ >,
> +				<0 423 0 /* CE9 */ >,
> +				<0 424 0 /* CE10 */ >,
> +				<0 425 0 /* CE11 */ >;
> +		};
>  	};
>  };
> -- 
> 2.17.0
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] dt: bindings: add missing dt properties for WCN3990 wifi node
       [not found]   ` <5baa1b0a.1c69fb81.c0b19.4038@mx.google.com>
@ 2018-09-25 12:08     ` Govind Singh
  0 siblings, 0 replies; 11+ messages in thread
From: Govind Singh @ 2018-09-25 12:08 UTC (permalink / raw)
  To: Rob Herring; +Cc: ath10k, andy.gross, devicetree, linux-wireless, briannorris

Hi Rob,

On 2018-09-25 04:21, Rob Herring wrote:
> On Fri, Sep 21, 2018 at 02:39:04PM +0530, Govind Singh wrote:
>> Add missing optional properties in WCN3990 wifi node.
>> 
>> Signed-off-by: Govind Singh <govinds@codeaurora.org>
>> ---
>>  .../bindings/net/wireless/qcom,ath10k.txt     | 22 
>> +++++++++++++------
>>  1 file changed, 15 insertions(+), 7 deletions(-)
>> 
>> diff --git 
>> a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt 
>> b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
>> index 7fd4e8ce4149..22dea7d83ee8 100644
>> --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
>> +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
>> @@ -37,12 +37,14 @@ Optional properties:
>>  - clocks: List of clock specifiers, must contain an entry for each 
>> required
>>            entry in clock-names.
>>  - clock-names: Should contain the clock names "wifi_wcss_cmd", 
>> "wifi_wcss_ref",
>> -               "wifi_wcss_rtc".
>> -- interrupts: List of interrupt lines. Must contain an entry
>> -	      for each entry in the interrupt-names property.
>> +               "wifi_wcss_rtc", "cxo_ref_clk_pin", 
>> "smmu_aggre2_noc_clk".
>> +- interrupts: List of interrupt lines. Must contain interrupt-names 
>> property
>> +	      per entry for "qcom,ath10k", "qcom,ipq4019-wifi" compatible
>> +	      targets.
> 
> It would be clearer to list how many interrupts for each set of
> compatibles.
> 

Sure, I will address this in next revision.

>>  - interrupt-names: Must include the entries for MSI interrupt
>>  		   names ("msi0" to "msi15") and legacy interrupt
>> -		   name ("legacy"),
>> +		   name ("legacy") for "qcom,ath10k", "qcom,ipq4019-wifi"
>> +		   compatible targets.
> 
> So no legacy interrupt for wcn3990?
> 

Yes, no legacy interrupt for wcn3990.

>>  - qcom,msi_addr: MSI interrupt address.
>>  - qcom,msi_base: Base value to add before writing MSI data into
>>  		MSI address register.
>> @@ -55,7 +57,8 @@ Optional properties:
>>  - qcom,ath10k-pre-calibration-data : pre calibration data as an 
>> array,
>>  				     the length can vary between hw versions.
>>  - <supply-name>-supply: handle to the regulator device tree node
>> -			   optional "supply-name" is "vdd-0.8-cx-mx".
>> +			   optional "supply-name" are "vdd-0.8-cx-mx",
>> +			   "vdd-1.8-xo", "vdd-1.3-rfa" and "vdd-3.3-ch0".
>> 
>>  Example (to supply the calibration data alone):
>> 
>> @@ -133,8 +136,10 @@ wifi@18000000 {
>>  		compatible = "qcom,wcn3990-wifi";
>>  		reg = <0x18800000 0x800000>;
>>  		reg-names = "membase";
>> -		clocks = <&clock_gcc clk_aggre2_noc_clk>;
>> -		clock-names = "smmu_aggre2_noc_clk"
>> +		clocks = <&clock_gcc clk_aggre2_noc_clk>,
>> +			 <&clock_gcc clk_rf_clk2_pin>;
>> +		clock-names = "smmu_aggre2_noc_clk",
>> +			      "cxo_ref_clk_pin";
> 
> The binding now says there should be 5 clocks...
> 

Only 2 clocks are applicable for wcn3990. I will list no of clocks for 
each set of compatible for more clarity.

>>  		interrupts =
>>  			   <0 130 0 /* CE0 */ >,
>>  			   <0 131 0 /* CE1 */ >,
>> @@ -149,4 +154,7 @@ wifi@18000000 {
>>  			   <0 140 0 /* CE10 */ >,
>>  			   <0 141 0 /* CE11 */ >;
>>  		vdd-0.8-cx-mx-supply = <&pm8998_l5>;
>> +		vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
>> +		vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
>> +		vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
>>  };
>> --
>> 2.17.0
>> 

Thanks,
Govind

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/4] dt: bindings: add bindings for wifi iommu node
       [not found]   ` <5baa1b0b.1c69fb81.79d38.4171@mx.google.com>
@ 2018-09-25 12:09     ` Govind Singh
  0 siblings, 0 replies; 11+ messages in thread
From: Govind Singh @ 2018-09-25 12:09 UTC (permalink / raw)
  To: Rob Herring; +Cc: ath10k, andy.gross, devicetree, linux-wireless, briannorris

On 2018-09-25 04:23, Rob Herring wrote:
> On Fri, Sep 21, 2018 at 02:39:06PM +0530, Govind Singh wrote:
>> WCN3990 wifi module can optionally make use of the IOMMU.
> 
> Can the other compatibles use IOMMU too?
> 

No, only wcn3990 can optionally use IOMMU.

>> Add binding documentation for phandle to the IOMMU and
>> the stream id of wifi iommu block.
>> 
>> Signed-off-by: Govind Singh <govinds@codeaurora.org>
>> ---
>>  .../devicetree/bindings/net/wireless/qcom,ath10k.txt         | 5 
>> +++++
>>  1 file changed, 5 insertions(+)
>> 
>> diff --git 
>> a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt 
>> b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
>> index 22dea7d83ee8..07e58008c665 100644
>> --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
>> +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
>> @@ -59,6 +59,10 @@ Optional properties:
>>  - <supply-name>-supply: handle to the regulator device tree node
>>  			   optional "supply-name" are "vdd-0.8-cx-mx",
>>  			   "vdd-1.8-xo", "vdd-1.3-rfa" and "vdd-3.3-ch0".
>> +- iommus:
>> +	Usage: optional
>> +	Value type: <prop-encoded-array>
>> +	Definition: A list of phandle and IOMMU specifier pairs.
>> 
>>  Example (to supply the calibration data alone):
>> 
>> @@ -157,4 +161,5 @@ wifi@18000000 {
>>  		vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
>>  		vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
>>  		vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
>> +		iommus = <&apps_smmu 0x0040 0x1>;
>>  };
>> --
>> 2.17.0
>> 

BR,
Govind

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] dts: arm64/sdm845: Add WCN3990 WLAN module device node
  2018-09-24 17:11   ` Brian Norris
@ 2018-09-25 12:15     ` Govind Singh
  0 siblings, 0 replies; 11+ messages in thread
From: Govind Singh @ 2018-09-25 12:15 UTC (permalink / raw)
  To: Brian Norris; +Cc: ath10k, robh+dt, andy.gross, devicetree, linux-wireless

Hi Brian,

On 2018-09-24 22:41, Brian Norris wrote:
> Hi,
> 
> On Fri, Sep 21, 2018 at 02:39:05PM +0530, Govind Singh wrote:
>> Add device node for the ath10k SNOC platform driver probe
>> and add resources required for WCN3990 on SDM845 soc.
>> 
>> Signed-off-by: Govind Singh <govinds@codeaurora.org>
>> ---
>>  arch/arm64/boot/dts/qcom/sdm845-mtp.dts |  7 +++++++
>>  arch/arm64/boot/dts/qcom/sdm845.dtsi    | 25 
>> +++++++++++++++++++++++++
>>  2 files changed, 32 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts 
>> b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
>> index eedfaf8922e2..4de57f7df93c 100644
>> --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
>> +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
>> @@ -440,3 +440,10 @@
>>  		bias-pull-up;
>>  	};
>>  };
>> +
>> +&wifi {
> 
> As the bots have already told you, you missed adding a 'wifi' label to
> sdm845.dtsi, so this reference doesn't compile.
> 

Yes, I will correct this in next revision.

>> +	vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
>> +	vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
>> +	vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
>> +	vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
>> +};
>> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi 
>> b/arch/arm64/boot/dts/qcom/sdm845.dtsi
>> index e080072cdfdb..b0b107641e74 100644
>> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
>> @@ -86,6 +86,11 @@
>>  			reg = <0 0x86200000 0 0x2d00000>;
>>  			no-map;
>>  		};
>> +
>> +		wlan_msa_mem: reserved-memory@96700000 {
>> +			no-map;
>> +			reg = <0 0x96700000 0 0x100000>;
>> +		};
>>  	};
>> 
>>  	cpus {
>> @@ -1200,5 +1205,25 @@
>>  				status = "disabled";
>>  			};
>>  		};
>> +
>> +		qcom,wifi {
> 
> That's not a legit node name. Nodes should (a) have a generic name and
> (b) include a unit address when the node contains a 'reg' property. [1]
> 
> So, how about 'wifi@18800000'? (And include the 'wifi:' label, since 
> you
> want to refer to it in other files.)
> 

I am fine with 'wifi@18800000'.

> Also, this seems like the kind of device that should remain 'status =
> "disabled"' in the top-level DTSI, and be overridden with 'status =
> "okay"' in the child DTS.
> 

Sure, i will populate  'status = "disabled"' in next revision, which can 
be enabled from child dtsi
as part of separate change.

> Brian
> 
> [1] See:
> https://elinux.org/Device_Tree_Usage#Node_Names
> https://elinux.org/images/c/cf/Power_ePAPR_APPROVED_v1.1.pdf
> 
>> +			compatible = "qcom,wcn3990-wifi";
>> +			reg = <0x18800000 0x800000>;
>> +			reg-names = "membase";
>> +			memory-region = <&wlan_msa_mem>;
>> +			interrupts =
>> +				<0 413 0 /* CE0 */ >,
>> +				<0 414 0 /* CE1 */ >,
>> +				<0 415 0 /* CE2 */ >,
>> +				<0 416 0 /* CE3 */ >,
>> +				<0 417 0 /* CE4 */ >,
>> +				<0 418 0 /* CE5 */ >,
>> +				<0 420 0 /* CE6 */ >,
>> +				<0 421 0 /* CE7 */ >,
>> +				<0 422 0 /* CE8 */ >,
>> +				<0 423 0 /* CE9 */ >,
>> +				<0 424 0 /* CE10 */ >,
>> +				<0 425 0 /* CE11 */ >;
>> +		};
>>  	};
>>  };
>> --
>> 2.17.0
>> 

Thanks,
Govind

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-09-25 12:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-21  9:09 [PATCH 0/4] Enable ath10k wcn3990 wifi driver support on sdm845 Govind Singh
2018-09-21  9:09 ` [PATCH 1/4] dt: bindings: add missing dt properties for WCN3990 wifi node Govind Singh
     [not found]   ` <5baa1b0a.1c69fb81.c0b19.4038@mx.google.com>
2018-09-25 12:08     ` Govind Singh
2018-09-21  9:09 ` [PATCH 2/4] dts: arm64/sdm845: Add WCN3990 WLAN module device node Govind Singh
2018-09-23  2:35   ` kbuild test robot
2018-09-23  6:04   ` kbuild test robot
2018-09-24 17:11   ` Brian Norris
2018-09-25 12:15     ` Govind Singh
2018-09-21  9:09 ` [PATCH 3/4] dt: bindings: add bindings for wifi iommu node Govind Singh
     [not found]   ` <5baa1b0b.1c69fb81.79d38.4171@mx.google.com>
2018-09-25 12:09     ` Govind Singh
2018-09-21  9:09 ` [PATCH 4/4] dts: arm64/sdm845: Enable iommu for WCN3990 wifi module device node Govind Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).