Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp149672lql; Fri, 12 Apr 2024 06:34:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV06A4MHv8EWj2NoZr+qvYo3mBnMCUZA6q++mOyaIk5FcZgiQ30wHtZ5FKIYKJsE91qcu9m6Z8Hr2HU83otOMGr0vLLBrajIHCiD1NRUg== X-Google-Smtp-Source: AGHT+IELE7LNknVoCR+Z+wz6Lc8uyEmjelmebvRxTSS8dGUbofVnAvZ4vc9UTFpxeigPgMegsZGS X-Received: by 2002:a17:90b:3b44:b0:2a2:2dda:6ee7 with SMTP id ot4-20020a17090b3b4400b002a22dda6ee7mr2403815pjb.27.1712928849509; Fri, 12 Apr 2024 06:34:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712928849; cv=pass; d=google.com; s=arc-20160816; b=DJWZARLIOyIzzDaEkqGJl5hqEkZ01k6ECX0sg9PJ1Lmho4pt6fHvmUhhj6KJ64COb8 gfk55EMmhpT3ROighKzcCy+n5iKnSMJ4nJTIgP8mpVGI7hy2oQB1FVvmAD12TZvWjDQg YszYUpt1UKiwrl5wxV9koy99YLxqfCDZ1apyEEwWYW9uwG18XzzWf+eXbLeYqrfBmJay DB/dnAb11CBk6KRLCtNPbhqnJ1JLz48jqBa5ob1hD5MpBM+HgnFwBU2HS23XrR6zlCLo kbK9sJXkD0NCWTYwabsEdQLPIgP2K69/3Rmmb9tnvKqVZ2pdZKv/Q/DaaD534duolQPi mTGg== 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=TeNEhll6frjsyMtXBeYjo1LGdLfrfSvKppU2WLRZ6vs=; fh=ZvM/Xr9rylSSg4/CeSP1TuPesp9CnraO93aRrWbuLeM=; b=EYVut1W3UGaAG3H6akABTOicP99WMoaG069XWohr4XwUORY5F9uxFsha4r5+u/KnQF Aep96Pr9xdUL2qFIL+xuPJlwP0rlyICuc7Ft8Uuk2fGnP9doF0tsw91pmIUDOnd3r1Ks k2+XRUGYUHQwibYsrneEF/ZnckegyoIs6YadWpJxrlbH0sNtF/7hxGbM4kRlY+S8ixN4 +u3nWcKCuu5mvbTzF8mFmnlzt+XVd/OLsiMsg6G1hxQQQKr1aZdV8tP5RzdscmgiO4Oj wfcfM0WVCSMNB+mFZGgx01i8kYOvP1WXv3164hnOSm38hl0rNcxuDFU5UUF+7ipmKjrb vssA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B1F7xpqb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-142737-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142737-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. [139.178.88.99]) by mx.google.com with ESMTPS id n15-20020a17090ade8f00b002a2b5b86925si3409630pjv.94.2024.04.12.06.34.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 06:34:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142737-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B1F7xpqb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-142737-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142737-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 16CA4283D7C for ; Fri, 12 Apr 2024 13:34:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAB4D83CCA; Fri, 12 Apr 2024 13:34:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B1F7xpqb" 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 D9BB483CA6; Fri, 12 Apr 2024 13:34:02 +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=1712928843; cv=none; b=YpD8JPru9WzdWCmDmFELdw/Tu9yKodXs3tMv5UeTZjYd16ogiOqEfhQRqVnNNH9bfWZO/PVU3s/EgKgDPbMz0gtqTLCU378dJgt5PJr+/umFN6Hi9/e3qmBZASSvzjzvXYVmoi9B1lDAwkZUDZ2EQfEeDrgipHR7GU4zW2dqY6g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712928843; c=relaxed/simple; bh=H/5Y4943nz8CB9370bqXYhLtnrWjvViTVIaYI0FXTBU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fYhy+rsKtAnQj+uYriEWfjS5g3Xe1FTYkAE6lki93JMPo/LJYrgPUIfqqCYsCZmeapLnNbFtq4KavkMA3w6LjG0zzyzlu9cEa2ggsg6wuaIW66Hin7qIErTV50I7hyfT0yKLhOu30T0v7ddr/u1KVpEA+nd7caaIBxJ54eYzaoQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B1F7xpqb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 782A1C113CC; Fri, 12 Apr 2024 13:34:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712928842; bh=H/5Y4943nz8CB9370bqXYhLtnrWjvViTVIaYI0FXTBU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B1F7xpqbXMlsIlbhQv7f04ytdIJi1BFBq1mId+1PLQCCrBozo1jQcO9gVDvi0Wamx KxXnTzXS/J4MiXbHcUEfJr67duV5rU+gMk51fR3uDKUg61QEAQCa0xRkbmzuHMbnX+ FAIgd/g7qFdkcV5Rlc6w95Ox2msXM53kgDrPX1QXLi4uTN2gQxv0iDwEUFdPYml+VH hV5M4IiQy5iPlhy3ludusTZSeGDufHKT6GUgvSsSe8Ym+AWJPU/yQfTq5A53T60ALQ t4uARCqvgIa9VztJ2iOCTqF/dsvkA+tm9ktM+y1rn98+MDhePmdQD+XZQV1phGnHIe LMaZrzYb4KgTg== Date: Fri, 12 Apr 2024 08:34:00 -0500 From: Rob Herring To: "Peng Fan (OSS)" Cc: Jonathan Corbet , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Krzysztof Kozlowski , Conor Dooley , Sudeep Holla , Cristian Marussi , Peng Fan , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: Re: [PATCH v3 2/6] dt-bindings: firmware: add i.MX95 SCMI Extension protocol Message-ID: <20240412133400.GA2282201-robh@kernel.org> References: <20240412-imx95-bbm-misc-v2-v3-0-4380a4070980@nxp.com> <20240412-imx95-bbm-misc-v2-v3-2-4380a4070980@nxp.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: <20240412-imx95-bbm-misc-v2-v3-2-4380a4070980@nxp.com> On Fri, Apr 12, 2024 at 06:47:08PM +0800, Peng Fan (OSS) wrote: > From: Peng Fan > > Add i.MX SCMI Extension protocols bindings for: > - Battery Backed Module(BBM) Protocol > This contains persistent storage (GPR), an RTC, and the ON/OFF button. > The protocol can also provide access to similar functions implemented via > external board components. > - MISC Protocol. > This includes controls that are misc settings/actions that must be exposed > from the SM to agents. They are device specific and are usually define to > access bit fields in various mix block control modules, IOMUX_GPR, and other > GPR/CSR owned by the SM. > > Signed-off-by: Peng Fan > --- > .../devicetree/bindings/firmware/arm,scmi.yaml | 21 +++++++++++++ > .../bindings/firmware/nxp,imx95-scmi.yaml | 36 ++++++++++++++++++++++ > 2 files changed, 57 insertions(+) > > diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > index 93fb7d05f849..fa2cc910c485 100644 > --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > @@ -247,6 +247,27 @@ properties: > reg: > const: 0x18 > > + protocol@81: > + $ref: '#/$defs/protocol-node' > + unevaluatedProperties: false > + > + properties: > + reg: > + const: 0x81 > + > + protocol@84: > + type: object > + anyOf: > + - allOf: > + - $ref: /schemas/firmware/nxp,imx95-scmi.yaml > + - $ref: '#/$defs/protocol-node' If you put the ref under the protocol node, then it's 1 schema file per protocol per vendor. Also, we then have to list every possible protocol node here, and every one listed here will be valid for every vendor. What we discussed is putting the list of vendor protocol schemas at the top-level here and then the vendor schemas can list out all the protocol nodes. Also, move "$ref: '#/$defs/protocol-node'" to nxp,imx95-scmi.yaml. > + > + unevaluatedProperties: false > + > + properties: > + reg: > + const: 0x84 > + > additionalProperties: false > > $defs: > diff --git a/Documentation/devicetree/bindings/firmware/nxp,imx95-scmi.yaml b/Documentation/devicetree/bindings/firmware/nxp,imx95-scmi.yaml > new file mode 100644 > index 000000000000..b84c4a53b78a > --- /dev/null > +++ b/Documentation/devicetree/bindings/firmware/nxp,imx95-scmi.yaml > @@ -0,0 +1,36 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +# Copyright 2024 NXP > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/firmware/nxp,imx95-scmi.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: i.MX95 System Control and Management Interface(SCMI) Vendor Protocols Extension > + > +maintainers: > + - Peng Fan > + > +properties: > + nxp,wakeup-sources: > + description: > + Each entry consists of 2 integers, represents the source and electric signal edge > + items: > + items: > + - description: the wakeup source > + - description: the wakeup electric signal edge > + minItems: 1 > + maxItems: 32 > + $ref: /schemas/types.yaml#/definitions/uint32-matrix > + > +if: > + properties: > + reg: > + const: 0x84 This schema is only included from protocol@84 node, so how can this be false? > +then: > + properties: > + nxp,wakeup-sources: true > +else: > + properties: > + nxp,wakeup-sources: false > + > +additionalProperties: true > > -- > 2.37.1 >