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 EF47FC433EF for ; Fri, 10 Sep 2021 21:43:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CBF7D6120A for ; Fri, 10 Sep 2021 21:43:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234665AbhIJVpF (ORCPT ); Fri, 10 Sep 2021 17:45:05 -0400 Received: from mail-oi1-f177.google.com ([209.85.167.177]:37519 "EHLO mail-oi1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234660AbhIJVpE (ORCPT ); Fri, 10 Sep 2021 17:45:04 -0400 Received: by mail-oi1-f177.google.com with SMTP id y128so4896704oie.4; Fri, 10 Sep 2021 14:43:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wN8Y2wY394DQtoDB0ZKstnKrvfl0KfDm4sPTZE7KEbI=; b=QKG+1TtVLawGrrgCCRwri3d3F0ADcMgsVLNyq2F8h+5dA4yWnbzyqdyji2ltr6t7f2 tDFsclk1wxwDnqcGp+lnyDlLFuYSfkBuUKsbRR7z8N5ggtXQ97iksqYm4Z2dlulA+wM7 4cf+lOdMzYjOGR99ImnopG0Ho7bS/I0lN5hGKYogp93z4H99/4nRW+81nIM2l/d1V9hY WJAAijkX4UHJpT0yhrhc7m3FDvH19Igq4u57Rfx7jl48rFJgmm2rnopsRG5GC3uwKkRP xkaQInz5s1VXtrVToEOUkc2P9FIZedjwNKBZfanf2fXX/R2TdVzikXlSmuR+h0ZhO/kh Klwg== X-Gm-Message-State: AOAM532JyvmGl2BZyWwtkP5C1lMeyuejXbfnpLtneifXmWmx5S+tM/Ur 1Fs1utVqZO0Lqz8lUOrmkg== X-Google-Smtp-Source: ABdhPJzI5jZ1We8L4wQ3ky0Qn8k47NIXcaY1it3c6cBzK5okGJJz8CdOgksLylAhdG6yIILzd4GFvg== X-Received: by 2002:aca:b6d5:: with SMTP id g204mr5941193oif.29.1631310232763; Fri, 10 Sep 2021 14:43:52 -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 y138sm1581590oie.22.2021.09.10.14.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 14:43:51 -0700 (PDT) Received: (nullmailer pid 3430328 invoked by uid 1000); Fri, 10 Sep 2021 21:43:50 -0000 Date: Fri, 10 Sep 2021 16:43:50 -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, daniel.baluta@nxp.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 v4 4/4] dt-bindings: dsp: fsl: update binding document for remote proc driver Message-ID: References: <1631092255-25150-1-git-send-email-shengjiu.wang@nxp.com> <1631092255-25150-5-git-send-email-shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1631092255-25150-5-git-send-email-shengjiu.wang@nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org On Wed, Sep 08, 2021 at 05:10:55PM +0800, Shengjiu Wang wrote: > As there are two drivers for DSP on i.MX, one is for sound open > firmware, another is for remote processor framework. In order to > distinguish two kinds of driver, defining different compatible strings. What determines which firmware is used? Is it tied to the board? Or for a given board, users could want different firmware? In the latter case, this configuration should not be in DT. > For remote proc driver, the properties firmware-name and fsl,dsp-ctrl > are needed and the mailbox channel is different with SOF. > > Signed-off-by: Shengjiu Wang > --- > .../devicetree/bindings/dsp/fsl,dsp.yaml | 81 +++++++++++++++++-- > 1 file changed, 75 insertions(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml > index 7afc9f2be13a..51ea657f6d42 100644 > --- a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml > +++ b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml > @@ -8,6 +8,7 @@ title: NXP i.MX8 DSP core > > maintainers: > - Daniel Baluta > + - Shengjiu Wang > > description: | > Some boards from i.MX8 family contain a DSP core used for > @@ -19,6 +20,10 @@ properties: > - fsl,imx8qxp-dsp > - fsl,imx8qm-dsp > - fsl,imx8mp-dsp > + - fsl,imx8qxp-hifi4 > + - fsl,imx8qm-hifi4 > + - fsl,imx8mp-hifi4 > + - fsl,imx8ulp-hifi4 > > reg: > maxItems: 1 > @@ -28,37 +33,63 @@ properties: > - description: ipg clock > - description: ocram clock > - description: core clock > + - description: debug interface clock > + - description: message unit clock > + minItems: 3 > + maxItems: 5 > > clock-names: > items: > - const: ipg > - const: ocram > - const: core > + - const: debug > + - const: mu > + minItems: 3 > + maxItems: 5 > > power-domains: > description: > List of phandle and PM domain specifier as documented in > Documentation/devicetree/bindings/power/power_domain.txt > + minItems: 1 > maxItems: 4 How does the same h/w have different number of power domains? > > mboxes: > description: > List of <&phandle type channel> - 2 channels for TXDB, 2 channels for RXDB > + or - 1 channel for TX, 1 channel for RX, 1 channel for RXDB > (see mailbox/fsl,mu.txt) > + minItems: 3 > maxItems: 4 > > mbox-names: > - items: > - - const: txdb0 > - - const: txdb1 > - - const: rxdb0 > - - const: rxdb1 > + oneOf: > + - items: > + - const: txdb0 > + - const: txdb1 > + - const: rxdb0 > + - const: rxdb1 > + - items: > + - const: tx > + - const: rx > + - const: rxdb These are completely different mailboxes? > > memory-region: > description: > phandle to a node describing reserved memory (System RAM memory) > used by DSP (see bindings/reserved-memory/reserved-memory.txt) > - maxItems: 1 > + minItems: 1 > + maxItems: 4 > + > + firmware-name: > + description: | > + Default name of the firmware to load to the remote processor. > + > + fsl,dsp-ctrl: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Phandle to syscon block which provide access for processor enablement Curious, how is this done with the open sound f/w? > > required: > - compatible > @@ -91,3 +122,41 @@ examples: > mboxes = <&lsio_mu13 2 0>, <&lsio_mu13 2 1>, <&lsio_mu13 3 0>, <&lsio_mu13 3 1>; > memory-region = <&dsp_reserved>; > }; > + - | > + #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_DSP_ROOT>, > + <&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 = "ipg", "ocram", "core", "debug"; > + 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 8D17AC433EF for ; Fri, 10 Sep 2021 21:45:57 +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 43BA561074 for ; Fri, 10 Sep 2021 21:45:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 43BA561074 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=9G2j2uZOa9gbomThgz0fVUk4TDARX0nRETieliPUDZE=; b=xpKsENeHXhxdS0 3GCpDEbxt/WDOPp7grUDUomEhFkTiFPC/pLaihFK6sIXACCAsMtpdQu3qNTrFLyMwt9UVhEoN0ws0 FjS3nQ2mzEF5+qklV3x8BLI4oBdWZhBW1BSsE/jAFt4PzYmTkuJjGZ8DfOmAx4Z71DCTuM8PvBXkJ IrZWQ9zGJvlIKAVXWFX8qcYWRPSiUc9mFVV0oNzie1eq0FtIf0vcghnrkpcGZc2mrN+OiN5RbkLu5 a7rV4IN1KGJbjVqPEwJ9oOW/ElvFOKJARQjDtnZO1roaN1cGvxsKKCB56Do6gsDx0ivx0hOtgGdLd oKzBvnE6vfaW9BWlTJNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOoJU-00Du5C-BN; Fri, 10 Sep 2021 21:44:00 +0000 Received: from mail-oi1-f178.google.com ([209.85.167.178]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOoJP-00Du4S-Nd for linux-arm-kernel@lists.infradead.org; Fri, 10 Sep 2021 21:43:57 +0000 Received: by mail-oi1-f178.google.com with SMTP id p2so4926052oif.1 for ; Fri, 10 Sep 2021 14:43:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wN8Y2wY394DQtoDB0ZKstnKrvfl0KfDm4sPTZE7KEbI=; b=am0ebUFj0rZOt37tXV7lG1b1tawx52Cs8z//kH+iInoKQtm18B23cCzBGt63TwfIGl ZqLjc2zseN/Lwm+/q4QcykXF09Eod9SNVa+wjobJV7XvlTxIq8OCi8zQoWcnIQ+gSbc+ VUKoCnyYwQIbErTW/naQg9sENuwM3wots6Fsa9vOtJos5IxTDRoVxaTGkP1Da/4khGmh 8uvtzcpMF3ih0zjYe2fJzTmWFCrZqvLfNhsbGkO0vT8p8rYmoJUgPI7CxyK0OQ9f+KfH vMHwhIoCULh7InxpqUtQJXa3+aP5yPDQIjMxeW2/EvAP4f4x1fOUtt8hQrbkytFyw6eu qX5A== X-Gm-Message-State: AOAM531Sv/Jk8IougHrsR+JUPmqvjE4D8aiV9MqP58pMK+slxqBcEixh Kzp8G3cv0SyRkqSNa/7Asw== X-Google-Smtp-Source: ABdhPJzI5jZ1We8L4wQ3ky0Qn8k47NIXcaY1it3c6cBzK5okGJJz8CdOgksLylAhdG6yIILzd4GFvg== X-Received: by 2002:aca:b6d5:: with SMTP id g204mr5941193oif.29.1631310232763; Fri, 10 Sep 2021 14:43:52 -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 y138sm1581590oie.22.2021.09.10.14.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 14:43:51 -0700 (PDT) Received: (nullmailer pid 3430328 invoked by uid 1000); Fri, 10 Sep 2021 21:43:50 -0000 Date: Fri, 10 Sep 2021 16:43:50 -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, daniel.baluta@nxp.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 v4 4/4] dt-bindings: dsp: fsl: update binding document for remote proc driver Message-ID: References: <1631092255-25150-1-git-send-email-shengjiu.wang@nxp.com> <1631092255-25150-5-git-send-email-shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1631092255-25150-5-git-send-email-shengjiu.wang@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210910_144355_825595_0BBF3477 X-CRM114-Status: GOOD ( 25.31 ) 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, Sep 08, 2021 at 05:10:55PM +0800, Shengjiu Wang wrote: > As there are two drivers for DSP on i.MX, one is for sound open > firmware, another is for remote processor framework. In order to > distinguish two kinds of driver, defining different compatible strings. What determines which firmware is used? Is it tied to the board? Or for a given board, users could want different firmware? In the latter case, this configuration should not be in DT. > For remote proc driver, the properties firmware-name and fsl,dsp-ctrl > are needed and the mailbox channel is different with SOF. > > Signed-off-by: Shengjiu Wang > --- > .../devicetree/bindings/dsp/fsl,dsp.yaml | 81 +++++++++++++++++-- > 1 file changed, 75 insertions(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml > index 7afc9f2be13a..51ea657f6d42 100644 > --- a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml > +++ b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml > @@ -8,6 +8,7 @@ title: NXP i.MX8 DSP core > > maintainers: > - Daniel Baluta > + - Shengjiu Wang > > description: | > Some boards from i.MX8 family contain a DSP core used for > @@ -19,6 +20,10 @@ properties: > - fsl,imx8qxp-dsp > - fsl,imx8qm-dsp > - fsl,imx8mp-dsp > + - fsl,imx8qxp-hifi4 > + - fsl,imx8qm-hifi4 > + - fsl,imx8mp-hifi4 > + - fsl,imx8ulp-hifi4 > > reg: > maxItems: 1 > @@ -28,37 +33,63 @@ properties: > - description: ipg clock > - description: ocram clock > - description: core clock > + - description: debug interface clock > + - description: message unit clock > + minItems: 3 > + maxItems: 5 > > clock-names: > items: > - const: ipg > - const: ocram > - const: core > + - const: debug > + - const: mu > + minItems: 3 > + maxItems: 5 > > power-domains: > description: > List of phandle and PM domain specifier as documented in > Documentation/devicetree/bindings/power/power_domain.txt > + minItems: 1 > maxItems: 4 How does the same h/w have different number of power domains? > > mboxes: > description: > List of <&phandle type channel> - 2 channels for TXDB, 2 channels for RXDB > + or - 1 channel for TX, 1 channel for RX, 1 channel for RXDB > (see mailbox/fsl,mu.txt) > + minItems: 3 > maxItems: 4 > > mbox-names: > - items: > - - const: txdb0 > - - const: txdb1 > - - const: rxdb0 > - - const: rxdb1 > + oneOf: > + - items: > + - const: txdb0 > + - const: txdb1 > + - const: rxdb0 > + - const: rxdb1 > + - items: > + - const: tx > + - const: rx > + - const: rxdb These are completely different mailboxes? > > memory-region: > description: > phandle to a node describing reserved memory (System RAM memory) > used by DSP (see bindings/reserved-memory/reserved-memory.txt) > - maxItems: 1 > + minItems: 1 > + maxItems: 4 > + > + firmware-name: > + description: | > + Default name of the firmware to load to the remote processor. > + > + fsl,dsp-ctrl: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Phandle to syscon block which provide access for processor enablement Curious, how is this done with the open sound f/w? > > required: > - compatible > @@ -91,3 +122,41 @@ examples: > mboxes = <&lsio_mu13 2 0>, <&lsio_mu13 2 1>, <&lsio_mu13 3 0>, <&lsio_mu13 3 1>; > memory-region = <&dsp_reserved>; > }; > + - | > + #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_DSP_ROOT>, > + <&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 = "ipg", "ocram", "core", "debug"; > + 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