All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mirela Rabulea <mirela.rabulea@nxp.com>
To: Rob Herring <robh@kernel.org>,
	Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Conor Dooley <conor@kernel.org>, Ming Qian <ming.qian@nxp.com>,
	Shijie Qin <shijie.qin@nxp.com>, Eagle Zhou <eagle.zhou@nxp.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Anson Huang <Anson.Huang@nxp.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>
Subject: RE: Re: [PATCH v2 3/3] dt-bindings: media: imx-jpeg: Add clocks property
Date: Wed, 9 Aug 2023 20:43:03 +0000	[thread overview]
Message-ID: <AS4PR04MB9244D1BD535A188356683DD58F12A@AS4PR04MB9244.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20230726170141.GA1568248-robh@kernel.org>

> -----Original Message-----
> From: Rob Herring <robh@kernel.org>
> Sent: Wednesday, July 26, 2023 8:02 PM
> To: Alexander Stein <alexander.stein@ew.tq-group.com>
> Cc: Conor Dooley <conor@kernel.org>; Mirela Rabulea
> <mirela.rabulea@nxp.com>; Ming Qian <ming.qian@nxp.com>; Shijie Qin
> <shijie.qin@nxp.com>; Eagle Zhou <eagle.zhou@nxp.com>; Mauro Carvalho
> Chehab <mchehab@kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley <conor+dt@kernel.org>;
> Shawn Guo <shawnguo@kernel.org>; Sascha Hauer <s.hauer@pengutronix.de>;
> Fabio Estevam <festevam@gmail.com>; Mark Brown <broonie@kernel.org>;
> Anson Huang <Anson.Huang@nxp.com>; dl-linux-imx <linux-imx@nxp.com>;
> Pengutronix Kernel Team <kernel@pengutronix.de>; linux-
> media@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-spi@vger.kernel.org
> Subject: [EXT] Re: [PATCH v2 3/3] dt-bindings: media: imx-jpeg: Add clocks
> property
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
> 
> 
> On Tue, Jul 25, 2023 at 07:31:55AM +0200, Alexander Stein wrote:
> > Am Montag, 24. Juli 2023, 20:26:15 CEST schrieb Conor Dooley:
> > > On Mon, Jul 24, 2023 at 02:21:00PM +0200, Alexander Stein wrote:
> > > > i.MX8 and i.MX8X both use two clocks for accessing the periphery.
> > > > Add clocks and clock-names properties accordingly.
> > > >
> > > > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > > > ---
> > > > Changes in v2:
> > > > * None
> > > >
> > > >  .../devicetree/bindings/media/nxp,imx8-jpeg.yaml          | 8 ++++++++
> > > >  1 file changed, 8 insertions(+)
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> > > > b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml index
> > > > 3d9d1db37040..2533e16720f2 100644
> > > > --- a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> > > > +++ b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> > > >
> > > > @@ -46,6 +46,14 @@ properties:
> > > >      minItems: 2               # Wrapper and 1 slot
> > > >      maxItems: 5               # Wrapper and 4 slots
> > > >
> > > > +  clocks:
> > > > +    maxItems: 2
> > > > +
> > > > +  clock-names:
> > > > +    items:
> > > > +      - const: per
> > > > +      - const: ipg
> > >
> > > What do "per" and "ipg" mean? I assume "per" is peripheral?
> >
> > Actually I don't know what "ipg" stands for. It's a quite common name
> > on i.MX platforms though. I opted for the names currently used in the
> > DT. The driver doesn't care for the names currently.

Hi,
Sorry for the late response.
Yes, the driver uses now the clk_bulk functions, so it does not care for the names anymore (in the past it used the per/ipg names to get the clocks).

> 
> Those names date back about 25 years to Motorola Mcore GSM SoCs. IPG came
> from IPG bus which IIRC stood for IP gasket. Essentially the bus was something
> like Arm APB being slave only. The IPG clock is essentially the bus and register
> access clock. 'per' is the functional clock in cases that need a defined clock rate
> such as UART baud clock.
> 
> There is also a shared (between CPU and DSP) bus called SPBA from the same
> time which still lives on even though it isn't shared in i.MX chips.

Unfortunately, I cannot provide an explanation for the IPG acronym, I asked around, will come back if I get an answer.

