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 DFC7DC6FD1C for ; Wed, 22 Mar 2023 20:25:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231487AbjCVUZS (ORCPT ); Wed, 22 Mar 2023 16:25:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231444AbjCVUZA (ORCPT ); Wed, 22 Mar 2023 16:25:00 -0400 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 4F6EC82378; Wed, 22 Mar 2023 13:14:49 -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-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=Zye6d4aX+TBkumPKbWjfs7L/UL+RdIHbbdkXwebroT0=; b=Sa351ASzIH4onnijKW5mpfaj6U VW9NW69OiSPxKWcf6dvZd/qbK1Vfeh9wQ1SouktmsdN7Mz+VWH9C1uWxnuMiqKo9XX83q/UTLQ3lX dH3BBRHuuoHt/vbZq7KS9hoCr/ZpqEsQZABFxAj14mYhQzZUYJa/gqX3RYNOUGorAovQOcu1bJplV 0huYNFeWB4uMMX6lIIEkBlIXmuEWm8FJEWl8z0kGnX2T9t26CgKFjibVlgWuWdLuY4OQkVrP8RR7l fhP2dfYztOq89kr7HG/B9W1yg58VcXlooIQm7/vTOp1HlvNCaEXvALw3hgZl7v9X+4kDJ6FLcOix9 l4LQrEEA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:39964) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pf4qG-0003r5-PL; Wed, 22 Mar 2023 20:13:52 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pf4qF-0000ea-Lx; Wed, 22 Mar 2023 20:13:51 +0000 Date: Wed, 22 Mar 2023 20:13:51 +0000 From: "Russell King (Oracle)" To: Andrew Lunn Cc: Heiner Kallweit , Andy Shevchenko , Daniel Scally , "David S. Miller" , Eric Dumazet , Florian Fainelli , Greg Kroah-Hartman , Heikki Krogerus , Jakub Kicinski , linux-acpi@vger.kernel.org, netdev@vger.kernel.org, Paolo Abeni , "Rafael J. Wysocki" , Sakari Ailus , Vladimir Oltean Subject: Re: [PATCH RFC net-next 6/7] net: dsa: mv88e6xxx: provide software node for default settings Message-ID: References: <04869523-3711-41a6-81ba-ddf2b12fd22e@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <04869523-3711-41a6-81ba-ddf2b12fd22e@lunn.ch> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Mar 22, 2023 at 07:57:19PM +0100, Andrew Lunn wrote: > > +static struct fwnode_handle *mv88e6xxx_port_get_fwnode(struct dsa_switch *ds, > > + int port, > > + struct fwnode_handle *h) > > +{ > > + struct mv88e6xxx_chip *chip = ds->priv; > > + struct device_node *np, *phy_node; > > + int speed, duplex, err; > > + phy_interface_t mode; > > + struct dsa_port *dp; > > + unsigned long caps; > > + > > + dp = dsa_to_port(ds, port); > > + if (dsa_port_is_user(dp)) > > + return h; > > + > > + /* No DT? Eh? */ > > + np = to_of_node(h); > > + if (!np) > > + return h; > > I've not looked at the big picture yet, but you can have a simple > switch setup without DT. I have a couple of amd64 boards which use > platform data. The user ports all have internal PHYs, and the CPU port > defaults to 1G, it might even be strapped that way. Are you suggesting that we should generate some swnode description of the max interface mode and speed if we are missing a DT node? I'm not seeing any port specific data in the mv88e6xxx platform data. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!