Loading Documentation/devicetree/bindings/dma/qcom_gpi.txt 0 → 100644 +101 −0 Original line number Diff line number Diff line Qualcomm Technologies Inc GPI DMA controller QCOM GPI DMA controller provides DMA capabilities for peripheral buses such as I2C, UART, and SPI. ============== Node Structure ============== Main node properties: - #dma-cells Usage: required Value type: <u32> Definition: Number of parameters client will provide. Must be set to 5. 1st parameter: channel index, 0 for TX, 1 for RX 2nd parameter: serial engine index 3rd parameter: bus protocol, 1 for SPI, 2 for UART, 3 for I2C 4th parameter: channel ring length in transfer ring elements 5th parameter: event processing priority, set to 0 for lowest latency - compatible Usage: required Value type: <string> Definition: "qcom,gpi-dma" - reg Usage: required Value type: Array of <u32> Definition: register address space location and size - reg-name Usage: required Value type: <string> Definition: register space name, must be "gpi-top" - interrupts Usage: required Value type: Array of <u32> Definition: Array of tuples which describe interrupt line for each GPII instance. - qcom,max-num-gpii Usage: required Value type: <u32> Definition: Total number of GPII instances available for this controller. - qcom,gpii-mask Usage: required Value type: <u32> Definition: Bitmap of supported GPII instances in hlos. - qcom,ev-factor Usage: required Value type: <u32> Definition: Event ring transfer size compare to channel transfer ring. Event ring length = ev-factor * transfer ring size - iommus Usage: required Value type: <phandle u32 u32> Definition: phandle for apps smmu controller and SID, and mask for the controller. For more detail please check binding documentation arm,smmu.txt - qcom,smmu-cfg Usage: required Value type: <u32> Definition: Determine whether GPI driver require to configure SMMU that sits behind GPI controller. Bit mask: BIT(0) : Attach address mapping to endpoint device BIT(1) : Set SMMU attribute S1_BYPASS BIT(2) : Set SMMU attribute FAST BIT(3) : Set SMMU attribute ATOMIC - qcom,iova-range Usage: required if SMMU S1 translation is enabled Value type: Array of <u64> Definition: Pair of values describing iova base and size to allocate. ======== Example: ======== gpi_dma0: qcom,gpi-dma@0x800000 { #dma-cells = <5>; compatible = "qcom,gpi-dma"; reg = <0x800000 0x60000>; reg-names = "gpi-top"; interrupts = <0 244 0>, <0 245 0>, <0 246 0>, <0 247 0>, <0 248 0>, <0 249 0>, <0 250 0>, <0 251 0>, <0 252 0>, <0 253 0>, <0 254 0>, <0 255 0>, <0 256 0>; qcom,max-num-gpii = <13>; qcom,gpii-mask = <0xfa>; qcom,ev-factor = <2>; iommus = <&apps_smmu 0x0016 0x0>; qcom,smmu-cfg = <0x1> qcom,iova-range = <0x0 0x100000 0x0 0x100000>; status = "ok"; }; arch/arm64/boot/dts/qcom/sdm855.dtsi +54 −0 Original line number Diff line number Diff line Loading @@ -2034,6 +2034,60 @@ interrupts = <0 291 0>, <0 292 0>; interrupt-names = "slimbus_irq", "slimbus_bam_irq"; }; gpi_dma0: qcom,gpi-dma@0x800000 { #dma-cells = <5>; compatible = "qcom,gpi-dma"; reg = <0x800000 0x60000>; reg-names = "gpi-top"; interrupts = <0 244 0>, <0 245 0>, <0 246 0>, <0 247 0>, <0 248 0>, <0 249 0>, <0 250 0>, <0 251 0>, <0 252 0>, <0 253 0>, <0 254 0>, <0 255 0>, <0 256 0>; qcom,max-num-gpii = <13>; qcom,gpii-mask = <0xfa>; qcom,ev-factor = <2>; iommus = <&apps_smmu 0x00d6 0x0>; qcom,smmu-cfg = <0>; qcom,iova-range = <0x0 0x100000 0x0 0x100000>; status = "ok"; }; gpi_dma1: qcom,gpi-dma@0xa00000 { #dma-cells = <5>; compatible = "qcom,gpi-dma"; reg = <0xa00000 0x60000>; reg-names = "gpi-top"; interrupts = <0 279 0>, <0 280 0>, <0 281 0>, <0 282 0>, <0 283 0>, <0 284 0>, <0 293 0>, <0 294 0>, <0 295 0>, <0 296 0>, <0 297 0>, <0 298 0>, <0 299 0>; qcom,max-num-gpii = <13>; qcom,gpii-mask = <0xfa>; qcom,ev-factor = <2>; iommus = <&apps_smmu 0x0616 0x0>; qcom,smmu-cfg = <0>; qcom,iova-range = <0x0 0x100000 0x0 0x100000>; status = "ok"; }; gpi_dma2: qcom,gpi-dma@0xc00000 { #dma-cells = <5>; compatible = "qcom,gpi-dma"; reg = <0xc00000 0x60000>; reg-names = "gpi-top"; interrupts = <0 588 0>, <0 589 0>, <0 590 0>, <0 591 0>, <0 592 0>, <0 593 0>, <0 594 0>, <0 595 0>, <0 596 0>, <0 597 0>, <0 598 0>, <0 599 0>, <0 600 0>; qcom,max-num-gpii = <13>; qcom,gpii-mask = <0xfa>; qcom,ev-factor = <2>; iommus = <&apps_smmu 0x07b6 0x0>; qcom,smmu-cfg = <0x0>; qcom,iova-range = <0x0 0x100000 0x0 0x100000>; status = "ok"; }; }; &emac_gdsc { Loading arch/arm64/configs/sdm855-perf_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -343,6 +343,7 @@ CONFIG_EDAC_KRYO_ARM64_PANIC_ON_UE=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_QPNP=y CONFIG_DMADEVICES=y CONFIG_QCOM_GPI_DMA=y CONFIG_UIO=y CONFIG_STAGING=y CONFIG_ASHMEM=y Loading arch/arm64/configs/sdm855_defconfig +2 −0 Original line number Diff line number Diff line Loading @@ -353,6 +353,8 @@ CONFIG_EDAC_QCOM_LLCC_PANIC_ON_UE=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_QPNP=y CONFIG_DMADEVICES=y CONFIG_QCOM_GPI_DMA=y CONFIG_QCOM_GPI_DMA_DEBUG=y CONFIG_UIO=y CONFIG_STAGING=y CONFIG_ASHMEM=y Loading drivers/dma/qcom/Kconfig +19 −0 Original line number Diff line number Diff line Loading @@ -27,3 +27,22 @@ config QCOM_HIDMA (user to kernel, kernel to kernel, etc.). It only supports memcpy interface. The core is not intended for general purpose slave DMA. config QCOM_GPI_DMA tristate "Qualcomm Technologies Inc GPI DMA support" depends on ARCH_QCOM select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help Enable support for the QCOM GPI DMA controller. This controller provides DMA capabilities for a variety of peripheral buses such as I2C, UART, and SPI. By using GPI dmaengine driver, bus drivers can use a standardize interface that is protocol independent to transfer data between DDR and peripheral. config QCOM_GPI_DMA_DEBUG bool "Qualcomm Technologies Inc GPI debug support" depends on QCOM_GPI_DMA help Enable detailed logging for QCOM GPI driver. Extra logging will be helpful when debugging critical issues. Loading
Documentation/devicetree/bindings/dma/qcom_gpi.txt 0 → 100644 +101 −0 Original line number Diff line number Diff line Qualcomm Technologies Inc GPI DMA controller QCOM GPI DMA controller provides DMA capabilities for peripheral buses such as I2C, UART, and SPI. ============== Node Structure ============== Main node properties: - #dma-cells Usage: required Value type: <u32> Definition: Number of parameters client will provide. Must be set to 5. 1st parameter: channel index, 0 for TX, 1 for RX 2nd parameter: serial engine index 3rd parameter: bus protocol, 1 for SPI, 2 for UART, 3 for I2C 4th parameter: channel ring length in transfer ring elements 5th parameter: event processing priority, set to 0 for lowest latency - compatible Usage: required Value type: <string> Definition: "qcom,gpi-dma" - reg Usage: required Value type: Array of <u32> Definition: register address space location and size - reg-name Usage: required Value type: <string> Definition: register space name, must be "gpi-top" - interrupts Usage: required Value type: Array of <u32> Definition: Array of tuples which describe interrupt line for each GPII instance. - qcom,max-num-gpii Usage: required Value type: <u32> Definition: Total number of GPII instances available for this controller. - qcom,gpii-mask Usage: required Value type: <u32> Definition: Bitmap of supported GPII instances in hlos. - qcom,ev-factor Usage: required Value type: <u32> Definition: Event ring transfer size compare to channel transfer ring. Event ring length = ev-factor * transfer ring size - iommus Usage: required Value type: <phandle u32 u32> Definition: phandle for apps smmu controller and SID, and mask for the controller. For more detail please check binding documentation arm,smmu.txt - qcom,smmu-cfg Usage: required Value type: <u32> Definition: Determine whether GPI driver require to configure SMMU that sits behind GPI controller. Bit mask: BIT(0) : Attach address mapping to endpoint device BIT(1) : Set SMMU attribute S1_BYPASS BIT(2) : Set SMMU attribute FAST BIT(3) : Set SMMU attribute ATOMIC - qcom,iova-range Usage: required if SMMU S1 translation is enabled Value type: Array of <u64> Definition: Pair of values describing iova base and size to allocate. ======== Example: ======== gpi_dma0: qcom,gpi-dma@0x800000 { #dma-cells = <5>; compatible = "qcom,gpi-dma"; reg = <0x800000 0x60000>; reg-names = "gpi-top"; interrupts = <0 244 0>, <0 245 0>, <0 246 0>, <0 247 0>, <0 248 0>, <0 249 0>, <0 250 0>, <0 251 0>, <0 252 0>, <0 253 0>, <0 254 0>, <0 255 0>, <0 256 0>; qcom,max-num-gpii = <13>; qcom,gpii-mask = <0xfa>; qcom,ev-factor = <2>; iommus = <&apps_smmu 0x0016 0x0>; qcom,smmu-cfg = <0x1> qcom,iova-range = <0x0 0x100000 0x0 0x100000>; status = "ok"; };
arch/arm64/boot/dts/qcom/sdm855.dtsi +54 −0 Original line number Diff line number Diff line Loading @@ -2034,6 +2034,60 @@ interrupts = <0 291 0>, <0 292 0>; interrupt-names = "slimbus_irq", "slimbus_bam_irq"; }; gpi_dma0: qcom,gpi-dma@0x800000 { #dma-cells = <5>; compatible = "qcom,gpi-dma"; reg = <0x800000 0x60000>; reg-names = "gpi-top"; interrupts = <0 244 0>, <0 245 0>, <0 246 0>, <0 247 0>, <0 248 0>, <0 249 0>, <0 250 0>, <0 251 0>, <0 252 0>, <0 253 0>, <0 254 0>, <0 255 0>, <0 256 0>; qcom,max-num-gpii = <13>; qcom,gpii-mask = <0xfa>; qcom,ev-factor = <2>; iommus = <&apps_smmu 0x00d6 0x0>; qcom,smmu-cfg = <0>; qcom,iova-range = <0x0 0x100000 0x0 0x100000>; status = "ok"; }; gpi_dma1: qcom,gpi-dma@0xa00000 { #dma-cells = <5>; compatible = "qcom,gpi-dma"; reg = <0xa00000 0x60000>; reg-names = "gpi-top"; interrupts = <0 279 0>, <0 280 0>, <0 281 0>, <0 282 0>, <0 283 0>, <0 284 0>, <0 293 0>, <0 294 0>, <0 295 0>, <0 296 0>, <0 297 0>, <0 298 0>, <0 299 0>; qcom,max-num-gpii = <13>; qcom,gpii-mask = <0xfa>; qcom,ev-factor = <2>; iommus = <&apps_smmu 0x0616 0x0>; qcom,smmu-cfg = <0>; qcom,iova-range = <0x0 0x100000 0x0 0x100000>; status = "ok"; }; gpi_dma2: qcom,gpi-dma@0xc00000 { #dma-cells = <5>; compatible = "qcom,gpi-dma"; reg = <0xc00000 0x60000>; reg-names = "gpi-top"; interrupts = <0 588 0>, <0 589 0>, <0 590 0>, <0 591 0>, <0 592 0>, <0 593 0>, <0 594 0>, <0 595 0>, <0 596 0>, <0 597 0>, <0 598 0>, <0 599 0>, <0 600 0>; qcom,max-num-gpii = <13>; qcom,gpii-mask = <0xfa>; qcom,ev-factor = <2>; iommus = <&apps_smmu 0x07b6 0x0>; qcom,smmu-cfg = <0x0>; qcom,iova-range = <0x0 0x100000 0x0 0x100000>; status = "ok"; }; }; &emac_gdsc { Loading
arch/arm64/configs/sdm855-perf_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -343,6 +343,7 @@ CONFIG_EDAC_KRYO_ARM64_PANIC_ON_UE=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_QPNP=y CONFIG_DMADEVICES=y CONFIG_QCOM_GPI_DMA=y CONFIG_UIO=y CONFIG_STAGING=y CONFIG_ASHMEM=y Loading
arch/arm64/configs/sdm855_defconfig +2 −0 Original line number Diff line number Diff line Loading @@ -353,6 +353,8 @@ CONFIG_EDAC_QCOM_LLCC_PANIC_ON_UE=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_QPNP=y CONFIG_DMADEVICES=y CONFIG_QCOM_GPI_DMA=y CONFIG_QCOM_GPI_DMA_DEBUG=y CONFIG_UIO=y CONFIG_STAGING=y CONFIG_ASHMEM=y Loading
drivers/dma/qcom/Kconfig +19 −0 Original line number Diff line number Diff line Loading @@ -27,3 +27,22 @@ config QCOM_HIDMA (user to kernel, kernel to kernel, etc.). It only supports memcpy interface. The core is not intended for general purpose slave DMA. config QCOM_GPI_DMA tristate "Qualcomm Technologies Inc GPI DMA support" depends on ARCH_QCOM select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help Enable support for the QCOM GPI DMA controller. This controller provides DMA capabilities for a variety of peripheral buses such as I2C, UART, and SPI. By using GPI dmaengine driver, bus drivers can use a standardize interface that is protocol independent to transfer data between DDR and peripheral. config QCOM_GPI_DMA_DEBUG bool "Qualcomm Technologies Inc GPI debug support" depends on QCOM_GPI_DMA help Enable detailed logging for QCOM GPI driver. Extra logging will be helpful when debugging critical issues.