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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A672C433F5 for ; Tue, 4 Jan 2022 15:04:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IlT2yoZVtVzsf2BCQzFzbQc+IN4YtHYFZcdkzM5isgY=; b=eclU90omj/9TZ3 U5gRbX+l/q85u4VZBOzhnrW+EDm5jLv0l4HDVLkQrpX8Xj1pVogibxXeXjBaUiUQioN5oWnrJtNgl RshUNYTUZQyRQdMZNvYlsyHCq//3WL6QUYia59kXZRgXi/TL+vjurfk25BjUm+LY2M2htkFRr7eQ3 /XQD+8Cb7chdsBJpBluBz02BUp+nhQSg0ghgfvZucPr2PLzhQrKrWD3EIkVAIDXQercSsRVZwXDal oejMyzHuGWV6Me96geO8UN56Wi5PPc81j1Jyx6c9crS1oZUb+bT4x464EaDzmN9r/aW7MYbZJgprs pyCtbTp6Kk8sZueQ2qbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4lM1-00BrEH-O1; Tue, 04 Jan 2022 15:04:01 +0000 Received: from mail-ot1-f45.google.com ([209.85.210.45]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4lLy-00BrBg-6c; Tue, 04 Jan 2022 15:03:59 +0000 Received: by mail-ot1-f45.google.com with SMTP id w19-20020a056830061300b0058f1dd48932so47072493oti.11; Tue, 04 Jan 2022 07:03:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=152c0gKjn3E33kOx2gb1j/9J4KVx7ChUyzcnpwaFY8g=; b=xQyBjgFaskJ+h54R2KDBmH+JwHSUfguZRNwPbyaV9bt8u3hFTecT+dLg+395kiUtk8 SD4X6h96Wg56PQFZ9wOqZCvUQoTPor/SNhA/UxveukhbymeCxNdgJBnDND7mbnGh27ZX na5kiPCS4fWOUAlUAmXemHT35p02IpeV559AhSEU5ETguHZ4Hvm/45dlKwmZ3pycwoXI K4NRDU/1+PCM5p0twycKyqOv9PwMq/5q8paA0cfkBmJLezZafjHcwkSU39Xku0fmJ7bc +JE1oFmCSIZ/2LfcnprdZU6luVJtlamoUzbW0lHhiHHycNOsmcwIlHDu+k0heuC9D6Tu ppNA== X-Gm-Message-State: AOAM531UpZ+XayeHS4v4kYct1jGBYKy7lG1KL/zqmBAnJDJN12F+Aqz8 L7CA9pf72NBpQ9jUc4UCpA== X-Google-Smtp-Source: ABdhPJxdcEz899N4s9UGrNr72PJ1GZBttIopE5knK3uzd5fzcvNeYcIE9wjDFZ/opk6pASbc7fBNvw== X-Received: by 2002:a05:6830:24ac:: with SMTP id v12mr36249885ots.177.1641308635916; Tue, 04 Jan 2022 07:03:55 -0800 (PST) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id h1sm7720007oog.26.2022.01.04.07.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jan 2022 07:03:55 -0800 (PST) Received: (nullmailer pid 830577 invoked by uid 1000); Tue, 04 Jan 2022 15:03:54 -0000 Date: Tue, 4 Jan 2022 09:03:54 -0600 From: Rob Herring To: Michael Walle Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Srinivas Kandagatla , Shawn Guo , Li Yang , Frank Rowand , "David S . Miller" , Jakub Kicinski , Ansuel Smith , Andrew Lunn Subject: Re: [PATCH 2/8] dt-bindings: nvmem: add transformation bindings Message-ID: References: <20211228142549.1275412-1-michael@walle.cc> <20211228142549.1275412-3-michael@walle.cc> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211228142549.1275412-3-michael@walle.cc> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220104_070358_294307_832406A1 X-CRM114-Status: GOOD ( 24.09 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Tue, Dec 28, 2021 at 03:25:43PM +0100, Michael Walle wrote: > Just add a simple list of the supported devices which need a nvmem > transformations. > > Also, since the compatible string is prepended to the actual nvmem > compatible string, we need to match using "contains" instead of an exact > match. > > Signed-off-by: Michael Walle > --- > .../devicetree/bindings/mtd/mtd.yaml | 7 +-- > .../bindings/nvmem/nvmem-transformations.yaml | 46 +++++++++++++++++++ > 2 files changed, 50 insertions(+), 3 deletions(-) > create mode 100644 Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml > > diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml > index 376b679cfc70..0291e439b6a6 100644 > --- a/Documentation/devicetree/bindings/mtd/mtd.yaml > +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml > @@ -33,9 +33,10 @@ patternProperties: > > properties: > compatible: > - enum: > - - user-otp > - - factory-otp > + contains: > + enum: > + - user-otp > + - factory-otp If the addition is only compatible strings, then I would just add them here. Otherwise this needs to be structured a bit differently. More on that below. > > required: > - compatible > diff --git a/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml b/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml > new file mode 100644 > index 000000000000..8c8d85fd6d27 > --- /dev/null > +++ b/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml > @@ -0,0 +1,46 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/nvmem/nvmem-transformations.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NVMEM transformations Device Tree Bindings > + > +maintainers: > + - Srinivas Kandagatla > + > +description: | > + This is a list NVMEM devices which need transformations. > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - kontron,sl28-vpd > + - const: user-otp > + - const: user-otp This will be applied to any node containing 'user-otp'. You need a custom 'select' to avoid that. > + > +required: > + - compatible > + > +additionalProperties: true True is only allowed for common schema intended to be included (i.e. a $ref) by other schemas. IOW, ones that are incomplete on their own. So you need to reference mtd.yaml and make this 'unevaluatedProperties: false'. > + > +examples: > + - | > + otp-1 { > + compatible = "kontron,sl28-vpd", "user-otp"; > + #address-cells = <1>; > + #size-cells = <1>; > + > + serial@2 { > + reg = <2 15>; > + }; > + > + base_mac_address: base-mac-address@17 { > + #nvmem-cell-cells = <1>; > + reg = <17 6>; > + }; > + }; > + > +... > -- > 2.30.2 > > ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 891DEC433EF for ; Tue, 4 Jan 2022 15:06:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F9UrArof0BTaWWsCHk1qZuaed4TsEEMJrxkwQge1Yzk=; b=3SGHEtvucvhf8c IszVawgUjQEFHNy88UrA1t9Pks6xM8NAdYoMNbbK4ReaGyAM6NhJ/+ivAn1cugwj6w8Y+iE+0qoMb TGoNaw24JZZCRDuJZ78PeNwX/ycnG4uA70jJePV1RDXMyJwM+kBCI96cCZgGRk9ZZeKpaLHSQPX7e SJtWffWmRBNE/ivRan0AZTZukq3HL/VL1aMqAQ2abTNSlRp9ES0425YEHSWjGA3PkL8P8CtKIj7kf cQSEN/6euRZ3uTQQaeh/SmUUx/GdRdNGZutZuJLJUf4m7jSCfZ78R4MRxX5PQtiRfBYDOFdVwo3vJ /g1qY6oWWQKfaWwd7BeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4lMb-00BrQW-Gp; Tue, 04 Jan 2022 15:04:38 +0000 Received: from mail-ot1-f45.google.com ([209.85.210.45]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4lLy-00BrBg-6c; Tue, 04 Jan 2022 15:03:59 +0000 Received: by mail-ot1-f45.google.com with SMTP id w19-20020a056830061300b0058f1dd48932so47072493oti.11; Tue, 04 Jan 2022 07:03:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=152c0gKjn3E33kOx2gb1j/9J4KVx7ChUyzcnpwaFY8g=; b=xQyBjgFaskJ+h54R2KDBmH+JwHSUfguZRNwPbyaV9bt8u3hFTecT+dLg+395kiUtk8 SD4X6h96Wg56PQFZ9wOqZCvUQoTPor/SNhA/UxveukhbymeCxNdgJBnDND7mbnGh27ZX na5kiPCS4fWOUAlUAmXemHT35p02IpeV559AhSEU5ETguHZ4Hvm/45dlKwmZ3pycwoXI K4NRDU/1+PCM5p0twycKyqOv9PwMq/5q8paA0cfkBmJLezZafjHcwkSU39Xku0fmJ7bc +JE1oFmCSIZ/2LfcnprdZU6luVJtlamoUzbW0lHhiHHycNOsmcwIlHDu+k0heuC9D6Tu ppNA== X-Gm-Message-State: AOAM531UpZ+XayeHS4v4kYct1jGBYKy7lG1KL/zqmBAnJDJN12F+Aqz8 L7CA9pf72NBpQ9jUc4UCpA== X-Google-Smtp-Source: ABdhPJxdcEz899N4s9UGrNr72PJ1GZBttIopE5knK3uzd5fzcvNeYcIE9wjDFZ/opk6pASbc7fBNvw== X-Received: by 2002:a05:6830:24ac:: with SMTP id v12mr36249885ots.177.1641308635916; Tue, 04 Jan 2022 07:03:55 -0800 (PST) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id h1sm7720007oog.26.2022.01.04.07.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jan 2022 07:03:55 -0800 (PST) Received: (nullmailer pid 830577 invoked by uid 1000); Tue, 04 Jan 2022 15:03:54 -0000 Date: Tue, 4 Jan 2022 09:03:54 -0600 From: Rob Herring To: Michael Walle Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Srinivas Kandagatla , Shawn Guo , Li Yang , Frank Rowand , "David S . Miller" , Jakub Kicinski , Ansuel Smith , Andrew Lunn Subject: Re: [PATCH 2/8] dt-bindings: nvmem: add transformation bindings Message-ID: References: <20211228142549.1275412-1-michael@walle.cc> <20211228142549.1275412-3-michael@walle.cc> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211228142549.1275412-3-michael@walle.cc> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220104_070358_294307_832406A1 X-CRM114-Status: GOOD ( 24.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Dec 28, 2021 at 03:25:43PM +0100, Michael Walle wrote: > Just add a simple list of the supported devices which need a nvmem > transformations. > > Also, since the compatible string is prepended to the actual nvmem > compatible string, we need to match using "contains" instead of an exact > match. > > Signed-off-by: Michael Walle > --- > .../devicetree/bindings/mtd/mtd.yaml | 7 +-- > .../bindings/nvmem/nvmem-transformations.yaml | 46 +++++++++++++++++++ > 2 files changed, 50 insertions(+), 3 deletions(-) > create mode 100644 Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml > > diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml > index 376b679cfc70..0291e439b6a6 100644 > --- a/Documentation/devicetree/bindings/mtd/mtd.yaml > +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml > @@ -33,9 +33,10 @@ patternProperties: > > properties: > compatible: > - enum: > - - user-otp > - - factory-otp > + contains: > + enum: > + - user-otp > + - factory-otp If the addition is only compatible strings, then I would just add them here. Otherwise this needs to be structured a bit differently. More on that below. > > required: > - compatible > diff --git a/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml b/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml > new file mode 100644 > index 000000000000..8c8d85fd6d27 > --- /dev/null > +++ b/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml > @@ -0,0 +1,46 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/nvmem/nvmem-transformations.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NVMEM transformations Device Tree Bindings > + > +maintainers: > + - Srinivas Kandagatla > + > +description: | > + This is a list NVMEM devices which need transformations. > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - kontron,sl28-vpd > + - const: user-otp > + - const: user-otp This will be applied to any node containing 'user-otp'. You need a custom 'select' to avoid that. > + > +required: > + - compatible > + > +additionalProperties: true True is only allowed for common schema intended to be included (i.e. a $ref) by other schemas. IOW, ones that are incomplete on their own. So you need to reference mtd.yaml and make this 'unevaluatedProperties: false'. > + > +examples: > + - | > + otp-1 { > + compatible = "kontron,sl28-vpd", "user-otp"; > + #address-cells = <1>; > + #size-cells = <1>; > + > + serial@2 { > + reg = <2 15>; > + }; > + > + base_mac_address: base-mac-address@17 { > + #nvmem-cell-cells = <1>; > + reg = <17 6>; > + }; > + }; > + > +... > -- > 2.30.2 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3100C433F5 for ; Tue, 4 Jan 2022 15:03:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234614AbiADPD5 (ORCPT ); Tue, 4 Jan 2022 10:03:57 -0500 Received: from mail-ot1-f46.google.com ([209.85.210.46]:38593 "EHLO mail-ot1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234597AbiADPD4 (ORCPT ); Tue, 4 Jan 2022 10:03:56 -0500 Received: by mail-ot1-f46.google.com with SMTP id v22-20020a9d4e96000000b005799790cf0bso47540224otk.5; Tue, 04 Jan 2022 07:03:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=152c0gKjn3E33kOx2gb1j/9J4KVx7ChUyzcnpwaFY8g=; b=Q0bg9DeO4H5RWgNwl1ZvM+WdWqpx3KLtPvwhQ3hoGAcD79SUzLqO6CGGr0hSsCivIq HHbhXfHkXX+Dfhf92Qq5RlSbdpO2XqpbGeXcO5aXJWeNkQwnmZqpuA3oX6CTeq790+ZM 08XgTF2HGkQ5X+FHwsDERZQvUYaYRjEOKeNsXtGOy/6cxFKI+8wCuEaM92OX6C9DU5Ij vQu8GGHCbTU6fjd2q5xF3U2BUVhw1m7gCMCVdfS5WRzKkW5cA4/3WbEMXqYeVCG0MYYU Shcth/FuDd9jFGjWNd8uG+nK3K+8PQ3paaXRxSt/iDAfg+4qmhm9iFU41Sym8JuCYzuk aekQ== X-Gm-Message-State: AOAM531iDs7TY5PTEnP0xUkX2+cD45OJwMQK7NAYcA5A7onboe1Ozjzl Glpe3YJOXZbQvwga9IfiTw== X-Google-Smtp-Source: ABdhPJxdcEz899N4s9UGrNr72PJ1GZBttIopE5knK3uzd5fzcvNeYcIE9wjDFZ/opk6pASbc7fBNvw== X-Received: by 2002:a05:6830:24ac:: with SMTP id v12mr36249885ots.177.1641308635916; Tue, 04 Jan 2022 07:03:55 -0800 (PST) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id h1sm7720007oog.26.2022.01.04.07.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jan 2022 07:03:55 -0800 (PST) Received: (nullmailer pid 830577 invoked by uid 1000); Tue, 04 Jan 2022 15:03:54 -0000 Date: Tue, 4 Jan 2022 09:03:54 -0600 From: Rob Herring To: Michael Walle Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Srinivas Kandagatla , Shawn Guo , Li Yang , Frank Rowand , "David S . Miller" , Jakub Kicinski , Ansuel Smith , Andrew Lunn Subject: Re: [PATCH 2/8] dt-bindings: nvmem: add transformation bindings Message-ID: References: <20211228142549.1275412-1-michael@walle.cc> <20211228142549.1275412-3-michael@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211228142549.1275412-3-michael@walle.cc> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, Dec 28, 2021 at 03:25:43PM +0100, Michael Walle wrote: > Just add a simple list of the supported devices which need a nvmem > transformations. > > Also, since the compatible string is prepended to the actual nvmem > compatible string, we need to match using "contains" instead of an exact > match. > > Signed-off-by: Michael Walle > --- > .../devicetree/bindings/mtd/mtd.yaml | 7 +-- > .../bindings/nvmem/nvmem-transformations.yaml | 46 +++++++++++++++++++ > 2 files changed, 50 insertions(+), 3 deletions(-) > create mode 100644 Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml > > diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml > index 376b679cfc70..0291e439b6a6 100644 > --- a/Documentation/devicetree/bindings/mtd/mtd.yaml > +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml > @@ -33,9 +33,10 @@ patternProperties: > > properties: > compatible: > - enum: > - - user-otp > - - factory-otp > + contains: > + enum: > + - user-otp > + - factory-otp If the addition is only compatible strings, then I would just add them here. Otherwise this needs to be structured a bit differently. More on that below. > > required: > - compatible > diff --git a/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml b/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml > new file mode 100644 > index 000000000000..8c8d85fd6d27 > --- /dev/null > +++ b/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml > @@ -0,0 +1,46 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/nvmem/nvmem-transformations.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NVMEM transformations Device Tree Bindings > + > +maintainers: > + - Srinivas Kandagatla > + > +description: | > + This is a list NVMEM devices which need transformations. > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - kontron,sl28-vpd > + - const: user-otp > + - const: user-otp This will be applied to any node containing 'user-otp'. You need a custom 'select' to avoid that. > + > +required: > + - compatible > + > +additionalProperties: true True is only allowed for common schema intended to be included (i.e. a $ref) by other schemas. IOW, ones that are incomplete on their own. So you need to reference mtd.yaml and make this 'unevaluatedProperties: false'. > + > +examples: > + - | > + otp-1 { > + compatible = "kontron,sl28-vpd", "user-otp"; > + #address-cells = <1>; > + #size-cells = <1>; > + > + serial@2 { > + reg = <2 15>; > + }; > + > + base_mac_address: base-mac-address@17 { > + #nvmem-cell-cells = <1>; > + reg = <17 6>; > + }; > + }; > + > +... > -- > 2.30.2 > >