sw5100: Integrate LW 2.0 r00078.3a

Bug: 280095980
Change-Id: Id2282652a55055695d7f1e4b449b1d73b32bd16b
Signed-off-by: Daniel Price <danielprice@google.com>
diff --git a/Kbuild b/Kbuild
index 47b35f5..02ecacc 100755
--- a/Kbuild
+++ b/Kbuild
@@ -39,8 +39,10 @@
 ifeq ($(CONFIG_QTI_QUIN_GVM),y)
 dtbo-y += sa8155p-vm-cnss.dtbo
 dtbo-y += sa8195p-vm-cnss.dtbo
+dtbo-y += sa8255p-vm-cnss.dtbo
 dtbo-y += sa8295p-vm-cnss.dtbo
 dtbo-y += direwolf-vm-dual-cnss.dtbo
+dtbo-y += lemans-vm-cnss.dtbo
 endif
 
 ifeq ($(CONFIG_ARCH_SA525),y)
diff --git a/kona-iot-vc-cnss.dts b/kona-iot-vc-cnss.dts
index 20245e9..803a8bf 100755
--- a/kona-iot-vc-cnss.dts
+++ b/kona-iot-vc-cnss.dts
@@ -4,8 +4,6 @@
 #include "kona-iot-vc-cnss.dtsi"
 
 / {
-	model = "Qualcomm Technologies, Inc. kona-iot VC";
 	compatible = "qcom,kona-iot";
-	qcom,board-id = <0x010020 0x07>;
-	qcom,msm-id = <0x1e1 0x20001>;
+	qcom,board-id = <0x010020 0x07>, <0x301000b 0x00>;
 };
diff --git a/lemans-vm-cnss.dts b/lemans-vm-cnss.dts
new file mode 100755
index 0000000..b2e9503
--- /dev/null
+++ b/lemans-vm-cnss.dts
@@ -0,0 +1,11 @@
+/dts-v1/;
+/plugin/;
+
+#include "lemans-vm-cnss.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. LeMans Single Linux Virtual Machine";
+	compatible = "qcom,lemans", "qcom,quinvm";
+	qcom,msm-id = <532 0x20000>, <534 0x20000>;
+	qcom,board-id = <0x0 0x1000002>;
+};
diff --git a/lemans-vm-cnss.dtsi b/lemans-vm-cnss.dtsi
new file mode 100755
index 0000000..a78d738
--- /dev/null
+++ b/lemans-vm-cnss.dtsi
@@ -0,0 +1,104 @@
+#include <dt-bindings/interconnect/qcom,lemans.h>
+
+&pm8775_2_gpios {
+	cnss_pins: cnss_pins {
+		cnss_wlan_en_active: cnss_wlan_en_active {
+			mux {
+				pins = "gpio7";
+				function = "normal";
+			};
+
+			config {
+				pins = "gpio7";
+				output-high;
+				bias-pull-up;
+			};
+		};
+
+		cnss_wlan_en_sleep: cnss_wlan_en_sleep {
+			mux {
+				pins = "gpio7";
+				function = "normal";
+			};
+
+			config {
+				pins = "gpio7";
+				output-low;
+				bias-pull-down;
+			};
+		};
+	};
+};
+
+&soc {
+	cnss_pcie: qcom,cnss-qca-converged {
+		compatible = "qcom,cnss-qca-converged";
+		qcom,wlan-rc-num = <0>;
+		qcom,wlan;
+		qcom,multi-wlan-exchg;
+		qcom,bus-type=<0>;
+		qcom,notify-modem-status;
+
+		#address-cells=<1>;
+		#size-cells=<1>;
+		ranges = <0xb0000000 0xb0000000 0x10000>;
+
+		vdd-wlan-ctrl1-supply = <&vreg_conn_pa>;
+		vdd-wlan-vl-supply = <&pm8775_c_l2>;
+		vdd-wlan-vm-supply = <&pm8775_e_l6>;
+		vdd-wlan-vh-supply = <&pm8775_a_s5>;
+
+		wlan_vregs = "vdd-wlan-ctrl1", "vdd-wlan-vl",
+				"vdd-wlan-vm", "vdd-wlan-vh";
+		qcom,vdd-wlan-ctrl1-config = <0 0 0 0 0>;
+		/* no vote-off as sw_ctrl is not supported */
+		qcom,vdd-wlan-vl-config = <1055000 1055000 0 0 0>;
+		qcom,vdd-wlan-vm-config = <1350000 1350000 450000 0 0>;
+		qcom,vdd-wlan-vh-config = <1900000 1900000 450000 0 0>;
+		wlan-en-gpio = <&pm8775_2_gpios 7 0>;
+		qcom,bt-en-gpio = <&pm8775_2_gpios 8 0>;
+		pinctrl-names = "wlan_en_active", "wlan_en_sleep";
+		pinctrl-0 = <&cnss_wlan_en_active>;
+		pinctrl-1 = <&cnss_wlan_en_sleep>;
+
+		chip_cfg@0 {
+			supported-ids = <0x1101>;
+			wlan_vregs;
+
+			qcom,wlan-ramdump-dynamic = <0x400000>;
+		};
+
+		chip_cfg@1 {
+			supported-ids = <0x1102>;
+			wlan_vregs;
+
+			qcom,wlan-ramdump-dynamic = <0x400000>;
+		};
+
+		chip_cfg@2 {
+			supported-ids = <0x1103>;
+			wlan_vregs;
+			qcom,wlan-ramdump-dynamic = <0x420000>;
+		};
+	};
+};
+
+&pcie0_rp {
+	#address-cells = <5>;
+	#size-cells = <0>;
+	cnss_pci: cnss_pci {
+		reg = <0 0 0 0 0>;
+		qcom,iommu-group = <&cnss_pci_iommu_group>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		cnss_pci_iommu_group: cnss_pci_iommu_group {
+		qcom,iommu-dma-addr-pool = <0xa0000000 0x10000000>;
+		qcom,iommu-dma = "atomic";
+		qcom,iommu-pagetable = "coherent";
+		qcom,iommu-faults = "stall-disable", "HUPCF", "no-CFRE",
+			 "non-fatal";
+		};
+	};
+};
diff --git a/sa525m-cnss.dtsi b/sa525m-cnss.dtsi
index 7b55fb7..d3833e5 100755
--- a/sa525m-cnss.dtsi
+++ b/sa525m-cnss.dtsi
@@ -12,12 +12,19 @@
 		reg = <0xb0000000 0x10000>;
 		reg-names = "smmu_iova_ipa";
 
