devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Nas Chung <nas.chung@chipsnmedia.com>
Cc: "mchehab@kernel.org" <mchehab@kernel.org>,
	"hverkuil@xs4all.nl" <hverkuil@xs4all.nl>,
	"sebastian.fricke@collabora.com" <sebastian.fricke@collabora.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-imx@nxp.com" <linux-imx@nxp.com>,
	"marex@denx.de" <marex@denx.de>,
	"jackson.lee" <jackson.lee@chipsnmedia.com>,
	"lafley.kim" <lafley.kim@chipsnmedia.com>
Subject: Re: [PATCH v2 2/8] dt-bindings: media: nxp: Add Wave6 video codec device
Date: Fri, 9 May 2025 12:11:48 +0200	[thread overview]
Message-ID: <f1073f21-0885-486f-80c8-00f91dfd7448@kernel.org> (raw)
In-Reply-To: <SL2P216MB124656A87931B153F815820BFB8AA@SL2P216MB1246.KORP216.PROD.OUTLOOK.COM>

On 09/05/2025 11:59, Nas Chung wrote:
>>> +examples:
>>> +  - |
>>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
>>> +    #include <dt-bindings/clock/nxp,imx95-clock.h>
>>> +
>>> +    soc {
>>> +      #address-cells = <2>;
>>> +      #size-cells = <2>;
>>> +
>>> +      vpu: video-codec {
>>
>> Why this device does not have MMIO? Sorry, but makes little sense and if
>> you posted and tested your entire DTS you would see why.
> 
> I initially thought that if the reg property is declared in the child,
> it would not need to be declared in the parent node.
> I based this approach on the mediatek,mt8195-jpegenc.yaml binding,
> where the parent node does not include MMIO.

Do you have access to mt8195 datasheet? What is the memory/register
layout there?

If you do not have access, why do you think these are similar devices?

> 
> But, if this structure is problematic, I will address it in patch v3.
> 
>>
>> Can we see the entire DTS?
> 
> Sure !
> Below is the cnm.wave633c.example.dts file created from dt_binding_check.

This is not the entire DTS.

> 
> /dts-v1/;
> /plugin/; // silence any missing phandle references

This is bindings example. I want to see entire DTS or DTSI of the SoC.
Once you see entire DTS, you will notice that your current split is just
not correct - it should be pretty obvious.

And that's why we should keep rejecting such works which do not bring
any DTS user, because the no one - neither we nor the contributors - see
big picture and if someone saw the big picture then immediately would
notice - it's just bollocks.

What you claim is:

soc@0 {
  // MMIO bus

  video-codec {
    // which is a non-MMIO device and clearly a no-go.

Just look how DTS is organized and learn from it.

> 
> /{
>     compatible = "foo";
>     model = "foo";
>     #address-cells = <1>;
>     #size-cells = <1>;
> 
> 
>     example-0 {
>         #address-cells = <1>;
>         #size-cells = <1>;
> 
>         
>         interrupt-parent = <&fake_intc0>;
>         fake_intc0: fake-interrupt-controller {
>             interrupt-controller;
>             #interrupt-cells = < 3 >;
>         };
> 

All of above are wrong for the SoC...

> 
>         #include <dt-bindings/interrupt-controller/arm-gic.h>
>         #include <dt-bindings/clock/nxp,imx95-clock.h>
>         
>         soc {
>           #address-cells = <2>;
>           #size-cells = <2>;
>         
>           vpu: video-codec {
>             compatible = "nxp,imx95-vpu", "cnm,wave633c";

What does this device represent? It is not "ctrl", because you made ctrl
separate device node. Your binding description suggests that is the VPU
control region.

>             clocks = <&scmi_clk 115>,
>                      <&vpu_blk_ctrl IMX95_CLK_VPUBLK_WAVE>;

For which sub devices these clocks are valid? For all of them?

>             clock-names = "vpu", "vpublk_wave";
>             power-domains = <&scmi_devpd 21>;
>             #address-cells = <2>;
>             #size-cells = <2>;
>             ranges;
>         
>             vpucore0: video-core@4c480000 {
>               compatible = "nxp,imx95-vpu-core";
>               reg = <0x0 0x4c480000 0x0 0x10000>;
>               interrupts = <GIC_SPI 299 IRQ_TYPE_LEVEL_HIGH>;
>             };
>         
>             vpucore1: video-core@4c490000 {
>               compatible = "nxp,imx95-vpu-core";
>               reg = <0x0 0x4c490000 0x0 0x10000>;
>               interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>;
>             };
>         
>             vpucore2: video-core@4c4a0000 {
>               compatible = "nxp,imx95-vpu-core";
>               reg = <0x0 0x4c4a0000 0x0 0x10000>;
>               interrupts = <GIC_SPI 301 IRQ_TYPE_LEVEL_HIGH>;
>             };
>         
>             vpucore3: video-core@4c4b0000 {
>               compatible = "nxp,imx95-vpu-core";
>               reg = <0x0 0x4c4b0000 0x0 0x10000>;
>               interrupts = <GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>;
>             };
>         
>             vpuctrl: video-controller@4c4c0000 {
>               compatible = "nxp,imx95-vpu-ctrl";
>               reg = <0x0 0x4c4c0000 0x0 0x10000>;
>               memory-region = <&vpu_boot>;
>               power-domains = <&scmi_perf 10>;
>               #cooling-cells = <2>;
>               sram = <&sram1>;
>             };
>           };
>         };
> 
>     };
> };
> 
>>
>> Best regards,
>> Krzysztof
> 


Best regards,
Krzysztof

  reply	other threads:[~2025-05-09 10:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22  9:31 [PATCH v2 0/8] Add support for Wave6 video codec driver Nas Chung
2025-04-22  9:31 ` [PATCH v2 1/8] media: v4l2-common: Add YUV24 format info Nas Chung
2025-04-24 15:43   ` Nicolas Dufresne
2025-04-22  9:31 ` [PATCH v2 2/8] dt-bindings: media: nxp: Add Wave6 video codec device Nas Chung
2025-04-25 10:34   ` Krzysztof Kozlowski
2025-05-09  9:59     ` Nas Chung
2025-05-09 10:11       ` Krzysztof Kozlowski [this message]
2025-05-13  7:39         ` Nas Chung
2025-05-16 12:55           ` Krzysztof Kozlowski
2025-05-19  5:08             ` Nas Chung
2025-05-20  6:27               ` Krzysztof Kozlowski
2025-05-20  8:31                 ` Nas Chung
2025-04-22  9:31 ` [PATCH v2 3/8] media: chips-media: wave6: Add Wave6 driver Nas Chung
2025-04-24 17:36   ` Nicolas Dufresne
2025-05-14  8:09     ` Nas Chung
2025-04-22  9:31 ` [PATCH v2 4/8] media: chips-media: wave6: Add Wave6 control driver Nas Chung
2025-04-29 20:47   ` Nicolas Dufresne
2025-05-14 10:15     ` Nas Chung
2025-04-22  9:31 ` [PATCH v2 5/8] media: chips-media: wave6: Add Wave6 VPU interface Nas Chung
2025-05-01 17:42   ` Nicolas Dufresne
2025-05-16  8:08     ` Nas Chung
2025-04-22  9:31 ` [PATCH v2 6/8] media: chips-media: wave6: Improve debugging capabilities Nas Chung
2025-04-22  9:31 ` [PATCH v2 7/8] media: chips-media: wave6: Add v4l2 m2m driver support Nas Chung
2025-04-22  9:31 ` [PATCH v2 8/8] media: chips-media: wave6: Add Wave6 core driver Nas Chung
2025-09-03 21:47 ` [PATCH v2 0/8] Add support for Wave6 video codec driver Marek Vasut
2025-09-04 13:25   ` Nicolas Dufresne
2025-09-04 15:32     ` Marek Vasut
2025-09-04 15:54       ` Nicolas Dufresne
2025-09-05  1:22         ` [EXT] " Ming Qian
2025-09-06 21:32         ` Marek Vasut

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=f1073f21-0885-486f-80c8-00f91dfd7448@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=jackson.lee@chipsnmedia.com \
    --cc=krzk+dt@kernel.org \
    --cc=lafley.kim@chipsnmedia.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=mchehab@kernel.org \
    --cc=nas.chung@chipsnmedia.com \
    --cc=robh@kernel.org \
    --cc=sebastian.fricke@collabora.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 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).