> 
> > But cross-checking the reference manual these clocks seems to be called
> "jpeg"
> > and "ips", individually for both jpeg encoder and decoder.
> 
> Given this block is probably licensed IP, seems like it would use something
> different and be directly connected to AHB or AXI.

Yes, the Cast JPEG Decoder/Encoder is a licensed core, and it there is also an NXP JPEG Decoder/Encoder Wrapper, which provides the interface for the Cast JPEG Decoder/Encoder. The wrapper also provides AXI DMA engines for fetching Jpeg bitstream from memory and feed it to the Cast Jpeg or for storing the decoded pixel data into system memory through AXI bus. The wrapper also provides APB interface for wrapper and Cast Jpeg register access.

From our hardware team, I got the information that: for jpeg wrapper, it has two clocks(axi and apb), for CAST IP it has one clock(axi, whose clock source is same with wrapper on chip).

> 
> > Mirela (added to recipients): As the original author of the DT nodes,
> > could you provide additional information regarding the clock names?

I understand that "ipg" usually is IP bus clk for register access, but I am not sure. Experimentally, I was not able to get register access unless both clocks were enabled. I'll get back if I get more details.

Regards,
Mirela

> >
> > Best regards,
> > Alexander

WARNING: multiple messages have this Message-ID (diff)
From: Mirela Rabulea <mirela.rabulea@nxp.com>
To: Rob Herring <robh@kernel.org>,
	Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Conor Dooley <conor@kernel.org>, Ming Qian <ming.qian@nxp.com>,
	Shijie Qin <shijie.qin@nxp.com>, Eagle Zhou <eagle.zhou@nxp.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Anson Huang <Anson.Huang@nxp.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>
Subject: RE: Re: [PATCH v2 3/3] dt-bindings: media: imx-jpeg: Add clocks property
Date: Wed, 9 Aug 2023 20:43:03 +0000	[thread overview]
Message-ID: <AS4PR04MB9244D1BD535A188356683DD58F12A@AS4PR04MB9244.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20230726170141.GA1568248-robh@kernel.org>

> -----Original Message-----
> From: Rob Herring <robh@kernel.org>
> Sent: Wednesday, July 26, 2023 8:02 PM
> To: Alexander Stein <alexander.stein@ew.tq-group.com>
> Cc: Conor Dooley <conor@kernel.org>; Mirela Rabulea
> <mirela.rabulea@nxp.com>; Ming Qian <ming.qian@nxp.com>; Shijie Qin
> <shijie.qin@nxp.com>; Eagle Zhou <eagle.zhou@nxp.com>; Mauro Carvalho
> Chehab <mchehab@kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley <conor+dt@kernel.org>;
> Shawn Guo <shawnguo@kernel.org>; Sascha Hauer <s.hauer@pengutronix.de>;
> Fabio Estevam <festevam@gmail.com>; Mark Brown <broonie@kernel.org>;
> Anson Huang <Anson.Huang@nxp.com>; dl-linux-imx <linux-imx@nxp.com>;
> Pengutronix Kernel Team <kernel@pengutronix.de>; linux-
> media@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-spi@vger.kernel.org
> Subject: [EXT] Re: [PATCH v2 3/3] dt-bindings: media: imx-jpeg: Add clocks
> property
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
> 
> 
> On Tue, Jul 25, 2023 at 07:31:55AM +0200, Alexander Stein wrote:
> > Am Montag, 24. Juli 2023, 20:26:15 CEST schrieb Conor Dooley:
> > > On Mon, Jul 24, 2023 at 02:21:00PM +0200, Alexander Stein wrote:
> > > > i.MX8 and i.MX8X both use two clocks for accessing the periphery.
> > > > Add clocks and clock-names properties accordingly.
> > > >
> > > > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > > > ---
> > > > Changes in v2:
> > > > * None
> > > >
> > > >  .../devicetree/bindings/media/nxp,imx8-jpeg.yaml          | 8 ++++++++
> > > >  1 file changed, 8 insertions(+)
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> > > > b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml index
> > > > 3d9d1db37040..2533e16720f2 100644
> > > > --- a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> > > > +++ b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> > > >
> > > > @@ -46,6 +46,14 @@ properties:
> > > >      minItems: 2               # Wrapper and 1 slot
> > > >      maxItems: 5               # Wrapper and 4 slots
> > > >
> > > > +  clocks:
> > > > +    maxItems: 2
> > > > +
> > > > +  clock-names:
> > > > +    items:
> > > > +      - const: per
> > > > +      - const: ipg
> > >
> > > What do "per" and "ipg" mean? I assume "per" is peripheral?
> >
> > Actually I don't know what "ipg" stands for. It's a quite common name
> > on i.MX platforms though. I opted for the names currently used in the
> > DT. The driver doesn't care for the names currently.

