Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2369136rdb; Thu, 21 Sep 2023 17:20:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNmWoyqApA+9L72BLz0cw+7QS+amjhK4cAeWex7qDaTGeQUPBfAqru5PIqFFTtuthUS2eI X-Received: by 2002:a17:90a:1fc6:b0:276:a75b:6f96 with SMTP id z6-20020a17090a1fc600b00276a75b6f96mr6885278pjz.19.1695342012342; Thu, 21 Sep 2023 17:20:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695342012; cv=none; d=google.com; s=arc-20160816; b=PCePaXEGdoYP0H/3OAOUVpcLYAO3muaf5hSf2gLMz1YTvQKtyVRG6qVsRX3cwyjeKS YMmUa6wjuJhGSg+myTGG+EQn9ojrfhx9i/A1d4B4JQnRrLLcJxF7fQUVOyrnfkj67NX2 cAObGh6EgeYWBNcRH7S0u1dpO5FBQhx/4rwza+wVK9/rtH0DpoJNZSqRpLX2uSuUy9D2 7eyVhfE0EI+ilvsM6qhRHdHcYgtXtAy1/WoRGi9qX1DqUzK2QPsBxUurTsAGTCnNKpMP vRCQyoiGkPtF3jbQCmPOpk+CSgaX5LCoGJ/b1Jzuzewjh4//RzAYzb14ZfaQWsqQ+TCC EZRQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qKm5PjEzUxyMudDyWH1l+GObMoy6S9qVw27naJU6pOw=; fh=TZ2ZrjENzlYcCNoY6WgFII3xMjolACwoKuoXqgEuTsE=; b=wxb8q5C2hTj0ldO0rzWqM4k1A23S0Cebe8ZcbyxylnMpl6dWXXaouA18Tzs2CBouZR AHeS/Vg87mX+NzURqP2XWEM3cQxobGZhcilENfd0YJSbSqssYEzGwNPJQeYli4eT7lIX hK4natKDMVWEDtHKBe31+THZnKSEVt4IrsYmH9ZFkrnaM/Jexf0tG8j8uxz57mMFFn+8 PqQ2Bb8qvwRPX7Xz++iuKiBRg5ln0G3BoL4Zfybe28fnz8MTOushNZyHjwrvPRiptZMj /ZznD0gHxv/Ue7Vwf+2Ix9NtFScjqyBYiVmflAwH4O9XApvfJmehJmzI8S2lNeBzYKW2 i0cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=OUJduL3H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id cu14-20020a17090afa8e00b002744169a0cbsi4736257pjb.99.2023.09.21.17.20.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 17:20:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=OUJduL3H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9525B8219C01; Thu, 21 Sep 2023 14:08:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbjIUVHF (ORCPT + 99 others); Thu, 21 Sep 2023 17:07:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233265AbjIUVFj (ORCPT ); Thu, 21 Sep 2023 17:05:39 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDC5DAFC21; Thu, 21 Sep 2023 11:07:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=qKm5PjEzUxyMudDyWH1l+GObMoy6S9qVw27naJU6pOw=; b=OUJduL3Hp9PrYXAS7WiSY/LcH1 OzGr8ycxrYFQLqMLsxZp2JyY+1HhJQ3G1rEkjVVTPEmQByleh6sMMBuKozPsnpZzvwvvJJ3JLVXzN 8J0txZkz8lhtHI4Me/lysAATpn/bfPA9V/KGdeZAs/cZy4vtQmMIazip89Sw2atjKjJo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qjJHr-0075OV-24; Thu, 21 Sep 2023 15:00:07 +0200 Date: Thu, 21 Sep 2023 15:00:07 +0200 From: Andrew Lunn To: =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= Cc: Rob Herring , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Krzysztof Kozlowski , Conor Dooley , George McCollister , Florian Fainelli , Vladimir Oltean , Kurt Kanzenbach , Matthias Brugger , AngeloGioacchino Del Regno , Woojung Huh , UNGLinuxDriver@microchip.com, Linus Walleij , Alvin =?utf-8?Q?=C5=A0ipraga?= , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Marcin Wojtas , "Russell King (Oracle)" , Lars Povlsen , Steen Hegelund , Daniel Machon , Radhey Shyam Pandey , Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Geert Uytterhoeven , Magnus Damm , Maxime Chevallier , Nicolas Ferre , Claudiu Beznea , Marek Vasut , Claudiu Manoil , Alexandre Belloni , John Crispin , Madalin Bucur , Ioana Ciornei , Lorenzo Bianconi , Felix Fietkau , Horatiu Vultur , Oleksij Rempel , Alexandre Torgue , Giuseppe Cavallaro , Jose Abreu , Grygorii Strashko , Sekhar Nori , Shyam Pandey , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH net-next v2 07/10] dt-bindings: net: enforce phylink bindings on certain ethernet controllers Message-ID: References: <20230916110902.234273-1-arinc.unal@arinc9.com> <20230916110902.234273-8-arinc.unal@arinc9.com> <20230918181319.GA1445647-robh@kernel.org> <16710cf9-8911-4fed-8e2d-b19b581446c1@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16710cf9-8911-4fed-8e2d-b19b581446c1@arinc9.com> X-Spam-Status: No, score=0.2 required=5.0 tests=DATE_IN_PAST_03_06,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 21 Sep 2023 14:08:35 -0700 (PDT) > - Link descriptions must be required on ethernet controllers. We don't care > whether some Linux driver can or cannot find the PHY or set up a fixed > link without looking at the devicetree. That can lead to future surprises, and breakage. Something which is not used is not tested, and so sometimes wrong, and nobody knows. Say the driver is extended to a new device and actually does need to use this never before used information. You then find it is wrong, and you get a regression. We have had issues like this before. There are four rgmii phy-link modes. We have had PHY drivers which ignored one of those modes, it silently accepted it, but did not change the hardware to actually use that mode. The PHY continues to use its reset defaults or strapping, and it worked. A lot of device trees ended up using this mode. And it was not the same as reset defaults/strapping. And then somebody needed that fourth mode, and made it actually work. And all those boards wrongly using that mode broke. The lesson i learned from that episode is that anything in device tree must actually be used and tested. > Although I see dsa.yaml and dsa-port.yaml mostly consist of describing an > ethernet switch with CPU port(s), there're properties that are specific to > DSA, such as dsa,member on dsa.yaml and dsa-tag-protocol and label on > dsa-port.yaml. I would say dsa,member does describe the hardware. It provides two bits of information: Which cluster of switches does this switch belong to. You probably can derive it using the DSA links between switches, which is also a hardware property. But having it in device tree makes it simpler. Which switch is this within a cluster. You need to be able to say: Send this frame out Port X of switch Y. How does a switch know it is Y? It could be strapping, which is clearly a hardware property. dsa-tag-protocol is similar to phy-mode. It tells you the protocol running between the CPU port and the SoC master interface. You often can imply it, but again, it could be determined by strapping on the switch. label is an interesting one, and probably would not be accepted if it was proposed now. But it has been around a long time. It also does describe the hardware, it is what is printed on the case next to the RJ45. To make the user experience simpler, we then try to make the linux interface name match the label on the case. Andrew