Skip to contentSkip to conversation

dt-bindings: misc: add xlnx,axi-fifo-mm-s

PATCH In review Omer PALA 3 participants 4 messages Sep 17 Device tree bindings

lore
Share & tools
lore

Omer PALA

author
#0 lore raw

PATCH 1/1 dt-bindings: misc: add xlnx,axi-fifo-mm-s

Add Device Tree binding documentation for the Xilinx AXI FIFO Memory Mapped Stream IP core, covering compatible strings from version 4.1 through 4.3.

---
 .../bindings/misc/xlnx,axi-fifo-mm-s.yaml     | 228 ++++++++++++++++++
 1 file changed, 228 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml
Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml new file +228 -0
new file mode 100644
index 000000000..f53b353cc
@@ -0,0 +1,228 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/misc/xlnx,axi-fifo-mm-s.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx AXI-Stream FIFO IP core
+
+maintainers:
+  - Omer PALA <[email protected]>
+
+description: |
+  The Xilinx AXI-Stream FIFO IP core has read and write AXI-Stream FIFOs,
+  the contents of which can be accessed from the AXI4 memory-mapped
+  interface. This is useful for transferring data from a processor into
+  the FPGA fabric.
+
+  See Xilinx PG080 for IP details.
+
+  The Linux driver currently supports only store-forward mode with a
+  32-bit AXI4-Lite interface. Cut-through mode and full AXI4 (non-lite)
+  are not supported.
+
+properties:
+  compatible:
+    enum:
+      - xlnx,axi-fifo-mm-s-4.1
+      - xlnx,axi-fifo-mm-s-4.2
+      - xlnx,axi-fifo-mm-s-4.3
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  interrupt-names:
+    items:
+      - const: interrupt
+
+  xlnx,axi-str-rxd-protocol:
+    $ref: /schemas/types.yaml#/definitions/string
+    const: XIL_AXI_STREAM_ETH_DATA
+    description: Protocol of the receive data AXI-Stream interface.
+
+  xlnx,axi-str-rxd-tdata-width:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 32
+    description: Width of the receive data AXI-Stream TDATA bus in bits.
+
+  xlnx,axi-str-txc-protocol:
+    $ref: /schemas/types.yaml#/definitions/string
+    const: XIL_AXI_STREAM_ETH_CTRL
+    description: Protocol of the transmit control AXI-Stream interface.
+
+  xlnx,axi-str-txc-tdata-width:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 32
+    description: Width of the transmit control AXI-Stream TDATA bus in bits.
+
+  xlnx,axi-str-txd-protocol:
+    $ref: /schemas/types.yaml#/definitions/string
+    const: XIL_AXI_STREAM_ETH_DATA
+    description: Protocol of the transmit data AXI-Stream interface.
+
+  xlnx,axi-str-txd-tdata-width:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 32
+    description: Width of the transmit data AXI-Stream TDATA bus in bits.
+
+  xlnx,axis-tdest-width:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: AXI-Stream TDEST width. Ignored by the driver.
+
+  xlnx,axis-tid-width:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: AXI-Stream TID width. Ignored by the driver.
+
+  xlnx,axis-tuser-width:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: AXI-Stream TUSER width. Ignored by the driver.
+
+  xlnx,data-interface-type:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 0
+    description: |
+      Memory-mapped data interface type. Only AXI4-Lite (0) is supported.
+
+  xlnx,has-axis-tdest:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 0
+    description: TDEST support. Not supported by the driver.
+
+  xlnx,has-axis-tid:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 0
+    description: TID support. Not supported by the driver.
+
+  xlnx,has-axis-tkeep:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 0
+    description: TKEEP support. Not supported by the driver.
+
+  xlnx,has-axis-tstrb:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 0
+    description: TSTRB support. Not supported by the driver.
+
+  xlnx,has-axis-tuser:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 0
+    description: TUSER support. Not supported by the driver.
+
+  xlnx,rx-fifo-depth:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Depth of the receive FIFO in words.
+
+  xlnx,rx-fifo-pe-threshold:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Receive FIFO programmable empty interrupt threshold.
+
+  xlnx,rx-fifo-pf-threshold:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Receive FIFO programmable full interrupt threshold.
+
+  xlnx,s-axi-id-width:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Width of the AXI4 slave interface ID bus.
+
+  xlnx,s-axi4-data-width:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 32
+    description: Width of the AXI4 slave data bus in bits.
+
+  xlnx,select-xpm:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 0
+    description: Whether Xilinx Parameterized Macros are used for the FIFOs.
+
+  xlnx,tx-fifo-depth:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Depth of the transmit FIFO in words.
+
+  xlnx,tx-fifo-pe-threshold:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Transmit FIFO programmable empty interrupt threshold.
+
+  xlnx,tx-fifo-pf-threshold:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Transmit FIFO programmable full interrupt threshold.
+
+  xlnx,use-rx-cut-through:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 0
+    description: Receive cut-through mode. Not supported by the driver.
+
+  xlnx,use-rx-data:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0, 1]
+    description: Set to 1 if the receive FIFO is enabled, 0 otherwise.
+
+  xlnx,use-tx-ctrl:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 0
+    description: Transmit control interface. Not supported by the driver.
+
+  xlnx,use-tx-cut-through:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    const: 0
+    description: Transmit cut-through mode. Not supported by the driver.
+
+  xlnx,use-tx-data:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0, 1]
+    description: Set to 1 if the transmit FIFO is enabled, 0 otherwise.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - xlnx,axi-str-rxd-tdata-width
+  - xlnx,axi-str-txd-tdata-width
+  - xlnx,rx-fifo-depth
+  - xlnx,tx-fifo-depth
+  - xlnx,use-rx-data
+  - xlnx,use-tx-data
+
+additionalProperties: false
+
+examples:
+  - |
+    axi_fifo_mm_s@43c00000 {
+        compatible = "xlnx,axi-fifo-mm-s-4.1";
+        reg = <0x43c00000 0x10000>;
+        interrupt-parent = <&intc>;
+        interrupts = <0 29 4>;
+        interrupt-names = "interrupt";
+        xlnx,axi-str-rxd-protocol = "XIL_AXI_STREAM_ETH_DATA";
+        xlnx,axi-str-rxd-tdata-width = <0x20>;
+        xlnx,axi-str-txc-protocol = "XIL_AXI_STREAM_ETH_CTRL";
+        xlnx,axi-str-txc-tdata-width = <0x20>;
+        xlnx,axi-str-txd-protocol = "XIL_AXI_STREAM_ETH_DATA";
+        xlnx,axi-str-txd-tdata-width = <0x20>;
+        xlnx,axis-tdest-width = <0x4>;
+        xlnx,axis-tid-width = <0x4>;
+        xlnx,axis-tuser-width = <0x4>;
+        xlnx,data-interface-type = <0x0>;
+        xlnx,has-axis-tdest = <0x0>;
+        xlnx,has-axis-tid = <0x0>;
+        xlnx,has-axis-tkeep = <0x0>;
+        xlnx,has-axis-tstrb = <0x0>;
+        xlnx,has-axis-tuser = <0x0>;
+        xlnx,rx-fifo-depth = <0x200>;
+        xlnx,rx-fifo-pe-threshold = <0x2>;
+        xlnx,rx-fifo-pf-threshold = <0x1fb>;
+        xlnx,s-axi-id-width = <0x4>;
+        xlnx,s-axi4-data-width = <0x20>;
+        xlnx,select-xpm = <0x0>;
+        xlnx,tx-fifo-depth = <0x8000>;
+        xlnx,tx-fifo-pe-threshold = <0x200>;
+        xlnx,tx-fifo-pf-threshold = <0x7ffb>;
+        xlnx,use-rx-cut-through = <0x0>;
+        xlnx,use-rx-data = <0x0>;
+        xlnx,use-tx-ctrl = <0x0>;
+        xlnx,use-tx-cut-through = <0x0>;
+        xlnx,use-tx-data = <0x1>;
+    };
+...
Signature · 1 line
2.55.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Low] dt-bindings: duplicate legacy text binding not removed - [Low] dt-bindings: misc…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] dt-bindings: duplicate legacy text binding not removed
- [Low] dt-bindings: misc: xlnx,axi-fifo-mm-s node name contains underscores --

