Message ID | 20231226-support-clearfog-gtr-l8-sfp-v3-1-fd1ac2d6bf2e@solid-run.com |
---|---|
State | New |
Headers | show |
Series | [v3,1/8] dt-bindings: marvell: a38x: convert the soc compatibles description to yaml | expand |
Am 27.12.23 um 12:49 schrieb Krzysztof Kozlowski: > On 26/12/2023 19:11, Josua Mayer wrote: >> Convert the existing txt binding for armada-38x socs to DT schema >> format. > ... > >> +--- >> +$id: http://devicetree.org/schemas/arm/marvell/armada-38x.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Marvell Armada 38x Platforms >> + >> +maintainers: >> + - Gregory CLEMENT <gregory.clement@bootlin.com> >> + >> +properties: >> + $nodename: >> + const: '/' >> + compatible: >> + oneOf: >> + >> + - description: Armada 380 SoC >> + items: >> + - const: marvell,armada380 >> + > Thanks for the conversion. I think this is still not what we want. The > main problem is of course in the original binding, not your conversion. > Compatible armada380 above alone is not correct. This is SoC and SoC > compatible cannot be used alone, because it is not specific enough to > differentiate boards. Same applies for further lists, which I removed > from the quote, for the same reasons. > > What we could do here is to fix this instead of pure conversion: > 1. Add this binding file with new compatibles for existing boards and > drop the TXT file, with explanation that you actually document properly > all existing board compatibles. So - we could add a boilerplate yaml with zero boards in conversion commit, and then add new or existing boards through separate commits? I feel that collecting / fixing the compatibles for all a38x based boards might be a lot of effort. Would it be acceptable to start with the few that I know / use myself? In addition to those already submitted I could include armada-388-helios4.dts. > 2. Add compatibles to existing DTS. For boards I do not know / using codenames - is there a template / generic description string? > 3. Add your new board compatibles. > > At least this is what I would do for typical cases, but as I said > before, Marvell here is in some surprising limbo state. Thank you for the constructive notes! > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-38x.txt b/Documentation/devicetree/bindings/arm/marvell/armada-38x.txt deleted file mode 100644 index 202953f1887e..000000000000 --- a/Documentation/devicetree/bindings/arm/marvell/armada-38x.txt +++ /dev/null @@ -1,27 +0,0 @@ -Marvell Armada 38x Platforms Device Tree Bindings -------------------------------------------------- - -Boards with a SoC of the Marvell Armada 38x family shall have the -following property: - -Required root node property: - - - compatible: must contain "marvell,armada380" - -In addition, boards using the Marvell Armada 385 SoC shall have the -following property before the previous one: - -Required root node property: - -compatible: must contain "marvell,armada385" - -In addition, boards using the Marvell Armada 388 SoC shall have the -following property before the previous one: - -Required root node property: - -compatible: must contain "marvell,armada388" - -Example: - -compatible = "marvell,a385-rd", "marvell,armada385", "marvell,armada380"; diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml new file mode 100644 index 000000000000..5af222e6db18 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/marvell/armada-38x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Armada 38x Platforms + +maintainers: + - Gregory CLEMENT <gregory.clement@bootlin.com> + +properties: + $nodename: + const: '/' + compatible: + oneOf: + + - description: Armada 380 SoC + items: + - const: marvell,armada380 + + - description: Armada 385 SoC + items: + - const: marvell,armada385 + - const: marvell,armada380 + + - description: Armada 388 SoC + items: + - const: marvell,armada388 + - const: marvell,armada385 + - const: marvell,armada380 + +additionalProperties: true
Convert the existing txt binding for armada-38x socs to DT schema format. Note that the current bindings only document the SoC (armada380, armada385, armada388). This is undesirable, instead there should be entries for actual boards. For now only convert to yaml, the content can be corrected separately. Signed-off-by: Josua Mayer <josua@solid-run.com> --- .../devicetree/bindings/arm/marvell/armada-38x.txt | 27 ------------------ .../bindings/arm/marvell/armada-38x.yaml | 33 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 27 deletions(-)