Skip to contentSkip to conversation

dt-bindings: misc: xlnx,sd-fec: convert bindings to yaml

PATCH Superseded Dragan Cvetic 4 participants 11 messages Jan 16, 2024 – Jan 19, 2024

Subsystems (2)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Dragan Cvetic

author maintainer
#0 lore raw

cover dt-bindings: misc: xlnx,sd-fec: convert bindings to yaml

This patchset converts AMD (Xilinx) sd-fec bindings to yaml format, so it can validate dt-entries as well as any future additions to yaml. Conversion txt to yamal is done "one to one", no new changes has been made in DT binding file.
Convert sd-fec DT binding file extension from .txt to .yaml in the MAINTAINERS file

Dragan Cvetic (2):
dt-bindings: misc: xlnx,sd-fec: convert bindings to yaml
MAINTAINERS: Update sd-fec documentation file from txt to yaml

 .../devicetree/bindings/misc/xlnx,sd-fec.txt  |  58 --------
 .../devicetree/bindings/misc/xlnx,sd-fec.yaml | 132 ++++++++++++++++++
 MAINTAINERS                                   |   2 +-
 3 files changed, 133 insertions(+), 59 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt
 create mode 100644 Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml
Signature · 1 line
2.17.1
author maintainer
#8 lore raw

PATCH 2/2 MAINTAINERS: Update sd-fec documentation file from txt to yaml

The documentation for sd-fec bindings is now YAML, so update the MAINTAINERS file.

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
index 35147477e8e4..37754901119d 100644
@@ -23942,7 +23942,7 @@ XILINX SD-FEC IP CORES
 M:	Derek Kiernan <[email protected]>
 M:	Dragan Cvetic <[email protected]>
 S:	Maintained
-F:	Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt
+F:	Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml
 F:	Documentation/misc-devices/xilinx_sdfec.rst
 F:	drivers/misc/Kconfig
 F:	drivers/misc/Makefile
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

PATCH 1/2 dt-bindings: misc: xlnx,sd-fec: convert bindings to yaml

In reply to Dragan Cvetic

Convert AMD (Xilinx) sd-fec bindings to yaml format, so it can validate dt-entries as well as any future additions to yaml. Conversion txt to yamal is done "one to one", no new changes in txt file has been made.

