From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42B112F25; Fri, 22 Sep 2023 12:41:15 +0000 (UTC) Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E9488F; Fri, 22 Sep 2023 05:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version: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-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=yvGliCzM7qR9cjwG6OFrxm7XoeY8chqa33iD7TfYF9g=; b=lZm9bmh9bX4vJV7N6gXQkI3orG zGDpsAFxG6Z8J3pwy7jZY5q9zdQBewF7xPzkwVqKcnIXeOpSMLDiT9vx91NXTJL4TKTDfqMxl8VmF 00A8OH6092aKIauO2XgRfqHFoT6s/Q949MDmsDVAKpowyBYFcwu71cpJcLQSreWpKQ3NtsiVHMwoh +Bt9QjogKZdkYYbb09Sm03zcoKIdFB2rRi1f2Z7BqckuRb1t0OcnP7aOwqqncjkWwJgBFYQO2zT90 bPYGmJc+fnBXeqB5Kc7zpYjRzqfIhLdY4TdjI3sN0w2JfpuF/l64bNxiSsOPpJ4SScHNBucvTZL1F Y9zblyZg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55764) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qjfSL-0006d7-0y; Fri, 22 Sep 2023 13:40:25 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qjfSD-0004Zz-QK; Fri, 22 Sep 2023 13:40:17 +0100 Date: Fri, 22 Sep 2023 13:40:17 +0100 From: "Russell King (Oracle)" To: =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , Rob Herring , Krzysztof Kozlowski Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Conor Dooley , George McCollister , Andrew Lunn , 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 , 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 00/10] define and enforce phylink bindings Message-ID: References: <20230916110902.234273-1-arinc.unal@arinc9.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230916110902.234273-1-arinc.unal@arinc9.com> Sender: Russell King (Oracle) 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_BLOCKED, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On Sat, Sep 16, 2023 at 02:08:52PM +0300, Arınç ÜNAL wrote: > Hello there. > > This patch series defines phylink bindings and enforces them for the > ethernet controllers that need them. > > Some schemas had to be changed to properly enforce phylink bindings for all > of the affected ethernet controllers. Some of the documents of these > ethernet controllers were non json-schema, which had to be converted. > > I will convert the remaining documents to json-schema while this patch > series receives reviews. I can't say that I'm comfortable with this. We appear to be defining bindings based on software implementation, and a desire for the DT tooling to enforce what the software implementation wants. Isn't this against the aims of device tree and device tree binding documentation? Seems to me like feature-creep. The bindings that phylink parses are already documented in the ethernet controller yaml document. Specifically: - phylink does not parse the phy-mode property, that is left to the implementation to pass to phylink, which can implement it any which way they choose (and even default to something.) - phylink does not require a phy property - phylink does expect a PHY to be attached, but how that PHY is attached is up to the ethernet controller driver. It may call one of the phylink functions that parses the phy property, or it may manually supply the phy device to phylink. Either way, phylink does not itself require a PHY property. - phylink does not require a sfp property - this obviously is optional. So, all in all, ethernet-controller already describes it, and to create a DT binding document that pretends that phylink requires any of this stuff is, in my mind, wrong. DSA requires certain properties by dint of the parsing and setup of phylink being in generic code - this is not because phylink requires certain properties, but phylink does require certain information in order to function correctly. The issue here is _how_ phylink gets that information, and as I state above, it _can_ come from DT, but it can also be given that information manually. As an example, there are plenty of drivers in the tree which try to parse a phy node, and if that's not present, they try to see if a PHY exists at a default# bus address. We seem to be digging outselves a hole here, where "phylink must have these properties". No, that is wrong. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!