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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0189C432BE for ; Thu, 2 Sep 2021 15:17:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C49EC6023F for ; Thu, 2 Sep 2021 15:17:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345723AbhIBPST (ORCPT ); Thu, 2 Sep 2021 11:18:19 -0400 Received: from mail-oo1-f43.google.com ([209.85.161.43]:33528 "EHLO mail-oo1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345637AbhIBPST (ORCPT ); Thu, 2 Sep 2021 11:18:19 -0400 Received: by mail-oo1-f43.google.com with SMTP id v20-20020a4a2554000000b0028f8cc17378so647859ooe.0; Thu, 02 Sep 2021 08:17:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Wb8GAkVFI8Sl87zRPGOegu+hAFVLLxzYkVhxsVOueuQ=; b=Vv9njS9fL7fz/8eYVG3kqVGV4ZQecwHTdU2gCfxrzVE0JlazpUTBeaEKct4gYMKWVa PAjXHiW3GUWWat+C8oFMpcqw/efk8VpIqTVv4jI3+YW5wlis4ivbnSaiQj8lnWUwW+RF w/bbXp93OTIfmRJtimMehK7GiMKOMzfoSKJiDAmhW3DdfznSdYYNbi2x509AipUHJKCi SMUhwglcJW35DixDzygQINyRgmZyyAfQfIwfwcgabdM0TU76KhKg3FFbphiwMjab6smI 1f4y3VaKg9R/9qWZAyP5PKeXjHYl8Mj2hz7wK9S2fvjcOlxc9zMA/PVAs+6z36wbzs0G 4swQ== X-Gm-Message-State: AOAM532w8YL4ZJpD3LwC92h0Pp0vyEjGTpzkqkakw6VrqlrkRiUNL0Em Ad/1x5+sUt3o1OXQDDvJmA== X-Google-Smtp-Source: ABdhPJyHT2iskMmpIirm793k/KgiFwRfX7emNwuGQj8LONOKcauHnPKJaq88rx2wFJQuHLCYfFFShw== X-Received: by 2002:a4a:ba0f:: with SMTP id b15mr3027879oop.31.1630595840199; Thu, 02 Sep 2021 08:17:20 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id z78sm419358ooa.29.2021.09.02.08.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 08:17:19 -0700 (PDT) Received: (nullmailer pid 936408 invoked by uid 1000); Thu, 02 Sep 2021 15:17:18 -0000 Date: Thu, 2 Sep 2021 10:17:18 -0500 From: Rob Herring To: Shengjiu Wang Cc: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, shengjiu.wang@gmail.com Subject: Re: [PATCH v2 1/2] dt-bindings: remoteproc: Add fsl,imx-dsp-rproc binding document Message-ID: References: <1629876516-16513-1-git-send-email-shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1629876516-16513-1-git-send-email-shengjiu.wang@nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org On Wed, Aug 25, 2021 at 03:28:35PM +0800, Shengjiu Wang wrote: > Define the compatible string and properties needed by imx_dsp_rproc > driver. > > Signed-off-by: Shengjiu Wang > --- > changes in v2: > - add items for clock-names > - change syscon to fsl,dsp-ctrl > > .../remoteproc/fsl,imx-dsp-rproc.yaml | 150 ++++++++++++++++++ > 1 file changed, 150 insertions(+) > create mode 100644 Documentation/devicetree/bindings/remoteproc/fsl,imx-dsp-rproc.yaml > > diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-dsp-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-dsp-rproc.yaml > new file mode 100644 > index 000000000000..edf6e4b8d7bb > --- /dev/null > +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-dsp-rproc.yaml > @@ -0,0 +1,150 @@ > +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/remoteproc/fsl,imx-dsp-rproc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: i.MX DSP Remoteproc Devices > + > +maintainers: > + - Shengjiu Wang > + > +description: > + This binding provides support for DSP processors found on i.mX family of SoCs i.MX > + > +properties: > + compatible: > + enum: > + - fsl,imx8qxp-hifi4 > + - fsl,imx8qm-hifi4 > + - fsl,imx8mp-hifi4 > + - fsl,imx8ulp-hifi4 > + > + clocks: > + description: > + Main functional clock for the remote processor > + minItems: 1 > + maxItems: 32 > + > + clock-names: > + description: | > + List of clock names for the remote processor. > + dsp_clkx for clocks of dsp itself. > + per_clkx for clocks of peripherals used by dsp. I still don't like your random collection of clocks. What if you have other resources besides clocks to manage? Pin mux, resets, power domains, etc. It would be better if you describe the peripherals in DT and then link to them here. But maybe the devices themselves aren't visible? > + minItems: 1 > + maxItems: 26 > + items: > + - const: dsp_clk1 > + - const: dsp_clk2 > + - const: dsp_clk3 > + - const: dsp_clk4 > + - const: dsp_clk5 > + - const: dsp_clk6 > + - const: dsp_clk7 > + - const: dsp_clk8 Surely you can name these by function? e.g. core, bus, axi, etc. > + - const: per_clk1 > + - const: per_clk2 > + - const: per_clk3 > + - const: per_clk4 > + - const: per_clk5 > + - const: per_clk6 > + - const: per_clk7 > + - const: per_clk8 > + - const: per_clk9 > + - const: per_clk10 > + - const: per_clk11 > + - const: per_clk12 > + - const: per_clk13 > + - const: per_clk14 > + - const: per_clk15 > + - const: per_clk16 > + - const: per_clk17 > + - const: per_clk18 > + > + fsl,dsp-ctrl: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Phandle to syscon block which provide access for processor enablement > + > + mbox-names: > + items: > + - const: tx > + - const: rx > + - const: rxdb > + > + mboxes: > + description: > + This property is required only if the rpmsg/virtio functionality is used. > + List of <&phandle type channel> - 1 channel for TX, 1 channel for RX, 1 channel for RXDB. > + (see mailbox/fsl,mu.yaml) > + minItems: 1 > + maxItems: 3 > + > + firmware-name: > + description: | > + Default name of the firmware to load to the remote processor. > + > + memory-region: > + description: > + If present, a phandle for a reserved memory area that used for vdev buffer, > + resource table, vring region and others used by remote processor. > + minItems: 1 > + maxItems: 32 > + > + reg: > + description: | > + Address space for any remoteproc memories present on the SoC. > + > + power-domains: > + minItems: 1 > + maxItems: 32 > + > +required: > + - compatible > + - reg > + - mboxes > + - mbox-names > + - clocks > + - clock-names > + - firmware-name > + > +additionalProperties: false > + > +examples: > + - | > + #include > + dsp_reserved: dsp@92400000 { > + reg = <0x92400000 0x1000000>; > + no-map; > + }; > + dsp_vdev0vring0: vdev0vring0@942f0000 { > + reg = <0x942f0000 0x8000>; > + no-map; > + }; > + dsp_vdev0vring1: vdev0vring1@942f8000 { > + reg = <0x942f8000 0x8000>; > + no-map; > + }; > + dsp_vdev0buffer: vdev0buffer@94300000 { > + compatible = "shared-dma-pool"; > + reg = <0x94300000 0x100000>; > + no-map; > + }; > + > + dsp: dsp@3b6e8000 { > + compatible = "fsl,imx8mp-hifi4"; > + reg = <0x3B6E8000 0x88000>; > + clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_OCRAMA_IPG>, > + <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_DSP_ROOT>, > + <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_DSPDBG_ROOT>; > + clock-names = "dsp_clk1", "dsp_clk2", "dsp_clk3"; > + firmware-name = "imx/dsp/hifi4.bin"; > + power-domains = <&audiomix_pd>; > + mbox-names = "tx", "rx", "rxdb"; > + mboxes = <&mu2 0 0>, > + <&mu2 1 0>, > + <&mu2 3 0>; > + memory-region = <&dsp_vdev0buffer>, <&dsp_vdev0vring0>, > + <&dsp_vdev0vring1>, <&dsp_reserved>; > + fsl,dsp-ctrl = <&audio_blk_ctrl>; > + }; > -- > 2.17.1 > > 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 X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 806CEC432BE for ; Thu, 2 Sep 2021 15:20:02 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4654960F4B for ; Thu, 2 Sep 2021 15:20:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4654960F4B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wPQR59t7Ipa5KqMo3/KbX8d97qUPmYsu8rRWs6ZmNPM=; b=C8iagmDz72KrJ7 ZAgHKr5XJyWLSBXNTpVjsC5wnlFeioTdVXDawd6OtUDcnor/QhOI92SenygVCsfkSswUzbWsgIV5l Z/+30n7HqGxgTH0HE0nE8D1su4AWHjNT6XDxDc3HpDm+wUMSpilATc+cCM6yiT54urW/p8puAuSLw j8ftAsnLhB/wHG3u8aT0vYUZfZrkYx7Zwg/JXc5c06Z9iT206PdgaMCBeAEIPdmXjq/E6GC2lutsw wLyM7iAA8a/uPXu32hO/B3NKY9do7alsyhEfGqbHDo3J80Zf9P6UxN0tX+nZMpN58/BjzYBdjuXyf vj5MRmY/j+bOJfVLghAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLoT1-009smn-HV; Thu, 02 Sep 2021 15:17:27 +0000 Received: from mail-oo1-f45.google.com ([209.85.161.45]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLoSv-009sm7-82 for linux-arm-kernel@lists.infradead.org; Thu, 02 Sep 2021 15:17:25 +0000 Received: by mail-oo1-f45.google.com with SMTP id y47-20020a4a9832000000b00290fb9f6d3fso638516ooi.3 for ; Thu, 02 Sep 2021 08:17:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Wb8GAkVFI8Sl87zRPGOegu+hAFVLLxzYkVhxsVOueuQ=; b=BoJQbhv2YfznofSOfgYsco8fDPDldwn5m+LcCCFGndeBCAZCooTHIVPoHZj7nDwtCY MqKa/Y1qE4lAgc/h8rstsDpMZPevoX7m8tHYFxEZB0hEXnk2uaG19VRQv3lTe3iAmX7s Z439gtZLXWSf/kYdrzuCsVmF2VJt1Sir6aZRmUErL8h/st7ofSFAYrkf+1Hvl8Zg/rBB wzhy+VLJdqx01muCnSyWXZ2JDjLoXphlYPw4BOjNhfHnFNV7UlXX0S5ldpnYCjTtq3xq AyNe3mkm7wZRAEuxAyyHOj4tTjWb3FvpV1olKeh0jb9DdKpkTBgOcfhAKfvy/YHYWY++ 5wPg== X-Gm-Message-State: AOAM531GTEX84+RkX/96Fc0arf6eJp1s3v5Hw63o/jC3BS6KoCVfk7ZE eVKWBaK/MQraSiylN0ebArmswJ+WRw== X-Google-Smtp-Source: ABdhPJyHT2iskMmpIirm793k/KgiFwRfX7emNwuGQj8LONOKcauHnPKJaq88rx2wFJQuHLCYfFFShw== X-Received: by 2002:a4a:ba0f:: with SMTP id b15mr3027879oop.31.1630595840199; Thu, 02 Sep 2021 08:17:20 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id z78sm419358ooa.29.2021.09.02.08.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 08:17:19 -0700 (PDT) Received: (nullmailer pid 936408 invoked by uid 1000); Thu, 02 Sep 2021 15:17:18 -0000 Date: Thu, 2 Sep 2021 10:17:18 -0500 From: Rob Herring To: Shengjiu Wang Cc: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, shengjiu.wang@gmail.com Subject: Re: [PATCH v2 1/2] dt-bindings: remoteproc: Add fsl,imx-dsp-rproc binding document Message-ID: References: <1629876516-16513-1-git-send-email-shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1629876516-16513-1-git-send-email-shengjiu.wang@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210902_081721_339371_AB1B1F81 X-CRM114-Status: GOOD ( 25.26 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Aug 25, 2021 at 03:28:35PM +0800, Shengjiu Wang wrote: > Define the compatible string and properties needed by imx_dsp_rproc > driver. > > Signed-off-by: Shengjiu Wang > --- > changes in v2: > - add items for clock-names > - change syscon to fsl,dsp-ctrl > > .../remoteproc/fsl,imx-dsp-rproc.yaml | 150 ++++++++++++++++++ > 1 file changed, 150 insertions(+) > create mode 100644 Documentation/devicetree/bindings/remoteproc/fsl,imx-dsp-rproc.yaml > > diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-dsp-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-dsp-rproc.yaml > new file mode 100644 > index 000000000000..edf6e4b8d7bb > --- /dev/null > +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-dsp-rproc.yaml > @@ -0,0 +1,150 @@ > +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/remoteproc/fsl,imx-dsp-rproc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: i.MX DSP Remoteproc Devices > + > +maintainers: > + - Shengjiu Wang > + > +description: > + This binding provides support for DSP processors found on i.mX family of SoCs i.MX > + > +properties: > + compatible: > + enum: > + - fsl,imx8qxp-hifi4 > + - fsl,imx8qm-hifi4 > + - fsl,imx8mp-hifi4 > + - fsl,imx8ulp-hifi4 > + > + clocks: > + description: > + Main functional clock for the remote processor > + minItems: 1 > + maxItems: 32 > + > + clock-names: > + description: | > + List of clock names for the remote processor. > + dsp_clkx for clocks of dsp itself. > + per_clkx for clocks of peripherals used by dsp. I still don't like your random collection of clocks. What if you have other resources besides clocks to manage? Pin mux, resets, power domains, etc. It would be better if you describe the peripherals in DT and then link to them here. But maybe the devices themselves aren't visible? > + minItems: 1 > + maxItems: 26 > + items: > + - const: dsp_clk1 > + - const: dsp_clk2 > + - const: dsp_clk3 > + - const: dsp_clk4 > + - const: dsp_clk5 > + - const: dsp_clk6 > + - const: dsp_clk7 > + - const: dsp_clk8 Surely you can name these by function? e.g. core, bus, axi, etc. > + - const: per_clk1 > + - const: per_clk2 > + - const: per_clk3 > + - const: per_clk4 > + - const: per_clk5 > + - const: per_clk6 > + - const: per_clk7 > + - const: per_clk8 > + - const: per_clk9 > + - const: per_clk10 > + - const: per_clk11 > + - const: per_clk12 > + - const: per_clk13 > + - const: per_clk14 > + - const: per_clk15 > + - const: per_clk16 > + - const: per_clk17 > + - const: per_clk18 > + > + fsl,dsp-ctrl: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Phandle to syscon block which provide access for processor enablement > + > + mbox-names: > + items: > + - const: tx > + - const: rx > + - const: rxdb > + > + mboxes: > + description: > + This property is required only if the rpmsg/virtio functionality is used. > + List of <&phandle type channel> - 1 channel for TX, 1 channel for RX, 1 channel for RXDB. > + (see mailbox/fsl,mu.yaml) > + minItems: 1 > + maxItems: 3 > + > + firmware-name: > + description: | > + Default name of the firmware to load to the remote processor. > + > + memory-region: > + description: > + If present, a phandle for a reserved memory area that used for vdev buffer, > + resource table, vring region and others used by remote processor. > + minItems: 1 > + maxItems: 32 > + > + reg: > + description: | > + Address space for any remoteproc memories present on the SoC. > + > + power-domains: > + minItems: 1 > + maxItems: 32 > + > +required: > + - compatible > + - reg > + - mboxes > + - mbox-names > + - clocks > + - clock-names > + - firmware-name > + > +additionalProperties: false > + > +examples: > + - | > + #include > + dsp_reserved: dsp@92400000 { > + reg = <0x92400000 0x1000000>; > + no-map; > + }; > + dsp_vdev0vring0: vdev0vring0@942f0000 { > + reg = <0x942f0000 0x8000>; > + no-map; > + }; > + dsp_vdev0vring1: vdev0vring1@942f8000 { > + reg = <0x942f8000 0x8000>; > + no-map; > + }; > + dsp_vdev0buffer: vdev0buffer@94300000 { > + compatible = "shared-dma-pool"; > + reg = <0x94300000 0x100000>; > + no-map; > + }; > + > + dsp: dsp@3b6e8000 { > + compatible = "fsl,imx8mp-hifi4"; > + reg = <0x3B6E8000 0x88000>; > + clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_OCRAMA_IPG>, > + <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_DSP_ROOT>, > + <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_DSPDBG_ROOT>; > + clock-names = "dsp_clk1", "dsp_clk2", "dsp_clk3"; > + firmware-name = "imx/dsp/hifi4.bin"; > + power-domains = <&audiomix_pd>; > + mbox-names = "tx", "rx", "rxdb"; > + mboxes = <&mu2 0 0>, > + <&mu2 1 0>, > + <&mu2 3 0>; > + memory-region = <&dsp_vdev0buffer>, <&dsp_vdev0vring0>, > + <&dsp_vdev0vring1>, <&dsp_reserved>; > + fsl,dsp-ctrl = <&audio_blk_ctrl>; > + }; > -- > 2.17.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel