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 X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDA99C433EA for ; Tue, 14 Jul 2020 14:22:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA78B22365 for ; Tue, 14 Jul 2020 14:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594736577; bh=rd5OIlYx3b2juzE6QiM4oAmdyVKpLPJAqVO/kNES7eg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=uqWPp/BKvP6pCouZRZEDSdWduvyEdyITfLRQRac/fM2In2VBhX1m2bj7NTQeFjSsZ ZFkFQcWtwjztnH7zvocreSsZV2/tvUEvv2Cu95tQSFazC+CocNpYnI1281nULFI3fi S966GjkSVt3CrqqChWCF6rRGQDF393UaItl9QF6w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726356AbgGNOW5 (ORCPT ); Tue, 14 Jul 2020 10:22:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:48240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726187AbgGNOW5 (ORCPT ); Tue, 14 Jul 2020 10:22:57 -0400 Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 18E2E22365; Tue, 14 Jul 2020 14:22:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594736576; bh=rd5OIlYx3b2juzE6QiM4oAmdyVKpLPJAqVO/kNES7eg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=PmB0EueNtgPHX2PIZw5HyzxDwaxVRzOwkSePCRZQxkefXAoStuJY3G5ocmAJHX+la yemTL8A5jKBcSxloLAbA443fa5XKv/kgtrnrPv0eGK30vnwYtNcS57d5TYFzXRwpMk 4ojoqTORPROKHmG4o+HWInEO4xTKdJmcT20nSsSQ= Received: by mail-oi1-f173.google.com with SMTP id l63so14008939oih.13; Tue, 14 Jul 2020 07:22:56 -0700 (PDT) X-Gm-Message-State: AOAM5308eTQBeyuzycoIcssq26o1jkt3dr22JRo7TSk4bfUp0IPUyqz8 P1SALUiL8rCHP7O1klmvTzdHAneWOv7NZSuGNQ== X-Google-Smtp-Source: ABdhPJy6ZkarJ5J32IIpIQEGE/Wjp/cSwpg14EGOzfNSeRzwriu/1T8mkB7ZW+5hPoMCr1+/ya+Nb4Ie4kq7OvbrRc8= X-Received: by 2002:aca:bb82:: with SMTP id l124mr3965827oif.106.1594736575478; Tue, 14 Jul 2020 07:22:55 -0700 (PDT) MIME-Version: 1.0 References: <20200708050017.31563-1-vdumpa@nvidia.com> <20200708050017.31563-5-vdumpa@nvidia.com> <20200709201348.GA808454@bogus> In-Reply-To: From: Rob Herring Date: Tue, 14 Jul 2020 08:22:43 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v10 4/5] dt-bindings: arm-smmu: add binding for Tegra194 SMMU To: Robin Murphy Cc: Krishna Reddy , "joro@8bytes.org" , "will@kernel.org" , Thierry Reding , Jonathan Hunter , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "linux-tegra@vger.kernel.org" , Yu-Huan Hsu , Sachin Nikam , Pritesh Raithatha , Timo Alho , Bitan Biswas , Mikko Perttunen , Nicolin Chen , Bryan Huntsman , "nicoleotsuka@gmail.com" Content-Type: text/plain; charset="UTF-8" Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Jul 13, 2020 at 8:10 AM Robin Murphy wrote: > > On 2020-07-10 21:29, Krishna Reddy wrote: > > Thanks Rob. One question on setting "minItems: ". Please see below. > > > >>> +allOf: > >>> + - if: > >>> + properties: > >>> + compatible: > >>> + contains: > >>> + enum: > >>> + - nvidia,tegra194-smmu > >>> + then: > >>> + properties: > >>> + reg: > >>> + minItems: 2 > >>> + maxItems: 2 > > > >> This doesn't work. The main part of the schema already said there's only > >> 1 reg region. This part is ANDed with that, not an override. You need to add an else clause with 'maxItems: 1' and change the base schema to > >> {minItems: 1, maxItems: 2}. > > > > As the earlier version of base schema doesn't have "minItems: " set, should it be set to 0 for backward compatibility? Or can it just be omitted setting in base schema as before? > > We've always needed at least 1 "reg" specifier in practice, so I don't > think being backwards-compatible with broken DTs is a concern :) 'minItems: 0' would be a boolean (e.g. "reg;") and I'm not sure that's even really valid json-schema. What you'd want here is 'reg' not present (i.e. not in 'required'). Rob