linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kane Jiang <jian.jiang@nxp.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Steve Longerbeam <slongerbeam@gmail.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org
Cc: Kane Jiang <jian.jiang@nxp.com>
Subject: [PATCH 3/3] Add i.MX8MM GPT input capture example.
Date: Thu, 10 Feb 2022 16:43:35 +0800	[thread overview]
Message-ID: <20220210084335.1979778-4-jian.jiang@nxp.com> (raw)
In-Reply-To: <20220210084335.1979778-1-jian.jiang@nxp.com>

Cause i.MX GPT dts example cannot match i.MX8 chip series.
So add NXP i.MX8MM chip GPT input capture function example
to yaml file.

Signed-off-by: Kane Jiang <jian.jiang@nxp.com>
---
 .../devicetree/bindings/timer/fsl,imxgpt.yaml | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
index a4f51f46b7a1..917c1d9516cc 100644
--- a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
+++ b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
@@ -58,6 +58,29 @@ required:
 
 additionalProperties: false
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: fsl,imx8mm-gpt
+    then:
+      properties:
+        reg:
+          maxItems: 2
+        interrupts:
+          maxItems: 2
+        clocks:
+          items:
+            - description: SoC GPT ipg clock
+            - description: SoC GPT per clock
+            - description: SoC GPT osc per clock
+        clock-names:
+          items:
+            - const: ipg
+            - const: per
+            - const: osc_per
+
 examples:
   - |
     #include <dt-bindings/clock/imx27-clock.h>
@@ -70,3 +93,28 @@ examples:
                  <&clks IMX27_CLK_PER1_GATE>;
         clock-names = "ipg", "per";
     };
+
+  - |
+    #include <dt-bindings/clock/imx8mm-clock.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    soc {
+      #address-cells = <2>;
+      #size-cells = <2>;
+
+      pinctrl_gpt_input_capture0: gptinputcapture0grp {
+        fsl,pins = <0x1CC 0x434 0x000 0x1 0x0		0xd6>;
+      };
+
+      gpt1: gpt@302d0000 {
+        compatible = "fsl,imx8mm-gpt";
+        reg = <0x0 0x302d0000 0x0 0x10000>;
+        interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&clk IMX8MM_CLK_GPT1_ROOT>,
+                 <&clk IMX8MM_CLK_GPT1_ROOT>,
+                 <&clk IMX8MM_CLK_GPT_3M>;
+        clock-names = "ipg", "per", "osc_per";
+        pinctrl-names = "default";
+        pinctrl-0 = <&pinctrl_gpt_input_capture0>;
+      };
+    };
-- 
2.25.1


  parent reply	other threads:[~2022-02-10  8:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10  8:43 [PATCH 0/3] About i.MX GPT input capture patches Kane Jiang
2022-02-10  8:43 ` [PATCH 1/3] This patch adds support for the input capture function in the i.MX GPT. Output compare and input capture functions are mixed in the same register block, so we need to modify the irq ack/enable/ disable primitives to not stomp on the other function Kane Jiang
2022-02-10  8:43 ` [PATCH 2/3] Change to cyclecounter for GPT input capture. Add support for i.MX8MM Kane Jiang
2022-02-10  8:43 ` Kane Jiang [this message]
2022-02-10 14:47   ` [PATCH 3/3] Add i.MX8MM GPT input capture example Rob Herring
2022-02-11  8:40     ` [EXT] " Kane Jiang
2022-02-17  0:24       ` 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=20220210084335.1979778-4-jian.jiang@nxp.com \
    --to=jian.jiang@nxp.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=slongerbeam@gmail.com \
    --cc=tglx@linutronix.de \
    /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 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).