Message ID | 20221025050355.3979380-4-colin.foster@in-advantage.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp811480wru; Mon, 24 Oct 2022 22:05:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5s/u8cWExgviD+s/L2Hrl4hyY1Ls/3i3Nl/YRm6LpnVtF6i+/krmEoKkm+VOrESc+QgNt7 X-Received: by 2002:a17:907:3f94:b0:78d:9d2f:3002 with SMTP id hr20-20020a1709073f9400b0078d9d2f3002mr30421277ejc.40.1666674352514; Mon, 24 Oct 2022 22:05:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666674352; cv=pass; d=google.com; s=arc-20160816; b=mz9HfPiWC95aWOKTNhG4hJLw/T0AOyVC9GOgQz+Qkp2bIjeA/HWAbjXBDgNeAOXUvt 5DFVAPiy22RG8wWGpmrzJ44h2wi6MB4jyNcDMTftMPhTvawl4PUEEPxwgfsAvkkIIqkS 4CehZHodO+tAAivgzwi/q9QIC9PsoRTDOyWDT3Z4J/CREUW091Db7H8YVKZAG5Jx4miT Evih4pv5N2G1Qc5UCbM7ki1FgpEJDKArNVXkMTRUqfXEGo26BAi7gD/MZqHrzhUuTWFy xuv+lDjnrpVJ2Gb6YeLIzxRzMO7NrV7diepATpgdYaBFtV9oITU6Puyz+azE2vHIuwpW R0EQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4/RMHuEdOnWkquNKOV+j+m2EXCnwMNaa0QcYRvNf6GY=; b=jD8wnkLXzqMT/HPRnZMLvzwc3jNnam+bh6os66kHNTA6HGTUo0udiCG5FsMKWbA8t2 tl3nhoWluoyiELbpLYoi1bsxACLMhf8yqMc2W8RJURe29EoEzhh68c2UyJzXy9zsOB+P +ZufX7c7Ksbg9b8TSkux6ls8Zr2KqNKrIZiHjfA5Xc4P44BTztP8swwsP1VGHMazstY6 Ufax3/dEnoDqDEuB3ATqkXTfSMEmvNASZ1CnqXawi7ntHm19AnE3QxyreJ8ZC8ETfKpY pj2k5lbtK6B/8IUUhJ4VrOo2dT7oUZ98FEAoto0ca1Df/wMPzdvzxWDM+UB1L4Dtz3xv 37iw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=DzI+Cb4X; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xg11-20020a170907320b00b007707f83375bsi1828637ejb.945.2022.10.24.22.05.28; Mon, 24 Oct 2022 22:05:52 -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=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=DzI+Cb4X; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230197AbiJYFEc (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Tue, 25 Oct 2022 01:04:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230168AbiJYFEW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Oct 2022 01:04:22 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2111.outbound.protection.outlook.com [40.107.92.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCFA210AC31; Mon, 24 Oct 2022 22:04:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fnMrKXBhiu5AucnP2TAqzB6aZrLfyd82gWgpvUt/o/aOxRGcq1w49WTMWi5jU5E3/njbJYGvJ0hnv14/RBdt9GaABK+SFNeqbbJnlFnGHEYZLFDltadEz4W6oStRbyuhmoFTxxuLd4SspSIeT8x+89sS3fTcXgaZ7AqDlVPZ9N91PE9B8Pmo7dJp5Hrn6WLUs5XfDFhPhVntMkotb9ZqIISIZ50lIjDFl21pR+Adl/dAGp5hD2OgVrln7ZSS6+1DIBZ9rJpXVHsmTCqq+mkjmkPfkKbiBqh29c3Ab3JIq43HzhfWTqSwYI9fOTidHj4kZNgt94Zeex1JA0TjPEnvbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4/RMHuEdOnWkquNKOV+j+m2EXCnwMNaa0QcYRvNf6GY=; b=oJItE8uLnzbyHcsb5qv6tLKIT6zocW6y4/iD4Lu3Pq3pu3lL52Fwvhpm64O8up97v4eegIUlWn5RwcXowPSv0BlskWC9tE4q6+XjgshEGCcEG/610CLwKw/sVgEdpG3/R1JHzgPWD+vGeRZEvpEZfjpU2axVR+a9M7MDFIs4LueLmIWj1AwJFbW20WyC1+4Einzvr4PexcKCeAkeCdmcwvV7EVBVrXUcyMPDsgF8ggjnJ588yG0+TBtPC5JtR5PefN08326idbDLbVAodaXTDY/aBOJ9s2/rv8l31pIk/Cv00a73EQv6JZ9TAcu8WghfRUAvB7CjCy372/18Lvbg1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4/RMHuEdOnWkquNKOV+j+m2EXCnwMNaa0QcYRvNf6GY=; b=DzI+Cb4XgwieFpT7k8821cCLRBq2azDo6mxX/dp5tKtpm4g+sDWk/DfOG+rCYK5jpEL08+jM2gi6hCX4LtFQVodmJ0xLdsWqGbOZ3Rgl5kQj7Op+g/eR36/te3uToj27p8nG4GwHaI3MhvraTt1cucJusSjV+i56DS+3tywYGpw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by DS7PR10MB4989.namprd10.prod.outlook.com (2603:10b6:5:3a9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.26; Tue, 25 Oct 2022 05:04:15 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::8eaf:edf0:dbd3:d492]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::8eaf:edf0:dbd3:d492%5]) with mapi id 15.20.5746.028; Tue, 25 Oct 2022 05:04:13 +0000 From: Colin Foster <colin.foster@in-advantage.com> To: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>, Claudiu Manoil <claudiu.manoil@nxp.com>, John Crispin <john@phrozen.org>, Sean Wang <sean.wang@mediatek.com>, DENG Qingfang <dqfext@gmail.com>, Landen Chao <Landen.Chao@mediatek.com>, =?utf-8?b?bsOnIMOcTkFM?= <arinc.unal@arinc9.com>, Matthias Brugger <matthias.bgg@gmail.com>, Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>, Eric Dumazet <edumazet@google.com>, "David S. Miller" <davem@davemloft.net>, Vladimir Oltean <olteanv@gmail.com>, Florian Fainelli <f.fainelli@gmail.com>, Vivien Didelot <vivien.didelot@gmail.com>, Andrew Lunn <andrew@lunn.ch>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Rob Herring <robh+dt@kernel.org>, Lee Jones <lee@kernel.org> Subject: [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml Date: Mon, 24 Oct 2022 22:03:51 -0700 Message-Id: <20221025050355.3979380-4-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221025050355.3979380-1-colin.foster@in-advantage.com> References: <20221025050355.3979380-1-colin.foster@in-advantage.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0189.namprd03.prod.outlook.com (2603:10b6:a03:2ef::14) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2351:EE_|DS7PR10MB4989:EE_ X-MS-Office365-Filtering-Correlation-Id: f41e7171-2bfc-4dd3-5ab8-08dab6465bbc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +g4d1+XvoSAN7GocGo4Q6gRCuQ9QaOPDywHXI1atvYt16kzYpRtrxBIx7REk266K/xexmwjh8tnKU+iIulAw7bTY82t1EwpgGwAADyKUym2mo8KQdxOdXRF+J6nISuqyDGcqjhhhBQF24je6nT5PKnI96hp4zMvekhLpIXunh3IKQvoK0jeFJSY7sTXMnTq8kNFIJE8P5VgSLg2E9fCSdeb4tdVu1gSFw2jv+DatjRP7lssxf7Hv0HtCY4duszn9TEahCbCz6yxfq/xo4xHaIXghzQU93X1g/x6m2tN6lB3IJMeb0PUx/5zslR6d0QF4615pvb/odsIDlXcwwJL5xt144i7CJ9j7lZct6kE8FZgESXUXcB0mU6Ah1b3rdoIHF7CUl9FmM1U14D2JJQoPVGJ3H4vTmjtPHXExMdasJp2V0euS40HzNBQVZITXHx767Cp7ZBTCnL3+8I7eNh0cyUBTjKOBbCCmYzzQKI/dRwH52GSpvVFsIxLjPaYRJVX1/YL4towlwOFUDA4+Ib6ls9qMMQe9qYSmNW7JLNw5cJC139fx1C2Ad3ASYBCi89BvB7LJh3NdJcBHZxSj/hPznIDk2aV9m+Q+LiPPHRxuns5yc8k3UTI4OL6f697bmuLRkUanNFxfGl6busK+xrruAYdayAF4BqgTCkzBSl9aOj4oQotzMnEE3+SX44tbhZ/JycFtQgjP2WAeC5AGSHBFK+uZUvecLl8qTNqSDb/3LSEqjiqOge81J4crd0yshD3UlO/67X6CeNWyVQS/B3GKXO2pRB6sW9WoIo3f9/VvTY4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(396003)(366004)(39840400004)(136003)(346002)(376002)(451199015)(316002)(52116002)(66476007)(6512007)(26005)(54906003)(44832011)(36756003)(7416002)(66556008)(4326008)(41300700001)(8676002)(66946007)(86362001)(8936002)(5660300002)(2906002)(6666004)(478600001)(6486002)(83380400001)(6506007)(1076003)(38100700002)(186003)(38350700002)(2616005)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 51mNRRb0jEHJNECohr14Ln0zaNDTn8GA8LoSMndYPio3kwBKV9WbagZFVaBP2nNYkTPiHZQP9j5mBVaKs1cw5liRv1jZXQvmuD1/3bcjdpDar4kpduIViGvPB7kEWmbhYSljinjY9r+yDFzkIxa4njI3PmQ9/1mC75TwrYy66rBMlZRD0YqQMNVmMIaAI0IfKyLhVgoBEnd8+YwILHMVWwha4/T4L3K5fZXljaZ+48y1L0UvDC1TywKfQPwu+K12Tws7U722G1HrRZyHp1nomJKZVJwu+Dpw7LQzdqgkQqJyy2uTORzvYgAtNz7RYfVJ1+CtRvzcDv1C0q1v1z7s6JMpz4L5vFxaCbpF8lcOe6jexySqxJ16/Dgr8eG1/9V0dpEBTfC0Y4cbSGP6F612OqOA8ln/CZyX9DI098l767VGlg12AU4qqyUYlf6VZ1jn06k6l0OjPibF5MDATuEF7Uhd3wum5w7P6Vjk8yNqHIyEEFPQ6X4yPcTFQf5h8VEE9YHMr0Uqkj5RSgsGhE+jv9fBk/L7VLhRHD3qbx6PBK4MZk9L7hlQ0HiJhw6cXwZ9/nwNuSHitw3LyLFiPa7PhrcQQIwl8OWWTrsgk+vKVgqDr6Xohan1q7wIJqbHBwDqjtulwOxKBir5RAj4OEkSZHVAMygmDxO+MArFY3kg3dvFLfxW7AjKwN+aqu1UqqFWAjF35PXU7qviCuQEgRR79y1zzwQ2q4cdva9qu8kdF20U5SnJsx92AkI+Xkj1YMMhcxG4Ov7uLvQZmNIrdnjQg8xVSqAYDTms8o5GZo+CRb5am/5WLiLl5Vy3fRO5d9I9hk8+Mewu/VTz/+oZNs3mMfECgP4CVOklQWk+ytWVz3aqCw1UsIgT522hy/jDGVIwpyAVfqT2I1X4jVND3bwHTBfPqNxoHAO+nTPSnJKLPSi7rQOwa1hsOm08KTGy7AMQNPRl2B/Y1qMsyQEkeq9cvrsQTDIuKeIo+hUpuh5lF0Z528lJbhBdQTQkQ6GLF3ClvX/qMuAruDNBs66rOmhpRpzc0pvMvNpgEDNo0FRsMIIHogTr1dtl6cpFdpms4ryhJ9uXKR8YHTIB+0ib7SgXe2Pvl3SNkAdp88QKOWq/E4GMPIr5WO1QXY+IEEvwrr/15sRhGtT2d1WBcxzqOMzerdcXvgv/8Gu6e65c9iGYp2SqY8ihrE8CjbjDEmkKnc61PWbztFcNYTpGKX9NC8NjTQwd48wy6aJYCeZoENgrsQ/UAZNrBIJK7JZ7LJeu05TQx6d1MUpJeJQVry6ILVo9bMPDgSbeXYjxBuYpCYLgMXHCoJQwXTCcHexmYNhElxDHtQ0gRCQXZMM05DDXjN+vXuFfHdLgr3JE75REPK5mbxcVqBE+zg1wg0Ba2Rr5OA0iM5Y5YKFQlcN0Qg8x8iq+P9aLHJpvanBNJgw++00t4+bIoki6idMrVz9CzrhjSP8jiSrv+fLQQqX4HKN9bzCYSxDxLZXKb73mrmqIJa6I84EV9UCgh0UVBqaXV9DrvJ/NcMZ0j1+/um1+WDTgHDLpJxkCs4o8+UwzS7FbvIndjHDSS0bxYDne5LttjyexSgs8WojEbAtGz64FpbixowYUvlflZWpgA4PZf3ZR5ZZdUpM= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: f41e7171-2bfc-4dd3-5ab8-08dab6465bbc X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2022 05:04:13.2039 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4kmGcE+0FCbbwC54B/0hCGXPoEjzevApyB4Wneg66YETrvlF99iLZeYPNuNfozUcMk2OuX+Ax85b51pHabDL/lY+HfUo+HKyEwdhch75ABA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB4989 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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?1747634725573630458?= X-GMAIL-MSGID: =?utf-8?q?1747634725573630458?= |
Series |
dt-binding preparation for ocelot switches
|
|
Commit Message
Colin Foster
Oct. 25, 2022, 5:03 a.m. UTC
The dsa.yaml binding contains duplicated bindings for address and size
cells, as well as the reference to dsa-port.yaml. Instead of duplicating
this information, remove the reference to dsa-port.yaml and include the
full reference to dsa.yaml.
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
---
.../devicetree/bindings/net/dsa/qca8k.yaml | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
Comments
On Mon, 24 Oct 2022 22:03:51 -0700, Colin Foster wrote: > The dsa.yaml binding contains duplicated bindings for address and size > cells, as well as the reference to dsa-port.yaml. Instead of duplicating > this information, remove the reference to dsa-port.yaml and include the > full reference to dsa.yaml. > > Signed-off-by: Colin Foster <colin.foster@in-advantage.com> > Suggested-by: Vladimir Oltean <olteanv@gmail.com> > --- > .../devicetree/bindings/net/dsa/qca8k.yaml | 14 +++----------- > 1 file changed, 3 insertions(+), 11 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/dsa/qca8k.example.dtb: switch@10: Unevaluated properties are not allowed ('#address-cells', '#size-cells' were unexpected) From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/qca8k.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/qca8k.example.dtb: switch@10: ports:port@6: Unevaluated properties are not allowed ('qca,sgmii-rxclk-falling-edge' was unexpected) From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/qca8k.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/qca8k.example.dtb: switch@10: Unevaluated properties are not allowed ('#address-cells', '#size-cells' were unexpected) From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/qca8k.yaml doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/patch/ This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1. 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.
On Mon, Oct 24, 2022 at 10:03:51PM -0700, Colin Foster wrote: > The dsa.yaml binding contains duplicated bindings for address and size > cells, as well as the reference to dsa-port.yaml. Instead of duplicating > this information, remove the reference to dsa-port.yaml and include the > full reference to dsa.yaml. I don't think this works without further restructuring. Essentially, 'unevaluatedProperties' on works on a single level. So every level has to define all properties at that level either directly in properties/patternProperties or within a $ref. See how graph.yaml is structured and referenced for an example how this has to work. > > Signed-off-by: Colin Foster <colin.foster@in-advantage.com> > Suggested-by: Vladimir Oltean <olteanv@gmail.com> > --- > .../devicetree/bindings/net/dsa/qca8k.yaml | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml > index 978162df51f7..7884f68cab73 100644 > --- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml > +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml > @@ -66,22 +66,16 @@ properties: > With the legacy mapping the reg corresponding to the internal > mdio is the switch reg with an offset of -1. > > +$ref: "dsa.yaml#" > + > patternProperties: > "^(ethernet-)?ports$": > type: object > - properties: > - '#address-cells': > - const: 1 > - '#size-cells': > - const: 0 > - > patternProperties: > "^(ethernet-)?port@[0-6]$": > type: object > description: Ethernet switch ports > > - $ref: dsa-port.yaml# > - > properties: > qca,sgmii-rxclk-falling-edge: > $ref: /schemas/types.yaml#/definitions/flag > @@ -104,8 +98,6 @@ patternProperties: > SGMII on the QCA8337, it is advised to set this unless a communication > issue is observed. > > - unevaluatedProperties: false > - Dropping this means any undefined properties in port nodes won't be an error. Once I fix all the issues related to these missing, there will be a meta-schema checking for this (this could be one I fixed already). > oneOf: > - required: > - ports > @@ -116,7 +108,7 @@ required: > - compatible > - reg > > -additionalProperties: true This should certainly be changed though. We should only have 'true' for incomplete collections of properties. IOW, for common bindings. > +unevaluatedProperties: false > > examples: > - | > -- > 2.25.1 > >
Hi Rob, On Tue, Oct 25, 2022 at 04:21:14PM -0500, Rob Herring wrote: > On Mon, Oct 24, 2022 at 10:03:51PM -0700, Colin Foster wrote: > > The dsa.yaml binding contains duplicated bindings for address and size > > cells, as well as the reference to dsa-port.yaml. Instead of duplicating > > this information, remove the reference to dsa-port.yaml and include the > > full reference to dsa.yaml. > > I don't think this works without further restructuring. Essentially, > 'unevaluatedProperties' on works on a single level. So every level has > to define all properties at that level either directly in > properties/patternProperties or within a $ref. > > See how graph.yaml is structured and referenced for an example how this > has to work. > > > @@ -104,8 +98,6 @@ patternProperties: > > SGMII on the QCA8337, it is advised to set this unless a communication > > issue is observed. > > > > - unevaluatedProperties: false > > - > > Dropping this means any undefined properties in port nodes won't be an > error. Once I fix all the issues related to these missing, there will be > a meta-schema checking for this (this could be one I fixed already). I may be misreading, but here, "unevaluatedProperties: false" from dsa.yaml (under patternProperties: "^(ethernet-)?port@[0-9]+$":) is on the same level as the "unevaluatedProperties: false" that Colin is deleting. In fact, I believe that it is precisely due to the "unevaluatedProperties: false" from dsa.yaml that this is causing a failure now: net/dsa/qca8k.example.dtb: switch@10: ports:port@6: Unevaluated properties are not allowed ('qca,sgmii-rxclk-falling-edge' was unexpected) Could you please explain why is the 'qca,sgmii-rxclk-falling-edge' property not evaluated from the perspective of dsa.yaml in the example? It's a head scratcher to me. May it have something to do with the fact that Colin's addition: $ref: "dsa.yaml#" is not expressed as: allOf: - $ref: "dsa.yaml#" ? If yes, can you explain exactly what is the difference with respect to unevaluatedProperties? > > oneOf: > > - required: > > - ports > > @@ -116,7 +108,7 @@ required: > > - compatible > > - reg > > > > -additionalProperties: true > > This should certainly be changed though. We should only have 'true' for > incomplete collections of properties. IOW, for common bindings. > > > +unevaluatedProperties: false
Hi Rob, On Tue, Oct 25, 2022 at 04:21:14PM -0500, Rob Herring wrote: > On Mon, Oct 24, 2022 at 10:03:51PM -0700, Colin Foster wrote: > > The dsa.yaml binding contains duplicated bindings for address and size > > cells, as well as the reference to dsa-port.yaml. Instead of duplicating > > this information, remove the reference to dsa-port.yaml and include the > > full reference to dsa.yaml. > > I don't think this works without further restructuring. Essentially, > 'unevaluatedProperties' on works on a single level. So every level has > to define all properties at that level either directly in > properties/patternProperties or within a $ref. > > See how graph.yaml is structured and referenced for an example how this > has to work. Thanks for pointing me to this. I didn't know about https://github.com/devicetree-org/dt-schema until now, so I'll take a look. I was primarily reading the schemas in net/dsa/* to try to get a full understanding of the DT schema nuances, so these types of nudges really help me. And I see that Vladimir Oltean has responded to other parts of the email, so I'll leave this as a simple "thanks" and keep that context going forward.
Hi Rob and Vladimir, On Thu, Oct 27, 2022 at 04:25:53AM +0300, Vladimir Oltean wrote: > Hi Rob, > > On Tue, Oct 25, 2022 at 04:21:14PM -0500, Rob Herring wrote: > > On Mon, Oct 24, 2022 at 10:03:51PM -0700, Colin Foster wrote: > > > The dsa.yaml binding contains duplicated bindings for address and size > > > cells, as well as the reference to dsa-port.yaml. Instead of duplicating > > > this information, remove the reference to dsa-port.yaml and include the > > > full reference to dsa.yaml. > > > > I don't think this works without further restructuring. Essentially, > > 'unevaluatedProperties' on works on a single level. So every level has > > to define all properties at that level either directly in > > properties/patternProperties or within a $ref. > > > > See how graph.yaml is structured and referenced for an example how this > > has to work. > > > > > @@ -104,8 +98,6 @@ patternProperties: > > > SGMII on the QCA8337, it is advised to set this unless a communication > > > issue is observed. > > > > > > - unevaluatedProperties: false > > > - > > > > Dropping this means any undefined properties in port nodes won't be an > > error. Once I fix all the issues related to these missing, there will be > > a meta-schema checking for this (this could be one I fixed already). > > I may be misreading, but here, "unevaluatedProperties: false" from dsa.yaml > (under patternProperties: "^(ethernet-)?port@[0-9]+$":) is on the same > level as the "unevaluatedProperties: false" that Colin is deleting. > > In fact, I believe that it is precisely due to the "unevaluatedProperties: false" > from dsa.yaml that this is causing a failure now: > > net/dsa/qca8k.example.dtb: switch@10: ports:port@6: Unevaluated properties are not allowed ('qca,sgmii-rxclk-falling-edge' was unexpected) > > Could you please explain why is the 'qca,sgmii-rxclk-falling-edge' > property not evaluated from the perspective of dsa.yaml in the example? > It's a head scratcher to me. > > May it have something to do with the fact that Colin's addition: > > $ref: "dsa.yaml#" > > is not expressed as: > > allOf: > - $ref: "dsa.yaml#" > > ? Looking into documentation (I promise I did some reading / research to try to get a stronger understanding of the documentation yaml) I came across the history of ethernet-controller.yaml which suggests to me that the pattern: allOf: - $ref: is frowned upon commit 3d21a4609335: ("dt-bindings: Remove cases of 'allOf' containing a '$ref'") I do have a knack for misinterpreting data, but I read that as: allOf: - $ref: shouldn't be used unless there's more than one list entry. All that aside, I did upgrade from 2022.5 to 2022.9 just now and do see these dtschema errors now. I'll be sure to use this before resubmitting. > > If yes, can you explain exactly what is the difference with respect to > unevaluatedProperties? > > > > oneOf: > > > - required: > > > - ports > > > @@ -116,7 +108,7 @@ required: > > > - compatible > > > - reg > > > > > > -additionalProperties: true > > > > This should certainly be changed though. We should only have 'true' for > > incomplete collections of properties. IOW, for common bindings. That makes a lot of sense - and helps me understand why I had so much trouble understanding why it originally was "additionalProperties: true" I'll obviously take another look at this. The nxp,sja1105.yaml seemed to be most akin to what the qca8k.yaml needed to be - that is "take dsa.yaml and add a couple extra properties to the ports nodes". But there's always subleties. > > > > > +unevaluatedProperties: false
On Thu, Oct 27, 2022 at 04:25:53AM +0300, Vladimir Oltean wrote: > Hi Rob, > > On Tue, Oct 25, 2022 at 04:21:14PM -0500, Rob Herring wrote: > > On Mon, Oct 24, 2022 at 10:03:51PM -0700, Colin Foster wrote: > > > The dsa.yaml binding contains duplicated bindings for address and size > > > cells, as well as the reference to dsa-port.yaml. Instead of duplicating > > > this information, remove the reference to dsa-port.yaml and include the > > > full reference to dsa.yaml. > > > > I don't think this works without further restructuring. Essentially, > > 'unevaluatedProperties' on works on a single level. So every level has > > to define all properties at that level either directly in > > properties/patternProperties or within a $ref. > > > > See how graph.yaml is structured and referenced for an example how this > > has to work. > > > > > @@ -104,8 +98,6 @@ patternProperties: > > > SGMII on the QCA8337, it is advised to set this unless a communication > > > issue is observed. > > > > > > - unevaluatedProperties: false > > > - > > > > Dropping this means any undefined properties in port nodes won't be an > > error. Once I fix all the issues related to these missing, there will be > > a meta-schema checking for this (this could be one I fixed already). > > I may be misreading, but here, "unevaluatedProperties: false" from dsa.yaml > (under patternProperties: "^(ethernet-)?port@[0-9]+$":) is on the same > level as the "unevaluatedProperties: false" that Colin is deleting. > > In fact, I believe that it is precisely due to the "unevaluatedProperties: false" > from dsa.yaml that this is causing a failure now: > > net/dsa/qca8k.example.dtb: switch@10: ports:port@6: Unevaluated properties are not allowed ('qca,sgmii-rxclk-falling-edge' was unexpected) > > Could you please explain why is the 'qca,sgmii-rxclk-falling-edge' > property not evaluated from the perspective of dsa.yaml in the example? > It's a head scratcher to me. A schema with unevaluatedProperties can "see" into a $ref, but the ref'ed schema having unevaluatedProperties can't see back to the referring schema for properties defined there. So if a schema is referenced by other schemas which can define their own additional properties, that schema cannot have 'unevaluatedProperties: false'. If both schemas have 'unevaluatedProperties: false', then it's just redundant. We may end up doing that just because it's not obvious when we have both or not, and no unevaluatedProperties/ additionalProperties at all is a bigger issue. I'm working on a meta-schema to check this. > May it have something to do with the fact that Colin's addition: > > $ref: "dsa.yaml#" > > is not expressed as: > > allOf: > - $ref: "dsa.yaml#" > > ? No. Either way behaves the same. We generally only use 'allOf' when there might be more than 1 entry. That is mostly just at the top-level. Rob
On Mon, Oct 31, 2022 at 10:44:09AM -0500, Rob Herring wrote: > On Thu, Oct 27, 2022 at 04:25:53AM +0300, Vladimir Oltean wrote: > > Hi Rob, > > > > On Tue, Oct 25, 2022 at 04:21:14PM -0500, Rob Herring wrote: > > > On Mon, Oct 24, 2022 at 10:03:51PM -0700, Colin Foster wrote: > > > > The dsa.yaml binding contains duplicated bindings for address and size > > > > cells, as well as the reference to dsa-port.yaml. Instead of duplicating > > > > this information, remove the reference to dsa-port.yaml and include the > > > > full reference to dsa.yaml. > > > > > > I don't think this works without further restructuring. Essentially, > > > 'unevaluatedProperties' on works on a single level. So every level has > > > to define all properties at that level either directly in > > > properties/patternProperties or within a $ref. > > > > > > See how graph.yaml is structured and referenced for an example how this > > > has to work. > > > > > > > @@ -104,8 +98,6 @@ patternProperties: > > > > SGMII on the QCA8337, it is advised to set this unless a communication > > > > issue is observed. > > > > > > > > - unevaluatedProperties: false > > > > - > > > > > > Dropping this means any undefined properties in port nodes won't be an > > > error. Once I fix all the issues related to these missing, there will be > > > a meta-schema checking for this (this could be one I fixed already). > > > > I may be misreading, but here, "unevaluatedProperties: false" from dsa.yaml > > (under patternProperties: "^(ethernet-)?port@[0-9]+$":) is on the same > > level as the "unevaluatedProperties: false" that Colin is deleting. > > > > In fact, I believe that it is precisely due to the "unevaluatedProperties: false" > > from dsa.yaml that this is causing a failure now: > > > > net/dsa/qca8k.example.dtb: switch@10: ports:port@6: Unevaluated properties are not allowed ('qca,sgmii-rxclk-falling-edge' was unexpected) > > > > Could you please explain why is the 'qca,sgmii-rxclk-falling-edge' > > property not evaluated from the perspective of dsa.yaml in the example? > > It's a head scratcher to me. > > A schema with unevaluatedProperties can "see" into a $ref, but the > ref'ed schema having unevaluatedProperties can't see back to the > referring schema for properties defined there. > > So if a schema is referenced by other schemas which can define their own > additional properties, that schema cannot have 'unevaluatedProperties: > false'. If both schemas have 'unevaluatedProperties: false', then it's > just redundant. We may end up doing that just because it's not obvious > when we have both or not, and no unevaluatedProperties/ > additionalProperties at all is a bigger issue. I'm working on a > meta-schema to check this. Thanks for this information. So if I'm understanding correctly: - All DSA chips I'm modifying should reference dsa.yaml, as they currently are. - As such, these all should have unevaluatedProperties: true, so they can see into dsa.yaml. - dsa.yaml, and any schema that gets $ref:'d, can not have unevaluatedProperties: false, unless the desire is to forbid any other properties to be added. I'll get another patch set out this week with all these changes, and tested against the latest dt_bindings_check. > > > > May it have something to do with the fact that Colin's addition: > > > > $ref: "dsa.yaml#" > > > > is not expressed as: > > > > allOf: > > - $ref: "dsa.yaml#" > > > > ? > > No. Either way behaves the same. We generally only use 'allOf' when > there might be more than 1 entry. That is mostly just at the top-level. > > Rob
diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml index 978162df51f7..7884f68cab73 100644 --- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml @@ -66,22 +66,16 @@ properties: With the legacy mapping the reg corresponding to the internal mdio is the switch reg with an offset of -1. +$ref: "dsa.yaml#" + patternProperties: "^(ethernet-)?ports$": type: object - properties: - '#address-cells': - const: 1 - '#size-cells': - const: 0 - patternProperties: "^(ethernet-)?port@[0-6]$": type: object description: Ethernet switch ports - $ref: dsa-port.yaml# - properties: qca,sgmii-rxclk-falling-edge: $ref: /schemas/types.yaml#/definitions/flag @@ -104,8 +98,6 @@ patternProperties: SGMII on the QCA8337, it is advised to set this unless a communication issue is observed. - unevaluatedProperties: false - oneOf: - required: - ports @@ -116,7 +108,7 @@ required: - compatible - reg -additionalProperties: true +unevaluatedProperties: false examples: - |