Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752861AbeACNg2 (ORCPT + 1 other); Wed, 3 Jan 2018 08:36:28 -0500 Received: from mail-it0-f51.google.com ([209.85.214.51]:34989 "EHLO mail-it0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751329AbeACNgX (ORCPT ); Wed, 3 Jan 2018 08:36:23 -0500 X-Google-Smtp-Source: ACJfBovUvHfQuAI7KCBm7hj8K439EBT3QWSvtf5ZEzrRttssTssOz+wQbL3/pJOyHoh4VjnsP1tlxBIAbHXZaIxXF/s= MIME-Version: 1.0 In-Reply-To: <20180103133341.GJ15036@lunn.ch> References: <1513588684-15647-1-git-send-email-mw@semihalf.com> <20180103110048.GA21230@xora-haswell> <20180103124720.GG15036@lunn.ch> <20180103133341.GJ15036@lunn.ch> From: Marcin Wojtas Date: Wed, 3 Jan 2018 14:36:22 +0100 Message-ID: Subject: Re: [net-next: PATCH 0/8] Armada 7k/8k PP2 ACPI support To: Andrew Lunn Cc: Graeme Gregory , Ard Biesheuvel , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "" , "David S. Miller" , Russell King - ARM Linux , "Rafael J. Wysocki" , Florian Fainelli , =?UTF-8?Q?Antoine_T=C3=A9nart?= , Thomas Petazzoni , Gregory CLEMENT , Ezequiel Garcia , Nadav Haklai , Neta Zur Hershkovits , Grzegorz Jaszczyk , Tomasz Nowicki Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 2018-01-03 14:33 GMT+01:00 Andrew Lunn : > On Wed, Jan 03, 2018 at 02:13:09PM +0100, Marcin Wojtas wrote: >> Hi Andrew, >> >> 2018-01-03 13:47 GMT+01:00 Andrew Lunn : >> >> I already agreed with 'reg' being awkward in the later emails. >> >> Wouldn't _ADR be more appropriate to specify PHY address on MDIO bus? >> > >> > Also, how do you specify which MDIO bus the PHY is on. To fully >> > specify a PHY, you need both bits of information. >> > >> > In DT, the phy-handle phandle can point to any PHY anywhere in the >> > system. This is particularly important when a Ethernet device has two >> > MDIO busses. >> > >> >> For now, my local MDIO bus description is pretty DT-like, i.e. master >> bus with children PHYs: >> Device (MDIO) >> { >> Name (_HID, "MRVL0100") // >> _HID: Hardware ID >> Name (_UID, 0x00) // >> _UID: Unique ID >> Name (_CRS, ResourceTemplate () >> { >> Memory32Fixed (ReadWrite, >> 0xf212a200, // Address Base >> 0x00000010, // >> Address Length >> ) >> }) >> Device (GPHY) >> { >> Name (_ADR, 0x0) >> } >> } >> >> Device (XSMI) >> { >> Name (_HID, "MRVL0101") // >> _HID: Hardware ID >> Name (_UID, 0x00) // >> _UID: Unique ID >> Name (_CRS, ResourceTemplate () >> { >> Memory32Fixed (ReadWrite, >> 0xf212a600, // Address Base >> 0x00000010, // >> Address Length >> ) >> }) >> Device (PHY0) >> { >> Name (_ADR, 0x0) >> Name (_CID, "ethernet-phy-ieee802.3-c45") >> } >> Device (PHY8) >> { >> Name (_ADR, 0x8) >> Name (_CID, "ethernet-phy-ieee802.3-c45") >> } >> } >> >> Which is referenced in the port's node: >> >> Package () { "phy", Package (){\_SB.XSMI.PHY0}}, > > Hi Marcin > > This reference looks good, giving both the bus and the PHY on the bus. > > I assume you can use references like this within the Device (PHY8) > node? Yes. > You need to be able to reference a GPIO used for resetting the > PHY. And you also need to reference a GPIO at the Device (MDIO) level > for resetting all the PHYs on the MDIO bus. > Yes, for full support of PHYs the GPIO must be supported, as well as the PHY's IRQs. Best regards, Marcin