Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935895AbcJUQAJ (ORCPT ); Fri, 21 Oct 2016 12:00:09 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:35151 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934895AbcJUQAG (ORCPT ); Fri, 21 Oct 2016 12:00:06 -0400 Subject: Re: [RFC PATCH 08/13] dwmac-meson8b: add support for phy selection To: Andrew Lunn References: <1477060838-14164-1-git-send-email-narmstrong@baylibre.com> <1477060838-14164-9-git-send-email-narmstrong@baylibre.com> <20161021155408.GR16974@lunn.ch> Cc: khilman@baylibre.com, carlo@caione.org, linus.walleij@linaro.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org From: Neil Armstrong Organization: Baylibre Message-ID: Date: Fri, 21 Oct 2016 17:59:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20161021155408.GR16974@lunn.ch> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 872 Lines: 23 On 10/21/2016 05:54 PM, Andrew Lunn wrote: > On Fri, Oct 21, 2016 at 04:40:33PM +0200, Neil Armstrong wrote: >> The Meson GXL dwmac Glue Layer also provides switching between an external PHY >> and an internal RMII 10/100 PHY. >> Add a way to setup the correct PHY switching from a device tree attribute. > > Humm, actually. Maybe PHY_IS_INTERNAL in the phydrv->flags is the > better solution. The MAC can then use phy_is_internal(ndev->phydev) to > decide if this register needs programming. > > Andrew > Hi Andrew, Yes this would be a good idea if we were able to scan the internal and external PHYs at the same time, but with our limited knowledge the values we write in the register seems to switch a mux for the whole RMII and MDIO signals to either interface. Do you have knowledge if this case is already handled upstream ? Thanks for your help, Neil