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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 70E71C282C3 for ; Thu, 24 Jan 2019 20:15:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30407217D7 for ; Thu, 24 Jan 2019 20:15:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nic.cz header.i=@nic.cz header.b="PiRL1zSg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729334AbfAXUPf (ORCPT ); Thu, 24 Jan 2019 15:15:35 -0500 Received: from mail.nic.cz ([217.31.204.67]:35286 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730023AbfAXTYT (ORCPT ); Thu, 24 Jan 2019 14:24:19 -0500 Received: from localhost (unknown [172.20.6.218]) by mail.nic.cz (Postfix) with ESMTPS id AA267632AC; Thu, 24 Jan 2019 20:24:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1548357856; bh=Kxjqf3grNSyUz4rl6ZESVQAOz1EoMTnP9Npqyx9k1f8=; h=Date:From:To; b=PiRL1zSgyvDG4+W9BJo7LkaUDXQJLFpybFsNRGZAieCARj2XUHKEQB0HBa+TRqaBK zBotzWPQKvJSdYSG5kGEK75Foq8kXKWueyTMaH/isRZQQ3LgYNp5tY34/fx9Rl/V4O JoycPv7KxhWHLQIBkp65qJzeeakKAQK30PNNuOLs= Date: Thu, 24 Jan 2019 20:24:03 +0100 From: Marek Behun To: Andrew Lunn Cc: netdev@vger.kernel.org, Florian Fainelli , David Miller Subject: Re: [PATCH net-next v1 1/2] net: dsa: mv88e6xxx: Default CMODE to 1000BaseX only on 6390X Message-ID: <20190124202403.0d15ec6f@nic.cz> In-Reply-To: <20190124181159.GL482@lunn.ch> References: <20190124154309.24987-1-marek.behun@nic.cz> <20190124161147.GG482@lunn.ch> <20190124172916.66e15b29@nic.cz> <20190124164805.GJ482@lunn.ch> <20190124190451.40af3127@nic.cz> <20190124181159.GL482@lunn.ch> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 24 Jan 2019 19:11:59 +0100 Andrew Lunn wrote: > On Thu, Jan 24, 2019 at 07:04:51PM +0100, Marek Behun wrote: > > What properties does the cpu port node need to contain to force it? > > phy-mode = "2500base-x"; is not enough. > > Hi Marek > > For DSA ports we have: > > phy-mode = > "rgmii-txid"; fixed-link { > speed = > <1000>; full-duplex; > }; > > See dsa_port_fixed_link_register_of() > > Andrew Hi Andrew, the configuration phy-mode = "2500base-x"; fixed-link { speed = <2500>; full-duplex; }; does not work, because swphy does not support speed=2500 (only 10, 100 and 1000). managed = "in-band-status"; does not work either. If I use speed = <1000>, then the swphy is created correctly, cmode is set correctly to 2500base-x, but speed register on the port is set to 1000, and the connection does not work. The easiest way would probably be to implement swphy to support speed 2500. But I don't know what values should the simulated PHY registers contain... The function dsa_port_fixed_link_register_of creates this phy device, adjusts the link and then calls put_device(&phydev->mdio.dev); Does this mean that the phy device is immediately destroyed? Marek