18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28c2ecf20Sopenharmony_ci# Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/
38c2ecf20Sopenharmony_ci%YAML 1.2
48c2ecf20Sopenharmony_ci---
58c2ecf20Sopenharmony_ci$id: "http://devicetree.org/schemas/soc/ti/k3-ringacc.yaml#"
68c2ecf20Sopenharmony_ci$schema: "http://devicetree.org/meta-schemas/core.yaml#"
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_cititle: Texas Instruments K3 NavigatorSS Ring Accelerator
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_cimaintainers:
118c2ecf20Sopenharmony_ci  - Santosh Shilimkar <ssantosh@kernel.org>
128c2ecf20Sopenharmony_ci  - Grygorii Strashko <grygorii.strashko@ti.com>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_cidescription: |
158c2ecf20Sopenharmony_ci  The Ring Accelerator (RA) is a machine which converts read/write accesses
168c2ecf20Sopenharmony_ci  from/to a constant address into corresponding read/write accesses from/to a
178c2ecf20Sopenharmony_ci  circular data structure in memory. The RA eliminates the need for each DMA
188c2ecf20Sopenharmony_ci  controller which needs to access ring elements from having to know the current
198c2ecf20Sopenharmony_ci  state of the ring (base address, current offset). The DMA controller
208c2ecf20Sopenharmony_ci  performs a read or write access to a specific address range (which maps to the
218c2ecf20Sopenharmony_ci  source interface on the RA) and the RA replaces the address for the transaction
228c2ecf20Sopenharmony_ci  with a new address which corresponds to the head or tail element of the ring
238c2ecf20Sopenharmony_ci  (head for reads, tail for writes).
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci  The Ring Accelerator is a hardware module that is responsible for accelerating
268c2ecf20Sopenharmony_ci  management of the packet queues. The K3 SoCs can have more than one RA instances
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciproperties:
298c2ecf20Sopenharmony_ci  compatible:
308c2ecf20Sopenharmony_ci    items:
318c2ecf20Sopenharmony_ci      - const: ti,am654-navss-ringacc
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci  reg:
348c2ecf20Sopenharmony_ci    items:
358c2ecf20Sopenharmony_ci      - description: real time registers regions
368c2ecf20Sopenharmony_ci      - description: fifos registers regions
378c2ecf20Sopenharmony_ci      - description: proxy gcfg registers regions
388c2ecf20Sopenharmony_ci      - description: proxy target registers regions
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci  reg-names:
418c2ecf20Sopenharmony_ci    items:
428c2ecf20Sopenharmony_ci      - const: rt
438c2ecf20Sopenharmony_ci      - const: fifos
448c2ecf20Sopenharmony_ci      - const: proxy_gcfg
458c2ecf20Sopenharmony_ci      - const: proxy_target
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci  msi-parent: true
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci  ti,num-rings:
508c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
518c2ecf20Sopenharmony_ci    description: Number of rings supported by RA
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci  ti,sci-rm-range-gp-rings:
548c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
558c2ecf20Sopenharmony_ci    description: TI-SCI RM subtype for GP ring range
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci  ti,sci:
588c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#definitions/phandle-array
598c2ecf20Sopenharmony_ci    description: phandle on TI-SCI compatible System controller node
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci  ti,sci-dev-id:
628c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
638c2ecf20Sopenharmony_ci    description: TI-SCI device id of the ring accelerator
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_cirequired:
668c2ecf20Sopenharmony_ci  - compatible
678c2ecf20Sopenharmony_ci  - reg
688c2ecf20Sopenharmony_ci  - reg-names
698c2ecf20Sopenharmony_ci  - msi-parent
708c2ecf20Sopenharmony_ci  - ti,num-rings
718c2ecf20Sopenharmony_ci  - ti,sci-rm-range-gp-rings
728c2ecf20Sopenharmony_ci  - ti,sci
738c2ecf20Sopenharmony_ci  - ti,sci-dev-id
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ciadditionalProperties: false
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ciexamples:
788c2ecf20Sopenharmony_ci  - |
798c2ecf20Sopenharmony_ci    bus {
808c2ecf20Sopenharmony_ci        #address-cells = <2>;
818c2ecf20Sopenharmony_ci        #size-cells = <2>;
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci        ringacc: ringacc@3c000000 {
848c2ecf20Sopenharmony_ci            compatible = "ti,am654-navss-ringacc";
858c2ecf20Sopenharmony_ci            reg = <0x0 0x3c000000 0x0 0x400000>,
868c2ecf20Sopenharmony_ci                  <0x0 0x38000000 0x0 0x400000>,
878c2ecf20Sopenharmony_ci                  <0x0 0x31120000 0x0 0x100>,
888c2ecf20Sopenharmony_ci                  <0x0 0x33000000 0x0 0x40000>;
898c2ecf20Sopenharmony_ci            reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
908c2ecf20Sopenharmony_ci            ti,num-rings = <818>;
918c2ecf20Sopenharmony_ci            ti,sci-rm-range-gp-rings = <0x2>; /* GP ring range */
928c2ecf20Sopenharmony_ci            ti,sci = <&dmsc>;
938c2ecf20Sopenharmony_ci            ti,sci-dev-id = <187>;
948c2ecf20Sopenharmony_ci            msi-parent = <&inta_main_udmass>;
958c2ecf20Sopenharmony_ci        };
968c2ecf20Sopenharmony_ci    };
97