Message ID | 20230419223323.20384-3-jm@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp714138vqo; Wed, 19 Apr 2023 15:54:56 -0700 (PDT) X-Google-Smtp-Source: AKy350aeSbI3Rp1PzSx7xtpdmcfIrjznPjajy4DAwB/5CQ8pdckvi3wN+IE325qU0z5yHWJKnykI X-Received: by 2002:a05:6a20:94c4:b0:ef:d242:34f6 with SMTP id ht4-20020a056a2094c400b000efd24234f6mr56792pzb.56.1681944895975; Wed, 19 Apr 2023 15:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681944895; cv=none; d=google.com; s=arc-20160816; b=l1GTsXZW3kid7H7ofukXMAr7R5ydw+TSMxt4ayYDHua808MRKUkNDdZJhJDFEq0eFw qIF1AM7BQfID0sU4S9okyqZp26GE21bLhJukfVIEjIoQY6dwuqKpVwgr/erYTtil1QgN lHYT2UvEwt8rVdv2HJRN2JCQg0kThbNkwktEebmn4Pzk7Fu9OtJbODaJrraUvipIpqep /CcN9+vXa/W4A+AqI65d7BHbRJtNAExfZFinpOENVK7wMqEyVGPuNFmM36w5k2i7ggA7 E7EGeEM7dMitSx0fKmmjo0SNAiY/DbMMO0FjMOZxeuoQ2A7/xwOHce83zBEIzi6H72g1 Cgrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=jizcdNC77GvXvWzncEmB120DNSJSaKOeMe67Df/6+1M=; b=w91fsFaX68/tRATr0RCrUX7qDcitTdlWFvkvhQmmepOg9tHWExZilXdQr0mBEjjiNj oTIDpFE5SkGzr7EXoQzsNSU6W55nj/9UN2YCC3/QsatrS5kQg4/FDUlsaXGssWwFZEC0 uOXeSitK+2nCxhnXzDRyyU8Nyudtp1Co3pdoUb3Vfgk8EfN5Slk24orL5drKit1p9GVt 55/tSvNDbIXVvNsOEJS6ZDC9+I23ahROo/5FDyiSCDwhLJ++lXAwd2u4MWvWWNHE8Wny flD5ctrE7ijfLkix8j3p2dqcg5vNYvjaEDHvk+bwITJpPQ2wEH/S4i18qif4Aw1glEjh 7Ftw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=c5TZhORe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 22-20020a630216000000b0051423ad5cdfsi17452056pgc.621.2023.04.19.15.54.42; Wed, 19 Apr 2023 15:54:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=c5TZhORe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232404AbjDSWwH (ORCPT <rfc822;peter110.wang@gmail.com> + 99 others); Wed, 19 Apr 2023 18:52:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232157AbjDSWwE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Apr 2023 18:52:04 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1663130DD; Wed, 19 Apr 2023 15:52:02 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33JMXOS0078076; Wed, 19 Apr 2023 17:33:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681943604; bh=jizcdNC77GvXvWzncEmB120DNSJSaKOeMe67Df/6+1M=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=c5TZhOReMiMkxMEcDaiH0P49R6BAhXFSBxbKe0b/1qGSgRZSQtQbpSzGk1QiotxY0 kbRn5pRvLzlhBRXhedhuWeUl2n1bRGNzwuXVGA4UBPG4XOsSxfNgq3AJVmgT7toQCe SjGtyMTYjgRLgdgm5+oPrKP1Uv4wyCNoorvTmz9I= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33JMXO9p059406 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 19 Apr 2023 17:33:24 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 19 Apr 2023 17:33:23 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE114.ent.ti.com (157.170.170.25) 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; Wed, 19 Apr 2023 17:33:24 -0500 Received: from a0498204.dal.design.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33JMXNLX015736; Wed, 19 Apr 2023 17:33:23 -0500 From: Judith Mendez <jm@ti.com> To: Chandrasekar Ramakrishnan <rcsekar@samsung.com>, Wolfgang Grandegger <wg@grandegger.com>, Marc Kleine-Budde <mkl@pengutronix.de> CC: "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, 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>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Oliver Hartkopp <socketcan@hartkopp.net>, Judith Mendez <jm@ti.com>, <linux-arm-kernel@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-can@vger.kernel.org>, <netdev@vger.kernel.org> Subject: [PATCH 2/4] dt-bindings: net: can: Make interrupt attributes optional for MCAN Date: Wed, 19 Apr 2023 17:33:21 -0500 Message-ID: <20230419223323.20384-3-jm@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230419223323.20384-1-jm@ti.com> References: <20230419223323.20384-1-jm@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763647051169609275?= X-GMAIL-MSGID: =?utf-8?q?1763647051169609275?= |
Series |
Enable multiple MCAN on AM62x
|
|
Commit Message
Judith Mendez
April 19, 2023, 10:33 p.m. UTC
For MCAN, remove interrupt and interrupt names from the required
section.
On AM62x SoC, MCANs on MCU domain do not have hardware interrupt
routed to A53 Linux, instead they will use software interrupt
by hrtimer. Make interrupt attributes optional in MCAN node
by removing from required section.
Signed-off-by: Judith Mendez <jm@ti.com>
---
Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 2 --
1 file changed, 2 deletions(-)
Comments
On 19.04.2023 17:33:21, Judith Mendez wrote: > For MCAN, remove interrupt and interrupt names from the required > section. > > On AM62x SoC, MCANs on MCU domain do not have hardware interrupt > routed to A53 Linux, instead they will use software interrupt > by hrtimer. Make interrupt attributes optional in MCAN node > by removing from required section. > > Signed-off-by: Judith Mendez <jm@ti.com> This series basically adds polling support to the driver, which is needed due to HW limitations. The proposed logic in the driver is to use polling if platform_get_irq_byname() fails (due to whatever reason) use polling with a hard-coded interval. In the kernel I've found the following properties that describe the polling interval: bindings/input/input.yaml: | poll-interval: | description: Poll interval time in milliseconds. | $ref: /schemas/types.yaml#/definitions/uint32 bindings/thermal/thermal-zones.yaml: | polling-delay: | $ref: /schemas/types.yaml#/definitions/uint32 | description: | The maximum number of milliseconds to wait between polls when | checking this thermal zone. Setting this to 0 disables the polling | timers setup by the thermal framework and assumes that the thermal | sensors in this zone support interrupts. bindings/regulator/dlg,da9121.yaml | dlg,irq-polling-delay-passive-ms: | minimum: 1000 | maximum: 10000 | description: | | Specify the polling period, measured in milliseconds, between interrupt status | update checks. Range 1000-10000 ms. From my point of view the poll-interval from the input subsystem looks good. Any objections to use it to specify the polling interval for IRQ-less devices, too? > --- > Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 2 -- > 1 file changed, 2 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..43f1aa9addc0 100644 > --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml > +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml > @@ -122,8 +122,6 @@ required: > - compatible > - reg > - reg-names > - - interrupts > - - interrupt-names > - clocks > - clock-names > - bosch,mram-cfg > -- > 2.17.1 > > regards, Marc
On 20/04/2023 12:01, Marc Kleine-Budde wrote: > On 19.04.2023 17:33:21, Judith Mendez wrote: >> For MCAN, remove interrupt and interrupt names from the required >> section. >> >> On AM62x SoC, MCANs on MCU domain do not have hardware interrupt >> routed to A53 Linux, instead they will use software interrupt >> by hrtimer. Make interrupt attributes optional in MCAN node >> by removing from required section. >> >> Signed-off-by: Judith Mendez <jm@ti.com> > > This series basically adds polling support to the driver, which is > needed due to HW limitations. > > The proposed logic in the driver is to use polling if > platform_get_irq_byname() fails (due to whatever reason) use polling > with a hard-coded interval. > > In the kernel I've found the following properties that describe the > polling interval: > > bindings/input/input.yaml: > > | poll-interval: > | description: Poll interval time in milliseconds. > | $ref: /schemas/types.yaml#/definitions/uint32 > > > bindings/thermal/thermal-zones.yaml: > > | polling-delay: > | $ref: /schemas/types.yaml#/definitions/uint32 > | description: > | The maximum number of milliseconds to wait between polls when > | checking this thermal zone. Setting this to 0 disables the polling > | timers setup by the thermal framework and assumes that the thermal > | sensors in this zone support interrupts. > > bindings/regulator/dlg,da9121.yaml > > | dlg,irq-polling-delay-passive-ms: > | minimum: 1000 > | maximum: 10000 > | description: | > | Specify the polling period, measured in milliseconds, between interrupt status > | update checks. Range 1000-10000 ms. > > From my point of view the poll-interval from the input subsystem looks > good. Any objections to use it to specify the polling interval for > IRQ-less devices, too? Better to skip it, if delay can be figured out by driver based on something else (e.g. clocks). Best regards, Krzysztof
On 20/04/2023 00:33, Judith Mendez wrote: > For MCAN, remove interrupt and interrupt names from the required > section. > > On AM62x SoC, MCANs on MCU domain do not have hardware interrupt > routed to A53 Linux, instead they will use software interrupt > by hrtimer. Make interrupt attributes optional in MCAN node > by removing from required section. > > Signed-off-by: Judith Mendez <jm@ti.com> > --- Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml index 67879aab623b..43f1aa9addc0 100644 --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml @@ -122,8 +122,6 @@ required: - compatible - reg - reg-names - - interrupts - - interrupt-names - clocks - clock-names - bosch,mram-cfg