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

diff --git a/queue-5.4/arm64-dts-armada-3720-turris-mox-add-firmware-node.patch b/queue-5.4/arm64-dts-armada-3720-turris-mox-add-firmware-node.patch
new file mode 100644 (file)
index 0000000..510d040
--- /dev/null
@@ -0,0 +1,43 @@
+From debb26b352ec7ccebadd83c8775f83776fca0fd6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 4 Sep 2019 19:07:39 +0200
+Subject: arm64: dts: armada-3720-turris-mox: add firmware node
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Marek Behún <marek.behun@nic.cz>
+
+[ Upstream commit 46d2f6d0c99f7f95600e633c7dc727745faaf95e ]
+
+Add the node representing the firmware running on the secure processor.
+
+Signed-off-by: Marek Behún <marek.behun@nic.cz>
+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 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+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 fad70c2df7bc..861469a439a5 100644
+--- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
++++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
+@@ -106,6 +106,14 @@
+               /* enabled by U-Boot if SFP module is present */
+               status = "disabled";
+       };
++
++      firmware {
++              turris-mox-rwtm {
++                      compatible = "cznic,turris-mox-rwtm";
++                      mboxes = <&rwtm 0>;
++                      status = "okay";
++              };
++      };
+ };
+ &i2c0 {
+-- 
+2.30.2
+
diff --git a/queue-5.4/arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch b/queue-5.4/arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch
new file mode 100644 (file)
index 0000000..631f903
--- /dev/null
@@ -0,0 +1,79 @@
+From d0d07acbff4a6988f8dcc081ca3862dc3cf69e74 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 861469a439a5..874bc3954c8e 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 6cb1278613c5..52767037e049 100644
+--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
++++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+@@ -500,4 +500,12 @@
+                       };
+               };
+       };
++
++      firmware {
++              armada-3700-rwtm {
++                      compatible = "marvell,armada-3700-rwtm-firmware";
++                      mboxes = <&rwtm 0>;
++                      status = "okay";
++              };
++      };
+ };
+-- 
+2.30.2
+
diff --git a/queue-5.4/firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch b/queue-5.4/firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch
new file mode 100644 (file)
index 0000000..e1bee5f
--- /dev/null
@@ -0,0 +1,42 @@
+From fef8dab73b855281a793c100241b654ce395de49 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 9a6cf5af27a3..0779513ac8d4 100644
+--- a/drivers/firmware/turris-mox-rwtm.c
++++ b/drivers/firmware/turris-mox-rwtm.c
+@@ -401,6 +401,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 e26fa90c54ae443bf51483b9b4dfbd113e8a4327..70384f0be1b2488b4cdd592db51d8fe234602918 100644 (file)
@@ -42,3 +42,6 @@ scsi-qedf-add-check-to-synchronize-abort-and-flush.patch
 sched-fair-fix-cfs-bandwidth-hrtimer-expiry-type.patch
 s390-introduce-proper-type-handling-call_on_stack-ma.patch
 cifs-prevent-null-deref-in-cifs_compose_mount_option.patch
+arm64-dts-armada-3720-turris-mox-add-firmware-node.patch
+firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch
+arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch