From patchwork Fri Oct 14 03:10:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 2475 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp590463wrs; Thu, 13 Oct 2022 20:11:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7LTBpkRbQTB+z2zGAOA8qJp00OuSUTZs1QcVp5x/Qd6nq4hsI02woo+ONwGTrP8EdwQtAO X-Received: by 2002:a63:1349:0:b0:44b:2240:b311 with SMTP id 9-20020a631349000000b0044b2240b311mr2649158pgt.405.1665717086490; Thu, 13 Oct 2022 20:11:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665717086; cv=pass; d=google.com; s=arc-20160816; b=lDbXEYzXXfoT2uXR8XMFfH7HyEftZyRCAWXFpSPlPOIO1Eo6Rz4hv1DFUyHHfld/+W 4VX1rY5YOXi0Ochy0A8apy2VDKunuJdYJGj603f1/juk7cDWXN9a6peQ9y5RbU3TUspF +oGIzQgejohhtkXVdtNRHQYaFmBGbX6j492YyjGwV3EDjR+Rbmcsp0ZRwKUfXs4/8U83 8p+QXdJg8g9Ph/uXrffIsHEYYhJflkQ/oHw8Wst6o04H59pvwXBhO667B33K3hNJmtvu TAD0HrS6B/OD2spH56gGXFOWjrVDINZZs4kYu4/KW5bPrHHXVwhDmI7LQNnZTstAlJDQ qxvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=05Sxwp2qiuQnWOyN46jehy6hs5jPcBhHTOijKpW514o=; b=U1YVN2VvQ02zXcxj9AdqnB2hvzZqWlM9NZFQcIjIw7o89aicKEVTdda2DPdoH7yi7M UPvhYc2RpjeyuntrV/3xkGF9jsNKtVcQ/aLreYseZ6sfGnprb/xmOEreHHnfyg/UEW2C K8ns+ELZswtn4UN3tD0Bys4O34jgPTNRX3gU9YUCE0oAZ2noFXe5RjZnv0j+1srMvocZ vzzl5rSKsQhFwA9ZCIC/ksHELjPOJMFCoLz5Pg4NLkTdjz/1UHlsKEW3NjJUko3hkub7 qpNgXdm1nRfWZEjLniMWKhn1yf3y+k0UuT6aAmQttF9rVzbKTyTquGXrQfoBzQb7R0UK UY7Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=EtCGvfti; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a056a0014c400b005409634a162si1220352pfu.317.2022.10.13.20.11.11; Thu, 13 Oct 2022 20:11:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=EtCGvfti; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229955AbiJNDKg (ORCPT + 99 others); Thu, 13 Oct 2022 23:10:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbiJNDJ7 (ORCPT ); Thu, 13 Oct 2022 23:09:59 -0400 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2042.outbound.protection.outlook.com [40.107.247.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F39E17652E; Thu, 13 Oct 2022 20:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OT3YM/ax1P6IOJu+DXJcs0nNA7OE968raUg5qWhwZIbqGy0LcTUtj1JlHJt59HHsrMdkfpFaoBl+wLmXE7JKUYJuVtKdVwsNoTtt8gwBf0E36CiFKEzj2BpnyZkFBIfI3ft/AvO8JoHXpUOP9TOFtEwptzJvy3VCqPspDaKtAaWS0eA4atMW60OwT6AqeMC2Zw/AJ6unOs0Fy3l+U6nVV16m0aHswdHSJELbHiVQ4ze8Ik52oYYQUf9ZPZRy+lA6fRmZ+f6+uX6uuENm2jpnNNBlyTIjPME+9YBFJqrfuUAJu391A2lpuw3uYaz5yA7AnU0BvyiPUROQrBYE8VpL3g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=05Sxwp2qiuQnWOyN46jehy6hs5jPcBhHTOijKpW514o=; b=hy9RusiQBl/Vj+NuOCyfynm8igJ1LUNsCfqhql7FHti7BobikgC28dnKvS2YDxPzKTNo8Ifu+3u5K5SpF23xt/QMIHhos6jUoD4zWv3EbFW4hMYWLMj4RpJuuOJb9QnfOHfJ5yt7RATp7DDR+3eBNivD5E0SGrJBofikT4sQmhmGRsVLs6VKFGV3NPHIiOMLAUzv5CmyTOXPyr/dCyEah2wYAX20zvBMqL36FnTp9cTHq4tLdnTHjPh0nL8zdjqNB3g9pf3FcgIaMlkyugHvsGA1ctvncLEH/JL3/7p/kO9NbGHHZYa/XZGOdpn7H8sAxBT06ZWCKUQMXhPIKhEHcw== 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=05Sxwp2qiuQnWOyN46jehy6hs5jPcBhHTOijKpW514o=; b=EtCGvftib2VO5t1niZ7XzHWFqiw3CVKvJ6AvP4ciplUtHIxOS6s+2YvCGMgljheMgYL68ZUnZSZNcnofz5/HoULTxLvEeZptJFIiqpmY2s7fxsOtVKThgUzrSmsiCPkSgvwAlZNYTagLwdYkqlxFcJN0o4fmh7EQcHrfp/UeY9o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by DB8PR04MB6956.eurprd04.prod.outlook.com (2603:10a6:10:11b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Fri, 14 Oct 2022 03:09:13 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a%4]) with mapi id 15.20.5676.028; Fri, 14 Oct 2022 03:09:13 +0000 From: "Peng Fan (OSS)" To: andersson@kernel.org, mathieu.poirier@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan , Rob Herring Subject: [PATCH V7 1/7] dt-bindings: remoteproc: imx_rproc: support i.MX8QXP Date: Fri, 14 Oct 2022 11:10:31 +0800 Message-Id: <20221014031037.1070424-2-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221014031037.1070424-1-peng.fan@oss.nxp.com> References: <20221014031037.1070424-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI1PR02CA0010.apcprd02.prod.outlook.com (2603:1096:4:1f7::17) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|DB8PR04MB6956:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a02e14f-f6cf-4d36-d640-08daad91789c X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qzzwRkajCQDoggUYSEzSYSp9an5e5XiM4WAA2v22ZIZJ/WUWLE2vrxIYlL2hca3VyI0iuH0Em+PzuSwSJCLbUVtsa3sqrsTWCOOrisPdibRh3amSvSHh0fFWQnFcRzfq2ekrhMTlN78fdgg7VA8TFCfvCr03LcAuZ4yEEttXjaLRCs1aAVhRaox+4C88D3kZV5iD8LhcCd6WZ0znWEFzgDXYq5kAwqsCGbH2HafiCtG248VjPS6HnA1e1Hyfno1b08bwqOkUTfVDNAFSqpERjop8K/hat2FPDuvIpCnSAo3RmnsqNGRO1gQ6tZYa6OlHf366In3spyRM73kY0tj3pljjKt/HsyY2U1vFsCJFGXqmW6QPRh2LRxS4ZJa6CrE8+2majeSdfsXgRnDtm6Z64Jef13gvr3gzeub1vHpFD4tR7kkvNWsbdDXVWurZq7Pe9++0RLmGKGodEX94GQklITHiSNxHrHH11RN6yLg+P14X7FkEJA479YKHa6ey6qZCzJwQPsrcaEqKHioomXaT9PV94xN+vEmBwNyGBuI9iwcOBE9vMa2xQwu0HXpfa6OxnKtPExyNcNyIT82CyYSGrb0qoMrJoDEuu3PU9S9stgLEGCeOdm/OBqCxsofCMkRMDP9NTa2c3/eVpL/Jw/ZPNCc24WatV6XJIn4VlZHI8hDHUZ334mhfXcSrbeuxD7+xiU0XjL2lN1DpA57UKyb9pHsK4CUoc2YOkmbFscBka9WFSnY2vYsQMS2lj9H44ureUuXziTIlpEcCsSEDaDYjKg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(39860400002)(376002)(396003)(451199015)(2616005)(26005)(6512007)(52116002)(186003)(66946007)(316002)(2906002)(66556008)(54906003)(41300700001)(66476007)(1076003)(4326008)(8936002)(86362001)(8676002)(6666004)(38100700002)(38350700002)(6506007)(7416002)(478600001)(5660300002)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uc+8Zdy35yK6XIhtSe6HsAkZBmmFFZPdSwdx8CMaOlHJPbwNCNUQXwy4qCle6xozV5k8mY9lG83mdrONA7+jHi0LOB/JaCsEkA7SX18yUeL4Dzao3q3NSH3AN9/7z92Xe/EH8r0qBoblcpRg3bQCjHHOTlDqt8nc56XawdNgzNmDyd7X0gXpOD/FAUWNMdfI1KJmgxgTyNkCKJbKO4v80IjaTPpW+Dm9Jwg8P82VaBEtsMWKpdtNFMIrDMoY6ZLYC1cl/KOv525vuSwQFLbOKHuvF2vXtRY4x2hdiO4lzHuf4tJAlfJzjIGWgW+lXNBbop6rd8Qg6LIi1e6sJVCkHtW6kbvKcM3bLR9KGgen4iwsGKYe71zgWHelBFyNf7EH5Amfu2eLsBDD9VK/Bpj0ImWiqV9ir3EUsGbk2+ayZQq9C//3ZtdYNkDnVlCsHpB6/lhOwvEgCIg7+4AHNg8ajonArGBhac9QUIhNlwAGYKEUUnY26tu3sQmEhW9LWih0CAmvoL9Na/QD///6ejh9MJGz9PukFDa1ddNgiQ6mTI2nHfaK8XrHhC4gUWut0+NIZ+jEfyfhg7eSZedDrMWTTt0434XLvvSkMmMtIx5uZC3OOjxoTce4gzbteixFR5bUDwnueOEjBXq5MZ/ovVzMrUuBPYJV+Odzob9OP+vTzuxcqaD5VbvphMGpesyyzOSSiyeB1dlkLIq62/hnAbZsjKZlwuiwcilNyOCi3XY6grwaCZJ1HqmtFlZs6BclXkofBOQUh19DAePd4ckV338Zjr3WiA1caVULzQTd9gULF+00EQGi9aose78Pj4Z+RwgUUWOmvWrWfQIjL22ZygleDuTK8ZKh/ZerL5G9z3dPYZt+UXYqlEdeeHVmowTJhTqsnSQQnidCRrcXJi9b1wzeyAuSRCjuDtXJYMDN5R9lxdDaXJY8MeTHcmUS5303kIgPopAO0k2sKhKY77rGxJBPWBd7EBEWqwSeCsxebx/X7+pee8melg1ZprqMDarEdeSTxcayn4kotwU1kwSxEJg4QrB+R+/gPdkntbFi0KN7KU8+6rA+zNXAZRduL9g3xD4jozyBcFAfluKTF46Uw/xAnMVIHaE9vNyxYRbEo9frHDKKPWZk9XKGGi8MWhZXzRCprPc34t5HzICjrV5LhefLKyP0OdieUJEQ+f5QWgURqs8wH5md39JTJ8MU0miXFgQM7i71p7ijYmwi89UCpG7Y4/5cxV+5JVwZ0j/8cFhe4ei0dJbD6l8kcbU31Q/pgmm++zn0DNj5J/S+F+p7jFgPC9cwSgzn2YXJ6vDtsJKAfiYIce/BcuXczlFvo9h2Qe/Us8/T0iyQTEZaAIwnHEUW25xRxoQGJB/9rZJUivOTRarsRFfDP0XTOq9CYxH98qOTArcURe/IZvlJuoFN4zQeN0u+CjyI40lfx2R2aViC13NX+NOGoVxMhsxZWa1+TSmPik8TjN9CsEVIZyfY1C35bj4UKDrlzAukpV587bpYgeL55C5CkZQ2E0w7ZJ7Kh2xM4S3ez31qXMXvE1MnusRioJQXaPzo8mCUhKa8DcLQLAXdSEpzdbMauukpVzXnnO56 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a02e14f-f6cf-4d36-d640-08daad91789c X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2022 03:09:13.4567 (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: kaZ6ILUWcSi0nB7xWONFAB0WPO9CRfdl4Jbnjod1OTjfGzoJVrFWgASO2grKR8eZTOUCwbLDQdmrbF1dEqs73w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6956 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746630959581532550?= X-GMAIL-MSGID: =?utf-8?q?1746630959581532550?= From: Peng Fan Add i.MX8QXP compatible Add a new property fsl,resource-id for SoC which supports SCFW. This property is used to check whether remote process is under control of Linux or not. Add fsl,entry-address to specify the entry address which used by SCFW to kick M4. To i.MX8QM/QXP, when M4 is in the same hardware partition with Cortex-A cores, need power up M4 through SCFW, then M4 could start. So introduce power-domains property Reviewed-by: Rob Herring Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml index 3a1f59ad79e2..70322e57b6ff 100644 --- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -22,6 +22,7 @@ properties: - fsl,imx8mn-cm7 - fsl,imx8mp-cm7 - fsl,imx8mq-cm4 + - fsl,imx8qxp-cm4 - fsl,imx8ulp-cm33 - fsl,imx93-cm33 @@ -54,12 +55,26 @@ properties: minItems: 1 maxItems: 32 + power-domains: + maxItems: 8 + fsl,auto-boot: $ref: /schemas/types.yaml#/definitions/flag description: Indicate whether need to load the default firmware and start the remote processor automatically. + fsl,entry-address: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Specify CPU entry address for SCU enabled processor. + + fsl,resource-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This property is to specify the resource id of the remote processor in SoC + which supports SCFW + required: - compatible From patchwork Fri Oct 14 03:10:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 2476 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp590472wrs; Thu, 13 Oct 2022 20:11:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM50yXKKvcojcUmKNKVip1nqgOrH7udE48nGlN7mbQEU8m5scEvciAcXsK5x8h1ofHH+SAck X-Received: by 2002:a05:6a00:b84:b0:565:caea:38bc with SMTP id g4-20020a056a000b8400b00565caea38bcmr2831332pfj.80.1665717088877; Thu, 13 Oct 2022 20:11:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665717088; cv=pass; d=google.com; s=arc-20160816; b=gkFsbRav6FjhI7R0TdJAG7SGdiPLe/fg552TH0a4WGKRFE/clAaKMNU4COElgaWldt LVlZaXiS+WqLvd6EADbKzK58hicjNldeWAvbOX5FVu/BSJrLk+Rr6JHZpL2CMjNJvI9i riBUdWt8atY0IfWqsUDf38kYXaiZvxIpswybOGOBTVnEejVwPqRr+akV669p5eG6dUXG sRrUhn4pdyxQuu1k/zsoqTc7tOjBDZV2aCwTyH8b/B/YkqLHLROZ3Ew5yIzxkVYFemhp Ig3mJ5cEgBnf+cVv6Ib5VF9HYUmbtpPMRfIwv5/zKfT+omxpne+yjotkSYv51jxVy4hO weew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YYRBLRGVmW0aYEp0yM/gTOlzfxHZDMvloKUpivAqNLM=; b=U6CeNadtJx7PLO94NrHBnaapip/Nxtdfkqh7LgpcSD9d3S8xxCY9Oi28WiyqDJEAlw 6qwBmDWXxoA9PCDAhmoraeoIWqV+lB0m2Q9aEhZR0+o0i+4TYe7E2nGMCe29XqWYS0mr mNyZ11pJErTwgcR5K04BIb7Jp/5SvwxgJEV7v2t+QTm/urs2UefvJyDXJug29Ztn4xIe butYMbb5sUzddfL8HyBOSY/OxfzFjEQIubaxU9740Jj2rlBfMV6hVvgXC6IG3wXDYAPl +fJtX9BCrX+5WINBIrVIOQIzQFZkrg42wSMa91Teu2yr3QBZmAII/eOkgADpxmkIAzVq SWRw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=bbpzJ4Gx; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g16-20020a056a0023d000b0052da2ea956csi1319293pfc.371.2022.10.13.20.11.15; Thu, 13 Oct 2022 20:11:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=bbpzJ4Gx; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229511AbiJNDKr (ORCPT + 99 others); Thu, 13 Oct 2022 23:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbiJNDKD (ORCPT ); Thu, 13 Oct 2022 23:10:03 -0400 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2042.outbound.protection.outlook.com [40.107.247.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 876FDEF585; Thu, 13 Oct 2022 20:09:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YB50MSyT0i+30CNKxcP8MVHmQz9gvHA2MyfiIVpsxZOQa/Iaqqas3iK5EQTXCUNPRa5PDB+q1IiwyJttrYZaMsYKfb2M5ygTjHpnjj/0csp9uoPI7epsBvSKN/GHTaImvHKj+JzXmlQOQ1Bn/VEmS0I8pRAGqDEXaIKpiwPLFt7om3kiPHqCCYXJliqvkDcsAbZ09TElGik98ts53GVoElT3h9VzqL8KYbV2nNUcxAvvlh5YHSSN+F+Yq3ecM4Q9ySP2kYo5VloaC2zN5IIbkuWRQEtYorrM1yO7nTEf4yYkNobk96laLGRIMcvh4g64ycoekQAyv0ryuiSXbjo9pQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YYRBLRGVmW0aYEp0yM/gTOlzfxHZDMvloKUpivAqNLM=; b=YA8Np9mciBOA30wMFaFIpGcIX30KDDEnYfO7Q0WpJXMj2ibhGemgu0TCX2cQkG2uS97fYonIkqVuTjGvEpWfCW+qxdXxcJT7ITeVyb3JptzqPWo4AX3v+NxPF7SCMcaO0JYDI5tmnMksstTzU/2YoT4AiPGxc1+3H7rREg6LV6//RiOeH276Sr44lEgwFs6+jjCihcYqJ6VoMkld+OCCkKYNpTlGCpwtWz004w1SO+sahb6fXQ5/r07L1edi8UJ8asLVXxAvS5O2r9EJ9lRVKsGMtGirdeuzfE/w1oq+K8ZVXZVqYWU2uyQP42atbkvaK8zZPpABdOWgCsg8Medurw== 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=YYRBLRGVmW0aYEp0yM/gTOlzfxHZDMvloKUpivAqNLM=; b=bbpzJ4GxGv4srGogXdJ7CiXHvVGkz5DBAmQZBxDUUOicdKZTL64IbhQSXQ7H1903nBs5MrehY2JlNZ1jKjLanDUeAHbBkfrFurtcL2uVPzLl6myQWUSiO2Ekk7d2CVkBtrZQ25j1Xn3q655aFenwunS/da3hjUWwZURVfh6uJb0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by DB8PR04MB6956.eurprd04.prod.outlook.com (2603:10a6:10:11b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Fri, 14 Oct 2022 03:09:18 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a%4]) with mapi id 15.20.5676.028; Fri, 14 Oct 2022 03:09:18 +0000 From: "Peng Fan (OSS)" To: andersson@kernel.org, mathieu.poirier@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan , Rob Herring Subject: [PATCH V7 2/7] dt-bindings: remoteproc: imx_rproc: support i.MX8QM Date: Fri, 14 Oct 2022 11:10:32 +0800 Message-Id: <20221014031037.1070424-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221014031037.1070424-1-peng.fan@oss.nxp.com> References: <20221014031037.1070424-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI1PR02CA0010.apcprd02.prod.outlook.com (2603:1096:4:1f7::17) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|DB8PR04MB6956:EE_ X-MS-Office365-Filtering-Correlation-Id: 7fac485c-3d80-42af-0989-08daad917b4e X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q9flF/KG2jOhAO4WLPWUoCkcHBaBJaQYxApzxtVp1KuiAuTPXuvY3ko7EOICCGgB4j7L429VVBSm5KuPUbT3c7j/Nz00RMyCSMd0GpVWKkHK/AYDiBEm5A5pwM6f1gaJ1+uON6KjwCbbKB6DTn1ZGooIflesn2nmdgxIv1f6kVVL7AKvTMdpdMK0hUPu9IiW82gT/4vHnuXUxnlCiMaueQO71XgUsA/7p27GGT60KwJ253SjHNpImUSxlt6aEJ42+CAONBlrXhe5aH+3byQMaJeuKi1DlMj+1RxRpWYrnzhKOHkFEed9AJ6tq+yXIzaORDal/QDqwnjo5qEVBsy0yU925sHqYr52OTYqPntR8C9KG1w2GMaQWf400b+ovW0RDGdXvhDhb+xwkqUNjTIytTXGnXSFhSVpBUOR1qa48PJJKm3KuC7n4Y5Ff+ayC0psCH6kJdNPEg5H/8WXdKjF1RkbOhoeQTQ7I+eM12tXJqOyliF1M27AnsqtElpxx7iGo77ft5SugAi2wzg5kkoGWfTwGbp61ppJkq4oynsK2LFLUEguZqPd5o9HjnUJI72wRiOezVjIUr4XcB4BZmR8KxmiOpu2bAj7OgrJ3jnfVNgqGDezX4NMrVhjiGExuFxStgYob1tSbgCi9y6VyPVLZI412DFJGGLLeWnN2FlXH5uVBlg3G5i/p9pGtI+DuFxoFLGfCakOh6rgjAD6IeCA85E4IJV5yayw5BxLpmVxiY8G7fFszgLI44Kg8meYn3qg+kslqm0AWSYENciWAgSRwQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(39860400002)(376002)(396003)(451199015)(2616005)(26005)(6512007)(52116002)(186003)(66946007)(316002)(2906002)(66556008)(54906003)(41300700001)(66476007)(1076003)(4326008)(8936002)(86362001)(8676002)(6666004)(38100700002)(38350700002)(6506007)(7416002)(478600001)(5660300002)(6486002)(4744005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uCBEGri4AV5gFXGqBGy2zMDOK3GrggV9c8jtBX7vgHkP+buARSM5KEJ8nFjNOCtDoN4vCw1YQo7ROqButTe8UZTPULRCllq5pyHeBErYmrv/hjGBnvdR6tKVu5oHiRA/bzC4wIRQuBBAX5+CEc7vK/1HxPXMdVEwraDykdN097n67R74fHxtmlQBWJwlsz0xcjCCr8zT9F3HYpFzJQRwJalSEN5afCCA3XioJ7/Sj1ulb9/E1cDPTr6OdNNRTVIFGrbIC2tlrkBd6GvUPonij1rqSYu6GumH+6rCQBaoSCyZBVBEGT3SXooWNlvsMA+MiaoDAU/gSCahxn1t+iAZ6874a9OxSbXAE3lSWcciCf20dfp7xoK033m1P61SKZZzwta1KJcRnxn3F0I/lobzljAVVc8EPUJGWSSp5nRfvO9aa7XysoMUU1Ja6TWkE8qbiuwHsA6XRPqMmZyd5xDKnTdLaeXk3J/27mFV1Acqf2XHtppwQ3cNFeBAKvcyD3r64E8DgGNgW65pD5cDjG3FAyj7R2GF4XXmEZhWKk25GD2uEMQecZtoO4VWWFlznFTAhDpQXPcIzYe7nHtkYGyzjNgW7Cy9MHDTPtavfbdJbTWnuRhQdcuTDbyDF3S+NMrN3dxmDQ5sHGu2DQbWIlbZWQsXzei3Way8+J7mk0njg5GvOgbcvSsLNfm27lQl4UyJGgk2McNjov332wyXVhQELEEgVuko0Q22x8x09qvs1tn/7DeGo+M7cwItwSR0up/0fn4RV5in2GEswDLwgUxEE3hzs5YBfkoXBZho7zEuzbPEMKlpEohAjKX/8cEb6vk79MZXmwdsVHI/UirxDCQMaGwddKRsIXrPqJ6vopAUY2qJ4XzXSK4y8xhPyhTrNrfrpp/asCOwVvm2kcvE91DSLjRlmpkff+Mbic59e6HBDvQdt7cWg0Imb0QL9zMOS5WaqDQ3AW8p6p1uJSu2ZlFF79WTsSRpbwTp/PwL9lxfRCTn3aWLZHEkLn4FWs05/AAKla903yc54HUWvMczzA6R84DO8lerIbUx/pO8djgNd3zW++N9WJRFi2CyAjTCPeKmn1V4oCGYHcRDALfNGsRBDvtC+Im+D+UkuvLeq6WVeiKAY+if16DyM9d/F7aYZfUziqpQfv4bAenVW6cgO7W/yvx1MGPm8pAICxXywq5yCC2DwfIV/BjsDoSOlfFfx+TcPpv/bl03kTx4giWRaCRJCgkZbnUSk3FhDIGnu1COK+d2D7hyu3PhcN5NsYmU0xcIVWZX/pPrEtmJmHMOHv4rvIKaOthjxq7S+Dtx1Cq8LG9MdJS77T+K78q4dx1fqkTDes3mUjYRTKM3MAO3Xyk7dg22JstWe0csZea7rPzmu51iifgljGF9lTSE7uCpzz56APABlQBq9x74jARTgnu5MvbJpXGHJqUbzS/6wEmq1smf9oDUfaMJ98xY2kakdurk/d4+hGJMkuNx0RjXVX8AjWlYruzcS4I7LqL/IQMEn2I3cSqsyydrmmbw+Kj5HPnA4E4+zXln0zGt0MomRBrt9kDZMl2132DOsnC6yef2UMvWxGVgg+2dyQffleYOZs1U X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7fac485c-3d80-42af-0989-08daad917b4e X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2022 03:09:18.0045 (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: L88eVMLYfGTGgvFJx7el4Wx46U+LieKz1RtGEuCM06BpyT1UbVoLD8ykl4rgfjaBWyLhapmAHwp0GksPQZ30xg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6956 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746630962137234384?= X-GMAIL-MSGID: =?utf-8?q?1746630962137234384?= From: Peng Fan Add i.MX8QM compatible Reviewed-by: Rob Herring Signed-off-by: Peng Fan --- Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml index 70322e57b6ff..64e783234e38 100644 --- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -23,6 +23,7 @@ properties: - fsl,imx8mp-cm7 - fsl,imx8mq-cm4 - fsl,imx8qxp-cm4 + - fsl,imx8qm-cm4 - fsl,imx8ulp-cm33 - fsl,imx93-cm33 From patchwork Fri Oct 14 03:10:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 2479 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp590623wrs; Thu, 13 Oct 2022 20:12:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ggJFYfj7csydrALs4jvm9UPcbP9nyVRQEKS57BgJnMSAlJWTsdFuBClQMMNrRrWXM8BRI X-Received: by 2002:a17:90b:3803:b0:20d:332e:f48d with SMTP id mq3-20020a17090b380300b0020d332ef48dmr14438280pjb.209.1665717125131; Thu, 13 Oct 2022 20:12:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665717125; cv=pass; d=google.com; s=arc-20160816; b=NlpAESgVt7MRnskYxTfmU39dWkzBs5ei55n1JMSMO2kZVRgs4stfZiWl6HZcCKeTfz UU3cWHcQ8WCBoxizKiurQkMQiY/o9GbZR5/J0cPWPYmHWyGFE9EVm3YuqzDahhIFZG7Z 1D88ReAW2/2GaUkX8+JUxd+SOMddONiuCLTiId6RlX1sjz6YiuBJu5NNVAuxay4mUPQS mkypXAWzvWUtpnxO6MNQgnPXMp5hVrNqyV0HUWx3xPEG7qoxi04AgY/nAMBrTi4HnsD3 eMIL128RC7ag0W8Oeg8FNbVFMMB/9FZbFALIzTXgL87FVcDR9CyfQfyuFHe//NGpLl2q 1+Wg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TJfWI1YzYlvXMQs7TPShXS8gSDh/xbrUCZxc6bIVzUA=; b=TR/GOzQLJotlyAkSx/xa98O8haAp5Ogi25bGLTygzhciGGLUpJc4ch2um/NyEZgUt5 j1SYwr8Bmy9PffwH/iAG8ksHkcMgfDf9ZE/kAV4EAamcmFqgqMpCVGoQ/D/tog2S4wFk uC3bEKBW530ntX6DdCk3QCaW5ZTn2La0VcRubcZZz1q2vYSZCF6kFu0n6tSAQ2kLyFX6 iYcg9V3H0sGFuCP+0R8xJbQznrTSzZVr82Fg0ngFDzNlrK958hZ6awERt64YSM1hqYuD E3N3ekVUX2/OIArDCHyociwPtiPsnTzGNAH1BlJLiTmlKXbeGtD9q0oowjmFtW4i6bb+ TA3A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=ID4TAiog; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lp13-20020a17090b4a8d00b00202fd098892si1330507pjb.190.2022.10.13.20.11.24; Thu, 13 Oct 2022 20:12:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=ID4TAiog; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229965AbiJNDKx (ORCPT + 99 others); Thu, 13 Oct 2022 23:10:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229892AbiJNDKF (ORCPT ); Thu, 13 Oct 2022 23:10:05 -0400 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2058.outbound.protection.outlook.com [40.107.247.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DFE0EF59F; Thu, 13 Oct 2022 20:09:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F7kcrmq+yrqo47BJDRIsn0dcauhRB4kYELdQzjEtoNKbgTe8sSobYgUvrPsLloWHo6QfCTMeTYn899iqtaCDvUw01cWIIhR/lBa+E/2QYYxUURTRnWhUQz/gIWGLpztaiLp1eX2rwrZOk0tWGPT+GC1Ca6XA4xxHbSTrjLl/9eU2xlSRogg3IW/7b/qrH7UecdrUaVk3yUajvoxPmYOSLKoQoLsdGIAUxxuwF3eTxpwPGVlQUxBjg6Xzu6wMESWYXAzHBqMWldfvGz+8b9tn2hbOqbKkAWWLUgcHTcaKWB5887xcJNd/9NMAiBaMoiYhgIzPQhoYt17LABB+jLEYyg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TJfWI1YzYlvXMQs7TPShXS8gSDh/xbrUCZxc6bIVzUA=; b=Z7QxJ8/xLwAVFDItdPCCHvwr/hdje+8UOJysNd3cxm4lZV/nqbQTBLbyD5Q3s/aWP/FBmNzC/eTeDjnUWVZXF9FueKbRM/iq0w4T4cC8B0sCHjuisfAIZ0FVl4qZv/TcjBm6qa8YyY7NU0Q0HnJZWCWFTnj621KAuWPLKTx3BpXTLLxjLZTGAlqmp9aDGEABMVMl7Vyl8b927vom/gwc32/4pKO7PI9lrCSSckNPwXOvx4xxlTW0z/9zFuOHemalAvKrcXfssuGSqjURLDYchYB0NNMLWVNTTZzbVji8vbZ3mY+6xqV/xZ+L5KOC5XjliF/NLG2w9zTrVb+SwwT7lA== 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=TJfWI1YzYlvXMQs7TPShXS8gSDh/xbrUCZxc6bIVzUA=; b=ID4TAiogwItMTE7fxm5pGU3uoxvSgnVxbHiiwFpO+lIlDAYMlWFH2mtyIfp43CqCVsla7DuqjymXxiPr5ZKJod1hsVfka/XcZ7H2zPL/bEXbVua9RpZ6rsRldmn8Ae0bI1KijC2+RSLNMGUGveblhcU68shj5tM1b5n9D5Pdod8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by DB8PR04MB6956.eurprd04.prod.outlook.com (2603:10a6:10:11b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Fri, 14 Oct 2022 03:09:22 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a%4]) with mapi id 15.20.5676.028; Fri, 14 Oct 2022 03:09:22 +0000 From: "Peng Fan (OSS)" To: andersson@kernel.org, mathieu.poirier@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Subject: [PATCH V7 3/7] remoteproc: imx_rproc: support attaching to i.MX8QXP M4 Date: Fri, 14 Oct 2022 11:10:33 +0800 Message-Id: <20221014031037.1070424-4-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221014031037.1070424-1-peng.fan@oss.nxp.com> References: <20221014031037.1070424-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI1PR02CA0010.apcprd02.prod.outlook.com (2603:1096:4:1f7::17) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|DB8PR04MB6956:EE_ X-MS-Office365-Filtering-Correlation-Id: 4a41c221-27c0-4a1a-7cd8-08daad917de2 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CqdJ0yUBdekMr7RRtHQbMJun2oSv9hDI9z6a8u5dnLuWz4GtD5oOHsOdTsyYtmUsyRSyLeEw9BPhgBy7/HRpuBMX3KUdrEJZ6Yh8VgqT9iyFqQPvX0p3RQ76qnMLYpFzui3PfQrafI8KLBoL3/01KlxbhJvq2MCKJyHBbGCjHfsGLlccBgRU8M8cVc5nGjtyrVB7r44y852NZCoDrk417/gvhDtIYkJNKr7/2r96tf2p8DzFsMGN15RHz3IcWJmZMRs2U6VXp2kx/h8X5fyFluZUlauUaDCaRuswR6Rei8VIcqFQyzkVBAc1iOKAD5IvBR2G+8DRf31FYOHL8/nN0m51b0Oyxj0NlH5IlCmCSshm/c0CWGcpwkDRVpWtmMZ0HhbIaD6acUK7iHutBSvp5Knaaq8NjZVA89F+oBE10v90fqZRBcPGm9RWnWM/ApHFGHNy3KhXZwNjTP8QyH+r94mQp/VlDUMXSEMlwIcS7l0Sc+wa3h236x+pz+eU+qf0MUXHmzbeaMJ47Tnmqxou60w6fx0sNyF8y1JRX4ZhmPHyijqCJoW++DnH4GF3W9DHOwkxDza155W0wBnS3pJDysNRU9ZKLynmQxxGY0gPNt6Xb0x8AArxM7lo/1oeNMf7HtupRUtdG6FPgVMjLknk3JCK2U5Cvq6AGzMVSUQ3nB9d7jPk5nWTLe3Mwazh1JRD7CrynPfBwW5nrtBJLAFP0tm+oT9e6ERNVPF+rAVAX38MesgTqxWRR5xSatLOHWV2Jq3ajnKmv3yBof6SElHMvw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(39860400002)(376002)(396003)(451199015)(2616005)(26005)(6512007)(52116002)(186003)(66946007)(316002)(2906002)(66556008)(41300700001)(66476007)(1076003)(4326008)(8936002)(86362001)(8676002)(6666004)(38100700002)(38350700002)(6506007)(7416002)(478600001)(5660300002)(6486002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RW76T9jC4WP1+jhG4Yz1+IgWTLWkJcsNeVFlw9QAlkYz1lSaTawo4NfxZPrDGfsAJIRL+EPIBRTJxBPV/aFD/U5PtyikqTi5aeQGptEPIanH61hEnT7jSl5FkOAtiGcaY71nJbbb0TkUSulHIYLLAwQiouYXWwDbAFSKGfuCn0ewDivpvpkIyGOr22nhlsGdwVmGBdC5OPAPJKWrXAGJRvOwvTM2h49MHOyXEiyKM0MzvkwPOdVYgMZ1OqnmOKpYPG4mJRi2g4nvKZU8vH1nlABVrptjTlNS6e881qmlC61jfUIRA9uFUtSK4snwJDpJy17qAxiUR9EWZciSoVrqlnoYm0nz0ioILWc3jqL6dKQxzAjz7ZH4wR6SYPC5/E7NAO4CtgcXPzbYv0xOslfwfffBT4jUp6IBSLL6IrD0qmFaFpLwB1QKmTrRAneDew/Pvj9ggcCgaKlU/BJYqf1a/H3H8N82Xj1LnXExMRXp1aicqaq08OuLjhUSVgp1RPkYpflphl9UZvlBKJ85NTl4mEQEH7tD1lV0Vurr8PdjCvxQYdJjKnZSAgR7IR5u+KCJMxfliVE2jA36bqPS/NlCDFkNx1fmQo2WeMl3opwvJNq4WwV8pCmolHPmFxSc4nm2v8yhAgu1Zhjsjxnm1nFnBZ7Hu1V3gD2ZSfRs0rA7Dcete1PAZF1DnEfBn9y6N5ZMiw4As9ow++JUU7+Q/lUaS6XOPWS6DE7mOaWCZe34gqRLjAnLmcBV3WpI0PjTSoIao1SYmktsINhO7wlYs2dbMgbbQYOP5eVj5Tcj323eNfQUkWUcvgMnHk0ge0hw4VrOLcnXhkigV0vhlkrNErxTjKKMua8+a0Z7KGxvn+ufMuDcpMdffGy8J1BIt5NDsr4+ugb8a0Dt9LToDVzmue9U/K6VTubhB5nwABheTyIT+KcqwcvzqLOPo+iWMQU+ebE261eGQ/rUmgbLFDo6JAe1c4yXd4UrhfgPXOnA1YSexZcJxWBgriZjejqehZBNHv48H7qiLhKeiRh9CMmaVL1WjrWym+MJRfwnoQXZmB8Bw0UrOApHNev7C3TwtvDScjED1gcf1cp31ccZcbMyhpi4YmCij1h/yEdGlDfzD3+42phoOFkSR/oQtFwllTZRMsmXu8zXSWPodtszDCrp/TyDldXgG7/fPd3xsxGwVhj5k5jKy5Hqk6Ck3pr9KKmD5MsTTtVtLG9bhKgHpSDBmHq9dGH9g5nO+0sNRujQhgZ7DE7TRT5dI2j8yz1uHfVyRVg5tgMecHiduTWVOPqVqw5Cdx4Yv2E3sRIfFyfhuH9B3CNxIPzE74LNVdQISR533l7TD/UQ4+qpZO+O/c78HRP80H38uQeLPKi65JrMx3E2fk8ucdtGY7eIX3RYo0ISZ4DezeMIKcNRu7tOiPXzXxXonpRaa4cyAgaq+IetaB3Lx59mf7ie2wpf1DY+SdYrDBztbgh1ufcbmeBNHH62zl+YvNYf3mRRQYcJniZ4TlqhjHw0/+5qWXn13ZxAjaUlZe9+0Ps9TYEyAjJMWtyvvRKiUhKCVlumgS+qzabkQaNsqlwp3fLTGPiCYCAKAOriYV4u X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4a41c221-27c0-4a1a-7cd8-08daad917de2 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2022 03:09:22.2234 (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: 3ORMhz8U29spCnKIsSbywtQgq/Bk7DLrHJbcMnO9HdGHttDxN33AK2VLz3dpeRHi8j8IcXQieeJpWxAbkgPEWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6956 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746631000203104973?= X-GMAIL-MSGID: =?utf-8?q?1746631000203104973?= From: Peng Fan When M4 is kicked by SCFW, M4 runs in its own hardware partition, Linux could only do IPC with M4, it could not start, stop, update image. We disable recovery reboot when M4 is managed by SCFW, because remoteproc core still not support M4 auto-recovery without loading image. Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 108 ++++++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 7cc4fd207e2d..5bbba6955683 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -59,6 +60,8 @@ #define IMX_SIP_RPROC_STARTED 0x01 #define IMX_SIP_RPROC_STOP 0x02 +#define IMX_SC_IRQ_GROUP_REBOOTED 5 + /** * struct imx_rproc_mem - slim internal memory structure * @cpu_addr: MPU virtual address of the memory region @@ -89,6 +92,10 @@ struct imx_rproc { struct work_struct rproc_work; struct workqueue_struct *workqueue; void __iomem *rsc_table; + struct imx_sc_ipc *ipc_handle; + struct notifier_block rproc_nb; + u32 rproc_pt; /* partition id */ + u32 rsrc_id; /* resource id */ }; static const struct imx_rproc_att imx_rproc_att_imx93[] = { @@ -117,6 +124,18 @@ static const struct imx_rproc_att imx_rproc_att_imx93[] = { { 0xD0000000, 0xa0000000, 0x10000000, 0 }, }; +static const struct imx_rproc_att imx_rproc_att_imx8qxp[] = { + { 0x08000000, 0x08000000, 0x10000000, 0 }, + /* TCML/U */ + { 0x1FFE0000, 0x34FE0000, 0x00040000, ATT_OWN | ATT_IOMEM }, + /* OCRAM(Low 96KB) */ + { 0x21000000, 0x00100000, 0x00018000, 0 }, + /* OCRAM */ + { 0x21100000, 0x00100000, 0x00040000, 0 }, + /* DDR (Data) */ + { 0x80000000, 0x80000000, 0x60000000, 0 }, +}; + static const struct imx_rproc_att imx_rproc_att_imx8mn[] = { /* dev addr , sys addr , size , flags */ /* ITCM */ @@ -255,6 +274,12 @@ static const struct imx_rproc_dcfg imx_rproc_cfg_imx8mq = { .method = IMX_RPROC_MMIO, }; +static const struct imx_rproc_dcfg imx_rproc_cfg_imx8qxp = { + .att = imx_rproc_att_imx8qxp, + .att_size = ARRAY_SIZE(imx_rproc_att_imx8qxp), + .method = IMX_RPROC_SCU_API, +}; + static const struct imx_rproc_dcfg imx_rproc_cfg_imx8ulp = { .att = imx_rproc_att_imx8ulp, .att_size = ARRAY_SIZE(imx_rproc_att_imx8ulp), @@ -680,6 +705,37 @@ static void imx_rproc_free_mbox(struct rproc *rproc) mbox_free_channel(priv->rx_ch); } +static void imx_rproc_put_scu(struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + const struct imx_rproc_dcfg *dcfg = priv->dcfg; + + if (dcfg->method != IMX_RPROC_SCU_API) + return; + + if (imx_sc_rm_is_resource_owned(priv->ipc_handle, priv->rsrc_id)) + return; + + imx_scu_irq_group_enable(IMX_SC_IRQ_GROUP_REBOOTED, BIT(priv->rproc_pt), false); + imx_scu_irq_unregister_notifier(&priv->rproc_nb); +} + +static int imx_rproc_partition_notify(struct notifier_block *nb, + unsigned long event, void *group) +{ + struct imx_rproc *priv = container_of(nb, struct imx_rproc, rproc_nb); + + /* Ignore other irqs */ + if (!((event & BIT(priv->rproc_pt)) && (*(u8 *)group == IMX_SC_IRQ_GROUP_REBOOTED))) + return 0; + + rproc_report_crash(priv->rproc, RPROC_WATCHDOG); + + pr_info("Partition%d reset!\n", priv->rproc_pt); + + return 0; +} + static int imx_rproc_detect_mode(struct imx_rproc *priv) { struct regmap_config config = { .name = "imx-rproc" }; @@ -689,6 +745,7 @@ static int imx_rproc_detect_mode(struct imx_rproc *priv) struct arm_smccc_res res; int ret; u32 val; + u8 pt; switch (dcfg->method) { case IMX_RPROC_NONE: @@ -699,6 +756,51 @@ static int imx_rproc_detect_mode(struct imx_rproc *priv) if (res.a0) priv->rproc->state = RPROC_DETACHED; return 0; + case IMX_RPROC_SCU_API: + ret = imx_scu_get_handle(&priv->ipc_handle); + if (ret) + return ret; + ret = of_property_read_u32(dev->of_node, "fsl,resource-id", &priv->rsrc_id); + if (ret) { + dev_err(dev, "No fsl,resource-id property\n"); + return ret; + } + + /* + * If Mcore resource is not owned by Acore partition, It is kicked by ROM, + * and Linux could only do IPC with Mcore and nothing else. + */ + if (imx_sc_rm_is_resource_owned(priv->ipc_handle, priv->rsrc_id)) + return 0; + + priv->rproc->state = RPROC_DETACHED; + priv->rproc->recovery_disabled = true; + + /* Get partition id and enable irq in SCFW */ + ret = imx_sc_rm_get_resource_owner(priv->ipc_handle, priv->rsrc_id, &pt); + if (ret) { + dev_err(dev, "not able to get resource owner\n"); + return ret; + } + + priv->rproc_pt = pt; + priv->rproc_nb.notifier_call = imx_rproc_partition_notify; + + ret = imx_scu_irq_register_notifier(&priv->rproc_nb); + if (ret) { + dev_err(dev, "register scu notifier failed, %d\n", ret); + return ret; + } + + ret = imx_scu_irq_group_enable(IMX_SC_IRQ_GROUP_REBOOTED, BIT(priv->rproc_pt), + true); + if (ret) { + imx_scu_irq_unregister_notifier(&priv->rproc_nb); + dev_err(dev, "Enable irq failed, %d\n", ret); + return ret; + } + + return 0; default: break; } @@ -803,7 +905,7 @@ static int imx_rproc_probe(struct platform_device *pdev) ret = imx_rproc_clk_enable(priv); if (ret) - goto err_put_mbox; + goto err_put_scu; INIT_WORK(&priv->rproc_work, imx_rproc_vq_work); @@ -820,6 +922,8 @@ static int imx_rproc_probe(struct platform_device *pdev) err_put_clk: clk_disable_unprepare(priv->clk); +err_put_scu: + imx_rproc_put_scu(rproc); err_put_mbox: imx_rproc_free_mbox(rproc); err_put_wkq: @@ -837,6 +941,7 @@ static int imx_rproc_remove(struct platform_device *pdev) clk_disable_unprepare(priv->clk); rproc_del(rproc); + imx_rproc_put_scu(rproc); imx_rproc_free_mbox(rproc); destroy_workqueue(priv->workqueue); rproc_free(rproc); @@ -852,6 +957,7 @@ static const struct of_device_id imx_rproc_of_match[] = { { .compatible = "fsl,imx8mm-cm4", .data = &imx_rproc_cfg_imx8mq }, { .compatible = "fsl,imx8mn-cm7", .data = &imx_rproc_cfg_imx8mn }, { .compatible = "fsl,imx8mp-cm7", .data = &imx_rproc_cfg_imx8mn }, + { .compatible = "fsl,imx8qxp-cm4", .data = &imx_rproc_cfg_imx8qxp }, { .compatible = "fsl,imx8ulp-cm33", .data = &imx_rproc_cfg_imx8ulp }, { .compatible = "fsl,imx93-cm33", .data = &imx_rproc_cfg_imx93 }, {}, From patchwork Fri Oct 14 03:10:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 2477 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp590594wrs; Thu, 13 Oct 2022 20:11:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6LTB7bcmwGxnSMhDnBCjFu3wL+cUS0GOnXUnIMmZ9Zfomrs+o5HcyezQs9cyJaLMpCAuEP X-Received: by 2002:a17:902:a70b:b0:181:d20e:6565 with SMTP id w11-20020a170902a70b00b00181d20e6565mr3070343plq.66.1665717113221; Thu, 13 Oct 2022 20:11:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665717113; cv=pass; d=google.com; s=arc-20160816; b=WaL1bcG70+X4b46wTe2JMAC1R2qJkKE4OB5WokwXpto6tDcaDqIfIHYR2qoehXC41g JRtNi/AXKPj/lZ2sIDjQJ3FdkWhIawe+Tz2QIR91UuVhhv5pmLIPCUyWbV6/AYsI84b5 yA7+RsTnJMZ56yW+zxiv3mqL8VLMtoayteAXj28zq5CW1Ip8snrAG7MBgc4yR0P/YTb2 5crgPD2APNuL9nsMHFGHjmoumhwd+HjdT09revPh0Wj37XuLuJOKan+krfye8YO1oUSS OZZPmpQlFbjCAUEDx8rzi9tjTzrDIlIyZvRwC8nTBYqLWM83rwyzgcGw3JC11db/tTJu PNwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VXlSOq5mayofeEidHA9K1mueZiDPZvbynQwlfobd4SQ=; b=LKs3LajnttNGaq+L4iTLbCOME3wxaXikU2UvdAjFDRYUKtp1pfpG2jllllbEmPpRXy 5ErWMpgGU57/Qrwe98PuMRCeZnxkI0l104Jn7yf+26fWFGjY/AiJhpriDzUK3RmxffTd 1bHh5crWoy7klt9b6NdcqMPrX0JZlIe8iEVsWWA1VaHXpSQmITjKiKbSxGol+WJaH7xa 5EEZLzePOQL4aiE1oErrZ4he+tdcbVfr8ugMKeAop3DOLp5NgVFQtSbeEDrEhK+MTvnv +N+iKcLfmeqUVQMo6jbz2m2sPWTqeAbGC6I4WqbkVKLuhK1sRO+sFIbVoDQOew/2io5P bMUg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=LbLXOLGN; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a655b0f000000b004613324b2f8si1285279pgq.747.2022.10.13.20.11.35; Thu, 13 Oct 2022 20:11:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=LbLXOLGN; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229871AbiJNDLN (ORCPT + 99 others); Thu, 13 Oct 2022 23:11:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229908AbiJNDKU (ORCPT ); Thu, 13 Oct 2022 23:10:20 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2082.outbound.protection.outlook.com [40.107.22.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8055C10DE45; Thu, 13 Oct 2022 20:09:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iv/ya0CdRAlDzCjM5WG51vhe6pPXHSTKNXkunoMBZNBbSiLwdLqKm5w6Z4uC6ptJrU0k//xqZKuRa31YdqJ/tD0DkjOvfZoiC+MFLob0wswW1rHR/xMCuhkn+HrbPDqNaUOdQdJ4IuyEPguERyNMMDqi+G4dRC6ri4aPrGwTDFoas2SLjbXmrl5LvvwnHwiOC2p24KbIaiSYC68j0gDkRf1UN5s0OWSn74E6f7dcaQrP5AtUrt6kqQRCjQ6P/UdPG4kDlIaDkV8LBWQtIHlDu8iav0RvByT2Ol4gnxPU6URLJ+iwxOFwwpSGC2CIkpBuvjZy56bU3PJ+CctpOPQx0g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VXlSOq5mayofeEidHA9K1mueZiDPZvbynQwlfobd4SQ=; b=cYwEj5xNlV6uEyKGzgM6UQ3DpaDvaByXyFRW5NA7/BgNiPwuMwl7NJaYynAF573FnJ1MxivKXo3Y4FXLDL8aQdhXRS9mhW7tx/VEQs1xAeWc5oksYAi6XCBhUm4yOrGY+wufbmIc/d19Vj1UTZGJ7KtgzpK3JtvpF6/CHpaHUEqW/HIbRSiCDIiX/GHzgkjXUSUR6kvgBZqVBd0ec1NSyHA/3iK1H1Hpv6zcrKi2mprr6K4DGH3TdW9qd5yeSHWddZ1zOVX79j3+e9SQ3iHcmh1j1Rm8zTl5PBEBYR+TtFWV6czJ7iwsnKJ+4JkLQdY0IXAui/Bw3K4TjiIdexMaXQ== 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=VXlSOq5mayofeEidHA9K1mueZiDPZvbynQwlfobd4SQ=; b=LbLXOLGNUrT6k2cOiIm5opT0vSdKd6Ygw3h9Sjm1L4Phr6C+nS+ovQEzNXZq+MitGlmJQljpuE6iKt9XLRfgI0WJvJSQZwCH2pNpMLx0H+pXiHZN3azcWynXXWXH7bP5dtJcA6oDazAJtHwNBYsq4vwWmij23D+70DtsDFGUwK0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by DB8PR04MB6956.eurprd04.prod.outlook.com (2603:10a6:10:11b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Fri, 14 Oct 2022 03:09:27 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a%4]) with mapi id 15.20.5676.028; Fri, 14 Oct 2022 03:09:27 +0000 From: "Peng Fan (OSS)" To: andersson@kernel.org, mathieu.poirier@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Subject: [PATCH V7 4/7] remoteproc: imx_rproc: support kicking Mcore from Linux for i.MX8QXP Date: Fri, 14 Oct 2022 11:10:34 +0800 Message-Id: <20221014031037.1070424-5-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221014031037.1070424-1-peng.fan@oss.nxp.com> References: <20221014031037.1070424-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI1PR02CA0010.apcprd02.prod.outlook.com (2603:1096:4:1f7::17) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|DB8PR04MB6956:EE_ X-MS-Office365-Filtering-Correlation-Id: 5eeb59dd-1666-401f-669f-08daad918098 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WQ6xSOg3vEMKsueyk50+bYpGPFL1Ln/kxL8E3rUN4k80wh+V+7jQxRa0SC/Tyi3ilAOMysXHswFe8AeUDXtUcNS/IdAnZFIwaok+apMJLZXXkOkiteg4Ah37lUeQke2mZM5EQbjo5hjcVFvnRX1TqrS5l1l1GKvQIgHdUVBIBiajaapv8B8r7A5mQUlitjYw+1sappj/j85ombpt+2xi01xSuFFehYR5eBnzMr6WnSLDwNLhlNjlmiJxUSrg6nXVFIVAAHkb8tsK6v+TQ/I1WUsknf2S1Y7X/XpX29W/XunWNp2YpJuqTZVqROLLojfeHWaAF1zwnNICjI/W7ZkKj2nVWLJhniS723hDfVO6OwZAj5J6lnD8h0lJoW7PdmjGdtfX2vyiG+gQAroLF7j9JK2ctYE8Skdav3N0NcvC8vYam0cMQLFThpeC9KG5F/pTQviPucRRbWn2ZXgv8U3gk9drlSgi3j+vkRi9PNDDBse1JtepYhlRHX4jzgV1FZidG7dOGQb86Evw95ICPDDbR6upg7VdXSHSojLDc2ck6ZXQJimvLUIt9Al9pbJMDii7YEuLybdea7mw+T9Al+4d5xOgNfmrSkIry9jUfkISZzoPRPQ8wJ9rbeb/Zshn8r6AoDG8QXWqIsUGJVQAHFyH2NkeGZekIcqlVzlqY1n4Qxq4iMXE3Tb3ql3KoqyKokWkCcRMGaj7dQZ+ahfuomNaUUIFgButoUviTcsIhzAV93txAx3yNGaW+DBkfRUFq9uYXjodC90RiA60zZ20hGqaQg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(39860400002)(376002)(396003)(451199015)(2616005)(26005)(6512007)(52116002)(186003)(66946007)(316002)(2906002)(66556008)(41300700001)(66476007)(1076003)(4326008)(8936002)(86362001)(8676002)(6666004)(38100700002)(38350700002)(6506007)(7416002)(478600001)(5660300002)(6486002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8w/23Im0dQyuPgAu+hUe4xTdN6uqvkx1yjSnD9jXLMBPMZCtqUuot1/iAxUqj0mzBAp+woh6xCssoEuJnVcjiZMwlUiYPfSXQpAv/jf2aW0ANc2V32PBWq5Afsxxvriwp6Ow4B/hzynNsrQdEL3blvay6KQ2/kWDtFNOx+zt2FrCNNIpZGh19E4RpyhwZB7ajBXgF2q8x/GzGZflvmOZcgN/m73TAalR9rVFJ7bZvt4vZKFPYuvye5KzGh3VohbVq59AksW0nVYcmb4xjZId5qVrCImc+3N4SPvDhvNi+IoDUvopeAAcZLaMI4+A5a+RfJyp2iAU6aSYqB+L1NBejxw+4JxLc9E84lp2SpLabWPOJ7qmqzKWRxWIyVEQbz9XLTp/mKABxsV0qhvnl4Eqttse8FKEV0jXcsQlPoPTLhlgwTRk7oVUVZ/vXNkLJ+0NqWf0ZQFfYLd/yQ1KBvWQeB2GZV677JoOMX6OMC52NfmnZZlEdEJoP9Gxaa4ZdpmMeJoIYlo6K5bThZvCGrZ9XNtwN8fl45uOGOzoL/sqayjiS8cmaEWgT9Sk5Xmy2hiVmUwqOQ7xYgeLx4rpPoXq+AtYn+rWFA851wmOzlk1gYwX+ccx4kJ4G9AswE/UOtbzBwEY3xe2ldqB6Rm2BL7z9bbFkGBOfe9wOMrFjNsSeHiiyLZd9hIH5kszSsgElsP6qNCRx8rI1BrdQqdzCqkhx3wtuMYAm3wlaBMxtYW3VZWMrDFabuFbZz7+KTsgI5arKSbK9Q4tdVT9e6z+ng5iqU2uf89o0wWAHFvYImSpAenMYwZ2gbBNgRGMAF51Q25RTYsw/7nDBtUPC33XlqHIA0sjAJmQUp8vVj+C+Y53SwUaphMlsHkORSumsIxpbu6jRjn8pGNR9MTln3cMZ+wGAjmbewIcDFchIrW/QUZE7A7lpMjFHaFXl4IsSvk8YySFwePOskYpw0yYCJEH1FkoA9PfCvVsoMc4jzuEh7oAS8MADQnoiSGg19u10g3OtLP1bOe41+DQ7a4lJkd77PlQwqAvbQhUziFqmV7GwijQ1EMhKagerG8LUFQYw5mHNcnoD9Mn764d74V36/RwkSIBP+Oy8Z62Fd6fVToKi4SyafLUp0/UH1+xbAEvKn+PcSaoA4uZTCAC/rK6fNEXBB7OLykKGRicdO6GU7mJFZ7qMTm0RhAzZzt6JD8lMOGKecWv0pClr1m3rFaFYhovCfb3bnkC37n33yktOjFDWX41Q5Nw69+iyepo18cV74ftBGeotFDWylqABWjHgM4gyhLnhNZeuVQMyge1wzo1knhGtFCYwds9RVZxImFM6hcv04uwrjn3gDGKKnmBziHaXZz99Shs7x1VirnJOM76b9yU7wOs5dznSYeFb0Z+cn/EZwOpHnCAQsE0Ge0iC54IVkKbakLlQ34g4nFo79jFGuF9gmtXB62o0vEoMBGt+HniqWBrrfeg4HHFTmoR7Z1VJ5fiIgeno+VRerE9WDpQwoKri0srPJ7UuIWSsXGd9bDGb+I4dpwl+3ebuXwDiwLNoI5zb3v/wL9jsVeKuqFonuw+gaozV3xkugux+KqmQn62sYzv X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5eeb59dd-1666-401f-669f-08daad918098 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2022 03:09:27.0069 (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: /Ewl21UZQe9jW1zTGuKo2soYd1uWfOxZ8qoktryhPV0lTSh8fCCTUlYDeTLuY1KeXjhHORk+a3Hi9cDehBhn3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6956 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746630987409232507?= X-GMAIL-MSGID: =?utf-8?q?1746630987409232507?= From: Peng Fan When M4 is in the same hardware partition with Cortex-A, it could be start/stop by Linux. Added power domain to make sure M4 could run, it requires several power domains to work. Make clk always optional for i.MX8QXP, because SCFW handles it when power up M4 core. Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 96 ++++++++++++++++++++++++++++++++-- 1 file changed, 93 insertions(+), 3 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 5bbba6955683..372cb4a346b0 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -79,6 +80,8 @@ struct imx_rproc_mem { #define ATT_OWN BIT(1) #define ATT_IOMEM BIT(2) +static int imx_rproc_detach_pd(struct rproc *rproc); + struct imx_rproc { struct device *dev; struct regmap *regmap; @@ -96,6 +99,10 @@ struct imx_rproc { struct notifier_block rproc_nb; u32 rproc_pt; /* partition id */ u32 rsrc_id; /* resource id */ + u32 entry; /* cpu start address */ + int num_pd; + struct device **pd_dev; + struct device_link **pd_dev_link; }; static const struct imx_rproc_att imx_rproc_att_imx93[] = { @@ -335,6 +342,9 @@ static int imx_rproc_start(struct rproc *rproc) arm_smccc_smc(IMX_SIP_RPROC, IMX_SIP_RPROC_START, 0, 0, 0, 0, 0, 0, &res); ret = res.a0; break; + case IMX_RPROC_SCU_API: + ret = imx_sc_pm_cpu_start(priv->ipc_handle, priv->rsrc_id, true, priv->entry); + break; default: return -EOPNOTSUPP; } @@ -364,6 +374,9 @@ static int imx_rproc_stop(struct rproc *rproc) if (res.a1) dev_info(dev, "Not in wfi, force stopped\n"); break; + case IMX_RPROC_SCU_API: + ret = imx_sc_pm_cpu_start(priv->ipc_handle, priv->rsrc_id, false, priv->entry); + break; default: return -EOPNOTSUPP; } @@ -713,8 +726,10 @@ static void imx_rproc_put_scu(struct rproc *rproc) if (dcfg->method != IMX_RPROC_SCU_API) return; - if (imx_sc_rm_is_resource_owned(priv->ipc_handle, priv->rsrc_id)) + if (imx_sc_rm_is_resource_owned(priv->ipc_handle, priv->rsrc_id)) { + imx_rproc_detach_pd(rproc); return; + } imx_scu_irq_group_enable(IMX_SC_IRQ_GROUP_REBOOTED, BIT(priv->rproc_pt), false); imx_scu_irq_unregister_notifier(&priv->rproc_nb); @@ -736,6 +751,77 @@ static int imx_rproc_partition_notify(struct notifier_block *nb, return 0; } +static int imx_rproc_attach_pd(struct imx_rproc *priv) +{ + struct device *dev = priv->dev; + int ret, i; + + /* + * If there is only one power-domain entry, the platform driver framework + * will handle it, no need handle it in this driver. + */ + priv->num_pd = of_count_phandle_with_args(dev->of_node, "power-domains", + "#power-domain-cells"); + if (priv->num_pd <= 1) + return 0; + + priv->pd_dev = devm_kmalloc_array(dev, priv->num_pd, sizeof(*priv->pd_dev), GFP_KERNEL); + if (!priv->pd_dev) + return -ENOMEM; + + priv->pd_dev_link = devm_kmalloc_array(dev, priv->num_pd, sizeof(*priv->pd_dev_link), + GFP_KERNEL); + + if (!priv->pd_dev_link) + return -ENOMEM; + + for (i = 0; i < priv->num_pd; i++) { + priv->pd_dev[i] = dev_pm_domain_attach_by_id(dev, i); + if (IS_ERR(priv->pd_dev[i])) { + ret = PTR_ERR(priv->pd_dev[i]); + goto detach_pd; + } + + priv->pd_dev_link[i] = device_link_add(dev, priv->pd_dev[i], DL_FLAG_STATELESS | + DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE); + if (!priv->pd_dev_link[i]) { + dev_pm_domain_detach(priv->pd_dev[i], false); + ret = -EINVAL; + goto detach_pd; + } + } + + return 0; + +detach_pd: + while (--i >= 0) { + device_link_del(priv->pd_dev_link[i]); + dev_pm_domain_detach(priv->pd_dev[i], false); + } + + return ret; +} + +static int imx_rproc_detach_pd(struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + int i; + + /* + * If there is only one power-domain entry, the platform driver framework + * will handle it, no need handle it in this driver. + */ + if (priv->num_pd <= 1) + return 0; + + for (i = 0; i < priv->num_pd; i++) { + device_link_del(priv->pd_dev_link[i]); + dev_pm_domain_detach(priv->pd_dev[i], false); + } + + return 0; +} + static int imx_rproc_detect_mode(struct imx_rproc *priv) { struct regmap_config config = { .name = "imx-rproc" }; @@ -770,8 +856,12 @@ static int imx_rproc_detect_mode(struct imx_rproc *priv) * If Mcore resource is not owned by Acore partition, It is kicked by ROM, * and Linux could only do IPC with Mcore and nothing else. */ - if (imx_sc_rm_is_resource_owned(priv->ipc_handle, priv->rsrc_id)) - return 0; + if (imx_sc_rm_is_resource_owned(priv->ipc_handle, priv->rsrc_id)) { + if (of_property_read_u32(dev->of_node, "fsl,entry-address", &priv->entry)) + return -EINVAL; + + return imx_rproc_attach_pd(priv); + } priv->rproc->state = RPROC_DETACHED; priv->rproc->recovery_disabled = true; From patchwork Fri Oct 14 03:10:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 2478 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp590597wrs; Thu, 13 Oct 2022 20:11:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4TYUJYoB6CI+M9Mi4SetZq5qOqkzlKDKFJGJ4hJFZ07+tkfrMllOebcm6PiczpOku0uiRc X-Received: by 2002:a17:90b:3d89:b0:20b:201e:9d with SMTP id pq9-20020a17090b3d8900b0020b201e009dmr14582235pjb.11.1665717114822; Thu, 13 Oct 2022 20:11:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665717114; cv=pass; d=google.com; s=arc-20160816; b=GkZ6HuxaSeb76bUpQZNNEJQkXCmEXx+zNxQ0W92KAEpsFshyE5AdROHVKRZdZofj9f BZ4HZhg6m5nVC+4NjCl3VPvkl8c3n9mxZVkSsByMQTkWz9/fsL56KDCa3WA9aiWzMyRO jPOjZzRHr3ToawzEoJ/OFbr7UPzRiyTzsfF6zNA9fuxYHLBRx6w4Q4E5Pu4b1XFmARc4 LVCDx547+gJBr1swdedNl0u1DBQM1f8OuqcJT8yZgsczrxLf9nNMZANaaOQMnGV/G4vS hn/RG0A/MZfZfNdCPDU0pthpJCBXwLyqishxkS0b15+jMbi/IR516BFmPAuHfNevSzQy 7JLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MvxEeqqwY7dac6HsGnLTQI13mhd7JygOFElQG9WC7TA=; b=aEEc0Ak56/qKnmzzxuwee0P8p6L25c5tTq8GDZtXv3BV3UJSAOXkg8+2HzmhJnxagt +Uv4KTlMTSrjoRDA0+qF0SiaeaCuNarhVzHEDZd2Z4ZXgQrw8gLqSDQ9gm4u0o1CC2hx FocNPCRrXignAfJQk8jfO+g96RTvnWdxHP8WQhm6f807p0INt+rQcqX3Q9e1R5TNWFgx 7liOIrh3/4Pfx1z2nCgcNBtiTFGdCdD/AmYbHrGfWaF6liznSNWDTzd+7niQgqE0dx4r L7HUTjshgYalRyO9O5UcRpienGN2Bzrg11plb+nPzPPLwdbmgh4p3eb+jwcWqY3rRwDZ CTGQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="LT5DjC/L"; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z63-20020a633342000000b004403e01f82asi1388890pgz.230.2022.10.13.20.11.42; Thu, 13 Oct 2022 20:11:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="LT5DjC/L"; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229977AbiJNDLU (ORCPT + 99 others); Thu, 13 Oct 2022 23:11:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbiJNDK0 (ORCPT ); Thu, 13 Oct 2022 23:10:26 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2082.outbound.protection.outlook.com [40.107.22.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E0CB10FB; Thu, 13 Oct 2022 20:09:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iWzmdqbOJkW1zQOh09QqcUUyciJzlGYz435JV8uOhGVCXxrQwLcAuKnz/8NZHd167g6pMsWeaVv7cGe8KxyHpVInfpYe2m7Ek3Pe+i3iI87NW5mP92P/X2O02Fkbij4H14l/sgrZw4R1WIkHimUkJAG2trOF5EPFR7nEgEFzuBH6TVBA91C5rIyFcW4rTZXYVcOIWffMkLOzyBUdOw6EdF1f/rqQTdcYUW/lWQj0Xw6Uo8pw3VbNpZzKFb/XWeHQhI7gJwpNgvWhplcoOCCQFDk3FKTzljVyx+YZ/hYIK9QYtwmKasKH8gjxhGzugZrCah/Yg+UvOpL+MGQlcaCRnQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MvxEeqqwY7dac6HsGnLTQI13mhd7JygOFElQG9WC7TA=; b=iGqhO3Qw8vZSCZCzb7RoYX8OkMdu4HyjTNF2BQ1V/LTFYFpZnxl57kKW4/+uXcBgiheVph3up7YebnSOfb3YB8VgsEYkeKHbfNpUh8piKW8VgMbaHyFA0k/bl9lR57wtSJHPwM/SVyn7gfw/M7tnMJhoPkeVim6p4QpXT9JQCFmycH7tHR6qUiKY3f8+WBSns5SgA3IS5FfgEL8AWb9lVz8YsfoTX74RoYhjdq0Nic6Doxjftmmvt4iGlWOh4PObBVkudKDg915tFmQu8e6ruYKYYXHn5kwW9wp4emYwB7RBr3ZDJxt6E3lbtRzNbkVoZU3bvae0KEK5E/YZADD3Tw== 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=MvxEeqqwY7dac6HsGnLTQI13mhd7JygOFElQG9WC7TA=; b=LT5DjC/LgEuc6qpXyDU4hJoFtgUel4Ek/AJ8LXmcRne/gdftqFRUQTLeo5W6ajuLRu9N5CctSS/Fo4E7+Higr+d+tIZIlCX9k8e1STCN/Ro9s8REamwFM6xfKQR547swVwv4QSez8FxVtMsy0IVL1Xar+cMZxBgDXgaaoFI7+1U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by DB8PR04MB6956.eurprd04.prod.outlook.com (2603:10a6:10:11b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Fri, 14 Oct 2022 03:09:31 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a%4]) with mapi id 15.20.5676.028; Fri, 14 Oct 2022 03:09:31 +0000 From: "Peng Fan (OSS)" To: andersson@kernel.org, mathieu.poirier@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Subject: [PATCH V7 5/7] remoteproc: imx_rproc: support i.MX8QM Date: Fri, 14 Oct 2022 11:10:35 +0800 Message-Id: <20221014031037.1070424-6-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221014031037.1070424-1-peng.fan@oss.nxp.com> References: <20221014031037.1070424-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI1PR02CA0010.apcprd02.prod.outlook.com (2603:1096:4:1f7::17) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|DB8PR04MB6956:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ec8e590-f84e-4496-71d0-08daad918372 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +WOPast1xJIiKqyw8oZ96tPjCuGDzvt1jitGdu1hwKgr/BkedXdsZZzo/jiGDO/kPvDkefAtGCL54/HmIHV4T3/WGsaERN6EspQjZ8jF5KQDcb51sPpl5Qkadfr2lJHzriJZgTfmwKMs0W3ApbDrkaUUy6UebgO7pXb/NaAwicF8L3T5L1GypL7VcFzgCZyA5A7zPVPZvgbGRJ8gbVTRuxqNprDT3S4F+a4IWSCGe3kZOaxIbLCCb1W82Ntg8jRpc/smPc2p9obL+Hx0A0CYWYVCzYV9d41D3IH/W2XsJklUsipx1SXUokl5PaExT8yZJma6YGM4Na5cBgZgoXUBIAmPPjZcJJYoatCU6jsauppXfPf57+d5eYXzqAOABJwADEhTNCSI7XbEI6+krSeE9O9W4dX//y45G6VsxZxZHTOE88N4OHEc5EgOs7TKYcwu7miP2M23Fh3rZKhC6Kef5vn4woiE9rj7x0oYCDFASNrjvSXHNPY09U45RupuoOWsqcr4HbRGvj9gLtlIYksmMWXBdL9Mjx061ei0FqeTPNx4B85u95jlqvz/I6ttawzKYAsM8wwznwvyHTIZoBngDa+KttJgowENhHqwa8uaJhU48HD87DJgO0ZP1X7KTSXciQZwxV5zjPOCKoeZF1Az2dpCrHhh3lCtbXvzUZzv/9bVGoOr0aXc6mvsabS4JU2TYrjZDucg6WIrn88LQffTLOkkfcgIJs5SBucGpA50AiGXGnAGB1jDCHBBTHW0hNcpvddZCqn4HKJW5pJOE+Zpxw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(39860400002)(376002)(396003)(451199015)(2616005)(26005)(6512007)(52116002)(186003)(66946007)(316002)(2906002)(66556008)(41300700001)(66476007)(1076003)(4326008)(8936002)(86362001)(8676002)(38100700002)(38350700002)(6506007)(7416002)(478600001)(5660300002)(6486002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hzQtm212amkreFyK4cCyV165uac4tSu4n5r6VbwpgegcaHy/QvmcKT3vczEsQFtxR7IeBah1xKqCZXY20mUV0x++aBdcbiAcsoSsvacGE75IAqQtdmgVy0pWO/avw+Ua17+p1nNfnvpUfEUGParYwFaDAX5yyUKyeA2fZ2L+zSJqEr4CwYeLN7MF2CXjuEbsl6kEdxYeCVfIbRojHFIudt1oKL/AqFcSyUQF1UpddFZ5F9xJP93W+xE4JCET0TcXRYimLoLtMZ4hayU7a1E8+gNzCGJc+XV/1Fi2+OODRsV4qKC1U4YVq10KF81pSuX7pfw2SYwOoJMh256ckVrbCLSvyE41L7YXA7UIqsTdhi4pTULJ/8PRrquEXcSr9f9MX7GUO5UK5ID61PgTulzEova/CbPc7G0GkJLu0Ov5yvNY1b/FCn9k9Aji1dMoxwGwy432lOpi73e5N317V4J29xkmjq4N5P9CYWe375IG7XgeGd/u8QUeiujpwjROUnSvAjcHUjD+xjihblb4JwR4/QvKMoknydKJs7VMyTSoEgukHwQEiPKEbMEszL+qRyiBrlkqbIpg8O7p5ITnxh4dVsYdSXW8duNCZYMvSKOfQyKyATlSaUFtBVXAUCxE6QwfJGendC6M25kf0LWyrb6XEX1mZ/XNA5K8jINY6w5nDDS58Qk0AVFTXJgbu/BS/C86JZfRNyaToO9JhZMUUKvtKEnocuJROvixzkinwdC1hnxLwi77BtagUwpdXVPFFkxrkj4uyw60jHgr26bbuXVBh9Sjs9B7H6Ctghlc4eIeolUpGk2RqzAVoNu+1TxUAcd8JpI+Umwe99C/qkSYBdpxnUawh5GJCWPVLFaqeh+ijI5ZaHUxWlnR14xWg7ALfnopfc4FpXXqG24qr11QuTg738yglZjx+rBi8vG4xfFbMm35+j9pCHtMZdxOzJxNOga3cO95wOsB88qBNYLItRJVhpfFpk8X87wxxobv9xHOIcpTJiwVuhQIf0CuCUQQBZU4fRAM53o8L/g3gVqfIMr3F+NlQ1Tu/8YMwr0b9HliR7zw0fY5IqGi4Q3ujpq01wSVIgU0/6ASAtfwt65+KOVLw8fYUoJQZSQD9FTIODb7yhpD+/X0ZPqJhqTKHD8qBT/UJ1cPA+cBySnRPVTPI5rcFOYdIwQJ6klhtakjC4m7e1K0nAL4RYwbdh/BqSb35neYIYG5mU3JcZHChi6lilal3wZMnUgmLKwtxkSSFC3Y7u5o1iOYoO+YCjGbd4Wh+hxV0KpvDqf3DvWQrUXOfGtEMaBEGp8/zw3Lv7DzOwssqMLFaU6hlr64MM7aL4dZFL3OWZDsD2jeowfuUAxBuFU+pKs7i24VcHZ+D+FxGCeplie4LaARe3NjnGxTHoUBQKBucwLVAZHbBOSA5RLD6lV4f+COQFRZKZmeOs01Wd+C5a2etBHr8H/Aoxey5VND2+j/dpgwxL1i3MppI4W8POUaUDYdH3dL7wf3/wg35HeXvkPib0fSqJESyLreuQNCXEz+cQC569fvF/aXeKZzZwQf8x/skMzCne/iBSy9D2s/GPfSgTCXqo01AKTEVEuiFwkK X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ec8e590-f84e-4496-71d0-08daad918372 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2022 03:09:31.5243 (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: xPCRfbTEHdVqUaoKMPnrSsZqxsOir7kaZxFdljk09aEi9mno+sow2KWk47Qu+9rm8rFS4eGGM/SoTo6qNz3Vyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6956 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746630988924506516?= X-GMAIL-MSGID: =?utf-8?q?1746630988924506516?= From: Peng Fan Most logic are same as i.MX8QXP, but i.MX8QM has two general purpose M4 cores, the two cores runs independently and they have different resource id, different start address from SCFW view. Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 47 +++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 372cb4a346b0..917e6db39572 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -3,6 +3,7 @@ * Copyright (c) 2017 Pengutronix, Oleksij Rempel */ +#include #include #include #include @@ -75,10 +76,13 @@ struct imx_rproc_mem { size_t size; }; -/* att flags */ +/* att flags: lower 16 bits specifying core, higher 16 bits for flags */ /* M4 own area. Can be mapped at probe */ -#define ATT_OWN BIT(1) -#define ATT_IOMEM BIT(2) +#define ATT_OWN BIT(31) +#define ATT_IOMEM BIT(30) + +#define ATT_CORE_MASK 0xffff +#define ATT_CORE(I) BIT((I)) static int imx_rproc_detach_pd(struct rproc *rproc); @@ -101,6 +105,7 @@ struct imx_rproc { u32 rsrc_id; /* resource id */ u32 entry; /* cpu start address */ int num_pd; + u32 core_index; struct device **pd_dev; struct device_link **pd_dev_link; }; @@ -131,6 +136,19 @@ static const struct imx_rproc_att imx_rproc_att_imx93[] = { { 0xD0000000, 0xa0000000, 0x10000000, 0 }, }; +static const struct imx_rproc_att imx_rproc_att_imx8qm[] = { + /* dev addr , sys addr , size , flags */ + { 0x08000000, 0x08000000, 0x10000000, 0}, + /* TCML */ + { 0x1FFE0000, 0x34FE0000, 0x00020000, ATT_OWN | ATT_IOMEM | ATT_CORE(0)}, + { 0x1FFE0000, 0x38FE0000, 0x00020000, ATT_OWN | ATT_IOMEM | ATT_CORE(1)}, + /* TCMU */ + { 0x20000000, 0x35000000, 0x00020000, ATT_OWN | ATT_IOMEM | ATT_CORE(0)}, + { 0x20000000, 0x39000000, 0x00020000, ATT_OWN | ATT_IOMEM | ATT_CORE(1)}, + /* DDR (Data) */ + { 0x80000000, 0x80000000, 0x60000000, 0 }, +}; + static const struct imx_rproc_att imx_rproc_att_imx8qxp[] = { { 0x08000000, 0x08000000, 0x10000000, 0 }, /* TCML/U */ @@ -281,6 +299,12 @@ static const struct imx_rproc_dcfg imx_rproc_cfg_imx8mq = { .method = IMX_RPROC_MMIO, }; +static const struct imx_rproc_dcfg imx_rproc_cfg_imx8qm = { + .att = imx_rproc_att_imx8qm, + .att_size = ARRAY_SIZE(imx_rproc_att_imx8qm), + .method = IMX_RPROC_SCU_API, +}; + static const struct imx_rproc_dcfg imx_rproc_cfg_imx8qxp = { .att = imx_rproc_att_imx8qxp, .att_size = ARRAY_SIZE(imx_rproc_att_imx8qxp), @@ -397,6 +421,17 @@ static int imx_rproc_da_to_sys(struct imx_rproc *priv, u64 da, for (i = 0; i < dcfg->att_size; i++) { const struct imx_rproc_att *att = &dcfg->att[i]; + /* + * Ignore entries not belong to current core: + * i.MX8QM has dual general M4_[0,1] cores, M4_0's own entries + * has "ATT_CORE(0) & BIT(0)" true, M4_1's own entries has + * "ATT_CORE(1) & BIT(1)" true. + */ + if (att->flags & ATT_CORE_MASK) { + if (!((BIT(priv->core_index)) & (att->flags & ATT_CORE_MASK))) + continue; + } + if (da >= att->da && da + len < att->da + att->size) { unsigned int offset = da - att->da; @@ -852,6 +887,11 @@ static int imx_rproc_detect_mode(struct imx_rproc *priv) return ret; } + if (priv->rsrc_id == IMX_SC_R_M4_1_PID0) + priv->core_index = 1; + else + priv->core_index = 0; + /* * If Mcore resource is not owned by Acore partition, It is kicked by ROM, * and Linux could only do IPC with Mcore and nothing else. @@ -1048,6 +1088,7 @@ static const struct of_device_id imx_rproc_of_match[] = { { .compatible = "fsl,imx8mn-cm7", .data = &imx_rproc_cfg_imx8mn }, { .compatible = "fsl,imx8mp-cm7", .data = &imx_rproc_cfg_imx8mn }, { .compatible = "fsl,imx8qxp-cm4", .data = &imx_rproc_cfg_imx8qxp }, + { .compatible = "fsl,imx8qm-cm4", .data = &imx_rproc_cfg_imx8qm }, { .compatible = "fsl,imx8ulp-cm33", .data = &imx_rproc_cfg_imx8ulp }, { .compatible = "fsl,imx93-cm33", .data = &imx_rproc_cfg_imx93 }, {}, From patchwork Fri Oct 14 03:10:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 2490 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp601274wrs; Thu, 13 Oct 2022 20:50:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Uu/A6YlXqGCexnSv9LmMuAreha5Fbr52jnRfvZAZcqBa/s+sgF0N/DMD+uD3oylTgcflM X-Received: by 2002:a17:902:f643:b0:185:3e6d:6171 with SMTP id m3-20020a170902f64300b001853e6d6171mr2970602plg.123.1665719438259; Thu, 13 Oct 2022 20:50:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665719438; cv=pass; d=google.com; s=arc-20160816; b=bgGYAilHeD9mmsz1Jz4frmd5vN99mc/5lPTNgv1GuJndYyrloKb/fIetIlvsv2dzxv sl4M1izRrZdExVAAX5AVweRLHzpLDjc1ag2ws3nEyarddVPGv3K4zERNOjlemH0Kjcmn /VcsK7BiUufR9GLiwBav8zD+vdbYj/Lyj2BkInbWo2DaSz2uepy+iQIIfo+NLZFVrDsA qMKQgzt8nxiNH7ViC8uKRnB9IhG+sjFlzg0pZa4J67YF4yAJdzC9BRu8vU4TgzQlL4Nm XKc8FV9NtbN+YNJAOnAAJ2ywCLJ9o63Jj7Y7Qdeo55GwB4H45CM62m6xIzJqYxq4vptE D+ug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4646ZjJwzZP5/JYwNJ7p/Znkm54pACVl2VgFh2W3vj4=; b=P/1ZcS95cCJXy0YNosHY7poo2e09v6Lbn/g3V6GrnVraevANVh+WLH4OWSvFCvoYG2 Q690wNY2L1q4IWQ3GrBx/IvFk6J8RdBKHD8kR6F13uRMKk/P1D5zWxx9svQ0zPG56eas RilYkled2iap+J92eHPUgFU1jpVoqaPsMMooHv0Yw9bN6sUGyrVObKLUKgWBtLkqyGFI jNNnjSQRwLUtEvRkEN/YgW6Fm4Ay9ddjPWEO6iwjlOnVJBwOm/EWUjoH5gTyYAD7ilXd H8CBUmRb17FX/vbHuvQ7frnVNr9GDcaXLhD2ZuWQwNxRUf3NqHXcj7f9Y4altY8VrJHM cpIA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=DD6JFKvj; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m23-20020a634c57000000b00453c041007fsi1516452pgl.159.2022.10.13.20.50.26; Thu, 13 Oct 2022 20:50:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=DD6JFKvj; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229945AbiJNDLe (ORCPT + 99 others); Thu, 13 Oct 2022 23:11:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229825AbiJNDK3 (ORCPT ); Thu, 13 Oct 2022 23:10:29 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2082.outbound.protection.outlook.com [40.107.22.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99BF1D2C5; Thu, 13 Oct 2022 20:09:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YYfbJ7z2EJSa0KxpYS8VfQK+tBu9rlBtb/s3z7yTV5+zdpO900bnOmEZzrMeDlYT1trvi4eAJfWp/ipNBM+srU7kDukKLQnvCqv+7tZV1wMVa6nOpgujJ2rCxwN8nuvhrs7lhZth5eLmFIyjhENCNXYDlAm/uwOq+gIHZ12pEgULw6uWv06oXEUkiqQIR3Bi48eQpOyONtPHm23IG3g+LP+UpNK8mxVfbArmaWXGHyLj6tPajVDIcKuGLYgfaKPQI8G5JD1z2NwHU+GQ+gY9y+kIpkUB02lEV3XDWDQ75hqFiCQcUSZNPcApnjucK9un6EF0y1NuJurrEwBeQq4A3g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4646ZjJwzZP5/JYwNJ7p/Znkm54pACVl2VgFh2W3vj4=; b=OXawGEpbnvDiOfmBwu7r6wd0l4z183QIMjPkDZKzMFKpCbaDHGf8AuOeU0ArAhtevjHwGfMFWC6djcH9rXc5gos0DZGY600T1KsvQal9g+vgCSDN+Foc4sSgQq255s+SvmkBwzFotaZOJ/o2k/EWhPZj9fi5G7kC2YiK3MUX+lSk0i8lwUDgl1yHu8dqUiPwCPkJJIdYxyZLPQEtrigAmC3Mj83UiJEfzFEcijTxqWRT52548cuGKmWPK5Y3AG3TVqtKUP+Kn+JLLA+HVBgoa+IFhjQ6Lkcgh+sNm6juD203KxlGLm6C395aVQ2vH2k5C1OvocvsIFZm6HFZR247fw== 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=4646ZjJwzZP5/JYwNJ7p/Znkm54pACVl2VgFh2W3vj4=; b=DD6JFKvjDdTzrV7uhrnS88RZJTiXA17QSQ3KaaomLuDNfYqhJ85wDGCkyIwvRVb7IPzGS4qUFgkaKniHSNWXaM2DpcNG3+thqqVWRNPDUT+FdVFGL8RSed62tusxrVXctxXDU2k5VIL0lNTHYZo+y7R9cJezV2lcEwp9T3rg+LI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by DB8PR04MB6956.eurprd04.prod.outlook.com (2603:10a6:10:11b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Fri, 14 Oct 2022 03:09:36 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a%4]) with mapi id 15.20.5676.028; Fri, 14 Oct 2022 03:09:36 +0000 From: "Peng Fan (OSS)" To: andersson@kernel.org, mathieu.poirier@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Subject: [PATCH V7 6/7] remoteproc: imx_rproc: request mbox channel later Date: Fri, 14 Oct 2022 11:10:36 +0800 Message-Id: <20221014031037.1070424-7-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221014031037.1070424-1-peng.fan@oss.nxp.com> References: <20221014031037.1070424-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI1PR02CA0010.apcprd02.prod.outlook.com (2603:1096:4:1f7::17) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|DB8PR04MB6956:EE_ X-MS-Office365-Filtering-Correlation-Id: 0bf928c3-fe14-43aa-06e9-08daad918650 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6An8e2XyneoIcB5az6z1akk19KP3jUVFgWnJVwbhGl0Wv71cakJAtfPnsA+VLlJdWamwQ7CZIs9gOmDfXkxiXqJtSAl40lGsHA/3+4FM7SmFhKllufCnRO+GgDMYl1JwbbU6Mzzgw4nD6FoPiIKDc+ewmVc7Ez2wofRhhVfh7Qk1i4yddHpcM17+iZRaad8Q4mf5VdSyA9XOURuId4AcwrlGiYjonAIDjUp7jIAwpRY5d8wYIm+qz6ng9BRwMHcK+rRzXfVB9/mEY6rIBI81rnYHWrZjV3LLUe0T/vxd9oouTOyQeM5vJPPfBv8oRQzOQe7jNguWNC2velnZJQlxphcloAIqCqeXYn5OsYXrCoen/LR3ODn5t8P85pR6VEln8Sg+Fn0fv/aYphORM/wUIaFBWhxEM2mWY6H7MO4D9xnvxvallSFzh0Z5ZDZEiyA31Nbun/73eBrZIHi8l8Ae0ihF+YFY9Mv3bidxKOZNbfRvJHepv60+SQsOdc949Ry8sbtHu0cFMZOgPck3Gu9Mixc59vvxS26nvkSCtBnEyCaQb7NyJk8+kJdDyjzITgfc1pzRjmeZvig+N1FpOAJjZ0p570vwq9st5hgIpDLCz55d85lCi60NCtnogmuwvjwiuZvQKCFHUTujCvhvPTmyUK9Eng02hfTwSdoF9vT2ZHw/zAsv5H6DhL1L0BepHYqrVsCBxgns2bT+Pr2hfD6x1Tu6XbC3LipwJr2BKedtH8kVpawHWaB9Jt4jQEu5S1DctAUXlT4lGnYoa3sp8TlaQA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(39860400002)(376002)(396003)(451199015)(2616005)(26005)(6512007)(52116002)(186003)(66946007)(316002)(2906002)(66556008)(41300700001)(66476007)(1076003)(4326008)(8936002)(86362001)(8676002)(38100700002)(38350700002)(6506007)(7416002)(478600001)(5660300002)(6486002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8UE0hxYcBPyUN0IHQqM0fI1Qs++IHXkSkYKiOqVvApILTVhy93zCJeEBkaHYAhltIOjoPJSmp6JuGwYkqLL21EIfx1DdDfW1hOjsjMw9pIJT5PpHL/RqTqMHNn7EIMwRHsCrbUJCrIB+Ou1x5ewPznp3KOar2kaDeOJ+ChD712WnhtywDjezcYMYVk5CGY232V/4XVKDo5Zeas2QxanzVk6SZzbKoGL8VjprHdPfNIGsZHbRUfA1Kbvd8TIya7lPM3KJTSfOa2T/5PfgtPf/pwMjGuJr+udVtgNnGMyNe23q8Rbe0Fbm3DE4jeX//TmoI+wydxay7xm9FeUT8sc//6Wr18H6h1Vbo9thRjpeEYMncCNx2jGqXHGR06J7h0AIJQfYWth2pPVhVjGv7Vnsks47n+4xieh2xLSYjR640oKS3vizXL0rsbMgkmjSzOELD97X6eRWB+FUkjs5GSm9Mq5Z7G7UZGYzpk+PXvYKvCfXhC9npcVH6gTWJglDEdnj/4L3ukSzQO8HwEw2YEFZBNRGBMu1PNcbgQnl90g7TExTs1p5z+ena+I/irsniyn/jfEIe/nZ8Jcpf380PoMjFvdNMSiOPXrzJuhL7/vrhnkND2ueRstkr3IiUjEovAEgSy5MmdMFi/Y+PaUhyzu77RUgWtOvuLE9T91XMv5Kk0Ma6cGiRXLAuanAe1JsLZ7pCw5uDtCh86Fc/zFi6jQ8DdczDwc962u8N1QOglhVmitMxCyb3ZhpyGc+z8M43j58X50JROHJIkYeBG52bZZ/xiY1qrtauP14Xp0pn9sjbC9gfcBxQdHHppm/9EW+CWfMEeqIiWQWqZiaB0rjOhDqBWazoY+ssdMC0Nm3FZNJ09qXX8+A/6W1XP/cs0vo+3pLYKreyZEOuo7+xwGS2l2kbuolPPiXg7cGsCF3o8Lt0+SlEe1yDoSMtWUyV9+W4MzFFGxyVlGPKFCSqjHJs5YZrCAzRi/Gn9Sg5HMnDmEFzc0jHQpeDV48mpEqhbJmtQfxmQo48JWOShvNOXgUGsv2mTYUCIWkbXTFllsD1BytdUYTkancDnTRJMuqYKKZ6fN8rnMzmLAaTTPQWbsjsQ2OS+gH3QWFtJvTN8C46HCnjBFbyzZWrFOrzmsi5z/bMDpRAGkteqwsYbMDtG1wHhTLrssGqCp8dkT9OW8b0QazRkqHkHdeyV72VmjMhvMxEWTpvhPb1j9o1tMIM2BAys3UvJN9/zEk4wtlhJyuxcKBAsQOy50RBzB83nvgLAKHniauntRgny2KL0nfDEEGZmKn6qATYKUsrtkhhczebyr1o4lbsijp9IXH0fpJN7es2qKuUqjUAD4wGpifY1zfViVzxh4hjyfpSmSk2EnUsvXUSrUU0Qz+Fk+DW0V50ZEDDTO1BIWrQWkX31b5yEgxgkBmlH2Z3yOi65DhWjbbmbwZ61zmuRdLY6l0Kmic3jHcUGfY93ZgFTogMz3es2UUrVvCBH4qhLqiJVJD5JQ/eRtQFhmtTqjeLDhQDHMws8GPK8C5kI8L5AV9nHdmoHJtvkyQNg3JD/8A+1OtfFvHPumEf1dkdsxYRuaeeEZUToIfYUdo X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0bf928c3-fe14-43aa-06e9-08daad918650 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2022 03:09:36.4413 (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: QHMyl2sJuX0CORrL80u2iBiGxJjRlo+Ad1wDp4R6MfpBvSyB+0+PU1fdJMpwuWLp7Hz6aBle5hv9SxjiUbw85w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6956 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746633425437298136?= X-GMAIL-MSGID: =?utf-8?q?1746633425437298136?= From: Peng Fan It is possible that when remote processor crash, the communication channel will be broken with garbage value in mailbox, such as when Linux is issuing a message through mailbox, remote processor crashes, we need free & rebuild the mailbox channels to make sure no garbage value in mailbox channels. So move the request/free to start/stop for managing remote procesosr in Linux, move to attach/detach for remote processor is out of control of Linux. Previous, we just request mbox when attach for CM4 boot early before Linux, but if mbox defer probe, remoteproc core will do resource cleanup and corrupt resource table for later probe. So move request mbox ealier and still keep mbox request when attach for self recovery case, but keep a check when request/free mbox. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 39 ++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 917e6db39572..1183de84a4c0 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -84,6 +84,8 @@ struct imx_rproc_mem { #define ATT_CORE_MASK 0xffff #define ATT_CORE(I) BIT((I)) +static int imx_rproc_xtr_mbox_init(struct rproc *rproc); +static void imx_rproc_free_mbox(struct rproc *rproc); static int imx_rproc_detach_pd(struct rproc *rproc); struct imx_rproc { @@ -357,6 +359,10 @@ static int imx_rproc_start(struct rproc *rproc) struct arm_smccc_res res; int ret; + ret = imx_rproc_xtr_mbox_init(rproc); + if (ret) + return ret; + switch (dcfg->method) { case IMX_RPROC_MMIO: ret = regmap_update_bits(priv->regmap, dcfg->src_reg, dcfg->src_mask, @@ -407,6 +413,8 @@ static int imx_rproc_stop(struct rproc *rproc) if (ret) dev_err(dev, "Failed to stop remote core\n"); + else + imx_rproc_free_mbox(rproc); return ret; } @@ -592,6 +600,22 @@ static void imx_rproc_kick(struct rproc *rproc, int vqid) static int imx_rproc_attach(struct rproc *rproc) { + return imx_rproc_xtr_mbox_init(rproc); +} + +static int imx_rproc_detach(struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + const struct imx_rproc_dcfg *dcfg = priv->dcfg; + + if (dcfg->method != IMX_RPROC_SCU_API) + return -EOPNOTSUPP; + + if (imx_sc_rm_is_resource_owned(priv->ipc_handle, priv->rsrc_id)) + return -EOPNOTSUPP; + + imx_rproc_free_mbox(rproc); + return 0; } @@ -610,6 +634,7 @@ static struct resource_table *imx_rproc_get_loaded_rsc_table(struct rproc *rproc static const struct rproc_ops imx_rproc_ops = { .prepare = imx_rproc_prepare, .attach = imx_rproc_attach, + .detach = imx_rproc_detach, .start = imx_rproc_start, .stop = imx_rproc_stop, .kick = imx_rproc_kick, @@ -720,6 +745,9 @@ static int imx_rproc_xtr_mbox_init(struct rproc *rproc) struct device *dev = priv->dev; struct mbox_client *cl; + if (priv->tx_ch && priv->rx_ch) + return 0; + if (!of_get_property(dev->of_node, "mbox-names", NULL)) return 0; @@ -749,8 +777,15 @@ static void imx_rproc_free_mbox(struct rproc *rproc) { struct imx_rproc *priv = rproc->priv; - mbox_free_channel(priv->tx_ch); - mbox_free_channel(priv->rx_ch); + if (priv->tx_ch) { + mbox_free_channel(priv->tx_ch); + priv->tx_ch = NULL; + } + + if (priv->rx_ch) { + mbox_free_channel(priv->rx_ch); + priv->rx_ch = NULL; + } } static void imx_rproc_put_scu(struct rproc *rproc) From patchwork Fri Oct 14 03:10:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 2485 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp597334wrs; Thu, 13 Oct 2022 20:36:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Q/sfbCoCwQUzAE9hAxLNUjIOD3RfbEiA2GB3MRfHXB/7izyoNNLPrBtdW0IXuDbRWLEpC X-Received: by 2002:a05:6402:4150:b0:44a:ec16:def4 with SMTP id x16-20020a056402415000b0044aec16def4mr2466194eda.21.1665718565687; Thu, 13 Oct 2022 20:36:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665718565; cv=pass; d=google.com; s=arc-20160816; b=cvQ3k+WDFXPRtQpbGjNN8A2maI5Gq6D2rgbaEfTiAW969mplY7HQSpSLg3/my54qyY h7XlC8rybTM4JffV3TtePb5pjtouqzg6HyDjYUPTCZsN0kT4UQVPtnBtO5nkciLtDZTA lYTUVRI9XF13fq0woVeBxv19bZkzUq724fdWxQ9SI1hIfadfjdnC7BCGBqV1hcbFyewh zmZCEaRnaFZwexEeYHbBEx1SBxm9SJGds4sTp/dbTnltoMLC9iR2mpd7eRw9ojKW3tvW mk/HbGxNa+KAf+exPhmBj+YYmFqVR8C6I8KEjUSPqG26l0Vxe47EjmjsqNJ+RrIXP3id L8KQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=R+WdwO2aQHI1u2J5cop1FJI2ntOHTRNGQ7fQDHotXgk=; b=CbpAGpEMZZpSQcVTEWCLOHcgrK2bqskrWr4imZZ316U4XyzAUVvGO7EMiayYGn5ZQY wtXy+XQgR20NC//eNm8JZoYfZPCpPZ9A7Yj1aqvYNyp0FQIbaE9K0cI+VrGybGOnAzVA nEeOwRelMkPoRue86+BXPIv7u8VFdyaxGZ2xTi7Eg9KYc4uAMQV9IoCfJ9XqWmBdMXJi 1TZUhtmf3fCwSybByf1WCl4Cpn/TA+LrBQhGlyl4p1l7CpDTpl5oS+dvWtzxtwa12pGc +9lJ7pQiNUy9jv5Eap7qQH8Xc/oRzvpPxalQr6wvYlp/wW8SLAhKFgOBig70rDjXVWem Lkng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=DidINije; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s19-20020a50ab13000000b00456e1b5b8e1si1147997edc.426.2022.10.13.20.35.17; Thu, 13 Oct 2022 20:36:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=DidINije; 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229526AbiJNDLl (ORCPT + 99 others); Thu, 13 Oct 2022 23:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229888AbiJNDKd (ORCPT ); Thu, 13 Oct 2022 23:10:33 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2082.outbound.protection.outlook.com [40.107.22.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A66AB13F22; Thu, 13 Oct 2022 20:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ck6KY9mlBzVqiJve6bxTBQmRJiJJFWVgsQLawCTXYjIhDygqKCb8G40xNXppL12hlAGbPQIhLbQh6IN2N4+rRD8r7tpayYNu2asLjgtC+oNTqxYFs2WgVAa+mjzTjJI6Nta0mwFTtVux40qWnvdY9Mhgxjt+B0Gzds0fdBL5SyVnX9q7fniQ02nUTQ/9rjjoEr2xx5jiEL5eRX+kk0fECHhLSMgyitafWqLIgnu+D1mBGU0qq+VhrVr30f1ABp401TDzvGEfDru3lFjF1ACcIn/DZWFuB5u95hbkeb1hJvjiXEdUG06eS6o8uYg8vWkBRdq7vAgPd+R4flz98JcgqQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=R+WdwO2aQHI1u2J5cop1FJI2ntOHTRNGQ7fQDHotXgk=; b=AiRPyZa4cgKOInZpwxVrnH9QAm1/hFTKcM3gu55ueOp3YaMx6jSPOjgcjvEipfsUt1wdE9F5dy+Ekje01Elllj+JyI5O4fOcVwCnaYLsirOlrO+hUnJ6Epu2pNIeDl64LuM3aJMp8CvyZs9Sn5OEXuAFCGN7MREeLt7EmXeZCfPLNG3MewoBtzHY3KGR2ojoh6m2xFzPdsxc7QocG959cPtWEks76dJPzUExo+NmopVkWMVDy00oghaylK6fPhaedp8ILUVqn+vDDJuch4q5IIb8jtLrJw0HlZzkvkvHKJXn2I1lSFJ35qWAc/xTm6vdXtLP4rdATjcFkzw33hCQYQ== 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=R+WdwO2aQHI1u2J5cop1FJI2ntOHTRNGQ7fQDHotXgk=; b=DidINijepKWUGQOc/mMORUst54XEJN0RSmr4VJkzvg59pg2VmsH9w3PWCvIvi2VftVca6etYgdDvKxhGQru4B9puAMFRFvyWP5ybOP9xFD8IhVznvlZWTGETNXbJXEhLMSyaDjm1BKtjVcUU4h1qeDyrehYZmIQ+XuDuXgdZGNw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by DB8PR04MB6956.eurprd04.prod.outlook.com (2603:10a6:10:11b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Fri, 14 Oct 2022 03:09:40 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a%4]) with mapi id 15.20.5676.028; Fri, 14 Oct 2022 03:09:40 +0000 From: "Peng Fan (OSS)" To: andersson@kernel.org, mathieu.poirier@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Subject: [PATCH V7 7/7] remoteproc: imx_rproc: Enable attach recovery for i.MX8QM/QXP Date: Fri, 14 Oct 2022 11:10:37 +0800 Message-Id: <20221014031037.1070424-8-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221014031037.1070424-1-peng.fan@oss.nxp.com> References: <20221014031037.1070424-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI1PR02CA0010.apcprd02.prod.outlook.com (2603:1096:4:1f7::17) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|DB8PR04MB6956:EE_ X-MS-Office365-Filtering-Correlation-Id: 3dd242bc-f55a-4b0a-b9f1-08daad9188dd X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NmdVaMV1tG40EQSVhgTdIWw6pO89LHT4H4Mg3jIPZT9fZovBve4b9ABm3ZlpV/zxKV+U5Wd6/EF10YNNQp423FUKaqttQ24/4+KRVsERmRd0sD5ABJHhSm2rvZ8vnZlM2i4Nh555WS6OqdxQkheZ7S0CaM+znczesK6aOrsJ9p6t0Y9dnxLq3nlV6Fdw5g56TIjpvCwH87B0z4rn0FcunJXs7Fi8HrsCdiVQFPIG+HFbuXJQDb/yalEx4MCSWBSzYpGBj7AmSjXJP2pC7IulDKVQmOAeHUoEB1yP9qhtEpcrTdVSHRlPTgMRbmJYbhElb9Gk+Y/PVsUEahEp4C8zbUk/H8wFOiPEhyzQoIJq/Bm4OTYX8F4DKV+bXjIFh9RizrpJ+9JjU2Q8o+pDvimAeewozdHMHjjj33nqfInCBtpztUaTkJtP746V7qN8X8aFqiDQ3+PCBCxbsw3x1GcjqgRj8RYJeuMv4lBATqvzAWAlnclh23sbYE33Tdu+VAdomz67jh2wIlRhAX5ytJtju6bvtQXUBpwuLnTmAHsRTRj7PBmytbMXCqMEgaq2+xn/x3fZ3WYXSNPUyAYEeLDlA0qmiKjue0GCRerUBYOw5LQFjrHacYHWHWEVShU1UHD+p1rOkUvVnY3NGM4psaql5RSgO5w2HbmOhSxD3106+4kJMNkTeRFSwiuZfbUIFoe7bsO1XqcdpN6Yjcr+bg9Rgi/oIyXhLpgKKbvvqMi+gHqNVhFqDDtPe9QmQRMGLOlRpGmLh2ZcavSClovt6MlgGA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(39860400002)(376002)(396003)(451199015)(2616005)(26005)(6512007)(52116002)(186003)(66946007)(316002)(2906002)(66556008)(41300700001)(66476007)(1076003)(4326008)(8936002)(86362001)(8676002)(6666004)(38100700002)(38350700002)(6506007)(7416002)(478600001)(5660300002)(6486002)(4744005)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: m0is//TfkpizZp2zLGgg4QlxepIOhzL3iKRdD7wTz67LfU7MxtNyWNWyE5nbhLI6mKbM6cRNQgKwxAwOMZRaokvcz3/EE/deq0V+mhc9h107LKyp0lS9/u1tb3MQoboiZFr2AZpPQaZqqpfke7tTB4iK9rSybSKrcaL2OpEfTa9Zfylfztmh3XZquvxxPzdUorYTuTkJfSPrSB1WQZ61K3TydhwJY1TowAF8rYiZ3a3422vYvOEnxfUZFFClyLPozv2GfYrXB7W++12MBkdYyqk9DY4KkNT7GLKLp7I+IyJY8ZuVo9gB+yARl+jxV22tBlHlk+bun60JUDAVGxt3Omk7NM+WhUn0X8lw4F2zAQapCTZPPAH9+/S/RZ9MTjqXoUB0xiczSOyB6PN39PXvIXkOZPqnsweqRNefDoW6oXyorBH9WzS9xEYqlo46EPuMrjvzoZY2UgO0jXCMwu+yQW755PHpM1AlbqhQ9bDInqJC3M404MbPe0+agEP1Cwvn14JOIX3dYHHzi2JnAcbDXjn6tvPQf2sAGgC4dySmozlsIszqYeHA/MkYI6zbSVYLaT2r2sBgPrhMZSFuRyCSbOgh/iyXCpmUL5tRZog6RpKI1QmptKjc1zvxeKdwgmg+MWr8PQhsFmrrs4+XfQf3if/cWqcjOrD2ix2jUg/g44mQiMUjAJYZldAdr3ms+saYgYpgJvns7Cl4PPVlrMHLHzFAsHTJSpWWZm5sFt1H18dSIOmoUtxNw6tNKEQqSqvJa6tcTCy+nrlYnapUur9i0MP48cpjn/x6v0uSaF0QNcHM4xO8+1VM+ck3EQ/lLE2KX3x0HaXZDwgBBYkM/QG0nVuNsL/pBTh0t0tVwverxUgBvJJ96DitvRoOShotYOstnOmvpjF3Tv1WVEOK0Tn81bIpEtT3GPVgia7Ph8wUM888ady00L8ze53ixluTa32vudNWeRS8UOIroNwCmKY8ue83FUbjJfbABLVN5+GJJrVY1eCJ38VKyH5m1rmxiygAmuHgIRH4fxoy4codWgJ+Iq1Ec3JrCce86El7a3eM7jmNesUO9sPpVMpfZDA19CNnlUvkBDJz7GhbiBjO04D4xjXu81wgfhhlGH4ibRRdnToTYmsprdo6PAUyMbhO+BxmdFEecLTMoeqm5SgLS56xbtKwu8jWnSQobL3Deq+205qkge656o2LfITzXWlQ0D2BYkjUV+DrOQTW5kVpMmPloyHldvZZESQN2G/DKqbapfGHXpWBeZANz8HHF9R8DvLagYsgtLBqWuuRHS7vdUVZKg/tHjshFIQaDXNQ+bHyCcooYOfNsQTrwIMo7c55xFpU636l3dSDThswCzJ3Kvs/FWHJFMezy5akigbQUcdWDTcUhBYdJiSxGidUAOyMqnRa1ixWl2XomtXePDJQigLR88SQVboBSXVckX6LBf3JsmX+dpavnRkI+CbQZnHAbasVq1+lw5P6v+W7cfby/ak0fnO9Kbxnt7/JcTqt03UDZIK67AOBpgxSJRu1DVh4bJ16PY6zKjJ5WYWMEsAj7xqLNNoF64lF7lFh8pLpYe0cGbIcsen1fM+ECKs57lSTt2bK X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3dd242bc-f55a-4b0a-b9f1-08daad9188dd X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2022 03:09:40.7879 (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: kp8yzppbk2xMpUmz2VIvYe5vFz2dBQjuqh5uzsSlLn6gjQhBv3z2RePBfT96UW/DIHsG3ZsrLrDih5hsLjigDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6956 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746632510757651526?= X-GMAIL-MSGID: =?utf-8?q?1746632510757651526?= From: Peng Fan i.MX8QM/QXP M4 could recover without help from Linux, so to support it: - enable feature RPROC_FEAT_ATTACH_ON_RECOVERY - set recovery_disabled as false Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 1183de84a4c0..2f82587b6ef9 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -939,7 +939,8 @@ static int imx_rproc_detect_mode(struct imx_rproc *priv) } priv->rproc->state = RPROC_DETACHED; - priv->rproc->recovery_disabled = true; + priv->rproc->recovery_disabled = false; + rproc_set_feature(priv->rproc, RPROC_FEAT_ATTACH_ON_RECOVERY); /* Get partition id and enable irq in SCFW */ ret = imx_sc_rm_get_resource_owner(priv->ipc_handle, priv->rsrc_id, &pt);