]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.10
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.10/arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch [new file with mode: 0644]
queue-5.10/firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch b/queue-5.10/arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch
new file mode 100644 (file)
index 0000000..1c44e2f
--- /dev/null
@@ -0,0 +1,79 @@
+From 0ba992f82e7b85933f130a48056d7023d279e9d8 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 cca143e4b6bf..389aebdb35f1 100644
+--- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
++++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
+@@ -108,10 +108,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 879115dfdf82..83d2d83f7692 100644
+--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
++++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+@@ -502,4 +502,12 @@
+                       };
+               };
+       };
++
++      firmware {
++              armada-3700-rwtm {
++                      compatible = "marvell,armada-3700-rwtm-firmware";
++                      mboxes = <&rwtm 0>;
++                      status = "okay";
++              };
++      };
+ };
+-- 
+2.30.2
+
diff --git a/queue-5.10/firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch b/queue-5.10/firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch
new file mode 100644 (file)
index 0000000..e2e0b29
--- /dev/null
@@ -0,0 +1,42 @@
+From 0e595398f1aa41a1414e75d4e1576937cf5a1cd0 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 03f1eac9ad69..0bef988580ad 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 76e897f6e0709407556953966b7976603e45297f..6b76d56157380723ccbf56ac749a3c172c36585f 100644 (file)
@@ -78,3 +78,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