linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: pwm: Convert imx pwm to json-schema
@ 2020-05-14  6:54 Anson Huang
  2020-05-14  6:54 ` [PATCH 2/2] dt-bindings: pwm: Convert imx tpm " Anson Huang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Anson Huang @ 2020-05-14  6:54 UTC (permalink / raw)
  To: thierry.reding, u.kleine-koenig, robh+dt, shawnguo, s.hauer,
	kernel, festevam, p.zabel, linux-pwm, devicetree,
	linux-arm-kernel, linux-kernel
  Cc: Linux-imx

Convert the imx pwm binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 Documentation/devicetree/bindings/pwm/imx-pwm.txt  | 27 ---------
 Documentation/devicetree/bindings/pwm/imx-pwm.yaml | 66 ++++++++++++++++++++++
 2 files changed, 66 insertions(+), 27 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/imx-pwm.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/imx-pwm.yaml

diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.txt b/Documentation/devicetree/bindings/pwm/imx-pwm.txt
deleted file mode 100644
index 22f1c3d..0000000
--- a/Documentation/devicetree/bindings/pwm/imx-pwm.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-Freescale i.MX PWM controller
-
-Required properties:
-- compatible : should be "fsl,<soc>-pwm" and one of the following
-   compatible strings:
-  - "fsl,imx1-pwm" for PWM compatible with the one integrated on i.MX1
-  - "fsl,imx27-pwm" for PWM compatible with the one integrated on i.MX27
-- reg: physical base address and length of the controller's registers
-- #pwm-cells: 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml
-  in this directory for a description of the cells format.
-- clocks : Clock specifiers for both ipg and per clocks.
-- clock-names : Clock names should include both "ipg" and "per"
-See the clock consumer binding,
-	Documentation/devicetree/bindings/clock/clock-bindings.txt
-- interrupts: The interrupt for the pwm controller
-
-Example:
-
-pwm1: pwm@53fb4000 {
-	#pwm-cells = <3>;
-	compatible = "fsl,imx53-pwm", "fsl,imx27-pwm";
-	reg = <0x53fb4000 0x4000>;
-	clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>,
-		 <&clks IMX5_CLK_PWM1_HF_GATE>;
-	clock-names = "ipg", "per";
-	interrupts = <61>;
-};
diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
new file mode 100644
index 0000000..4b62af2
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/imx-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale i.MX PWM controller
+
+maintainers:
+  - Philipp Zabel <p.zabel@pengutronix.de>
+
+properties:
+  "#pwm-cells":
+    description: |
+      Should be 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml
+      in this directory for a description of the cells format.
+    enum:
+      - 2
+      - 3
+
+  compatible:
+    enum:
+      - fsl,imx1-pwm
+      - fsl,imx27-pwm
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: SoC PWM ipg clock
+      - description: SoC PWM per clock
+    maxItems: 2
+
+  clock-names:
+    items:
+      - const: ipg
+      - const: per
+    maxItems: 2
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - "#pwm-cells"
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/imx5-clock.h>
+
+    pwm@53fb4000 {
+        #pwm-cells = <3>;
+        compatible = "fsl,imx27-pwm";
+        reg = <0x53fb4000 0x4000>;
+        clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>,
+                 <&clks IMX5_CLK_PWM1_HF_GATE>;
+        clock-names = "ipg", "per";
+        interrupts = <61>;
+    };
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] dt-bindings: pwm: Convert imx tpm pwm to json-schema
  2020-05-14  6:54 [PATCH 1/2] dt-bindings: pwm: Convert imx pwm to json-schema Anson Huang
@ 2020-05-14  6:54 ` Anson Huang
  2020-05-18  6:00   ` Aisheng Dong
  2020-05-28  2:47   ` Rob Herring
  2020-05-18  5:58 ` [PATCH 1/2] dt-bindings: pwm: Convert imx " Aisheng Dong
  2020-05-28  2:47 ` Rob Herring
  2 siblings, 2 replies; 7+ messages in thread
