2023-12-30 15:45:28

by Josua Mayer

[permalink] [raw]
Subject: [PATCH v4 00/11] dt-bindings: marvell: a38x: add solidrun armada 388 clearfog boards

Dear Maintainers,

The initially merged device-tree for Clearfog GTR devices contained
various subtle mistakes and omissions:

- missing board-specific compatible strings
- missing pinctrl entries
- missing second sfp connector
- invalid sfp loss-of-signal gpio
- mismatch of labels between dsa ports and enclosure

Most notably this had caused functional issues with the sfp connectors.

This patch-set first deletes the invalid armada-38x dt-bindings.
New bindings are added specifically for the Clearfog GTR boards,
and for the already in-tree clearfog base, clearfog pro and helios-4
boards' compatible strings.

Secondly pinctrl nodes are added for all referenced gpios for independence
from bootloader defaults. U-Boot is shared between armada-388 clearfog,
and armada-385 clearfog gtr.

Further remove an invalid io from the first sfp connector description,
and add descriptions for the secondary sfp connector which is driven
by dsa switch port number 9.

Finally labels of dsa switch ports were updated to match the enclosure.
That patch is not suitable for stable.

Signed-off-by: Josua Mayer <[email protected]>
---
Changes in v4:
- dropped invalid soc-only armada-38x (txt) bindings
(reported by Krzysztof Kozlowski <[email protected]>)
- add bindings for armada 388 helios-4
- updated yaml whitespace indentation count
(reported by Rob Hering's bot)
- Link to v3: https://lore.kernel.org/r/20231226-support-clearfog-gtr-l8-sfp-v3-0-fd1ac2d6bf2e@solid-run.com

Changes in v3:
- armada-38x.yaml: removed '|', no need to prerserve formatting
(reported by Conor Dooley [email protected])
- update commit descriptions to clarify confusing board names and
compatible strings
(reported by Krzysztof Kozlowski <[email protected]>)
- send to all relevant lists
(reported by Krzysztof Kozlowski <[email protected]>)
- remove duplicate binding for clearfog / clearfog
- Link to v2 (patches 0-2):
https://lore.kernel.org/r/[email protected]
- Link to v2 (patches 3-8):
https://lore.kernel.org/r/[email protected]

Changes in v2:
- removed changes changes to gpio numbers because they were wrong
- added bindings documentation
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Josua Mayer (11):
dt-bindings: marvell: a38x: remove invalid txt bindings for armada 38x SoCs
dt-bindings: marvell: a38x: convert the soc compatibles description to yaml
dt-bindings: marvell: a38x: add solidrun armada 388 clearfog boards
dt-bindings: marvell: a38x: add kobol helios-4 board
dt-bindings: marvell: a38x: add solidrun armada 385 clearfog gtr boards
arm: dts: marvell: clearfog: add pro variant compatible in legacy dts
arm: dts: marvell: clearfog-gtr: add board-specific compatible strings
arm: dts: marvell: clearfog-gtr: sort pinctrl nodes alphabetically
arm: dts: marvell: clearfog-gtr: add missing pinctrl for all used gpios
arm: dts: marvell: clearfog-gtr-l8: add support for second sfp connector
arm: dts: marvell: clearfog-gtr-l8: align port numbers with enclosure

.../devicetree/bindings/arm/marvell/armada-38x.txt | 27 -------
.../bindings/arm/marvell/armada-38x.yaml | 49 +++++++++++++
.../dts/marvell/armada-385-clearfog-gtr-l8.dts | 38 +++++++---
.../dts/marvell/armada-385-clearfog-gtr-s4.dts | 2 +
.../boot/dts/marvell/armada-385-clearfog-gtr.dtsi | 84 ++++++++++++++++------
arch/arm/boot/dts/marvell/armada-388-clearfog.dts | 5 +-
6 files changed, 146 insertions(+), 59 deletions(-)
---
base-commit: 861deac3b092f37b2c5e6871732f3e11486f7082
change-id: 20231226-support-clearfog-gtr-l8-sfp-d87ae715a787

Sincerely,
--
Josua Mayer <[email protected]>



2023-12-30 15:45:52

by Josua Mayer

[permalink] [raw]
Subject: [PATCH v4 03/11] dt-bindings: marvell: a38x: add solidrun armada 388 clearfog boards

Add DT compatible for SolidRun Armada-388 based Clearfog Base and Pro
boards, which are already in place in-tree.

There are already 3 distinct dts in tree for these *two* boards,
declaring particular compatible strings:
- armada-388-clearfog.dts:
compatible = "solidrun,clearfog-a1", "marvell,armada388",
"marvell,armada385, "marvell,armada380";
- armada-388-clearfog-base.dts:
compatible = "solidrun,clearfog-base-a1", "solidrun,clearfog-a1",
"marvell,armada388", "marvell,armada385,
"marvell,armada380";
- armada-388-clearfog-pro.dts:
compatible = "solidrun,clearfog-base-a1", "solidrun,clearfog-a1",
"marvell,armada388", "marvell,armada385,
"marvell,armada380";

This has historic reasons, the first entry is a legacy name for the
"pro" version, old versions of u-boot built when only one variant
existed explicitly boot by this name.

Note that both compatibles and model field include the string "A1".
At least up to revision 2.0 of the board, this had been printed
on the pcb. However in marketing material and conversations it is
usually omitted. "Clearfog Pro" and "Clearfog Pro A1" always mean
exactly the same product.

Technically Base and Pro variants are similar enough that they can
successfully boot with each other's dts. Hence it makes (some)
sense for them to share the "clearfog-a1" compatible.

Add bindings for the explicit variants including base / pro suffix.
The legacy "armada-388-clearfog.dts" is not supported by these
bindings" as it does not make sense having two bindings for one board.

Signed-off-by: Josua Mayer <[email protected]>
---
.../devicetree/bindings/arm/marvell/armada-38x.yaml | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
index 5af222e6db18..4950b840bf1c 100644
--- a/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
+++ b/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
@@ -15,17 +15,14 @@ properties:
compatible:
oneOf:

- - description: Armada 380 SoC
- items:
- - const: marvell,armada380
-
- - description: Armada 385 SoC
- items:
- - const: marvell,armada385
- - const: marvell,armada380
+ - description:
+ SolidRun Armada 388 clearfog family single-board computers.

- - description: Armada 388 SoC
items:
+ - enum:
+ - solidrun,clearfog-base-a1
+ - solidrun,clearfog-pro-a1
+ - const: solidrun,clearfog-a1
- const: marvell,armada388
- const: marvell,armada385
- const: marvell,armada380

--
2.35.3


2023-12-30 15:46:10

by Josua Mayer

[permalink] [raw]
Subject: [PATCH v4 04/11] dt-bindings: marvell: a38x: add kobol helios-4 board

Add DT compatible for the helios-4 nas by Kobol, which is already used
in-tree.

This product shares a common system on module with the solidrun armada
388 clearfog boards, however it is not easily described in a single
list due to their extra "solidrun,clearfog-a1" compatible string.

Signed-off-by: Josua Mayer <[email protected]>
---
Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
index 4950b840bf1c..3babda0d575f 100644
--- a/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
+++ b/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
@@ -15,6 +15,15 @@ properties:
compatible:
oneOf:

+ - description:
+ Kobol Armada 388 based helios nas.
+
+ items:
+ - const: kobol,helios4
+ - const: marvell,armada388
+ - const: marvell,armada385
+ - const: marvell,armada380
+
- description:
SolidRun Armada 388 clearfog family single-board computers.


--
2.35.3


2023-12-30 15:47:34

by Josua Mayer

[permalink] [raw]
Subject: [PATCH v4 07/11] arm: dts: marvell: clearfog-gtr: add board-specific compatible strings

Most arm board have a board-specific compatible string that allows e.g.
userspace to match specific firmware variants or apply specific
policies.

Add board-specific properties to both variants of the Clearfog GTR:
- solidrun,clearfog-gtr-l8
- solidrun,clearfog-gtr-s4

Introduction of a common parent (e.g. "solidrun,clearfog-gtr") is
omitted for brevity.
Since announcement of the two products no additional variants were added
it is assumed that there will always be just two.

Signed-off-by: Josua Mayer <[email protected]>
---
arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-l8.dts | 2 ++
arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-s4.dts | 2 ++
2 files changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-l8.dts b/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-l8.dts
index 1990f7d0cc79..cd5b070f1218 100644
--- a/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-l8.dts
+++ b/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-l8.dts
@@ -4,6 +4,8 @@

/ {
model = "SolidRun Clearfog GTR L8";
+ compatible = "solidrun,clearfog-gtr-l8", "marvell,armada385",
+ "marvell,armada380";
};

&mdio {
diff --git a/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-s4.dts b/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-s4.dts
index b795ad573891..4a9736ec99b6 100644
--- a/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-s4.dts
+++ b/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-s4.dts
@@ -4,6 +4,8 @@

/ {
model = "SolidRun Clearfog GTR S4";
+ compatible = "solidrun,clearfog-gtr-s4", "marvell,armada385",
+ "marvell,armada380";
};

&sfp0 {

--
2.35.3


2023-12-30 15:47:47

by Josua Mayer

[permalink] [raw]
Subject: [PATCH v4 08/11] arm: dts: marvell: clearfog-gtr: sort pinctrl nodes alphabetically

Cosmetic change to increase future patches readability when adding new
pinctrl nodes.

Signed-off-by: Josua Mayer <[email protected]>
---
.../boot/dts/marvell/armada-385-clearfog-gtr.dtsi | 40 +++++++++++-----------
1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr.dtsi b/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr.dtsi
index d1452a04e904..8eabb60765b0 100644
--- a/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr.dtsi
+++ b/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr.dtsi
@@ -141,18 +141,13 @@ i2c@11100 { /* SFP (CON5/CON6) */
};

pinctrl@18000 {
- cf_gtr_switch_reset_pins: cf-gtr-switch-reset-pins {
- marvell,pins = "mpp18";
- marvell,function = "gpio";
- };
-
- cf_gtr_usb3_con_vbus: cf-gtr-usb3-con-vbus {
- marvell,pins = "mpp22";
+ cf_gtr_fan_pwm: cf-gtr-fan-pwm {
+ marvell,pins = "mpp23";
marvell,function = "gpio";
};

- cf_gtr_fan_pwm: cf-gtr-fan-pwm {
- marvell,pins = "mpp23";
+ cf_gtr_front_button_pins: cf-gtr-front-button-pins {
+ marvell,pins = "mpp53";
marvell,function = "gpio";
};

@@ -162,13 +157,6 @@ cf_gtr_i2c1_pins: i2c1-pins {
marvell,function = "i2c1";
};

- cf_gtr_sdhci_pins: cf-gtr-sdhci-pins {
- marvell,pins = "mpp21", "mpp28",
- "mpp37", "mpp38",
- "mpp39", "mpp40";
- marvell,function = "sd0";
- };
-
cf_gtr_isolation_pins: cf-gtr-isolation-pins {
marvell,pins = "mpp47";
marvell,function = "gpio";
@@ -179,18 +167,30 @@ cf_gtr_poe_reset_pins: cf-gtr-poe-reset-pins {
marvell,function = "gpio";
};

+ cf_gtr_rear_button_pins: cf-gtr-rear-button-pins {
+ marvell,pins = "mpp36";
+ marvell,function = "gpio";
+ };
+
+ cf_gtr_sdhci_pins: cf-gtr-sdhci-pins {
+ marvell,pins = "mpp21", "mpp28",
+ "mpp37", "mpp38",
+ "mpp39", "mpp40";
+ marvell,function = "sd0";
+ };
+
cf_gtr_spi1_cs_pins: spi1-cs-pins {
marvell,pins = "mpp59";
marvell,function = "spi1";
};

- cf_gtr_front_button_pins: cf-gtr-front-button-pins {
- marvell,pins = "mpp53";
+ cf_gtr_switch_reset_pins: cf-gtr-switch-reset-pins {
+ marvell,pins = "mpp18";
marvell,function = "gpio";
};

- cf_gtr_rear_button_pins: cf-gtr-rear-button-pins {
- marvell,pins = "mpp36";
+ cf_gtr_usb3_con_vbus: cf-gtr-usb3-con-vbus {
+ marvell,pins = "mpp22";
marvell,function = "gpio";
};
};

--
2.35.3


2024-01-04 08:42:09

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 03/11] dt-bindings: marvell: a38x: add solidrun armada 388 clearfog boards

On 30/12/2023 16:44, Josua Mayer wrote:
> Add DT compatible for SolidRun Armada-388 based Clearfog Base and Pro
> boards, which are already in place in-tree.
>
> There are already 3 distinct dts in tree for these *two* boards,
> declaring particular compatible strings:
> - armada-388-clearfog.dts:
> compatible = "solidrun,clearfog-a1", "marvell,armada388",
> "marvell,armada385, "marvell,armada380";
> - armada-388-clearfog-base.dts:
> compatible = "solidrun,clearfog-base-a1", "solidrun,clearfog-a1",
> "marvell,armada388", "marvell,armada385,
> "marvell,armada380";
> - armada-388-clearfog-pro.dts:
> compatible = "solidrun,clearfog-base-a1", "solidrun,clearfog-a1",
> "marvell,armada388", "marvell,armada385,
> "marvell,armada380";

Drop code from commit msg. Commit msg should explain why and what, not
copy the code.

>
> This has historic reasons, the first entry is a legacy name for the
> "pro" version, old versions of u-boot built when only one variant
> existed explicitly boot by this name.
>
> Note that both compatibles and model field include the string "A1".
> At least up to revision 2.0 of the board, this had been printed
> on the pcb. However in marketing material and conversations it is
> usually omitted. "Clearfog Pro" and "Clearfog Pro A1" always mean
> exactly the same product.
>
> Technically Base and Pro variants are similar enough that they can
> successfully boot with each other's dts. Hence it makes (some)
> sense for them to share the "clearfog-a1" compatible.
>
> Add bindings for the explicit variants including base / pro suffix.
> The legacy "armada-388-clearfog.dts" is not supported by these
> bindings" as it does not make sense having two bindings for one board.
>
> Signed-off-by: Josua Mayer <[email protected]>
> ---
> .../devicetree/bindings/arm/marvell/armada-38x.yaml | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
> index 5af222e6db18..4950b840bf1c 100644
> --- a/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
> +++ b/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
> @@ -15,17 +15,14 @@ properties:
> compatible:
> oneOf:
>
> - - description: Armada 380 SoC
> - items:
> - - const: marvell,armada380
> -
> - - description: Armada 385 SoC


You just added these lines. It does not make sense to add them and
immediately remove. It's a noop.
>

Best regards,
Krzysztof


2024-01-04 08:44:47

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 04/11] dt-bindings: marvell: a38x: add kobol helios-4 board

On 30/12/2023 16:44, Josua Mayer wrote:
> Add DT compatible for the helios-4 nas by Kobol, which is already used
> in-tree.
>
> This product shares a common system on module with the solidrun armada
> 388 clearfog boards, however it is not easily described in a single
> list due to their extra "solidrun,clearfog-a1" compatible string.
>
> Signed-off-by: Josua Mayer <[email protected]>
> ---
> Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
> index 4950b840bf1c..3babda0d575f 100644
> --- a/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
> +++ b/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
> @@ -15,6 +15,15 @@ properties:
> compatible:
> oneOf:
>
> + - description:
> + Kobol Armada 388 based helios nas.
> +

Drop blank line

> + items:
> + - const: kobol,helios4
> + - const: marvell,armada388
> + - const: marvell,armada385
> + - const: marvell,armada380
> +
> - description:
> SolidRun Armada 388 clearfog family single-board computers.
>
>

Best regards,
Krzysztof


2024-01-04 12:28:28

by Josua Mayer

[permalink] [raw]
Subject: Re: [PATCH v4 04/11] dt-bindings: marvell: a38x: add kobol helios-4 board

Am 04.01.24 um 09:43 schrieb Krzysztof Kozlowski:
> On 30/12/2023 16:44, Josua Mayer wrote:
>> Add DT compatible for the helios-4 nas by Kobol, which is already used
>> in-tree.
>>
>> This product shares a common system on module with the solidrun armada
>> 388 clearfog boards, however it is not easily described in a single
>> list due to their extra "solidrun,clearfog-a1" compatible string.
>>
>> Signed-off-by: Josua Mayer <[email protected]>
>> ---
>> Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
>> index 4950b840bf1c..3babda0d575f 100644
>> --- a/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
>> +++ b/Documentation/devicetree/bindings/arm/marvell/armada-38x.yaml
>> @@ -15,6 +15,15 @@ properties:
>> compatible:
>> oneOf:
>>
>> + - description:
>> + Kobol Armada 388 based helios nas.
>> +
> Drop blank line
Ack.
>
>> + items:
>> + - const: kobol,helios4
>> + - const: marvell,armada388
>> + - const: marvell,armada385
>> + - const: marvell,armada380
>> +
>> - description:
>> SolidRun Armada 388 clearfog family single-board computers.
>>
>>
> Best regards,
> Krzysztof
>