From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753849AbdBAWNc (ORCPT ); Wed, 1 Feb 2017 17:13:32 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:51663 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753609AbdBAWNa (ORCPT ); Wed, 1 Feb 2017 17:13:30 -0500 X-Auth-Info: 2mJhzqR3gDF0+Cl4lhdg4KC2mTwLsS5pb2qRRR2Me3M= Date: Wed, 1 Feb 2017 23:13:23 +0100 From: Lukasz Majewski To: Andrew Lunn Cc: Florian Fainelli , 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: <20170201231323.732dd327@jawa> In-Reply-To: <20170201211440.GG7395@lunn.ch> References: <1485960215-5148-1-git-send-email-lukma@denx.de> <20170201171610.GC7395@lunn.ch> <2f3766f0-42df-6aab-dda1-14022c57fb30@gmail.com> <20170201220500.29d478aa@jawa> <20170201211440.GG7395@lunn.ch> 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 Hi Andrew, > > 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. > > Looking at the datasheet, PORT_MIRROR_EN defaults to 0. So it seems > reasonable to unconditionally set it to 0 when the PHY driver > loads. Any device which needs a value of 1 can set "net-phy-lane-swap" Unconditionally setting this field to 0 (as we expect the reset default setting) seems to me like a good solution. However, I was not sure if such approach is acceptable by the community. > > Andrew 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