162306a36Sopenharmony_ciQualcomm Technologies HIDMA Management interface 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciQualcomm Technologies HIDMA is a high speed DMA device. It only supports 462306a36Sopenharmony_cimemcpy and memset capabilities. It has been designed for virtualized 562306a36Sopenharmony_cienvironments. 662306a36Sopenharmony_ci 762306a36Sopenharmony_ciEach HIDMA HW instance consists of multiple DMA channels. These channels 862306a36Sopenharmony_cishare the same bandwidth. The bandwidth utilization can be partitioned 962306a36Sopenharmony_ciamong channels based on the priority and weight assignments. 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ciThere are only two priority levels and 15 weigh assignments possible. 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ciOther parameters here determine how much of the system bus this HIDMA 1462306a36Sopenharmony_ciinstance can use like maximum read/write request and number of bytes to 1562306a36Sopenharmony_ciread/write in a single burst. 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciMain node required properties: 1862306a36Sopenharmony_ci- compatible: "qcom,hidma-mgmt-1.0"; 1962306a36Sopenharmony_ci- reg: Address range for DMA device 2062306a36Sopenharmony_ci- dma-channels: Number of channels supported by this DMA controller. 2162306a36Sopenharmony_ci- max-write-burst-bytes: Maximum write burst in bytes that HIDMA can 2262306a36Sopenharmony_ci occupy the bus for in a single transaction. A memcpy requested is 2362306a36Sopenharmony_ci fragmented to multiples of this amount. This parameter is used while 2462306a36Sopenharmony_ci writing into destination memory. Setting this value incorrectly can 2562306a36Sopenharmony_ci starve other peripherals in the system. 2662306a36Sopenharmony_ci- max-read-burst-bytes: Maximum read burst in bytes that HIDMA can 2762306a36Sopenharmony_ci occupy the bus for in a single transaction. A memcpy request is 2862306a36Sopenharmony_ci fragmented to multiples of this amount. This parameter is used while 2962306a36Sopenharmony_ci reading the source memory. Setting this value incorrectly can starve 3062306a36Sopenharmony_ci other peripherals in the system. 3162306a36Sopenharmony_ci- max-write-transactions: This value is how many times a write burst is 3262306a36Sopenharmony_ci applied back to back while writing to the destination before yielding 3362306a36Sopenharmony_ci the bus. 3462306a36Sopenharmony_ci- max-read-transactions: This value is how many times a read burst is 3562306a36Sopenharmony_ci applied back to back while reading the source before yielding the bus. 3662306a36Sopenharmony_ci- channel-reset-timeout-cycles: Channel reset timeout in cycles for this SOC. 3762306a36Sopenharmony_ci Once a reset is applied to the HW, HW starts a timer for reset operation 3862306a36Sopenharmony_ci to confirm. If reset is not completed within this time, HW reports reset 3962306a36Sopenharmony_ci failure. 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ciSub-nodes: 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ciHIDMA has one or more DMA channels that are used to move data from one 4462306a36Sopenharmony_cimemory location to another. 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ciWhen the OS is not in control of the management interface (i.e. it's a guest), 4762306a36Sopenharmony_cithe channel nodes appear on their own, not under a management node. 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ciRequired properties: 5062306a36Sopenharmony_ci- compatible: must contain "qcom,hidma-1.0" for initial HW or 5162306a36Sopenharmony_ci "qcom,hidma-1.1"/"qcom,hidma-1.2" for MSI capable HW. 5262306a36Sopenharmony_ci- reg: Addresses for the transfer and event channel 5362306a36Sopenharmony_ci- interrupts: Should contain the event interrupt 5462306a36Sopenharmony_ci- desc-count: Number of asynchronous requests this channel can handle 5562306a36Sopenharmony_ci- iommus: required a iommu node 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ciOptional properties for MSI: 5862306a36Sopenharmony_ci- msi-parent : See the generic MSI binding described in 5962306a36Sopenharmony_ci devicetree/bindings/interrupt-controller/msi.txt for a description of the 6062306a36Sopenharmony_ci msi-parent property. 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ciExample: 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ciHypervisor OS configuration: 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci hidma-mgmt@f9984000 = { 6762306a36Sopenharmony_ci compatible = "qcom,hidma-mgmt-1.0"; 6862306a36Sopenharmony_ci reg = <0xf9984000 0x15000>; 6962306a36Sopenharmony_ci dma-channels = <6>; 7062306a36Sopenharmony_ci max-write-burst-bytes = <1024>; 7162306a36Sopenharmony_ci max-read-burst-bytes = <1024>; 7262306a36Sopenharmony_ci max-write-transactions = <31>; 7362306a36Sopenharmony_ci max-read-transactions = <31>; 7462306a36Sopenharmony_ci channel-reset-timeout-cycles = <0x500>; 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ci hidma_24: dma-controller@5c050000 { 7762306a36Sopenharmony_ci compatible = "qcom,hidma-1.0"; 7862306a36Sopenharmony_ci reg = <0 0x5c050000 0x0 0x1000>, 7962306a36Sopenharmony_ci <0 0x5c0b0000 0x0 0x1000>; 8062306a36Sopenharmony_ci interrupts = <0 389 0>; 8162306a36Sopenharmony_ci desc-count = <10>; 8262306a36Sopenharmony_ci iommus = <&system_mmu>; 8362306a36Sopenharmony_ci }; 8462306a36Sopenharmony_ci }; 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ciGuest OS configuration: 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci hidma_24: dma-controller@5c050000 { 8962306a36Sopenharmony_ci compatible = "qcom,hidma-1.0"; 9062306a36Sopenharmony_ci reg = <0 0x5c050000 0x0 0x1000>, 9162306a36Sopenharmony_ci <0 0x5c0b0000 0x0 0x1000>; 9262306a36Sopenharmony_ci interrupts = <0 389 0>; 9362306a36Sopenharmony_ci desc-count = <10>; 9462306a36Sopenharmony_ci iommus = <&system_mmu>; 9562306a36Sopenharmony_ci }; 96