From: Anson Huang @ 2020-05-14  6:54 UTC (permalink / raw)
  To: thierry.reding, u.kleine-koenig, robh+dt, shawnguo, s.hauer,
	kernel, festevam, p.zabel, linux-pwm, devicetree,
	linux-arm-kernel, linux-kernel
  Cc: Linux-imx

Convert the imx tpm pwm binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 .../devicetree/bindings/pwm/imx-tpm-pwm.txt        | 22 ---------
 .../devicetree/bindings/pwm/imx-tpm-pwm.yaml       | 55 ++++++++++++++++++++++
 2 files changed, 55 insertions(+), 22 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml

diff --git a/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt b/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt
deleted file mode 100644
index 5bf2095..0000000
--- a/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Freescale i.MX TPM PWM controller
-
-Required properties:
-- compatible : Should be "fsl,imx7ulp-pwm".
-- reg: Physical base address and length of the controller's registers.
-- #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of the cells format.
-- clocks : The clock provided by the SoC to drive the PWM.
-- interrupts: The interrupt for the PWM controller.
-
-Note: The TPM counter and period counter are shared between multiple channels, so all channels
-should use same period setting.
-
-Example:
-
-tpm4: pwm@40250000 {
-	compatible = "fsl,imx7ulp-pwm";
-	reg = <0x40250000 0x1000>;
-	assigned-clocks = <&pcc2 IMX7ULP_CLK_LPTPM4>;
-	assigned-clock-parents = <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>;
-	clocks = <&pcc2 IMX7ULP_CLK_LPTPM4>;
-	#pwm-cells = <3>;
-};
diff --git a/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml b/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml
new file mode 100644
index 0000000..fe9ef42
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/imx-tpm-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale i.MX TPM PWM controller
+
+maintainers:
+  - Anson Huang <anson.huang@nxp.com>
+
+description: |
+  The TPM counter and period counter are shared between multiple
+  channels, so all channels should use same period setting.
+
+properties:
+  "#pwm-cells":
+    const: 3
+
+  compatible:
+    enum:
+      - fsl,imx7ulp-pwm
+
+  reg:
+    maxItems: 1
+
+  assigned-clocks:
+    maxItems: 1
+
+  assigned-clock-parents:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - "#pwm-cells"
+  - compatible
+  - reg
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/imx7ulp-clock.h>
+
+    pwm@40250000 {
+        compatible = "fsl,imx7ulp-pwm";
+        reg = <0x40250000 0x1000>;
+        assigned-clocks = <&pcc2 IMX7ULP_CLK_LPTPM4>;
+        assigned-clock-parents = <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>;
+        clocks = <&pcc2 IMX7ULP_CLK_LPTPM4>;
+        #pwm-cells = <3>;
+    };
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* RE: [PATCH 1/2] dt-bindings: pwm: Convert imx pwm to json-schema
  2020-05-14  6:54 [PATCH 1/2] dt-bindings: pwm: Convert imx pwm to json-schema Anson Huang
  2020-05-14  6:54 ` [PATCH 2/2] dt-bindings: pwm: Convert imx tpm " Anson Huang
@ 2020-05-18  5:58 ` Aisheng Dong
  2020-05-28  2:47   ` Rob Herring
  2020-05-28  2:47 ` Rob Herring
  2 siblings, 1 reply; 7+ messages in thread
From: Aisheng Dong @ 2020-05-18  5:58 UTC (permalink / raw)
  To: Anson Huang, thierry.reding, u.kleine-koenig, robh+dt, shawnguo,
	s.hauer, kernel, festevam, p.zabel, linux-pwm, devicetree,
	linux-arm-kernel, linux-kernel
  Cc: dl-linux-imx

> From: Anson Huang <Anson.Huang@nxp.com>
> Sent: Thursday, May 14, 2020 2:54 PM
> 
> Convert the imx pwm binding to DT schema format using json-schema.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  Documentation/devicetree/bindings/pwm/imx-pwm.txt  | 27 ---------
> Documentation/devicetree/bindings/pwm/imx-pwm.yaml | 66
> ++++++++++++++++++++++
>  2 files changed, 66 insertions(+), 27 deletions(-)  delete mode 100644
> Documentation/devicetree/bindings/pwm/imx-pwm.txt
>  create mode 100644
> Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> 
> diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.txt
> b/Documentation/devicetree/bindings/pwm/imx-pwm.txt
> deleted file mode 100644
> index 22f1c3d..0000000
> --- a/Documentation/devicetree/bindings/pwm/imx-pwm.txt
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -Freescale i.MX PWM controller
> -
> -Required properties:
> -- compatible : should be "fsl,<soc>-pwm" and one of the following
> -   compatible strings:
> -  - "fsl,imx1-pwm" for PWM compatible with the one integrated on i.MX1
> -  - "fsl,imx27-pwm" for PWM compatible with the one integrated on i.MX27
> -- reg: physical base address and length of the controller's registers
> -- #pwm-cells: 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml
> -  in this directory for a description of the cells format.
> -- clocks : Clock specifiers for both ipg and per clocks.
> -- clock-names : Clock names should include both "ipg" and "per"
> -See the clock consumer binding,
> -	Documentation/devicetree/bindings/clock/clock-bindings.txt
> -- interrupts: The interrupt for the pwm controller
> -
> -Example:
> -
> -pwm1: pwm@53fb4000 {
> -	#pwm-cells = <3>;
> -	compatible = "fsl,imx53-pwm", "fsl,imx27-pwm";
> -	reg = <0x53fb4000 0x4000>;
> -	clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>,
> -		 <&clks IMX5_CLK_PWM1_HF_GATE>;
> -	clock-names = "ipg", "per";
> -	interrupts = <61>;
> -};
> diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> new file mode 100644
> index 0000000..4b62af2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> @@ -0,0 +1,66 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> +---
> +$id:
> +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevice
> +tree.org%2Fschemas%2Fpwm%2Fimx-pwm.yaml%23&amp;data=02%7C01%
> 7Caisheng.d
> +ong%40nxp.com%7C9b5cc1814a4b47d1cb0d08d7f7d4f594%7C686ea1d3bc
> 2b4c6fa92c
> +d99c5c301635%7C0%7C0%7C637250366331627865&amp;sdata=M2RPcty
> wz61WZrpAW6S
> +O3NJbr2wj2qXwnMMmBwCbInk%3D&amp;reserved=0
> +$schema:
> +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevice
> +tree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=02%7C01%7Caishen
> g.dong%
> +40nxp.com%7C9b5cc1814a4b47d1cb0d08d7f7d4f594%7C686ea1d3bc2b4c
> 6fa92cd99c
> +5c301635%7C0%7C0%7C637250366331627865&amp;sdata=UxgYSClanyOjt
> BmlyNrMZyF
> +3%2F5awD%2FM3yaVPqgNKgxs%3D&amp;reserved=0
> +
> +title: Freescale i.MX PWM controller
> +
> +maintainers:
> +  - Philipp Zabel <p.zabel@pengutronix.de>
> +
> +properties:
> +  "#pwm-cells":
> +    description: |
> +      Should be 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml
> +      in this directory for a description of the cells format.

Should we add the reference to pwm.yaml?
BTW, strange, I didn't see format description in pwm.yaml.

> +    enum:
> +      - 2
> +      - 3
> +
> +  compatible:
> +    enum:
> +      - fsl,imx1-pwm
> +      - fsl,imx27-pwm
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    items:
> +      - description: SoC PWM ipg clock
> +      - description: SoC PWM per clock
> +    maxItems: 2
> +
> +  clock-names:
> +    items:
> +      - const: ipg
> +      - const: per
> +    maxItems: 2
> +
> +  interrupts:
> +    maxItems: 1
> +
> +required:
> +  - "#pwm-cells"
> +  - compatible
> +  - reg
> +  - clocks
> +  - clock-names
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/imx5-clock.h>
> +
> +    pwm@53fb4000 {
> +        #pwm-cells = <3>;
> +        compatible = "fsl,imx27-pwm";
> +        reg = <0x53fb4000 0x4000>;
> +        clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>,
> +                 <&clks IMX5_CLK_PWM1_HF_GATE>;
> +        clock-names = "ipg", "per";
> +        interrupts = <61>;
> +    };
> --
> 2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH 2/2] dt-bindings: pwm: Convert imx tpm pwm to json-schema
  2020-05-14  6:54 ` [PATCH 2/2] dt-bindings: pwm: Convert imx tpm " Anson Huang
@ 2020-05-18  6:00   ` Aisheng Dong
  2020-05-28  2:47   ` Rob Herring
  1 sibling, 0 replies; 7+ messages in thread
From: Aisheng Dong @ 2020-05-18  6:00 UTC (permalink / raw)
  To: Anson Huang, thierry.reding, u.kleine-koenig, robh+dt, shawnguo,
	s.hauer, kernel, festevam, p.zabel, linux-pwm, devicetree,
	linux-arm-kernel, linux-kernel
  Cc: dl-linux-imx

> From: Anson Huang <Anson.Huang@nxp.com>
> Sent: Thursday, May 14, 2020 2:54 PM
> 
> Convert the imx tpm pwm binding to DT schema format using json-schema.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  .../devicetree/bindings/pwm/imx-tpm-pwm.txt        | 22 ---------
>  .../devicetree/bindings/pwm/imx-tpm-pwm.yaml       | 55
> ++++++++++++++++++++++
>  2 files changed, 55 insertions(+), 22 deletions(-)  delete mode 100644
> Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt
>  create mode 100644
> Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml
> 
> diff --git a/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt
> b/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt
> deleted file mode 100644
> index 5bf2095..0000000
> --- a/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -Freescale i.MX TPM PWM controller
> -
> -Required properties:
> -- compatible : Should be "fsl,imx7ulp-pwm".
> -- reg: Physical base address and length of the controller's registers.
> -- #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of
> the cells format.
> -- clocks : The clock provided by the SoC to drive the PWM.
> -- interrupts: The interrupt for the PWM controller.
> -
> -Note: The TPM counter and period counter are shared between multiple
> channels, so all channels -should use same period setting.
> -
> -Example:
> -
> -tpm4: pwm@40250000 {
> -	compatible = "fsl,imx7ulp-pwm";
> -	reg = <0x40250000 0x1000>;
> -	assigned-clocks = <&pcc2 IMX7ULP_CLK_LPTPM4>;
> -	assigned-clock-parents = <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>;
> -	clocks = <&pcc2 IMX7ULP_CLK_LPTPM4>;
> -	#pwm-cells = <3>;
> -};
> diff --git a/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml
> b/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml
> new file mode 100644
> index 0000000..fe9ef42
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> +---
> +$id:
> +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevice
> +tree.org%2Fschemas%2Fpwm%2Fimx-tpm-pwm.yaml%23&amp;data=02%7C
> 01%7Caishe
> +ng.dong%40nxp.com%7C8dba0c8c150b4885913008d7f7d5320d%7C686ea
> 1d3bc2b4c6f
> +a92cd99c5c301635%7C0%7C0%7C637250367345109522&amp;sdata=WT6
> kA9lpZMBYgS7
> +whY9rlVq5qDcGZYheOHoTR8nupOY%3D&amp;reserved=0
> +$schema:
> +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevice
> +tree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=02%7C01%7Caishen
> g.dong%
> +40nxp.com%7C8dba0c8c150b4885913008d7f7d5320d%7C686ea1d3bc2b4c
> 6fa92cd99c
> +5c301635%7C0%7C0%7C637250367345109522&amp;sdata=AlzT4bC3GZgV
> cDJn5svMqjt
> +5HN7Lj60Fc7m%2B3D0g0xQ%3D&amp;reserved=0
> +
> +title: Freescale i.MX TPM PWM controller
> +
> +maintainers:
> +  - Anson Huang <anson.huang@nxp.com>
> +
> +description: |
> +  The TPM counter and period counter are shared between multiple
> +  channels, so all channels should use same period setting.
> +
> +properties:
> +  "#pwm-cells":
> +    const: 3
> +

Same issue, missing the reference to pwm.yaml?


> +  compatible:
> +    enum:
> +      - fsl,imx7ulp-pwm
> +
> +  reg:
> +    maxItems: 1
> +
> +  assigned-clocks:
> +    maxItems: 1
> +
> +  assigned-clock-parents:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +required:
> +  - "#pwm-cells"
> +  - compatible
> +  - reg
> +  - clocks
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/imx7ulp-clock.h>
> +
> +    pwm@40250000 {
> +        compatible = "fsl,imx7ulp-pwm";
> +        reg = <0x40250000 0x1000>;
> +        assigned-clocks = <&pcc2 IMX7ULP_CLK_LPTPM4>;
> +        assigned-clock-parents = <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>;
> +        clocks = <&pcc2 IMX7ULP_CLK_LPTPM4>;
> +        #pwm-cells = <3>;
> +    };
> --
> 2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] dt-bindings: pwm: Convert imx pwm to json-schema
  2020-05-18  5:58 ` [PATCH 1/2] dt-bindings: pwm: Convert imx " Aisheng Dong
@ 2020-05-28  2:47   ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-05-28  2:47 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: Anson Huang, thierry.reding, u.kleine-koenig, shawnguo, s.hauer,
	kernel, festevam, p.zabel, linux-pwm, devicetree,
	linux-arm-kernel, linux-kernel, dl-linux-imx

On Mon, May 18, 2020 at 05:58:42AM +0000, Aisheng Dong wrote:
> > From: Anson Huang <Anson.Huang@nxp.com>
> > Sent: Thursday, May 14, 2020 2:54 PM
> > 
> > Convert the imx pwm binding to DT schema format using json-schema.
> > 
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > ---
> >  Documentation/devicetree/bindings/pwm/imx-pwm.txt  | 27 ---------
> > Documentation/devicetree/bindings/pwm/imx-pwm.yaml | 66
> > ++++++++++++++++++++++
> >  2 files changed, 66 insertions(+), 27 deletions(-)  delete mode 100644
> > Documentation/devicetree/bindings/pwm/imx-pwm.txt
> >  create mode 100644
> > Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.txt
> > b/Documentation/devicetree/bindings/pwm/imx-pwm.txt
> > deleted file mode 100644
> > index 22f1c3d..0000000
> > --- a/Documentation/devicetree/bindings/pwm/imx-pwm.txt
> > +++ /dev/null
> > @@ -1,27 +0,0 @@
> > -Freescale i.MX PWM controller
> > -
> > -Required properties:
> > -- compatible : should be "fsl,<soc>-pwm" and one of the following
> > -   compatible strings:
> > -  - "fsl,imx1-pwm" for PWM compatible with the one integrated on i.MX1
> > -  - "fsl,imx27-pwm" for PWM compatible with the one integrated on i.MX27
> > -- reg: physical base address and length of the controller's registers
> > -- #pwm-cells: 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml
> > -  in this directory for a description of the cells format.
> > -- clocks : Clock specifiers for both ipg and per clocks.
> > -- clock-names : Clock names should include both "ipg" and "per"
> > -See the clock consumer binding,
> > -	Documentation/devicetree/bindings/clock/clock-bindings.txt
> > -- interrupts: The interrupt for the pwm controller
> > -
> > -Example:
> > -
> > -pwm1: pwm@53fb4000 {
> > -	#pwm-cells = <3>;
> > -	compatible = "fsl,imx53-pwm", "fsl,imx27-pwm";
> > -	reg = <0x53fb4000 0x4000>;
> > -	clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>,
> > -		 <&clks IMX5_CLK_PWM1_HF_GATE>;
> > -	clock-names = "ipg", "per";
> > -	interrupts = <61>;
> > -};
> > diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> > b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> > new file mode 100644
> > index 0000000..4b62af2
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> > @@ -0,0 +1,66 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> > +---
> > +$id:
> > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevice
> > +tree.org%2Fschemas%2Fpwm%2Fimx-pwm.yaml%23&amp;data=02%7C01%
> > 7Caisheng.d
> > +ong%40nxp.com%7C9b5cc1814a4b47d1cb0d08d7f7d4f594%7C686ea1d3bc
> > 2b4c6fa92c
> > +d99c5c301635%7C0%7C0%7C637250366331627865&amp;sdata=M2RPcty
> > wz61WZrpAW6S
> > +O3NJbr2wj2qXwnMMmBwCbInk%3D&amp;reserved=0
> > +$schema:
> > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevice
> > +tree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=02%7C01%7Caishen
> > g.dong%
> > +40nxp.com%7C9b5cc1814a4b47d1cb0d08d7f7d4f594%7C686ea1d3bc2b4c
> > 6fa92cd99c
> > +5c301635%7C0%7C0%7C637250366331627865&amp;sdata=UxgYSClanyOjt
> > BmlyNrMZyF
> > +3%2F5awD%2FM3yaVPqgNKgxs%3D&amp;reserved=0
> > +
> > +title: Freescale i.MX PWM controller
> > +
> > +maintainers:
> > +  - Philipp Zabel <p.zabel@pengutronix.de>
> > +
> > +properties:
> > +  "#pwm-cells":
> > +    description: |
> > +      Should be 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml
> > +      in this directory for a description of the cells format.
> 
> Should we add the reference to pwm.yaml?
> BTW, strange, I didn't see format description in pwm.yaml.

No need to. That's generally only needed when there's some structure 
like SPI or I2C bus to include.

Rob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] dt-bindings: pwm: Convert imx pwm to json-schema
  2020-05-14  6:54 [PATCH 1/2] dt-bindings: pwm: Convert imx pwm to json-schema Anson Huang
  2020-05-14  6:54 ` [PATCH 2/2] dt-bindings: pwm: Convert imx tpm " Anson Huang
  2020-05-18  5:58 ` [PATCH 1/2] dt-bindings: pwm: Convert imx " Aisheng Dong
@ 2020-05-28  2:47 ` Rob Herring
  2 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-05-28  2:47 UTC (permalink / raw)
  To: Anson Huang
  Cc: p.zabel, thierry.reding, shawnguo, linux-pwm, robh+dt, festevam,
	Linux-imx, linux-kernel, s.hauer, linux-arm-kernel,
	u.kleine-koenig, devicetree, kernel

On Thu, 14 May 2020 14:54:18 +0800, Anson Huang wrote:
> Convert the imx pwm binding to DT schema format using json-schema.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  Documentation/devicetree/bindings/pwm/imx-pwm.txt  | 27 ---------
>  Documentation/devicetree/bindings/pwm/imx-pwm.yaml | 66 ++++++++++++++++++++++
>  2 files changed, 66 insertions(+), 27 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/pwm/imx-pwm.txt
>  create mode 100644 Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> 

Applied, thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] dt-bindings: pwm: Convert imx tpm pwm to json-schema
  2020-05-14  6:54 ` [PATCH 2/2] dt-bindings: pwm: Convert imx tpm " Anson Huang
  2020-05-18  6:00   ` Aisheng Dong
@ 2020-05-28  2:47   ` Rob Herring
  1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-05-28  2:47 UTC (permalink / raw)
  To: Anson Huang
  Cc: u.kleine-koenig, shawnguo, linux-kernel, p.zabel, Linux-imx,
	robh+dt, festevam, linux-arm-kernel, kernel, linux-pwm, s.hauer,
	thierry.reding, devicetree

On Thu, 14 May 2020 14:54:19 +0800, Anson Huang wrote:
> Convert the imx tpm pwm binding to DT schema format using json-schema.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  .../devicetree/bindings/pwm/imx-tpm-pwm.txt        | 22 ---------
>  .../devicetree/bindings/pwm/imx-tpm-pwm.yaml       | 55 ++++++++++++++++++++++
>  2 files changed, 55 insertions(+), 22 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/pwm/imx-tpm-pwm.txt
>  create mode 100644 Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml
> 

Applied, thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-28  2:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14  6:54 [PATCH 1/2] dt-bindings: pwm: Convert imx pwm to json-schema Anson Huang
2020-05-14  6:54 ` [PATCH 2/2] dt-bindings: pwm: Convert imx tpm " Anson Huang
2020-05-18  6:00   ` Aisheng Dong
2020-05-28  2:47   ` Rob Herring
2020-05-18  5:58 ` [PATCH 1/2] dt-bindings: pwm: Convert imx " Aisheng Dong
2020-05-28  2:47   ` Rob Herring
2020-05-28  2:47 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).