From: Rob Herring <robh@kernel.org>
To: Anson Huang <Anson.Huang@nxp.com>
Cc: devicetree@vger.kernel.org, festevam@gmail.com,
s.hauer@pengutronix.de, linux-kernel@vger.kernel.org,
srinivas.kandagatla@linaro.org, Linux-imx@nxp.com,
kernel@pengutronix.de, shawnguo@kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] dt-bindings: nvmem: Convert i.MX OCOTP to json-schema
Date: Mon, 20 Apr 2020 16:42:27 -0500 [thread overview]
Message-ID: <20200420214227.GA23817@bogus> (raw)
In-Reply-To: <1586921602-1877-1-git-send-email-Anson.Huang@nxp.com>
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 <Anson.Huang@nxp.com>
> ---
> .../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 <Anson.Huang@nxp.com>
> +
> +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 <dt-bindings/clock/imx6sx-clock.h>
> +
> + 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
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Anson Huang <Anson.Huang@nxp.com>
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
Date: Mon, 20 Apr 2020 16:42:27 -0500 [thread overview]
Message-ID: <20200420214227.GA23817@bogus> (raw)
In-Reply-To: <1586921602-1877-1-git-send-email-Anson.Huang@nxp.com>
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 <Anson.Huang@nxp.com>
> ---
> .../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 <Anson.Huang@nxp.com>
> +
> +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 <dt-bindings/clock/imx6sx-clock.h>
> +
> + 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
>
next prev parent reply other threads:[~2020-04-20 21:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 3:33 [PATCH 1/3] dt-bindings: nvmem: Convert i.MX OCOTP to json-schema Anson Huang
2020-04-15 3:33 ` Anson Huang
2020-04-15 3:33 ` [PATCH 2/3] dt-bindings: nvmem: Convert i.MX IIM " Anson Huang
2020-04-15 3:33 ` Anson Huang
2020-04-20 21:43 ` Rob Herring
2020-04-20 21:43 ` Rob Herring
2020-04-15 3:33 ` [PATCH 3/3] dt-bindings: nvmem: Convert MXS OCOTP " Anson Huang
2020-04-15 3:33 ` Anson Huang
2020-04-20 21:42 ` Rob Herring [this message]
2020-04-20 21:42 ` [PATCH 1/3] dt-bindings: nvmem: Convert i.MX " Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200420214227.GA23817@bogus \
--to=robh@kernel.org \
--cc=Anson.Huang@nxp.com \
--cc=Linux-imx@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.