From patchwork Mon Jan 18 12:19:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12027127 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=ham 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 6B76BC433DB for ; Mon, 18 Jan 2021 12:32:49 +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 306B6221F8 for ; Mon, 18 Jan 2021 12:32:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 306B6221F8 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=u9jSdJ3zPj+Vmi4eauVS7bUga+/wJRRaV1Xshjid5dE=; b=pavT3jo+J1IgeUqmPExcUMLCI zL+4PIkQ+eGDbvpxzlWMtaZYuO6omyOjAbs9OGWUBwJrjVUoEVQKWw4bsN0F9z60Giebj+lEGf3eS 4ENhFQT+8jQofk6qOBzxeeDtiF/UieM8pZsHgAkTWaXpTF8cUBijnN4k5j3bVfrYHsovDfnWWDObC LRiUPrvv1OR5UTFKzxmfs/EAa5nf+k5eSvywNQgRlRvrXTnkpRS0eUObX4gSa9AEoNZnbJRQ6uqWl t7IK7eIycKJaQrTo2wDNv38LoTjQroLKRh4x2YnDyO/iDfmQTagpHNegC1CdPm4NtvZEVu6CpigK2 l5uv8nKeQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Tgx-0003Ik-NK; Mon, 18 Jan 2021 12:31:32 +0000 Received: from mail-eopbgr80053.outbound.protection.outlook.com ([40.107.8.53] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Tgj-0003C7-Qn for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2021 12:31:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GQW3IkJku0RMVwxfRA2bXY2kFQt0Q6fOPlGwXeBsr1cTCCQ64AzgjO6kj11/ta+3exRK79JBharXaBxN4nQ/PIGFE3SukeLK4mjbAVCtVpiY4DLr6vujxe4gCnQBG23fbbpcEpm9NG5rK65N5wDw+ETnfI0v4x3tD5+v9fe828NqLE2xr2aREatPXAmV5uG2uY7ELsvXQB+zkzhpP7P+zgiNg2LIx87ETcFizcQrIXXBC4dEkzzcrbOt5TYqYmjfznZmRAUHpIny13zmDhDrksU0hH3T6SGCgThE1Ux3CDDpOOGgZ+NJO/8z2Gmtq+WGbmEYbmhPY5WwAx/YGHGJCQ== 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=KcJDy8b3AIr18x5H2dX2pMh2o5yDXrrnn5igp4tr/snCRGpZND6ZidLUgWpocG/r0fdGPVrpteKbvuQb0sVPas0B+uuriPthDr1QBWo1PVgHHR8LpFyI7eu4XnwGB8ubdLzPOG9t+q4mu+xRYLfMkMBgH34hMExdF64lNCgB5TFCAsn5Zf7Zzpsc6qcdYjTmJbBkdyikuylZRQg/kh3y68+5/fUrFJDQpDub7Qfn+xAF81Sr6SCLQz4kUC0PraC+cl55ojZ3IoYzlLrhQFlTa4/fLPlA4Vlx/BJ5Rz6hhxSwSI20r3uqowASF97xhmjPoDTEcIJpP6MZNp1fb7kc3Q== 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=bAmSMIuAK8QTBFFAezekG4U+Fi/cpZ/sKktW26SQAR1iGqb7kPepg+lFsAQQWzmnPapU6BerzRQ7HwyIxvE0RiJioSc3y1p7qkdM6vUy/oDll8s4wEQ3OC90ERsLg+lT6X80pRh9fXLTqQqvxSHKqRU+FPAe4QO9LaLy8NYWJRc= 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 DB7PR04MB5243.eurprd04.prod.outlook.com (2603:10a6:10:17::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Mon, 18 Jan 2021 12:31:13 +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; Mon, 18 Jan 2021 12:31:13 +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 Subject: [PATCH V7 08/10] remoteproc: imx_rproc: support i.MX8MQ/M Date: Mon, 18 Jan 2021 20:19:57 +0800 Message-Id: <1610972399-28286-9-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> References: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) 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 SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.6 via Frontend Transport; Mon, 18 Jan 2021 12:31:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2d0de694-cf4b-41c4-bf8a-08d8bbacf120 X-MS-TrafficTypeDiagnostic: DB7PR04MB5243: 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: wQFF2cZnFERlnqJJNTx0W+NuPlIS+y3R/OKGioCHfwav4uYhX/cBWPuJ3awtr9IXBVNM/0lIxUpDLOdlWf/owW/VRIRZj0NYLC17dK7VTmf+/iAnRSnFlLD+cmK1+73wL2wJ4fM85EFmRZjmphyEMTM2BchdtgNnbPVR9EaZtCrW2+z7ShG5cJSLSj99bFSQx9gFMXPoMVGTGElZ7AzYGXMHnk+0HoOQWPmTSrZF4VE5XC7vVdhFIoPT55xbk/syFmW6rW9BdQipni1nD9aPjgpdfUW49UL44MZ10LHlK4pWgrzcF9TKpAAN8I9EqHTG8ymwHs677nBhgQCUy6gi6IY3rSF7vh1YLkzPa+L763XyGq7jrE7BzEXpq2cvOQAEQjqFfCEWol+WyMS3ioZGPVfG0SyFHJRVxu7nGN3F/ME5dLLobLPr843I4M+y5Yis 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)(136003)(366004)(346002)(396003)(39860400002)(376002)(478600001)(6506007)(316002)(6512007)(9686003)(36756003)(6486002)(66946007)(66476007)(2906002)(2616005)(956004)(26005)(7416002)(186003)(52116002)(16526019)(86362001)(5660300002)(8936002)(4326008)(8676002)(69590400011)(66556008)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: aYu6xW5Ec/ASkaVBUgjHfoBrY+zKhyfgCz57dH/vQ18zJ19cougfvXoD6SNvZQ2PLqFyCebSpqbGn/TPMOCX88iJt/IRG7mPUtgH+QPhfm1KAij4z8cwpn1kM6KzUc+NlHERlH14B3LHb12S63Z7pyRIuIOlxOI+gmx/xuL21MReBjx5ibXpZSmAoezzdyMs+70Wm15dT+PqSlolTcPYA/8H+jbXzpTUEz5Hr5sRkpjUzDnl/1j31Dr+851VRdJ1Hei3Q0O5r79ovz9K5d5iN1svY46D1LVAKqqAz6O1ymZmtDPBfEahaGx8xb9ow3hmPmyZkEOp9NJO2CU1MOxXJuFv/tgP3RF1VIyfdBAm5YSjQlkLTEwFFNneEmvHDaq0J06x6ZvtBEdpbHsrc62Bd2OHJtPWFzyjkK+LLA2tbfhMyqGwJHpjTVMMrQlVGTFjjaBfR/Wq/kK+DqyI6lFRdGC1DPQ3n0c6a6G9N82ILvwu1BqHLLdWImKcVj8xF9Efp1w0W37wuFTfxWVm2gxJOw6Kvq92E/sdFIduPVVVaKy2x0aVAcYRmG6Xxzni70DJoVZcd0la7rjmUwe0ojrrfWNmHl5VpsbDIXvqiKlzXTuttD/6FMbgATEmqcqvLz4ED6O0Ll3kFbKCXdkLM5WtQA2nAwR1dPho4B89o1AzR/5yPblMiZb9dSY87Iyar2aqEYs4Fdgcg9YVBXEe35o9mTjRRQDZ9IJMfC9+azy8Ux6+6zzrib7m9OKEmsivAXaZIarRS7IrIggXPvpPdeBwm3k4YOIJ37clLzylU8N6sr3n5+8L4Pt5FF/Dpz60Iaq/tYm2hD/0+MBBLeZmrupa0qxXQXbrRpf7mlowDQk55HEZdIuRGdtvkriJTb0NAGo0cwL+6XS1feEO4wiUbxSgKA6x8B/CkWoIXaMfKtKXLyGRiw8Z5rVCmb8MJBGdllzK7nz17mr2EBz979tVaUV0ViXJpr8ohBsa71rlz80mhyTOCq345toDAlGxwKfbZAdO X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d0de694-cf4b-41c4-bf8a-08d8bbacf120 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2021 12:31:12.9378 (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: jc7SyvkLMrgBg1KRWXVH6oxc3XrLXkoFPXiCxtuXm312bm0RnvQ5NDaZ5IMR+vXsM6bcyj7owmKQrG6lZ/DLyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5243 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_073117_929322_E62C556C X-CRM114-Status: GOOD ( 13.32 ) 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 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);