From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD885C38A2D for ; Thu, 27 Oct 2022 03:35:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234161AbiJ0Dfj (ORCPT ); Wed, 26 Oct 2022 23:35:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233826AbiJ0DfX (ORCPT ); Wed, 26 Oct 2022 23:35:23 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2128.outbound.protection.outlook.com [40.107.220.128]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD5263A17D; Wed, 26 Oct 2022 20:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MEdAMOFGwFzlxrkHMpu/bYf6y4xdHuj6keXliS6Q9rFfgG6PrEFCGTW6WMPv/2eu7sU+GolmiWSGTCVGwb5SmgzhLZ0rZbbctx/qo1d9sF5FlgBzqxQ/AYH1q1WhtS8A273nb2MNVKpyFjUsrbTOTl1AkapbYhEJ0qGN8l0nmTwBpzpC5thZAJvi3jve1hKQiTGgC0r6ydUSPK1ppHSlORuf6d8kujJ1AK9RX8Mu080vgC5bF6gUd75Ma3m+oHXS1hr9BkFEU4HgqKN3P0TAB5BbL5Gz5kYib3cEyf8gL/a2H9lQJQSjBF/kgC6IXhQnR6Y92RgF2C++uwxF47kPwQ== 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=1GTds9C6e5cCENoJsHytULZHPx24ibEL/tkFzO+RPnQ=; b=h/Nl1m7eqtG6mZbC3IEp/9yLd3gAPIAqeP2DMn03sDlIxHK2TSR3OaqkxL9ILwVEyiYzjjTHOKZsm3CXWfBSfJqj6zUnilqyYjVe8mc7m08QL1i24FMDqAdcvnjE4YzNtGFXIVAa7ZzMEl4L6Cfqb/dvhs3DfbIXAUqIfuUrHUMYQ38h9vrL50LDOg3vVuG1m/P2iSD94A9vgIZx8eZcKWURZZCRQtvJEh/0VWVZdDiPCMDdRHcz0UxDPfqoIoBrEMQIfvoRSWyUGqxOpdaWVwLN7JO9HLvvIMarM+dudKwMTyKD/+ajZqrbqjnBhqcyUauq1hDFi/DS9gD9wh4QQQ== 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=1GTds9C6e5cCENoJsHytULZHPx24ibEL/tkFzO+RPnQ=; b=mCFkS4fQqx9zPcNh9ckH6K8NgeZDrgt1t991YpTvRxc9s0668j6oOYx/qJeV4Hi03PHLD+UzleeOlgSfmqpTNZXSxgaKIb6p+8lofTneK352o+OgaNvnoUE8jtbXZEYMNTHOuUyjSMfHmqtQP+5QqaG0nyC+/ZBKWMCAvrlIA2c= 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 MN0PR10MB5911.namprd10.prod.outlook.com (2603:10b6:208:3cd::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 03:35:17 +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; Thu, 27 Oct 2022 03:35:17 +0000 Date: Wed, 26 Oct 2022 20:35:12 -0700 From: Colin Foster To: Vladimir Oltean Cc: Rob Herring , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Alexandre Belloni , Claudiu Manoil , John Crispin , Sean Wang , DENG Qingfang , Landen Chao , =?utf-8?B?bsOnIMOcTkFM?= , Matthias Brugger , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Florian Fainelli , Vivien Didelot , Andrew Lunn , Krzysztof Kozlowski , Lee Jones Subject: Re: [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml Message-ID: References: <20221025050355.3979380-1-colin.foster@in-advantage.com> <20221025050355.3979380-4-colin.foster@in-advantage.com> <20221025050355.3979380-1-colin.foster@in-advantage.com> <20221025050355.3979380-4-colin.foster@in-advantage.com> <20221025212114.GA3322299-robh@kernel.org> <20221025212114.GA3322299-robh@kernel.org> <20221027012553.zb3zjwmw3x6kw566@skbuf> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221027012553.zb3zjwmw3x6kw566@skbuf> X-ClientProxiedBy: SJ0PR13CA0072.namprd13.prod.outlook.com (2603:10b6:a03:2c4::17) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2351:EE_|MN0PR10MB5911:EE_ X-MS-Office365-Filtering-Correlation-Id: d58ed33e-7714-49a9-3bfd-08dab7cc4381 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yfIFHeV49ERNPldbS5KW/hBHDur7jOpULDQYje8OXK1WEqz3OqN59CQIHsvZwvD3IcPGOrpBUGtxXjFkazfM23R7avbs3J06OCs3SoZalSLXI8JFKAnopzKvsLq2QBBz3ILtb8yAMY2f4wDCc4InuR7X6vURm3ISfuze1a4vEAoZWPORlEKiFV4PN6D9OfxYZWBW3U/bMCIYXJ2AN6BVCGaH86lEVaD5FkgnCO/44mR3/OmXSF4kyluOM59t47DW6FIefZUNw+nMlr8hSfLCjDUDrtwW5QKfyzFjONS/svSa4oSOZEQ5sIBtNMxk4IqbcAdCgFsftp80dNGca1wcOWtxvk0bGcEF0dXi1xSQ8+hrIqblq7ktdpk57FN7PTvFRNSogbzM8a0wS5xWnbwbjPqnWq6b2bxcUVrnMdBJaDqSmZYcLzOg4kUEXLprd9EwPGMto+cYxXXOV2D7pvMaxoAUbTh8FUNA7/HTSDq4aPqddhE1JrlM6/Vpi1LPHifGPbhkP2tbMaTYgxD4I0fqXnh/ifB4voNXsZrvCrl4QwB81twfDbIUTs1uSRMbaYaZw0Wkt2wqokcIDugUIXcHtX/OobIVVLoQd61NUzlHTIpR7lSWihfHCLICbI2lilVgI1OreeehTm1WSuQ/wIVyzyUWdI66NMJAc1baiW9AkXfiYIiQyScSOCAIUjzHopfZgNaHy59FUEW92L9+OfxGkxMt6e5Hv5kKIZwDsWaHlnwnzDzORr9chQ6Y+/aZ3MwuBg2PKKRFOTFpkm8raHPb5A== 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)(7916004)(376002)(136003)(39840400004)(396003)(366004)(346002)(451199015)(6486002)(6506007)(4326008)(316002)(86362001)(66476007)(66946007)(66556008)(8676002)(478600001)(54906003)(6916009)(6666004)(8936002)(6512007)(7416002)(83380400001)(9686003)(38100700002)(5660300002)(26005)(41300700001)(2906002)(33716001)(44832011)(186003)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Yuq+gMcw/03LIOBZutkCY2KJME2dsM0sJ5d2H0lIQTeTjA5cgk6DPdz5yUhC?= =?us-ascii?Q?6sWu/N3md0DQil50KYsT8AnJQgw0u/es3YymTB+qEb6EI3eblIu/w8ACC27L?= =?us-ascii?Q?CRRj1lgTsEoCDwzJ+KiTtwdKNgRbliBym0heWyfO8seZR2ZIQcun2grzfsua?= =?us-ascii?Q?yAr58RhbafhmYBrMOIoRF0puuNLwbnlpr3RY3+yYSFTgj+pV1IxlxUFn6Fil?= =?us-ascii?Q?KZAFxykqUKeqvHBopP2Y1y+TFtK0DlmqAPDgFN/C99hT6sGB50gwaBhwncsP?= =?us-ascii?Q?CchuJ/BWiaFXq27cDXj5/Jp+o8y3RIaOmPA94wHgYjC+Dq6FdyelgZ2lMKiK?= =?us-ascii?Q?ym/tM6ziah2Jj4vuXjsVPmNkiHB23ONlq9erjhHxeV9xr0SeSNT81i2QN6jk?= =?us-ascii?Q?1A+nHRsRIZZnLN/LT6P36L3OOzBxU5UEXeuv3vxfNDdTdFdCAvDWcUGU4JWq?= =?us-ascii?Q?bRzrqNFSjlTTBuM7Pa6UDZtFW/9CwAogsbeyknCBW3+lrCGbW/5yMmmVNGQj?= =?us-ascii?Q?oxIOoUaFMvI0mKK1/8+YneBkWv3Otw+306pUpcOKiOLLoa7yk80+A+sYZU7D?= =?us-ascii?Q?SjueydUdbg1ErAsgaKAN3DrLtGhawnXHXtT4T8TZ3pgVprKIqmE6rOGuA+tG?= =?us-ascii?Q?wWZ362cgfUel+Nb9mQM8f/6gCpiwMIIZb2APZzdVsRepcJBM5pAZbIySAEyb?= =?us-ascii?Q?0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vAmyy2?= =?us-ascii?Q?LMPLiBohRgsPhknwuJjjFi0=3D?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: d58ed33e-7714-49a9-3bfd-08dab7cc4381 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 03:35:17.0100 (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: Hziwh+I9yWwFiyWzFnJopqL8scflmmwGu73ETuJxz45bFVvIZ9oFWknLzBphCiz3p7KLTpjl+QpOS9FSIoOW3ZgSI81S/Gh90BPBEz3btW0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR10MB5911 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 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 E9A28C38A2D for ; Thu, 27 Oct 2022 03:36:51 +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:In-Reply-To:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uIZkf19HgV6gSgGbMjrzVyaH2sxEwSznZzM9BXmuBZE=; b=btt6zgwc998bpV dKJKVQRT1CYVmhx9efNWlnICURB3BVHuaRdZWcKvoqTF4knnylCyBbTP8Tga2n/GWTDOfPiwSlHn5 U811L/KljucQqv0YGDC1JPJAfvQHD+DecmzYW22C18KlnPGFo2JmAn36294kP/htqroUxkwIBNuxe HLIl/TChlremCgkCEy3B3GogeBQxHc1yPiVoj6/ualysmh+V7lPZBxC+7Q2ec0beOBCK3CtbwrvME g6lNsgbtY/Kca2BSz839tbhtISm2AdZW363BD5gcnC7ALZNxoCupwmUlRAvx/lRDFHWZluf2pOh6o A8vc9SaaPND9yl6PNi9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ontg4-00Bidi-Td; Thu, 27 Oct 2022 03:35:33 +0000 Received: from mail-co1nam11on2137.outbound.protection.outlook.com ([40.107.220.137] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ontg1-00BicN-1i; Thu, 27 Oct 2022 03:35:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MEdAMOFGwFzlxrkHMpu/bYf6y4xdHuj6keXliS6Q9rFfgG6PrEFCGTW6WMPv/2eu7sU+GolmiWSGTCVGwb5SmgzhLZ0rZbbctx/qo1d9sF5FlgBzqxQ/AYH1q1WhtS8A273nb2MNVKpyFjUsrbTOTl1AkapbYhEJ0qGN8l0nmTwBpzpC5thZAJvi3jve1hKQiTGgC0r6ydUSPK1ppHSlORuf6d8kujJ1AK9RX8Mu080vgC5bF6gUd75Ma3m+oHXS1hr9BkFEU4HgqKN3P0TAB5BbL5Gz5kYib3cEyf8gL/a2H9lQJQSjBF/kgC6IXhQnR6Y92RgF2C++uwxF47kPwQ== 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=1GTds9C6e5cCENoJsHytULZHPx24ibEL/tkFzO+RPnQ=; b=h/Nl1m7eqtG6mZbC3IEp/9yLd3gAPIAqeP2DMn03sDlIxHK2TSR3OaqkxL9ILwVEyiYzjjTHOKZsm3CXWfBSfJqj6zUnilqyYjVe8mc7m08QL1i24FMDqAdcvnjE4YzNtGFXIVAa7ZzMEl4L6Cfqb/dvhs3DfbIXAUqIfuUrHUMYQ38h9vrL50LDOg3vVuG1m/P2iSD94A9vgIZx8eZcKWURZZCRQtvJEh/0VWVZdDiPCMDdRHcz0UxDPfqoIoBrEMQIfvoRSWyUGqxOpdaWVwLN7JO9HLvvIMarM+dudKwMTyKD/+ajZqrbqjnBhqcyUauq1hDFi/DS9gD9wh4QQQ== 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=1GTds9C6e5cCENoJsHytULZHPx24ibEL/tkFzO+RPnQ=; b=mCFkS4fQqx9zPcNh9ckH6K8NgeZDrgt1t991YpTvRxc9s0668j6oOYx/qJeV4Hi03PHLD+UzleeOlgSfmqpTNZXSxgaKIb6p+8lofTneK352o+OgaNvnoUE8jtbXZEYMNTHOuUyjSMfHmqtQP+5QqaG0nyC+/ZBKWMCAvrlIA2c= 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 MN0PR10MB5911.namprd10.prod.outlook.com (2603:10b6:208:3cd::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 03:35:17 +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; Thu, 27 Oct 2022 03:35:17 +0000 Date: Wed, 26 Oct 2022 20:35:12 -0700 From: Colin Foster To: Vladimir Oltean Cc: Rob Herring , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Alexandre Belloni , Claudiu Manoil , John Crispin , Sean Wang , DENG Qingfang , Landen Chao , =?utf-8?B?bsOnIMOcTkFM?= , Matthias Brugger , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Florian Fainelli , Vivien Didelot , Andrew Lunn , Krzysztof Kozlowski , Lee Jones Subject: Re: [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml Message-ID: References: <20221025050355.3979380-1-colin.foster@in-advantage.com> <20221025050355.3979380-4-colin.foster@in-advantage.com> <20221025050355.3979380-1-colin.foster@in-advantage.com> <20221025050355.3979380-4-colin.foster@in-advantage.com> <20221025212114.GA3322299-robh@kernel.org> <20221025212114.GA3322299-robh@kernel.org> <20221027012553.zb3zjwmw3x6kw566@skbuf> Content-Disposition: inline In-Reply-To: <20221027012553.zb3zjwmw3x6kw566@skbuf> X-ClientProxiedBy: SJ0PR13CA0072.namprd13.prod.outlook.com (2603:10b6:a03:2c4::17) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2351:EE_|MN0PR10MB5911:EE_ X-MS-Office365-Filtering-Correlation-Id: d58ed33e-7714-49a9-3bfd-08dab7cc4381 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yfIFHeV49ERNPldbS5KW/hBHDur7jOpULDQYje8OXK1WEqz3OqN59CQIHsvZwvD3IcPGOrpBUGtxXjFkazfM23R7avbs3J06OCs3SoZalSLXI8JFKAnopzKvsLq2QBBz3ILtb8yAMY2f4wDCc4InuR7X6vURm3ISfuze1a4vEAoZWPORlEKiFV4PN6D9OfxYZWBW3U/bMCIYXJ2AN6BVCGaH86lEVaD5FkgnCO/44mR3/OmXSF4kyluOM59t47DW6FIefZUNw+nMlr8hSfLCjDUDrtwW5QKfyzFjONS/svSa4oSOZEQ5sIBtNMxk4IqbcAdCgFsftp80dNGca1wcOWtxvk0bGcEF0dXi1xSQ8+hrIqblq7ktdpk57FN7PTvFRNSogbzM8a0wS5xWnbwbjPqnWq6b2bxcUVrnMdBJaDqSmZYcLzOg4kUEXLprd9EwPGMto+cYxXXOV2D7pvMaxoAUbTh8FUNA7/HTSDq4aPqddhE1JrlM6/Vpi1LPHifGPbhkP2tbMaTYgxD4I0fqXnh/ifB4voNXsZrvCrl4QwB81twfDbIUTs1uSRMbaYaZw0Wkt2wqokcIDugUIXcHtX/OobIVVLoQd61NUzlHTIpR7lSWihfHCLICbI2lilVgI1OreeehTm1WSuQ/wIVyzyUWdI66NMJAc1baiW9AkXfiYIiQyScSOCAIUjzHopfZgNaHy59FUEW92L9+OfxGkxMt6e5Hv5kKIZwDsWaHlnwnzDzORr9chQ6Y+/aZ3MwuBg2PKKRFOTFpkm8raHPb5A== 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)(7916004)(376002)(136003)(39840400004)(396003)(366004)(346002)(451199015)(6486002)(6506007)(4326008)(316002)(86362001)(66476007)(66946007)(66556008)(8676002)(478600001)(54906003)(6916009)(6666004)(8936002)(6512007)(7416002)(83380400001)(9686003)(38100700002)(5660300002)(26005)(41300700001)(2906002)(33716001)(44832011)(186003)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Yuq+gMcw/03LIOBZutkCY2KJME2dsM0sJ5d2H0lIQTeTjA5cgk6DPdz5yUhC?= =?us-ascii?Q?6sWu/N3md0DQil50KYsT8AnJQgw0u/es3YymTB+qEb6EI3eblIu/w8ACC27L?= =?us-ascii?Q?CRRj1lgTsEoCDwzJ+KiTtwdKNgRbliBym0heWyfO8seZR2ZIQcun2grzfsua?= =?us-ascii?Q?yAr58RhbafhmYBrMOIoRF0puuNLwbnlpr3RY3+yYSFTgj+pV1IxlxUFn6Fil?= =?us-ascii?Q?KZAFxykqUKeqvHBopP2Y1y+TFtK0DlmqAPDgFN/C99hT6sGB50gwaBhwncsP?= =?us-ascii?Q?CchuJ/BWiaFXq27cDXj5/Jp+o8y3RIaOmPA94wHgYjC+Dq6FdyelgZ2lMKiK?= =?us-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rxpyxZkHDxA9edFpeQw?= =?us-ascii?Q?u5WnMAabSgpYZFF52WcL2GTHzh+wMz1qrIgjsjGb8xKA5hhvDvNJtmGO6ute?= =?us-ascii?Q?jh/j/o3MHHlW0K6yinERW486oRLVmKn7xcCmlAj3M5MYUlRRkfGf3nwt1CSS?= =?us-ascii?Q?asL+pd4x8nKL27KX57uUH/9F0O3PhpvqBZnoeAisNo3Niy3M/RAoY9xn8CcX?= =?us-ascii?Q?H0m2twcnD9shrPhldzfvRBJMOnXXBCDLAvt5W/9/3EgTogg0w5im+gzhX2Fh?= =?us-ascii?Q?rJQpXO+gE/a0sWIMb4tGVHfwLazSAEMJ1ep/AYKePWIN1da0RouZA53ik9R5?= =?us-ascii?Q?NvEEmWj463sJzsxkZfmjkQ/q3Lt2WOBMMSCrUOCovfWIZkFUPrAMI1vAmyy2?= =?us-ascii?Q?LMPLiBohRgsPhknwuJjjFi0=3D?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: d58ed33e-7714-49a9-3bfd-08dab7cc4381 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 03:35:17.0100 (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: Hziwh+I9yWwFiyWzFnJopqL8scflmmwGu73ETuJxz45bFVvIZ9oFWknLzBphCiz3p7KLTpjl+QpOS9FSIoOW3ZgSI81S/Gh90BPBEz3btW0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR10MB5911 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221026_203529_116709_ED2BD809 X-CRM114-Status: GOOD ( 32.51 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel