Message ID | 20230424195402.516-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 b10csp2981772vqo; Mon, 24 Apr 2023 13:11:59 -0700 (PDT) X-Google-Smtp-Source: AKy350Z1758fOdLA5TnXJ0rON6lkCe6xpKKVMTPGVJXNawU3dXV91ANa24j+dZfUlflB2BlNaa/M X-Received: by 2002:a17:90b:46d3:b0:23d:bbcb:c97f with SMTP id jx19-20020a17090b46d300b0023dbbcbc97fmr14537844pjb.1.1682367119284; Mon, 24 Apr 2023 13:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682367119; cv=none; d=google.com; s=arc-20160816; b=frcConseRfplIYDJLkTqf9IdL/Go3p8wDfmqTJ1/SGOWApbFj60R59I8FVskMSn4+L mU7PoMoCZIkb7CqPbMtCG/+ltA9sabF7rJfVQye5muRY8tbZeJ8opQkDFG9VaPHIZJ0q DTannWn/8pmFq7C3r/olOOQoF5gdRZsY2obX3FrVcts6gL2rY0ggcHPS1cO5PLcPMU+2 26vdGEB6ga3LFNPL9p28BtKBvjZR8SNdNtGaeKXl+4tJdlR44i2z7cAApTnLwJOs7NZG 0rQ3pLgaRJiSBx4CbghMjHhVB7O01fU/1BAD1KYSs1X9bnNaAVs3QiKjw3qXIZSAaCST 41Gw== 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=HXoTce7Nwgo2KT7VY+u4Om0OtwHAz8GCc3bXfUvbejA=; b=to+zHKXgcvw4cwbki7SCmxbh23IXwaNfnA8qUo29clWy+dtLZJ6mxemqzFB9u081Mf V1DYHoNmnaazt1kbW8rzMC0hCPv/iuIs4lQqQrOGwdV5kA/sOBlL3D1LjNlbVKHZdh18 6xD0cGgnSYDXiosX4xJv/rXzVC43pp7hYWcsKwiF18u0fXiRo6kQb18KqvbUyueVEAfa EYyZniP3K54ud9n9whTWJA5EwGw18FNdGSKg+2D7Bvxx+P6aM/BLQCUNk1N7lrQmSx0m Oss0nYHzG8W//jd/JUmzZuAa+jFpjt6gQuueeI0A8br0jTWJpJG8Ny/XoJsP3nw3cg0o Y4lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Y4RIo1i2; 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 lx17-20020a17090b4b1100b00233e301c780si15812571pjb.31.2023.04.24.13.11.37; Mon, 24 Apr 2023 13:11:59 -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=Y4RIo1i2; 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 S232839AbjDXTyg (ORCPT <rfc822;fengqi706@gmail.com> + 99 others); Mon, 24 Apr 2023 15:54:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232796AbjDXTyb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Apr 2023 15:54:31 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D45165FE1; Mon, 24 Apr 2023 12:54:29 -0700 (PDT) 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 <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 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 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.6 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 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?1764089784455102772?= X-GMAIL-MSGID: =?utf-8?q?1764089784455102772?= |
Series |
Enable multiple MCAN on AM62x
|
|
Commit Message
Judith Mendez
April 24, 2023, 7:54 p.m. UTC
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(-)
Comments
On 24.04.2023 14:54:00, Judith Mendez wrote: > 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> The bindings update should go in before the patch. > --- > 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. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ That's not what the code does. > + > clocks: > items: > - description: peripheral clock > @@ -122,15 +126,13 @@ required: > - compatible > - reg > - reg-names > - - interrupts > - - interrupt-names > - clocks > - clock-names > - bosch,mram-cfg Is it possible to specify that you either need "interrupts" and "interrupt-names" or "poll-interval"? > > 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 > > Marc
On Mon, 24 Apr 2023 14:54:00 -0500, Judith Mendez wrote: > 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(-) > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml: 'example with interrupts' is not one of ['$id', '$schema', 'title', 'description', 'examples', 'required', 'allOf', 'anyOf', 'oneOf', 'definitions', '$defs', 'additionalProperties', 'dependencies', 'dependentRequired', 'dependentSchemas', 'patternProperties', 'properties', 'not', 'if', 'then', 'else', 'unevaluatedProperties', 'deprecated', 'maintainers', 'select', '$ref'] from schema $id: http://devicetree.org/meta-schemas/base.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml: 'example with timer polling' is not one of ['$id', '$schema', 'title', 'description', 'examples', 'required', 'allOf', 'anyOf', 'oneOf', 'definitions', '$defs', 'additionalProperties', 'dependencies', 'dependentRequired', 'dependentSchemas', 'patternProperties', 'properties', 'not', 'if', 'then', 'else', 'unevaluatedProperties', 'deprecated', 'maintainers', 'select', '$ref'] from schema $id: http://devicetree.org/meta-schemas/base.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230424195402.516-3-jm@ti.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 14:54-20230424, Judith Mendez wrote: > 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: did you run dt_binding_check? make -j`nproc` ARCH=arm64 LLVM=1 dt_binding_check DT_CHECKER_FLAGS=-m DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/can/bosch,m_can.yaml tells me: LINT Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/net/can/bosch,m_can.example.dts CHKDT Documentation/devicetree/bindings/processed-schema.json /workdir/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml: 'example with interrupts' is not one of ['$id', '$schema', 'title', 'description', 'examples', 'required', 'allOf', 'anyOf', 'oneOf', 'definitions', '$defs', 'additionalProperties', 'dependencies', 'dependentRequired', 'dependentSchemas', 'patternProperties', 'properties', 'not', 'if', 'then', 'else', 'unevaluatedProperties', 'deprecated', 'maintainers', 'select', '$ref'] from schema $id: http://devicetree.org/meta-schemas/base.yaml# /workdir/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml: 'example with timer polling' is not one of ['$id', '$schema', 'title', 'description', 'examples', 'required', 'allOf', 'anyOf', 'oneOf', 'definitions', '$defs', 'additionalProperties', 'dependencies', 'dependentRequired', 'dependentSchemas', 'patternProperties', 'properties', 'not', 'if', 'then', 'else', 'unevaluatedProperties', 'deprecated', 'maintainers', 'select', '$ref'] from schema $id: http://devicetree.org/meta-schemas/base.yaml# > + - | > + #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 >
Hello Rob, On 4/24/2023 7:13 PM, Rob Herring wrote: > > On Mon, 24 Apr 2023 14:54:00 -0500, Judith Mendez wrote: >> 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(-) >> > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml: 'example with interrupts' is not one of ['$id', '$schema', 'title', 'description', 'examples', 'required', 'allOf', 'anyOf', 'oneOf', 'definitions', '$defs', 'additionalProperties', 'dependencies', 'dependentRequired', 'dependentSchemas', 'patternProperties', 'properties', 'not', 'if', 'then', 'else', 'unevaluatedProperties', 'deprecated', 'maintainers', 'select', '$ref'] > from schema $id: http://devicetree.org/meta-schemas/base.yaml# > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml: 'example with timer polling' is not one of ['$id', '$schema', 'title', 'description', 'examples', 'required', 'allOf', 'anyOf', 'oneOf', 'definitions', '$defs', 'additionalProperties', 'dependencies', 'dependentRequired', 'dependentSchemas', 'patternProperties', 'properties', 'not', 'if', 'then', 'else', 'unevaluatedProperties', 'deprecated', 'maintainers', 'select', '$ref'] > from schema $id: http://devicetree.org/meta-schemas/base.yaml# > > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230424195402.516-3-jm@ti.com > > The base for the series is generally the latest rc1. A different dependency > should be noted in *this* patch. > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure 'yamllint' is installed and dt-schema is up to > date: > > pip3 install dtschema --upgrade > > Please check and re-submit after running the above command yourself. Note > that DT_SCHEMA_FILES can be set to your schema file to speed up checking > your schema. However, it must be unset to test all examples with your schema. Thanks Rob, I was not getting the errors, but I have fixed now. Thanks. regards, Judith
On 28/04/2023 18:17, Mendez, Judith wrote: > Hello Rob, > > On 4/24/2023 7:13 PM, Rob Herring wrote: >> >> On Mon, 24 Apr 2023 14:54:00 -0500, Judith Mendez wrote: >>> 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(-) >>> >> >> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' >> on your patch (DT_CHECKER_FLAGS is new in v5.13): >> >> yamllint warnings/errors: >> >> dtschema/dtc warnings/errors: >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml: 'example with interrupts' is not one of ['$id', '$schema', 'title', 'description', 'examples', 'required', 'allOf', 'anyOf', 'oneOf', 'definitions', '$defs', 'additionalProperties', 'dependencies', 'dependentRequired', 'dependentSchemas', 'patternProperties', 'properties', 'not', 'if', 'then', 'else', 'unevaluatedProperties', 'deprecated', 'maintainers', 'select', '$ref'] >> from schema $id: http://devicetree.org/meta-schemas/base.yaml# >> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml: 'example with timer polling' is not one of ['$id', '$schema', 'title', 'description', 'examples', 'required', 'allOf', 'anyOf', 'oneOf', 'definitions', '$defs', 'additionalProperties', 'dependencies', 'dependentRequired', 'dependentSchemas', 'patternProperties', 'properties', 'not', 'if', 'then', 'else', 'unevaluatedProperties', 'deprecated', 'maintainers', 'select', '$ref'] >> from schema $id: http://devicetree.org/meta-schemas/base.yaml# >> >> doc reference errors (make refcheckdocs): >> >> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230424195402.516-3-jm@ti.com >> >> The base for the series is generally the latest rc1. A different dependency >> should be noted in *this* patch. >> >> If you already ran 'make dt_binding_check' and didn't see the above >> error(s), then make sure 'yamllint' is installed and dt-schema is up to >> date: >> >> pip3 install dtschema --upgrade >> >> Please check and re-submit after running the above command yourself. Note >> that DT_SCHEMA_FILES can be set to your schema file to speed up checking >> your schema. However, it must be unset to test all examples with your schema. > > Thanks Rob, I was not getting the errors, but I have fixed now. Thanks. There is no way your code have worked, so either you did not test it or your setup misses something. In both cases you would see errors, so please check what went wrong. Best regards, Krzysztof
Hello Krzysztof, On 5/1/2023 2:16 AM, Krzysztof Kozlowski wrote: > On 28/04/2023 18:17, Mendez, Judith wrote: >> Hello Rob, >> >> On 4/24/2023 7:13 PM, Rob Herring wrote: >>> >>> On Mon, 24 Apr 2023 14:54:00 -0500, Judith Mendez wrote: >>>> 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(-) >>>> >>> >>> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' >>> on your patch (DT_CHECKER_FLAGS is new in v5.13): >>> >>> yamllint warnings/errors: >>> >>> dtschema/dtc warnings/errors: >>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml: 'example with interrupts' is not one of ['$id', '$schema', 'title', 'description', 'examples', 'required', 'allOf', 'anyOf', 'oneOf', 'definitions', '$defs', 'additionalProperties', 'dependencies', 'dependentRequired', 'dependentSchemas', 'patternProperties', 'properties', 'not', 'if', 'then', 'else', 'unevaluatedProperties', 'deprecated', 'maintainers', 'select', '$ref'] >>> from schema $id: http://devicetree.org/meta-schemas/base.yaml# >>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml: 'example with timer polling' is not one of ['$id', '$schema', 'title', 'description', 'examples', 'required', 'allOf', 'anyOf', 'oneOf', 'definitions', '$defs', 'additionalProperties', 'dependencies', 'dependentRequired', 'dependentSchemas', 'patternProperties', 'properties', 'not', 'if', 'then', 'else', 'unevaluatedProperties', 'deprecated', 'maintainers', 'select', '$ref'] >>> from schema $id: http://devicetree.org/meta-schemas/base.yaml# >>> >>> doc reference errors (make refcheckdocs): >>> >>> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230424195402.516-3-jm@ti.com >>> >>> The base for the series is generally the latest rc1. A different dependency >>> should be noted in *this* patch. >>> >>> If you already ran 'make dt_binding_check' and didn't see the above >>> error(s), then make sure 'yamllint' is installed and dt-schema is up to >>> date: >>> >>> pip3 install dtschema --upgrade >>> >>> Please check and re-submit after running the above command yourself. Note >>> that DT_SCHEMA_FILES can be set to your schema file to speed up checking >>> your schema. However, it must be unset to test all examples with your schema. >> >> Thanks Rob, I was not getting the errors, but I have fixed now. Thanks. > > There is no way your code have worked, so either you did not test it or > your setup misses something. In both cases you would see errors, so > please check what went wrong. Will do, thanks for taking the time to check the patch for errors. regards, Judith
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>; + }; + }; + ...