linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Baluta <daniel.baluta@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: "Daniel Baluta" <daniel.baluta@oss.nxp.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Ranjani Sridharan" <ranjani.sridharan@linux.intel.com>,
	"Kai Vehmanen" <kai.vehmanen@linux.intel.com>,
	"Devicetree List" <devicetree@vger.kernel.org>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	s-anna@ti.com, "Daniel Baluta" <daniel.baluta@nxp.com>
Subject: Re: [PATCH v2 2/2] dt-bindings: dsp: fsl: Add DSP optional clocks documentation
Date: Sat, 4 Sep 2021 17:50:56 +0300	[thread overview]
Message-ID: <CAEnQRZC-GN9iEPk6-A_oKPHcCYj8_WeQC0TT_NpK_QntkmAqiQ@mail.gmail.com> (raw)
In-Reply-To: <YTJTF5VMOyG2iZb0@robh.at.kernel.org>

On Fri, Sep 3, 2021 at 8:11 PM Rob Herring <robh@kernel.org> wrote:
>
> On Fri, Sep 03, 2021 at 05:53:40PM +0300, Daniel Baluta wrote:
> > From: Daniel Baluta <daniel.baluta@nxp.com>
> >
> > DSP node on the Linux kernel side must also take care of enabling
> > DAI/DMA related clocks.
> >
> > By design we choose to manage DAI/DMA clocks from the kernel side because of
> > the architecture of some i.MX8 boards.
> >
> > Clocks are handled by a special M4 core which runs a special firmware
> > called SCFW (System Controler firmware).
> >
> > This communicates with A cores running Linux via a special Messaging
> > Unit and implements a custom API which is already implemented by the
> > Linux kernel i.MX clocks implementation.
> >
> > Note that these clocks are optional. We can use the DSP without them.
> >
> > Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> > ---
> >  .../devicetree/bindings/dsp/fsl,dsp.yaml      | 33 +++++++++++++++++++
> >  1 file changed, 33 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
> > index 7afc9f2be13a..1453668c0194 100644
> > --- a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
> > +++ b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
> > @@ -24,16 +24,49 @@ properties:
> >      maxItems: 1
> >
> >    clocks:
> > +    minItems: 3
> >      items:
> >        - description: ipg clock
> >        - description: ocram clock
> >        - description: core clock
> > +      - description: esai0 core clock for accessing registers
> > +      - description: esai0 baud clock
> > +      - description: esai0 system clock
> > +      - description: esai0 spba clock required when ESAI is placed in slave mode
> > +      - description: SAI1 bus clock
> > +      - description: SAI1 master clock 0
> > +      - description: SAI1 master clock 1
> > +      - description: SAI1 master clock 2
> > +      - description: SAI1 master clock 3
> > +      - description: SAI3 bus clock
> > +      - description: SAI3 master clock 0
> > +      - description: SAI3 master clock 1
> > +      - description: SAI3 master clock 2
> > +      - description: SAI3 master clock 3
> > +      - description: SDMA3 root clock used for accessing registers
>
> Sigh, I just rejected this kind of thing for the other i.MX8 DSP
> binding[1].
>
> Add a reference to the h/w block and then get the clocks (and other
> resources) from there.

The H/W block is controlled by the DSP firmware. So, we don't want
to use the Linux kernel driver (thus the H/W block device tree node).

The only thing that we cannot control from the DSP firmware are the clocks
hence we handle them in the DSP node.

We moved the DAI clocks under the DSP node as I think you suggested here:

https://www.lkml.org/lkml/2020/3/12/969

  reply	other threads:[~2021-09-04 14:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 14:53 [PATCH v2 0/2] Add code to manage DSP related clocks Daniel Baluta
2021-09-03 14:53 ` [PATCH v2 1/2] ASoC: SOF: imx: " Daniel Baluta
2021-09-03 16:06   ` Pierre-Louis Bossart
2021-09-03 14:53 ` [PATCH v2 2/2] dt-bindings: dsp: fsl: Add DSP optional clocks documentation Daniel Baluta
2021-09-03 16:53   ` Rob Herring
2021-09-04 14:50     ` Daniel Baluta [this message]
2021-09-07 13:09       ` Rob Herring
2021-09-09 11:20         ` Daniel Baluta
2021-09-09 17:15           ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEnQRZC-GN9iEPk6-A_oKPHcCYj8_WeQC0TT_NpK_QntkmAqiQ@mail.gmail.com \
    --to=daniel.baluta@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=daniel.baluta@oss.nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=robh@kernel.org \
    --cc=s-anna@ti.com \
    --cc=shawnguo@kernel.org \
    --subject='Re: [PATCH v2 2/2] dt-bindings: dsp: fsl: Add DSP optional clocks documentation' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).