Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E27BC43334 for ; Wed, 13 Jul 2022 10:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:Cc:To:From :Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lhteGPgTTtLSzihf1uQaUQc74yI8odfD8ayVk+y7H08=; b=MmhwnTN92GpXdr3B+RRbmAUSYu 3aiNZyCTosA1eor39O1L3YiumGCclFmA60hXtpSzViI0N4gji9BJIpZX6K4lWsfXgbsSiSksCgwNV gLkw76aAA8jot4iVqJaQg+SyHhv3NkMzSFOPyGVyOyHl1mT0Fgvhq5i3yp5SQvxXdvP3TEoeIYCmv 8W68iD8fKJFUz9vTLSNjL4fg+pheyKD27D9wuFwMTeDMh6ToctP0viSgfNR6boczYKcQa6l1Y18ns 9ODB5o01XQrsX/cil+VV8d6xMD95a8Ya323HnQPHF3LqyGaUsf/1hFevd/N/Qw2mQAAC+mw4iS7T3 e79qK4Zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oBZxh-002om9-2l; Wed, 13 Jul 2022 10:51:21 +0000 Received: from 14.mo583.mail-out.ovh.net ([188.165.51.82]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oBZxc-002oji-PJ for linux-arm-kernel@lists.infradead.org; Wed, 13 Jul 2022 10:51:19 +0000 Received: from player755.ha.ovh.net (unknown [10.110.171.136]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id 6ECE9243ED for ; Wed, 13 Jul 2022 10:51:11 +0000 (UTC) Received: from RCM-web6.webmail.mail.ovh.net (ip-194-187-74-233.konfederacka.maverick.com.pl [194.187.74.233]) (Authenticated sender: rafal@milecki.pl) by player755.ha.ovh.net (Postfix) with ESMTPSA id 137262CA9DA91; Wed, 13 Jul 2022 10:50:56 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 13 Jul 2022 12:50:55 +0200 From: =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= To: William Zhang Cc: Krzysztof Kozlowski , Linux ARM List , kursad.oney@broadcom.com, anand.gore@broadcom.com, dan.beygelman@broadcom.com, f.fainelli@gmail.com, Broadcom Kernel List , joel.peshkin@broadcom.com, Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/3] dt-bindings: arm64: bcmbca: Merge BCM4908 into BCMBCA In-Reply-To: <6efb1cfe-6129-276a-eeb3-44147304d211@broadcom.com> References: <20220712021144.7068-1-william.zhang@broadcom.com> <20220712021144.7068-2-william.zhang@broadcom.com> <94b0ab39-279d-d3c2-98a4-054c10ad041c@broadcom.com> <6efb1cfe-6129-276a-eeb3-44147304d211@broadcom.com> User-Agent: Roundcube Webmail/1.4.13 Message-ID: X-Sender: rafal@milecki.pl X-Originating-IP: 194.187.74.233 X-Webmail-UserID: rafal@milecki.pl X-Ovh-Tracer-Id: 11789860877335440347 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrudejjedgfedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepggffhffvvefujghffgfkgihitgfgsehtjehjtddtredvnecuhfhrohhmpeftrghfrghlpgfoihhlvggtkhhiuceorhgrfhgrlhesmhhilhgvtghkihdrphhlqeenucggtffrrghtthgvrhhnpeegvdffjeelvdeggeetheegveejieetgeeiiefggeelveejffehieekhfduueelhfenucfkpheptddrtddrtddrtddpudelgedrudekjedrjeegrddvfeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehplhgrhigvrhejheehrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheprhgrfhgrlhesmhhilhgvtghkihdrphhlpdhnsggprhgtphhtthhopedupdhrtghpthhtoheplhhinhhugidqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhgpdfovfetjfhoshhtpehmohehkeef X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220713_035117_161803_19ABACDA X-CRM114-Status: GOOD ( 16.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-07-13 02:57, William Zhang wrote: > On 7/12/22 11:18, Krzysztof Kozlowski wrote: >> On 12/07/2022 19:37, William Zhang wrote: >>>>> + - description: BCM4908 Family based boards >>>>> + items: >>>>> + - enum: >>>>> + # BCM4908 SoC based boards >>>>> + - brcm,bcm94908 >>>>> + - asus,gt-ac5300 >>>>> + - netgear,raxe500 >>>>> + # BCM4906 SoC based boards >>>>> + - brcm,bcm94906 >>>>> + - netgear,r8000p >>>>> + - tplink,archer-c2300-v1 >>>>> + - enum: >>>>> + - brcm,bcm4908 >>>>> + - brcm,bcm4906 >>>>> + - brcm,bcm49408 >>>> >>>> This is wrong. brcm,bcm94908 followed by brcm,bcm4906 does not look >>>> like valid list of compatibles. >>>> >>> For 4908 board variant, it will need to be followed by 4908 chip. >>> Sorry >>> for the basic question but is there any requirement to enforce this >>> kind >>> of rule? I would assume dts writer know what he/she is doing and >>> select >>> the right combination. >> >> The entire point of DT schema is to validate DTS. Combination like >> above >> prevents that goal. >> >> Best regards, >> Krzysztof > Understand the DT schema purpose. But items property allows multiple > enums in the list which gives a lot of flexibility but make it hard to > validate. I am not familiar with DT schema, is there any directive to > specify one enum value depending on another so dts validation tool can > report error if combination is wrong? > > This is our preferred format of all bcmbca compatible string > especially when we could have more than 10 chip variants for the same > chip family and we really want to work on the chip family id. We will > make sure they are in the right combination in our own patch and patch > from other contributors. Would this work? If not, I will probably have > to revert the change of 4908(maybe append brcm,bcmbca as this chip > belongs to the same bca group) and use "enum board variant", "const > main chip id", "brcm,bca" for all other chips as our secondary choice. I'm not sure why I didn't even receive 1/3 and half of discussion e-mails. You can't just put all strings into a single bag and allow mixing them in any combos. Please check how it's properly handled in the current existing binding: Documentation/devicetree/bindings/arm/bcm/brcm,bcm4908.yaml Above binding enforces that non-matching compatible strings are not used together. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel