dt-bindings: misc: add documentation for Xilinx AXI-Stream FIFO IP core
PATCH 1/1 dt-bindings: misc: add documentation for Xilinx AXI-Stream FIFO IP core
Add device tree binding documentation for the Xilinx AXI-Stream FIFO IP core (PG080). This documents the compatible strings used in drivers/staging/axis-fifo/axis-fifo.c which were previously flagged as undocumented by checkpatch.
Documented compatible strings:
- xlnx,axi-fifo-mm-s-4.1
- xlnx,axi-fifo-mm-s-4.2
- xlnx,axi-fifo-mm-s-4.3
--- .../bindings/misc/xlnx,axi-fifo-mm-s.yaml | 44 +++++++++++++++++++ 1 file changed, 44 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 +44 -0
@@ -0,0 +1,44 @@ +# 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: + - Jacob Feder <[email protected]> + +description: + The Xilinx AXI-Stream FIFO IP core allows memory-mapped access to an + AXI-Stream interface. It supports both transmit and receive FIFO + operations via a memory-mapped register interface. See Xilinx PG080 + for full IP details. + +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 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + axi_fifo: fifo@43c00000 { + compatible = "xlnx,axi-fifo-mm-s-4.1"; + reg = <0x43c00000 0x10000>; + interrupts = <0 58 4>; + };
Signature · 1 line
2.50.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] The YAML binding schema is incomplete and sets `additionalProperties: false`, which rejects valid…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The YAML binding schema is incomplete and sets additionalProperties: false, which rejects valid device trees and breaks driver probing.
- [Low] The commit introduces a new YAML binding but fails to remove the existing text-based binding, leading to duplicated and conflicting documentation. --
commit a25eb1af928bc942c4ddef43a8d5e91efa619819
Author: Kartik Nair <[email protected]>
dt-bindings: misc: add documentation for Xilinx AXI-Stream FIFO IP core
This patch adds device tree binding documentation for the Xilinx AXI-Stream FIFO IP core. It introduces a new YAML schema to document the compatible strings used by the axis-fifo driver.
Does this update also need to remove the existing text-based binding at drivers/staging/axis-fifo/axis-fifo.txt? Keeping the legacy text file alongside the new YAML schema introduces duplicated and conflicting documentation.
Quoted 6 lines
Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml new file +0
-0@@ -0,0 +1,44 @@
[ ... ]
Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml line 29
Quoted 12 lines
Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml new file +12
-0+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
The drivers/staging/axis-fifo/axis-fifo.c driver requires several vendor specific properties to probe successfully, such as xlnx,axi-str-rxd-tdata-width, xlnx,axi-str-txd-tdata-width, xlnx,rx-fifo-depth, xlnx,tx-fifo-depth, xlnx,use-rx-data, and xlnx,use-tx-data.
Are these properties missing from the schema?
Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml line 36
Quoted 6 lines
Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml new file +6
-0+required: + - compatible + - reg + - interrupts + +additionalProperties: false
If the vendor properties are added to the device tree to allow the driver to probe, won't setting additionalProperties to false cause the schema validation to fail?
Device trees that pass this strict schema would then fail at runtime since the driver will abort the probe when the missing properties are not found.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 11 lines · Kartik Nair
Add device tree binding documentation for the Xilinx AXI-Stream FIFO IP core (PG080). This documents the compatible strings used in
drivers/staging/axis-fifo/axis-fifo.cwhich were previously flagged as undocumented by checkpatch.Documented compatible strings:
- xlnx,axi-fifo-mm-s-4.1
- xlnx,axi-fifo-mm-s-4.2
- xlnx,axi-fifo-mm-s-4.3Signed-off-by Kartik Nair <[email protected]>
How many times this binding is going to be sent? This is like fifth time!
Please use search on lore before you start working on something.
Best regards,
Krzysztof