Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp371581rdb; Tue, 31 Oct 2023 09:42:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwICe80FpY+1wI9v353Bc/mljNpdm8+x9meb0CN+Jxl7Djhkg6JRtMt8+6EAK5j6wOnErf X-Received: by 2002:a17:902:ecce:b0:1cc:59a1:79ae with SMTP id a14-20020a170902ecce00b001cc59a179aemr5688835plh.39.1698770537366; Tue, 31 Oct 2023 09:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698770537; cv=none; d=google.com; s=arc-20160816; b=aUfmyDTa0Trm7BWVfxFacM3YkqhXsZ3PAzpFGIJaeGIwE65wXl/gC9laYvFr+r/K1x 5ER+5R9CBhjAgg1eA8fBB6c2P7oWEm+UcBDo6MMe9+QtkMSkwKSmWO9gp3hZj/dJA/Rj JYMBB4w+MnHR6wwuWk1+ghDqkz1kVv/YlMy7PV7WRXCDp3AKqs/hPBILp7qZ2hQuaYE+ NokmIgJxWXAOyTQVzu29F8+P6LAqSwn7TNCm1YeZCETFx++yt5mdqa4N+fuv92BtkW4o K5UOlO6m1JUf4YJaPl9nxTcVTx9ICCZhzXx0LQBKsj6ZGphPFzHgW4MyLRy2gBHSZg4U fv0g== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=rMxQobL2C9Ih5ynT2fDAXkMqW1vSAxnXsdaxx4aMauw=; fh=lvmj9vqGIsvEB0WJrtt2wTEO+m67lo2Msj3Vr/PwJWo=; b=wrqPaRNUsetcz07GinN9qYPJJOdpE3rPMsb8kYPINMzr8+rROOf8xVxb7URdevbYv2 4WfVJ8v5sM/OL0/RJOJbxHRMhYYViNyByexzL1MbJyHeE36vfRaEywaavUagotjwuTdo QSv0zm+AzR4MigW3Mtz+W3RihZiU+wOnhNzdImFABfqCXH/6Qo2sjhsNQUU4qEViSFQn SQ35NkR7d2Jl+UzJkpEgNo5nG0RuBDfPn8GovQRRuuCNmcfYq2yQuwlKLbmaic3sTuSn klfdN0ehWLLowOFqBCBGsByL3PKw8M9eyEigSs6KJnMgBpFXIDCs0YWdie5bgdoW18mb 2R5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Gl3UBQWy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id f3-20020a170902e98300b001cbd8dd09e8si1186875plb.537.2023.10.31.09.42.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 09:42:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Gl3UBQWy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 280A480967A0; Tue, 31 Oct 2023 09:42:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346080AbjJaQmJ (ORCPT + 99 others); Tue, 31 Oct 2023 12:42:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346703AbjJaQlm (ORCPT ); Tue, 31 Oct 2023 12:41:42 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AB9330E5; Tue, 31 Oct 2023 09:39:27 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 39VGc99a004710; Tue, 31 Oct 2023 11:38:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1698770289; bh=rMxQobL2C9Ih5ynT2fDAXkMqW1vSAxnXsdaxx4aMauw=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=Gl3UBQWyuntZv13eEWHDFlxwPnMUlvRRiMdggQvN7fwlmJcG+djBrJlocN1yp3H8e YWqPV7e8WPpeX0ZIWxjzp2aLh4ff9/lr10HdPwdcO55nBoDs+aXQA4SGhoCtIsYwXc 21hV586kBu/5irnQAcKG6muKXMyp9P/qIRi1Yur4= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 39VGc9I8127636 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 31 Oct 2023 11:38:09 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 31 Oct 2023 11:38:09 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 31 Oct 2023 11:38:09 -0500 Received: from [10.249.132.69] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 39VGc5E6011960; Tue, 31 Oct 2023 11:38:06 -0500 Message-ID: <5d251b55-7050-c212-c262-49127f86f32c@ti.com> Date: Tue, 31 Oct 2023 22:08:04 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] scripts/dtc: Allow ports to have a single port@0 child Content-Language: en-US To: Rob Herring CC: Frank Rowand , Devicetree List , Linux Kernel List , Andrew Davis , Nishanth Menon , Vignesh Raghavendra , Devarsh Thakkar , Jai Luthra , Jayesh Choudhary References: <20231013085424.7137-1-a-bhatia1@ti.com> <20231025193113.GA994152-robh@kernel.org> From: Aradhya Bhatia In-Reply-To: <20231025193113.GA994152-robh@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 31 Oct 2023 09:42:14 -0700 (PDT) On 26-Oct-23 01:01, Rob Herring wrote: > On Fri, Oct 13, 2023 at 02:24:24PM +0530, Aradhya Bhatia wrote: >> Exempt 'ports' from the rule which asserts that nodes with single child >> node having reg = 0, should not have the '#size-cells' and >> '#address-cells' properties. >> >> Ports of certain hardware do need to be described as only having a >> single child node 'port@0', especially when hardware has multiple ports, >> and the other ports 'port@x' are planned to be added subsequently. In >> such cases, just using 'port', would be an inaccurate hardware >> description. >> >> For example, Texas Instruments' DSS (display-subsystem), which has 2 or >> 4 video ports depending on the SoC. Describing the first video port with >> just 'port' under ports would be inaccurate and even slightly >> misleading. Simply using port@0 (when other ports are not added) >> produces the following warning, while making dtbs with W=1 flag set[0]. > > There's a reason this is behind W=1. > > In general, if you only have a single 'port' it should be just 'port' > which is equivalent to port 0. There's exceptions to that, so the > warning is off by default. Thank you for reviewing the patch, Rob! I had a discussion offline, and I agree that the patch may not be needed after all. Moreover, upon looking at the tests provided in upstream dtc tree, I also realized that the check is exclusively limited to port@0, and does not include any random 'child@0'. This makes the patch make a lot less sense too. Regards Aradhya > >> code-block :: >> >> Warning (graph_child_address): /bus@100000/dss@4a00000/ports: >> graph node has single child node 'port@0', >> #address-cells/#size-cells are not necessary >> >> Signed-off-by: Aradhya Bhatia >> >> [0]: https://lore.kernel.org/all/570903b6-8239-d44a-5fac-71700804cb5d@ti.com/ >> --- >> scripts/dtc/checks.c | 11 ++++++++++- >> 1 file changed, 10 insertions(+), 1 deletion(-) > > This is a copy of upstream dtc. We don't take patches for it (except in > emergency). Look at the commit history. > > Rob