Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1153157rdb; Tue, 30 Jan 2024 09:19:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGll+PyNg80Xzfik833NEQ4gOaXEJqCAUH6KPkEYBVQk6wMJK8cqcokf+NTowcPPsNvSYg9 X-Received: by 2002:a05:6a20:d908:b0:19c:9eea:e731 with SMTP id jd8-20020a056a20d90800b0019c9eeae731mr6290043pzb.40.1706635163189; Tue, 30 Jan 2024 09:19:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706635163; cv=pass; d=google.com; s=arc-20160816; b=f0SSiX3asSoM+UlayUOK5baKIYBiTPBeYmcqX5e59oQN08Is2damViSJHllwBPyq1Y FRvL/bGh+NYkphntrDVWa/djjv4tdK3ZFf1/xFLjIY+bIhwhWBzL8A2zbluiDDD2N1YP 1twcgSz7BsbjuH23JTS4NvPha9yvkhwpBKq2JJVVQzTVnNfvI7gRSJ+9NdnRFAr7HNSv t8f5M+baxC1zpNjzm+qHCPCU0r0Rm7ADwXe573ZcWkRLmDW/9dyvLJeOVQo/RuLx7NZr /ymUOMbqEN1RFDltWSHvd3uqXif5zDP5LG9xKTOOE6+bSlucTQBpo1Eg8w2l2Yd/rwId 6c8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4Kdts6TayeRUMI28M9EgJ1cgL0/CzIUcBz5H2+rrmMQ=; fh=wr419raNodbOmwDm6IqKmswfqfZZtqa3IWepPnQ3Rus=; b=SW75EfbEEvKxKk6LIIvH1xg5fmXvXcVrAmAniYgjLpgPh5IGCIDs7KHca/uhp1F9u4 EbHxrhKx5LNCkIUddGbQV7vpjiRJzNxYyeMjqC0eF9gJa2e3ruKPNrf8/LDKptgjk7h2 GSoZfsvl/5HL4Gg2MKZnHvc2WF1jgygBdfkHyDq7IWaCvyiO6D5IMGCZxPCKwl24+F4S c5LGaDqpCsV/ka0nYC6ciU+RCueenjPhnNC2p9UC46iBj9CvCmlzVJjfXQvjB3Cr6xfW XeMcNVozQUfUHb38Ws2U8o640VRTuNJ3G4CcUGt23xnui2jx9FVGLpjpjUTD5yb2IqG5 /9lw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NpLjzPUW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-45030-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45030-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id v13-20020a056a00148d00b006dbdbf8943esi7906986pfu.182.2024.01.30.09.19.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 09:19:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45030-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NpLjzPUW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-45030-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45030-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D2ABC2886DA for ; Tue, 30 Jan 2024 17:19:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AE96129A9B; Tue, 30 Jan 2024 17:19:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NpLjzPUW" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 219A41292D6; Tue, 30 Jan 2024 17:19:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706635151; cv=none; b=as8MDToy9YyJu+DFnSknJfZDS3JOweNP3Y8B3xVdyLE7aherVGjja+pO3zOsGV2bU+LAX+3fRIUkk0FHyaDUG0ssrn0pWadApKk+urhsffFp9i59t4SyAzAEYNUZvS3K2aps708D3WgV69DPin7IHmtf3zWY4Zq2NYZoesLmRDw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706635151; c=relaxed/simple; bh=y4IszyoidWFXzhNhDY2c9NDxcMcu1lKzZ3vPlfsqW38=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=s3CMu204px1xN/sRajQlcBFUFvOu0uu3ruHTVAaAjq7syO3uninJdyGB3CV+q9dJ8lt5DG0PfuVmwEbXaiv7HnMaIfL6gQWdl8OQ7KHlhNHfOsmzFY7nrSi5MSlzCgUHnUOzHutQrKxB7Iqm07rCPe6WKZJJvf5SwheEPxbEn/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NpLjzPUW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C14E4C433C7; Tue, 30 Jan 2024 17:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706635151; bh=y4IszyoidWFXzhNhDY2c9NDxcMcu1lKzZ3vPlfsqW38=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NpLjzPUWXqKV54fhDJhAYBoggAWgle3OxuN85QdeHkEbaDgS22ahV8cnmW+CwRNpO SIAcp+xgeFPt0rW4GBFx8d6u498AvJg6rfEbJf8z4srNRDx55/CEL4DGy3YDE4RHw0 p6I4x5rFA7NMe73dKX7X3Q7xbPNBDhcfToS0rULHyT+XIvusI7y5jsOkAl6awCK9/F 7LXkHo2wZT1wdYmcDT1qXwIaTSaXpCbkCjoDyqVmYiFFh3dAjVbYKJpRxr6jVUbLnV jVSuPZlSkOwnYqsRkbr8lSgJXzuS+IsycbymTehgrvqM88w9IsW5p+v3thCgAynqZL 65iP3i0p/mhNA== Date: Tue, 30 Jan 2024 11:19:08 -0600 From: Rob Herring To: Petlozu Pravareshwar Cc: thierry.reding@gmail.com, jonathanh@nvidia.com, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, dmitry.osipenko@collabora.com, ulf.hansson@linaro.org, kkartik@nvidia.com, cai.huoqing@linux.dev, spatra@nvidia.com, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH V2 2/3] dt-bindings: tegra: pmc: Update scratch as an optional aperture Message-ID: <20240130171908.GA1964535-robh@kernel.org> References: <20240117202504.943476-1-petlozup@nvidia.com> <20240117202504.943476-2-petlozup@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240117202504.943476-2-petlozup@nvidia.com> On Wed, Jan 17, 2024 at 08:25:03PM +0000, Petlozu Pravareshwar wrote: > Scratch address space register is used to store reboot reason. For > some Tegra234 systems, the scratch space is not available to store > the reboot reason. This is because scratch region on these systems > is not accessible by the kernel as restricted by the Hypervisor. > Such systems would delist scratch aperture from PMC DT node. > > Accordingly, this change makes "scratch" as an optional aperture for > Tegra234 in PMC dt-binding document. > > Signed-off-by: Petlozu Pravareshwar > --- > Changes in v2: > - Fix dt_binding_check indentation warning. > - Update 'reg-names' property items list. > > .../arm/tegra/nvidia,tegra186-pmc.yaml | 78 ++++++++++++++----- > 1 file changed, 58 insertions(+), 20 deletions(-) > > diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml > index 0faa403f68c8..79928824005d 100644 > --- a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml > +++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml > @@ -27,7 +27,7 @@ properties: > - const: pmc > - const: wake > - const: aotag > - - const: scratch > + - enum: [ scratch, misc ] > - const: misc > > interrupt-controller: true > @@ -41,25 +41,63 @@ properties: > description: If present, inverts the PMU interrupt signal. > $ref: /schemas/types.yaml#/definitions/flag > > -if: > - properties: > - compatible: > - contains: > - const: nvidia,tegra186-pmc > -then: > - properties: > - reg: > - maxItems: 4 > - > - reg-names: > - maxItems: 4 > -else: > - properties: > - reg: > - minItems: 5 > - > - reg-names: > - minItems: 5 > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: nvidia,tegra186-pmc > + then: > + properties: > + reg: > + maxItems: 4 > + reg-names: > + items: > + - const: pmc > + - const: wake > + - const: aotag > + - const: scratch There is no need to define the names and order again. Just this is sufficient: maxItems: 4 contains: const: scratch > + > + - if: > + properties: > + compatible: > + contains: > + const: nvidia,tegra194-pmc > + then: > + properties: > + reg: > + minItems: 5 > + reg-names: > + items: > + - const: pmc > + - const: wake > + - const: aotag > + - const: scratch > + - const: misc Just 'minItems: 5' is sufficient here. > + > + - if: > + properties: > + compatible: > + contains: > + const: nvidia,tegra234-pmc > + then: > + properties: > + reg: > + minItems: 4 > + maxItems: 5 That should already be the top-level constraint. > + reg-names: > + anyOf: > + - items: > + - const: pmc > + - const: wake > + - const: aotag > + - const: misc > + - items: > + - const: pmc > + - const: wake > + - const: aotag > + - const: scratch > + - const: misc Only need: contains: const: misc