Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp900207ybd; Wed, 26 Jun 2019 07:51:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+ddcMGlEQK/64LWUgEAq0rhFVLck5AZwUqDhTtd+KFcqiZWEwbMS/N9nDQ3X+plYBexrQ X-Received: by 2002:a17:902:9a46:: with SMTP id x6mr1315391plv.157.1561560691320; Wed, 26 Jun 2019 07:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561560691; cv=none; d=google.com; s=arc-20160816; b=huoK5qWDDNvmy8fXVQHlTTX3jkiwNjEyAefEJ0etZ4o/xCmC7twoCBfqiLVZJ7fzl0 NQiDLFNbrcHetT4Kv15ApGEO4So30zzW6MAbfzrSPFukJajPHV4EBIDyqs8tQF9iU8DA /Ya9NUd4jnVuNRJjB3dlKDXjq2mjcGXG/N+eI7+zrIWAXyp/2Hygo6c106iE0uCxtywG gibWG+t07mjr3mq5f1JPg60qTiQY8Ag3ZszJo5FlA9tv/OxG+/wVjdjJk0i74BTW5aTR AVNCamLOAttpjUdXRoE+y3yYmDb9iIP1LYzza/BZBbCGlqevvd05CgD63mIBvQhxHeYX q3xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ECyt5vpAqWKFoSesBXtQvTFCZ7b8NPpG6514f3+peBM=; b=tvOjLt9zVlhewZqj1YM+PkdAxgQfk368EZmr0rrVB7m5f9h5zGlC/AH4VArLOIqZej ad1lhXeuja3PlouN66Mq690SX2RdtsvwSKN/GuA4nOc5Bo+XBlVOxmjW0pszd1/GIEK0 F9/FXz+t4HaPxJosmcDO0YCbfSA/3u98bu2wgotQwgVyuzE6UfykfdDlIRCvmuz5wSfc RngDV7fuHrQrGlGGBKzC3zJdstWmJTAgRQVMmMf8sWHJ9iUnSKkpuX48tRZm6poxRa6u MSEG+uUnLoL+ExjKy06FyEmsr5+ZQ6IyHczdssdjnG7s/UdR3AGi87mLbIyNB615WF2/ nxzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bvLQhbNx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9si2214143pjs.48.2019.06.26.07.51.15; Wed, 26 Jun 2019 07:51:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bvLQhbNx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727957AbfFZOtg (ORCPT + 99 others); Wed, 26 Jun 2019 10:49:36 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55623 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbfFZOtf (ORCPT ); Wed, 26 Jun 2019 10:49:35 -0400 Received: by mail-wm1-f65.google.com with SMTP id a15so2408003wmj.5; Wed, 26 Jun 2019 07:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ECyt5vpAqWKFoSesBXtQvTFCZ7b8NPpG6514f3+peBM=; b=bvLQhbNxtQl2dD5Zacz1NqKOVgyIMvJxzsmO+2Riu4LERygWj6oSSB8dCTnlQRzHBJ WBcMIUnVXHzRJq2PnULFDQEFau/8R+M6cBXdjbooJor1DbcFp1O8fWIkcZ1i53zf0IA5 5oz8pE70hgB30UagR+kfeZ38bPeUYsebU5aRY0ZeeiThmo068Pemx1OgojGZ1CiE+1js 55uJGDTtgOnsyOiEV5lcLBQOwVxfxVzaPBYRHGynEOdSWJCBC4rnsxa7VlSbB2g0sed8 tXxh29kQ2ud6ODQQqHFPs8Mko1IwBjKs4tAlDVR64YxnpV4eEubO4KnwE4xqOZYGSPQe fzww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ECyt5vpAqWKFoSesBXtQvTFCZ7b8NPpG6514f3+peBM=; b=JIhajcV8Tg9WLi9kzFY0C4UL0vzWy2aL1680Sjgn+LO3KJelBqvTIt8dG8bGpQB/vr Q8vbnIw80gCuxytqEX3NUPumdhT0VdTjscIAyh+SG4tz7+qgccN9qty6ZAC8yxNZ2Q7p 4lYOLh8WgMaa6l9ad3N4pJFDwQO1ypmAJqubZdRANB0w6IISyswFdnBDhcjtiVB2oePQ N64ywgg+iotvijiq2Rs963AqrYQsksMDE9kryjH9417OxZSMaRiNmH52+YYzxBNlTm3t JqPJbuBXifuZlWMWKOOrxBkTkwujRmGCn5dCwCoAGK7UPi2oX/DOynMUwKIZFvVxRRu2 gGSQ== X-Gm-Message-State: APjAAAVSg2gquQzXXIkQjnBNkU+dS5Lh/diCnIkIHoCbppkFihxeytax WvaPG6su3DbimOzvndpj1IgDlVsed+YbXnbn2plMDta1Peo= X-Received: by 2002:a7b:c051:: with SMTP id u17mr2957974wmc.25.1561560572892; Wed, 26 Jun 2019 07:49:32 -0700 (PDT) MIME-Version: 1.0 References: <20190614081650.11880-1-daniel.baluta@nxp.com> <20190614081650.11880-3-daniel.baluta@nxp.com> In-Reply-To: From: Daniel Baluta Date: Wed, 26 Jun 2019 17:49:21 +0300 Message-ID: Subject: Re: [PATCH 2/2] dt-bindings: arm: fsl: Add DSP IPC binding support To: Rob Herring Cc: Daniel Baluta , Shawn Guo , Sascha Hauer , "S.j. Wang" , Fabio Estevam , NXP Linux Team , Dong Aisheng , Anson Huang , "linux-kernel@vger.kernel.org" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Mark Rutland , Devicetree List , Oleksij Rempel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, This is my first time documenting the bindings using the new yaml format so thanks for your patience and explanations! On Fri, Jun 14, 2019 at 5:53 PM Rob Herring wrote: > > On Fri, Jun 14, 2019 at 2:15 AM wrote: > > > > From: Daniel Baluta > > > > DSP IPC is the layer that allows the Host CPU to communicate > > with DSP firmware. > > DSP is part of some i.MX8 boards (e.g i.MX8QM, i.MX8QXP) > > > > Signed-off-by: Daniel Baluta > > --- > > .../bindings/arm/freescale/fsl,dsp.yaml | 43 +++++++++++++++++++ > > bindings/dsp/... Fair enough. Will fix in v2. > > > 1 file changed, 43 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,dsp.yaml > > > > diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,dsp.yaml b/Documentation/devicetree/bindings/arm/freescale/fsl,dsp.yaml > > new file mode 100644 > > index 000000000000..16d9df1d397b > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,dsp.yaml > > @@ -0,0 +1,43 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > The preference is to dual license new bindings: GPL-2.0 OR BSD-2-Clause > > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/arm/freescale/fsl,dsp.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: NXP i.MX IPC DSP driver > > This isn't a driver. I see. This node is actually the representation of DSP IPC so not a driver. > > > + > > +maintainers: > > + - Daniel Baluta > > + > > +description: | > > + IPC communication layer between Host CPU and DSP on NXP i.MX8 platforms > > + > > +properties: > > + compatible: > > + enum: > > + - fsl,imx-dsp > > You can have a fallback, but it needs SoC specific compatible(s). Agree. Will fix in v2. > > > + > > + mboxes: > > + description: > > + List of phandle of 2 MU channels for TXDB, 2 MU channels for RXDB > > + (see mailbox/fsl,mu.txt) > > + maxItems: 1 > > Should be 4? Actually is just a list with 1 item. I think is the terminology: You can have an example here of the mboxes defined for SCU. https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/freescale/imx8qxp.dtsi#L123 > > > + > > + mbox-names > > + description: > > + Mailboxes names > > + allOf: > > + - $ref: "/schemas/types.yaml#/definitions/string" > > No need for this, '*-names' already has a defined type. So, should I remove the above two lines ? > > > + - enum: [ "txdb0", "txdb1", "rxdb0", "rxdb1" ] > > Should be an 'items' list with 4 entries? Let me better read the yaml spec. But "items" list indeed sounds better. > > > +required: > > + - compatible > > + - mboxes > > + - mbox-names > > This seems incomplete. How does one boot the DSP? Load firmware? No > resources that Linux has to manage. Shared memory? This is only the IPC mailboxes used by DSP to communicate with Linux. The loading of the firmware, the resources needed to be managed by Linux, etc are part of the DSP node. To avoid confusion I have renamed this node from dsp to dsp_ipc. > > > + > > +examples: > > + - | > > + dsp { > > + compatbile = "fsl,imx-dsp"; > > + mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1"; > > + mboxes = <&lsio_mu13 2 0 &lsio_mu13 2 1 &lsio_mu13 3 0 &lsio_mu13 3 1>; > > mboxes = <&lsio_mu13 2 0>, <&lsio_mu13 2 1>, <&lsio_mu13 3 0>, <&lsio_mu13 3 1>; Actually no! It looks like the imx mailbox expects one element with a list of phandles directions and index. See again, how SCU uses the mailbox node. https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/freescale/imx8qxp.dtsi#L123 > > > + }; > > -- > > 2.17.1 > >