---
 .../devicetree/bindings/misc/xlnx,sd-fec.txt  |  58 --------
 .../devicetree/bindings/misc/xlnx,sd-fec.yaml | 132 ++++++++++++++++++
 2 files changed, 132 insertions(+), 58 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt
 create mode 100644 Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml
Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt deleted +0 -58
deleted file mode 100644
index e3289634fa30..000000000000
@@ -1,58 +0,0 @@
-* Xilinx SDFEC(16nm) IP *
-
-The Soft Decision Forward Error Correction (SDFEC) Engine is a Hard IP block
-which provides high-throughput LDPC and Turbo Code implementations.
-The LDPC decode & encode functionality is capable of covering a range of
-customer specified Quasi-cyclic (QC) codes. The Turbo decode functionality
-principally covers codes used by LTE. The FEC Engine offers significant
-power and area savings versus implementations done in the FPGA fabric.
-
-
-Required properties:
-- compatible: Must be "xlnx,sd-fec-1.1"
-- clock-names : List of input clock names from the following:
-    - "core_clk", Main processing clock for processing core (required)
-    - "s_axi_aclk", AXI4-Lite memory-mapped slave interface clock (required)
-    - "s_axis_din_aclk", DIN AXI4-Stream Slave interface clock (optional)
-    - "s_axis_din_words-aclk", DIN_WORDS AXI4-Stream Slave interface clock (optional)
-    - "s_axis_ctrl_aclk",  Control input AXI4-Stream Slave interface clock (optional)
-    - "m_axis_dout_aclk", DOUT AXI4-Stream Master interface clock (optional)
-    - "m_axis_dout_words_aclk", DOUT_WORDS AXI4-Stream Master interface clock (optional)
-    - "m_axis_status_aclk", Status output AXI4-Stream Master interface clock (optional)
-- clocks : Clock phandles (see clock_bindings.txt for details).
-- reg: Should contain Xilinx SDFEC 16nm Hardened IP block registers
-  location and length.
-- xlnx,sdfec-code : Should contain "ldpc" or "turbo" to describe the codes
-  being used.
-- xlnx,sdfec-din-words : A value 0 indicates that the DIN_WORDS interface is
-  driven with a fixed value and is not present on the device, a value of 1
-  configures the DIN_WORDS to be block based, while a value of 2 configures the
-  DIN_WORDS input to be supplied for each AXI transaction.
-- xlnx,sdfec-din-width : Configures the DIN AXI stream where a value of 1
-  configures a width of "1x128b", 2 a width of "2x128b" and 4 configures a width
-  of "4x128b".
-- xlnx,sdfec-dout-words : A value 0 indicates that the DOUT_WORDS interface is
-  driven with a fixed value and is not present on the device, a value of 1
-  configures the DOUT_WORDS to be block based, while a value of 2 configures the
-  DOUT_WORDS input to be supplied for each AXI transaction.
-- xlnx,sdfec-dout-width : Configures the DOUT AXI stream where a value of 1
-  configures a width of "1x128b", 2 a width of "2x128b" and 4 configures a width
-  of "4x128b".
-Optional properties:
-- interrupts: should contain SDFEC interrupt number
-
-Example
----------------------------------------
-	sd_fec_0: sd-fec@a0040000 {
-		compatible = "xlnx,sd-fec-1.1";
-		clock-names = "core_clk","s_axi_aclk","s_axis_ctrl_aclk","s_axis_din_aclk","m_axis_status_aclk","m_axis_dout_aclk";
-		clocks = <&misc_clk_2>,<&misc_clk_0>,<&misc_clk_1>,<&misc_clk_1>,<&misc_clk_1>, <&misc_clk_1>;
-		reg = <0x0 0xa0040000 0x0 0x40000>;
-		interrupt-parent = <&axi_intc>;
-		interrupts = <1 0>;
-		xlnx,sdfec-code = "ldpc";
-		xlnx,sdfec-din-words = <0>;
-		xlnx,sdfec-din-width = <2>;
-		xlnx,sdfec-dout-words = <0>;
-		xlnx,sdfec-dout-width = <1>;
-	};
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +132 -0

132 lines not on this page · raw message

Signature · 1 line
2.17.1
#9 lore raw

Re: [PATCH 2/2] MAINTAINERS: Update sd-fec documentation file from txt to yaml

In reply to Dragan Cvetic
Quoted 2 lines · Dragan Cvetic

The documentation for sd-fec bindings is now YAML, so update the MAINTAINERS file.

This cannot be separate patch - it's not bisectable. Also does not make sense to split it: why having incorrect path on patch #1?

Best regards,
Krzysztof

#2 lore raw
In reply to Dragan Cvetic
Quoted 6 lines · Dragan Cvetic

Convert AMD (Xilinx) sd-fec bindings to yaml format, so it can validate dt-entries as well as any future additions to yaml. Conversion txt to yamal is done "one to one", no new changes in txt file has been made.

Where? Please provide a link. Judging by amount of issues here, I have some doubts, because I know Michal writes good schema. :)

Quoted 1 line

All your patches were marked as spam. Please work with your IT to resolve it, otherwise your future submissions might get ignored by me, because I will just not see them.

Quoted 7 lines
---
 .../devicetree/bindings/misc/xlnx,sd-fec.txt  |  58 --------
 .../devicetree/bindings/misc/xlnx,sd-fec.yaml | 132 ++++++++++++++++++
 2 files changed, 132 insertions(+), 58 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt
 create mode 100644 Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC (and consider --no-git-fallback argument). It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

Looks like you either based it on some downstream tree (don't do this) or used random list of recipients (also don't do this).

Please reach to other AMD folks to explain you how patches should be submitted. There are a lot of experienced guys there, so use them.

Quoted 8 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt deleted +0 -2
deleted file mode 100644
index e3289634fa30..000000000000
@@ -1,58 +0,0 @@
-* Xilinx SDFEC(16nm) IP *
-

...

