From f1bff316cc8401207553f781f150988f5b8498bd Mon Sep 17 00:00:00 2001 From: Prasanna S Date: Wed, 16 Oct 2024 11:05:00 +0530 Subject: [PATCH] ARM: dts: msm: Add spi, i2c, gpi nodes for SVM tuna Adding spi, i2c, gsi nodes for SVM tuna. Change-Id: I3c534c3e68573e34541c5681bea609ac44f28af2 Signed-off-by: Prasanna S --- qcom/tuna-qupv3.dtsi | 22 +++--- qcom/tuna-vm.dtsi | 162 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 174 insertions(+), 10 deletions(-) diff --git a/qcom/tuna-qupv3.dtsi b/qcom/tuna-qupv3.dtsi index 8e7e3077..4ad94442 100644 --- a/qcom/tuna-qupv3.dtsi +++ b/qcom/tuna-qupv3.dtsi @@ -47,7 +47,8 @@ , , ; - qcom,gpii-mask = <0x1f>; + qcom,static-gpii-mask = <0x1>; + qcom,gpii-mask = <0x1e>; qcom,ev-factor = <1>; memory-region = <&qup1_gpi_iommu_region>; qcom,gpi-ee-offset = <0x10000>; @@ -255,8 +256,8 @@ pinctrl-names = "default", "sleep"; pinctrl-0 = <&qupv3_se4_i2c_sda_active>, <&qupv3_se4_i2c_scl_active>; pinctrl-1 = <&qupv3_se4_i2c_sleep>; - dmas = <&gpi_dma1 0 4 3 64 0>, - <&gpi_dma1 1 4 3 64 0>; + dmas = <&gpi_dma1 0 4 3 64 2>, + <&gpi_dma1 1 4 3 64 2>; dma-names = "tx", "rx"; status = "disabled"; }; @@ -279,8 +280,8 @@ pinctrl-0 = <&qupv3_se4_spi_mosi_active>, <&qupv3_se4_spi_miso_active>, <&qupv3_se4_spi_clk_active>, <&qupv3_se4_spi_cs_active>; pinctrl-1 = <&qupv3_se4_spi_sleep>; - dmas = <&gpi_dma1 0 4 1 64 0>, - <&gpi_dma1 1 4 1 64 0>; + dmas = <&gpi_dma1 0 4 1 64 2>, + <&gpi_dma1 1 4 1 64 2>; dma-names = "tx", "rx"; spi-max-frequency = <50000000>; status = "disabled"; @@ -419,7 +420,8 @@ , , ; - qcom,gpii-mask = <0x1f>; + qcom,static-gpii-mask = <0x1>; + qcom,gpii-mask = <0x1e>; qcom,ev-factor = <1>; memory-region = <&qup2_gpi_iommu_region>; qcom,gpi-ee-offset = <0x10000>; @@ -749,8 +751,8 @@ pinctrl-names = "default", "sleep"; pinctrl-0 = <&qupv3_se15_i2c_sda_active>, <&qupv3_se15_i2c_scl_active>; pinctrl-1 = <&qupv3_se15_i2c_sleep>; - dmas = <&gpi_dma2 0 7 3 64 0>, - <&gpi_dma2 1 7 3 64 0>; + dmas = <&gpi_dma2 0 7 3 64 2>, + <&gpi_dma2 1 7 3 64 2>; dma-names = "tx", "rx"; status = "disabled"; }; @@ -773,8 +775,8 @@ pinctrl-0 = <&qupv3_se15_spi_mosi_active>, <&qupv3_se15_spi_miso_active>, <&qupv3_se15_spi_clk_active>, <&qupv3_se15_spi_cs_active>; pinctrl-1 = <&qupv3_se15_spi_sleep>; - dmas = <&gpi_dma2 0 7 1 64 0>, - <&gpi_dma2 1 7 1 64 0>; + dmas = <&gpi_dma2 0 7 1 64 2>, + <&gpi_dma2 1 7 1 64 2>; dma-names = "tx", "rx"; spi-max-frequency = <50000000>; status = "disabled"; diff --git a/qcom/tuna-vm.dtsi b/qcom/tuna-vm.dtsi index 2cde4080..0ee42c6d 100644 --- a/qcom/tuna-vm.dtsi +++ b/qcom/tuna-vm.dtsi @@ -71,6 +71,9 @@ vm-attrs = "context-dump", "crash-restart"; + iomemory-ranges = <0x0 0xa24000 0x0 0xa24000 0x0 0x4000 0x0 + 0x0 0x824000 0x0 0x824000 0x0 0x4000 0x0>; + /* For LEVM por usecases is QUP1_SE4 and QUP2_SE7. * QUP1_SE4: GPII5 : IRQ_316 * QUP2_SE7: GPII5 : IRQ_625 @@ -362,6 +365,165 @@ qcom,block-size = <0x400000>; qcom,initial-movable-zone-size = <0x2000000>; }; + + /* + * QUP1 : SE4 - Primary touch + * QUP2 : SE7 - Secondary touch + */ + qup_iommu_group: qup_common_iommu_group { + iommu-addresses = <&gpi_dma1 0x00000000 0x00020000>, + <&qupv3_1 0x00000000 0x00020000>, + <&gpi_dma2 0x00000000 0x00020000>, + <&qupv3_2 0x00000000 0x00020000>; + }; + + /* QUPv3_1 GPI Instance */ + gpi_dma1: qcom,gpi-dma@a00000 { + compatible = "qcom,gpi-dma"; + #dma-cells = <5>; + reg = <0xa00000 0x60000>; + reg-names = "gpi-top"; + iommus = <&apps_smmu 0xb8 0x0>; + qcom,iommu-group = <&qup_iommu_group>; + dma-coherent; + interrupts = , + , + , + , + , + , + , + , + , + , + , + ; + qcom,max-num-gpii = <12>; + qcom,static-gpii-mask = <0x20>; + qcom,gpii-mask = <0x0>; + qcom,ev-factor = <1>; + qcom,gpi-ee-offset = <0x10000>; + qcom,le-vm; + status = "ok"; + }; + + /* QUPv3_1 wrapper instance */ + qupv3_1: qcom,qupv3_1_geni_se@ac0000 { + compatible = "qcom,geni-se-qup"; + reg = <0xac0000 0x2000>; + #address-cells = <1>; + #size-cells = <1>; + clock-names = "m-ahb", "s-ahb"; + clocks = <&gcc GCC_QUPV3_WRAP_1_M_AHB_CLK>, + <&gcc GCC_QUPV3_WRAP_1_S_AHB_CLK>; + iommus = <&apps_smmu 0xb8 0x0>; + qcom,iommu-group = <&qup_iommu_group>; + dma-coherent; + ranges; + status = "ok"; + + /* Touchscreen I2C Instance */ + qupv3_se4_i2c: i2c@a90000 { + compatible = "qcom,i2c-geni"; + reg = <0xa90000 0x4000>; + #address-cells = <1>; + #size-cells = <0>; + dmas = <&gpi_dma1 0 4 3 64 0xc>, + <&gpi_dma1 1 4 3 64 0xc>; + dma-names = "tx", "rx"; + qcom,le-vm; + status = "disabled"; + }; + + /* Touchscreen SPI Instance */ + qupv3_se4_spi: spi@a90000 { + compatible = "qcom,spi-geni"; + reg = <0xa90000 0x4000>; + #address-cells = <1>; + #size-cells = <0>; + reg-names = "se_phys"; + dmas = <&gpi_dma1 0 4 1 64 0xc>, + <&gpi_dma1 1 4 1 64 0xc>; + dma-names = "tx", "rx"; + spi-max-frequency = <50000000>; + qcom,le-vm; + status = "disabled"; + }; + }; + + /* QUPv3_2 GPI Instance */ + gpi_dma2: qcom,gpi-dma@800000 { + compatible = "qcom,gpi-dma"; + #dma-cells = <5>; + reg = <0x800000 0x60000>; + reg-names = "gpi-top"; + iommus = <&apps_smmu 0x438 0x0>; + qcom,iommu-group = <&qup_iommu_group>; + dma-coherent; + interrupts = , + , + , + , + , + , + , + , + , + , + , + ; + qcom,max-num-gpii = <12>; + qcom,static-gpii-mask = <0x20>; + qcom,gpii-mask = <0x0>; + qcom,ev-factor = <1>; + qcom,gpi-ee-offset = <0x10000>; + qcom,le-vm; + status = "ok"; + }; + + /* QUPv3_2 wrapper instance */ + qupv3_2: qcom,qupv3_2_geni_se@8c0000 { + compatible = "qcom,geni-se-qup"; + reg = <0x8c0000 0x2000>; + #address-cells = <1>; + #size-cells = <1>; + clock-names = "m-ahb", "s-ahb"; + clocks = <&gcc GCC_QUPV3_WRAP_2_M_AHB_CLK>, + <&gcc GCC_QUPV3_WRAP_2_S_AHB_CLK>; + iommus = <&apps_smmu 0x438 0x0>; + qcom,iommu-group = <&qup_iommu_group>; + dma-coherent; + ranges; + status = "ok"; + + /* Secondary Tounch */ + qupv3_se15_i2c: i2c@89c000 { + compatible = "qcom,i2c-geni"; + reg = <0x89c000 0x4000>; + #address-cells = <1>; + #size-cells = <0>; + dmas = <&gpi_dma2 0 7 3 64 0xc>, + <&gpi_dma2 1 7 3 64 0xc>; + dma-names = "tx", "rx"; + qcom,le-vm; + status = "disabled"; + }; + + /* Secondary Tounch */ + qupv3_se15_spi: spi@89c000 { + compatible = "qcom,spi-geni"; + reg = <0x89c000 0x4000>; + #address-cells = <1>; + #size-cells = <0>; + reg-names = "se_phys"; + dmas = <&gpi_dma2 0 7 1 64 0xc>, + <&gpi_dma2 1 7 1 64 0xc>; + dma-names = "tx", "rx"; + spi-max-frequency = <50000000>; + qcom,le-vm; + status = "disabled"; + }; + }; }; #include "msm-arm-smmu-tuna-vm.dtsi"