Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp2048353lqp; Tue, 16 Apr 2024 06:10:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGv/IdWjgQ22y60ABuWrKrHZSZM9vgF5X33nOWQvPDbwVMfnI1rQHSkGt637GFFTIacBwNdCYuez6jnFb7ZInzbas2xixHCb+A6+3Taw== X-Google-Smtp-Source: AGHT+IHmXwp/usGiUjWg1EldZfX4/KVZjX9WRCnpOXjNCT2/GlFFipGVv13USkmlD2qnGoSX5Rb8 X-Received: by 2002:a17:90b:1050:b0:2a0:9c1c:50f4 with SMTP id gq16-20020a17090b105000b002a09c1c50f4mr11962582pjb.4.1713273019593; Tue, 16 Apr 2024 06:10:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713273019; cv=pass; d=google.com; s=arc-20160816; b=bSZJpHILQKPM0ensSzYkd7kC0xfKStY0fy/7BGlf9+9onRW5HuIBCCfRgLC4ZPrtLx ekMfysuNcP2W4hBH/z9BmeVhmCf9t8SvDVae24yfWl+MGAFSHCDG+Qza0u9DE82IgvTW GqTG12cXoeXKPwZzcugJvUyFsCFHSH1LgL60yRgQ9A+oPfXVvmWZLtcgMh/XF5YzSx9z +eKvmq7Hpr8FuinpzO3DmxRSVjsz2OWIqwjTiWhRYzkTzpCC+U48QqROLiiIX7tQ3qOp 53j3RF9FPzJgSJf4sAsK7ayss0wxZHa/w0Z0KQgyi9Bi60Lip4Pd+1drPYi5g6Mzw3RG jANQ== 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=KuMMCn6YyTR8iR14D4gCQ8aVH6bJ0hnMEiuij3TkBc0=; fh=ogbexwZZaKtMZTK0Jj3lk2D2L3NyUJAu0JWde5PwUBg=; b=rJyuYZ74hxQkIaRnZ2HTWXGTIUeQ0rDs/fVklzTpC3ddjLU3b6us0LeN07UqrFvijA vDA70sKQc/mXVKYGSXiJFf1hDJs+4LwM20c7Xkgk4KQitMEn9wgMdaA2NHllSfYsPStu uFtdyhfOy0onTeKHFuyJHzWgqaxvlgekCUJuJ1JOo+SiikOfOrKI7kX+dGqJbn+EEpdP g6762gzRO4Xv587lLZ5JlDk95wUO1izGw1vG7q1GsoPw3td9eeWjEL/MI2ovljrjmQ+W 7MYcb5kVUV5GXmQCoFig7+7ruENtzlgHAk39Gj5oa80W0rXx/q8+4+FeSQe/5c6400GP wWqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ecCh7swT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-146849-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146849-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 om5-20020a17090b3a8500b002a161b13a14si10170550pjb.93.2024.04.16.06.10.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 06:10:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146849-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=ecCh7swT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-146849-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146849-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 EC7FC281FA0 for ; Tue, 16 Apr 2024 13:07:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 54A0012C463; Tue, 16 Apr 2024 13:07:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ecCh7swT" 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 4C7AB12882C; Tue, 16 Apr 2024 13:07:05 +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=1713272826; cv=none; b=mnkon/eKgj/jg1V/hC3P/+eZY3skYUOqQbYUxiW23KYoxFrHiJjsEh6P2VMm9ad14fPnZTf+Df/X1lTNj+NSWT5f6bgeiDg7OhZmP34J/BQxe/C7iZopQQxoDSgRpsrRjAL787ukfB3M/I3mjFUdnqoEm+6IPV0NqFOOMsKVBAI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713272826; c=relaxed/simple; bh=P/HPomrIVTOMU1OFfPX9hmOeQB5uLwyIa2hpgQujMeQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PEl3uCRFWickxZadSoorXJtkjKIJQ1iknf3qWd0yE/PN3Lasmwbn2tyFCdz8x0NJvvfayN8Kie374STfl1GkyGgfzq813gf9DP/borky7mtEOGbyAcJEOuRHBmqO1WnCKcMBR0ZWgGn+yZEno6HQycNUq+5UWgEGocKRi8iWFL0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ecCh7swT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 846BDC113CE; Tue, 16 Apr 2024 13:07:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713272825; bh=P/HPomrIVTOMU1OFfPX9hmOeQB5uLwyIa2hpgQujMeQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ecCh7swTXz2FNCSrCWahCDgRZzR2S5fOM+BKjrcQeqhCKxjKIOXC8HTyhJMP/1Xxv Dlk6Dx5qf6dBd1EYsJGjcJyUJsCtW3o1fUkXDwyGF4ldWQxC8cVs7NWPtZyEPHyjGv xZyjl9CPjG545ktRwmHoEDKlS4X0/iNruvm9Ra9fKDwgUWozbVkbziemqxGBcpzedH NAwXHZ73TCqN+/5V/rlspgwd770KttrbBla9S6V+iaHjFCtWhCeld+HswVGFMBtCBe A84KJ4m8GAE2fd7XRX80EvgO0Vm/IRutwVBoLC27wtKCOS+3Opj7yhMBp0anyQ2xm5 obeZUoLScCdrw== Date: Tue, 16 Apr 2024 08:07:03 -0500 From: Rob Herring To: Peng Fan Cc: "Peng Fan (OSS)" , Jonathan Corbet , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Krzysztof Kozlowski , Conor Dooley , Sudeep Holla , Cristian Marussi , "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: <20240416130703.GA1992329-robh@kernel.org> References: <20240412-imx95-bbm-misc-v2-v3-0-4380a4070980@nxp.com> <20240412-imx95-bbm-misc-v2-v3-2-4380a4070980@nxp.com> <20240412133400.GA2282201-robh@kernel.org> 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: On Fri, Apr 12, 2024 at 01:50:37PM +0000, Peng Fan wrote: > Hi Rob, > > > Subject: Re: [PATCH v3 2/6] dt-bindings: firmware: add i.MX95 SCMI > > Extension protocol > > > > 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. > > In arm,scmi.yaml top level, add below: > +anyOf: > + - $ref: /schemas/firmware/nxp,imx95-scmi.yaml > > And also add a protocol node: > protocol@84: > $ref: '#/$defs/protocol-node' > > properties: > reg: > const: 0x84 > But here I not add unevaludatedProperties = false; otherwise the vendor > yaml new properties will not work. Just drop 'protocol@84' entirely here and change the top-level additionalProperties to unevaluatedProperties. > > In nxp,imx95-scmi.yaml: > properties: > protocol@84: > $ref: '/schemas/firmware/arm,scmi.yaml#/$defs/protocol-node' > unevaluatedProperties: false > > properties: > reg: > const: 0x84 > > 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 Constraints on the items values? > minItems: 1 > maxItems: 32 > $ref: /schemas/types.yaml#/definitions/uint32-matrix > > additionalProperties: true > > Are the upper looks good to you? Yes, other than the one comment. Rob