From patchwork Tue Jan 19 07:35:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 366137 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp517397jam; Mon, 18 Jan 2021 23:53:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFqC5uAUZnfGkshxeAlP3kozmsxs5gqm29r+WUV1ykC4d2zYW9lzPxDA1sNUsPQ783rLT9 X-Received: by 2002:a50:e3c4:: with SMTP id c4mr2381432edm.77.1611042814839; Mon, 18 Jan 2021 23:53:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611042814; cv=pass; d=google.com; s=arc-20160816; b=v1UkJYozBIXIR9DFz+GUyJQaEEKbS+9yGTDW4ASxihelA+pZmZyjad/VC8vqmDBkfX bgcmAg7qzR/H0/8PSiXVrl5susohVCxSnV69WyopLqfXQn3JEHFZNNe6xxEvc3pDYRqG GHAk9OMo54xaZXdGosi1xQpI7Wr+1Ay/rKy1rnMSW8uD+5eo4+Cn7/cDJbYBWlmdv+GN jR7BFfQUuUA1CRy6u52pF6MlaAZb/e9mWq9aJTFTUa+YQEcshX2BbhKslD0e6fahS9yP c4MQFB0LITZkmlPsZYPqnXhheglF0L0AP7Ix5j/rkhOTYG3+lPibUucwOcyxC4J1cgnU j8/A== 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=W3tuhvC/l1aREUPXQgoj+YPRRpgkRpSwXiVrTNIubUs=; b=S0wsR7WUTk668qBSTwHJU4Sre0jPpPl3jFEQnkJhro7sxNcHqfBz9i8pkp7yrTuKWK g8uyuxhKYrJZqPY1maN54Zw78KYba1WJQ0d4ya9Kq7ZfMGgoNInCOMd82dh4u6ClaTbv tMVB8XuAbiB6ykhdP96Llbh/RZJwjNGJ1djEEfdkXNCDJsVqkNKst4Ni8KudN0f2to8q ixGflf1YjurvF2IzSWgDcGjIuz+MDbv3CFETRpudIolfq2FIF3SOt8byirGcrWZ4eCkP zn1qcvRxoYbnOg3tnxTKMdeNZocVPgTuHQFJ/iyYJCrXfH8F+BijW1vRUgGD7tfmPnHH Njvg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=XnCGgzs9; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=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=pass (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 v1si3167966ejj.430.2021.01.18.23.53.34; Mon, 18 Jan 2021 23:53:34 -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=@nxp.com header.s=selector2 header.b=XnCGgzs9; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731155AbhASHx1 (ORCPT + 6 others); Tue, 19 Jan 2021 02:53:27 -0500 Received: from mail-eopbgr40080.outbound.protection.outlook.com ([40.107.4.80]:64958 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731235AbhASHsw (ORCPT ); Tue, 19 Jan 2021 02:48:52 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bi8U1JLXDqr15Pd+jjIy3u/FYekyxh5LTIduO0+n2qrH1Gt2oEpLsx8mtfB2ZPck86OgLFibgT+GMHvd6o6vXG8jI1pj4GYbui5aUAtMtrMPFmSlMdiR6gaG2crRdcUC2rQp5+oWC6DAaG9tzPcaLa389f9by1igRfs6nPXLwZOiW/i35V0dMSyEVFm0BQm3ZEbdjiJYAmYHT5cpvzdEX/3k12ERH/k30XfrrernwErNp1UlUSq26VVq56uFyheGvwrYiNNULe716st6zu1Cw8TMAAaYtWjyc6tWIl7c/kxsuRZKc3TQM8Qj/Ftms4sAG7BUNQSIMmkcO8x6AQ3pXA== 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=W3tuhvC/l1aREUPXQgoj+YPRRpgkRpSwXiVrTNIubUs=; b=WTtBxGXZpd66dHvqOrzcePeemLofFf6U9blzV9tjyhwq23qmY/kRvNa4GNbl9epnJO9KMb76PiRB/T82wOmB34SLWwmbuqL2pAke5LOdztnZMNuflir9JakxSLv4omZH7JnTwgJbQwi5LbYQ/IZreo5xO1AFBCGVMQn08nCvPvYbfoMGRrSlt5sYc6gqN4ss5UGk7JYrtXNmKtpc+QHtpS3Doeu0KdoG55fhxapLGYIC7gpSlBuyAmktFHWFtonZCV/1fB5J5SxCJrVJ0cIWjty/wKhhWoKKoBP3mhVKuhyOxirmVXFN2ZfbgDPSwRiB07JbBoEou+UOOKO8NbFYnw== 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=W3tuhvC/l1aREUPXQgoj+YPRRpgkRpSwXiVrTNIubUs=; b=XnCGgzs9YF0od4g+cffOCZc/NyFtMOwwiI2AkdJnlxkNhsRUeTAxQRj291IFm8+F8mSeveuT9Pfb8VL2jSI+hNveaXNrmEps/VKglTiOi2T2pil8rjHtk462wftxa8Lu0spufN5evQ8KETP3GCtucl0RJO/VZn9nlwXWJMBJl+A= 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 DB7PR04MB4492.eurprd04.prod.outlook.com (2603:10a6:5:39::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 07:46:22 +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.3763.014; Tue, 19 Jan 2021 07:46:22 +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, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.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 V8 08/10] remoteproc: imx_rproc: support i.MX8MQ/M Date: Tue, 19 Jan 2021 15:35:09 +0800 Message-Id: <1611041711-15902-9-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> References: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) 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 SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 07:46:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: aaf0da8f-8980-4608-7778-08d8bc4e50d9 X-MS-TrafficTypeDiagnostic: DB7PR04MB4492: 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: D0AK0rM1wJon6rbfRA4cjwnFozCNaQZKqIImvrDAhWxQkzxztvHBOzM17fLdl55s0IRIIHpOJ5KPnHwgUt8xrtWK1sSKGa55vytdOnBnT+pah0ULdjcPom9/kFWbKMQGgOLlIUWD4M3h3JbmmJuRSY38v9MdLYpjUUTw4VSunJID6mAD+8sCENYvF+YhgKU3nYNAsvE5xMwIs20LkqD2+1mxuI4i7Ivf//TZ9PlrKNp6qAqAJI8I2WhMMheVm9wnQ65Gx9kj7gqsZKs2eK5ifUPESqNAzWfdFdjgY3kL7qFA1onguvzkkArDF+O5vcCMV8pPUZs3lgdeJXmgPh/gehxceQDk2PO09YfPWyCphMgJ2FunjIax0SqkV5KIIx6iT+uHrTA+7xCA/J0SEm1rQYUVg4G9HnP2mDhglBJRfYBPSpR72lY2iS1hqq68l3yM 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)(5660300002)(2906002)(66476007)(26005)(69590400011)(4326008)(6666004)(66946007)(186003)(6486002)(6512007)(2616005)(86362001)(36756003)(52116002)(8676002)(6506007)(498600001)(7416002)(9686003)(16526019)(8936002)(66556008)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: qLqD2somTiNDDWc6DfjQGtrmIs1iJlekrrXEUpUDB0hNe1SyKBA25G9FRdUs50t8HTtYxEkRXk9Cc3BneyjYWDlrjQG9o7Gs/jBJiLczIINmlDCTR8Q/DYDhuy4d1fAaupwjXubSXfJuUmD/YaWK9+gsOPDjWE01zlPZGUrHGxs0jP/KhOW6zXa6o30PT06uor1CbiEiLmTwgmkC+TVn+xnf1qAKa/ZzhHNNTUEXPzN5PxzzKob8h4eQqccrzIdeielsczD7dUOSUAKJFydpyVkDU0sXmvvs3Vm1jOnj/GiOPvhFEimDqC0mWXOko2axmhKZJ1gilTta4sJnzXdVV1EwpfUqBqPQu4/UXzGLpqooTH9hIgpyJi7XYTs1vUeFQAaDH+TcCOfpd2K0pv6UmyDiIn1GFrw9L7ulJ4e03s+7ZXH+rngRDKMCMebgRhtmUCfVPcQri1NLNeLBLKYlAcYpl8Rk8oPKKqEUvsIgFa9Rzle5uFv4nktk5YmjBcvBtMbGt2YVpbJWaT/CVixPGtg2Bgooqc7o3tOVQnJVz9csBYZDt0TJYvW7IlgogtxwpqF4gsMjq3NnIVfQZoyqFhpYQUMJyGJRRT/xKGTbeSe63yHZyuqcoOqnfiuw0GqB1G/Uw9QrrF2bYFmlLJY1/B/7VLMva+1eDtfV/tzC6AXcGcksPCQiJPw9NZNDzQim39vnzbln6Dncz5qTfSq7bJGCaV/hL3hijY/nsVIV3/W8ZLWt0wgAV6b+xe/yPkvSnO6pwEXUiwDcdYcsxR3NFuwCj62S2O7TTNg5BQAAgxyrMavF0YkH/GcWgMScaonY6OU2KE10aPtUBW2KrIgOgqz58OAkyaQF7ip0/yDsuFdOgEDlmHpKYYFh5MOMdO4xQz25CK+zPvNZXLjSMGZ7sUcO+YPT+4bn9ofHuxSF6IAzu4GR9mydkYxPmNCXsXB6lx2f4DGrCarfHnjXLmd+0b83uPd4L9v2lE1xmDc0+lfZi+fgVe0/SEqD1WNNsTzx X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: aaf0da8f-8980-4608-7778-08d8bc4e50d9 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 07:46:22.4924 (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: s7UykOXFeu5kweVdanrX5hw5d7yUqJALtapOQFKJMvVvopqJOYLenIfg3tEB1+Poi61JulhJkzTAxT6Bcn533g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4492 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 Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) -- 2.28.0 diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 5ae1f5209548..fa01e64cc791 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);