Hi,
Sorry for the late response.
Yes, the driver uses now the clk_bulk functions, so it does not care for the names anymore (in the past it used the per/ipg names to get the clocks).

> 
> Those names date back about 25 years to Motorola Mcore GSM SoCs. IPG came
> from IPG bus which IIRC stood for IP gasket. Essentially the bus was something
> like Arm APB being slave only. The IPG clock is essentially the bus and register
> access clock. 'per' is the functional clock in cases that need a defined clock rate
> such as UART baud clock.
> 
> There is also a shared (between CPU and DSP) bus called SPBA from the same
> time which still lives on even though it isn't shared in i.MX chips.

Unfortunately, I cannot provide an explanation for the IPG acronym, I asked around, will come back if I get an answer.

> 
> > But cross-checking the reference manual these clocks seems to be called
> "jpeg"
> > and "ips", individually for both jpeg encoder and decoder.
> 
> Given this block is probably licensed IP, seems like it would use something
> different and be directly connected to AHB or AXI.

Yes, the Cast JPEG Decoder/Encoder is a licensed core, and it there is also an NXP JPEG Decoder/Encoder Wrapper, which provides the interface for the Cast JPEG Decoder/Encoder. The wrapper also provides AXI DMA engines for fetching Jpeg bitstream from memory and feed it to the Cast Jpeg or for storing the decoded pixel data into system memory through AXI bus. The wrapper also provides APB interface for wrapper and Cast Jpeg register access.

From our hardware team, I got the information that: for jpeg wrapper, it has two clocks(axi and apb), for CAST IP it has one clock(axi, whose clock source is same with wrapper on chip).

> 
> > Mirela (added to recipients): As the original author of the DT nodes,
> > could you provide additional information regarding the clock names?

I understand that "ipg" usually is IP bus clk for register access, but I am not sure. Experimentally, I was not able to get register access unless both clocks were enabled. I'll get back if I get more details.

Regards,
Mirela

> >
> > Best regards,
> > Alexander

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-08-09 20:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24 12:20 [PATCH v2 1/3] dt-bindings: media: amphion: Fix subnode pattern Alexander Stein
2023-07-24 12:20 ` [PATCH v2 2/3] dt-bindings: spi: lpspi: Add power-domains Alexander Stein
2023-07-24 18:25   ` Conor Dooley
2023-07-24 12:21 ` [PATCH v2 3/3] dt-bindings: media: imx-jpeg: Add clocks property Alexander Stein
2023-07-24 18:26   ` Conor Dooley
2023-07-25  5:31     ` Alexander Stein
2023-07-25 19:14       ` Conor Dooley
2023-07-26 17:01       ` Rob Herring
2023-08-09 20:43         ` Mirela Rabulea [this message]
2023-08-09 20:43           ` Mirela Rabulea
2023-10-02  9:18           ` Hans Verkuil
2023-10-02  9:18             ` Hans Verkuil
2023-10-02 11:16             ` Conor Dooley
2023-10-02 11:16               ` Conor Dooley
2023-10-05  8:19               ` Hans Verkuil
2023-10-05  8:19                 ` Hans Verkuil
2023-07-24 18:04 ` [PATCH v2 1/3] dt-bindings: media: amphion: Fix subnode pattern Conor Dooley

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=AS4PR04MB9244D1BD535A188356683DD58F12A@AS4PR04MB9244.eurprd04.prod.outlook.com \
    --to=mirela.rabulea@nxp.com \
    --cc=Anson.Huang@nxp.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eagle.zhou@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ming.qian@nxp.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=shijie.qin@nxp.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.