From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751829AbdBAVFN (ORCPT ); Wed, 1 Feb 2017 16:05:13 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:58419 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192AbdBAVFK (ORCPT ); Wed, 1 Feb 2017 16:05:10 -0500 X-Auth-Info: GG3Ech8KF+4ackICkfg6l5JS1GWHmmfVS+o6DKNBGes= Date: Wed, 1 Feb 2017 22:05:00 +0100 From: Lukasz Majewski To: Florian Fainelli Cc: Andrew Lunn , Rob Herring , Mark Rutland , "David S. Miller" , Mugunthan V N , Karicheri Muralidharan , linux-kernel@vger.kernel.org, Eric Engestrom , netdev@vger.kernel.org, Kishon Vijay Abraham I , Grygorii Strashko , devicetree@vger.kernel.org Subject: Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867 TI's PHY driver Message-ID: <20170201220500.29d478aa@jawa> In-Reply-To: <2f3766f0-42df-6aab-dda1-14022c57fb30@gmail.com> References: <1485960215-5148-1-git-send-email-lukma@denx.de> <20170201171610.GC7395@lunn.ch> <2f3766f0-42df-6aab-dda1-14022c57fb30@gmail.com> Organization: denx.de X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear All, Thanks for prompt reply. > On 02/01/2017 09:16 AM, Andrew Lunn wrote: > > On Wed, Feb 01, 2017 at 03:43:35PM +0100, Lukasz Majewski wrote: > >> This patch adds support for enabling or disabling the port > >> mirroring feature of the DP83867 TI's PHY device. > >> > >> One use case is when bootstrap configuration enables this feature > >> (because of e.g. LED wiring) so then one needs to disable it in > >> software (u-boot/Linux). > > > > Hi Lukasz > > > > How does this differ from "enet-phy-lane-swap"? > > Same here, I am confused about what port mirroring could be meaning > here The "net-phy-lane-swap" when defined indicates that the "lane swap" needs to be enabled. This is a simple bool variable. In my case it would mean: "please enable port mirroring -> write 1 to CFG4 register's PORT_MIRROR_EN field" My use case is unfortunately different: - Due to HW design - during the bootstrap PHY phase - the PHY enables "port mirroring", which is incorrect. Then, in SW I do need to explicitly disable port mirroring (write 0 to PORT_MIRROR_EN field in CFG4 register). > and if we can find a better way to describe what is being added. > Thanks! We would need a tri-state device tree properly: 1. Not defined - do nothing 2. Defined as 0 -> explicitly disable port mirroring 3. Defined as 1 -> explicitly enable port mirriring The "net-phy-lane-swap" only fulfills points 1 and 3 above. In my use case I do need point 2. Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de