-		vdd-wlan-rfa1-supply = <&pmx75_l6>;
-		vdd-wlan-supply = <&vreg_conn_pa>;
+		vdd-wlan-ctrl1-supply = <&vreg_conn_pa>;
+		vdd-wlan-io-supply = <&pmx75_l6>;
+		vdd-wlan-rfa1-supply = <&pmx75_s7>;
+		vdd-wlan-rfa2-supply = <&pmx75_s2>;
+		vdd-wlan-rfa3-supply = <&pmx75_s4>;
 
-		wlan_vregs = "vdd-wlan-rfa1", "vdd-wlan";
-		qcom,vdd-wlan-config = <0 0 0 0 0>;
-		qcom,vdd-wlan-rfa1-config = <1800000 1800000 0 0 0>;
+		wlan_vregs = "vdd-wlan-ctrl1", "vdd-wlan-io", "vdd-wlan-rfa1",
+				"vdd-wlan-rfa2", "vdd-wlan-rfa3";
+		qcom,vdd-wlan-ctrl1-config = <0 0 0 0 0>;
+		qcom,vdd-wlan-io-config = <1800000 1800000 0 0 0>;
+		qcom,vdd-wlan-rfa1-config = <1000000 1000000 0 0 0>;
+		qcom,vdd-wlan-rfa2-config = <1300000 1300000 0 0 0>;
+		qcom,vdd-wlan-rfa3-config = <1904000 1904000 450000 0 0>;
 		wlan-en-gpio = <&pmk8550_gpios 3 0>;
 		pinctrl-names = "wlan_en_active", "wlan_en_sleep";
 		pinctrl-0 = <&wlan_en_active>;
@@ -25,9 +32,131 @@
 
 		chip_cfg@0 {
 			supported-ids = <0x003e>;
-			wlan_vregs;
 			qcom,wlan-ramdump-dynamic = <0x400000>;
 		};
+
+		chip_cfg@1 {
+			reg = <0xb0000000 0x10000>;
+			reg-names = "smmu_iova_ipa";
+			supported-ids = <0x1103>;
+			qcom,wlan-ramdump-dynamic = <0x400000>;
+			mhi,max-channels = <30>;
+			mhi,buffer-len = <0x8000>;
+			mhi,timeout = <10000>;
+			qcom,smmu-s1-enable;
+			pcie-disable-l1ss;
+
+			mhi_channels {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				mhi_chan@0 {
+					reg = <0>;
+					label = "LOOPBACK";
+					mhi,num-elements = <32>;
+					mhi,event-ring = <1>;
+					mhi,chan-dir = <1>;
+					mhi,data-type = <0>;
+					mhi,doorbell-mode = <2>;
+					mhi,ee = <0x14>;
+				};
+
+				mhi_chan@1 {
+					reg = <1>;
+					label = "LOOPBACK";
+					mhi,num-elements = <32>;
+					mhi,event-ring = <1>;
+					mhi,chan-dir = <2>;
+					mhi,data-type = <0>;
+					mhi,doorbell-mode = <2>;
+					mhi,ee = <0x14>;
+				};
+
+				mhi_chan@4 {
+					reg = <4>;
+					label = "DIAG";
+					mhi,num-elements = <32>;
+					mhi,event-ring = <1>;
+					mhi,chan-dir = <1>;
+					mhi,data-type = <0>;
+					mhi,doorbell-mode = <2>;
+					mhi,ee = <0x14>;
+				};
+
+				mhi_chan@5 {
+					reg = <5>;
+					label = "DIAG";
+					mhi,num-elements = <32>;
+					mhi,event-ring = <1>;
+					mhi,chan-dir = <2>;
+					mhi,data-type = <0>;
+					mhi,doorbell-mode = <2>;
+					mhi,ee = <0x14>;
+				};
+
+				mhi_chan@20 {
+					reg = <20>;
+					label = "IPCR";
+					mhi,num-elements = <32>;
+					mhi,event-ring = <1>;
+					mhi,chan-dir = <1>;
+					mhi,data-type = <1>;
+					mhi,doorbell-mode = <2>;
+					mhi,ee = <0x14>;
+					mhi,auto-start;
+				};
+
+				mhi_chan@21 {
+					reg = <21>;
+					label = "IPCR";
+					mhi,num-elements = <32>;
+					mhi,event-ring = <1>;
+					mhi,chan-dir = <2>;
+					mhi,data-type = <0>;
+					mhi,doorbell-mode = <2>;
+					mhi,ee = <0x14>;
+					mhi,auto-queue;
+					mhi,auto-start;
+				};
+			};
+
+			mhi_events {
+				mhi_event@0 {
+					mhi,num-elements = <32>;
+					mhi,intmod = <1>;
+					mhi,msi = <1>;
+					mhi,priority = <1>;
+					mhi,brstmode = <2>;
+					mhi,data-type = <1>;
+				};
+
+				mhi_event@1 {
+					mhi,num-elements = <256>;
+					mhi,intmod = <1>;
+					mhi,msi = <2>;
+					mhi,priority = <1>;
+					mhi,brstmode = <2>;
+				};
+
+				mhi_event@2 {
+					mhi,num-elements = <32>;
+					mhi,intmod = <1>;
+					mhi,msi = <0>;
+					mhi,priority = <2>;
+					mhi,brstmode = <2>;
+					mhi,data-type = <3>;
+				};
+
+			};
+
+			mhi_devices {
+				mhi_qrtr {
+					mhi,chan = "IPCR";
+					qcom,net-id = <0>;
+					qcom,low-latency;
+					mhi,early-notify;
+				};
+			};
+		};
 	};
 };
 
