From patchwork Thu Feb 18 01:24:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 384351 Delivered-To: patch@linaro.org Received: by 2002:a02:c80e:0:0:0:0:0 with SMTP id p14csp3281366jao; Wed, 17 Feb 2021 17:39:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJx50NE9XO9z7GElloEIgkellSGxs+HrPfEbokzN/mJPNVCslOPTaKBN9X99lrRBdIUGtOdn X-Received: by 2002:a17:906:4058:: with SMTP id y24mr1683251ejj.6.1613612350171; Wed, 17 Feb 2021 17:39:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1613612350; cv=pass; d=google.com; s=arc-20160816; b=EpQPwPXFJg4ZSXONRhT46qeVNFlwChT/GcajrkLWSR+kAiQ1i+Duz/PcZCGZBSFOkZ b8Lcauo7kvnpIzOpmKai2OnE5UzmtcSZGpS7JtT4yFMgSpC8nAo3NIl7PNBn8bt1Rqx4 SVNPcIJeZ8Oh3FvLPUviqUlS4TzHP7f4d9ePXXbyPu2BJas5++8cbx27eZCIwTn5h+3a /ScsjeCkKFNNOSsaJvNePyfuUB5b07Co383En7hNNJxC9EYhzHLyrYX4GdaAs65pIjeB PqGhPuUTN6PU+wi2m/XEVOsLjPwVQ8oZ5jE4TeR3+ZzF2DPhfIpMdA8gik5e6e6E28Cx of0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=hO1+r3GoanYoQG4pSNUPhcwcRzBSJ+js42Xn0O6ntMc=; b=Xz0Dp37kpoL0ufo/aHMC8w97JbfTVEQf2MVnZHlsFwNMJcfb4M3Itb5AEhdb8SQmmv yEJGzBiVE/bYPAeHq7UAjGvK6xvMBH1hiKqhI31Dx4K8dn1l/uoqH3OuzM3Hr0/G/A/Z 2cH5F8WocWS9gBSTsC5cXgBKBKlOnBLTGdwb9vnty+Ht9CmyWzv79G33eK+ycDMflt1z nJcsyMloW+BO2fZ4bCGinfbTKh+nsId6JUJO/Hjv0AlYTbJ+p6oh55rT806aUfRvOftG Hgr/nNu5SqamqBq7SswOAAEpoaE5F2PUOVbpHkL7JKWUHiMgJR5cb8E6LcOVBxXJoy16 lvSg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=ZIPJOuGJ; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si2551315eja.255.2021.02.17.17.39.10; Wed, 17 Feb 2021 17:39:10 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=ZIPJOuGJ; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230175AbhBRBid (ORCPT + 6 others); Wed, 17 Feb 2021 20:38:33 -0500 Received: from mail-eopbgr80057.outbound.protection.outlook.com ([40.107.8.57]:34274 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229876AbhBRBib (ORCPT ); Wed, 17 Feb 2021 20:38:31 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PoIuu/pB0bEhJJTRZAGoKW4whuA3jyysuXgK2rKv5AebGU8A2VCwAXagLW/zzpimlmpIU0YaYpr0s6knag0OzwBb8OPxh1xrkefTOWgyN4Qhf6cR6X+V7lU3fX+NkXQrc+RUqrxAi9QA+bKj1KFcVdDCOLLOsl1QvZcKA8mbGxMPyMaPZSSPBkHWeP3bYnxTJy+F8EXcKVkXE61uCkKGac2ysn9bbwD+uLm5vnJRET8pBtfXjKWVEo5Q+DCTQVz6Fkj44fdXOnPFAEpUSjQCrCTEPQhVCiYjLs29mgVZ1h9r3jpHk6y7QaP9a2wCNohFZj3s6w4wa7n670jy2tHeoA== 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=hO1+r3GoanYoQG4pSNUPhcwcRzBSJ+js42Xn0O6ntMc=; b=VO10y/XpqwZB3dea5vOSbHVJ4EmblRIG3gkAL9hmp0YZRIfWHlzirNaFiw6aOrAGFNclNmzvrFVk89WZFkdr5y92E2sO9b6sCm7rUJYfP6rTmxUQKlwhc53bYF6XC+Do2JOP0FkHqzvprzAHrUqAf18kIJWz0FwhdlhMiS7gdVoo0P6FVujkU4eqfgtIsbJw/m3hmartkfnoXqYVFt6cK0Hhn7MMVgiGbIzZXEwGNLK5U+oPMbjeARYoq7HboJ3r8/npX3O+0bN0YXQ3pLBX6Y382ohS3r3OMP2QqSuABFe5kZY6Z/U0Z+O1MZqbjId6hY6L3DNS3jXFRXjzwIrDgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hO1+r3GoanYoQG4pSNUPhcwcRzBSJ+js42Xn0O6ntMc=; b=ZIPJOuGJBYG8UV0AC3l6v1Wn3FU8WkOZKYswsJn51LZN8tjmmj0JyWnqfJGOoL1MgqsfIkyOfshROYVtoH+zMMFT1n+e8fFz6PllrbUfYdjoDu0RhHfZB9APT3s4SW9/dHHAbtmTJpQV40SFvVR9GY3qYwglt560hQWTb7g16UQ= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none; wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB5244.eurprd04.prod.outlook.com (2603:10a6:10:21::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.25; Thu, 18 Feb 2021 01:37:39 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.043; Thu, 18 Feb 2021 01:37:39 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V12 08/10] remoteproc: imx_rproc: support i.MX8MQ/M Date: Thu, 18 Feb 2021 09:24:58 +0800 Message-Id: <1613611500-12414-9-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1613611500-12414-1-git-send-email-peng.fan@oss.nxp.com> References: <1613611500-12414-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR0401CA0005.apcprd04.prod.outlook.com (2603:1096:3:1::15) 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 SG2PR0401CA0005.apcprd04.prod.outlook.com (2603:1096:3:1::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.27 via Frontend Transport; Thu, 18 Feb 2021 01:37:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 340b27a6-9d96-4760-86e6-08d8d3adc6e4 X-MS-TrafficTypeDiagnostic: DB7PR04MB5244: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:158; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RSGGooARJs8LeumNRYhXYbyNkSdVDzU4VC3/R0q6iN6elJy5ttXB9xO8QKpjPR1RBoSs5lCFWkJV5dfI96pEmHnwTJPGoNnAi2QqRjA9C/1OT0ZhJt0ZuGPaJRzb7Gnp0r2hKqQKKZUwoZrfxcs5HzG8jcSHS+1xhGBlV5bbmk/t1R92WQI2gF74IeE+X9pJhqi5MojILk5IEzEVR1k8/RUodrhgjitYXhMfpKSeFqUN6tYeRRYGyUQ8/lJD2hc+kiqVJeLtRRQCE31jwFD8IBo9QLoYmukazQLTCrYqgV7AtLd0zQfaZv8pOEqsbR708nrHt65VlsQJD7Qxujkghkdu2lb9uU/UgUpTuiMBWnqg/dr0YZtoi7FU72PM+zSsIXrvjBATaOYY8fn9Gd05VwE/tj3gYnSSzkHs7n9021OfBVGnsl64ZWpcfi0xCQmgnS+MLAudh1pmuHvzdJ4TZrbWvvABiLU6P6f9j8ySKUNYo8XY1+RXeeTl8e4LuXruEHfUW/R/qr7h/78YIpedfXFLYhbOx/Yw2+RUTy2wSo53vNR78/c/MPvcQlaYC8e7ScQN94EISEcoSJGC07E8yg== 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)(346002)(396003)(376002)(366004)(136003)(39860400002)(86362001)(186003)(5660300002)(16526019)(6506007)(26005)(2906002)(7416002)(83380400001)(4326008)(956004)(6666004)(52116002)(9686003)(66476007)(6512007)(66556008)(8676002)(316002)(2616005)(8936002)(6486002)(66946007)(478600001)(69590400012); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 1uxQzqeIi5zzeNi+nfR/5sJc6RdfvUnZ/z2JgEoMZTF03tKvlCkWlUbGO5sOsdkPh+0A0aOAu8dvIcdZWMmN6s3t84Hk33FPrGD7EjwBcO2JLQFpUEZCrh5bqqEDKJgpoyfprfzLtfyUQq0B3iuskBaUoke+t4ltMWU6GEsM6i37FaickHIfvpdLXoKZNllSDgm6cPWVU+kOsNnwKpx3NjUWuFQ2jjA5ByJWolof+evnE7YpqCBTrhU2legAaorzx818yjPmWMHcZGZQhCdXySSIG1+YC3q7mi9iU5qF3m2y+3Yd0nezzZWOdsc74Coj4wDD6Dt73YVDA5uH5w1l0yAMNsahINf8pQbw9pN9RDCsHpFi4exvz/JhzIIPBXjsPfic5/CMv7lxNkTMr4DSpoKGYf9uAkLbew0xnwFU3U9d/GJ8AihJq8eji3eBRSNB95BU541keGNJuWsZEA7VNkfJYHPz3vHT61EUcClKr7zlQvIADx2NRY5oVR8OsLyp61det1OGYWVTw/ktFvl6T9/wVP1l905ilMysBrk4Tg0xd7iBDP2ZNTtGsfDGChRdwS/VtzsCWPaaLd2oDVhq9p+PhMg4gkKUfVzygqrZ9LTZe5rPYsy0RTwzuWgVky0bjDfGr35RoXcOEgQkmWnZpoL3BZoznU+SCo3qAvDEgRCEqihwf2oNI9NDLnp0wjljYHbQw3Iwdo+kIIBuC7fIi8yFzZGgnTUlfKH21sd26M/7hTA8qaxs8I6wGR7e1Ik7aPW/auIC4SwgkvGNjEIGPy5cT9i6kJ/2IElhwx63lW825pNV6qpIkFYCSJM/+FHrU7cymWvTH+b9pCBB52kWBYqVzJQnt8GiNc6htwaRVgK2VJySiu9wCgWCbDqWQFcgc9U077if1Kst/o7NQUleEIkv5JfetZlP/Wa0mLwpH0FILjG3w2D7S37ODyTkpJNzEpe1FhTkUJofw29KvtbXcy1JHoYOlPsDyUeaMK39UeXdENsUwkN6MU034vGWcb9Uj9nECvjOmhEOZLW+qlkw4O7CboZwbun0HbtMWWkWpw+SzR5iXcWl5t6yoB0T4PQjluKJqXR59H8N0pYYvVslqBL+F/82HS84VmoXY5Ftzw+zUsS2p3o+1Fitsk1sTaelo4PeCus0CHJ1v6dkPrT5CPKgpNlGt6A1ivdb+nQMjAfOEpxj8IzGf7VSjLHqVq9HdRTZnVu5lCJbVJz2e2ftmnBeTVcFexO1PWIhL08W3fK+a262BAY3TYRP3LbEIvSZS9TUABALDmPdXfr32O7bfXhS1cDkIaWTx1Vpjps6CVnFRsKoZ2WY+TBCZ8Vf72dO X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 340b27a6-9d96-4760-86e6-08d8d3adc6e4 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2021 01:37:39.4702 (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: n9dZqnEHlpB6POoVa3wpikH7FL7so6O65VsnEPFo2ZtSEBlGHZzt56RNYunqU8SMFD8uWpxk60+mpGsnOy6+Rw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5244 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/Kconfig | 6 ++--- drivers/remoteproc/imx_rproc.c | 41 +++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 4 deletions(-) -- 2.30.0 diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index 15d1574d129b..7cf3d1b40c55 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -24,11 +24,11 @@ config REMOTEPROC_CDEV It's safe to say N if you don't want to use this interface. config IMX_REMOTEPROC - tristate "IMX6/7 remoteproc support" + tristate "i.MX remoteproc support" depends on ARCH_MXC help - Say y here to support iMX's remote processors (Cortex M4 - on iMX7D) via the remote processor framework. + Say y here to support iMX's remote processors via the remote + processor framework. It's safe to say N here. diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 5ae1f5209548..0124ebf69838 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); @@ -512,5 +551,5 @@ static struct platform_driver imx_rproc_driver = { module_platform_driver(imx_rproc_driver); MODULE_LICENSE("GPL v2"); -MODULE_DESCRIPTION("IMX6SX/7D remote processor control driver"); +MODULE_DESCRIPTION("i.MX remote processor control driver"); MODULE_AUTHOR("Oleksij Rempel ");