Quoted 26 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt deleted +0 -1
-	};
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +19 -0
new file mode 100644
index 000000000000..05bc01cb5075
@@ -0,0 +1,132 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/misc/xlnx,sd-fec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx SDFEC(16nm) IP
+
+maintainers:
+  - Cvetic, Dragan <[email protected]>
+  - Erim, Salih <[email protected]>
+
+description: |
+  The Soft Decision Forward Error Correction (SDFEC) Engine is a Hard IP block
+  which provides high-throughput LDPC and Turbo Code implementations.
+  The LDPC decode & encode functionality is capable of covering a range of
+  customer specified Quasi-cyclic (QC) codes. The Turbo decode functionality
+  principally covers codes used by LTE. The FEC Engine offers significant
+  power and area savings versus implementations done in the FPGA fabric.

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 29

Quoted 10 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +10 -0
+
+properties:
+  compatible:
+    const: xlnx,sd-fec-1.1
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    description: List of clock specifiers.

Drop description, it's obvious. Do you see it anywhere in existing code?

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 30

Quoted 1 line
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +1 -0
+    additionalItems: true

Drop, you cannot have it.

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 32

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +2 -0
+    minItems: 2
+    maxItems: 8

Drop maxItems, not needed.

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 34

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +2 -0
+    items:
+      - description: Main processing clock for processing core.

Drop trailing full-stops.

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 44

Quoted 10 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +10 -0
+      - description: AXI4-Lite memory-mapped slave interface clock.
+      - description: Control input AXI4-Stream Slave interface clock.
+      - description: DIN AXI4-Stream Slave interface clock.
+      - description: Status output AXI4-Stream Master interface clock.
+      - description: DOUT AXI4-Stream Master interface clock.
+      - description: DIN_WORDS AXI4-Stream Slave interface clock
+      - description: DOUT_WORDS AXI4-Stream Master interface clock
+
+  clock-names:
+    additionalItems: true

Nope

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 46

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +2 -0
+    minItems: 2
+    maxItems: 8

Nope

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 56

Quoted 10 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +10 -0
+    items:
+      - const: core_clk
+      - const: s_axi_aclk
+      - enum:
+          - s_axis_ctrl_aclk
+          - s_axis_din_aclk
+          - m_axis_status_aclk
+          - m_axis_dout_aclk
+          - s_axis_din_words_aclk
+          - m_axis_dout_words_aclk

Why order is not enforced?

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 63

Quoted 7 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +7 -0
+
+  interrupts:
+    maxItems: 1
+
+  xlnx,sdfec-code:
+    description:
+      Should contain "ldpc" or "turbo" to describe the codes being used.

Useless description, you just copied schema. Instead say something useful, e.g. the meaning.

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 64

Quoted 1 line
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +1 -0
+    $ref: /schemas/types.yaml#/definitions/string-array

It's not an array, but string, is it?

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 65

Quoted 1 line
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +1 -0
+    items:

How many items? Is it a string?

Quoted 42 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +42 -0
+      enum: [ ldpc, turbo ]
+
+  xlnx,sdfec-din-width:
+    description: |
+      Configures the DIN AXI stream where a value of 1
+      configures a width of "1x128b", 2 a width of "2x128b" and 4 configures a width
+      of "4x128b".
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 1, 2, 4 ]
+
+  xlnx,sdfec-din-words:
+    description: |
+      A value 0 indicates that the DIN_WORDS interface is
+      driven with a fixed value and is not present on the device, a value of 1
+      configures the DIN_WORDS to be block based, while a value of 2 configures the
+      DIN_WORDS input to be supplied for each AXI transaction.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 0, 1, 2 ]
+
+  xlnx,sdfec-dout-width:
+    description: |
+      Configures the DOUT AXI stream where a value of 1 configures a width of "1x128b",
+      2 a width of "2x128b" and 4 configures a width of "4x128b".
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 1, 2, 4 ]
+
+  xlnx,sdfec-dout-words:
+    description: |
+      A value 0 indicates that the DOUT_WORDS interface is
+      driven with a fixed value and is not present on the device, a value of 1
+      configures the DOUT_WORDS to be block based, while a value of 2 configures the
+      DOUT_WORDS input to be supplied for each AXI transaction.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 0, 1, 2 ]
+
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - xlnx,sdfec-code

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 117

Quoted 10 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +10 -0
+  - xlnx,sdfec-din-width
+  - xlnx,sdfec-din-words
+  - xlnx,sdfec-dout-width
+  - xlnx,sdfec-dout-words
+
+additionalProperties: false
+
+examples:
+  - |
+    sd-fec@a0040000 {

Node names should be generic. See also an explanation and list of examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 125

Quoted 8 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +8 -0
+        compatible = "xlnx,sd-fec-1.1";
+        reg = <0xa0040000 0x40000>;
+        clocks = <&misc_clk_2>, <&misc_clk_0>, <&misc_clk_1>, <&misc_clk_1>,
+                 <&misc_clk_1>, <&misc_clk_1>;
+        clock-names = "core_clk", "s_axi_aclk", "s_axis_ctrl_aclk",
+                      "s_axis_din_aclk", "m_axis_status_aclk",
+                      "m_axis_dout_aclk";
+        interrupts = <1 0>;

If 0 is a flag, use proper defines. Then think twice whether NONE is really a correct type of interrupt.

Best regards,
Krzysztof

#3 lore raw
Quoted 10 lines · Krzysztof Kozlowski
Quoted 6 lines · Dragan Cvetic

Convert AMD (Xilinx) sd-fec bindings to yaml format, so it can validate dt-entries as well as any future additions to yaml. Conversion txt to yamal is done "one to one", no new changes in txt file has been made.

Where? Please provide a link. Judging by amount of issues here, I have some doubts, because I know Michal writes good schema. :)

I reviewed it internally. But yes, I didn't provide this line. And never said that 2/2 should be separate patch too. :-)

Quoted 120 lines
Quoted 2 lines

All your patches were marked as spam. Please work with your IT to resolve it, otherwise your future submissions might get ignored by me, because I will just not see them.

Quoted 7 lines
---
  .../devicetree/bindings/misc/xlnx,sd-fec.txt  |  58 --------
  .../devicetree/bindings/misc/xlnx,sd-fec.yaml | 132 ++++++++++++++++++
  2 files changed, 132 insertions(+), 58 deletions(-)

delete mode 100644 Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt create mode 100644 Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC (and consider --no-git-fallback argument). It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

Looks like you either based it on some downstream tree (don't do this) or used random list of recipients (also don't do this).

Please reach to other AMD folks to explain you how patches should be submitted. There are a lot of experienced guys there, so use them.

Quoted 8 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt deleted +0 -2
deleted file mode 100644
index e3289634fa30..000000000000
@@ -1,58 +0,0 @@
-* Xilinx SDFEC(16nm) IP *
-

...

Quoted 26 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt deleted +0 -1
-	};
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +19 -0
new file mode 100644
index 000000000000..05bc01cb5075
@@ -0,0 +1,132 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/misc/xlnx,sd-fec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx SDFEC(16nm) IP
+
+maintainers:
+  - Cvetic, Dragan <[email protected]>
+  - Erim, Salih <[email protected]>
+
+description: |
+  The Soft Decision Forward Error Correction (SDFEC) Engine is a Hard IP block
+  which provides high-throughput LDPC and Turbo Code implementations.
+  The LDPC decode & encode functionality is capable of covering a range of
+  customer specified Quasi-cyclic (QC) codes. The Turbo decode functionality
+  principally covers codes used by LTE. The FEC Engine offers significant
+  power and area savings versus implementations done in the FPGA fabric.

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 29

Quoted 10 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +10 -0
+
+properties:
+  compatible:
+    const: xlnx,sd-fec-1.1
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    description: List of clock specifiers.

Drop description, it's obvious. Do you see it anywhere in existing code?

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 30

Quoted 1 line
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +1 -0
+    additionalItems: true

Drop, you cannot have it.

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 32

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +2 -0
+    minItems: 2
+    maxItems: 8

Drop maxItems, not needed.

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 34

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +2 -0
+    items:
+      - description: Main processing clock for processing core.

Drop trailing full-stops.

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 44

