From patchwork Tue Dec 29 03:30:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11991889 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=-16.9 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 05F49C433DB for ; Tue, 29 Dec 2020 03:04:00 +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 C102E207AB for ; Tue, 29 Dec 2020 03:03:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C102E207AB 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=roBhX+gVssG42WLnEofFDE/jL 3DXNPgRNoYKS1DKrt5ojlxkmKmNIZ6o/pi30v9ZLmMzsSvqCTcK8DIcZebkusyyf1Sl7kgbs1AxFG IOEuc8SjwIW8HVUXY6TI7d9fT7aYT5lX8EX48XwiVsjWVcfr/uVSaN8FaypVJc9NXaRgvt77I2S/w +6Ry7tAiykYyAt786A6tjfqqTZGjDLctodCo6g1bOrx3O3TRfess1W84Vz6pTUXac1FM9I8nPlw7m CAFb6uWd2+V7fr+tmx2KHFTHclgWSKVBQgaVhdm05r6ND3ZnbCF9BqpRuT1rss7+4s00LtJWc2r30 xrt1lazPg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ku5HY-0001Er-Hd; Tue, 29 Dec 2020 03:02:44 +0000 Received: from mail-eopbgr50068.outbound.protection.outlook.com ([40.107.5.68] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ku5HC-00012H-P3 for linux-arm-kernel@lists.infradead.org; Tue, 29 Dec 2020 03:02:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ix222R9Pufn3opFcaKNhfBXaiU3P0q6xp68QEONMwXxlFXyEZ9FHhT3bEumIFj7Gm9nvzBWpwx5rqiEwiEGDhFXdDJ7xYdqv+exl5d9dkvjllEbxqExCQLDVquNZyY5Eo8Yjpn1iRQ3qpBCm4grRT01PKh44hsCHECoejyI1zGWRrk5vR9o9ea2TFUIX1hsJHBfj5qBMJrkfQ25BPeXZfivcEClIJeLghO4TmZdqkwiwdR5a0R/qCea4JNtJ1K3qjOn/ZGhL2xFGytfazxk/3faK52YGq486FxBxHfJxwqnbL786dai4SY5jnzosvpDRXxA2rME7/KmPqFwrT2WaJQ== 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=NOge53yr2z2sWhE4oLNazumxME+i9Oh6SozVIgvjEY1kbpL9HZ65/fV7ARvGPr4hhYLJ318ZgEEY8BgFbFhIcYzVMux9MiDY+jw7srJmEOWT6wlvjptYaDYwVo04zzZC52f9hYdBVEZky8UPhDjjZIt1lSvtvzd5e6kav6jgG/qKXsYgAtJ9nLBcqfCfP1CCxmjWoHo3EBEzJJ7bn5hAjeFJk+eRV94rEPpyc3uDQDuoT01EvCCwx4YaKl/JewtToPrgAuZi/D6By1l8X/02PoiPXUTT10OQw0y+avCEKYrY8J14mgyLi3Ug50VauCRtkR2yJwUrlG905r1xLEDlDA== 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=c6MQRgYxU+LUMuEPNGJhwd6tonTK+TytUE5TviLBj5aPkuoZRZ3buP29gDO67H0XFDoDxgKBjUVNqWROlT+BhRlxbRqzEKmiQ0whM4mYXr/FRaVMd8wHomDL4GmooM8lW2HRC6LO4NwxYvc/KsKcxp6CCTp41VrKkZ8WIsDEh+o= 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 DB8PR04MB7178.eurprd04.prod.outlook.com (2603:10a6:10:12e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27; Tue, 29 Dec 2020 03:02:19 +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.3700.031; Tue, 29 Dec 2020 03:02:19 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de Subject: [PATCH V5 6/8] remoteproc: imx_rproc: support i.MX8MQ/M Date: Tue, 29 Dec 2020 11:30:17 +0800 Message-Id: <20201229033019.25899-7-peng.fan@nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201229033019.25899-1-peng.fan@nxp.com> References: <20201229033019.25899-1-peng.fan@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0178.apcprd06.prod.outlook.com (2603:1096:1:1e::32) 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 SG2PR06CA0178.apcprd06.prod.outlook.com (2603:1096:1:1e::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27 via Frontend Transport; Tue, 29 Dec 2020 03:02:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f3d298c9-74a4-4e66-21cf-08d8aba627a3 X-MS-TrafficTypeDiagnostic: DB8PR04MB7178: 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: QHXS81eo/zkDR8QmbXBan2DHZgpy8m/SEV3Lkyxnxga15Vk9wDtXnXbY4NaENyBmnNdO9/IgehdSaPcn8bL6bwPegVXOeWm23tJdjXNqD9OHSSG6chEJC1tkTHTdhhiDiW2tjNl8tRHCcGToMmj9UiROupO9+iYtrpzNL1qqV3rYZOme+g9dpKF0ONnrURuOJFtCp8D9iOqiEn6ifB600EmeuKTOHPoP2qf67kzW8+1ELSOFfVZGmzi3fyjREXU9AEc7IpQV8sOF6ip6e+mIJ0vqKvRercmg113ySzb+pgd9MpUXOiVH9XcA0IQcZp80sV5tPTn9LmdSvUt3zCuMsywZYZ52ItH4kC6wFxtAlhnmqRatHBA49upZ6befr0lTLPUUzOyYlCUCcU30FHStHg== 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)(39860400002)(366004)(396003)(376002)(136003)(346002)(36756003)(66946007)(16526019)(9686003)(2906002)(7416002)(2616005)(86362001)(956004)(54906003)(478600001)(8936002)(52116002)(66476007)(5660300002)(66556008)(316002)(26005)(6486002)(1076003)(8676002)(186003)(4326008)(6512007)(6506007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 687cO05CWY7j+YyBUfvDHkJiC78D4QsuOWdj/lazO6HIM9hlpXWMLMxBIEcm1S1C8gUYuYePvIxvFM9ftw3u2oLXrSQtfaXk8yVr7UiOTZFXXnC4E4pBBZMY1/PPhCC5qQYcxOHOs7ncIINJoStELI9qLl/b+/h9WfRpBhPRSlvx+fCjhIT6ktLBZebG7hV4HbEFEoXJbL0scIjyLTll/t8KX+e/VUOYFY6ojAKfmx1K2SKvQy8OZcjvl98cWJ+MdITblYRGsRpBgY7MHniKlhVZT/oh6M2PMv+bfn2VHA5U1CI5QgRDzi7MXxvszYEnmHYSNBs8nFl1DFHKF24ysX3wqbFT2kxAU2vVIWetM/FeqQtrRVUAGL+FvOpj00WU4d30If7UiPJJBjKGPuAIYNwX/U2MvTqnB2M+S+a1izH8qduEz61ld9n9j1fiBbd4bKSHIXyAjnGCXsBbiPv5crGdGZTBuqHye35fEcA43boXZTf/0IzhfzI87Hfsu+XlI65n4KWqtyJDYcVRoK5ef4WtbUSleTak6WAd5oYtzdznducoiOYawJEVMf/sjmFYCExg2JsNWy3qCKkwd+iHuP28VN9b/WsdF8YqeRxkaVJUm/JX3t5/YFa4genKNV2PjuT9+PqEuK8aOVLm6fihjJ28bEiO1POnTlST0Gce/E/EFNWfrWaFvQoqeM0Ah14uUY8tdOGHukppcmVUzMmJUpA6X1SFdctFLD0fEASXAtc4B+sJ7c3GLXum9oyVO9Zo8/iQpdMD9HET7Q9ZuQVk2ROhYtfqNDhX0qn/buxEN3R8RV0/ag3npkvqj2KQRzwbBc630EdocmzNbIwF4ZUAGNWz7FXzb1iHFA9L5a3RBL/9l6IN7w99xx0FIWB9b8zmWtqdRRwVhQnkP04JPUVcWuE8Tal+uik8BYQ/eVIUqzsr3g0A5Q+MvG0Ak1rMToNLdhXNf3znVldPvka4JStbD/qDSXy9mrI3ygs/mNR/SpEEsQHAfBjE+dDhvZhNvUFV 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: 29 Dec 2020 03:02:18.9529 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: f3d298c9-74a4-4e66-21cf-08d8aba627a3 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: l+9XxwuHqTufaHCS6q4fwpSBQGtT0le5aZ/EZ1wwsRc0cPlDeadp0cSUff3Swxv5jEYlCftUiG3PIqUnW9s25w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB7178 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201228_220222_874419_93989967 X-CRM114-Status: GOOD ( 13.01 ) 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 , 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);