From patchwork Sun Sep 27 06:41:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11801815 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C34D139A for ; Sun, 27 Sep 2020 06:17:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 5C1E9221E5 for ; Sun, 27 Sep 2020 06:17:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VF78pB59"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="iyod7ab3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C1E9221E5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/EWE7oHSRgRMxoA4NkqqUz4SLKGeJB0zs0/bHzF92fw=; b=VF78pB59x7hr4sA1VzhOCLJjQ 2XdZiGEXMhgT7J1ZLnswzJyAX86GhBBL//pL9pVPXAPJlRySCJ8pacya8NNdk5bqHNh3VFx8I++ov NgaEPNQvoKlAJc0DLCQR/efEwH9pJFk8sWPrZUwIWQwhkyZD4ugArD9RgM0IBq1OyiaWpJC6kk1J3 /kYbElzbRPdFk0aZZ9QfwC4H2Q99ruTsH2N6u7LVnaKNg6UQF0V5FkqoXC0CmgrLSZ9wxoPqeZX2M 06yMRTedIOiZRrlR0hniucdCpEeUoLq1NID97rYmvxf7evgsVeIGmspMjhgzSCwrGj4toKHAct7Ce BsYVOUoLA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kMPyj-0001uV-Tv; Sun, 27 Sep 2020 06:16:09 +0000 Received: from mail-eopbgr30054.outbound.protection.outlook.com ([40.107.3.54] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kMPyS-0001pn-Mx for linux-arm-kernel@lists.infradead.org; Sun, 27 Sep 2020 06:15:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nvCSNgS+4TdMu3nMwBpmg0TRLre6gK6RKOn0uvBY2PSy5naZfeH/Ldzj0rSIxUwnZ+5lITWxu7H4DdxzNfdiDb2uMmsmCcZwR9co45r5NzW/0Cv3PRSdErSvrg/EauxxR1FloUiA2A0izL9ZiWsy5aqLtavBb/yM8tRyGw4cY0NruViQyD1GTq+V4cF7kbYDKoWJG0i5YNLbC363Zq/2rb0n8BmNhg4GkjDGnE3Jfd8LnLWTs8OLkMjpYWFtNaCbwsNmK4cXuGvRwH3EcwXK1TlUYgoHxMPjOEUANGg59tdqGybaVtXSPLeJytZBnXBE8oxuoAF+TpH2UtwECzMp5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iLHy9TdHMuar6HQLEmP4ngP5zCUv1sC2Ykb5EK17H7c=; b=LkgPZcnR7WJhq51IgAwmpGS9T6Q4/Q4/1yp0AxuMAFAjuvrR25ShtjGa1jbKgp8O9WJJ5Rft1+nPXI33naieIf+6s2yasTVdtA+HC5xbtYkq7zBO3i4OQ5O47/DLTzH5BRk7xEU3/0ivv1qsoU7CdfCXYJLTdWRUn8sPlRIvm8TAC4Wm0/7H0TrxTN6bNjCPZ1phqi2o+MsLuVoy/osIlW2kYQEGpI0chKhNTKjBD1yahTn6ML/HcZdFDcIlSEJ2lnMLhSW7wHp6gMCui1gFjQZnzb8A6TpZ11VY4s0payOdUOu+ApCxZbpFH8IXZibtdAuWl2m7fUyo59ypDk3uQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iLHy9TdHMuar6HQLEmP4ngP5zCUv1sC2Ykb5EK17H7c=; b=iyod7ab3pRtQtF+K8smWxvY1Or2GSD0g2CGb3qhPwt0DF4NDZse82HPO1Dzr+AsSAJf7S3oCPeC6RBo+s6qJSDARlV7id1RXaQhow5jE7J6O6iJ5GdzuOGQgigSkMk1K0DU0QPxGujP+uU+xk1SSgbVwaxHGeNJlLILYv03VZWk= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4633.eurprd04.prod.outlook.com (2603:10a6:5:36::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20; Sun, 27 Sep 2020 06:15:50 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::35c5:8c71:91f3:6bc6]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::35c5:8c71:91f3:6bc6%12]) with mapi id 15.20.3412.028; Sun, 27 Sep 2020 06:15:50 +0000 From: Peng Fan To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V2 6/7] remoteproc: imx_rproc: support i.MX8MQ/M Date: Sun, 27 Sep 2020 14:41:30 +0800 Message-Id: <20200927064131.24101-7-peng.fan@nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200927064131.24101-1-peng.fan@nxp.com> References: <20200927064131.24101-1-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR04CA0178.apcprd04.prod.outlook.com (2603:1096:4:14::16) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR04CA0178.apcprd04.prod.outlook.com (2603:1096:4:14::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20 via Frontend Transport; Sun, 27 Sep 2020 06:15:46 +0000 X-Mailer: git-send-email 2.28.0 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6a179988-a961-4541-67b0-08d862acc80d X-MS-TrafficTypeDiagnostic: DB7PR04MB4633: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:61; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ysNuyvYLI/m8GJHKBxL53FehO9g/BWkOhuPxMJ0EYvUV2YPn3AYV63SxnP+haES+a+4qu/gAekf9qIPE8uSX/vlMouuDJd8xaoKsoMaKpVcbGbDzstbkvAsyj39SFmI+p98b7/5TmErNpQoatmmzuex34wHQTmNvYBqdM6ITEFbuYv5R5HeIHxaovbuQtIj5kItIHgKivTsAZdoNZyIDD23z2U38pStKS3vFqcumVryFQqKrWWiPCyjhQHDF+ICwZU/Ot3omOpQ++NrFnXfz4rsW7t1h05CDxICEwo9jbfuP+aoBcX/YGRv+bV/NHOD+qjDZ/eVyHPMxIhfz4BZfKCngF9FE0Wo6v7UG6FLTw8NWOW5ZwZIlze5b0MYhK4A4 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(346002)(39860400002)(136003)(396003)(16526019)(186003)(52116002)(7416002)(6666004)(6486002)(54906003)(316002)(36756003)(1076003)(44832011)(5660300002)(4326008)(8676002)(2906002)(86362001)(26005)(956004)(478600001)(8936002)(66946007)(6506007)(6512007)(2616005)(66556008)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: BjqbWIC5ljyL/NGxEc+yrQ+T66gYTLCiRdsiByp1PQvO9iN2g6mtxxCuiZtkfmSU3Y835yCm4HQILhfl0HDjjWq6O3JIWvhFkYtE8hVaDHIy93KURDI/jxxFNOtKKbbZcxKRqgEG77ztG9kJ0dEAqpxkwZ5aOmeCltvVE8Cmm78SGYRCjvng9dIl8uhS2MgVDBaZA7BmdaNGCNMYy0iLx8kZgUUjYGOFgdkR2aVtkvBiggeAMexNlrRapl50GKx37CJr7OXXY0XVX2ai6KgTjThiFjpGlWg9RWgpltYJg5SqSbKlo/l1JfsvyQeRcGmxngOsWDXaboh+dLzncx484f/lnPdeQ2c6jxkztTKnek49bgBvyU7cmgTw4TJMiHDQOE1FlnMHmPg5R4m2t+FJUn9guf1DKmkOBBS+gs0bf6yr8dEsZkjBbuVcSRY1FKloqWyApXX0HCyqo9Yysp6HqM6RU8vDJ3wll9MiKliYnYVDF7sJHip2ZmTiIaBBmJR/aeE9n0m0jfMgcfRBgMAAsfF140BsJi0pB+RjcPRL3i2uMfAbnRz2uQizNrdidjkzZGPu8z3c1xmALgjSXnbN5nkZxlvANwJrMM/OE2lKPmv5JlSKxXKmk1tXKtFUTDNyAF8f7VJQXNVdnzJN3eUJWw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a179988-a961-4541-67b0-08d862acc80d X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2020 06:15:50.5302 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: f6enlH1+MR2uapp0qE+5Vc2rlzidQ1xfbuPmpOJv1q7atsWLIE6w+DcQ92lC5aC5Jr5Xnttv/GcVp/2dIoVYDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4633 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200927_021552_806393_D6B23C5B X-CRM114-Status: GOOD ( 12.55 ) X-Spam-Score: -1.4 (-) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-1.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.3.54 listed in list.dnswl.org] -0.5 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.3.54 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , Richard Zhu , festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add i.MX8MQ dev/sys addr map and configuration data structure i.MX8MM share i.MX8MQ settings. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index bd3a42892b22..0f69f3f745ab 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -90,6 +90,34 @@ struct imx_rproc { struct clk *clk; }; +static const struct imx_rproc_att imx_rproc_att_imx8mq[] = { + /* dev addr , sys addr , size , flags */ + /* TCML - alias */ + { 0x00000000, 0x007e0000, 0x00020000, 0 }, + /* OCRAM_S */ + { 0x00180000, 0x00180000, 0x00008000, 0 }, + /* OCRAM */ + { 0x00900000, 0x00900000, 0x00020000, 0 }, + /* OCRAM */ + { 0x00920000, 0x00920000, 0x00020000, 0 }, + /* QSPI Code - alias */ + { 0x08000000, 0x08000000, 0x08000000, 0 }, + /* DDR (Code) - alias */ + { 0x10000000, 0x80000000, 0x0FFE0000, 0 }, + /* TCML */ + { 0x1FFE0000, 0x007E0000, 0x00020000, ATT_OWN }, + /* TCMU */ + { 0x20000000, 0x00800000, 0x00020000, ATT_OWN }, + /* OCRAM_S */ + { 0x20180000, 0x00180000, 0x00008000, ATT_OWN }, + /* OCRAM */ + { 0x20200000, 0x00900000, 0x00020000, ATT_OWN }, + /* OCRAM */ + { 0x20220000, 0x00920000, 0x00020000, ATT_OWN }, + /* DDR (Data) */ + { 0x40000000, 0x40000000, 0x80000000, 0 }, +}; + static const struct imx_rproc_att imx_rproc_att_imx7d[] = { /* dev addr , sys addr , size , flags */ /* OCRAM_S (M4 Boot code) - alias */ @@ -140,6 +168,16 @@ static const struct imx_rproc_att imx_rproc_att_imx6sx[] = { { 0x80000000, 0x80000000, 0x60000000, 0 }, }; +static const struct imx_rproc_dcfg imx_rproc_cfg_imx8mq = { + .src_reg = IMX7D_SRC_SCR, + .src_mask = IMX7D_M4_RST_MASK, + .src_start = IMX7D_M4_START, + .src_stop = IMX7D_M4_STOP, + .att = imx_rproc_att_imx8mq, + .att_size = ARRAY_SIZE(imx_rproc_att_imx8mq), + .elf_mem_hook = true, +}; + static const struct imx_rproc_dcfg imx_rproc_cfg_imx7d = { .src_reg = IMX7D_SRC_SCR, .src_mask = IMX7D_M4_RST_MASK, @@ -517,6 +555,8 @@ static int imx_rproc_remove(struct platform_device *pdev) static const struct of_device_id imx_rproc_of_match[] = { { .compatible = "fsl,imx7d-cm4", .data = &imx_rproc_cfg_imx7d }, { .compatible = "fsl,imx6sx-cm4", .data = &imx_rproc_cfg_imx6sx }, + { .compatible = "fsl,imx8mq-cm4", .data = &imx_rproc_cfg_imx8mq }, + { .compatible = "fsl,imx8mm-cm4", .data = &imx_rproc_cfg_imx8mq }, {}, }; MODULE_DEVICE_TABLE(of, imx_rproc_of_match);