Received: by 10.223.176.46 with SMTP id f43csp1354919wra; Sat, 20 Jan 2018 17:15:34 -0800 (PST) X-Google-Smtp-Source: AH8x2254C2JKQGKblqs71YhMCr6oAlVj0f31FPRCRezuFZ5DyslgMzoYA4/AJr37fyvfC+XLynD9 X-Received: by 10.99.111.193 with SMTP id k184mr3256091pgc.378.1516497334572; Sat, 20 Jan 2018 17:15:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516497334; cv=none; d=google.com; s=arc-20160816; b=LDZp/9JuWfWmUJdVoSHqvtQQDg7fTdZvQdRJWYwhCTCSet012oCarmi2Ztxs0yCCqa o3IJ1EjCqElOnHadj0NMgGUlBhZwEj8NrOQRig9/oV3vJHl3YNSgSSmsM10DlfuDmwD/ 3DnCPa0ZabXbPaec67bdVQElizapdtlskCF72VEZ2mXcajeN4bDWlgD6IID6zw9dK7d9 yuceTNiByg0vAc8MGdDPswHTJMoWH86Mr9TfnD07NzTqizpBgN6IEbuJNdsC8qvKs2te NS9PLAdAvI+FVO3thGvkqHRbnrT7+vKb0+ZPC8BMqFlkjTBTIWhMW75XtuZJkEuqDhzl NkyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=JQX8BeVw/ozoe19NmZqHAaX2OfsGTUutxXRYKNXP3iY=; b=O1MRTY7HG9WMQvd08cOHdAEPDY9Z1ZxEEWjaTx2EPZSwHZmkm9HmVtEZ7Fa1RQ6dM/ URVc73DR1cO1Rir81gPDy89f/zAN/od0OU21rgAjugEn67y4zMpRsB/7j06W/orDPC+G NDm7TxnWusChx5Uuu6qSoW1zY7NfcZ9xLvzwTC0Stadt1cWJyHhVQH92BIREh1M7KMmG g4v901cfYIvFj2c1K/6GBj37mnDN94+4Va8EzYUfrK+5Ny5RspHfNoooXBym4GFqNZSL iBcXJ6/cG25IkgixX5JBZoZtG0RWJSDMdCeTFEJAPdxbsbH+N2uu1t2y/6XY8W1ytOC+ J5og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=08wja4Vy; 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 e16si10907278pgr.639.2018.01.20.17.14.43; Sat, 20 Jan 2018 17:15:34 -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=@lunn.ch header.s=20171124 header.b=08wja4Vy; 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 S1756793AbeAUBJD (ORCPT + 99 others); Sat, 20 Jan 2018 20:09:03 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:57813 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756752AbeAUBI4 (ORCPT ); Sat, 20 Jan 2018 20:08:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=JQX8BeVw/ozoe19NmZqHAaX2OfsGTUutxXRYKNXP3iY=; b=08wja4VyfszSHG7cGMk+kwbbLCbDeWuo6AurtD/9BhuuYlEZKbgJGpC4CZNlo/CMlG6h9bqoZoCtnJ8/ESyqxlJj1y0W5C0/RLyvLCaIvpUcrhhgGXjufI01BbphT9OtJcXPsLgZpHEVqm3Ew6dAjEKWCdo2GLD68+olL0E5vRA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1ed47k-0000Nm-Oa; Sun, 21 Jan 2018 02:08:40 +0100 Date: Sun, 21 Jan 2018 02:08:40 +0100 From: Andrew Lunn To: Mika Westerberg Cc: Marcin Wojtas , Lorenzo Pieralisi , 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 , 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: <20180121010840.GB1217@lunn.ch> References: <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> <20180120195246.GC27654@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180120195246.GC27654@lahna.fi.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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. Hi Mika SDIO is not a serial bus, well it can be in its simplest form, but high speed implementations have 4 data lines. So i can understand them not using GenericSerialBus. MDIO is a serial bus, very similar to SPI, I2C, and UART. > 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. Just some background here. If you have a plain PHY as a device on an MDIO bus, you don't need to match it to a driver within ACPI. Registers 2 and 3 contain a vendor and product ID. That is what it used to match the device to the driver. What you might need to know is the protocol to talk on the bus. Most devices use clause 22 protocol. A few devices are clause 45. 22 is the default in Linux, and you need to indicate if 45 should be used. You can also indicate 22. It gets more complex when the device on the bus is not a PHY. It is a generic bus, you can connect anything to it. Ethernet switches can be on the bus. They generally cannot be identified using registers 2 and 3. So you do need to match the device to the driver. Most do have ID registers, so the driver can work out what specific device is on the bus. However, Marvell moved the ID registers on there newer generation of devices, so we need to give the driver a hint where to look. So in device tree, we have two different compatible string. Broadcom really do use it as a generic bus. They have their USB PHYs and PCIE PHYs on an MDIO bus. In DT, they have compatible strings to match the device to the driver, as normal. We need to ensure what we define for ACPI has the same level of flexibility. Andrew