netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Judith Mendez <jm@ti.com>
To: Chandrasekar Ramakrishnan <rcsekar@samsung.com>,
	Wolfgang Grandegger <wg@grandegger.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	<linux-can@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Schuyler Patton <spatton@ti.com>,
	Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
	Tero Kristo <kristo@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<devicetree@vger.kernel.org>,
	Oliver Hartkopp <socketcan@hartkopp.net>
Subject: [PATCH v2 2/4] dt-bindings: net: can: Add poll-interval for MCAN
Date: Mon, 24 Apr 2023 14:54:00 -0500	[thread overview]
Message-ID: <20230424195402.516-3-jm@ti.com> (raw)
In-Reply-To: <20230424195402.516-1-jm@ti.com>

On AM62x SoC, MCANs on MCU domain do not have hardware interrupt
routed to A53 Linux, instead they will use software interrupt by
hrtimer. To enable timer method, interrupts should be optional so
remove interrupts property from required section and introduce
poll-interval property.

Signed-off-by: Judith Mendez <jm@ti.com>
---
Changelog:
v2:
  1. Add poll-interval property to enable timer polling method
  2. Add example using poll-interval property
  
 .../bindings/net/can/bosch,m_can.yaml         | 26 ++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
index 67879aab623b..1c64c7a0c3df 100644
--- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
+++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
@@ -40,6 +40,10 @@ properties:
       - const: int1
     minItems: 1
 
+  poll-interval:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: Poll interval time in milliseconds.
+
   clocks:
     items:
       - description: peripheral clock
@@ -122,15 +126,13 @@ required:
   - compatible
   - reg
   - reg-names
-  - interrupts
-  - interrupt-names
   - clocks
   - clock-names
   - bosch,mram-cfg
 
 additionalProperties: false
 
-examples:
+example with interrupts:
   - |
     #include <dt-bindings/clock/imx6sx-clock.h>
     can@20e8000 {
@@ -149,4 +151,22 @@ examples:
       };
     };
 
+example with timer polling:
+  - |
+    #include <dt-bindings/clock/imx6sx-clock.h>
+    can@20e8000 {
+      compatible = "bosch,m_can";
+      reg = <0x020e8000 0x4000>, <0x02298000 0x4000>;
+      reg-names = "m_can", "message_ram";
+      poll-interval;
+      clocks = <&clks IMX6SX_CLK_CANFD>,
+               <&clks IMX6SX_CLK_CANFD>;
+      clock-names = "hclk", "cclk";
+      bosch,mram-cfg = <0x0 0 0 32 0 0 0 1>;
+
+      can-transceiver {
+        max-bitrate = <5000000>;
+      };
+    };
+
 ...
-- 
2.17.1


  parent reply	other threads:[~2023-04-24 19:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24 19:53 [PATCH v2 0/4] Enable multiple MCAN on AM62x Judith Mendez
2023-04-24 19:53 ` [PATCH v2 1/4] can: m_can: Add hrtimer to generate software interrupt Judith Mendez
2023-04-24 20:14   ` Marc Kleine-Budde
2023-04-26 16:11     ` Mendez, Judith
2023-04-26 17:47       ` Marc Kleine-Budde
2023-05-01 16:03   ` Simon Horman
2023-04-24 19:54 ` Judith Mendez [this message]
2023-04-24 20:17   ` [PATCH v2 2/4] dt-bindings: net: can: Add poll-interval for MCAN Marc Kleine-Budde
2023-04-25  0:13   ` Rob Herring
2023-04-28 16:17     ` Mendez, Judith
2023-05-01  7:16       ` Krzysztof Kozlowski
2023-05-01 15:52         ` Mendez, Judith
2023-04-25 12:32   ` Nishanth Menon
2023-04-24 19:54 ` [PATCH v2 3/4] DO_NOT_MERGE arm64: dts: ti: Add AM62x MCAN MAIN domain transceiver overlay Judith Mendez
2023-04-25 12:47   ` Nishanth Menon
2023-05-01 15:54     ` Mendez, Judith
2023-04-24 19:54 ` [PATCH v2 4/4] DO_NOT_MERGE arm64: dts: ti: Enable MCU MCANs for AM62x Judith Mendez

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=20230424195402.516-3-jm@ti.com \
    --to=jm@ti.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=kristo@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pabeni@redhat.com \
    --cc=rcsekar@samsung.com \
    --cc=robh+dt@kernel.org \
    --cc=socketcan@hartkopp.net \
    --cc=spatton@ti.com \
    --cc=vigneshr@ti.com \
    --cc=wg@grandegger.com \
    /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).