diff mbox series

[v4,mvebu,+,mvebu/dt64,2/2] arm64: dts: marvell: armada-37xx: move firmware node to generic dtsi file

Message ID 20210520113844.32319-3-pali@kernel.org (mailing list archive)
State New, archived
Headers show
Series firmware: turris-mox-rwtm: new compatible string | expand

Commit Message

Pali Rohár May 20, 2021, 11:38 a.m. UTC
Move the turris-mox-rwtm firmware node from Turris MOX' device tree into
the generic armada-37xx.dtsi file and use the generic compatible string
'marvell,armada-3700-rwtm-firmware' instead of the current one.

Turris MOX DTS file contains also old compatible string for backward
compatibility.

The Turris MOX rWTM firmware can be used on any Armada 37xx device,
giving them access to the rWTM hardware random number generator, which
is otherwise unavailable.

This change allows Linux to load the turris-mox-rwtm.ko module on these
boards.

Tested on ESPRESSObin v5 with both default Marvell WTMI firmware and
CZ.NIC's firmware. With default WTMI firmware the turris-mox-rwtm fails
to probe, while with CZ.NIC's firmware it registers the HW random number
generator.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Cc: <stable@vger.kernel.org> # 5.4+: 46d2f6d0c99f ("arm64: dts: armada-3720-turris-mox: add firmware node")
---
 arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 6 ++----
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi           | 8 ++++++++
 2 files changed, 10 insertions(+), 4 deletions(-)

Comments

Andrew Lunn May 21, 2021, 1:42 a.m. UTC | #1
On Thu, May 20, 2021 at 01:38:44PM +0200, Pali Rohár wrote:
> Move the turris-mox-rwtm firmware node from Turris MOX' device tree into
> the generic armada-37xx.dtsi file and use the generic compatible string
> 'marvell,armada-3700-rwtm-firmware' instead of the current one.
> 
> Turris MOX DTS file contains also old compatible string for backward
> compatibility.
> 
> The Turris MOX rWTM firmware can be used on any Armada 37xx device,
> giving them access to the rWTM hardware random number generator, which
> is otherwise unavailable.
> 
> This change allows Linux to load the turris-mox-rwtm.ko module on these
> boards.
> 
> Tested on ESPRESSObin v5 with both default Marvell WTMI firmware and
> CZ.NIC's firmware. With default WTMI firmware the turris-mox-rwtm fails
> to probe, while with CZ.NIC's firmware it registers the HW random number
> generator.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Signed-off-by: Marek Behún <kabel@kernel.org>
> Cc: <stable@vger.kernel.org> # 5.4+: 46d2f6d0c99f ("arm64: dts: armada-3720-turris-mox: add firmware node")

Please drop stable. It is a new feature, not a fix.

Otherwise

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Gregory CLEMENT June 17, 2021, 1:08 p.m. UTC | #2
Hello,

> Move the turris-mox-rwtm firmware node from Turris MOX' device tree into
> the generic armada-37xx.dtsi file and use the generic compatible string
> 'marvell,armada-3700-rwtm-firmware' instead of the current one.
>
> Turris MOX DTS file contains also old compatible string for backward
> compatibility.
>
> The Turris MOX rWTM firmware can be used on any Armada 37xx device,
> giving them access to the rWTM hardware random number generator, which
> is otherwise unavailable.
>
> This change allows Linux to load the turris-mox-rwtm.ko module on these
> boards.
>
> Tested on ESPRESSObin v5 with both default Marvell WTMI firmware and
> CZ.NIC's firmware. With default WTMI firmware the turris-mox-rwtm fails
> to probe, while with CZ.NIC's firmware it registers the HW random number
> generator.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Signed-off-by: Marek Behún <kabel@kernel.org>
> Cc: <stable@vger.kernel.org> # 5.4+: 46d2f6d0c99f ("arm64: dts: armada-3720-turris-mox: add firmware node")

Applied on mvebu/dt64 (I removed the Fixes line)

Thanks,

Gregory
> ---
>  arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 6 ++----
>  arch/arm64/boot/dts/marvell/armada-37xx.dtsi           | 8 ++++++++
>  2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> index 0753cc489638..6700f2212b61 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> @@ -109,10 +109,8 @@
>  	};
>  
>  	firmware {
> -		turris-mox-rwtm {
> -			compatible = "cznic,turris-mox-rwtm";
> -			mboxes = <&rwtm 0>;
> -			status = "okay";
> +		armada-3700-rwtm {
> +			compatible = "marvell,armada-3700-rwtm-firmware", "cznic,turris-mox-rwtm";
>  		};
>  	};
>  };
> diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
> index 1b7f43e27589..847a2d12a4be 100644
> --- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
> @@ -505,4 +505,12 @@
>  			};
>  		};
>  	};
> +
> +	firmware {
> +		armada-3700-rwtm {
> +			compatible = "marvell,armada-3700-rwtm-firmware";
> +			mboxes = <&rwtm 0>;
> +			status = "okay";
> +		};
> +	};
>  };
> -- 
> 2.20.1
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
index 0753cc489638..6700f2212b61 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
@@ -109,10 +109,8 @@ 
 	};
 
 	firmware {
-		turris-mox-rwtm {
-			compatible = "cznic,turris-mox-rwtm";
-			mboxes = <&rwtm 0>;
-			status = "okay";
+		armada-3700-rwtm {
+			compatible = "marvell,armada-3700-rwtm-firmware", "cznic,turris-mox-rwtm";
 		};
 	};
 };
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index 1b7f43e27589..847a2d12a4be 100644
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -505,4 +505,12 @@ 
 			};
 		};
 	};
+
+	firmware {
+		armada-3700-rwtm {
+			compatible = "marvell,armada-3700-rwtm-firmware";
+			mboxes = <&rwtm 0>;
+			status = "okay";
+		};
+	};
 };