From: Sasha Levin Date: Wed, 21 Jul 2021 13:48:35 +0000 (-0400) Subject: Fixes for 5.13 X-Git-Tag: v5.4.135~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2139a5f0e6aad58a54657e6ecb5f3b7d13d07bd6;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.13 Signed-off-by: Sasha Levin --- 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 index 00000000000..973b7ca1884 --- /dev/null +++ b/queue-5.13/arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch @@ -0,0 +1,79 @@ +From 1cdfe25582052f80237822599c17bbe9eeff986a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ 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 +Signed-off-by: Marek Behún +Reviewed-by: Andrew Lunn +Signed-off-by: Gregory CLEMENT +Signed-off-by: Sasha Levin +--- + 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 index 00000000000..f1638b73b51 --- /dev/null +++ b/queue-5.13/firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch @@ -0,0 +1,42 @@ +From 8d0913928ae840d7f3339bddabb4a4b9e4f53cb1 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ 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 +Reviewed-by: Andrew Lunn +Signed-off-by: Gregory CLEMENT +Signed-off-by: Sasha Levin +--- + 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 + diff --git a/queue-5.13/series b/queue-5.13/series index 6fccdbb961c..2e38718c90d 100644 --- a/queue-5.13/series +++ b/queue-5.13/series @@ -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