1*4882a593SmuzhiyunQualcomm Technologies HIDMA Management interface 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunQualcomm Technologies HIDMA is a high speed DMA device. It only supports 4*4882a593Smuzhiyunmemcpy and memset capabilities. It has been designed for virtualized 5*4882a593Smuzhiyunenvironments. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunEach HIDMA HW instance consists of multiple DMA channels. These channels 8*4882a593Smuzhiyunshare the same bandwidth. The bandwidth utilization can be partitioned 9*4882a593Smuzhiyunamong channels based on the priority and weight assignments. 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunThere are only two priority levels and 15 weigh assignments possible. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunOther parameters here determine how much of the system bus this HIDMA 14*4882a593Smuzhiyuninstance can use like maximum read/write request and number of bytes to 15*4882a593Smuzhiyunread/write in a single burst. 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunMain node required properties: 18*4882a593Smuzhiyun- compatible: "qcom,hidma-mgmt-1.0"; 19*4882a593Smuzhiyun- reg: Address range for DMA device 20*4882a593Smuzhiyun- dma-channels: Number of channels supported by this DMA controller. 21*4882a593Smuzhiyun- max-write-burst-bytes: Maximum write burst in bytes that HIDMA can 22*4882a593Smuzhiyun occupy the bus for in a single transaction. A memcpy requested is 23*4882a593Smuzhiyun fragmented to multiples of this amount. This parameter is used while 24*4882a593Smuzhiyun writing into destination memory. Setting this value incorrectly can 25*4882a593Smuzhiyun starve other peripherals in the system. 26*4882a593Smuzhiyun- max-read-burst-bytes: Maximum read burst in bytes that HIDMA can 27*4882a593Smuzhiyun occupy the bus for in a single transaction. A memcpy request is 28*4882a593Smuzhiyun fragmented to multiples of this amount. This parameter is used while 29*4882a593Smuzhiyun reading the source memory. Setting this value incorrectly can starve 30*4882a593Smuzhiyun other peripherals in the system. 31*4882a593Smuzhiyun- max-write-transactions: This value is how many times a write burst is 32*4882a593Smuzhiyun applied back to back while writing to the destination before yielding 33*4882a593Smuzhiyun the bus. 34*4882a593Smuzhiyun- max-read-transactions: This value is how many times a read burst is 35*4882a593Smuzhiyun applied back to back while reading the source before yielding the bus. 36*4882a593Smuzhiyun- channel-reset-timeout-cycles: Channel reset timeout in cycles for this SOC. 37*4882a593Smuzhiyun Once a reset is applied to the HW, HW starts a timer for reset operation 38*4882a593Smuzhiyun to confirm. If reset is not completed within this time, HW reports reset 39*4882a593Smuzhiyun failure. 40*4882a593Smuzhiyun 41*4882a593SmuzhiyunSub-nodes: 42*4882a593Smuzhiyun 43*4882a593SmuzhiyunHIDMA has one or more DMA channels that are used to move data from one 44*4882a593Smuzhiyunmemory location to another. 45*4882a593Smuzhiyun 46*4882a593SmuzhiyunWhen the OS is not in control of the management interface (i.e. it's a guest), 47*4882a593Smuzhiyunthe channel nodes appear on their own, not under a management node. 48*4882a593Smuzhiyun 49*4882a593SmuzhiyunRequired properties: 50*4882a593Smuzhiyun- compatible: must contain "qcom,hidma-1.0" for initial HW or 51*4882a593Smuzhiyun "qcom,hidma-1.1"/"qcom,hidma-1.2" for MSI capable HW. 52*4882a593Smuzhiyun- reg: Addresses for the transfer and event channel 53*4882a593Smuzhiyun- interrupts: Should contain the event interrupt 54*4882a593Smuzhiyun- desc-count: Number of asynchronous requests this channel can handle 55*4882a593Smuzhiyun- iommus: required a iommu node 56*4882a593Smuzhiyun 57*4882a593SmuzhiyunOptional properties for MSI: 58*4882a593Smuzhiyun- msi-parent : See the generic MSI binding described in 59*4882a593Smuzhiyun devicetree/bindings/interrupt-controller/msi.txt for a description of the 60*4882a593Smuzhiyun msi-parent property. 61*4882a593Smuzhiyun 62*4882a593SmuzhiyunExample: 63*4882a593Smuzhiyun 64*4882a593SmuzhiyunHypervisor OS configuration: 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun hidma-mgmt@f9984000 = { 67*4882a593Smuzhiyun compatible = "qcom,hidma-mgmt-1.0"; 68*4882a593Smuzhiyun reg = <0xf9984000 0x15000>; 69*4882a593Smuzhiyun dma-channels = <6>; 70*4882a593Smuzhiyun max-write-burst-bytes = <1024>; 71*4882a593Smuzhiyun max-read-burst-bytes = <1024>; 72*4882a593Smuzhiyun max-write-transactions = <31>; 73*4882a593Smuzhiyun max-read-transactions = <31>; 74*4882a593Smuzhiyun channel-reset-timeout-cycles = <0x500>; 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun hidma_24: dma-controller@5c050000 { 77*4882a593Smuzhiyun compatible = "qcom,hidma-1.0"; 78*4882a593Smuzhiyun reg = <0 0x5c050000 0x0 0x1000>, 79*4882a593Smuzhiyun <0 0x5c0b0000 0x0 0x1000>; 80*4882a593Smuzhiyun interrupts = <0 389 0>; 81*4882a593Smuzhiyun desc-count = <10>; 82*4882a593Smuzhiyun iommus = <&system_mmu>; 83*4882a593Smuzhiyun }; 84*4882a593Smuzhiyun }; 85*4882a593Smuzhiyun 86*4882a593SmuzhiyunGuest OS configuration: 87*4882a593Smuzhiyun 88*4882a593Smuzhiyun hidma_24: dma-controller@5c050000 { 89*4882a593Smuzhiyun compatible = "qcom,hidma-1.0"; 90*4882a593Smuzhiyun reg = <0 0x5c050000 0x0 0x1000>, 91*4882a593Smuzhiyun <0 0x5c0b0000 0x0 0x1000>; 92*4882a593Smuzhiyun interrupts = <0 389 0>; 93*4882a593Smuzhiyun desc-count = <10>; 94*4882a593Smuzhiyun iommus = <&system_mmu>; 95*4882a593Smuzhiyun }; 96