From 35f70c9a44084985ce1baedc0033c694fb99d6ee Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Wed, 21 Jul 2021 09:48:36 -0400 Subject: [PATCH] Fixes for 5.4 Signed-off-by: Sasha Levin --- ...da-3720-turris-mox-add-firmware-node.patch | 43 ++++++++++ ...l-armada-37xx-move-firmware-node-to-.patch | 79 +++++++++++++++++++ ...mox-rwtm-add-marvell-armada-3700-rwt.patch | 42 ++++++++++ queue-5.4/series | 3 + 4 files changed, 167 insertions(+) create mode 100644 queue-5.4/arm64-dts-armada-3720-turris-mox-add-firmware-node.patch create mode 100644 queue-5.4/arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch create mode 100644 queue-5.4/firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch 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 index 00000000000..510d0405ada --- /dev/null +++ b/queue-5.4/arm64-dts-armada-3720-turris-mox-add-firmware-node.patch @@ -0,0 +1,43 @@ +From debb26b352ec7ccebadd83c8775f83776fca0fd6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ Upstream commit 46d2f6d0c99f7f95600e633c7dc727745faaf95e ] + +Add the node representing the firmware running on the secure processor. + +Signed-off-by: Marek Behún +Signed-off-by: Gregory CLEMENT +Signed-off-by: Sasha Levin +--- + 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 index 00000000000..631f9039704 --- /dev/null +++ b/queue-5.4/arm64-dts-marvell-armada-37xx-move-firmware-node-to-.patch @@ -0,0 +1,79 @@ +From d0d07acbff4a6988f8dcc081ca3862dc3cf69e74 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 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 index 00000000000..e1bee5f8964 --- /dev/null +++ b/queue-5.4/firmware-turris-mox-rwtm-add-marvell-armada-3700-rwt.patch @@ -0,0 +1,42 @@ +From fef8dab73b855281a793c100241b654ce395de49 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 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 + diff --git a/queue-5.4/series b/queue-5.4/series index e26fa90c54a..70384f0be1b 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -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 -- 2.47.3