0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 # Copyright (C) 2020 Texas Instruments Incorporated
0003 # Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
0004 %YAML 1.2
0005 ---
0006 $id: http://devicetree.org/schemas/dma/ti/k3-bcdma.yaml#
0007 $schema: http://devicetree.org/meta-schemas/core.yaml#
0008
0009 title: Texas Instruments K3 DMSS BCDMA Device Tree Bindings
0010
0011 maintainers:
0012 - Peter Ujfalusi <peter.ujfalusi@gmail.com>
0013
0014 description: |
0015 The Block Copy DMA (BCDMA) is intended to perform similar functions as the TR
0016 mode channels of K3 UDMA-P.
0017 BCDMA includes block copy channels and Split channels.
0018
0019 Block copy channels mainly used for memory to memory transfers, but with
0020 optional triggers a block copy channel can service peripherals by accessing
0021 directly to memory mapped registers or area.
0022
0023 Split channels can be used to service PSI-L based peripherals.
0024 The peripherals can be PSI-L native or legacy, non PSI-L native peripherals
0025 with PDMAs. PDMA is tasked to act as a bridge between the PSI-L fabric and the
0026 legacy peripheral.
0027
0028 PDMAs can be configured via BCDMA split channel's peer registers to match with
0029 the configuration of the legacy peripheral.
0030
0031 allOf:
0032 - $ref: /schemas/dma/dma-controller.yaml#
0033 - $ref: /schemas/arm/keystone/ti,k3-sci-common.yaml#
0034
0035 properties:
0036 compatible:
0037 const: ti,am64-dmss-bcdma
0038
0039 "#dma-cells":
0040 const: 3
0041 description: |
0042 cell 1: type of the BCDMA channel to be used to service the peripheral:
0043 0 - split channel
0044 1 - block copy channel using global trigger 1
0045 2 - block copy channel using global trigger 2
0046 3 - block copy channel using local trigger
0047
0048 cell 2: parameter for the channel:
0049 if cell 1 is 0 (split channel):
0050 PSI-L thread ID of the remote (to BCDMA) end.
0051 Valid ranges for thread ID depends on the data movement direction:
0052 for source thread IDs (rx): 0 - 0x7fff
0053 for destination thread IDs (tx): 0x8000 - 0xffff
0054
0055 Please refer to the device documentation for the PSI-L thread map and
0056 also the PSI-L peripheral chapter for the correct thread ID.
0057 if cell 1 is 1 or 2 (block copy channel using global trigger):
0058 Unused, ignored
0059
0060 The trigger must be configured for the channel externally to BCDMA,
0061 channels using global triggers should not be requested directly, but
0062 via DMA event router.
0063 if cell 1 is 3 (block copy channel using local trigger):
0064 bchan number of the locally triggered channel
0065
0066 cell 3: ASEL value for the channel
0067
0068 reg:
0069 maxItems: 5
0070
0071 reg-names:
0072 items:
0073 - const: gcfg
0074 - const: bchanrt
0075 - const: rchanrt
0076 - const: tchanrt
0077 - const: ringrt
0078
0079 msi-parent: true
0080
0081 ti,asel:
0082 $ref: /schemas/types.yaml#/definitions/uint32
0083 description: ASEL value for non slave channels
0084
0085 ti,sci-rm-range-bchan:
0086 $ref: /schemas/types.yaml#/definitions/uint32-array
0087 description: |
0088 Array of BCDMA block-copy channel resource subtypes for resource
0089 allocation for this host
0090 minItems: 1
0091 # Should be enough
0092 maxItems: 255
0093 items:
0094 maximum: 0x3f
0095
0096 ti,sci-rm-range-tchan:
0097 $ref: /schemas/types.yaml#/definitions/uint32-array
0098 description: |
0099 Array of BCDMA split tx channel resource subtypes for resource allocation
0100 for this host
0101 minItems: 1
0102 # Should be enough
0103 maxItems: 255
0104 items:
0105 maximum: 0x3f
0106
0107 ti,sci-rm-range-rchan:
0108 $ref: /schemas/types.yaml#/definitions/uint32-array
0109 description: |
0110 Array of BCDMA split rx channel resource subtypes for resource allocation
0111 for this host
0112 minItems: 1
0113 # Should be enough
0114 maxItems: 255
0115 items:
0116 maximum: 0x3f
0117
0118 required:
0119 - compatible
0120 - "#dma-cells"
0121 - reg
0122 - reg-names
0123 - msi-parent
0124 - ti,sci
0125 - ti,sci-dev-id
0126 - ti,sci-rm-range-bchan
0127 - ti,sci-rm-range-tchan
0128 - ti,sci-rm-range-rchan
0129
0130 unevaluatedProperties: false
0131
0132 examples:
0133 - |+
0134 cbass_main {
0135 #address-cells = <2>;
0136 #size-cells = <2>;
0137
0138 main_dmss {
0139 compatible = "simple-mfd";
0140 #address-cells = <2>;
0141 #size-cells = <2>;
0142 dma-ranges;
0143 ranges;
0144
0145 ti,sci-dev-id = <25>;
0146
0147 main_bcdma: dma-controller@485c0100 {
0148 compatible = "ti,am64-dmss-bcdma";
0149
0150 reg = <0x0 0x485c0100 0x0 0x100>,
0151 <0x0 0x4c000000 0x0 0x20000>,
0152 <0x0 0x4a820000 0x0 0x20000>,
0153 <0x0 0x4aa40000 0x0 0x20000>,
0154 <0x0 0x4bc00000 0x0 0x100000>;
0155 reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt";
0156 msi-parent = <&inta_main_dmss>;
0157 #dma-cells = <3>;
0158
0159 ti,sci = <&dmsc>;
0160 ti,sci-dev-id = <26>;
0161
0162 ti,sci-rm-range-bchan = <0x20>; /* BLOCK_COPY_CHAN */
0163 ti,sci-rm-range-rchan = <0x21>; /* SPLIT_TR_RX_CHAN */
0164 ti,sci-rm-range-tchan = <0x22>; /* SPLIT_TR_TX_CHAN */
0165 };
0166 };
0167 };