From mboxrd@z Thu Jan 1 00:00:00 1970 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 6B009ECAAD1 for ; Thu, 1 Sep 2022 15:25:41 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5Q1Hrigo8HSlos8rglLy7xiC0dsObk4NfLe5nuYmHxY=; b=kdtgHhlYEA/ywj SfbYuf5rw+uwwX9WQeY4HdulOzz8Q3qL/9k6uL5fl4ykOZkv7KEa0XbxYPiQeCEJHyCc9iC2pQ/jW 9k77+mGCh9WjX327y24KjPkt+NFjJvUSOqfj19dy4QaKRiqyeoxI9heKA8FJx+FDEPkJ54/yggQQ9 vThwA1HZRCjg2HIgpGXqgzG2nlcF5+pkcWQoqmJcGI1eeRDoCjy6Nj1ip/bBsDLo9fMIgjjbLRDfH PW5wsS0FVhUBbFjVS5nG4SzoniVkcV8e7HvKvg3iH1+zlS14pWr11hA9uBfkiUaf1gYj93gTzi+Tf ckJdM8YnmlA9Ny9qdHmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTm3U-00CppA-K8; Thu, 01 Sep 2022 15:24:32 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTm3P-00Cpn5-IM for linux-arm-kernel@lists.infradead.org; Thu, 01 Sep 2022 15:24:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EM9unvrkq5KRXP4o9UGZIuXzbMhXAHieicgtIajlFio=; b=NVfxU3cQBDLMSI4eTEe+8zr9Xg o3IdDia1gfpLSkNnfZRD3V5wNNifg9d+qVmtK+9T867ltBDd0lF+GRB6IUqVKCOoaTyxVdraED8DA oCuT1pnvWBZlznrGb0McrrMigJJKVZQRy5IDzpGLAcWshX14Bw8uA+8u1mAls64KRsp8t+m6E8g1i p3tUlqAPVN2TMQF5Gf5AVCsRlwjqWxRR+bkPAmlxTouHm0g/Y8N2VObbrb8w7dyAN/eS61S430U3I x5JqsMJWzhGGASp9VlDe9a+zQQPubEizbaACCsTZ9bevCLvjrCHyqm8hEHkK1DnUjYkhP7niYp/Vq 1mi6wcxw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34044) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oTm3J-00069M-9M; Thu, 01 Sep 2022 16:24:21 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1oTm3I-0003Z9-2M; Thu, 01 Sep 2022 16:24:20 +0100 Date: Thu, 1 Sep 2022 16:24:20 +0100 From: "Russell King (Oracle)" To: Krzysztof Kozlowski Cc: Arnd Bergmann , Lee Jones , Linus Walleij , Alyssa Rosenzweig , asahi@lists.linux.dev, Bartosz Golaszewski , Hector Martin , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, Sven Peter , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org Subject: Re: [PATCH 1/6] dt-bindings: mfd: add binding for Apple Mac System Management Controller Message-ID: References: <426469c1-13cc-178b-4904-09439d7788e8@linaro.org> <928ddeff-efac-920c-7bbf-dda35a942b93@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <928ddeff-efac-920c-7bbf-dda35a942b93@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220901_082427_631989_97CC8DCD X-CRM114-Status: GOOD ( 22.57 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 01, 2022 at 06:15:46PM +0300, Krzysztof Kozlowski wrote: > On 01/09/2022 18:12, Russell King (Oracle) wrote: > >>> + compatible: > >>> + items: > >>> + - enum: > >>> + - apple,t8103-smc > >> > >> You miss two spaces of indentation on this level. > > > > Should that be picked up by the dt checker? > > I think yamllint complains about it. It is not a hard-dependency, so > maybe you don't have it installed. > > > > >>> + - apple,t8112-smc > >>> + - apple,t6000-smc > >> > >> Bring some order here - either alphabetical or by date of release (as in > >> other Apple schemas). I think t6000 was before t8112, so it's none of > >> that orders. > > > > Ok. > > > >>> + - const: apple,smc > >>> + > >>> + reg: > >>> + description: Two regions, one for the SMC area and one for the SRAM area. > >> > >> You need constraints for size/order, so in this context list with > >> described items. > > > > How do I do that? I tried maxItems/minItems set to 2, but the dt checker > > objected to it. > > One way: > reg: > items: > - description: SMC area > - description: SRAM area > > but actually this is very similar what you wrote for reg-names - kind of > obvious, so easier way: > > reg: > maxItems: 2 Doesn't work. With maxItems: 2, the example fails, yet it correctly lists two regs which are 64-bit address and 64-bit size - so in total 8 32-bit ints. Documentation/devicetree/bindings/mfd/apple,smc.example.dtb: smc@23e400000: reg: [[2, 1044381696], [0, 16384], [2, 1071644672], [0, 1048576]] is too long From schema: /home/rmk/git/linux-rmk/Documentation/devicetree/bindings/mfd/apple,smc.yaml Hence, I originally had maxItems: 2, and ended up deleting it because of the dt checker. With the two descriptions, it's the same failure. I think the problem is that the checker has no knowledge in the example of how big each address and size element of the reg property is. So, it's interpreting it as four entries of 32-bit address,size pairs instead of two entries of 64-bit address,size pairs. Yep, that's it, if I increase the number of "- description" entries to four then it's happy. So, what's the solution? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel