From patchwork Tue Jan 12 09:39:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12013005 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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 9634AC433DB for ; Tue, 12 Jan 2021 09:54:15 +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 45849230FD for ; Tue, 12 Jan 2021 09:54:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45849230FD 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+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=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=+BHP14AesvLBydfyEl8nOwxgOoa6NKEOAeheWaEHR50=; b=rSxPhSMHFUiDKx9Cr2ftYwB0y ytYabOIH5c+33U1tzFa5RQWoAu0cS2JXR+USQFJpwjFXlTgZ7Wt4JWxrbZTrrpa1paAtpS9lY3dso 0vtGuGx+JJ0EAs9gAI7VjJagodBXg4Ust1yss7Vvf5HYr4IJjNRb4zu8tpZivDfI+YsEyNFCQiWpz +J+dnshcqmxM8KoZczOjWlFpATwmaLIrHXTmoi/1WvaQRC11bslIShZqUKkf6yIB0gk7Juq7ac9M0 i3QslSCt9F7EmpijKeF9RCmmwsY3rSSmy8ZMSDGU89lV1/xckFf4yk7X0GZGr6kzSlvCZ7VjauIrX 98yYFcVZg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGL8-0006Xn-SO; Tue, 12 Jan 2021 09:51:50 +0000 Received: from mail-am6eur05on2055.outbound.protection.outlook.com ([40.107.22.55] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGJT-0005dd-Or for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 09:50:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N33muntF4qWv2W1gk98jbDESZ4EHW+WcCQC/RH5L1hrbOBeYBMyHcXmmjYNAY9+WR9bxlW45fPQlGt79ETmOIO+kM6Tq+a4DKih2kBEWR1OGz03ktxYsMhvavNrGgURPSTu1bY3iQ6sVWCTEdIhTxYrqIGacuXyQIPqj412EO7R5CgUKGuISvj0E80pmbM8k1WZg5V0S7iSk2r6AZEzx0mAyzCKk0USZBPxTZY5GKc6c2LXW+rOexCrGnvdBulqtiwN94F+KvZVSaDGHxmqf21QMj8c//Mvf6ltW5KzS6Zb431Cdo2kSUqx4vUQA4Zb2WeahmD3iL3SBHiYg165GXQ== 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=WtFEE6M51mDGF/Hl2oXngxif0aENCtRhvK9AUN8h4Ik=; b=ZpBBhoc7xHaNOOdVCYwTZdpVeTTycdKhzuATO6W0ffX//dRL3RNoFqFTo5w4PitqmAgJf+Nm3Vb7D2SfGxdoOhuJioWdK+iXFdDO8Sgn5pRPzeyLEHs4MywveRBHjC4N1mDK1Fr55Oul+hp79utnJdOiwKc7cEQE9htoXB91AGCld/1qivL+UGNbXtFg819FXbft7BJ7+DqA2p0JFJBQoY8hYj2AF58ZEGETYcsqJMa60Y+A6uRVng0s/tf0mV2Ll+vzDKAkg/oPQRX+m/i6AjaqqUo4Nzhxabig4JDaNezik0ecJlDVMgd+UIBxvBxKCI2tgxxWfQsoklkv/cOfcQ== 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=WtFEE6M51mDGF/Hl2oXngxif0aENCtRhvK9AUN8h4Ik=; b=V9lop9qo4Dw51N3qLiqSz59qLi30/dwsPKKFfU1xX+YgnttgPAjUDCh7cI8yd4Q5dG21hS42qwEW45s/OTmtJ7xNHyjDIEWPnUutm5YtFiV82Owz9MV6NIRpj4Ypa51edOj3sKWnq7Yd0+/93Jg0+pNxRSsJy8qcjWpq2EL27+U= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB3PR0402MB3658.eurprd04.prod.outlook.com (2603:10a6:8:2::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.12; Tue, 12 Jan 2021 09:50:02 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 09:50:02 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V6 08/10] remoteproc: imx_rproc: support i.MX8MQ/M Date: Tue, 12 Jan 2021 17:39:17 +0800 Message-Id: <1610444359-1857-9-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> References: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 09:49:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3be91094-a225-4b00-bcb3-08d8b6df6ebf X-MS-TrafficTypeDiagnostic: DB3PR0402MB3658: 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: 2wvgeI9M6N/DxrjgJZTk6wIKIfSaZscUMWGx3raYoPHU05kbfx8W8XzPtpAdYyZIy5ljDiVB6EpHetbhL5wue6aNS+3hkOv8Tob7UbaKlFjs2qGwTSZHJSaM4547Euvp58Xm+h3/GDTngXCvfSZpZYiaCqJoce/s1QV64SCDfhpWg+dlyfthM6A4TOI8lGvYnSgMb/6dndVHYUan/xuM9konLGFRJkcVo/gWYAeBHgFIacOvQWDlap1J1bCMKVBI0SFXEAxRlnAEPd+u88EeMvknxBGq2nCvBeFXZfmBvIkY6r26ZHgk0ooP3rs0QSAqasFTMroEI+/URsWpKyq40xfbjxi668DqW64r5A4POdyGo+pifQdyDdpBd3sMwJi0qmjIeJMkY5aKR6M8LT/mtnxp1D6qetqNVsyoYngOIpO4MipCgHNkGaGIkJ2wLvXP0fDdIBom9Dumgcjd6KAcsA== 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)(956004)(26005)(2616005)(6486002)(36756003)(66946007)(66556008)(6512007)(52116002)(16526019)(66476007)(86362001)(7416002)(9686003)(6506007)(186003)(8936002)(498600001)(5660300002)(2906002)(8676002)(69590400011)(6666004)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: YSRTTKT/Hhl7vJLrycUc7PW6rVVt0S6PZsgoHs1Y5PNk9p13QVsyrQwmuuO3YQdAM1XckhUkpMNNbTvKJP+pCDJAuWW79GGSOpxJvpW5mhulc1eP+zQGRB77agqU1KaoihV1KV51tNe+ZlxMe0fFU0rxiwjFYUm9/OuUal9zFEEyXS3TRZcsGuZJhZAAhW1fRLWpn2W9kyVKnS3l815OJwHVxaK00pVGXmbLkxBQahiUg/wZWbS7ftnUoL0Jz8zRp6AuJpUyyw8g3EYmtuI6duW/7w4haHevQS3YASHzp24AAFuPZk1xDNtW+gk6A3wEUwhOSakKc/IIEV0rkvjy4H3sT/8icu6MMc1Jq6C61hHStpJCCl9o99MhQ4Z/SXU0CWT2XguqNmmLX1fYWghTqFxLeWo6XPU9wPHmb8z8kNeOe8OGxeuK9/f3kRAJ3SWZ29nU4sHRLi8zHDxoqLesoMDVZ2SWklINu32N/kTh2DR87ylDG0vJ5gVDoGsaVDXGTvhSwer9uxaU99gLZ0m5B6ukSO6zGhHdHwnUny1pIezwk69KAMKefWpis/fabiXJqzWmfNj/kx/Ef17c98GocIdY0rklqbBLYl0hURKnD6nbpYIfKrlHqYWGq0KFGjd6HLvtBP6s6ewiIJlWtYxeePjNn62nWpWzw/wRO7R43ZOuguLHT7spCcLq/EMgw6x1FLJ+AK/HCVbkMgMQenvOIVKsQjYRBjqEIWJELd8i79+sXchgXUeK88ZkpW1Q2rzJH5jOUcdmcsZwqeXAXVDKkcZcxFlIpnaMz8eJqiu2/8kXrAlSNlAAZJFSa5S2O3C/g8rTw83aeVENgDiDrnQa946+1fNsb3SFzkGmcWbcuyW1uv/Qy/iKmc2LWQ66hgdTExL2D2QDu8e9I1+gUqPtgHBYfXQ3DB4rHjQw5iGoUJTs3x/OPa8uLOD9syW1tUCGQ1Rim1eye6C241AZ8XX2Q2TDmLPbpbgCdYKOdzcuwNyEPKhJKHfAyDCZBJ+8cCsn X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 09:50:02.3867 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 3be91094-a225-4b00-bcb3-08d8b6df6ebf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ENvB+FhQGs/fQFpCDdRPq+CQnNyAibdwJcME9r6Xvl6zCMzkfz3+VHkHOKTbUN2MbzI5nOcyJPj1cXq2y/KXiQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3658 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_045009_616622_C28E71AB X-CRM114-Status: GOOD ( 13.78 ) 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 , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan 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 | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 3c0075dc1787..f80428afb8a7 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -88,6 +88,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 */ @@ -138,6 +166,15 @@ 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), +}; + static const struct imx_rproc_dcfg imx_rproc_cfg_imx7d = { .src_reg = IMX7D_SRC_SCR, .src_mask = IMX7D_M4_RST_MASK, @@ -496,6 +533,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);