xref: /freebsd/sys/contrib/device-tree/Bindings/dma/ti/k3-pktdma.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25def4c47SEmmanuel Vadot# Copyright (C) 2020 Texas Instruments Incorporated
35def4c47SEmmanuel Vadot# Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
45def4c47SEmmanuel Vadot%YAML 1.2
55def4c47SEmmanuel Vadot---
65def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/dma/ti/k3-pktdma.yaml#
75def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
85def4c47SEmmanuel Vadot
98bab661aSEmmanuel Vadottitle: Texas Instruments K3 DMSS PKTDMA
105def4c47SEmmanuel Vadot
115def4c47SEmmanuel Vadotmaintainers:
125def4c47SEmmanuel Vadot  - Peter Ujfalusi <peter.ujfalusi@gmail.com>
135def4c47SEmmanuel Vadot
145def4c47SEmmanuel Vadotdescription: |
155def4c47SEmmanuel Vadot  The Packet DMA (PKTDMA) is intended to perform similar functions as the packet
165def4c47SEmmanuel Vadot  mode channels of K3 UDMA-P.
175def4c47SEmmanuel Vadot  PKTDMA only includes Split channels to service PSI-L based peripherals.
185def4c47SEmmanuel Vadot
195def4c47SEmmanuel Vadot  The peripherals can be PSI-L native or legacy, non PSI-L native peripherals
205def4c47SEmmanuel Vadot  with PDMAs. PDMA is tasked to act as a bridge between the PSI-L fabric and the
215def4c47SEmmanuel Vadot  legacy peripheral.
225def4c47SEmmanuel Vadot
235def4c47SEmmanuel Vadot  PDMAs can be configured via PKTDMA split channel's peer registers to match
245def4c47SEmmanuel Vadot  with the configuration of the legacy peripheral.
255def4c47SEmmanuel Vadot
265def4c47SEmmanuel VadotallOf:
275def4c47SEmmanuel Vadot  - $ref: /schemas/dma/dma-controller.yaml#
28e67e8565SEmmanuel Vadot  - $ref: /schemas/arm/keystone/ti,k3-sci-common.yaml#
295def4c47SEmmanuel Vadot
305def4c47SEmmanuel Vadotproperties:
315def4c47SEmmanuel Vadot  compatible:
325def4c47SEmmanuel Vadot    const: ti,am64-dmss-pktdma
335def4c47SEmmanuel Vadot
345def4c47SEmmanuel Vadot  "#dma-cells":
355def4c47SEmmanuel Vadot    const: 2
365def4c47SEmmanuel Vadot    description: |
375def4c47SEmmanuel Vadot      The first cell is the PSI-L  thread ID of the remote (to PKTDMA) end.
385def4c47SEmmanuel Vadot      Valid ranges for thread ID depends on the data movement direction:
395def4c47SEmmanuel Vadot      for source thread IDs (rx): 0 - 0x7fff
405def4c47SEmmanuel Vadot      for destination thread IDs (tx): 0x8000 - 0xffff
415def4c47SEmmanuel Vadot
425def4c47SEmmanuel Vadot      Please refer to the device documentation for the PSI-L thread map and also
435def4c47SEmmanuel Vadot      the PSI-L peripheral chapter for the correct thread ID.
445def4c47SEmmanuel Vadot
455def4c47SEmmanuel Vadot      The second cell is the ASEL value for the channel
465def4c47SEmmanuel Vadot
475def4c47SEmmanuel Vadot  reg:
48*8d13bc63SEmmanuel Vadot    minItems: 4
49*8d13bc63SEmmanuel Vadot    items:
50*8d13bc63SEmmanuel Vadot      - description: Packet DMA Control /Status Registers region
51*8d13bc63SEmmanuel Vadot      - description: RX Channel Realtime Registers region
52*8d13bc63SEmmanuel Vadot      - description: TX Channel Realtime Registers region
53*8d13bc63SEmmanuel Vadot      - description: Ring Realtime Registers region
54*8d13bc63SEmmanuel Vadot      - description: Ring Configuration Registers region
55*8d13bc63SEmmanuel Vadot      - description: TX Configuration Registers region
56*8d13bc63SEmmanuel Vadot      - description: RX Configuration Registers region
57*8d13bc63SEmmanuel Vadot      - description: RX Flow Configuration Registers region
585def4c47SEmmanuel Vadot
595def4c47SEmmanuel Vadot  reg-names:
60*8d13bc63SEmmanuel Vadot    minItems: 4
615def4c47SEmmanuel Vadot    items:
625def4c47SEmmanuel Vadot      - const: gcfg
635def4c47SEmmanuel Vadot      - const: rchanrt
645def4c47SEmmanuel Vadot      - const: tchanrt
655def4c47SEmmanuel Vadot      - const: ringrt
66*8d13bc63SEmmanuel Vadot      - const: ring
67*8d13bc63SEmmanuel Vadot      - const: tchan
68*8d13bc63SEmmanuel Vadot      - const: rchan
69*8d13bc63SEmmanuel Vadot      - const: rflow
705def4c47SEmmanuel Vadot
715def4c47SEmmanuel Vadot  msi-parent: true
725def4c47SEmmanuel Vadot
735def4c47SEmmanuel Vadot  ti,sci-rm-range-tchan:
745def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
755def4c47SEmmanuel Vadot    description: |
765def4c47SEmmanuel Vadot      Array of PKTDMA split tx channel resource subtypes for resource allocation
775def4c47SEmmanuel Vadot      for this host
785def4c47SEmmanuel Vadot    minItems: 1
795def4c47SEmmanuel Vadot    # Should be enough
805def4c47SEmmanuel Vadot    maxItems: 255
815def4c47SEmmanuel Vadot    items:
825def4c47SEmmanuel Vadot      maximum: 0x3f
835def4c47SEmmanuel Vadot
845def4c47SEmmanuel Vadot  ti,sci-rm-range-tflow:
855def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
865def4c47SEmmanuel Vadot    description: |
875def4c47SEmmanuel Vadot      Array of PKTDMA split tx flow resource subtypes for resource allocation
885def4c47SEmmanuel Vadot      for this host
895def4c47SEmmanuel Vadot    minItems: 1
905def4c47SEmmanuel Vadot    # Should be enough
915def4c47SEmmanuel Vadot    maxItems: 255
925def4c47SEmmanuel Vadot    items:
935def4c47SEmmanuel Vadot      maximum: 0x3f
945def4c47SEmmanuel Vadot
955def4c47SEmmanuel Vadot  ti,sci-rm-range-rchan:
965def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
975def4c47SEmmanuel Vadot    description: |
985def4c47SEmmanuel Vadot      Array of PKTDMA split rx channel resource subtypes for resource allocation
995def4c47SEmmanuel Vadot      for this host
1005def4c47SEmmanuel Vadot    minItems: 1
1015def4c47SEmmanuel Vadot    # Should be enough
1025def4c47SEmmanuel Vadot    maxItems: 255
1035def4c47SEmmanuel Vadot    items:
1045def4c47SEmmanuel Vadot      maximum: 0x3f
1055def4c47SEmmanuel Vadot
1065def4c47SEmmanuel Vadot  ti,sci-rm-range-rflow:
1075def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
1085def4c47SEmmanuel Vadot    description: |
1095def4c47SEmmanuel Vadot      Array of PKTDMA split rx flow resource subtypes for resource allocation
1105def4c47SEmmanuel Vadot      for this host
1115def4c47SEmmanuel Vadot    minItems: 1
1125def4c47SEmmanuel Vadot    # Should be enough
1135def4c47SEmmanuel Vadot    maxItems: 255
1145def4c47SEmmanuel Vadot    items:
1155def4c47SEmmanuel Vadot      maximum: 0x3f
1165def4c47SEmmanuel Vadot
1175def4c47SEmmanuel Vadotrequired:
1185def4c47SEmmanuel Vadot  - compatible
1195def4c47SEmmanuel Vadot  - "#dma-cells"
1205def4c47SEmmanuel Vadot  - reg
1215def4c47SEmmanuel Vadot  - reg-names
1225def4c47SEmmanuel Vadot  - msi-parent
1235def4c47SEmmanuel Vadot  - ti,sci
1245def4c47SEmmanuel Vadot  - ti,sci-dev-id
1255def4c47SEmmanuel Vadot  - ti,sci-rm-range-tchan
1265def4c47SEmmanuel Vadot  - ti,sci-rm-range-tflow
1275def4c47SEmmanuel Vadot  - ti,sci-rm-range-rchan
1285def4c47SEmmanuel Vadot  - ti,sci-rm-range-rflow
1295def4c47SEmmanuel Vadot
1305def4c47SEmmanuel VadotunevaluatedProperties: false
1315def4c47SEmmanuel Vadot
1325def4c47SEmmanuel Vadotexamples:
1335def4c47SEmmanuel Vadot  - |+
1345def4c47SEmmanuel Vadot    cbass_main {
1355def4c47SEmmanuel Vadot        #address-cells = <2>;
1365def4c47SEmmanuel Vadot        #size-cells = <2>;
1375def4c47SEmmanuel Vadot
1385def4c47SEmmanuel Vadot        main_dmss {
1395def4c47SEmmanuel Vadot            compatible = "simple-mfd";
1405def4c47SEmmanuel Vadot            #address-cells = <2>;
1415def4c47SEmmanuel Vadot            #size-cells = <2>;
1425def4c47SEmmanuel Vadot            dma-ranges;
1435def4c47SEmmanuel Vadot            ranges;
1445def4c47SEmmanuel Vadot
1455def4c47SEmmanuel Vadot            ti,sci-dev-id = <25>;
1465def4c47SEmmanuel Vadot
1475def4c47SEmmanuel Vadot            main_pktdma: dma-controller@485c0000 {
1485def4c47SEmmanuel Vadot                compatible = "ti,am64-dmss-pktdma";
1495def4c47SEmmanuel Vadot
1505def4c47SEmmanuel Vadot                reg = <0x0 0x485c0000 0x0 0x100>,
1515def4c47SEmmanuel Vadot                      <0x0 0x4a800000 0x0 0x20000>,
1525def4c47SEmmanuel Vadot                      <0x0 0x4aa00000 0x0 0x40000>,
153*8d13bc63SEmmanuel Vadot                      <0x0 0x4b800000 0x0 0x400000>,
154*8d13bc63SEmmanuel Vadot                      <0x0 0x485e0000 0x0 0x20000>,
155*8d13bc63SEmmanuel Vadot                      <0x0 0x484a0000 0x0 0x4000>,
156*8d13bc63SEmmanuel Vadot                      <0x0 0x484c0000 0x0 0x2000>,
157*8d13bc63SEmmanuel Vadot                      <0x0 0x48430000 0x0 0x4000>;
158*8d13bc63SEmmanuel Vadot                reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt",
159*8d13bc63SEmmanuel Vadot                            "ring", "tchan", "rchan", "rflow";
160*8d13bc63SEmmanuel Vadot
1615def4c47SEmmanuel Vadot                msi-parent = <&inta_main_dmss>;
1625def4c47SEmmanuel Vadot                #dma-cells = <2>;
1635def4c47SEmmanuel Vadot
1645def4c47SEmmanuel Vadot                ti,sci = <&dmsc>;
1655def4c47SEmmanuel Vadot                ti,sci-dev-id = <30>;
1665def4c47SEmmanuel Vadot
1675def4c47SEmmanuel Vadot                ti,sci-rm-range-tchan = <0x23>, /* UNMAPPED_TX_CHAN */
1685def4c47SEmmanuel Vadot                                        <0x24>, /* CPSW_TX_CHAN */
1695def4c47SEmmanuel Vadot                                        <0x25>, /* SAUL_TX_0_CHAN */
1705def4c47SEmmanuel Vadot                                        <0x26>, /* SAUL_TX_1_CHAN */
1715def4c47SEmmanuel Vadot                                        <0x27>, /* ICSSG_0_TX_CHAN */
1725def4c47SEmmanuel Vadot                                        <0x28>; /* ICSSG_1_TX_CHAN */
1735def4c47SEmmanuel Vadot                ti,sci-rm-range-tflow = <0x10>, /* RING_UNMAPPED_TX_CHAN */
1745def4c47SEmmanuel Vadot                                        <0x11>, /* RING_CPSW_TX_CHAN */
1755def4c47SEmmanuel Vadot                                        <0x12>, /* RING_SAUL_TX_0_CHAN */
1765def4c47SEmmanuel Vadot                                        <0x13>, /* RING_SAUL_TX_1_CHAN */
1775def4c47SEmmanuel Vadot                                        <0x14>, /* RING_ICSSG_0_TX_CHAN */
1785def4c47SEmmanuel Vadot                                        <0x15>; /* RING_ICSSG_1_TX_CHAN */
1795def4c47SEmmanuel Vadot                ti,sci-rm-range-rchan = <0x29>, /* UNMAPPED_RX_CHAN */
1805def4c47SEmmanuel Vadot                                        <0x2b>, /* CPSW_RX_CHAN */
1815def4c47SEmmanuel Vadot                                        <0x2d>, /* SAUL_RX_0_CHAN */
1825def4c47SEmmanuel Vadot                                        <0x2f>, /* SAUL_RX_1_CHAN */
1835def4c47SEmmanuel Vadot                                        <0x31>, /* SAUL_RX_2_CHAN */
1845def4c47SEmmanuel Vadot                                        <0x33>, /* SAUL_RX_3_CHAN */
1855def4c47SEmmanuel Vadot                                        <0x35>, /* ICSSG_0_RX_CHAN */
1865def4c47SEmmanuel Vadot                                        <0x37>; /* ICSSG_1_RX_CHAN */
1875def4c47SEmmanuel Vadot                ti,sci-rm-range-rflow = <0x2a>, /* FLOW_UNMAPPED_RX_CHAN */
1885def4c47SEmmanuel Vadot                                        <0x2c>, /* FLOW_CPSW_RX_CHAN */
1895def4c47SEmmanuel Vadot                                        <0x2e>, /* FLOW_SAUL_RX_0/1_CHAN */
1905def4c47SEmmanuel Vadot                                        <0x32>, /* FLOW_SAUL_RX_2/3_CHAN */
1915def4c47SEmmanuel Vadot                                        <0x36>, /* FLOW_ICSSG_0_RX_CHAN */
1925def4c47SEmmanuel Vadot                                        <0x38>; /* FLOW_ICSSG_1_RX_CHAN */
1935def4c47SEmmanuel Vadot            };
1945def4c47SEmmanuel Vadot        };
1955def4c47SEmmanuel Vadot    };
196