Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp629371rwd; Thu, 25 May 2023 01:22:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7xPEpd3mHHg8KskBWyCQ7YlI6DGvjskynOn0F0/KOCHZrKSPy3Z7Bk2F0P6IBGH/+SUxty X-Received: by 2002:a05:6a00:1301:b0:649:dd0d:69d1 with SMTP id j1-20020a056a00130100b00649dd0d69d1mr6767320pfu.31.1685002947515; Thu, 25 May 2023 01:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685002947; cv=none; d=google.com; s=arc-20160816; b=Ks4PL2UfoSVGcnm3cosbrQ4x0Am6O59EslDW+NrG7IOsFYH5jFHkMSMS8Hdb1cKJGQ kyVK7KW7aLbHFK2T3zYixf4lwu/9U3ldhMsisXvcfFIcZ7trtrYWjpVXVWoYZoGucndK vcPd2r4x/mGrUItZF64W0TJHJvuPIpGZV0HDF9nWcn66HRdp5zVKJ0/9wgIXBn7mzGTQ B46NK3Aldddcmou0/HQE4gbptTdqi3Zan+khETBny85yT4RkjtQWZ6fJv6PmssPKy6lF MmLDz1e1zPhE3vcABNHGJ9QLrZVUZwQUveGmvTmjLkXSl5NrxW6NTAFgT2b1Zp51t3vK lM8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature; bh=6eqB/2RVN5f/EsmFhOLILkPDHswfNdCOdRhZtrk1duU=; b=gxHV+sbT2Eh/xf8wMc6e4X+6JsBZqVfk9UZxIQHpXWXmoEsk/I3W6L7vE1zsQfiEHB IpWHrqf0MB4JMgk+A5u9v3wENNCvvoG18SUTKqurEJZE9pM/Tmfbho/9a2s0cP/06AG4 052fkAD+stUO3dn6Xzn/T2D/xD/HS8ZeEWcRK1IdqtJ8zcVyB78w93kyvC2R9VZwGsXn N9V5khwa0qaMUedYKC7Ne/DR2KVlOVii4+fA9FoW2XHPPgbD+IFV8BKPx8Nk8wKP7ZS1 v7XXfkyYTdxGwfBL66ImivDU7NC4cNNSIi0cRNeFPw1CESthErzWsQxGUujglDcHE6HP jeTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=K+tsvG6E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z29-20020aa7949d000000b0064d5aab3ec5si962534pfk.156.2023.05.25.01.22.12; Thu, 25 May 2023 01:22:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=K+tsvG6E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235403AbjEYIP1 (ORCPT + 99 others); Thu, 25 May 2023 04:15:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjEYIPZ (ORCPT ); Thu, 25 May 2023 04:15:25 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E013E195; Thu, 25 May 2023 01:15:20 -0700 (PDT) Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34P6vCna010987; Thu, 25 May 2023 10:14:54 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : from : subject : to : cc : references : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=6eqB/2RVN5f/EsmFhOLILkPDHswfNdCOdRhZtrk1duU=; b=K+tsvG6ECwhzWGvIrNzOwpjUqyOubAhwbi2QX4tUeFUYHRsm9Nb4JX0jBpFYvkxuBplF DxOwlBlN0UZpkNadjuB2e5Q++17yRrTayHjHprSnkQdNHsgJqVZyEYQ2RKgO6/R2sNIy DQ30QwWdeNvSW560OuPSk2VffPS7Cj/z2qEAuJou5eO5yRxVxMSjzbygIvlHhBMaA4yG oM5PMGD85Y7sKFbwhr9kvSyCjaJwVyLOOqFjyZfffrHFcQwbD8t7tkCDMUNFo0GtMHJv Y/XK385ajzTVd8EzcoimwS7aKwflkwBwF7Ml7EdMNanRpmOjdrulTBCwUzW98+hE/6kR Jw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3qt2uy8k3c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 May 2023 10:14:54 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B6BE810002A; Thu, 25 May 2023 10:14:53 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A5474212FDC; Thu, 25 May 2023 10:14:53 +0200 (CEST) Received: from [10.252.18.243] (10.252.18.243) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 25 May 2023 10:14:52 +0200 Message-ID: <32fafa74-8964-c9cf-f95b-f2cd084f46c6@foss.st.com> Date: Thu, 25 May 2023 10:14:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 From: Raphael Gallais-Pou Subject: Re: [PATCH v3 3/3] ARM: dts: stm32: fix several DT warnings on stm32mp15 To: Marek Vasut , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Philippe Cornu , Yannick Fertre CC: , , , , , References: <20230517143542.284029-1-raphael.gallais-pou@foss.st.com> <20230517143542.284029-4-raphael.gallais-pou@foss.st.com> <5f201903-17cb-5054-763c-f03b1066db1d@denx.de> Content-Language: en-US In-Reply-To: <5f201903-17cb-5054-763c-f03b1066db1d@denx.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.252.18.243] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-25_04,2023-05-24_01,2023-05-22_02 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/18/23 01:33, Marek Vasut wrote: > On 5/17/23 19:04, Raphael Gallais-Pou wrote: >> Hi Marek > > Hi, > >> On 5/17/23 17:41, Marek Vasut wrote: >>> On 5/17/23 16:35, Raphael Gallais-Pou wrote: >>> >>> Hi, >>> >>>> diff --git a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi >>>> b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi >>>> index 0f1110e42c93..a6e2e20f12fa 100644 >>>> --- a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi >>>> +++ b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi >>>> @@ -457,8 +457,7 @@ <dc { >>>>        status = "okay"; >>>>          port { >>>> -        ltdc_ep0_out: endpoint@0 { >>>> -            reg = <0>; >>>> +        ltdc_ep0_out: endpoint { >>>>                remote-endpoint = <&sii9022_in>; >>>>            }; >>>>        }; >>> >>> This LTDC port/endpoint stuff always scares me, because I always feel I get it >>> wrong. >>> >>> I believe the LTDC does have one "port" , correct. >>> >>> But I think (?) that the LTDC has two endpoints, endpoint@0 for DPI (parallel >>> output out of the SoC) and endpoint@1 for DSI (internal connection into the >>> DSI serializer) ? >> >> You are correct indeed, I rushed the patch and did not thought about this. I >> agree that this can be confusing, as I also take some time to think through it. >> >>> >>> Only one of the endpoints can be connected at a time, but there are actually >>> two endpoints in the LTDC port {} node, aren't there ? >> Yes, they are mutually exclusive. >>> >>> So the original description should be OK I think , maybe #address/#size-cells >>> are missing instead ? >> >> Thing is: this file is only included in two device-trees : stm32mp157c-dk1.dts >> and stm32mp157c-dk2.dts. >> >> Among those two files there is only one which adds a second endpoint. Thus if >> the fields are set higher in the hierarchy, a warning yields. > > I do not understand this one part, which warning are you trying to fix ? > I just ran '$ make CHECK_DTBS=1 stm32mp157a-dk1.dtb stm32mp157c-dk2.dtb' in > latest linux-next and there was no warning related to LTDC . I'm sorry, I looked back at it and my explanations are confusing. I use Alex Torgue's tree, and I'm based on the next branch, but linux-next should be the same I just checked it. > > I think if you retain the stm32mp151.dtsi <dc { port { #address-cells = <1>; > #size-cells = <0>; }; }; part, then you wouldn't be getting any warnings > regarding LTDC , and you wouldn't have to remove the unit-address from > endpoint@0 . > > btw. I do use both endpoint@0/endpoint@1 in Avenger96 DTOs, but those are not > submitted yet, I have to clean them up a bit more first. > >> One way to do it would be to make the endpoint@0 go down in the device-tree with >> its dependencies, so that both endpoints are the same level without generating >> noise. > > I'm afraid I really don't quite understand which warning you're referring to. > Can you please share that warning and ideally how to trigger it (the > command-line incantation) ? Using '$ make dtbs W=1', you can observe several of the followings: arch/arm/boot/dts/stm32mp151.dtsi:1533.9-1536.6: Warning (avoid_unnecessary_addr_size): /soc/display-controller@5a001000/port: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property arch/arm/boot/dts/stm32mp151.dtsi:1533.9-1536.6: Warning (graph_child_address): /soc/display-controller@5a001000/port: graph node has single child node 'endpoint@0', #address-cells/#size-cells are not necessary This <dc { port { #address-cells = <1>; #size-cells = <0>; }; }; part is actually annoying. This is because there is several device-trees that only got one endpoint, and some other that includes two. For instance: stm32mp15xx-dhcor-avenger96.dtsi vs stm32mp157c-dk2.dts. I would like to remove to root part of address/size field and let only the lower device-trees with with multiple endpoints handle their own fields. I hope this explains a bit better my process. Regards, Raphaël Gallais-Pou