sw5100: Integrate LW 2.0 r00130.1

Bug: 306721912
Change-Id: I20f56fae1be68a01029d5a3c26c5dfafc7527ce2
Signed-off-by: Mahmad Bharmal <[email protected]>
diff --git a/Kbuild b/Kbuild
index 5ad5f87..9bb971e 100755
--- a/Kbuild
+++ b/Kbuild
@@ -7,6 +7,10 @@
 dtbo-y += crow-ipa.dtbo
 endif
 
+ifeq ($(CONFIG_ARCH_TRINKET),y)
+dtbo-y += trinket-ipa.dtbo
+endif
+
 always-y	:= $(dtb-y) $(dtbo-y)
 subdir-y	:= $(dts-dirs)
 clean-files	:= *.dtb *.dtbo
diff --git a/ipa_v4.dtsi b/ipa_v4.dtsi
new file mode 100755
index 0000000..7374bbf
--- /dev/null
+++ b/ipa_v4.dtsi
@@ -0,0 +1,110 @@
+&soc {
+		qcom,msm_gsi {
+			compatible = "qcom,msm_gsi";
+		};
+
+		qcom,rmnet-ipa {
+			compatible = "qcom,rmnet-ipa3";
+			qcom,rmnet-ipa-ssr;
+			qcom,ipa-platform-type-msm;
+			qcom,ipa-advertise-sg-support;
+			qcom,ipa-napi-enable;
+		};
+
+		qcom,ipa_fws {
+			compatible = "qcom,pil-tz-generic";
+			qcom,pas-id = <0xf>;
+			qcom,firmware-name = "ipa_fws";
+			qcom,pil-force-shutdown;
+			memory-region = <&pil_ipa_fw_mem>;
+			status = "disabled";
+		};
+
+		ipa_hw: qcom,ipa@5800000 {
+			compatible = "qcom,ipa";
+			reg = <0x5800000 0x34000>,
+			      <0x5804000 0x2c000>;
+			pas-ids = <0xf>;
+			firmware-names = "ipa_fws";
+			memory-regions = <&pil_ipa_fw_mem>;
+			reg-names = "ipa-base", "gsi-base";
+			interrupts = <GIC_SPI 257 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "ipa-irq", "gsi-irq";
+			qcom,ipa-hw-ver = <16>; /* IPA core version = IPAv4.2 */
+			qcom,ipa-hw-mode = <0>;
+			qcom,ee = <0>;
+			qcom,use-ipa-tethering-bridge;
+			qcom,modem-cfg-emb-pipe-flt;
+			qcom,ipa-wdi2;
+			qcom,ipa-wdi2_over_gsi;
+			qcom,ipa-endp-delay-wa;
+			qcom,ipa-fltrt-not-hashable;
+			qcom,use-64-bit-dma-mask;
+			qcom,arm-smmu;
+			qcom,smmu-fast-map;
+			qcom,use-ipa-pm;
+			qcom,max_num_smmu_cb = <3>;
+			clocks = <&rpmcc RPM_SMD_IPA_CLK>;
+			clock-names = "core_clk";
+			qcom,interconnect,num-cases = <5>;
+			qcom,interconnect,num-paths = <3>;
+			interconnects = <&system_noc MASTER_IPA &bimc SLAVE_EBI_CH0>,
+					<&system_noc MASTER_IPA &system_noc SLAVE_OCIMEM>,
+					<&bimc MASTER_AMPSS_M0 &config_noc SLAVE_IPA_CFG>;
+			interconnect-names = "ipa_to_ebi1", "ipa_to_imem", "appss_to_ipa";
+			/* No vote */
+			qcom,no-vote =
+			<0 0 0 0 0 0>;
+			/* SVS2 */
+			qcom,svs2 =
+			<80000 465000 80000 68570 80000 30>;
+			/* SVS */
+			qcom,svs =
+			<80000 2000000 80000 267461 80000 109890>;
+			/* NOMINAL */
+			qcom,nominal =
+			<206000 4000000 206000 712961 206000 491520>;
+			/* TURBO */
+			qcom,turbo =
+			<206000 5598900 206000 1436481 206000 491520>;
+			qcom,bus-vector-names =
+			"MIN", "SVS2", "SVS", "NOMINAL", "TURBO";
+			qcom,throughput-threshold = <310 600 1000>;
+			qcom,scaling-exceptions = <>;
+
+			/* smp2p information */
+			qcom,smp2p_map_ipa_1_out {
+				compatible = "qcom,smp2p-map-ipa-1-out";
+				qcom,smem-states = <&smp2p_ipa_1_out 0>;
+				qcom,smem-state-names = "ipa-smp2p-out";
+			};
+
+			qcom,smp2p_map_ipa_1_in {
+				compatible = "qcom,smp2p-map-ipa-1-in";
+				interrupts-extended = <&smp2p_ipa_1_in 0 0>;
+				interrupt-names = "ipa-smp2p-in";
+			};
+		};
+
+		ipa_smmu_ap: ipa_smmu_ap {
+			compatible = "qcom,ipa-smmu-ap-cb";
+			iommus = <&apps_smmu 0x00E0 0x0>;
+			qcom,iommu-dma-addr-pool = <0x10000000 0x30000000>;
+			/* modem tables in IMEM */
+			qcom,additional-mapping = <0x0c123000 0x0c123000 0x2000>;
+		};
+
+		ipa_smmu_wlan: ipa_smmu_wlan {
+			compatible = "qcom,ipa-smmu-wlan-cb";
+			iommus = <&apps_smmu 0x00E1 0x0>;
+			/* ipa-uc ram */
+			qcom,additional-mapping = <0x5860000 0x5860000 0x80000>;
+		};
+
+		ipa_smmu_uc: ipa_smmu_uc {
+			compatible = "qcom,ipa-smmu-uc-cb";
+			iommus = <&apps_smmu 0x00E2 0x0>;
+			qcom,iommu-dma-addr-pool = <0x40400000 0x1fc00000>;
+		};
+};
diff --git a/trinket-ipa.dts b/trinket-ipa.dts
new file mode 100755
index 0000000..0c88017
--- /dev/null
+++ b/trinket-ipa.dts
@@ -0,0 +1,15 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/qcom,ipcc.h>
+#include <dt-bindings/interconnect/qcom,trinket.h>
+#include <dt-bindings/clock/qcom,gcc-trinket.h>
+#include <dt-bindings/clock/qcom,rpmcc.h>
+#include "ipa_v4.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. Trinket";
+	compatible = "qcom,trinket";
+	qcom,msm-id = <467 0x10000>;
+};