]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.13
authorSasha Levin <sashal@kernel.org>
Wed, 21 Jul 2021 13:48:35 +0000 (09:48 -0400)
committerSasha Levin <sashal@kernel.org>
Wed, 21 Jul 2021 13:48:35 +0000 (09:48 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.13/arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch [new file with mode: 0644]
queue-5.13/firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch [new file with mode: 0644]
queue-5.13/series

diff --git a/queue-5.13/arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch b/queue-5.13/arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch
new file mode 100644 (file)
index 0000000..973b7ca
--- /dev/null
@@ -0,0 +1,79 @@
+From 1cdfe25582052f80237822599c17bbe9eeff986a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 20 May 2021 13:38:44 +0200
+Subject: arm64: dts: marvell: armada-37xx: move firmware node to generic dtsi
+ file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Pali Rohár <pali@kernel.org>
+
+[ Upstream commit 3a52a48973b355b3aac5add92ef50650ae37c2bd ]
+
+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>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 53e817c5f6f3..ce2bcddf396f 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 6ffbb099fcac..5db81a416cd6 100644
+--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
++++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+@@ -504,4 +504,12 @@
+                       };
+               };
+       };
++
++      firmware {
++              armada-3700-rwtm {
++                      compatible = "marvell,armada-3700-rwtm-firmware";
++                      mboxes = <&rwtm 0>;
++                      status = "okay";
++              };
++      };
+ };
+-- 
+2.30.2
+
diff --git a/queue-5.13/firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch b/queue-5.13/firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch
new file mode 100644 (file)
index 0000000..f1638b7
--- /dev/null
@@ -0,0 +1,42 @@
+From 8d0913928ae840d7f3339bddabb4a4b9e4f53cb1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 20 May 2021 13:38:43 +0200
+Subject: firmware: turris-mox-rwtm: add marvell,armada-3700-rwtm-firmware
+ compatible string
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Pali Rohár <pali@kernel.org>
+
+[ Upstream commit 90ae47215de3fec862aeb1a0f0e28bb505ab1351 ]
+
+Add more generic compatible string 'marvell,armada-3700-rwtm-firmware' for
+this driver, since it can also be used on other Armada 3720 devices.
+
+Current compatible string 'cznic,turris-mox-rwtm' is kept for backward
+compatibility.
+
+Signed-off-by: Pali Rohár <pali@kernel.org>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/firmware/turris-mox-rwtm.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/firmware/turris-mox-rwtm.c b/drivers/firmware/turris-mox-rwtm.c
+index 1cf4f1087492..c2d34dc8ba46 100644
+--- a/drivers/firmware/turris-mox-rwtm.c
++++ b/drivers/firmware/turris-mox-rwtm.c
+@@ -569,6 +569,7 @@ static int turris_mox_rwtm_remove(struct platform_device *pdev)
+ static const struct of_device_id turris_mox_rwtm_match[] = {
+       { .compatible = "cznic,turris-mox-rwtm", },
++      { .compatible = "marvell,armada-3700-rwtm-firmware", },
+       { },
+ };
+-- 
+2.30.2
+
index 6fccdbb961c14fe5ba1f7cd7df5f197bcb475c1e..2e38718c90d5465b768acb33e50ea4ab1aa1e8e2 100644 (file)
@@ -98,3 +98,5 @@ thermal-core-thermal_of-stop-zone-device-before-unre.patch
 s390-traps-do-not-test-monitor-call-without-config_b.patch
 s390-introduce-proper-type-handling-call_on_stack-ma.patch
 cifs-prevent-null-deref-in-cifs_compose_mount_option.patch
+firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch
+arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch