From patchwork Thu May 20 11:38:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 12269771 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7330AC433B4 for ; Thu, 20 May 2021 11:42:48 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E55960FEE for ; Thu, 20 May 2021 11:42:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E55960FEE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DXeS+rBYvkwx3DbJKvSyCHLGEGbBPCh6hlONChTl3Pc=; b=orbKQJUoHhblFGwYEALMFP7qtm OAJ8HHPW+7eH/CSywE3Rfo8pOQl+dXcY9aSN0nPjIuqLGPUHL77OzjHDjvvi16tUqCuABL+M1mQKm jK9QHnnLQdAqs0eLmUvs4kC5FQGeQSbm9RhnDAAN0Y0xYkIVmheiX8RMkHGXlpGpn57IVGmpNEg3r XBlcDEtVT9Oak6JstXkwseGXXyJH8tn1SfpG1EPo/TbFvIZHQdmIS+RMvtObR8Ryi29/T1CwfT9DQ 9owPEoIRyXdQ0Ke7lxGyUgXX4NDlzBqcGFqBnYXCtj8SBW4/th3cLA+WtifAeZ+dFmhgD1cT9tJmA rgWguP4A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljh39-000YFY-AM; Thu, 20 May 2021 11:41:11 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljh0y-000X96-7p for linux-arm-kernel@desiato.infradead.org; Thu, 20 May 2021 11:38:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=nNHSUhWrwGoCMiDMtsBfdGLzoWhPe4UkNl0rNExn0fQ=; b=PSMT+EWw4fV1aQOUSgTEBqI3Rn zYF2e/twKtzPB8ueQ+cRniFVtO/x/jL+i1f2MO9XxYIKHs0bEsd1w18nqlc9aqM2lgztdXQ/veVyb Ez8MbEcMY/tN3sXe8ARctfCKQZZgNR/+tcm6kFhwKtkr2i4WLkxCyx5u077g3kjHvGHsUnZ/HWpF9 qpH9Uso9aruf7/sx5wrDcLowLtPdCWnuz845QygaIloBqGJ2O+NT4ulACzL2WykpmGMyOVt/igI2L bFMMWsAn1Q5jJpJJJqoAphmgBD7xEf0McuR6kR4K8ZNMSrlfG0tKdltiCEI0yHjAhcQg5iG8nrgVK tM75hgVg==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljh0v-00GG6L-NL for linux-arm-kernel@lists.infradead.org; Thu, 20 May 2021 11:38:54 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4AFE86105A; Thu, 20 May 2021 11:38:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621510733; bh=HVYynEyNs7+lz4BTSOmzDBvk2qTTG1wa3FCY3BfOY5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XrYVXIUANk9TSn5qY4SywPbJ/oPgWQva4NNAqsRGWWgBHQQ6OPoI8mOThShFe7mJm VwaLMNk7eCLm0Xs44xQu20ag+8H6TtB+72lNKypiYWvEjAnWHy2SnwbdvjN+RbUFWY 2EIKtNVB36SvTq24+uEGnallCZk3CoHSTF9Zci2ryHmxQtCdm7UVF85HcFus7SmVp9 bdhAkJYOd3SbviLSc9jiDf2ZUYDX7RuORL0JOakmrZkWKfqUEkVy4uZ5+TQ5ntInzt v4yi7EItXQzKMSAFhavc0ah3sbAx269t8SrS7/f8a2u0QEbYstrlvC1B9/1B0BZIim D3rP2GP6exI+Q== Received: by pali.im (Postfix) id 74AF49D7; Thu, 20 May 2021 13:38:51 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Gregory CLEMENT , Andrew Lunn Cc: =?utf-8?q?Marek_Beh=C3=BAn?= , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 mvebu + mvebu/dt64 1/2] firmware: turris-mox-rwtm: add marvell, armada-3700-rwtm-firmware compatible string Date: Thu, 20 May 2021 13:38:43 +0200 Message-Id: <20210520113844.32319-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210520113844.32319-1-pali@kernel.org> References: <20210308153703.23097-1-kabel@kernel.org> <20210520113844.32319-1-pali@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210520_043853_800572_F4C07300 X-CRM114-Status: GOOD ( 10.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver") Reviewed-by: Andrew Lunn --- 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", }, { }, }; From patchwork Thu May 20 11:38:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 12269773 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D934C433ED for ; Thu, 20 May 2021 11:43:33 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F169260FEE for ; Thu, 20 May 2021 11:43:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F169260FEE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=u0fxlSodYAwhwqL7JuLGeVAyxLldPdF3RfFMwxvXkt4=; b=rXI+L3t6mXDyo50yfFMx8R7eGe DWOwwF0Q8oUInhaO9IkiIamGBxu1cem5TAZ8zLASgHPa/J0rwpX1i/ef3Xhzilc7F7svoq/JJ+qwJ GeIR8m4GH7NVLyC+vtEOcFqfx+oM8reQGzHsIk4jz+Q5KxC9nWyUXHkb9JBm21Gue7VjkT1LeUlCA U8qj6bAYa5SgAsZHLmjm9u3ZUSQG3o71GDz8yt6CO6N3+sQBkUOX+slzUS1MAe5U01q61jC5DNqTj X3x3gI0e/ZuOikK3nh08McvYS7FPnxLSLyssXkAto6/+7VtaqtRiDzkEf6LOfOVOtJ5EFqv7y+rLb udtT5nNw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljh3n-000Ydo-EJ; Thu, 20 May 2021 11:41:51 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljh0y-000X8u-1u for linux-arm-kernel@desiato.infradead.org; Thu, 20 May 2021 11:38:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=4rgIc++4TJTuM9wtVdQOpz0Upm10Q0DiwP+oe4vcLns=; b=rOt0Fvbl4eNFo+IdsZEZj4nJM9 VtMKCtRS61rFPoMq7c3YKqh/H1x8GMCWo3XUfrgVcU8C1lDy4j9ubzPoTK06yGrN908Fj6UQG5+UR +9WCc52glX4li2XQPnP+GRLEOJGoESTc8Ffb3tfP2a12ZNRJGvVO9sWc0ii/RcfCDEzXs+CH/Yfps afLdJ1F0cSpsIT3divm+RQ9apnkRAilGvCXOG45O4CyTZR87gMDmka3DKb9vTlispx2JEOz83KVvF PSH1VNOsnfvCY9tjarNJwAsKVwcRtK9K91WKa2a0sUhJiI2DRDE5p/c6ogmp93PNQl9nOTSWfCUZQ JCMbVFfw==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljh0v-00GG67-93 for linux-arm-kernel@lists.infradead.org; Thu, 20 May 2021 11:38:54 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id D73DF61057; Thu, 20 May 2021 11:38:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621510733; bh=vlHTNsPasjda2fZpQUYmE5kVMjIxEDkJ+IuDW3NomvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XXSunl/kzCfQEcgu366I8FZ9Hf6mzr94R6r1XFejwIi0A6XRKBxqdDQyLJJ03Zgrf iVSG6By3JNbrGnxZaXQbayHXUOGtmL1iiqVkIAgQuJjYh+7PPOte1VXwCRGEzSEZJi s4EC9ABNINMLRsNOZsx3aK1JwWMcncCMO3x8+l3gbhYFufwcITYC+fiEGKskSsOpH2 yZeX4a43dbqZLc0q7uHwtee+phzxCIbpPiqBdLZahC3KHDRSp5TCVLTGem/Jbpe2ts OFePPmZ1ViyZW253NeqpBwb0kZ1b1QP6VaQTteLKGxNFRqgJ3GjeE/tex0WyqzERSV G7gKBaYmCvhsA== Received: by pali.im (Postfix) id 9879F9D1; Thu, 20 May 2021 13:38:52 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Gregory CLEMENT , Andrew Lunn Cc: =?utf-8?q?Marek_Beh=C3=BAn?= , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 mvebu + mvebu/dt64 2/2] arm64: dts: marvell: armada-37xx: move firmware node to generic dtsi file Date: Thu, 20 May 2021 13:38:44 +0200 Message-Id: <20210520113844.32319-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210520113844.32319-1-pali@kernel.org> References: <20210308153703.23097-1-kabel@kernel.org> <20210520113844.32319-1-pali@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210520_043853_357178_40B097A8 X-CRM114-Status: GOOD ( 13.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Cc: # 5.4+: 46d2f6d0c99f ("arm64: dts: armada-3720-turris-mox: add firmware node") Reviewed-by: Andrew Lunn --- 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 0753cc489638..6700f2212b61 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 1b7f43e27589..847a2d12a4be 100644 --- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi @@ -505,4 +505,12 @@ }; }; }; + + firmware { + armada-3700-rwtm { + compatible = "marvell,armada-3700-rwtm-firmware"; + mboxes = <&rwtm 0>; + status = "okay"; + }; + }; };