Message ID | 20230123151302.368277-11-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1661274wrn; Mon, 23 Jan 2023 07:15:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXvDHk5TWFfcFmZysFdlPfBwVbPki3Cr0tp09efFptpeZL1J1MJLAPUwN2Vs7CoGehCOrEf3 X-Received: by 2002:aa7:9544:0:b0:58d:c610:6d35 with SMTP id w4-20020aa79544000000b0058dc6106d35mr23821689pfq.30.1674486901105; Mon, 23 Jan 2023 07:15:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674486901; cv=none; d=google.com; s=arc-20160816; b=MeVsiL3EsZDSDwANB28gXmKrDn9NN6kw7XPyhbAxyi4Wm2AXn9fjzOe55428zUQxb4 CrcdoKWyPoGNih10wwp3XDDFmwybQO1eOPwMf7QQyBjceSOxIXBLhfjfmmSd4JZaFz24 1mqP5hSFIYz0os7qyU9sDVaqhK/QF4g61Adq89jipiIglBsbCOLBkHr4kJ3bR1cZDywu +s6RkrpOSV/N6vvfPiRFbvvMQBewfEPs/wOSGhr4ANVu060+jr+KcsWKGVKqnWYTadCb QJYJWxDMq6Fcpzy7GFIJGZ5nXeO16QmhumNtTufU+wlDRoh/zi3zdXbJPwkfq/OGCu/m Gbcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PQrsbaoWMRqz/6zcr+gxlvsS+z2BwQ6sf3IkSGfrHIg=; b=zB4nQeX1vamW7bKOVDhVttk5Gl/RAAChUZ7ojtMaYVxL0HK/Wq6rN/7qI3zH038Xfy tS7U68SaYcjGVryUD4prOZBHeaqX4bIVITu8/TpWG5HIVy17sZMQpjyvhGqkvUWIrpIm Evpus40G4pt8RgWTn1t/3GpS1RUFlAWLW+Dvjy1hKtZS+5h+/dIf5luuVTdcq6SUv566 l/R9VNp8ExxOYPEY6HXlx+5Hfsd6u/Bc2o29kse75tac9lVTBLisaiCVuedu/Nw7BC0E nj7DhqfvgzDalC7tcezR6agVg+2WIhko13DR+fzPeIF+4aR8ixaIaqgv6B315+AtajXi /hZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DrZkJqf8; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w186-20020a6230c3000000b0058954c5a9a3si39334914pfw.121.2023.01.23.07.14.48; Mon, 23 Jan 2023 07:15:01 -0800 (PST) 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=@linaro.org header.s=google header.b=DrZkJqf8; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232494AbjAWPO1 (ORCPT <rfc822;liningstudo@gmail.com> + 99 others); Mon, 23 Jan 2023 10:14:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232449AbjAWPOF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 23 Jan 2023 10:14:05 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FA3A2917D for <linux-kernel@vger.kernel.org>; Mon, 23 Jan 2023 07:13:35 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id q5so6463705wrv.0 for <linux-kernel@vger.kernel.org>; Mon, 23 Jan 2023 07:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PQrsbaoWMRqz/6zcr+gxlvsS+z2BwQ6sf3IkSGfrHIg=; b=DrZkJqf8Lx/ikr2BhspNugPkwAK39BkOWz2sYI9KIsWgPfrmz3MxCIAlThf9eQMRoU 0jFC/YJ/sI0ZvwfIPyUKQOcYKAjNBgQZ903EVlEmHIJERffJSuQbWtWQOQplD4P6xzXT vjbQhlypnRB9rEdBr17ZgPxaIuIfR28dVJhRctEPx+xF8mt3sF7Xn9NHD/tFZthCCP3J N9cjFd21wGYV/rg0RlP7ggPd5GuxBxGv3h40ZGahorcp0z8jWPFrnpEgdSfOiixLtos9 M3vRGjxu6YizEJCkQmiusSvfeahaywTgfrHTZygFlKjEDsvmsqohvwqFgejQlMBcqr7Z 7qeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PQrsbaoWMRqz/6zcr+gxlvsS+z2BwQ6sf3IkSGfrHIg=; b=aL+EwMZ3V4EUjvFccZ+oiisEVZ1YsMCEhsubZWVHnhSYCP+vReWGOWWMnAFkn2XBik mjmoN266KPW0zlDcMcNb/FVjEKYGEJAk95BEWLm8S1HSyEEVVKQh7iuKbIRq524QZz/B X1V9iHMNymbmu2iParaqbfwOwNWumx9wUuukAg7cvVqemik6gwRNq3UyYvPgTnWAODeW mlLeGZRkNKaEIkQue99kcxupMcGqnsI/jW8ccdIXPoVEOI0+PWxVPCi0VM7NKLnrHOMT q214ibFh84Vz6gAhUOr9uCrV5Fm3mvIeBBj/PQcCZVoIkK3GZ+vlx4vRVNq5PKtXgP2n iC0Q== X-Gm-Message-State: AFqh2kpsXWq7Lk9ER96rCFb06sIJB4f1toEMb5omdhblIo1JQq5cOpyr it77LX73k7hfkepmpA40vv+eSA== X-Received: by 2002:adf:f9ca:0:b0:2bf:9424:c163 with SMTP id w10-20020adff9ca000000b002bf9424c163mr9542845wrr.57.1674486815043; Mon, 23 Jan 2023 07:13:35 -0800 (PST) Received: from krzk-bin.. ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id n1-20020a5d67c1000000b002bc7f64efa3sm34737922wrw.29.2023.01.23.07.13.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 07:13:34 -0800 (PST) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Neil Armstrong <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, Jerome Brunet <jbrunet@baylibre.com>, Martin Blumenstingl <martin.blumenstingl@googlemail.com>, 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>, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Lubomir Rintel <lkundrak@v3.sk>, - <devicetree@vger.kernel.org>, Vignesh Raghavendra <vigneshr@ti.com>, Michal Simek <michal.simek@xilinx.com>, Chester Lin <clin@suse.com>, Fugang Duan <fugang.duan@nxp.com>, Magnus Damm <magnus.damm@gmail.com>, Geert Uytterhoeven <geert+renesas@glider.be>, Pragnesh Patel <pragnesh.patel@sifive.com>, Le Ray <erwan.leray@foss.st.com>, Peter Korsgaard <jacmet@sunsite.dk>, Tomer Maimon <tmaimon77@gmail.com>, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Subject: [PATCH 11/13] dt-bindings: serial: restrict possible child node names Date: Mon, 23 Jan 2023 16:13:00 +0100 Message-Id: <20230123151302.368277-11-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230123151302.368277-1-krzysztof.kozlowski@linaro.org> References: <20230123151302.368277-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1755826776822147120?= X-GMAIL-MSGID: =?utf-8?q?1755826776822147120?= |
Series |
[01/13] dt-bindings: serial: amlogic,meson-uart: allow other serial properties
|
|
Commit Message
Krzysztof Kozlowski
Jan. 23, 2023, 3:13 p.m. UTC
The re-usable serial.yaml schema matches every property with ".*"
pattern, thus any other schema referencing it will not report unknown
(unevaluated) properties. This hides several wrong properties. It is
a limitation of dtschema, thus provide a simple workaround: expect
children to be only of few names matching upstream usage (Bluetooth,
GNSS, GPS and MCU).
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/serial/serial.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Mon, 23 Jan 2023 16:13:00 +0100, Krzysztof Kozlowski wrote: > The re-usable serial.yaml schema matches every property with ".*" > pattern, thus any other schema referencing it will not report unknown > (unevaluated) properties. This hides several wrong properties. It is > a limitation of dtschema, thus provide a simple workaround: expect > children to be only of few names matching upstream usage (Bluetooth, > GNSS, GPS and MCU). > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > Documentation/devicetree/bindings/serial/serial.yaml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > 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/bus/intel,ixp4xx-expansion-bus-controller.example.dtb: serial@1,0: Unevaluated properties are not allowed ('intel,ixp4xx-eb-byte-access', 'intel,ixp4xx-eb-cycle-type', 'intel,ixp4xx-eb-t3', 'intel,ixp4xx-eb-write-enable' were unexpected) From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/serial/8250.yaml doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230123151302.368277-11-krzysztof.kozlowski@linaro.org 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 24/01/2023 00:05, Rob Herring wrote: > > On Mon, 23 Jan 2023 16:13:00 +0100, Krzysztof Kozlowski wrote: >> The re-usable serial.yaml schema matches every property with ".*" >> pattern, thus any other schema referencing it will not report unknown >> (unevaluated) properties. This hides several wrong properties. It is >> a limitation of dtschema, thus provide a simple workaround: expect >> children to be only of few names matching upstream usage (Bluetooth, >> GNSS, GPS and MCU). >> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> --- >> Documentation/devicetree/bindings/serial/serial.yaml | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> > > 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/bus/intel,ixp4xx-expansion-bus-controller.example.dtb: serial@1,0: Unevaluated properties are not allowed ('intel,ixp4xx-eb-byte-access', 'intel,ixp4xx-eb-cycle-type', 'intel,ixp4xx-eb-t3', 'intel,ixp4xx-eb-write-enable' were unexpected) > From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/serial/8250.yaml Did I just forgot to test all the bindings (except the changed ones)? It seems so, therefoer note to myself: Please run `make dt_binding_check` (see Documentation/devicetree/bindings/writing-schema.rst for instructions). :) Best regards, Krzysztof
On 24/01/2023 00:05, Rob Herring wrote: > > On Mon, 23 Jan 2023 16:13:00 +0100, Krzysztof Kozlowski wrote: >> The re-usable serial.yaml schema matches every property with ".*" >> pattern, thus any other schema referencing it will not report unknown >> (unevaluated) properties. This hides several wrong properties. It is >> a limitation of dtschema, thus provide a simple workaround: expect >> children to be only of few names matching upstream usage (Bluetooth, >> GNSS, GPS and MCU). >> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> --- >> Documentation/devicetree/bindings/serial/serial.yaml | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> > > 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/bus/intel,ixp4xx-expansion-bus-controller.example.dtb: serial@1,0: Unevaluated properties are not allowed ('intel,ixp4xx-eb-byte-access', 'intel,ixp4xx-eb-cycle-type', 'intel,ixp4xx-eb-t3', 'intel,ixp4xx-eb-write-enable' were unexpected) > From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/serial/8250.yaml Eh, this is not trivial to solve. The "intel,ixp4xx-expansion-bus-controller.yaml" bindings add properties to children nodes, just like spi-peripheral-props: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml?h=v6.2-rc5#n147 Any node can be there: 1. serial, which was broken since beginning but errors not visible, 2. flash, which work fine just because mtd-physmap.yaml allows it, 3. more? Existing DTS of this ixp4xx controller have different nodes, for example: flash, shared-dma-pool, ns8250, arcom,vulcan-gpio, maxim,max6369: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/intel-ixp42x-arcom-vulcan.dts?h=v6.2-rc5#n40 Probably we need expansion-bus-controller-peripheral-props.yaml and include it in every possible child. Does it sound reasonable? Best regards, Krzysztof
On Tue, Jan 24, 2023 at 3:05 AM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 24/01/2023 00:05, Rob Herring wrote: > > > > On Mon, 23 Jan 2023 16:13:00 +0100, Krzysztof Kozlowski wrote: > >> The re-usable serial.yaml schema matches every property with ".*" > >> pattern, thus any other schema referencing it will not report unknown > >> (unevaluated) properties. This hides several wrong properties. It is > >> a limitation of dtschema, thus provide a simple workaround: expect > >> children to be only of few names matching upstream usage (Bluetooth, > >> GNSS, GPS and MCU). > >> > >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > >> --- > >> Documentation/devicetree/bindings/serial/serial.yaml | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > > > > 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/bus/intel,ixp4xx-expansion-bus-controller.example.dtb: serial@1,0: Unevaluated properties are not allowed ('intel,ixp4xx-eb-byte-access', 'intel,ixp4xx-eb-cycle-type', 'intel,ixp4xx-eb-t3', 'intel,ixp4xx-eb-write-enable' were unexpected) > > From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/serial/8250.yaml > > Eh, this is not trivial to solve. The > "intel,ixp4xx-expansion-bus-controller.yaml" bindings add properties to > children nodes, just like spi-peripheral-props: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/bus/intel,ixp4xx-expansion-bus-controller.yaml?h=v6.2-rc5#n147 Yep, those properties probably need to go into mc-peripheral-props.yaml. > Any node can be there: > 1. serial, which was broken since beginning but errors not visible, 8250 only in all likelyhood. > 2. flash, which work fine just because mtd-physmap.yaml allows it, > 3. more? I guess it is *only* external parallel bus devices... > > Existing DTS of this ixp4xx controller have different nodes, for example: > flash, shared-dma-pool, ns8250, arcom,vulcan-gpio, maxim,max6369: 'shared-dma-pool' is odd. So is max6369. Looks like that h/w was creatively attached. > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/intel-ixp42x-arcom-vulcan.dts?h=v6.2-rc5#n40 > > Probably we need expansion-bus-controller-peripheral-props.yaml and > include it in every possible child. Does it sound reasonable? What's the difference to mc-peripheral-props.yaml? Honestly, this stuff is somewhat rare that I'd rather worry about it later. Maybe ixp4xx will be removed by then... We could just comment out the problematic parts of the example for now. Rob
diff --git a/Documentation/devicetree/bindings/serial/serial.yaml b/Documentation/devicetree/bindings/serial/serial.yaml index 11e822bf09e2..21992e9a3c2b 100644 --- a/Documentation/devicetree/bindings/serial/serial.yaml +++ b/Documentation/devicetree/bindings/serial/serial.yaml @@ -96,7 +96,7 @@ then: rts-gpios: false patternProperties: - ".*": + "^bluetooth|gnss|gps|mcu$": if: type: object then: