xref: /freebsd/sys/contrib/device-tree/Bindings/bus/xlnx,versal-net-cdx.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1*fac71e4eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*fac71e4eSEmmanuel Vadot%YAML 1.2
3*fac71e4eSEmmanuel Vadot---
4*fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/bus/xlnx,versal-net-cdx.yaml#
5*fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*fac71e4eSEmmanuel Vadot
7*fac71e4eSEmmanuel Vadottitle: AMD CDX bus controller
8*fac71e4eSEmmanuel Vadot
9*fac71e4eSEmmanuel Vadotdescription: |
10*fac71e4eSEmmanuel Vadot  CDX bus controller for AMD devices is implemented to dynamically
11*fac71e4eSEmmanuel Vadot  detect CDX bus and devices using the firmware.
12*fac71e4eSEmmanuel Vadot  The CDX bus manages multiple FPGA based hardware devices, which
13*fac71e4eSEmmanuel Vadot  can support network, crypto or any other specialized type of
14*fac71e4eSEmmanuel Vadot  devices. These FPGA based devices can be added/modified dynamically
15*fac71e4eSEmmanuel Vadot  on run-time.
16*fac71e4eSEmmanuel Vadot
17*fac71e4eSEmmanuel Vadot  All devices on the CDX bus will have a unique streamid (for IOMMU)
18*fac71e4eSEmmanuel Vadot  and a unique device ID (for MSI) corresponding to a requestor ID
19*fac71e4eSEmmanuel Vadot  (one to one associated with the device). The streamid and deviceid
20*fac71e4eSEmmanuel Vadot  are used to configure SMMU and GIC-ITS respectively.
21*fac71e4eSEmmanuel Vadot
22*fac71e4eSEmmanuel Vadot  iommu-map property is used to define the set of stream ids
23*fac71e4eSEmmanuel Vadot  corresponding to each device and the associated IOMMU.
24*fac71e4eSEmmanuel Vadot
25*fac71e4eSEmmanuel Vadot  The MSI writes are accompanied by sideband data (Device ID).
26*fac71e4eSEmmanuel Vadot  The msi-map property is used to associate the devices with the
27*fac71e4eSEmmanuel Vadot  device ID as well as the associated ITS controller.
28*fac71e4eSEmmanuel Vadot
29*fac71e4eSEmmanuel Vadot  rproc property (xlnx,rproc) is used to identify the remote processor
30*fac71e4eSEmmanuel Vadot  with which APU (Application Processor Unit) interacts to find out
31*fac71e4eSEmmanuel Vadot  the bus and device configuration.
32*fac71e4eSEmmanuel Vadot
33*fac71e4eSEmmanuel Vadotmaintainers:
34*fac71e4eSEmmanuel Vadot  - Nipun Gupta <nipun.gupta@amd.com>
35*fac71e4eSEmmanuel Vadot  - Nikhil Agarwal <nikhil.agarwal@amd.com>
36*fac71e4eSEmmanuel Vadot
37*fac71e4eSEmmanuel Vadotproperties:
38*fac71e4eSEmmanuel Vadot  compatible:
39*fac71e4eSEmmanuel Vadot    const: xlnx,versal-net-cdx
40*fac71e4eSEmmanuel Vadot
41*fac71e4eSEmmanuel Vadot  iommu-map: true
42*fac71e4eSEmmanuel Vadot
43*fac71e4eSEmmanuel Vadot  msi-map: true
44*fac71e4eSEmmanuel Vadot
45*fac71e4eSEmmanuel Vadot  xlnx,rproc:
46*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
47*fac71e4eSEmmanuel Vadot    description:
48*fac71e4eSEmmanuel Vadot      phandle to the remoteproc_r5 rproc node using which APU interacts
49*fac71e4eSEmmanuel Vadot      with remote processor.
50*fac71e4eSEmmanuel Vadot
51*fac71e4eSEmmanuel Vadot  ranges: true
52*fac71e4eSEmmanuel Vadot
53*fac71e4eSEmmanuel Vadot  "#address-cells":
54*fac71e4eSEmmanuel Vadot    enum: [1, 2]
55*fac71e4eSEmmanuel Vadot
56*fac71e4eSEmmanuel Vadot  "#size-cells":
57*fac71e4eSEmmanuel Vadot    enum: [1, 2]
58*fac71e4eSEmmanuel Vadot
59*fac71e4eSEmmanuel Vadotrequired:
60*fac71e4eSEmmanuel Vadot  - compatible
61*fac71e4eSEmmanuel Vadot  - iommu-map
62*fac71e4eSEmmanuel Vadot  - msi-map
63*fac71e4eSEmmanuel Vadot  - xlnx,rproc
64*fac71e4eSEmmanuel Vadot  - ranges
65*fac71e4eSEmmanuel Vadot  - "#address-cells"
66*fac71e4eSEmmanuel Vadot  - "#size-cells"
67*fac71e4eSEmmanuel Vadot
68*fac71e4eSEmmanuel VadotadditionalProperties: false
69*fac71e4eSEmmanuel Vadot
70*fac71e4eSEmmanuel Vadotexamples:
71*fac71e4eSEmmanuel Vadot  - |
72*fac71e4eSEmmanuel Vadot    cdx {
73*fac71e4eSEmmanuel Vadot        compatible = "xlnx,versal-net-cdx";
74*fac71e4eSEmmanuel Vadot        #address-cells = <1>;
75*fac71e4eSEmmanuel Vadot        #size-cells = <1>;
76*fac71e4eSEmmanuel Vadot        /* define map for RIDs 250-259 */
77*fac71e4eSEmmanuel Vadot        iommu-map = <250 &smmu 250 10>;
78*fac71e4eSEmmanuel Vadot        /* define msi map for RIDs 250-259 */
79*fac71e4eSEmmanuel Vadot        msi-map = <250 &its 250 10>;
80*fac71e4eSEmmanuel Vadot        xlnx,rproc = <&remoteproc_r5>;
81*fac71e4eSEmmanuel Vadot        ranges;
82*fac71e4eSEmmanuel Vadot    };
83