Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp855760pxb; Thu, 15 Apr 2021 08:09:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGTah5ZWNZjuHJ/mC2UPEY9PgM4+i3F3gpsyWaCglgeNW+GOTCJomwAFqV3HQkMI7h7yG3 X-Received: by 2002:a17:90a:5217:: with SMTP id v23mr505899pjh.95.1618499381486; Thu, 15 Apr 2021 08:09:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618499381; cv=none; d=google.com; s=arc-20160816; b=oXoMzpnYdGRjdN4sPUhb9mQsiAVo1zHdNZ0StHpdhlqWxqI6NwZvbSZdbKaukTFXd9 vAslaYe2P70//mji1g6LdmtFgKQK3+a8DmNVMzd1j7bI4w3zg4mvlDz01E9vpaE9f0JC VWBQqumuujY6OaARq+zHYE5cBTkY8qnb7T0iMUgPPmL2RRP5TPf/F2bSedrunHtEKDFW W/fsqUbJGTUTjzq9RuoMwf1HNh0IhWtEVn5IL5SR5GaXeZXBd9I/Fy4cmcpGZL/xtKj8 yreALOFRKDum/WpeVuhjXcMut7L/anriv280DWlCR0nWVybyBiEOBIoWa7+ne48mf79C 38IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=Kw07LkJdKop/yJQQqAUybaOom8omiDfjimVgY6INlKM=; b=uZdWLLX63mVFTlK9OhXf1me/Oi1vG682JZovHWvKTO6cCYPMEcwxeItgT9vOFjNFkh tlfpl4Xcdy2UDDuCY2Lmg7Do2Ijla34zm6tlvGiqqcAZOlXZShrAJ4Yncmxs7gNw6Twf USaY9r/QGmTduKmeyWehWTT7RVYL1Ednwt0UBfPhhRIcax+K/Ry3A+tCMVx2vj1M1srY EbvtpJXW2PZzmp1SGSNL3E3tNyxVLmzFdXEhecToj327okrCr7d5hv35P13o3S1aesvQ 7DrzZlqeUWg/+kpvvSeamqX7zp5hzNtDe0PsPpxUdnVyp2QXCwp1Ab1jFzru5wG9GnnH jmpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=qG3vJnac; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 207si3827681pfz.188.2021.04.15.08.09.29; Thu, 15 Apr 2021 08:09:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=qG3vJnac; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234719AbhDOPIL (ORCPT + 99 others); Thu, 15 Apr 2021 11:08:11 -0400 Received: from phobos.denx.de ([85.214.62.61]:55638 "EHLO phobos.denx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234869AbhDOPAF (ORCPT ); Thu, 15 Apr 2021 11:00:05 -0400 Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id C55F181FE1; Thu, 15 Apr 2021 16:59:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1618498780; bh=Kw07LkJdKop/yJQQqAUybaOom8omiDfjimVgY6INlKM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=qG3vJnacjJH2T6/LHSUKQqKJUBWrcEN7r6NhcGCSdBtN4nss3tWZ0nO/Ises27Xvc VJGziRkn7XGX6HeJNFZ3NKxgJfYbo1qxsVRITxF5utVsu0V855wi9W/o5nOiAsG4j4 LzmcixCWz41r3/bCwgBpZpWa7aJMXgqoXHnAz/0L093+4TBflUjIMWQCZR0RFKlVXg k47GEkzZmKdFN1i6BrfQukuubfOoZ8NLj6HD4D23S0QhGYD27jXWwe+QQ52WES1B9h aS32TR1XAlYbdiafXGiMDKeW4MksrP+jd/DapR7g7HXa8+g0bzZaaTBKJcCvdhW4+c +FMQpDAlr3Yfg== Subject: Re: [PATCH 11/13] ARM: dts: stm32: fix LTDC port node on STM32 MCU ad MPU To: Alexandre TORGUE , arnd@arndb.de, robh+dt@kernel.org, jagan@amarulasolutions.com, Manivannan Sadhasivam , Marcin Sloniewski , Ahmad Fatoum Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-kernel@vger.kernel.org, Lee Jones , kuba@kernel.org References: <20210415101037.1465-1-alexandre.torgue@foss.st.com> <20210415101037.1465-12-alexandre.torgue@foss.st.com> <3b39908b-a263-a5d4-f6ac-ac30ffb06269@denx.de> <36e9f0df-dfdb-e2f5-3d6e-ac32a1b8156e@foss.st.com> <3961c9ae-41cc-5a15-2704-ffc0832f0fe8@foss.st.com> From: Marek Vasut Message-ID: <57a7f4bf-42e9-56fb-e898-2c5749f53c60@denx.de> Date: Thu, 15 Apr 2021 16:59:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <3961c9ae-41cc-5a15-2704-ffc0832f0fe8@foss.st.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/15/21 4:35 PM, Alexandre TORGUE wrote: > > > On 4/15/21 4:30 PM, Marek Vasut wrote: >> On 4/15/21 3:34 PM, Alexandre TORGUE wrote: >>> Hi Marek >> >> Hello Alexandre, >> >>>>> diff --git a/arch/arm/boot/dts/stm32mp157c-dk2.dts >>>>> b/arch/arm/boot/dts/stm32mp157c-dk2.dts >>>>> index 2bc92ef3aeb9..19ef475a48fc 100644 >>>>> --- a/arch/arm/boot/dts/stm32mp157c-dk2.dts >>>>> +++ b/arch/arm/boot/dts/stm32mp157c-dk2.dts >>>>> @@ -82,9 +82,15 @@ >>>>>   }; >>>>>   <dc { >>>>> -    status = "okay"; >>>>> - >>>>>       port { >>>>> +        #address-cells = <1>; >>>>> +        #size-cells = <0>; >>>>> + >>>>> +        ltdc_ep0_out: endpoint@0 { >>>>> +            reg = <0>; >>>>> +            remote-endpoint = <&sii9022_in>; >>>>> +        }; >>>>> + >>>>>           ltdc_ep1_out: endpoint@1 { >>>>>               reg = <1>; >>>>>               remote-endpoint = <&dsi_in>; >>>> >>>> [...] >>>> >>>>> diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi >>>>> b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi >>>>> index 64dca5b7f748..e7f10975cacf 100644 >>>>> --- a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi >>>>> +++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi >>>>> @@ -277,11 +277,7 @@ >>>>>       status = "okay"; >>>>>       port { >>>>> -        #address-cells = <1>; >>>>> -        #size-cells = <0>; >>>>> - >>>>> -        ltdc_ep0_out: endpoint@0 { >>>>> -            reg = <0>; >>>>> +        ltdc_ep0_out: endpoint { >>>>>               remote-endpoint = <&adv7513_in>; >>>>>           }; >>>>>       }; >>>> >>>> I think this is wrong, the AV96 can have two displays connected to >>>> two ports of the LTDC, just like DK2 for example. >>> >>> As for dk2 address/size cells are added only if there are 2 >>> endpoints. It is for this reason I moved endpoint0 definition from >>> stm32mp15xx-dkx to stm32mp151a-dk1.dts (dk1 has only one endpoint). >>> >>> Here it's the same, if you have second endpoint then adress/size will >>> have to be added. >> >> That's a bit problematic. Consider either the use case of DTO which >> adds the other display, or even a custom board DTS. Without your >> patch, this works: >> >> arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi >> <dc { >>    ... >>    ports { >>      ltdc_ep0_out: endpoint@0 { >>        remote-endpoint = <&adv7513_in>; >>      }; >>    }; >> }; >> >> board-with-display.dts or board-overlay.dts >> <dc { >>    ports { >>      endpoint@1 { // just add another endpoint@1, no problem >>        remote-endpoint = <&display>; >>      }; >>    }; >> }; >> >> With your patch, the DTS would have to modify the "endpoint" node to >> be "endpoint@0" probably with a whole lot of /detele-node/ etc. magic >> (DTO cannot do that, so that's a problem, and I do use DTOs on AV96 >> extensively for the various expansion cards) and then add the >> endpoint@1. That becomes real complicated in custom board DT, and >> impossible with DTO. > > Yes I agree that it'll be problematic. So maybe so solution would be to > not detect a warning for the initial case (only one endpoint with a reg) That looks OK. Or even better, if the checker warned only on IPs which cannot have more than one endpoint, but have endpoint@N in DT (where N in 0..+inf) . On IPs which can have one or more endpoints, the warning should not be emitted.