Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp253138pxa; Tue, 4 Aug 2020 23:34:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwWdJjdEvFt+S3nuWENBXohBSZtuzzYGa7PIdM36+pRyzipD/GBKhnUA9wOMaj7r2iHCvE X-Received: by 2002:aa7:cc10:: with SMTP id q16mr1367614edt.298.1596609259012; Tue, 04 Aug 2020 23:34:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596609259; cv=none; d=google.com; s=arc-20160816; b=JngKjATpOQR9+tHV4E1UOPkheWIphGKqwimdPxYDyACtnje6h2ZtTJWse1btNCO6xe ugq8qXhZrwiU/RngWJCGxR/nWjywyn4mkcs2UXvBSGH5i6G0roZIejej09AnPvKgZqz5 gxMG+shPTN2+K7qDJhqVLbL9gMbYO0AtwurLzBrcnwnfpKCG/Wvizbnq2Tr8UvsvNi4y 7HojU0rFaA76OsYiE65bWdxT7aoT/U+fX20b/93bJbQXVNOgVFhwEGZHR1ctH1ii6RC+ P7ogGrEOlzK1rT+rpOSIj7vL686S28mIyoMq06vx9B04s7qfQv8x1i0djOQjv2B8oGyM d7Uw== 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=XeOy+AWj9qZoRDCjwmXLjY6ewxk5WIdmSf8Iz+yrYWk=; b=QA7ZqCZCKTzgeFBjAYFe0Px0rkYeCAoRZ3Zm+3iujwOAMJZ5qY0H7VT2dIJWpSHwSV yfj2N5PCxTwFZVVmXBFBVK4NEV0KaGI6XjAdZJO1tEbzhvpgvz3nXenWonjiQ1K986wI 1PJPyO+U/J7hgMFuOgzHUPv2pqvP1LL8zZrPT7HXEWpgkQ2Ra6YamMgnIaoakvtfulqw ogum7Wnudrt0tmk4eahmFgrQt/KqmVARBNHY5cAsjY8+nGWQLo3fo6rpRFap2aXwc6QN L/2AkDVskfwukUyOai57x6TnjSaJJX1Q3X3NeyC2LGubk1hSgxg9ZgO7xvGc8/ofluJp BBng== 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 fi14si678882ejb.628.2020.08.04.23.33.56; Tue, 04 Aug 2020 23:34:18 -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 S1728100AbgHEGcw (ORCPT + 99 others); Wed, 5 Aug 2020 02:32:52 -0400 Received: from inva021.nxp.com ([92.121.34.21]:35786 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726232AbgHEGcv (ORCPT ); Wed, 5 Aug 2020 02:32:51 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C42C62010A4; Wed, 5 Aug 2020 08:32:48 +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 17F872001B6; Wed, 5 Aug 2020 08:32:43 +0200 (CEST) Received: from 10.192.242.69 (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D45E54024E; Wed, 5 Aug 2020 08:32:35 +0200 (CEST) From: Anson Huang To: mpm@selenic.com, herbert@gondor.apana.org.au, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, horia.geanta@nxp.com, vz@mleia.com, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] dt-bindings: rng: Convert i.MX to json-schema Date: Wed, 5 Aug 2020 14:28:04 +0800 Message-Id: <1596608884-13205-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 rng binding to DT schema format using json-schema. Signed-off-by: Anson Huang --- Documentation/devicetree/bindings/rng/imx-rng.txt | 23 ---------- Documentation/devicetree/bindings/rng/imx-rng.yaml | 50 ++++++++++++++++++++++ 2 files changed, 50 insertions(+), 23 deletions(-) delete mode 100644 Documentation/devicetree/bindings/rng/imx-rng.txt create mode 100644 Documentation/devicetree/bindings/rng/imx-rng.yaml diff --git a/Documentation/devicetree/bindings/rng/imx-rng.txt b/Documentation/devicetree/bindings/rng/imx-rng.txt deleted file mode 100644 index 659d4ef..0000000 --- a/Documentation/devicetree/bindings/rng/imx-rng.txt +++ /dev/null @@ -1,23 +0,0 @@ -Freescale RNGA/RNGB/RNGC (Random Number Generator Versions A, B and C) - -Required properties: -- compatible : should be one of - "fsl,imx21-rnga" - "fsl,imx31-rnga" (backward compatible with "fsl,imx21-rnga") - "fsl,imx25-rngb" - "fsl,imx6sl-rngb" (backward compatible with "fsl,imx25-rngb") - "fsl,imx6sll-rngb" (backward compatible with "fsl,imx25-rngb") - "fsl,imx6ull-rngb" (backward compatible with "fsl,imx25-rngb") - "fsl,imx35-rngc" -- reg : offset and length of the register set of this block -- interrupts : the interrupt number for the RNG block -- clocks : the RNG clk source - -Example: - -rng@53fb0000 { - compatible = "fsl,imx25-rngb"; - reg = <0x53fb0000 0x4000>; - interrupts = <22>; - clocks = <&trng_clk>; -}; diff --git a/Documentation/devicetree/bindings/rng/imx-rng.yaml b/Documentation/devicetree/bindings/rng/imx-rng.yaml new file mode 100644 index 0000000..cf5b8ed --- /dev/null +++ b/Documentation/devicetree/bindings/rng/imx-rng.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rng/imx-rng.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale RNGA/RNGB/RNGC (Random Number Generator Versions A, B and C) + +maintainers: + - Vladimir Zapolskiy + +properties: + compatible: + oneOf: + - const: fsl,imx21-rnga + - const: fsl,imx25-rngb + - items: + - const: fsl,imx31-rnga + - const: fsl,imx21-rnga + - items: + - enum: + - fsl,imx6sl-rngb + - fsl,imx6sll-rngb + - fsl,imx6ull-rngb + - const: fsl,imx25-rngb + - const: fsl,imx35-rngc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + +examples: + - | + rngb@53fb0000 { + compatible = "fsl,imx25-rngb"; + reg = <0x53fb0000 0x4000>; + clocks = <&clks 109>; + interrupts = <22>; + }; -- 2.7.4