From patchwork Sun Feb 18 06:56:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13561702 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5C580C4829E for ; Sun, 18 Feb 2024 06:48:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sBKfc5kr9XvAiTRQZCTrBUAY4A+0QADko12p4qh7KKY=; b=3TNumfbaIX2j/s K2Gmx3JapHjF8Te8M4OtZFWEuQbrZ0Zz6eqgqAI2Aqx3thDqMhzjsse8wQ6jzIr9c1ZlD/b3U5rZx 1WFtZikP0Q87guWlpTajqK1LaL7uop0AwsXBLH27BmCY89te1sbQiMpNXjs7hemjHro2EzZ9AWkfa 3xZnpXDS00mWhB5TvwDLsomjX3QUihIK5GWMt1BdOzoS8XMSikpMKIwiWGizxnomPRznwz8i4n/Vn k3JCuuogTlP+w03vJQw2KYcOcdxuWjTnGAblqmvgV+R8eBowKS3X+41s+MRFLdbcpLOy1hz7jomdf sw4TGWkiZOzND9Gn1HqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rbayE-000000079SH-48DK; Sun, 18 Feb 2024 06:48:14 +0000 Received: from mail-vi1eur05on20600.outbound.protection.outlook.com ([2a01:111:f403:2613::600] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rbayB-000000079RW-2TD4 for linux-arm-kernel@lists.infradead.org; Sun, 18 Feb 2024 06:48:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XgAHLVq+to4+JNcJo5TkPfElXsv1EdpWKxHClu8GduGs10zIweyC6o3Mp7zWWOmzpXqBHnG2YFGvR+GZRmmu2DkSfl7qSATsInK62Po7vOT25q0qtiOelvVI+xi5SD/A7IQFgxScVKOG50CrcaOQO10EBLc9Z98dHALSzjD9HOKjmq06N8ZqBeM1viNAV9T23bdg/dO6wNho714Q2mu4TwnNbq0tkeW3gMBOg99snvXpsvtzms8XDraWO2YTLPC5WymKF9s8cyv1LxJ9JniHwxuK/0Vee/iR/kGyFgQx9mTroRLlgam4Yrt03EPfr2dExEEi2NOXjXobliR2845wKw== 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=ymlb21vBUizT0FZiHty9VnS0TTqkEfN0efNpvT5Nr5Y=; b=i6OMaQZFSfea5Omhjja3llvpDC0UQYroS9AgEPz5VLaAuAZiegzzDImbOCu9IdFI6ClW7Z0AbRus2cq6BzVjlEg3P1SuOs7b/uUKx6xe3Rm/vujkXjqqcmADvA72dG/RG4wRHm9j5BSS66l8LA2VESaYhXsxLV89IvzRxkYgXELuC7CiKvPEfIMbpIUi7E6eToP2GyxS8jnyy8qiTB7NCUaX1EAvtl94wjZ0h4fkdD4YAH7q9cLclwaeBLsxhROIeu2iX36ar9FGYbqod3EqvlrVaoU1HYp8VEu7KECKoeA0Q2F4O4dkDIy/1oCwvwksqaz9qJv51tOGMRpjKCEOBA== 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=ymlb21vBUizT0FZiHty9VnS0TTqkEfN0efNpvT5Nr5Y=; b=bnl/kqPEh+tPaEwVyOTompyPyHl9eQoa7eLqr89f/XugL+bJ5hs92+f4exHxHOdy+ExQonGx9b9zibA+PeScEBCCUtEK5XHoOZgNth1qSRMKTftXdzVonqbgaiKoLRzIP9lixNqneaYtXl43EjvMi/tvDZimaU/Fjv8xenwnoE0= 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 DBBPR04MB8011.eurprd04.prod.outlook.com (2603:10a6:10:1ec::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.31; Sun, 18 Feb 2024 06:48:03 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::4ac3:3559:4200:38e1]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::4ac3:3559:4200:38e1%4]) with mapi id 15.20.7292.033; Sun, 18 Feb 2024 06:48:02 +0000 From: "Peng Fan (OSS)" Subject: [PATCH v7 0/6] mailbox: imx: support i.MX95 ELE/V2X MU Date: Sun, 18 Feb 2024 14:56:12 +0800 Message-Id: <20240218-imx-mailbox-v7-0-8fb665eeae40@nxp.com> X-B4-Tracking: v=1; b=H4sIAAyq0WUC/33OwWrDMBAE0F8JOkdltatV7J76H6UHy14lgtgOd jEuwf9eKZdYpeQ4A2+Yu5plijKr98NdTbLEOY5DCqfjQbWXZjiLjl3KCgEtGEQd+1X3Tbz6cdV oCdB0BoFAJXGbJMT1sfb5lfIlzt/j9PMYX0xu/99ZjAZdGWsoOGY08DGst7d27FVeWfCFxCRPn toKiMjXWEraSyolJSldTVhbFvChlHYvuZQ2vwXwwlRRi3/e8l66UnJ+GwI11DEx1qV0T4lgSum ydMEGYm+B5Cm3bfsFeziXQMYBAAA= To: Jassi Brar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dong Aisheng , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan , Conor Dooley X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708239387; l=2240; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=RPMQNmMFoRtas4k5Bg1YkNlWu43+BMZzlL0nW4tYMW8=; b=7guWhfSTHOUviTv4xlH3DCU3IRljZUNLSqxn6SPKoN1rEalTl0W7cTgb/AitlscHDA1jc24G3 uVGrp53syKqAwFbFnl8Qhr+UHprULLA2BmS2v232YXYRsaOmqO2KljJ X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI1PR02CA0060.apcprd02.prod.outlook.com (2603:1096:4:1f5::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_|DBBPR04MB8011:EE_ X-MS-Office365-Filtering-Correlation-Id: d6fb2440-310b-4566-8bba-08dc304d8db0 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: 3nC/B2ZWV99M+qNSGCfYnjHvm0nHB0eqULAwnZE8tFnbU23fe5u+eOz5GqedZln/laAAVhcPerwXWL1wO594b1OBfulniKYmB+5X4keWkRi7tBNQS+SKEmqyn7bbYakWIbNMkK0VOckxerHHTUUCQK+/VC+YOqurir9ZDh67YMal8C1682c1uUBuyRzN6JuW1mAk5wo9RZMgSex+wDJ/G7pSLEqBaDjCBFIXwA01DCFW7CPY8VqREp9MxhjUXAngYypLat0qe/SewoZrA+z2hMwwBqh4dshcTZc5n/j7qYZSxWPepsg1qPL3Ml72ksOMbdfLQeG9/YiaUPlyw+09YPfNG4vsWEL5woz/NXqDmPNJKT/Q3elrOGl5b/3imSbB2fDGZueW9Wj6CyRSr8gHqkj/lrZLRDoChFFrckNLEZqftDfIPwqvfsf1vJIcekNex/wgiwgDrMEgzmrPq7Q8wlA/CyiNZ0F29o9fyaQp7BJqUZhMPu9Dce8u/udydd9/qeudLDFiXfI1cMMTwHLAZsSC07jD6uqokc9Z4nxa2l3XW3CM9k7XoD4hWx4BI1kZZFJwPMxBlAohIZrgFZ0bYXOgVVBAO3asihpyneYEcxjm9YsE6Havku7byvLkANSb 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:(13230031)(366004)(39860400002)(136003)(346002)(376002)(396003)(230922051799003)(64100799003)(451199024)(186009)(1800799012)(5660300002)(66946007)(15650500001)(4326008)(2906002)(8936002)(7416002)(8676002)(66476007)(66556008)(86362001)(36756003)(966005)(921011)(38350700005)(478600001)(83380400001)(110136005)(9686003)(54906003)(6666004)(6512007)(41300700001)(316002)(6506007)(26005)(52116002)(6486002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?lv8JGwcY0bQcdpzDFebDVR0gNL+z?= =?utf-8?q?GP37pdpRURVkh8lN14xgqPkNpJuiSrPZDyxJEheRJivWNLzO622wBgITeo+cbFkKj?= =?utf-8?q?qpY69MYGGrAC6rllR5gUyU2OlCJgPWJ+foFXkpI9+niDH1f4XlVQyu4LB03rYyX/Z?= =?utf-8?q?8SNKdLG0VTlnAxodoktHO+iQXvGSPUGoIpg57S1ZbMkJboafQlHf4zjdWu5u9LhKn?= =?utf-8?q?KctmZd6Vy4ODFhE+3VnBRI8WhptG8nr8LC9JiBnmmnRxDJwWmO7jB2iUZODS4x5+B?= =?utf-8?q?lrtdC7DI9nVO2sowqgW05zBrON5S0DR6kDstO0qXC8EY7c/TfxBlOUHkbXaYfhp6R?= =?utf-8?q?dzbHaGfeuYuAs35Jy+POH1n+PfHd7nZIJrcuP4wlOO0GYrC3a4dZ8RS3Y+GAiklQZ?= =?utf-8?q?W4P2i6TBNbMLUaQKR6Ocze2nYLR3TY7oRAVwRjv86+d0B61y+DK2ftknwYE6ULzYl?= =?utf-8?q?jM399Y0TSuYjerwAC96vDvfOvMYO1Rmk1qNS4ful8LK3mYZMHw4NSGjlO5samuRKa?= =?utf-8?q?V16tBUsl1vw9Yh2bknf59e12dUcr7VBRAPfYt1KRbDQ0bnTLSfiOc+M03oHfAPZrM?= =?utf-8?q?zx7fX/vt/BCyyA+zl4SbzxIGTQtpaM6a6i6BtlEWFHDaiiti1gkbI2uR11DjyykBe?= =?utf-8?q?nayOa12g5pmb7WP8fM7inbfrrdwuN3VAHZHJjwyPqFxkCMan8HfB4R81jgaoE8nxv?= =?utf-8?q?e008D5eHvxFdRVINKhHtX364TNzM6u03wX6Rzt1ZwXGg6a76Rm2nk9qRooXe2RHau?= =?utf-8?q?v42h8onPjqbCWL8SuR0uzmVh0vXWC4NF+IZIn4cQiMt79ay5RkU37sFwnFUQ9oLBo?= =?utf-8?q?ecYFHd645TQYjMFZc2EW9x0fcppW+2AWZsC0aTt4vfNJhOkGLCuJZgMYU1Pk881Ef?= =?utf-8?q?J7zrX2E7Wjesj95h/9RAPUynJ4i0EodQ0H3f6p4r6z0Vvg/Kog+9/WDI/2PViGwYU?= =?utf-8?q?2oddmXKOaqt2PkK27EvuHLtFyth652YQHquDuAP1rErp9tRRqRCEth1ZIF4f7y0RN?= =?utf-8?q?cAYyuJiG+ri7tbI1UOhJEtrrLRLVFZmrM74xMOf2HKhOBqW/iIIR2yPDi9+X3U0Fm?= =?utf-8?q?Z6iK+ZkyWmdCT+pLSv9yHs9gpP+kQX9tCGHPYR36zVMhuaLqLPvuqtuhq4WBD1YpF?= =?utf-8?q?pa/JRnOjV1V2sL3jNodp098u9Dw317otwX1th5aFzrXFnXIjncuwoEEzA+NmwlGYC?= =?utf-8?q?pkuuC1CQDzfprN0RUoi2fleNbw0p3syeRi6tW8fVm9a47Kmw16DKgmNHVEl7FSrTS?= =?utf-8?q?187TBnH2xdXe6hKNg7soyyjbGRqj9uYBzQsTeGUooy+156zKcy2mYze4fQtP9Asy9?= =?utf-8?q?lo6qMYKxCAbnhOCFpW+VTlleD8us1kJ86Oqcx7mArlkS+GUWA7Mjn50168wz5Cump?= =?utf-8?q?p20fmPrBcAaM3x31SNhWUNq1MTghZLGRhNWzzaXz6FUu3b7iP//KI3JZHZ3578NyG?= =?utf-8?q?jpyxDRPf0VADPy9SoATvXTPy68yaHzrbXw40ynUURWwWV5TPOlYO1zxMo27ribcQh?= =?utf-8?q?Z6tOU/IcHXvi?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6fb2440-310b-4566-8bba-08dc304d8db0 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2024 06:48:02.8487 (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: VbzCzGOYWWcqNHUURhH7srSXgP27cfYEQHFBBpHaTs/tgWHtvAFznsmvTjAwxhRxl2GYx7OjBykyzagdXRRMSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB8011 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240217_224811_673659_786B2CF9 X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org - Add dt-bindings - i.MX95 ELE/V2X use same register layout as i.MX8ULP S4 MU, but the TR/RR num is different. To make code reusable and not add too much macros, add runtime detect number of TR and RR by reading PAR_OFF registers. - Add i.MX95 ELE/V2X MU entry in driver Signed-off-by: Peng Fan --- Changes in v7: - Per Jassi, separate the patch to add of_platform_populate. - Link to v6: https://lore.kernel.org/r/20240201-imx-mailbox-v6-0-76f4f35b403e@nxp.com Changes in v6: - Drop node labels and add Conor's R-b - Link to v5: https://lore.kernel.org/r/20240126-imx-mailbox-v5-0-7ff3a3d53529@nxp.com Changes in v5: - Per Conor, add restriction to sram property. - Since i.MX95 MU has SRAM, we may not see it is compatible with i.MX8ULP MU, so drop the fallback compatible - Add R-b for patch 2&3 - Link to v4: https://lore.kernel.org/r/20240125-imx-mailbox-v4-0-800be5383c20@nxp.com Changes in v4: - Address dt-binding comments in V2 from Krzysztof - Link to v3: https://lore.kernel.org/r/20240123-imx-mailbox-v3-0-ed932945e0bf@nxp.com Changes in v3: - Following dts coding style Per Krzysztof - Add return type for init function, patch 2 is new - Check return value when tr/rr is larger than 4 and return error. - Link to v2: https://lore.kernel.org/r/20240122-imx-mailbox-v2-0-7b3c80333b92@nxp.com Changes in v2: - Support sram property and add example - Populate the sram node in driver - Link to v1: https://lore.kernel.org/r/20240122-imx-mailbox-v1-0-81413f655210@nxp.com --- Peng Fan (6): dt-bindings: mailbox: fsl,mu: add i.MX95 Generic/ELE/V2X MU compatible mailbox: imx: support return value of init mailbox: imx: get RR/TR registers num from Parameter register tt mailbox: imx: populate sub-nodes mailbox: imx: support i.MX95 Generic/ELE/V2X MU .../devicetree/bindings/mailbox/fsl,mu.yaml | 58 +++++++++++++- drivers/mailbox/imx-mailbox.c | 88 ++++++++++++++++------ 2 files changed, 123 insertions(+), 23 deletions(-) --- base-commit: ad5c60d66016e544c51ed98635a74073f761f45d change-id: 20240122-imx-mailbox-243021d12030 Best regards,