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 6C1F1D609D5 for ; Wed, 17 Dec 2025 00:58:12 +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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ytj41CtGQIHNtmmDxwc5dNjrutvGTKMECQmmoJ9YXD4=; b=o+ZvTHwS/qJJkzSQi237XX1UXQ GWKunRRgwoX3LU3eXb+QfGRTzUMk4bvbhWsbZZwMrcLqCV2pJ8Ifz5LLIYWmpjtxi+jx31hOjpXMr KJWlnXeTgToS8GWpAns9to6iBjUDsB9lX81lJE6WRSMBK57/9lspwRJDLVJqceOw6XhnP+qi201C3 64KcW4w77i6bOQqn1NgS/a0f1sHMXol96josuQOweye+HHpTXiWMaeKdXAxJyymZVDH4ZEbEhuQOE jBM1971QuVUz7kGvalHw+4I6HxUlWksBvfF8H32QCaRtO/P5U/5BAiLfzWEKZyOusLTivslKSgxEz 86kl5tog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vVfrj-000000060Zx-29bA; Wed, 17 Dec 2025 00:58:07 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vVfrd-000000060Yr-2sqs for linux-arm-kernel@lists.infradead.org; Wed, 17 Dec 2025 00:58:05 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id D32D94362D; Wed, 17 Dec 2025 00:58:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 929E2C4CEF1; Wed, 17 Dec 2025 00:58:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1765933080; bh=ge5M9dXkRVBvU1InmOXnDkbI+F3eJwMWHPZtLxTMIXQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Uanko9ePj9E4OUmrNqv5kvF3VaANSVX3Cw84s8Gy3MK3u8iC6aSmyD5qenIzayqMj 4FTsJbk2C/eFMuSK0JzuE/JwU6S0FztzkScVllh8sLAqpwp0bL8QdqTaBrWIlzSXh3 PWHANg36DB9SKco/lWdIfjaMOkkaAcS3rBAtbQP2j06mhtv36rJtjO5yqe8osKtcHy YcX0OQKyo7AKxcfC03LZatIjLRk7kzOiM+Hf2PAo/yDsHDkmJT4bhSYy97BQabQKN5 tE3Bm7nohTtlMrOF6EEWuVG/hwgcSWG4E4s1CQ3kVJdQxZB38P/yC84LX0R32RyiEW zAt6EBLCJYltw== Date: Tue, 16 Dec 2025 18:57:58 -0600 From: Rob Herring To: Shenwei Wang Cc: Linus Walleij , Bartosz Golaszewski , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , Jonathan Corbet , Pengutronix Kernel Team , Fabio Estevam , Peng Fan , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-imx@nxp.com Subject: Re: [PATCH v6 1/5] dt-bindings: remoteproc: imx_rproc: Add "rpmsg" subnode support Message-ID: <20251217005758.GA3452672-robh@kernel.org> References: <20251212194341.966387-1-shenwei.wang@nxp.com> <20251212194341.966387-2-shenwei.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251212194341.966387-2-shenwei.wang@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251216_165801_770519_46F3999B X-CRM114-Status: GOOD ( 24.62 ) 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 On Fri, Dec 12, 2025 at 01:43:37PM -0600, Shenwei Wang wrote: > Remote processors may announce multiple devices (e.g., I2C, GPIO) over > an RPMSG channel. Which channel does that happen on? > These devices may require corresponding device tree > nodes, especially when acting as providers, to supply phandles for their > consumers. > > Define an RPMSG node to work as a container for a group of RPMSG channels > under the imx_rproc node. > > Each subnode within "rpmsg" represents an individual RPMSG channel. The > name of each subnode corresponds to the channel name as defined by the > remote processor. > > All remote devices associated with a given channel are defined as child > nodes under the corresponding channel node. > > Signed-off-by: Shenwei Wang > --- > .../devicetree/bindings/gpio/gpio-rpmsg.yaml | 49 +++++++++++++++++ > .../bindings/remoteproc/fsl,imx-rproc.yaml | 54 +++++++++++++++++++ > 2 files changed, 103 insertions(+) > create mode 100644 Documentation/devicetree/bindings/gpio/gpio-rpmsg.yaml > > diff --git a/Documentation/devicetree/bindings/gpio/gpio-rpmsg.yaml b/Documentation/devicetree/bindings/gpio/gpio-rpmsg.yaml > new file mode 100644 > index 000000000000..b3e1a5dbf731 > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpio/gpio-rpmsg.yaml > @@ -0,0 +1,49 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/gpio/gpio-rpmsg.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Generic GPIO driver over RPMSG The driver doesn't go over RPMSG. It's a GPIO provider or protocol. > + > +maintainers: > + - Shenwei Wang > + > +description: > + On an AMP platform, some GPIO controllers are exposed by the remote processor > + through the RPMSG bus. The RPMSG GPIO transport protocol defines the packet > + structure and communication flow between Linux and the remote firmware. Those > + controllers are managed via this transport protocol. Got a reference to where any of this is defined? > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - fsl,rpmsg-gpio > + - const: rpmsg-gpio > + - const: rpmsg-gpio > + > + reg: > + maxItems: 1 I still don't understand how 'reg' is determined. You may have explained it previously, but *this* patch needs to make me understand. > + > + "#gpio-cells": > + const: 2 > + > + gpio-controller: true > + > + interrupt-controller: true > + > + "#interrupt-cells": > + const: 2 > + > +required: > + - compatible > + - reg > + - "#gpio-cells" > + - "#interrupt-cells" > + > +allOf: > + - $ref: /schemas/gpio/gpio.yaml# > + > +unevaluatedProperties: false > diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml > index 57d75acb0b5e..fd8e5a61a459 100644 > --- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml > +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml > @@ -84,6 +84,33 @@ properties: > This property is to specify the resource id of the remote processor in SoC > which supports SCFW > > + rpmsg: > + type: object > + additionalProperties: false > + description: > + Present a group of RPMSG channel devices. > + > + properties: > + rpmsg-io-channel: > + type: object > + additionalProperties: false > + properties: > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + patternProperties: > + "gpio@[0-9a-f]+$": > + type: object > + $ref: /schemas/gpio/gpio-rpmsg.yaml# > + unevaluatedProperties: false > + > + required: > + - '#address-cells' > + - '#size-cells' > + > required: > - compatible > > @@ -146,5 +173,32 @@ examples: > &mu 3 1>; > memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>, <&rsc_table>; > syscon = <&src>; > + > + rpmsg { What's the purpose of this node? Is it going to contain things other than "rpmsg io channels"? > + rpmsg-io-channel { > + #address-cells = <1>; > + #size-cells = <0>; > + > + gpio@0 { > + compatible = "rpmsg-gpio"; > + reg = <0>; > + gpio-controller; > + #gpio-cells = <2>; > + #interrupt-cells = <2>; > + interrupt-controller; > + interrupt-parent = <&rpmsg_gpioa>; > + }; > + > + gpio@1 { > + compatible = "rpmsg-gpio"; > + reg = <1>; > + gpio-controller; > + #gpio-cells = <2>; > + #interrupt-cells = <2>; > + interrupt-controller; > + interrupt-parent = <&rpmsg_gpiob>; > + }; > + }; > + }; > }; > ... > -- > 2.43.0 >