From mboxrd@z Thu Jan 1 00:00:00 1970 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 60DE4EEA854 for ; Thu, 12 Feb 2026 21:38:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-ID:Date:Subject:Cc:To: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=9u+o5I7Nd09Hz7oiEvZoe78/DtPn0vzoJC/yhbNUzig=; b=jGUhXPxPJWks1LEV8t3zk2TQKv ui9tW4lJLzN6IPl1RrYBwSLJJhEp2xNmJ/p8yte2+5EIMQclFhJmNoeXkoD8TcDzvCp9h8OPtPl4P qYrqeRJZ5LfPH6ejLacVBXPAoVgOzLsECCYaN0FEnRVRW99ohLt1wdVrIFlBxxO4XDKkOOhvDAJCt Rwe5glkv/Pazld66IZrWajfkFmJdCYfOeZy0e6GQ9vHBIVUQZvWH0lVRnaoPvvR12tBaTxG0tEeNA Uy1Jh0CbA+IdWMgSCCRTjbE6b1Z/fTEhVMzo/7Mrvk7Yt2vxWqfnFkIfBgm2xJk250ZqkpqRonRLl xbql3AKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vqeNn-00000002ecj-1dTf; Thu, 12 Feb 2026 21:37:55 +0000 Received: from mail-francecentralazon11013038.outbound.protection.outlook.com ([40.107.162.38] helo=PA4PR04CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vqeNl-00000002ec9-1ZEW for linux-arm-kernel@lists.infradead.org; Thu, 12 Feb 2026 21:37:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dyEtpIm0KvwuFRJ241bFPInoPS3wv2GPq7CPobS4vi87FkBxbCY6O8wf1lrUqFGKFPPDRGuN3/4ElPGc1mUcgT0BL6wQ7huxT/YNUZLebIdfuFbHMTjvzb8NFucUFvZWbyyQyKk9fnHdWLGMCZfQKQ6wXsvvkG7ihqetClQHUwxeJzlrHAbDtdda0mph9sHPKM7NGNtZNXda7vnm4Xd9X183yPfCV1WFl/HTnPpy/r2Swu7v9tuZ54rcGNxpFsQ3bZEvuTFJcNN+0SoxzTbwGw5frO6+9plMMfzpJwhvgqbTcd9uBtr5jMenHZLZL8YkPXhemCFfPQgqsw/mBfrhdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=9u+o5I7Nd09Hz7oiEvZoe78/DtPn0vzoJC/yhbNUzig=; b=kCFpuD0lRx7WMmB3X0lO800cVN3qW+GKrgRHVCtN7tv920sXx8RSIfnwKqsJIX9iKM/0M+HW1zMpu5I8yeAkgNJxwtSc1KvKzzu9l9XUtGXt3o/DZtnh38L2AEs880q3KKu1lzmsFp0MVuEvcq3BVx4DYfquvTCddkJBnDvVV/G3NvZ/2GWO3hUWjImhlpMN3jb96SE0CCUbNh/rkG68CwtXluV15d56MCsg4xXG3gXa9EY9JGqGiJPqCIop1qz/QlbrHvyo8l1rqpOc23PGDywpllhIluPJ+JAtnr2kGp11PP8liptmU0yPRSJtC7YJ0oxs3CSdlbKmieSDCxILWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9u+o5I7Nd09Hz7oiEvZoe78/DtPn0vzoJC/yhbNUzig=; b=Lq2yowtJOjE6XR0JyMdFI59LbNMy9ognYbVx0LbIUiA4oS++5xWzV5Mqac2uGL+KYLcHMwL3lgpBlgG+oO7WBLtAH624SbDaOUShoYWjeKjFhgimZwNrrhizWheYnm4veKliVQ58i0g+aiHYmV5sInKJuotPkRHB8qU3sqVdHj0YBoNZBhtWswaGPXr8apW7qgiogYYXEu6YcVRtC+M+1oMq/SuE6wfOltlXJvzEO2qqbnLhClJb9diOHiNL7TdCbOHEzuXPWqckSvov2UDNmODAHpaof0sn6we7GzK/ZCt2b4InMhLdcEBoQzPbHAttApvZcS+qTpVWOqI0AkDxJQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) by PA4PR04MB7936.eurprd04.prod.outlook.com (2603:10a6:102:c6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9611.10; Thu, 12 Feb 2026 21:37:47 +0000 Received: from PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::b4c0:6119:2228:2ceb]) by PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::b4c0:6119:2228:2ceb%4]) with mapi id 15.20.9611.008; Thu, 12 Feb 2026 21:37:47 +0000 From: Shenwei Wang To: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Mathieu Poirier , Frank Li , Sascha Hauer Cc: Shuah Khan , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Pengutronix Kernel Team , Fabio Estevam , Shenwei Wang , Peng Fan , devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, arnaud.pouliquen@foss.st.com Subject: [PATCH v8 0/4] Enable Remote GPIO over RPMSG on i.MX Platform Date: Thu, 12 Feb 2026 15:36:52 -0600 Message-ID: <20260212213656.662437-1-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.43.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: PH7PR17CA0040.namprd17.prod.outlook.com (2603:10b6:510:323::26) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|PA4PR04MB7936:EE_ X-MS-Office365-Filtering-Correlation-Id: 98642628-7c66-450a-c7da-08de6a7ef6dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|19092799006|366016|7416014|52116014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?VfGiYZowMDF7Urm/ULNfFPRMiMTDNYHHkCgBcQytx/vbf4PRvSazWv7VZTHk?= =?us-ascii?Q?U2xDC4jAFwyDY50PLQWXxxVDr1b/rjN0W5/tHUvD/t5BJryNWp59AA9rx8Ck?= =?us-ascii?Q?1Z0eIjQ8tevG4MQTO/tAePWeFiJHaLYcKo0ifTP+MtcbK5H4SSj7tO7z5A5J?= =?us-ascii?Q?5o0ET7eiPba0hONZBDWfZnQ3JSRAueHbJyL8Raess6NcIAhP0SDGtXwIU5Ji?= =?us-ascii?Q?krmEBdPHeq7Js6B/8zn9KmfAsPP+U32iWR+k6dg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63dFpMHOLWAJTBScXyw5e/iPiN0JlfS8gscLUsk1pnqthf4?= =?us-ascii?Q?crVrKi0BNqWPp4LNO0BMmtn8HuFn8oCNY5aGHG30xZFUbPv6UxPmx4GuWoLi?= =?us-ascii?Q?hvS0ndylt9Fwn1RWiG0WqiruF+PT5akIWnCKSYFKzLWXeWEf7ZJtYG3tSCbO?= =?us-ascii?Q?Jor5xb+hJJfmn8v9kmgb7RyYcqhu0uln3PoLt/rEEL+6x1l6Ym+AcbyPL5gO?= =?us-ascii?Q?YI2K9bVuSmsa7/2I8T3qqP90NINrT7DVWDvEONUdhtf/FfLoIJBAe8OhWFb1?= =?us-ascii?Q?zVnxV48Y+uEF66RoFWxZ033yCwpZGbF9xOr16IFNAqg47mN3TXQ12sWIqUEO?= =?us-ascii?Q?vku1qDpFsF5YBUkGurCLFtERjlMPIHjXN833EvBtdbnVGSmDS8qvRsESMxpV?= =?us-ascii?Q?cGLBa0k8xhChUTSPMR9Xf5gN4g0POvKRuwSmEzObkaSaRvNPukRV2g1P7HWM?= =?us-ascii?Q?ZmhCnenaEyQvHZjgydZ+mKFw0nJ7lPnDWqJW1toP9MU4?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9185.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(19092799006)(366016)(7416014)(52116014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?bNSj1mypChlNQnwiYixQIktEY9mwxalV9sNejzI/f8XgzVDILBP+0RIU5tbh?= =?us-ascii?Q?Spv8HvzRtbqz4dYH5/ITz1cJFvdFTVh9tNAPwM2FR/joZb+lKr8Qe8SRs4Vo?= =?us-ascii?Q?teXQC7bifNoiyIg8B8nEFmAhouU+/yUyo9iN5jbUKBPV5shcCtK2iGn/6Fc9?= =?us-ascii?Q?TYYmPDeFZgZvZe33LJw92PkLV+YyQ+DSVzKWA9y2+buglu00TtBvDqMi2Dfb?= =?us-ascii?Q?AKCSwmegGobw/Q5mSxucBFkFFEk0kyUorpTk0+ILZkpN+JApoPJ0LL13fup5?= =?us-ascii?Q?ReZTsCRdJNhcsMEunF+a+Guz+UU4LdgPZW2n0EYfRUepa/nAAkNA5mb867fE?= =?us-ascii?Q?0yeDwFF+sgDh5HyeddUK+oCmRT+BPGzObwJB12u8+0GQNjaiNc3CltFsUZMf?= =?us-ascii?Q?5tKpzAiOQA4wVmADhf95At6Oj30ki+C+nqaojhOO+AIUqvrVHfBmMk6AUKID?= =?us-ascii?Q?CLKx8Zz2YyIQSAY4ic8eji8m3MXTRrqIe8dhavntScwegSfqAX1zn60AqTiI?= =?us-ascii?Q?+OxWvVEQqkmvf5eKqx1mQfcvn5o68I8CB2yEDbwAU2wBpE0KF3gTzindx4PT?= =?us-ascii?Q?S584BALK/tUwJnRFc3nE6Q6ARWiH07Kp5AYAkff/lMWBU1GODnaO5lQNdvQf?= =?us-ascii?Q?zKRtDnKtBxq45HLz55LWx+I84JVy67E7f+QLXoltHSKzUqOSi3V+pyCz7ycb?= =?us-ascii?Q?wgMJN6FqbB5UytyhFaymXlLt6tenhUisdUu25nM7zZ5YWz1qHgR/j6tkEFYS?= =?us-ascii?Q?GxspG5xdwyI1lX5Y+h2IIGbfzK5B2q7QjpZXqf8nQXmneapY3QPK3GQPlqNO?= =?us-ascii?Q?ABh7fxDp56VyZ9hhM98vO2vinMJbKyh5mue7weYltwkBDT2QXTtl5+RL/6jc?= =?us-ascii?Q?PD+Y/f8YrZJH6oT7OApmHcJAsmcQvGhg//WQz1Fe2FEj0da2RTE+4tBSZjIn?= =?us-ascii?Q?MRmklfhehLUgg4R/gCsJLqpgImktafy9MlJPr0y+UcfRz0UGk43tfW2AWD8C?= =?us-ascii?Q?dpwWp15fwQypfgviP7ioVncBKyw77bB4lGrdrJ33S+IhsNi60teCExOfRtXZ?= =?us-ascii?Q?b6Pl+u1KAbxmgRWcvrLUnC1Wts/WxpfCDBsXOUDD3ZL6gfwVGbfSj3wQ0T/o?= =?us-ascii?Q?pGCo6uDvvSuO+nqWB5JWbltuPFKVrWYHS3Yc0P/FwDsrJMySVG1rHkF2Oqjn?= =?us-ascii?Q?rcw3bvbZApodgds/WCmk5OmKSXyXvKG0ieV/dqJnCaxbUZgjgW0h+EXdgm+O?= =?us-ascii?Q?QeYVSmmVAePhmMc38yeIMaUizZtVIL+KSKQ6kx0TKDyQlYlENpJywzi1eLNF?= =?us-ascii?Q?+Vvm22cbfIQOFxYrR3nCPuTjTRHim9PXXCEGdATV+qfhU6B6e8a0vLUIHVQc?= =?us-ascii?Q?+HaMNGD7Jrwix6/J4buUrD0zMQoH+MJ87n6cI6oLGXZMt6aEurFlJ8cXbGi5?= =?us-ascii?Q?WK8j/owS460/fcq1fP+6Fn574sYKhZhM7X3fOhucTVlgMgQ4GXdJy3Li9Btr?= =?us-ascii?Q?rv29TLuaioNKrGW1kiX50yTYKIRT5CjfAk05pZXu23fUHVKV9eSXpNxRFZs2?= =?us-ascii?Q?ArnhP35MMKoYCrCgtl8gIyy7IB7lTkSrRHtV6gv20jafuucePDGEN+J+Bn57?= =?us-ascii?Q?0H1GiurBTk4Km2TuO76swvO/wDNMaJQ+Zr6BnvitBOYBYwokdXT+JQKMtCHP?= =?us-ascii?Q?3I05dI+rNI/BC0Zd3WE+ItBpGAehda0xAK/TBZiWHJ1TLZwQY5ZYkpatz8sD?= =?us-ascii?Q?iZiDZ1H1/w=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98642628-7c66-450a-c7da-08de6a7ef6dc X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2026 21:37:47.5689 (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: /CARB7P/PrgQBLYUqk0SuvPIVHG+3JDTxDFHGyQI+LttK0ll3vt7Yyc+y16ucDvuJhfNfz6SJtOMr/pbCaVklQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7936 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260212_133753_449274_9F7CB565 X-CRM114-Status: GOOD ( 18.54 ) 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 Support the remote devices on the remote processor via the RPMSG bus on i.MX platform. Changes in v8: - Add "depends on REMOTEPROC" in Kconfig to fix the build error reported by the kernel test robot. - Move the .rst patch before the .yaml patch. - Handle the "ngpios" DT property based on Andrew's feedback. Changes in v7: - Reworked the driver to use the rpmsg_driver framework instead of platform_driver, based on feedback from Bjorn and Arnaud. - Updated gpio-rpmsg.yaml and imx_rproc.yaml according to comments from Rob and Arnaud. - Further refinements to gpio-rpmsg.yaml per Arnaud's feedback. Changes in v6: - make the driver more generic with the actions below: rename the driver file to gpio-rpmsg.c remove the imx related info in the function and variable names rename the imx_rpmsg.h to rpdev_info.h create a gpio-rpmsg.yaml and refer it in imx_rproc.yaml - update the gpio-rpmsg.rst according to the feedback from Andrew and move the source file to driver-api/gpio - fix the bug reported by Zhongqiu Han - remove the I2C related info Changes in v5: - move the gpio-rpmsg.rst from admin-guide to staging directory after discussion with Randy Dunlap. - add include files with some code improvements per Bartosz's comments. Changes in v4: - add a documentation to describe the transport protocol per Andrew's comments. - add a new handler to get the gpio direction. Changes in v3: - fix various format issue and return value check per Peng 's review comments. - add the logic to also populate the subnodes which are not in the device map per Arnaud's request. (in imx_rproc.c) - update the yaml per Frank's review comments. Changes in v2: - re-implemented the gpio driver per Linus Walleij's feedback by using GPIOLIB_IRQCHIP helper library. - fix various format issue per Mathieu/Peng 's review comments. - update the yaml doc per Rob's feedback Shenwei Wang (4): docs: driver-api: gpio: rpmsg gpio driver over rpmsg bus dt-bindings: remoteproc: imx_rproc: Add "rpmsg" subnode support gpio: rpmsg: add generic rpmsg GPIO driver arm64: dts: imx8ulp: Add rpmsg node under imx_rproc .../devicetree/bindings/gpio/gpio-rpmsg.yaml | 55 ++ .../bindings/remoteproc/fsl,imx-rproc.yaml | 53 ++ Documentation/driver-api/gpio/gpio-rpmsg.rst | 236 +++++++ Documentation/driver-api/gpio/index.rst | 1 + arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 25 + drivers/gpio/Kconfig | 17 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-rpmsg.c | 588 ++++++++++++++++++ 8 files changed, 976 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-rpmsg.yaml create mode 100644 Documentation/driver-api/gpio/gpio-rpmsg.rst create mode 100644 drivers/gpio/gpio-rpmsg.c -- 2.43.0