From patchwork Mon Apr 24 19:54:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judith Mendez X-Patchwork-Id: 13222527 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13394C77B61 for ; Mon, 24 Apr 2023 19:55:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NokYvf6sBybKRJc7kXraq0PcB4KqoYtN9uZwbvusvDU=; b=LUnIAheuAiwKTt mtaQ7QZ5esxsqoKMnie1RuBnBASDc5aA96n5gN7lNjzE0ZF/+OVVhBVkXbk/TFsAcVwPWUJSjfRZN 6GAimY0gwWoqKNK8BdxFM0p8eRwFBFHvoEjL5XkibuT8xmKGYeQJ3yhLOQIdwdY81FlCvBWaittmM h5DrpGxuMWfuAsB+Iplu2Du79hUhAmZHwiIlm5Un/gSHWuHJ5IXg5i8uDKGbMCKkE1uvX17jX3INn 3pMAZqJWQVCt7nYu1/2gJGpBwMil2X6AOZKVoiM1J4gc3F7ltnQdEyPhG500Y3ZYwHHbb45zbqyhe Hu/FCtHDR3dy4GJIC7OA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pr2GU-00H5Ll-0U; Mon, 24 Apr 2023 19:54:22 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pr2GR-00H5Jx-05 for linux-arm-kernel@lists.infradead.org; Mon, 24 Apr 2023 19:54:20 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33OJs3df068406; Mon, 24 Apr 2023 14:54:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1682366043; bh=HXoTce7Nwgo2KT7VY+u4Om0OtwHAz8GCc3bXfUvbejA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Y4RIo1i2EHdy2He2M003WvCMF39TXQ/F+wX0c9ELEhyDR6lwZyaOCk1PNobmaD1N9 xlR0RxOGp9kJ3weRcwN6Dmiu37pfvISn5ujwi5d8r6vcMraL33V16KbbfSSSdbbVFR CGQFdtPCfd94mfXfP4HbCrlzOFlyWbQ3Kp1v3t98= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33OJs3xr057909 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 24 Apr 2023 14:54:03 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 24 Apr 2023 14:54:02 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 24 Apr 2023 14:54:02 -0500 Received: from a0498204.dal.design.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33OJs23H009344; Mon, 24 Apr 2023 14:54:02 -0500 From: Judith Mendez To: Chandrasekar Ramakrishnan , Wolfgang Grandegger , Marc Kleine-Budde , Krzysztof Kozlowski CC: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , , , , Schuyler Patton , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , , , Oliver Hartkopp Subject: [PATCH v2 2/4] dt-bindings: net: can: Add poll-interval for MCAN Date: Mon, 24 Apr 2023 14:54:00 -0500 Message-ID: <20230424195402.516-3-jm@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230424195402.516-1-jm@ti.com> References: <20230424195402.516-1-jm@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230424_125419_144421_08A66050 X-CRM114-Status: GOOD ( 10.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 can@20e8000 { @@ -149,4 +151,22 @@ examples: }; }; +example with timer polling: + - | + #include + 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>; + }; + }; + ...