Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp609033ybz; Wed, 15 Apr 2020 15:04:48 -0700 (PDT) X-Google-Smtp-Source: APiQypLuBThY3rpXimgZ9b4iNOdoqer/7le8VE9/8lHKlFbpNG7+EQgyLhj64HVKIpjWY5NrIs6/ X-Received: by 2002:a50:a7a6:: with SMTP id i35mr26558328edc.130.1586988288611; Wed, 15 Apr 2020 15:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586988288; cv=none; d=google.com; s=arc-20160816; b=gFC2+m1IptSKWcgDuWAJvkQW+NhYDysiBXzUmKUkghcGH4JWnup2EuvhI1SteV0Z/i gJuBsONLW4iFOkgnFwBtDchnz6MyW54eHr50K2cgMwV+qWeywog663Szb1d6vrQXixNm 8GCMG7kmjSKMeR1eV9FISWrahfo46hfiFlBSM3+p5/OMIUvEYTyHjr51qcdGpzp2+l3Q W507MfGFpuQYtULjfZzbfqnlv+XcOhUNXWchUgVzDRBD341qyNGopweYR4qJR07Sevjw ILAywBqvBGBgGlECFB/M+ODlVF5b5z/Psy1Bir5hMQthZ116zBcboAKzjH55UIht7Fle 446g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=jaUm3emP8AMuXXQXv4BXJ87E4q3W3NEWE35IqsF4sp8=; b=OO29jlUAoRK+iZiBt5vJIGB1gRdrfYeF42d8ri8q2jBbjnOJ+UbYXzcnTIlizsMXXb w6w73mhpZBXUJKdEiDL0ytBEF1QDnEfDF34Ya3GYPijm0wHXya0hQNW7ldoLCN9cn5Qu 77F+1/ROFxSC18MKp/YoJRJlqj849rv+zEIdiKMz9UnQWytgs5vuQGOtJE2QEkGhBUJg mXOjn+0MVwH2VuXAeRiKAHYIkb4SLHhY3GgtGg201XSfxsXES2j59TE4TLaDJ2s4m0qF MFMVpxM180SbnA37iqXA1xrysZfO0jaSYfCPA4i9hj0Kr0LNnmXUnGIsZAk87Foi5c7U UfSQ== 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rv13si4319423ejb.115.2020.04.15.15.04.25; Wed, 15 Apr 2020 15:04:48 -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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389760AbgDODlh (ORCPT + 99 others); Tue, 14 Apr 2020 23:41:37 -0400 Received: from inva021.nxp.com ([92.121.34.21]:36960 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733221AbgDODlf (ORCPT ); Tue, 14 Apr 2020 23:41:35 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 441CA2006E5; Wed, 15 Apr 2020 05:41:32 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id DCE29200715; Wed, 15 Apr 2020 05:41:27 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 8277B402D8; Wed, 15 Apr 2020 11:41:22 +0800 (SGT) From: Anson Huang To: srinivas.kandagatla@linaro.org, robh+dt@kernel.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 Cc: Linux-imx@nxp.com Subject: [PATCH 1/3] dt-bindings: nvmem: Convert i.MX OCOTP to json-schema Date: Wed, 15 Apr 2020 11:33:20 +0800 Message-Id: <1586921602-1877-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 + + - const: syscon + + - contains: + const: syscon + additionalItems: true + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + clocks: + description: | + OCOTP's clock source. + 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