Skip to contentSkip to conversation

MSM8998 describe wifi hardware

PATCH New Jeffrey Hugo 1 participant 3 messages Nov 7, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover MSM8998 describe wifi hardware

We can describe the wifi hardware for the MSM8998 platforms. The firmware runs on the modem subsystem, which is pending clock changes, so wifi won't be completely functional yet. However, by describing the wifi hardware, we can use it as soon as the modem pieces come in.

Jeffrey Hugo (2):
arm64: dts: qcom: msm8998: Add anoc2 smmu node
arm64: dts: qcom: msm8998: Add wifi node

 .../boot/dts/qcom/msm8998-clamshell.dtsi      |  9 ++++
 arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi     |  9 ++++
 arch/arm64/boot/dts/qcom/msm8998.dtsi         | 50 +++++++++++++++++++
 3 files changed, 68 insertions(+)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 arm64: dts: qcom: msm8998: Add anoc2 smmu node

While there are several peripherals on the anoc2, most are not behind the smmu. However, the SoC integrated wlan block is behind the smmu, so we'll need to control the smmu inorder to enable wifi.

---
 arch/arm64/boot/dts/qcom/msm8998.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/qcom/msm8998.dtsi +19 -0
index fc7838ea9a01..d5263e4f64ce 100644
@@ -847,6 +847,25 @@
 				<GIC_SPI 369 IRQ_TYPE_EDGE_RISING>;
 		};
 
+		anoc2_smmu: iommu@16c0000 {
+			compatible = "qcom,msm8998-smmu-v2", "qcom,smmu-v2";
+			reg = <0x016c0000 0x40000>;
+			#iommu-cells = <1>;
+
+			#global-interrupts = <0>;
+			interrupts =
+				<GIC_SPI 373 IRQ_TYPE_EDGE_RISING>,
+				<GIC_SPI 374 IRQ_TYPE_EDGE_RISING>,
+				<GIC_SPI 375 IRQ_TYPE_EDGE_RISING>,
+				<GIC_SPI 376 IRQ_TYPE_EDGE_RISING>,
+				<GIC_SPI 377 IRQ_TYPE_EDGE_RISING>,
+				<GIC_SPI 378 IRQ_TYPE_EDGE_RISING>,
+				<GIC_SPI 462 IRQ_TYPE_EDGE_RISING>,
+				<GIC_SPI 463 IRQ_TYPE_EDGE_RISING>,
+				<GIC_SPI 464 IRQ_TYPE_EDGE_RISING>,
+				<GIC_SPI 465 IRQ_TYPE_EDGE_RISING>;
+		};
+
 		pcie0: pci@1c00000 {
 			compatible = "qcom,pcie-msm8996";
 			reg =	<0x01c00000 0x2000>,
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 arm64: dts: qcom: msm8998: Add wifi node

In reply to Jeffrey Hugo

Add the wifi node and required reserved memory to enable the wlan hardware. Enable the wifi node in both the mtp and clamshell platforms after adding the relevant regulators for each platform.

---
 .../boot/dts/qcom/msm8998-clamshell.dtsi      |  9 ++++++
 arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi     |  9 ++++++
 arch/arm64/boot/dts/qcom/msm8998.dtsi         | 31 +++++++++++++++++++
 3 files changed, 49 insertions(+)
arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi +9 -0
index 6138b58db6d2..0f84fa0894a4 100644
@@ -292,3 +292,12 @@
 	vdda-phy-supply = <&vreg_l1a_0p875>;
 	vdda-pll-supply = <&vreg_l2a_1p2>;
 };
+
+&wifi {
+	status = "okay";
+
+	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>;
+};
arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi +9 -0
index 5f101a20a20a..1220756fb5b3 100644
@@ -364,3 +364,12 @@
 	vdda-phy-supply = <&vreg_l1a_0p875>;
 	vdda-pll-supply = <&vreg_l2a_1p2>;
 };
+
+&wifi {
+	status = "okay";
+
+	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>;
+};
arch/arm64/boot/dts/qcom/msm8998.dtsi +31 -0
index d5263e4f64ce..e624f0323d23 100644
@@ -43,6 +43,11 @@
 			no-map;
 		};
 
+		wlan_msa_mem: memory@95700000 {
+			reg = <0x0 0x95700000 0x0 0x100000>;
+			no-map;
+		};
+
 		rmtfs {
 			compatible = "qcom,rmtfs-mem";
 
@@ -1889,6 +1894,32 @@
 			redistributor-stride = <0x0 0x20000>;
 			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
 		};
+
+		wifi: wifi@18800000 {
+			compatible = "qcom,wcn3990-wifi";
+			status = "disabled";
+			reg = <0x18800000 0x800000>;
+			reg-names = "membase";
+			memory-region = <&wlan_msa_mem>;
+			clocks = <&rpmcc RPM_SMD_RF_CLK2_PIN>;
+			clock-names = "cxo_ref_clk_pin";
+			interrupts =
+				<GIC_SPI 413 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 414 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 415 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>;
+			iommus = <&anoc2_smmu 0x1900>,
+				 <&anoc2_smmu 0x1901>;
+			qcom,snoc-host-cap-8bit-quirk;
+		};
 	};
 };
 
Signature · 1 line
2.17.1