mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Riesch <michael.riesch@wolfvision.net>
To: Heiko Stuebner <heiko@sntech.de>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@kernel.org>,
	devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCH] arm64: dts: rockchip: fix nodename warning on wolfvision-pf5-display
Date: Tue, 23 Apr 2024 11:39:26 +0200	[thread overview]
Message-ID: <3f93ecb0-a649-4492-8798-a00de26236c8@wolfvision.net> (raw)
In-Reply-To: <20240423082941.2626102-1-heiko@sntech.de>

Hi Heiko,

First of all, thanks a lot for doing this!

On 4/23/24 10:29, Heiko Stuebner wrote:
> The dtbs check throws a warning about node naming with the recently
> added pf5-display-overlay:
> rockchip/rk3568-wolfvision-pf5-display.dtsi:113.6-121.3: Warning (graph_port): /fragment@4/__overlay__: graph port node name should be 'port'
> 
> This comes from the overlay just referencing the vp2-port-node via
> its phandle and then adding an endpoint beneath it.
> 
> While this is possible something to handle inside the dtbs check,
> carrying around the warning is not pretty, so change the description
> to go around it.

What is the rationale behind that check? Describing a port in a SoC dtsi
or board dts and using the reference in an overlay is quite convenient
and above all concise.

Cc: device tree list
> Starting from the vop_out phandle and then referencing the port
> via its generic port@2 nodename will satisfy the port<->endpoint
> naming dependency while keeping the same structure once the overlay
> is applied.
> 
> Reported-by: Arnd Bergmann <arnd@kernel.org>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
>  .../rockchip/rk3568-wolfvision-pf5-display.dtsi    | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568-wolfvision-pf5-display.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-wolfvision-pf5-display.dtsi
> index b22bb543ecbb..18c807c39e56 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3568-wolfvision-pf5-display.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3568-wolfvision-pf5-display.dtsi
> @@ -110,12 +110,14 @@ &pwm10 {
>  	status = "okay";
>  };
>  
> -&vp2 {
> -	#address-cells = <1>;
> -	#size-cells = <0>;
> +&vop_out {
> +	port@2 {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
>  
> -	vp2_out_rgb: endpoint@ROCKCHIP_VOP2_EP_RGB0 {
> -		reg = <ROCKCHIP_VOP2_EP_RGB0>;
> -		remote-endpoint = <&panel_in_vp2>;
> +		vp2_out_rgb: endpoint@ROCKCHIP_VOP2_EP_RGB0 {
> +			reg = <ROCKCHIP_VOP2_EP_RGB0>;
> +			remote-endpoint = <&panel_in_vp2>;
> +		};
>  	};
>  };

With this patch applied the DTC warning "Warning (graph_port):
/fragment@4/__overlay__: graph port node name should be 'port'"
vanishes, but a different DTC warning "Warning (unit_address_vs_reg):
/fragment@4/__overlay__/port@2: node has a unit name, but no reg or
ranges property" appears. Can you reproduce this?

I tried to fix that by adding the reg property, but then DTC complained
about "Warning (graph_port): /fragment@9/__overlay__/ports/port@0: graph
node '#size-cells' is -1, must be 0"

Then, I added the #size-cells property to avoid this. However, DTC
complained about this property not being necessary as there is only one
port. I stopped at this point.

I would say the real question is how this hardware should look like in
the device tree (overlay). Then, the compiler and/or build scripts can
be adjusted to tolerate this.

Thanks and best regards,
Michael

  reply	other threads:[~2024-04-23  9:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23  8:29 Heiko Stuebner
2024-04-23  9:39 ` Michael Riesch [this message]
2024-04-23 11:03   ` Heiko Stübner

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=3f93ecb0-a649-4492-8798-a00de26236c8@wolfvision.net \
    --to=michael.riesch@wolfvision.net \
    --cc=arnd@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    /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

all inboxes | Powered by JetHome®