commit 1e96a460ceedc5eaed86e4087bdc979b41dd1bd7
Author: Omer PALA <[email protected]>

dt-bindings: misc: add xlnx,axi-fifo-mm-s

Add Device Tree binding documentation for the Xilinx AXI FIFO Memory Mapped Stream IP core. This commit covers compatible strings from version 4.1 through 4.3.

Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml new file +0 -0
new file mode 100644

[Severity: Low]
Is the original text binding at drivers/staging/axis-fifo/axis-fifo.txt still needed?

Since this new YAML binding covers the same hardware in the core DT bindings directory, should the old text binding in the staging directory be removed in this patch to prevent documentation duplication?

Quoted 4 lines

index 0000000000000..f53b353ccc2a1

Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml new file +0 -0
@@ -0,0 +1,228 @@

[ ... ]

Quoted 6 lines
Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml new file +6 -0
+required:
+  - compatible
+  - reg
+  - interrupts
+  - xlnx,axi-str-rxd-tdata-width
+  - xlnx,axi-str-txd-tdata-width

Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml line 192

Quoted 10 lines
Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml new file +10 -0
+  - xlnx,rx-fifo-depth
+  - xlnx,tx-fifo-depth
+  - xlnx,use-rx-data
+  - xlnx,use-tx-data
+
+additionalProperties: false
+
+examples:
+  - |
+    axi_fifo_mm_s@43c00000 {

[Severity: Low]
Does this node name violate standard Device Tree naming conventions?

Using underscores typically triggers node_name_chars_strict warnings during dt_binding_check validation. Should a generic name with hyphens, like fifo@43c00000, be used instead?

Quoted 3 lines
Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml new file +3 -0
+        compatible = "xlnx,axi-fifo-mm-s-4.1";
+        reg = <0x43c00000 0x10000>;
+        interrupt-parent = <&intc>;

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#2 lore raw
In reply to Omer PALA
Quoted 10 lines · Omer PALA

Add Device Tree binding documentation for the Xilinx AXI FIFO Memory Mapped Stream IP core, covering compatible strings from version 4.1 through 4.3.

---
 .../bindings/misc/xlnx,axi-fifo-mm-s.yaml     | 228 ++++++++++++++++++
 1 file changed, 228 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml

Same day? Are you coordinating this anyhow?
https://lore.kernel.org/all/[email protected]/

Anyway, same answer.

Best regards,
Krzysztof