Quoted 10 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +10 -0
+      - description: AXI4-Lite memory-mapped slave interface clock.
+      - description: Control input AXI4-Stream Slave interface clock.
+      - description: DIN AXI4-Stream Slave interface clock.
+      - description: Status output AXI4-Stream Master interface clock.
+      - description: DOUT AXI4-Stream Master interface clock.
+      - description: DIN_WORDS AXI4-Stream Slave interface clock
+      - description: DOUT_WORDS AXI4-Stream Master interface clock
+
+  clock-names:
+    additionalItems: true

Nope

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 46

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +2 -0
+    minItems: 2
+    maxItems: 8

Nope

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 56

Quoted 10 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +10 -0
+    items:
+      - const: core_clk
+      - const: s_axi_aclk
+      - enum:
+          - s_axis_ctrl_aclk
+          - s_axis_din_aclk
+          - m_axis_status_aclk
+          - m_axis_dout_aclk
+          - s_axis_din_words_aclk
+          - m_axis_dout_words_aclk
Quoted 1 line

Why order is not enforced?

Let me comment this one. Based on my discussion with Dragan IP itself is configurable and only the first two clocks are in all combinations. But based on his description that last 6 clocks can be present in some of them. It means order is not really fixed and any combination is possible.
That's why I have suggested him to use this description because I didn't find any better one.
I actually tested this schema here but didn't get a feedback on it yet.
https://lore.kernel.org/r/3e86244a840a45c970289ba6d2fa700a74f5b259.1705051222.git.michal.simek@amd.com

It means not sure about not defining maxItems but when I don't do it it is not passing dtbs_check.

Thanks,
Michal

#4 lore raw
Quoted 32 lines · Michal Simek
Quoted 21 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 44

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +2 -0
+  clock-names:
+    additionalItems: true

Nope

Review

Quoted 2 lines
(quoted diff) +2 -0
+    minItems: 2
+    maxItems: 8

Nope

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 56

Quoted 10 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +10 -0
+    items:
+      - const: core_clk
+      - const: s_axi_aclk
+      - enum:
+          - s_axis_ctrl_aclk
+          - s_axis_din_aclk
+          - m_axis_status_aclk
+          - m_axis_dout_aclk
+          - s_axis_din_words_aclk
+          - m_axis_dout_words_aclk
Quoted 1 line

Why order is not enforced?

Let me comment this one. Based on my discussion with Dragan IP itself is configurable and only the first two clocks are in all combinations. But based on his description that last 6 clocks can be present in some of them. It means order is not really fixed and any combination is possible. That's why I have suggested him to use this description because I didn't find any better one.
I actually tested this schema here but didn't get a feedback on it yet.
https://lore.kernel.org/r/3e86244a840a45c970289ba6d2fa700a74f5b259.1705051222.git.michal.simek@amd.com

Quoted 2 lines

It means not sure about not defining maxItems but when I don't do it it is not passing dtbs_check.

This would explain why you want additionalItems:true, but it should be also explained in commit msg. Old code did not have such relaxed statement, at least not explicitly written, and commit msg explicitly says it is 1-to-1 conversion.

Anyway, current solution won't work, because additional items can be anything. Try it. Put as fourth clock "yellow_duck" and see what happens.

I don't find such names as useful and maybe the drivers should just get by index. Especially that Linux driver does not care. It would be a ABI change, though, so up to you.

If you want to keep the names, then:
1. Look at snps,dwmac.yaml
2. or just list 6 enums with all possibilities.

Best regards,
Krzysztof

author maintainer
#6 lore raw
In reply to Krzysztof Kozlowski
Quoted 21 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Tuesday, January 16, 2024 3:21 PM
To: Cvetic, Dragan <[email protected]>; [email protected]; [email protected]; [email protected]; linux-arm- [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; git (AMD-Xilinx) <[email protected]>
Subject: Re: [PATCH 1/2] dt-bindings: misc: xlnx,sd-fec: convert bindings to yaml

Quoted 6 lines · Dragan Cvetic

Convert AMD (Xilinx) sd-fec bindings to yaml format, so it can validate dt-entries as well as any future additions to yaml. Conversion txt to yamal is done "one to one", no new changes in txt file has been made.

Quoted 9 lines

Where? Please provide a link. Judging by amount of issues here, I have some doubts, because I know Michal writes good schema. :)

