Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4051727ybz; Mon, 20 Apr 2020 14:43:51 -0700 (PDT) X-Google-Smtp-Source: APiQypKvY4NiIQ7UtYcholRThNw5AckIDIKNMCULlmv8Z+eg4T+muMGP+obgzLWr6h7EHeF2jXAa X-Received: by 2002:a17:906:c839:: with SMTP id dd25mr17720259ejb.164.1587419031180; Mon, 20 Apr 2020 14:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587419031; cv=none; d=google.com; s=arc-20160816; b=IwOAzcSRDTDWz0bJ1arZYl8fJ5dtYtX0+3gURYnk058gwOs3dgV82Ol+JplfOfuI/m 0iwwttIW6T4XGUuJjSPcI4zbQ9LZa+/04NfhxZdfrE0imb7QSWssESrGDEzKvaKV+qoi rWWG0OAMsnmAzViflk4yvSKcQ0Oz/HCjVMi0HHcJaxVMbM697/99dsZNYluSVsb1ekog ohHAxIieoRrc+5R839U+UfAu3uRtdMTw9vhd+igbHCOwovQ3uRnu7SUGxg2aXBXy0KIW SaUoz55fqP3VxwCxrtYalDHf0XF5BBQifyeK/MrC5CtCW5IYUeljahlWXNqwRm1+E1dq p2mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=MQYFkBcbkzjp4qKekddjrNm+MWFdaUwiorS/Z/G0gTk=; b=fsJ9ty7Wf90mWg8jwYeD6HIebF+iXBPJv8zzND+nB5utzfUmf1Fq2RPY4uukb0TJWw 5dLz091IninwliFGprA95rhZJd2Ks5lk3/6e0/o5CIEHzOqlApSp6wP42nq1y2O8B/dm fTpvRane8SbH2etcYDtWyRRDUgaXnY0hYSb028VK4y934Gju3YvvEuH7tmtexbiH8YRE vZ3vos9XCYpoJ+oo3mKOiButeRQ0JYXhQ+H2yhrxlru7udkur5wP3Vmm0Q95LsIunQI8 3uDmcfPjY6vmXPhODZnI8aSvY51VpZLToLMxsTK2DfNQtbZ/rnYPz+BINAz0NbTyXTSg n0vA== 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 y21si283243ejq.259.2020.04.20.14.43.27; Mon, 20 Apr 2020 14:43:51 -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 S1726498AbgDTVma (ORCPT + 99 others); Mon, 20 Apr 2020 17:42:30 -0400 Received: from mail-oo1-f66.google.com ([209.85.161.66]:36777 "EHLO mail-oo1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbgDTVma (ORCPT ); Mon, 20 Apr 2020 17:42:30 -0400 Received: by mail-oo1-f66.google.com with SMTP id x17so2480108ooa.3; Mon, 20 Apr 2020 14:42:29 -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:user-agent; bh=MQYFkBcbkzjp4qKekddjrNm+MWFdaUwiorS/Z/G0gTk=; b=CkJjCI9g9M9AZbdulu9d1Um0vI+BwS1JLJSNgFyAFenGBOh5X/KCv9bAEyhpjVvk0P Xz92xhTGpnIjbFVMYqmGCcQpUiwwDmHor+cvJdlMW9jUd8AROg5V6amnSQYnf6bT+gd5 4Tcbl+Mxg94TjL0T4sh+PPzhRWRfXLZjxc/gYbcMuzsC3KWgB3Su6GNRr1O78MfEljWK /4o12tCI4FW83c7/iqHkiPiF+TlyHFvl56eNtgFKA940MJMvnGHTg849J2fEI+zoiVGR Ar2/aFAmVa4YwFMI9+ZsyuZGYyKWuNzEYc79iSBiovVs9mTQDgBCXkBXX0S431vbYodv YMvA== X-Gm-Message-State: AGi0PuZlXVJgpAL+cPvm/eh0ekqxVVyruE0KC2q1Btby8lXi8rrZKtlG LR+K1xoZW1VNLB3cmOIhBQ== X-Received: by 2002:a4a:95ee:: with SMTP id p43mr14278036ooi.24.1587418949025; Mon, 20 Apr 2020 14:42:29 -0700 (PDT) Received: from rob-hp-laptop (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id u13sm170429oor.45.2020.04.20.14.42.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 14:42:28 -0700 (PDT) Received: (nullmailer pid 13178 invoked by uid 1000); Mon, 20 Apr 2020 21:42:27 -0000 Date: Mon, 20 Apr 2020 16:42:27 -0500 From: Rob Herring To: Anson Huang Cc: srinivas.kandagatla@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linux-imx@nxp.com Subject: Re: [PATCH 1/3] dt-bindings: nvmem: Convert i.MX OCOTP to json-schema Message-ID: <20200420214227.GA23817@bogus> References: <1586921602-1877-1-git-send-email-Anson.Huang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1586921602-1877-1-git-send-email-Anson.Huang@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 15, 2020 at 11:33:20AM +0800, Anson Huang wrote: > Convert the i.MX OCOTP binding to DT schema format using json-schema. > > Signed-off-by: Anson Huang > --- > .../devicetree/bindings/nvmem/imx-ocotp.txt | 50 ---------- > .../devicetree/bindings/nvmem/imx-ocotp.yaml | 103 +++++++++++++++++++++ > 2 files changed, 103 insertions(+), 50 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/nvmem/imx-ocotp.txt > create mode 100644 Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml > > diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt > deleted file mode 100644 > index 6e346d5..0000000 > --- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt > +++ /dev/null > @@ -1,50 +0,0 @@ > -Freescale i.MX6 On-Chip OTP Controller (OCOTP) device tree bindings > - > -This binding represents the on-chip eFuse OTP controller found on > -i.MX6Q/D, i.MX6DL/S, i.MX6SL, i.MX6SX, i.MX6UL, i.MX6ULL/ULZ, i.MX6SLL, > -i.MX7D/S, i.MX7ULP, i.MX8MQ, i.MX8MM, i.MX8MN and i.MX8MP SoCs. > - > -Required properties: > -- compatible: should be one of > - "fsl,imx6q-ocotp" (i.MX6Q/D/DL/S), > - "fsl,imx6sl-ocotp" (i.MX6SL), or > - "fsl,imx6sx-ocotp" (i.MX6SX), > - "fsl,imx6ul-ocotp" (i.MX6UL), > - "fsl,imx6ull-ocotp" (i.MX6ULL/ULZ), > - "fsl,imx7d-ocotp" (i.MX7D/S), > - "fsl,imx6sll-ocotp" (i.MX6SLL), > - "fsl,imx7ulp-ocotp" (i.MX7ULP), > - "fsl,imx8mq-ocotp" (i.MX8MQ), > - "fsl,imx8mm-ocotp" (i.MX8MM), > - "fsl,imx8mn-ocotp" (i.MX8MN), > - "fsl,imx8mp-ocotp" (i.MX8MP), > - followed by "syscon". > -- #address-cells : Should be 1 > -- #size-cells : Should be 1 > -- reg: Should contain the register base and length. > -- clocks: Should contain a phandle pointing to the gated peripheral clock. > - > -Optional properties: > -- read-only: disable write access > - > -Optional Child nodes: > - > -- Data cells of ocotp: > - Detailed bindings are described in bindings/nvmem/nvmem.txt > - > -Example: > - ocotp: ocotp@21bc000 { > - #address-cells = <1>; > - #size-cells = <1>; > - compatible = "fsl,imx6sx-ocotp", "syscon"; > - reg = <0x021bc000 0x4000>; > - clocks = <&clks IMX6SX_CLK_OCOTP>; > - > - tempmon_calib: calib@38 { > - reg = <0x38 4>; > - }; > - > - tempmon_temp_grade: temp-grade@20 { > - reg = <0x20 4>; > - }; > - }; > diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml > new file mode 100644 > index 0000000..70aa637 > --- /dev/null > +++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml > @@ -0,0 +1,103 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/nvmem/imx-ocotp.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Freescale i.MX6 On-Chip OTP Controller (OCOTP) device tree bindings > + > +maintainers: > + - Anson Huang > + > +description: | > + This binding represents the on-chip eFuse OTP controller found on > + i.MX6Q/D, i.MX6DL/S, i.MX6SL, i.MX6SX, i.MX6UL, i.MX6ULL/ULZ, i.MX6SLL, > + i.MX7D/S, i.MX7ULP, i.MX8MQ, i.MX8MM, i.MX8MN and i.MX8MP SoCs. > + > +allOf: > + - $ref: "nvmem.yaml#" > + > +properties: > + compatible: > + anyOf: > + - items: > + - enum: > + - fsl,imx6q-ocotp > + - fsl,imx6sl-ocotp > + - fsl,imx6sx-ocotp > + - fsl,imx6ul-ocotp > + - fsl,imx6ull-ocotp > + - fsl,imx7d-ocotp > + - fsl,imx6sll-ocotp > + - fsl,imx7ulp-ocotp > + - fsl,imx8mq-ocotp > + - fsl,imx8mm-ocotp > + - fsl,imx8mn-ocotp > + - fsl,imx8mp-ocotp > + Drop the blank line here. > + - const: syscon > + > + - contains: > + const: syscon > + additionalItems: true You shouldn't need the 2nd clause here. And then can remove the 'anyOf'. > + > + reg: > + maxItems: 1 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 1 > + > + clocks: > + description: | > + OCOTP's clock source. Drop > + maxItems: 1 > + > +required: > + - "#address-cells" > + - "#size-cells" > + - compatible > + - reg > + > +patternProperties: > + "^.*@[0-9a-f]+$": > + type: object > + > + properties: > + reg: > + maxItems: 1 > + description: > + Offset and size in bytes within the storage device. > + > + required: > + - reg > + > + additionalProperties: false > + > +examples: > + - | > + #include > + > + ocotp: efuse@21bc000 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "fsl,imx6sx-ocotp", "syscon"; > + reg = <0x021bc000 0x4000>; > + clocks = <&clks IMX6SX_CLK_OCOTP>; > + > + cpu_speed_grade: speed-grade@10 { > + reg = <0x10 4>; > + }; > + > + tempmon_calib: calib@38 { > + reg = <0x38 4>; > + }; > + > + tempmon_temp_grade: temp-grade@20 { > + reg = <0x20 4>; > + }; > + }; > + > +... > -- > 2.7.4 >