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 33C1CCA0FE9 for ; Tue, 26 Aug 2025 20:11:59 +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=oDEJJsYOGArrmsz2LgsidR72UlMu08vWwhjBe4NMFy0=; b=Kw1Puyi6hfgKqAcinLqECaReb/ YTtcpRVSWyGL2MLP14/eIGxwRsGn9LuZ/gPDskcfa1nFpAshZ/DpK7RpcJbZmLBXQWXDBuIT3j022 oN8Y1/I201KT287wFG5EiDbUIek9fM7+HXBYk1T/mYgoDPjAeWtYyv9TjXyVM52loDJJ5Is0G6d3i swCr+Q4AlhbzHJkyqERmeX+uS9r4ATyZdayeKuxt1ezV1LUQFd9xB+uX/m8le0eAjFNno4qc4XLwo wHUyE9GZmTd0pvxBf7XNcXpLFAydOTL49vnYcdhzQFZjJBLqUjRvx9Bj0CKMlFaTo5jUYdcHCoVoz p0QePHBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ur01J-0000000D5J8-404M; Tue, 26 Aug 2025 20:11:53 +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 1uqzyc-0000000D59Z-1OTk for linux-arm-kernel@lists.infradead.org; Tue, 26 Aug 2025 20:09:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 0B6C34507B; Tue, 26 Aug 2025 20:09:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BA1AC4CEF1; Tue, 26 Aug 2025 20:09:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756238945; bh=De6tXlh/83GdnOt9bMTPx+Vmn3L3ISZ/uryMZcIrB5w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Rsze/N9tQPzXjNLqiKo/xJtWAqCNAVk3sr4XHPf755WUo82wNXx9PTkEMrWRq1uBI 8UNuaJdpCWxB/fpnvFIJW5YM2VVLdH7nXkRSXRHTeyRhCGRQAlFfrP0684iNyWY3pz zK+RDB3Q6k1xR3nyG37s5imD22axHTdFaqAdpoXrtQaugje8iVFo1lFp4nAEAOs9cT 2egbEcuTbBBU6WfsKkFhBlLL130t/V3VqFEnCqhNWhnG8WrTkuqoYCK5YbN7WsD60b jxS/3iDWzefeMq6U4Fr/AdEmLEeEruKsW2AGRbPzMsIY2WKvEY4F/xqoTAOAplHEIp dXBKIEF0FCieg== Date: Tue, 26 Aug 2025 15:09:04 -0500 From: Rob Herring To: Shenwei Wang Cc: Bjorn Andersson , Mathieu Poirier , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Linus Walleij , Bartosz Golaszewski , Pengutronix Kernel Team , Fabio Estevam , Peng Fan , linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: Re: [PATCH 1/4] dt-bindings: remoteproc: imx_rproc: Add "rpmsg" subnode support Message-ID: <20250826200904.GA375876-robh@kernel.org> References: <20250818204420.794554-1-shenwei.wang@nxp.com> <20250818204420.794554-2-shenwei.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250818204420.794554-2-shenwei.wang@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250826_130906_414409_B7B6953B X-CRM114-Status: GOOD ( 20.72 ) 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 Mon, Aug 18, 2025 at 03:44:17PM -0500, Shenwei Wang wrote: > Remote processors may announce multiple devices (e.g., I2C, GPIO) over > an RPMSG channel. 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. How is each channel addressed? Are they really grouped by type first (i2c, gpio, etc.) then an address within the group? Or is there some flat channel numbering? If the latter, then the addresses in the DT shoulc match the channel number. > > Signed-off-by: Shenwei Wang > --- > .../bindings/remoteproc/fsl,imx-rproc.yaml | 117 ++++++++++++++++++ > 1 file changed, 117 insertions(+) > > diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml > index 57d75acb0b5e..a105aac798d0 100644 > --- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml > +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml > @@ -84,6 +84,86 @@ 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: > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + rpmsg-io-channel: > + type: object > + unevaluatedProperties: false > + properties: > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + patternProperties: > + "gpio@[0-9a-f]+$": > + type: object > + unevaluatedProperties: false > + properties: > + compatible: > + enum: > + - fsl,imx-rpmsg-gpio > + > + reg: > + maxItems: 1 > + > + required: > + - compatible > + - reg > + > + allOf: > + - $ref: /schemas/gpio/gpio.yaml# > + - $ref: /schemas/interrupt-controller.yaml# This is not needed nor sufficient. You need to define the cell sizes for gpio and interrupt cells. > + > + required: > + - '#address-cells' > + - '#size-cells' > + > + rpmsg-i2c-channel: > + type: object > + unevaluatedProperties: false > + properties: > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + patternProperties: > + "i2c@[0-9a-f]+$": > + type: object > + unevaluatedProperties: false > + properties: > + compatible: > + enum: > + - fsl,imx-rpmsg-i2c > + > + reg: > + maxItems: 1 > + > + required: > + - compatible > + - reg > + > + allOf: > + - $ref: /schemas/i2c/i2c-controller.yaml# > + > + required: > + - '#address-cells' > + - '#size-cells' > + > required: > - compatible > > @@ -146,5 +226,42 @@ examples: > &mu 3 1>; > memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>, <&rsc_table>; > syscon = <&src>; > + > + rpmsg { > + rpmsg-io-channel { > + #address-cells = <1>; > + #size-cells = <0>; > + > + gpio@0 { > + compatible = "fsl,imx-rpmsg-gpio"; > + reg = <0>; > + gpio-controller; > + #gpio-cells = <2>; > + #interrupt-cells = <2>; > + interrupt-controller; > + interrupt-parent = <&rpmsg_gpioa>; > + }; > + > + gpio@1 { > + compatible = "fsl,imx-rpmsg-gpio"; > + reg = <1>; > + gpio-controller; > + #gpio-cells = <2>; > + #interrupt-cells = <2>; > + interrupt-controller; > + interrupt-parent = <&rpmsg_gpiob>; > + }; > + }; > + > + rpmsg-i2c-channel { > + #address-cells = <1>; > + #size-cells = <0>; > + > + i2c@0 { > + compatible = "fsl,imx-rpmsg-i2c"; > + reg = <0>; > + }; > + }; > + }; > }; > ... > -- > 2.43.0 >