Received: by 10.223.176.46 with SMTP id f43csp1145577wra; Sat, 20 Jan 2018 11:54:01 -0800 (PST) X-Google-Smtp-Source: AH8x226TbfTdSTR0HvYUmDcAYn0gnBdxxshMAD5sFTx16XYwROkdexTuteONNzHWdS1XhK2YER6X X-Received: by 10.101.86.73 with SMTP id m9mr2848759pgs.70.1516478040919; Sat, 20 Jan 2018 11:54:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516478040; cv=none; d=google.com; s=arc-20160816; b=zbNPG2Q2oNuk72p+BgtYEolsQs/4jTEWTD5iyRFlfO8Vme+SpFcS0zzGKb7a0eU2r9 4jjmJE6qd7YZr1+c6XCrj4IkmGjId07Xn6smSdRCa0w2GLh951JJvUELnQnqM+VslcRx BhjTPVt5w0/da37y4otnAxzNyDAvUB75D8vgExcP3U3pQU9l4MhVyPuNuAHVqKxWpk2R x2/jU8xmrHElLX3/HYIhrmaAszESliTTC0kl2rvtJ7iQ9q8+HIcLri3Av+UYsDin8qN6 etUhLROyO8GkLQtFs01ZOtBylrNFJ2tjYJ+wqnrA1irRwYekavNCsnZdpfn1VmaUDOvc n6NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ooZNPOSSjkbcnIOiQycsX9/u0we6Ips0t/EpFU6Fph0=; b=0l8BrKZCh5U682RtWnlgm2Nie7zedTstfSyebGUZw7FvR5qauysTzR5yEJEO8ZiD3Z 0SRTOLCVcWKwBAQrYrOu73qYZYwrXTNMolK3+8m9l3EoL8x6Ns2YXit6XWo98SsIgQvS wXuka8fen6H+CTA1wM6suHUgCDB0NCqbF6gYtdis84SNe8MrT6hVciU4JHwOXAgGbcUZ CpNyU125fyzp7jWry6+m6agjVwA8yERHFU58dq7yNCoU8QXafR7YAHDbWG4eXyNECFD8 EQsBaD+9P6hfzhxVnvQFzPp4k2bu1WjrncBBGr5PQeJ5rU4waitfpldBtC901X3X6mkH LohA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si12036171pfb.23.2018.01.20.11.53.46; Sat, 20 Jan 2018 11:54:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756652AbeATTxE (ORCPT + 99 others); Sat, 20 Jan 2018 14:53:04 -0500 Received: from mga03.intel.com ([134.134.136.65]:56313 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756422AbeATTwy (ORCPT ); Sat, 20 Jan 2018 14:52:54 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jan 2018 11:52:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,387,1511856000"; d="scan'208";a="11910288" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga008.fm.intel.com with SMTP; 20 Jan 2018 11:52:46 -0800 Received: by lahna (sSMTP sendmail emulation); Sat, 20 Jan 2018 21:52:46 +0200 Date: Sat, 20 Jan 2018 21:52:46 +0200 From: Mika Westerberg To: Marcin Wojtas Cc: Lorenzo Pieralisi , Graeme Gregory , Andrew Lunn , 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 , Antoine T?nart , Thomas Petazzoni , Gregory CLEMENT , Ezequiel Garcia , Nadav Haklai , Neta Zur Hershkovits , Grzegorz Jaszczyk , Tomasz Nowicki , Hanjun Guo , Sudeep Holla Subject: Re: [net-next: PATCH 0/8] Armada 7k/8k PP2 ACPI support Message-ID: <20180120195246.GC27654@lahna.fi.intel.com> References: <20180108145312.GH10940@lunn.ch> <20180108151453.GB31502@xora-haswell> <20180108154243.GA30962@lunn.ch> <20180109101941.GD31502@xora-haswell> <20180109130012.GA27447@lunn.ch> <20180118123141.GA2839@e107981-ln.cambridge.arm.com> <20180118130026.GG32299@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 19, 2018 at 07:07:29PM +0100, Marcin Wojtas wrote: > Hi Mika, Hi, > 2018-01-18 14:00 GMT+01:00 Andrew Lunn : > >> I CC'ed Mika since he is more familiar with handling these bits of ACPI > >> specs - I wonder whether this is a problem that cropped up on x86 > >> systems too. > > > > Hi Lorenzo > > > > There is nothing about MDIO, PHYs, Ethernet switches, etc in version > > 6.2 of the spec. If x86 has this, it must be after 6.2 was released. > > I would not be too surprised if x86 has none of this. If you look at > > the typical drives used on x86, i210, e1000e, ixgb, r8169, etc. They > > are all PCI devices, and hide all this. > > > >> I do not think there is one and only answer but there must be a single > >> set of bindings and if the ACPI specs already cater for some of them > >> we have to reuse them. > > > > Agreed. Due diligence so far suggests there is nothing already > > defined. But im a newbie to ACPI, so could be looking in the wrong > > place. I really hope there is somebody like Rob Herring, the DT > > maintainer, who keeps an eye on all ACPI talk and would tell us if we > > are heading off in the wrong direction. > > > > My initial approach with MDIO bus with PHYs as child nodes was super > easy to describe and handle in Linux - please refer to: > - typical representation of mdio bus with the phys - > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/mdio.txt?h=v4.15-rc8 > - my patches in the initial series > However I guess it would be more proper to use the > GenericSerialBus-based description, as advised in ACPI Spec. The > question is, whether we should define new type of a bus or not > (MdioSerialBus, similar to e.g. I2cSerialBus). I'm not familiar with MDIO bus but an alternative to GeneriSerialBus would be to follow what SDIO is doing, e.g have the PHY devices listed below the MDIO controller and use _ADR to describe their "address" on that bus. You can see how _ADR applies to SDIO bus from ACPI spec. Of course ACPI spec should then be updated accordingly to describe what _ADR means for devices on MDIO bus. > Since I have a code that can be tested and easily modified to use > different ACPI approaches with real platform MDIO controller > (mvmdio.c) and NIC (mvpp2.c), in coming weeks I may be able to find > some time to prepare a proof of concept based on GenericSerialBus. > Please expect some RFC patches hopefully right after the coming merge > window is closed. > > Of course, if I come up on some ACPI - specific implementation > questions, I won't hesitate to ask in this thred. I will also > appreciate any hints. For now my two main concerns are: > - The PHY address on the mdio bus - should it be put into _CRS -> > GenericSerialBus() field or separate _ADR? I'd lean towards first > option. > - The PHY type - in Linux it's resolved basing on two generic > compatible strings > (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/phy.txt?h=v4.15-rc8). > I'd put it as a sort of ID into GenericSerialBus(). If you agree - any > specific filed that you would try to use? If you go with the SDIO way then each PHY is described as normal ACPI device and you can use ACPI _HID/_CID to match the device to the corresponding driver. > Do I understand correctly that the MDIO controller node should > comprise OperationRegion() definition of the GenericSerialBus? I don't think OpRegions are useful in this case because they are mainly used to allow BIOS AML code to access the hardware through OS driver.