diff --git a/sa8255p-vm-cnss.dts b/sa8255p-vm-cnss.dts
new file mode 100755
index 0000000..bab02d1
--- /dev/null
+++ b/sa8255p-vm-cnss.dts
@@ -0,0 +1,11 @@
+/dts-v1/;
+/plugin/;
+
+#include "sa8255p-vm-cnss.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. Lemans IVI ADP AIR";
+	compatible = "qcom,lemans-ivi", "qcom,lemans", "qcom,adp-air", "qcom,lemans-ivi-adp-air";
+	qcom,msm-id = <532 0x10000>, <532 0x20000>, <534 0x10000>;
+	qcom,board-id = <0x10019 0>, <0x1010019 0>, <0x0 0x1000001>;
+};
diff --git a/sa8255p-vm-cnss.dtsi b/sa8255p-vm-cnss.dtsi
new file mode 100755
index 0000000..5892d3d
--- /dev/null
+++ b/sa8255p-vm-cnss.dtsi
@@ -0,0 +1,90 @@
+#include <dt-bindings/interconnect/qcom,lemans.h>
+
+&pm8775_2_gpios {
+	cnss_pins: cnss_pins {
+		cnss_wlan_en_active: cnss_wlan_en_active {
+			mux {
+				pins = "gpio7";
+				function = "normal";
+			};
+
+			config {
+				pins = "gpio7";
+				output-high;
+				bias-pull-up;
+			};
+		};
+
+		cnss_wlan_en_sleep: cnss_wlan_en_sleep {
+			mux {
+				pins = "gpio7";
+				function = "normal";
+			};
+
+			config {
+				pins = "gpio7";
+				output-low;
+				bias-pull-down;
+			};
+		};
+	};
+};
+
+&soc {
+	wlan: qcom,cnss-qca-converged {
+		compatible = "qcom,cnss-qca-converged";
+		qcom,wlan;
+		qcom,multi-wlan-exchg;
+		qcom,wlan-rc-num = <0>;
+		qcom,bus-type=<0>;
+		qcom,notify-modem-status;
+		qcom,wlan-cbc-enabled;
+
+		reg = <0xb0000000 0x10000>;
+		reg-names = "smmu_iova_ipa";
+
+		vdd-wlan-ctrl1-supply = <&vreg_conn_pa>;
+		vdd-wlan-aon-supply = <&pm8775_c_l2>;
+		vdd-wlan-rfa1-supply = <&pm8775_e_l6>;
+		vdd-wlan-rfa2-supply = <&pm8775_a_s5>;
+
+		wlan_vregs = "vdd-wlan-ctrl1", "vdd-wlan-aon",
+			     "vdd-wlan-rfa1", "vdd-wlan-rfa2";
+		qcom,vdd-wlan-ctrl1-config = <0 0 0 0 0>;
+		/* no vote-off as sw_ctrl is not supported */
+		qcom,vdd-wlan-aon-config = <1055000 1055000 0 0 0>;
+		qcom,vdd-wlan-rfa1-config = <1350000 1350000 450000 0 0>;
+		qcom,vdd-wlan-rfa2-config = <1900000 1900000 450000 0 0>;
+		wlan-en-gpio = <&pm8775_2_gpios 7 0>;
+		qcom,bt-en-gpio = <&pm8775_2_gpios 8 0>;
+		pinctrl-names = "wlan_en_active", "wlan_en_sleep", "default";
+		pinctrl-0 = <&cnss_wlan_en_active>;
+		pinctrl-1 = <&cnss_wlan_en_sleep>;
+		pinctrl-2 = <&cnss_wlan_en_sleep>;
+
+		chip_cfg@0 {
+			supported-ids = <0x1103>;
+			qcom,wlan-ramdump-dynamic = <0x420000>;
+		};
+	};
+};
+
+&pcie0_rp {
+	#address-cells = <5>;
+	#size-cells = <0>;
+	cnss_pci: cnss_pci {
+		reg = <0 0 0 0 0>;
+		qcom,iommu-group = <&cnss_pci_iommu_group>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		cnss_pci_iommu_group: cnss_pci_iommu_group {
+		qcom,iommu-dma-addr-pool = <0xa0000000 0x10000000>;
+		qcom,iommu-dma = "fastmap";
+		qcom,iommu-pagetable = "coherent";
+		qcom,iommu-faults = "stall-disable", "HUPCF", "no-CFRE",
+			 "non-fatal";
+		};
+	};
+};
diff --git a/sdxpinn-cnss.dtsi b/sdxpinn-cnss.dtsi
index 7b9465e..64aa443 100755
--- a/sdxpinn-cnss.dtsi
+++ b/sdxpinn-cnss.dtsi
@@ -111,6 +111,10 @@
 			"{class: wlan_pdc, ss: bb, res: s1k.v, upval: 940}",
 			"{class: wlan_pdc, ss: bb, res: s1k.v, dwnval: 420}";
 		};
+
+		cnss_cdev_apss: qcom,cnss_cdev1 {
+			#cooling-cells = <2>;
+		};
 	};
 };