Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1755608pxy; Thu, 29 Apr 2021 13:54:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDDRg6MeE88vM8kmnxtT2RkGJdj+K58yxonSetbaaTrvxEPkAKXmJxF4iTcPDebTsuwRmW X-Received: by 2002:a05:6a00:853:b029:27b:7bf6:f322 with SMTP id q19-20020a056a000853b029027b7bf6f322mr1645319pfk.7.1619729642861; Thu, 29 Apr 2021 13:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619729642; cv=none; d=google.com; s=arc-20160816; b=NBuswbFtR60UjZyAMB5cyGJC0sIdsHDhFK313OrK0TTzBwFtw6yjkdAmCqt93F8XG0 gPZnbaKFSCrIZ4YcMMCRphe/wvWLivFhfRdnMEcN2Ksd0qHqQTfYeAFAoS+iA0T/ZGJ8 buIfQdsVmhG3Zibwqrs1znfPGXXIxSD18Lda4bZXqFxd414s5rh5BP57m+cYkQPvzHkt zeQ+mLkB7hnbhXJMHn6NX4NLWfSWOI9nCeCjhTAP7e6xLDK2Ck36mAHw6UKwlqIiP3qq X/IQ9rZKlTVDm9w/XXyJ07F1DVEgmE2Kzl6Boll5PZ0C2+NFs7BOY1UlKeQ5cQqL8jEe 7GmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=k2kIvQcj5VKTETi9VR5NeuJxVfXG0eL9B2iMENedQi4=; b=A1u6WPmCjDMoWtIDqXefemxsCIVMYFtC/J87B5LfS6nkHAh6LvzJ3Og/SyN5NTyL4e IAGJqdJ76hE6qmK/dDjb8LfrOq2x/MBFZvaF6uKtpFyaSKUm55htGWVngxooXi5Vgfru NroXkCgYWyEuGmgwH+F0RR4JI9fNlMv3m6CSb4RMflwALVl+F/xUtry1QfiocdXyVfsB OdtfYZpPQF1f6yw+5IAJaH2UHIp2Rl1XjF1Vw2Ut70CsDPkKOMMwkRIF3JHMrRZCSDAP SuPQLprMyCuAwgnADOLYsBRcHepPgeFA8OhY2qhSXftPUb9BtXD+61m9UXpcDqYlZrC3 eG/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si899182pgl.94.2021.04.29.13.53.49; Thu, 29 Apr 2021 13:54:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233770AbhD2UyB (ORCPT + 99 others); Thu, 29 Apr 2021 16:54:01 -0400 Received: from mail-ot1-f48.google.com ([209.85.210.48]:40711 "EHLO mail-ot1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233097AbhD2UyA (ORCPT ); Thu, 29 Apr 2021 16:54:00 -0400 Received: by mail-ot1-f48.google.com with SMTP id g4-20020a9d6b040000b029029debbbb3ecso29632281otp.7; Thu, 29 Apr 2021 13:53:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=k2kIvQcj5VKTETi9VR5NeuJxVfXG0eL9B2iMENedQi4=; b=VJDUGwtowlu0HnzjjgKbE2FnLoITvWRQtrhgN+VelJJSnSpF3QGtsnIOhN+R2NDDIK UsI1kW6qeQbWcLh1aMoLtBxoj7tiGQs+Fl6yMkGXC7XaqCuYLPVe47BHNlVBuNgpKoR8 l+gDo8bTwky7tT0wtEicHAFXlA4+QoNWyPExzUPop1330GsHIM5/jnuSvkGTGKFxMxqn ibWNIRu3ZMo3qq1uC+bm2h5rxultN6lFDDp8/B5BUUCLdfdn79WGzoXVbBiGDzGOttU4 yPHKDN83Quw/TG+h8cBTJvA9KAcnO1ZJcWCG8tAr+Jq6REwxn31Omg71j0i4mii0DhQz wbLA== X-Gm-Message-State: AOAM532bn16aGeBBPTjmYhg0ZCjJpS2Cafd2Kb4XQyv9Ubp+Kv3hrddy pjoHBBYm90IJl0yFYsrUcQ== X-Received: by 2002:a9d:449:: with SMTP id 67mr754977otc.333.1619729591989; Thu, 29 Apr 2021 13:53:11 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id l3sm84635otj.37.2021.04.29.13.53.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 13:53:11 -0700 (PDT) Received: (nullmailer pid 1758066 invoked by uid 1000); Thu, 29 Apr 2021 20:53:10 -0000 Date: Thu, 29 Apr 2021 15:53:10 -0500 From: Rob Herring To: Nandor Han Cc: srinivas.kandagatla@linaro.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 1/4] dt-bindings: nvmem: Add bootcount-nvmem Message-ID: <20210429205310.GA1729011@robh.at.kernel.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 28, 2021 at 04:50:38PM +0300, Nandor Han wrote: > Documents the device tree bindings for `bootcount-nvmem` driver. > > Signed-off-by: Nandor Han > --- > .../bindings/nvmem/bootcount-nvmem.yaml | 66 +++++++++++++++++++ > 1 file changed, 66 insertions(+) > create mode 100644 Documentation/devicetree/bindings/nvmem/bootcount-nvmem.yaml > > diff --git a/Documentation/devicetree/bindings/nvmem/bootcount-nvmem.yaml b/Documentation/devicetree/bindings/nvmem/bootcount-nvmem.yaml > new file mode 100644 > index 000000000000..cc673452fe0f > --- /dev/null > +++ b/Documentation/devicetree/bindings/nvmem/bootcount-nvmem.yaml > @@ -0,0 +1,66 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +# Copyright (c) Vaisala Oyj. All rights reserved. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/nvmem/bootcount-nvmem.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Bootcount NVMEM bindings > + > +maintainers: > + - Nandor Han > + > +description: | > + This binding is intendent to describe the hardware location for > + storing the bootcount value and magic combo. > + > + The NVMEM cell size should be 2 or 4 bytes. > + > +allOf: > + - $ref: "nvmem-consumer.yaml#" > + > +properties: > + compatible: > + enum: > + - linux,bootcount-nvmem What makes this Linux specific? IIRC, u-boot has boot counting function too. > + > + nvmem-cells: > + description: Phandle to reboot mode nvmem data cell. > + $ref: /schemas/types.yaml#/definitions/phandle-array > + > + nvmem-cell-names: > + description: Name of the NVMEM cell. > + $ref: /schemas/types.yaml#/definitions/string-array > + enum: > + - bootcount-regs > + > + linux,bootcount-magic: > + description: Override default mask value. > + $ref: /schemas/types.yaml#/definitions/uint32 I don't understand what this is. Is it magic or a mask? > + > +dependencies: > + nvmem-cell-names: [ nvmem-cells ] Core schema takes care of this. > + > +required: > + - compatible > + - nvmem-cells > + - nvmem-cell-names > + > +additionalProperties: false > + > +examples: > + # example with 16 bit nvram cell: > + - | > + bootcount { > + compatible = "linux,bootcount-nvmem"; > + nvmem-cells = <&bootcount_regs>; > + nvmem-cell-names = "bootcount-regs"; > + }; > + > + rtc: rtc@68 { > + bootcount_regs: bootcount_nvmem_regs@e { > + reg = <0x0e 0x2>; It would be simpler to just add a compatible here and get rid of the 'bootcount' node here. > + }; > + }; > + > +... > -- > 2.26.3 >