Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1091859rdb; Fri, 20 Oct 2023 08:13:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHUw20zhRuPmC+CmRbcf+W9FaCp51rQYGzhK0egybtrwEhUdVy8UXtuYvPLBV7H+bHwdk1T X-Received: by 2002:a05:6358:281a:b0:13c:dd43:f741 with SMTP id k26-20020a056358281a00b0013cdd43f741mr1634546rwb.24.1697814782037; Fri, 20 Oct 2023 08:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697814781; cv=none; d=google.com; s=arc-20160816; b=GMoxLMfWGm7k555TbRy3Vjc/fThu53DdHggvhXcmFcOGbIQDQNUtBGnfm/s9+gh6gq 7F1onVHku4q66S4JZzUBLk+388gyqgDaLJLHIAj+h/rW+N6nFnuQ6tcwxkl1H/6jZ6La bQ5g1SHP9DogWRP7negH7LRf22KoNCsC7vqNH/5+eVZc87E9dGlUrawbf+tg3PLWx2KT b5zQJKlJ3fMpiJwXkW0yfSiOo2NvzRutIt1lfMSqjsCHxqQeB7AGhiOIZ1RYNS7fXZRZ OqhDjgQfeMHgMcITb+EZEqNR8fZ61NbfN+J3TaLHjJ7nMYJMJdvuMRcxRVI20hxEw/Tq TqAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ZU5hBj8/e4oDuCRh8BssYew0LlrPlrgUCeK6Uhar2WQ=; fh=aHYtSemc2JiqH3pyun05y5vvFX5qsOnpRVDlSgl2R1k=; b=ESPQwynAxoT9Ca6tV/OzTMSGqUGB2CuKKKCUtbHr59yFXT2Sd7ikaeyKLLmyPDOMah QVQQNKtpPAgXGgyVRCGGd8wqxhDZC8hoi9DGgabatKRFsQzF4BOTh+3D47WDQe0Mq597 aCL9ituCdqW/s19b5BIU3+S2HnKYfVqBgihoVK4ORpQ+ZIDdvCswxd1xljLNVBSmswMg q8gyJWV5c01OaH+wR2SwmS+Jq+XWUKyMoZXfDCnBJQio9l63w5mlc+tggkcb+o0iL9Xo FGkJdXonF+HZ3tpeM6+itKLGVS2+mG0o73Rc/PHDbD7zG2L+3H4yY4DH76FM7gIvmmJd rusw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hRQ0+ABG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id g25-20020a633759000000b005aad7d775fdsi1398595pgn.301.2023.10.20.08.13.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 08:13:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hRQ0+ABG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 9A66A83593AC; Fri, 20 Oct 2023 08:12:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377617AbjJTPMs (ORCPT + 99 others); Fri, 20 Oct 2023 11:12:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377529AbjJTPMs (ORCPT ); Fri, 20 Oct 2023 11:12:48 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAEE8FA; Fri, 20 Oct 2023 08:12:44 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-9a58dbd5daeso145722466b.2; Fri, 20 Oct 2023 08:12:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697814763; x=1698419563; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=ZU5hBj8/e4oDuCRh8BssYew0LlrPlrgUCeK6Uhar2WQ=; b=hRQ0+ABGvWBkF2Q1fXlM+GQl2LcHIPMLpchIFGBPlahA/NP40FKcgNofnqbNVStStt GWKGrXX1v9lqCIUn7L/HibwqF5d8UzDvc+8tSxa7KDOvPoTiJ+SUSplPxeU6nXwzv8zm 2+81Z8jfeZQrS3As3q4cllMz5n8p7S8FRVOoJlWfqJdC/mDyIM22aXr9K9Sh/7thNAG+ E4lsLyvzdnIWV6Nt1pDqCjU0xP6uIlfU/Uul/PjYLq8/YN6/Mb75RcyLJa6C5hLBt915 kRobuu8P/RmPGvF83ZnEGci04CblVclAuYAXJKrAhYtyrV7ovp5ikC8iH8Ij2YKxXbr1 dtcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697814763; x=1698419563; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZU5hBj8/e4oDuCRh8BssYew0LlrPlrgUCeK6Uhar2WQ=; b=uD2g8aseqaxe3b79Odjs14hDLxhsf4Eehg85f5MWRtX/VZfpGJuhMherqo9i7u9sfx 5iKR/fYD4B0WsLhfMxBDmYrqo0tmIp3Dk1ed00lMtGsrc4zUx2o/UP5ZBYSg5RpVw3/V f/Qi2HkjBcAjBQ4kkM65m15S4rAt5/4pA5NMeBzJJxfqtsYvqnw0zlytEN/9jG8QFX+G iB13aYX3jgvuQPY1PNAL0QTfzv5FMyg/KYewSqGU+8clu5xf4fmjYOUQDYjv+DIVURMu Wy3T371Xg3a44HEN29azAu6s/jLoha64xGwPkl3fTR7QwuPx1MIH9gfd3SBeuHV5dCmu /GJg== X-Gm-Message-State: AOJu0Yx9gQbHsftQrEgqhNIm7FBL2eh8ssONNnq0IyO2LS9ej14uqpME OTGVFs6T/au2k0uoAFdz27I= X-Received: by 2002:a17:907:3f22:b0:9bd:a063:39d2 with SMTP id hq34-20020a1709073f2200b009bda06339d2mr2130957ejc.16.1697814762995; Fri, 20 Oct 2023 08:12:42 -0700 (PDT) Received: from skbuf ([188.26.57.160]) by smtp.gmail.com with ESMTPSA id d13-20020a1709064c4d00b009a5f1d15642sm1650051ejw.158.2023.10.20.08.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 08:12:42 -0700 (PDT) Date: Fri, 20 Oct 2023 18:12:40 +0300 From: Vladimir Oltean To: Linus Walleij Cc: =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , Marek =?utf-8?B?QmVow7pu?= , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Russell King , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Christian Marangi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next v4 6/7] dt-bindings: marvell: Rewrite MV88E6xxx in schema Message-ID: <20231020151240.3gdcftg2aaz7bnal@skbuf> References: <20231018-marvell-88e6152-wan-led-v4-0-3ee0c67383be@linaro.org> <20231018-marvell-88e6152-wan-led-v4-6-3ee0c67383be@linaro.org> <20231019153552.nndysafvblrkl2zn@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 20 Oct 2023 08:12:58 -0700 (PDT) On Fri, Oct 20, 2023 at 02:47:20PM +0200, Linus Walleij wrote: > On Thu, Oct 19, 2023 at 5:35 PM Vladimir Oltean wrote: > > > Yikes, both these examples are actually broken, > > As you can see from the patch, they are just carried over from > Documentation/devicetree/bindings/net/dsa/marvell.txt > > +/- fixes to make them pass schema checks. (...) > These examples are already in the kernel. Migrating them > from marvell.txt to marvell,mv88e6xxx.yaml doesn't make > the situation worse, it's not like people magically start trusting > the examples more because they are in YAML than in .txt. > > But sure let's try to put in better examples! You are not correct here. The examples from Documentation/devicetree/bindings/net/dsa/marvell.txt don't have ports, and the way in which you added the ports is wrong (at least relative to the way in which you kept the mdio node). > > What you have now is exactly what won't work, i.e. an OF-based > > slave_mii_bus with a non-OF-based phy_connect(). > > Yeah when I run check_dtbs I get a few (not many) warnings > like this on aarch64 and armv7_multi: > > arch/arm/boot/dts/nxp/imx/imx6q-b450v3.dtb: switch@0: ports:port@4: > 'phy-mode' is a required property > from schema $id: > http://devicetree.org/schemas/net/dsa/marvell,mv88e6xxx.yaml# Ok, the warning is valid, but I don't know what phy-mode to put there. It is unrelated anyway. Some warnings will be expected after the schema conversion, and they are not all mechanical to fix. When we put schema validation in place for checking that CPU ports have valid link descriptions that phylink can use, we decided to be lax in the kernel, but strict in the dt-schema. Hmm, not sure what were we thinking. We didn't have a schema for Marvell, so we weren't even seeing many of the validation errors that you're now uncovering. > Isn't there some in-kernel DTS file with a *good* example of how > a Marvell mv88e6xxx switch is supposed to look I can just > copy instead? We shouldn't conjure synthetic examples. (...) > I'm game. Point out the DTS file and I will take that. You can use https://elixir.bootlin.com/u-boot/latest/source/arch/arm/dts/imx6qdl-gw5904.dtsi#L211 (optionally renaming switch to ethernet-switch, and ports to ethernet-ports). That uses the subset of the mv88e6xxx kernel bindings that U-Boot also understands, so taking a U-Boot example is actually preferable. > > One other thing I see as a deal breaker for this schema conversion is > > that $nodename for Marvell needs to allow basically anything (invalidating > > the constraint from ethernet-switch.yaml), because we can't change node > > names in the case of some boards, otherwise we risk breaking them > > (see MOX). If the schema starts emitting warnings for those node names, > > then it's inevitable that some pixie in the future will eventually break > > them by "fixing" the node name. > > I already did a bit of hippo-in-china-porcelain store in the patches > in this series mostly renaming things like "switch0@0" to "switch@0" > (yeah that's all). > > Is this part of the problem or something else? Yes, for most of the switches, renaming their OF nodes should not be a problem. For Marvell, I'd exercise extra caution and only rename those OF nodes where I can confirm that doing so won't break anything. Marvell is one of the oldest DSA drivers, and you can tell that the bindings have gone through a lot before becoming more or less uniform. Anyway, for the $nodename constraint, it _looks_ all mechanical and trivial to fix (unlike the missing phy-mode that you point to, above), so someone will jump to fix it. I would like to avoid that, because boot testing will be key, and a board is not always available.