Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1840602rdb; Mon, 8 Jan 2024 11:59:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFdTDGFIrG8/D9YA+uSHbeiCX3U0W/hj/2lUWM366FMSzq6Ax4FryNerD4yT6cL5gD9fnzz X-Received: by 2002:a17:90a:4961:b0:28c:f079:11b0 with SMTP id c88-20020a17090a496100b0028cf07911b0mr1468929pjh.61.1704743949238; Mon, 08 Jan 2024 11:59:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704743949; cv=none; d=google.com; s=arc-20160816; b=IC3ip+nHHk02kQxTO4nfxAK5Lzl04rZUz/wLZ7PF37jTKZowyJnhilPnEfNGXYvAxI jqQBaFQNpGLTYHxFlVbh6Ua2iul6q8KZja5RnXzgo4nxiyqsYt8+OhUo7dgllsisESyT 9MvZFqWShHyBDhaSeWynLx2NRSCU38slbELSXIdeAk56VV8te9fY2GvgUgc1XpNOrwBN DQ/aTXDLlTn8bn/Q7/wQPuc4Gq9bF3sPfOnvYt2H2wdtd/18oMUnaNEsd03iwtr0lj9p k5YXBhb9Ugujj3W0KBH7zIWmGPo/HKGMuySxmnX/x6Gq4WT6tIaIA6vinIAE42W0Wi10 9LiA== ARC-Message-Signature: i=1; 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=ExDU13peVYtDzF8Ow7TzAitQt489YLgzNEwO3nkqtfI=; fh=wr419raNodbOmwDm6IqKmswfqfZZtqa3IWepPnQ3Rus=; b=BEWjIXk4dcZdBu4kgkziTsXHnt0sRKW09JHOaBQkplQ5bc1YUJ5qpvU+U2hfJoBsFG tyt7cdar+/9qdTnPq9+9pumbjxsGtF+S1FT62gUkrQ7XKoO4qndwjGiWZ4J7kTvpT+8T HATyuRBPE0SvrpSTxUkV3Ci17EsQD7xrYnCExS+C0MlVRG2PFVDx/W/IDZ4SuhI1pSfF 3tWG4FUpvNWpVivziMoGjgL8dy6YuhkwBOFKO4DmFBYrysiIbSfVH6Va6dtjpzXOh9VU OG6jSYbUflhdQxeOv8GEnUqADkhjAugKb3ApH3kzH/lALnhesSZEXSltUBiImfoO8IuU iuKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=byx30lTj; spf=pass (google.com: domain of linux-kernel+bounces-20058-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20058-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x6-20020a17090aca0600b0028bd5958fb7si373620pjt.114.2024.01.08.11.59.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 11:59:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20058-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=byx30lTj; spf=pass (google.com: domain of linux-kernel+bounces-20058-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20058-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 537FBB22830 for ; Mon, 8 Jan 2024 19:59:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 949855576E; Mon, 8 Jan 2024 19:59:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="byx30lTj" X-Original-To: linux-kernel@vger.kernel.org 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 B467F55C10; Mon, 8 Jan 2024 19:59:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1E9DC433C8; Mon, 8 Jan 2024 19:58:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704743940; bh=f29NR9MAWVjCDyn/MbeDD98XbHXmd6KpipbtrQODkYc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=byx30lTjWW7I2tbCrnCBwOs8/77H/g7oT+9KwXCn64R7j3LxUbDHirurOo0CWv06k SdeSgHz2spp26eS006ixX052ZjXOYDCVvbIg4VhU0Ts2bi2YKsILGxnocmRDMzR/dO fV9lJug4nmflknc9DDlatdGQ8WhRm5yrU6pqIhfi0f7MFElIXxyZ4LIBHlUZM2r8JH EyIHmIXnHgHImocleXUEhRVN8dmqa7G9SKiQq1dLhAb3EBGgpw32rtAq6Ccwse6W1n iOPt826kcZg5Nvo37TuMbcujTvSD6AI0j0MIgRQDEzYsJ4L3FkyVknRY+VGulGgxgF 5t0llNtVvIKGA== Received: (nullmailer pid 2013297 invoked by uid 1000); Mon, 08 Jan 2024 19:58:57 -0000 Date: Mon, 8 Jan 2024 12:58:57 -0700 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 2/3] dt-bindings: tegra: pmc: Update scratch as an optional aperture Message-ID: <20240108195857.GA1959040-robh@kernel.org> References: <20240106075134.3933491-1-petlozup@nvidia.com> <20240106075134.3933491-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: <20240106075134.3933491-2-petlozup@nvidia.com> On Sat, Jan 06, 2024 at 07:51:33AM +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 > --- > .../arm/tegra/nvidia,tegra186-pmc.yaml | 83 +++++++++++++------ > 1 file changed, 58 insertions(+), 25 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..2716610a1a02 100644 > --- a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml > +++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml > @@ -23,12 +23,7 @@ properties: > > reg-names: > minItems: 4 > - items: > - - const: pmc > - - const: wake > - - const: aotag > - - const: scratch > - - const: misc > + maxItems: 5 You can just make the 4th entry: enum: [ scratch, misc ] > > interrupt-controller: true > > @@ -41,25 +36,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 > + > + - 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 > + > + - if: > + properties: > + compatible: > + contains: > + const: nvidia,tegra234-pmc > + then: > + properties: > + reg: > + minItems: 4 > + maxItems: 5 > + reg-names: > + anyOf: > + - items: > + - const: pmc > + - const: wake > + - const: aotag > + - const: misc > + - items: > + - const: pmc > + - const: wake > + - const: aotag > + - const: scratch > + - const: misc > > patternProperties: > "^[a-z0-9]+-[a-z0-9]+$": > -- > 2.17.1 >