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=-3.8 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 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 A4A1CC56202 for ; Fri, 20 Nov 2020 10:59:53 +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 1B33520888 for ; Fri, 20 Nov 2020 10:59:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="syb/2iYV"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=waldekranz-com.20150623.gappssmtp.com header.i=@waldekranz-com.20150623.gappssmtp.com header.b="hOJ7S3VT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B33520888 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=waldekranz.com 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:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A0iVt0sZ3UQECycQSaFhMjJXThxXuk/MdXE8SSG20A0=; b=syb/2iYVVAiTIRE+smEN+LEkB WtNGy7YTtObIxby3qcc5qEGRFLqHc6VnBXTetkBqLSHeX6OJMgm41oBeQC2G+DruEibWbJSdG3D4M pnl7oQkApOxNp23CsdFqhWVPD3isf5K7dxFwCZjF5djMZXXmpyGzcfLECjDeXfLcumMGbWnqEIDjX sGfj+r1uPoKnycgJW4NIBs9OYOHUKZ1PwFwLdVVuiyk9tkfLSKRAn9x+ImKKwDKNnAxfLOaZCLRlw LbyVqZTtPrvOa2Mkt5jP7skJoc92HCZd0NJANCSv8lyG72i3mQugQcMhq3rbTbddQgAbqlgYXo+Th Ed3vD0SMw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg48Q-0005Vh-Vw; Fri, 20 Nov 2020 10:59:23 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg48O-0005Us-3U for linux-arm-kernel@lists.infradead.org; Fri, 20 Nov 2020 10:59:21 +0000 Received: by mail-lj1-x22c.google.com with SMTP id v20so9592928ljk.8 for ; Fri, 20 Nov 2020 02:59:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waldekranz-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=VE3SKMnKAFGE067VakEXuJ8H9MwGwlsemZ4gpXwcpHI=; b=hOJ7S3VTOuFmgUr9f+dT4L4zn/tWYiucQplGT4vxNqAQxtjYhca2QPRrNlJUHfkGbT nH/ZFCkF988Ai7c6yHSKCcvJwCCFxfyv1YeSqtfF07nvvWKLkiU5ukOPWZRV7q9/kO+7 o9SYMmXmIwBtndcXllA3L2LE7tnPijX4A+2GtKVyanThQ1jHQUf0x8IozRMJy0Pqyq/r aYCHbzP1RrW46ISCZLuEizPVsmChgJZIGAzsffSv/g2+Cfy7gRhcPxgMJ0xojlmhnWYQ vdhGkEvyo+Ka43Z3ydNyujZIZcKY9LFn5RdrtF4lVn/G4tqpxsQEqpxVGZ0s9uKBzriD l7lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=VE3SKMnKAFGE067VakEXuJ8H9MwGwlsemZ4gpXwcpHI=; b=MWPqJvFW/lAZ8nC5bt0sv2dNGVCGWNGTWHyBNr8rf1sFXUdcTlTE1ovFqtZxwSfTTT QfhRsRPyMuHiPHHzwG85Sfrgd06rvLpgGWCW/QbfSqgBDlCpw3qcNqsO4Qu7/QeyMKwk RKsvHbaw29oPOW6bPhMifn/WMxQf2UXUMjjTHcthOTnD+VCxkwNtDPUEprCjewWmHckA AntHcYnAAuwFKiflGR7+vocU0l+C68tqefNURLvx5v7XOAxUZk09SKYm9MUvPJ7M2owv cJvFYQSuFv4vUsygSy5gZAzZxo1qm9tSAzzImBjGaExTK+10yVHpQD6wPWx13XQBUShG pHdw== X-Gm-Message-State: AOAM531TM1aHkm4xPyPlklHTz5eDLCI0kxQhGRahwbQtcNp+aHlmNR18 q8kpBA1OD1ICVSbdInaXni4TCfSEuG8I8nG6 X-Google-Smtp-Source: ABdhPJzxNBVRuOSmrXTM7ICN6C7XrMyB/FroMhtdaC51kElsfjxb4NhyeKKncEuzZ6uSHUxObMykEQ== X-Received: by 2002:a2e:240e:: with SMTP id k14mr8216666ljk.332.1605869957788; Fri, 20 Nov 2020 02:59:17 -0800 (PST) Received: from wkz-x280 (static-193-12-47-89.cust.tele2.se. [193.12.47.89]) by smtp.gmail.com with ESMTPSA id r16sm304095lfi.121.2020.11.20.02.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 02:59:17 -0800 (PST) From: Tobias Waldekranz To: Russell King - ARM Linux admin , Maxime Chevallier Subject: Re: net: phy: Dealing with 88e1543 dual-port mode In-Reply-To: <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> <20201120102538.GP1551@shell.armlinux.org.uk> Date: Fri, 20 Nov 2020 11:59:16 +0100 Message-ID: <8736149tvf.fsf@waldekranz.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_055920_277197_685CB2A4 X-CRM114-Status: GOOD ( 22.03 ) 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 , "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:25, Russell King - ARM Linux admin wrote: > 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" >> }; >> }; >> }; Yeah that looks even better. Though "pairs" is redundant if you can specify the list of supported link modes. I guess not specifying "media" should mean "use all modes supported by the PHY". And if, for example, media is set to 10-T+100-TX, that means that only two pairs will be used. > 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. Maybe "max-speed" is how you solve this in the absense of explicit an MDI declaration? Because in the multi-port case, the setting could be different for the two ports, so you would source the information from the "media" property instead. > 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. Yeah I half-regretted putting that in there right after I hit "send" :) It should definitely be configurable from ethtool. > However, there may be scope for DT to be able to specify the default > preferred media. This is where I was coming from. The vendor could potentially have more information on what the default should be. But I guess you could also argue that there is value in having Linux behave the same across all devices. _______________________________________________ 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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 6D5F9C5519F for ; Fri, 20 Nov 2020 10:59:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0833D20888 for ; Fri, 20 Nov 2020 10:59:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=waldekranz-com.20150623.gappssmtp.com header.i=@waldekranz-com.20150623.gappssmtp.com header.b="hOJ7S3VT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725952AbgKTK7U (ORCPT ); Fri, 20 Nov 2020 05:59:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbgKTK7T (ORCPT ); Fri, 20 Nov 2020 05:59:19 -0500 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C003C0613CF for ; Fri, 20 Nov 2020 02:59:19 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id x9so9591040ljc.7 for ; Fri, 20 Nov 2020 02:59:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waldekranz-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=VE3SKMnKAFGE067VakEXuJ8H9MwGwlsemZ4gpXwcpHI=; b=hOJ7S3VTOuFmgUr9f+dT4L4zn/tWYiucQplGT4vxNqAQxtjYhca2QPRrNlJUHfkGbT nH/ZFCkF988Ai7c6yHSKCcvJwCCFxfyv1YeSqtfF07nvvWKLkiU5ukOPWZRV7q9/kO+7 o9SYMmXmIwBtndcXllA3L2LE7tnPijX4A+2GtKVyanThQ1jHQUf0x8IozRMJy0Pqyq/r aYCHbzP1RrW46ISCZLuEizPVsmChgJZIGAzsffSv/g2+Cfy7gRhcPxgMJ0xojlmhnWYQ vdhGkEvyo+Ka43Z3ydNyujZIZcKY9LFn5RdrtF4lVn/G4tqpxsQEqpxVGZ0s9uKBzriD l7lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=VE3SKMnKAFGE067VakEXuJ8H9MwGwlsemZ4gpXwcpHI=; b=ji3APWap3ovnRvpPmM6gG6SLm2C6hyz7sts3qggMOyuy59QUsmEIzPwVkqivALO+JP 2jHVUD/A1zvjwiOwommwbO+JNKxEnalll4lEIk0+rdGjPQHWbgZ3O9XlmPgLole36PQa Vr6b4IJTzt78xvVJ/UjGNQKol1HuMxBS6nLxxlnKsmicwcOh/A1LxzCjsVhIrl9RvUQW iDtEtdkG+qW0J4rdZ6rCIYR42MZXHUwsphhhwyn7S2U7qGrL2DEYUXfWPNBlz0DKjtMv eCiwHytDFE4/pf8tclzt4eGNNK2ltkdD9AcSQb9ZInfM+chOsMxEPNf/Cng5slZ9l4AZ M7aA== X-Gm-Message-State: AOAM53252en3Ax0M6PUy9bPA+d54LsXt1kjMNUyGA9+q2AKl0dYEiI7j PvxLDeiNcVoqvopLxPKTo5zhnaVkwZ1BGI+z X-Google-Smtp-Source: ABdhPJzxNBVRuOSmrXTM7ICN6C7XrMyB/FroMhtdaC51kElsfjxb4NhyeKKncEuzZ6uSHUxObMykEQ== X-Received: by 2002:a2e:240e:: with SMTP id k14mr8216666ljk.332.1605869957788; Fri, 20 Nov 2020 02:59:17 -0800 (PST) Received: from wkz-x280 (static-193-12-47-89.cust.tele2.se. [193.12.47.89]) by smtp.gmail.com with ESMTPSA id r16sm304095lfi.121.2020.11.20.02.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 02:59:17 -0800 (PST) From: Tobias Waldekranz To: Russell King - ARM Linux admin , Maxime Chevallier Cc: 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 In-Reply-To: <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> <20201120102538.GP1551@shell.armlinux.org.uk> Date: Fri, 20 Nov 2020 11:59:16 +0100 Message-ID: <8736149tvf.fsf@waldekranz.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Nov 20, 2020 at 10:25, Russell King - ARM Linux admin wrote: > 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" >> }; >> }; >> }; Yeah that looks even better. Though "pairs" is redundant if you can specify the list of supported link modes. I guess not specifying "media" should mean "use all modes supported by the PHY". And if, for example, media is set to 10-T+100-TX, that means that only two pairs will be used. > 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. Maybe "max-speed" is how you solve this in the absense of explicit an MDI declaration? Because in the multi-port case, the setting could be different for the two ports, so you would source the information from the "media" property instead. > 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. Yeah I half-regretted putting that in there right after I hit "send" :) It should definitely be configurable from ethtool. > However, there may be scope for DT to be able to specify the default > preferred media. This is where I was coming from. The vendor could potentially have more information on what the default should be. But I guess you could also argue that there is value in having Linux behave the same across all devices.