Quoted 1 line

All your patches were marked as spam. Please work with your IT to resolve it, otherwise your future submissions might get ignored by me, because I will just not see them.

I've communicated the issue to internal IT, still waiting for response. Will send v2 after resolving spam issue.

Quoted 16 lines
Quoted 5 lines
---
 .../devicetree/bindings/misc/xlnx,sd-fec.txt  |  58 --------
 .../devicetree/bindings/misc/xlnx,sd-fec.yaml | 132 ++++++++++++++++++
 2 files changed, 132 insertions(+), 58 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/misc/xlnx,sd-

fec.txt

Quoted 1 line
 create mode 100644 Documentation/devicetree/bindings/misc/xlnx,sd-

fec.yaml

Quoted 1 line

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC (and consider --no-git-fallback argument). It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

Quoted 5 lines

Looks like you either based it on some downstream tree (don't do this) or used random list of recipients (also don't do this).

Please reach to other AMD folks to explain you how patches should be submitted. There are a lot of experienced guys there, so use them.

Accepted. Yes I communicated AMD experts. Sorry for the mistake.

Quoted 40 lines

Review

Quoted 2 lines
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt

Quoted 7 lines

deleted file mode 100644
index e3289634fa30..000000000000

Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt deleted +0 -2
@@ -1,58 +0,0 @@
-* Xilinx SDFEC(16nm) IP *
-

...

Review

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt deleted +0 -1
-	};
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml

Quoted 9 lines

new file mode 100644
index 000000000000..05bc01cb5075

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +4 -0
@@ -0,0 +1,132 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/misc/xlnx,sd-fec.yaml#

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 14

Quoted 10 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +10 -0
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx SDFEC(16nm) IP
+
+maintainers:
+  - Cvetic, Dragan <[email protected]>
+  - Erim, Salih <[email protected]>
+
+description: |
+  The Soft Decision Forward Error Correction (SDFEC) Engine is a Hard IP

block

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml

Quoted 3 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +3 -0
+  which provides high-throughput LDPC and Turbo Code implementations.
+  The LDPC decode & encode functionality is capable of covering a range of
+  customer specified Quasi-cyclic (QC) codes. The Turbo decode

functionality

Quoted 14 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 29

Quoted 12 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +12 -0
+  principally covers codes used by LTE. The FEC Engine offers significant
+  power and area savings versus implementations done in the FPGA fabric.
+
+properties:
+  compatible:
+    const: xlnx,sd-fec-1.1
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    description: List of clock specifiers.

Drop description, it's obvious. Do you see it anywhere in existing code?

Accepted

Quoted 4 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 30

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +1 -0
+    additionalItems: true

Drop, you cannot have it.

Will update commit message explaining the clocks structure

Quoted 5 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 32

Quoted 3 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +2 -0
+    minItems: 2
+    maxItems: 8

Drop maxItems, not needed.

Will update commit message explaining the clocks structure

Quoted 5 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 34

Quoted 3 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +2 -0
+    items:
+      - description: Main processing clock for processing core.

Drop trailing full-stops.

Accepted

Quoted 12 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 44

Quoted 11 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +10 -0
+      - description: AXI4-Lite memory-mapped slave interface clock.
+      - description: Control input AXI4-Stream Slave interface clock.
+      - description: DIN AXI4-Stream Slave interface clock.
+      - description: Status output AXI4-Stream Master interface clock.
+      - description: DOUT AXI4-Stream Master interface clock.
+      - description: DIN_WORDS AXI4-Stream Slave interface clock
+      - description: DOUT_WORDS AXI4-Stream Master interface clock
+
+  clock-names:
+    additionalItems: true
Quoted 1 line

Nope

Will update commit message explaining the clocks structure

Quoted 5 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 46

Quoted 3 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +2 -0
+    minItems: 2
+    maxItems: 8

Nope

Will update commit message explaining the clocks structure

Quoted 12 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 56

Quoted 11 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +10 -0
+    items:
+      - const: core_clk
+      - const: s_axi_aclk
+      - enum:
+          - s_axis_ctrl_aclk
+          - s_axis_din_aclk
+          - m_axis_status_aclk
+          - m_axis_dout_aclk
+          - s_axis_din_words_aclk
+          - m_axis_dout_words_aclk
Quoted 1 line

Why order is not enforced?

Will update commit message explaining the clocks structure

Quoted 11 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 63

Quoted 8 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +7 -0
+
+  interrupts:
+    maxItems: 1
+
+  xlnx,sdfec-code:
+    description:
+      Should contain "ldpc" or "turbo" to describe the codes being used.

Useless description, you just copied schema. Instead say something useful, e.g. the meaning.

I assumed if description was accepted in .txt file it should be good in yaml. I accept your comment anyway, will put better description

Quoted 4 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 64

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +1 -0
+    $ref: /schemas/types.yaml#/definitions/string-array

It's not an array, but string, is it?

The item is a string which defines device working mode. Can be either "ldpc" or "turbo". Please, advice what would be the correct way to set this item?

Quoted 4 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 65

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +1 -0
+    items:

How many items? Is it a string?

It's one item with two options "ldpc" and "turbo"

Quoted 54 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml

Quoted 7 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +6 -0
+      enum: [ ldpc, turbo ]
+
+  xlnx,sdfec-din-width:
+    description: |
+      Configures the DIN AXI stream where a value of 1
+      configures a width of "1x128b", 2 a width of "2x128b" and 4 configures

a width

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml

Quoted 9 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +9 -0
+      of "4x128b".
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 1, 2, 4 ]
+
+  xlnx,sdfec-din-words:
+    description: |
+      A value 0 indicates that the DIN_WORDS interface is
+      driven with a fixed value and is not present on the device, a value of 1
+      configures the DIN_WORDS to be block based, while a value of 2

configures the

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml

Quoted 7 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +7 -0
+      DIN_WORDS input to be supplied for each AXI transaction.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 0, 1, 2 ]
+
+  xlnx,sdfec-dout-width:
+    description: |
+      Configures the DOUT AXI stream where a value of 1 configures a width

of "1x128b",

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml

Quoted 9 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +9 -0
+      2 a width of "2x128b" and 4 configures a width of "4x128b".
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 1, 2, 4 ]
+
+  xlnx,sdfec-dout-words:
+    description: |
+      A value 0 indicates that the DOUT_WORDS interface is
+      driven with a fixed value and is not present on the device, a value of 1
+      configures the DOUT_WORDS to be block based, while a value of 2

configures the

Quoted 18 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +18 -0
+      DOUT_WORDS input to be supplied for each AXI transaction.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 0, 1, 2 ]
+
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - xlnx,sdfec-code
+  - xlnx,sdfec-din-width
+  - xlnx,sdfec-din-words
+  - xlnx,sdfec-dout-width
+  - xlnx,sdfec-dout-words
+
+additionalProperties: false
+
Quoted 9 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 117

Quoted 3 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +3 -0
+examples:
+  - |
+    sd-fec@a0040000 {

Node names should be generic. See also an explanation and list of examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-
devicetree-basics.html#generic-names-recommendation

The device is "Soft Decision - Forward Eror Correction", I cannot find appropriate name in the list for this device. This looks generic enough to me. What would be your suggestion?

Quoted 5 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml

Quoted 4 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +3 -0
+        compatible = "xlnx,sd-fec-1.1";
+        reg = <0xa0040000 0x40000>;
+        clocks = <&misc_clk_2>, <&misc_clk_0>, <&misc_clk_1>,

<&misc_clk_1>,

Quoted 9 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 125

Quoted 5 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +5 -0
+                 <&misc_clk_1>, <&misc_clk_1>;
+        clock-names = "core_clk", "s_axi_aclk", "s_axis_ctrl_aclk",
+                      "s_axis_din_aclk", "m_axis_status_aclk",
+                      "m_axis_dout_aclk";
+        interrupts = <1 0>;

If 0 is a flag, use proper defines. Then think twice whether NONE is really a correct type of interrupt.

Yes, this is correct.
Also, the interrupt may or may not be present, I will put this in commit message.

Quoted 4 lines

Best regards,
Krzysztof

author maintainer
#5 lore raw
In reply to Krzysztof Kozlowski

Hi Krzysztof

Quoted 48 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Tuesday, January 16, 2024 3:45 PM
To: Simek, Michal <[email protected]>; Cvetic, Dragan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; git (AMD-Xilinx) <[email protected]>
Subject: Re: [PATCH 1/2] dt-bindings: misc: xlnx,sd-fec: convert bindings to yaml

Quoted 21 lines · Michal Simek
Quoted 21 lines

Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml line 44

Quoted 2 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +2 -0
+  clock-names:
+    additionalItems: true

Nope

Review

Quoted 2 lines
(quoted diff) +2 -0
+    minItems: 2
+    maxItems: 8

Nope

Quoted 10 lines
Documentation/devicetree/bindings/misc/xlnx,sd-fec.yaml new file +10 -0
+    items:
+      - const: core_clk
+      - const: s_axi_aclk
+      - enum:
+          - s_axis_ctrl_aclk
+          - s_axis_din_aclk
+          - m_axis_status_aclk
+          - m_axis_dout_aclk
+          - s_axis_din_words_aclk
+          - m_axis_dout_words_aclk
Quoted 4 lines
Quoted 1 line

Why order is not enforced?

Let me comment this one. Based on my discussion with Dragan IP itself is configurable and only the first two clocks are in all combinations. But based

on

Quoted 6 lines

his description that last 6 clocks can be present in some of them. It means order is not really fixed and any combination is possible. That's why I have suggested him to use this description because I didn't find any better one.
I actually tested this schema here but didn't get a feedback on it yet.

https://lore.kernel.org/r/3e86244a840a45c970289ba6d2fa700a74f5b259.170
[email protected]

Quoted 2 lines

It means not sure about not defining maxItems but when I don't do it it is

Quoted 8 lines

not

Quoted 1 line

passing dtbs_check.

This would explain why you want additionalItems:true, but it should be also explained in commit msg. Old code did not have such relaxed statement, at least not explicitly written, and commit msg explicitly says it is 1-to-1 conversion.

Accepted, Will update commit message

Quoted 10 lines

Anyway, current solution won't work, because additional items can be anything. Try it. Put as fourth clock "yellow_duck" and see what happens.

I don't find such names as useful and maybe the drivers should just get by index. Especially that Linux driver does not care. It would be a ABI change, though, so up to you.

If you want to keep the names, then:
1. Look at snps,dwmac.yaml

Accepted, will keep the names and will apply solution from snps,dwmac.yaml.

Regards
Dragan

author maintainer
#10 lore raw

RE: [PATCH 2/2] MAINTAINERS: Update sd-fec documentation file from txt to yaml

In reply to Krzysztof Kozlowski
Quoted 13 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Tuesday, January 16, 2024 3:13 PM
To: Cvetic, Dragan <[email protected]>; [email protected]; [email protected]; [email protected]; linux-arm- [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; git (AMD-Xilinx) <[email protected]>
Subject: Re: [PATCH 2/2] MAINTAINERS: Update sd-fec documentation file from txt to yaml

Quoted 6 lines
Quoted 2 lines · Dragan Cvetic

The documentation for sd-fec bindings is now YAML, so update the MAINTAINERS file.

This cannot be separate patch - it's not bisectable. Also does not make sense to split it: why having incorrect path on patch #1?

Accepted.

Best Regards
Dragan

Quoted 3 lines

Best regards,
Krzysztof

#7 lore raw
In reply to Dragan Cvetic
kernel test robot noticed the following build warnings:

Hi Dragan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on soc/for-next]
[also build test WARNING on robh/for-next linus/master v6.7 next-20240119] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Dragan-Cvetic/dt-bindings-misc-xlnx-sd-fec-convert-bindings-to-yaml/20240116-191349
base:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
patch link:    https://lore.kernel.org/r/20240116111135.3059-2-dragan.cvetic%40amd.com
patch subject: [PATCH 1/2] dt-bindings: misc: xlnx,sd-fec: convert bindings to yaml
reproduce: (https://download.01.org/0day-ci/archive/20240120/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> Warning: Documentation/misc-devices/xilinx_sdfec.rst references a file that doesn't exist: linux-xlnx/Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki