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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A58BC5519F for ; Fri, 20 Nov 2020 10:26:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7FE8D22210 for ; Fri, 20 Nov 2020 10:26:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="On5Nie6S"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="FSekwy7D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FE8D22210 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=7P9TMuar7W/ejzpqOt5okD6OTrGJp3UNciDVLBafpVY=; b=On5Nie6SOCRNvfRruGyYKM6AC fAy/94D3yBkUDJPuJ0aMAYeoNeng/whs72IbUkwooFpB5SuvmfvmbksaoCk42SOc+zdddir5oWyog uSEK8GrtXGB4Bd36yYdN3I9HN6hxv3rnC1dYQVqqN/5j25GWN2Y9nQ5RWl5cqwSv8givk+mJgUx/L FR6Ix4sv9rWx2GkgQrjEDhUZwqVuifIFdYOHlT9x7csm//in7w3hzoNASUy5CNN4qUFyFp6OLuNdF p8VZMy7YBD7Uvr9CMTUn0VPetKghnIzdISk/kqWM/9PtH4RxLm3gksw2v8zZXxEkB/NOjcTps6mGi D18QSi4dA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg3bz-0000go-5I; Fri, 20 Nov 2020 10:25:51 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg3bw-0000fX-Hr for linux-arm-kernel@lists.infradead.org; Fri, 20 Nov 2020 10:25:49 +0000 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=cbnfcg8hQqdklPCgA3Zf7SeXW0nLdy3GH5PLOygQOcc=; b=FSekwy7DqS/B558Ca+priXqph sbVvcFKh/liKbrvl4Dwrp5F6hs+/5vWdJ7mWAr7wqpMTXKTwAqwL8Kgt9qxB5XnaVC9/SqEc63ufv 452Rpy2n5htKKscUTa5jp1M4HIPXhGBAjAOudI1W6mZKHVi6DbnCQD4hlS3ZVRI4yIIuYMC4Rt7A3 j86m7dbP88YddAjNp5CyyUL7sCjbjTOr1uEZ7RZUJV+luj19Jd0T0yWWAVCJ5c2K26j4+I65gP+3M ySxpmI/k2a9SeMsikbVABAvdro5YsaMsVEdRq/Eo0vM/q7GF3H1qbSgnP9suyPV9rQ8uSqJVNfuk3 ZNWoBKuGQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:33784) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kg3bp-0003L1-MW; Fri, 20 Nov 2020 10:25:41 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1kg3bm-00034e-7Y; Fri, 20 Nov 2020 10:25:38 +0000 Date: Fri, 20 Nov 2020 10:25:38 +0000 From: Russell King - ARM Linux admin To: Maxime Chevallier Subject: Re: net: phy: Dealing with 88e1543 dual-port mode Message-ID: <20201120102538.GP1551@shell.armlinux.org.uk> References: <20201119152246.085514e1@bootlin.com> <20201119145500.GL1551@shell.armlinux.org.uk> <20201119162451.4c8d220d@bootlin.com> <87k0uh9dd0.fsf@waldekranz.com> <20201119231613.GN1551@shell.armlinux.org.uk> <87eekoanvj.fsf@waldekranz.com> <20201120103601.313a166b@bootlin.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201120103601.313a166b@bootlin.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_052548_622726_FD086772 X-CRM114-Status: GOOD ( 16.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Florian Fainelli , netdev@vger.kernel.org, Antoine Tenart , Vivien Didelot , Thomas Petazzoni , Tobias Waldekranz , "David S. Miller" , linux-arm-kernel@lists.infradead.org, Heiner Kallweit 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 On Fri, Nov 20, 2020 at 10:36:01AM +0100, Maxime Chevallier wrote: > So maybe we could be a bit more generic, with something along these lines : > > ethernet-phy@0 { > ... > > mdi { > port@0 { > media = "10baseT", "100baseT", "1000baseT"; > pairs = <1>; > }; > > port@1 { > media = "1000baseX", "10gbaseR" > }; > }; > }; Don't forget that TP requires a minimum of two pairs. However, as Andrew pointed out, we already have max-speed which can be used to limit the speed below that which requires four pairs. I have untested patches that allow the 88x3310 to be reconfigured between 10GBASE-R and 1000BASE-X depending on the SFP connected - untested because the I2C pull-ups on the Macchiatobin boards I have are way too strong and it results in SFP EEPROM corruption and/or failure to read the EEPROM. > I also like the idea of having a way to express the "preferred" media, > although I wonder if that's something we want to include in DT or that > we would want to tweak at runtime, through ethtool for example. I think preferred media should be configurable through ethtool - which is preferred will be specific to the user's application. However, there may be scope for DT to be able to specify the default preferred media. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89D4DC5519F for ; Fri, 20 Nov 2020 10:25:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CAF5B22277 for ; Fri, 20 Nov 2020 10:25:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="FSekwy7D" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727522AbgKTKZr (ORCPT ); Fri, 20 Nov 2020 05:25:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbgKTKZq (ORCPT ); Fri, 20 Nov 2020 05:25:46 -0500 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 0B60FC0613CF for ; Fri, 20 Nov 2020 02:25:46 -0800 (PST) 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=cbnfcg8hQqdklPCgA3Zf7SeXW0nLdy3GH5PLOygQOcc=; b=FSekwy7DqS/B558Ca+priXqph sbVvcFKh/liKbrvl4Dwrp5F6hs+/5vWdJ7mWAr7wqpMTXKTwAqwL8Kgt9qxB5XnaVC9/SqEc63ufv 452Rpy2n5htKKscUTa5jp1M4HIPXhGBAjAOudI1W6mZKHVi6DbnCQD4hlS3ZVRI4yIIuYMC4Rt7A3 j86m7dbP88YddAjNp5CyyUL7sCjbjTOr1uEZ7RZUJV+luj19Jd0T0yWWAVCJ5c2K26j4+I65gP+3M ySxpmI/k2a9SeMsikbVABAvdro5YsaMsVEdRq/Eo0vM/q7GF3H1qbSgnP9suyPV9rQ8uSqJVNfuk3 ZNWoBKuGQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:33784) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kg3bp-0003L1-MW; Fri, 20 Nov 2020 10:25:41 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1kg3bm-00034e-7Y; Fri, 20 Nov 2020 10:25:38 +0000 Date: Fri, 20 Nov 2020 10:25:38 +0000 From: Russell King - ARM Linux admin To: Maxime Chevallier Cc: Tobias Waldekranz , Andrew Lunn , Vivien Didelot , Florian Fainelli , Heiner Kallweit , "David S. Miller" , Antoine Tenart , Thomas Petazzoni , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: net: phy: Dealing with 88e1543 dual-port mode Message-ID: <20201120102538.GP1551@shell.armlinux.org.uk> References: <20201119152246.085514e1@bootlin.com> <20201119145500.GL1551@shell.armlinux.org.uk> <20201119162451.4c8d220d@bootlin.com> <87k0uh9dd0.fsf@waldekranz.com> <20201119231613.GN1551@shell.armlinux.org.uk> <87eekoanvj.fsf@waldekranz.com> <20201120103601.313a166b@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201120103601.313a166b@bootlin.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King - ARM Linux admin Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Nov 20, 2020 at 10:36:01AM +0100, Maxime Chevallier wrote: > So maybe we could be a bit more generic, with something along these lines : > > ethernet-phy@0 { > ... > > mdi { > port@0 { > media = "10baseT", "100baseT", "1000baseT"; > pairs = <1>; > }; > > port@1 { > media = "1000baseX", "10gbaseR" > }; > }; > }; Don't forget that TP requires a minimum of two pairs. However, as Andrew pointed out, we already have max-speed which can be used to limit the speed below that which requires four pairs. I have untested patches that allow the 88x3310 to be reconfigured between 10GBASE-R and 1000BASE-X depending on the SFP connected - untested because the I2C pull-ups on the Macchiatobin boards I have are way too strong and it results in SFP EEPROM corruption and/or failure to read the EEPROM. > I also like the idea of having a way to express the "preferred" media, > although I wonder if that's something we want to include in DT or that > we would want to tweak at runtime, through ethtool for example. I think preferred media should be configurable through ethtool - which is preferred will be specific to the user's application. However, there may be scope for DT to be able to specify the default preferred media. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!