Received: by 10.223.176.46 with SMTP id f43csp1344701wra; Fri, 19 Jan 2018 10:08:18 -0800 (PST) X-Google-Smtp-Source: ACJfBot2+DlTiitz5/zHf6EEP1YkqrsLG4+aNk6B2nSS5ZkmH6dPQAQ/dqgMm93q4ftUs1rTM2+f X-Received: by 10.98.73.76 with SMTP id w73mr24395521pfa.61.1516385298722; Fri, 19 Jan 2018 10:08:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516385298; cv=none; d=google.com; s=arc-20160816; b=afjLvUmdjNmAsZuGgyjZ9rRmhvDYh0DCzVLEiF7NuPI0RfvxYRPb9yE3v5FOtXqc2x KI6SOmSqWCSZ268hCFmchQhGl7LpkfQdQo2jQYD58FSqrMJqYevwF6rhOTBHYB9PaxwI qVr0+Aj7Xf1wMoyvoIM28ZciC8/GAlZ5M/8jDMeBHgbHii32ciGGtFbxlCuVQGxY9a/W Md54vSrYTpTqE+EbFya2K4NpWtPeoZROjK/nF73Dj4A4AWZJ60AF+fgUIkB1tHu75eV3 a1MbFHbh6sdPx3nDk/ZtF4WrB1RGulaktAQWHLleXmPj5UWx+RVFH/Ntq1bjiVHLeO/A kxMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=vPHt0Zro3R8vOydZU4juLWNa34MoiEOT9Mnej1yS1zM=; b=j+P/E4HcBr1y4lomwtQO4nKnBgVzwD5WFLSUHs9ex7hd43P+uoSg1JAzuOdqyyeAVq y8pPZJFTxjHHAEI/uRP0n99+aqNg8/Yl5SSdVokiWWG8pAsQz0/2m0X1XaX6tEaj0h8P ZLfyEcxAJ6wkUAINlwzk/yvTiDf2fB3aO4iCmFoYcRa/H7bCb6g93jjZTU9TICPo59A2 ITOwoQcXtV8rhN0roDzwRSlC24myaqP6NHcPn73M5Owf9nH16ozxJIcMRbRkIAi2WY/N dzEULNOkENQwjmFI/6ue4Lgf+OJNFJBQKAkxnNooXkkliPQcpy+TSfYwtnnA6l5q90Rw CtPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=oljsG9yr; 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 z10si8584782pgv.473.2018.01.19.10.08.03; Fri, 19 Jan 2018 10:08:18 -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; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=oljsG9yr; 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 S1756189AbeASSHh (ORCPT + 99 others); Fri, 19 Jan 2018 13:07:37 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:42726 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755899AbeASSHa (ORCPT ); Fri, 19 Jan 2018 13:07:30 -0500 Received: by mail-io0-f195.google.com with SMTP id 25so3038745ioj.9 for ; Fri, 19 Jan 2018 10:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vPHt0Zro3R8vOydZU4juLWNa34MoiEOT9Mnej1yS1zM=; b=oljsG9yrSPHJN9glNAlDkT4D0Si7kg/UmGaKREXlnEuvRQHeIb3yIoXuvmQfq/AQN1 BYgqMn516qLWrGMdL8dmKn8NEGnIYS88GScGiezF5T4Gsnny2j9vuje6Pi+B0w3lZW7U csC4h5hTuCzcvdU9hvdOZ9WEuGm88QGvoIaJk6iqb+yVJmMSXgzxVEM9wwYwb3vvJ3F6 I0AFTB8NSnfPQtEteNrD6iKvx8QE3VVODYJCr/MdEagS9mZcYVa6oGhFGAat6Tzk3cio kcOwmErg70plOWWFP6djPP2JGeJZZ6saeA7Dd308SrcJU7C1ipflAURqplqHA6FhZk09 ipWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vPHt0Zro3R8vOydZU4juLWNa34MoiEOT9Mnej1yS1zM=; b=J76COiR5V8wtk3EM27i/e8DU7180QE8Y3ySP6Vc6Owb7WIaZD7gPaM7I8lbWOBLfUx Y9TCRghHHtxOobC1ngmwQgr6hwq7EDfFaYmUN+OGlXvA69sfYxFm+AO/NgueKjup59rN N4QKDg6nEfYVxOQINbJ9rvJ6t5bVQdngLwGYJ8tRHQw1FFJBpQeVnBu/e4SvuDWOPzkR 8IOKGTUEWJMpWjvlLlsOO2xJ2c7bon9pPmDYbwCRg+d2nuZJqrSsD1gu5f++Hh3HoCdT arMvGgoByW5TE2ipQEhm3bFcPu4nDKUw0SBuTmQ7+M4UHfAO+XOIuJ0FMIPDiMzRv78+ vURQ== X-Gm-Message-State: AKwxytdd8NEfJ7OuEWkFDn72rkrv5eRoBS29VwZ3wokXLHYkHfkpZKG8 /uQ6BjBFRt7XVdGyg5ieo5ZvCg/QM18OyhKiG71zpQ== X-Received: by 10.107.180.207 with SMTP id d198mr28804310iof.187.1516385249780; Fri, 19 Jan 2018 10:07:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.201.12 with HTTP; Fri, 19 Jan 2018 10:07:29 -0800 (PST) In-Reply-To: <20180118130026.GG32299@lunn.ch> References: <20180104162036.GL3401@lunn.ch> <20180108144548.GA31502@xora-haswell> <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> From: Marcin Wojtas Date: Fri, 19 Jan 2018 19:07:29 +0100 Message-ID: Subject: Re: [net-next: PATCH 0/8] Armada 7k/8k PP2 ACPI support To: Lorenzo Pieralisi Cc: 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 , mika.westerberg@linux.intel.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mika, 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). 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? Do I understand correctly that the MDIO controller node should comprise OperationRegion() definition of the GenericSerialBus? I'm looking forward to your feedback. Thanks, Marcin