Received: by 10.223.176.46 with SMTP id f43csp2013886wra; Sun, 21 Jan 2018 09:14:44 -0800 (PST) X-Google-Smtp-Source: AH8x224V0bzD2itmrv2EY5s/TT3pxHmbeA8fJUMsUFNkZ2ZqD8CW+XGOwsuUtbo4B+62RJMt4vOT X-Received: by 10.101.96.198 with SMTP id r6mr4989948pgv.420.1516554884495; Sun, 21 Jan 2018 09:14:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516554884; cv=none; d=google.com; s=arc-20160816; b=hLVgF5ogZ0lW73lwpnINPe5WhL5wkVIolCEDdBze7ZHuVsE3ycm9H7SAH4Qk2bMpL2 kluO1VxLBehlF2xDICf0wRbmJYR+4KZkvHIZ2aEXrIhLbvaWzUnA3qcGCNzq0isVnVpU cnfqsGj/MN7YNGPxkwbdE0BqEehHGZvdv94rAhLjyRTu1NoEbp010r9z5aXBQBOrDPe5 J0ZjVaaKLxS2IbJWSEN2LhyNuCnuRt1Rz22ooTJgizrgm7CNR6HQdbgiH/5enQBHw7h6 UHrGHpUri9A8621nGB96tsHPn1khfaEZNYHJc7IlrbUfMYhyIC4Wqt1pc+S5faFvr6ue Rwtg== 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=prctlimoj1/cFpxA5xdlmby6STE67i/uJTHjyQsNSls=; b=NspsNIs17IaVs9YxkcPfddnN8mp4bfmsCS/EAlD/74F1ZHFKYmbWizIh79X1mxYTWG ZWU5HTp+RYn5uFgPQEpqpjAMgyTn3ZHiSD3Jjx/tfoOkvaTcNQzQl/Li8kQRdIpwDyB4 BhO0AaQjcLtny7UnBwcSQ06mawrNZ11QMY//qHfkxAnZXR7EztkgGa8P2YaYOfGdXBHA Ys4jI4Ub3MhIK1Zj+cP2uewMuR0OKnTFz2IsbkUH/a0mHYkl/+ouHKF+xYJ/zyf3VkhC o5M/yr2jBXQTvi/28FHxHl2tZUEeLd23p582xA4eF9txjZR2vDt4A3IyazB4mUnWv/jC nU0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fo8PgVHI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8-v6si2661629plk.87.2018.01.21.09.14.19; Sun, 21 Jan 2018 09:14:44 -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=@linaro.org header.s=google header.b=fo8PgVHI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751229AbeAURNs (ORCPT + 99 others); Sun, 21 Jan 2018 12:13:48 -0500 Received: from mail-io0-f179.google.com ([209.85.223.179]:44679 "EHLO mail-io0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750873AbeAURNp (ORCPT ); Sun, 21 Jan 2018 12:13:45 -0500 Received: by mail-io0-f179.google.com with SMTP id z6so7020978iob.11 for ; Sun, 21 Jan 2018 09:13:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=prctlimoj1/cFpxA5xdlmby6STE67i/uJTHjyQsNSls=; b=fo8PgVHIU9LW3xhV7Y8Eth7o/1yKJUS0wtwCY1o5MaStGggqmP6NDjdZf8kVbMqQVc +Y/GLoUvoZ/s6F6flAkWfXn1NR7xWdkZntkcsvfx9uR4ZMpygxoilT2Orj9wbUbExWKc TiqCBkPCN/8S0saSEmvAfZltE11ruqU87rYfk= 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=prctlimoj1/cFpxA5xdlmby6STE67i/uJTHjyQsNSls=; b=qlcCOEzuou5bcLuNXpD/KgDoNDMaCAfDwy/2xOqgCWEGKQdhIJxrC09VA6ZI+gppT1 RExidyFN+6dHuFw18t7+mcDBc3yiSIK+4jDDXHL/bo+3vRrAPzfqdQAfw4hRPcCVbgI2 XgDM11i/A3v2q8Z//1GJXmLUKhMkGzDJtpkAPonJ5x3iuQkRBx57gVhcd1sUeyTjqaji EKmu0088y7tdBNHeb/9+XMlGuXDI7SdpE8GE7adHMqqKBFWiIIK+5+m9/1jd6G0Urx3k PKJwFF9j6IHXLeOXQC1ur30rjvX/9qtzMen1Nf/JJ2Oop7ceh+nWn1iMe0i/x+UzFvwc 7BdA== X-Gm-Message-State: AKwxytdRLMVKwKcVxQMenZyhxMiBWtKQJmxPpFhLdaWWSm7FKC3LrtYG DMk4QXdm13YlCI5KuLqegwG7DfN44Cmwdfrp9auJzg== X-Received: by 10.107.6.161 with SMTP id f33mr5785200ioi.196.1516554824923; Sun, 21 Jan 2018 09:13:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.112.13 with HTTP; Sun, 21 Jan 2018 09:13:43 -0800 (PST) In-Reply-To: <20180121161319.GA8017@lunn.ch> References: <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> <20180121010840.GB1217@lunn.ch> <20180121102700.GF27654@lahna.fi.intel.com> <20180121161319.GA8017@lunn.ch> From: Ard Biesheuvel Date: Sun, 21 Jan 2018 17:13:43 +0000 Message-ID: Subject: Re: [net-next: PATCH 0/8] Armada 7k/8k PP2 ACPI support To: Andrew Lunn Cc: Mika Westerberg , Nadav Haklai , Neta Zur Hershkovits , Lorenzo Pieralisi , Russell King - ARM Linux , Grzegorz Jaszczyk , Tomasz Nowicki , "Rafael J. Wysocki" , "linux-acpi@vger.kernel.org" , Ezequiel Garcia , Florian Fainelli , Gregory CLEMENT , Marcin Wojtas , "linux-arm-kernel@lists.infradead.org" , Thomas Petazzoni , Graeme Gregory , "" , "Antoine T?nart" , "linux-kernel@vger.kernel.org" , Hanjun Guo , Sudeep Holla , "David S. Miller" 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 On 21 January 2018 at 16:13, Andrew Lunn wrote: >> Right. So if you need to have some additional "parameters" with the >> connection, then I suppose you may want to go with the GenericSerialBus >> route. However, looking at the sample device tree description: >> >> davinci_mdio: ethernet@5c030000 { >> compatible = "ti,davinci_mdio"; >> reg = <0x5c030000 0x1000>; >> #address-cells = <1>; >> #size-cells = <0>; >> >> reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; >> reset-delay-us = <2>; >> >> ethphy0: ethernet-phy@1 { >> reg = <1>; >> }; >> >> ethphy1: ethernet-phy@3 { >> reg = <3>; >> }; >> }; >> >> would pretty much translate directly to this in ACPI if you don't need >> any additional attributes: >> >> Device (ETH0) { >> Name (_ADR, /* PCI address of the NIC */) >> >> Device (PHY0) { >> Name (_ADR, 1) >> ... >> } >> >> Device (PHY1) { >> Name (_ADR, 3) >> ... >> } >> } >> >> which looks pretty simple to me. You can also use _DSM and _DSD here to >> pass information (like the protocol number) for the PHY devices to Linux. > > I'm not particularly worried about that simple case. Other than, i > don't want people to think that is all that is required. > > For a more full example, take a look at vf610-zii-dev-rev-b.dts. The > Freescale FEC Ethernet controller provides the base MDIO device, > mdio1. On top of this is an MDIO mux, using a few GPIO lines to > enable/disable 3 child MDIO busses. Each of these busses has an > Ethernet Switch. The Ethernet switch exports up to two MDIO busses, > and on these busses are Ethernet PHYs which are embedded inside the > switch. The Ethernet switches are also interrupt controllers, with the > PHYs having interrupt properties which point back to the interrupt > controller in the switch. > > So i'm interested in an ACPI proposal which supports this board. > However interesting as an example, I'm not convinced this is what we should aim for. ACPI is not a replacement for DT, and it is unlikely that people would be interested in running ACPI-only distros such as RHEL on their Ethernet switch. DT is excellent at describing this, and there is no need to replace it. ACPI is about firmware abstractions: you don't need to describe every stacked interrupt controller in minute detail to the OS if the firmware configures it sufficiently. That way, the OS does not need to know all these details, and vendors can update their hardware without having to update the software as well. (Or that is the idea at least, how that works out in practice on arm64 systems remains to be seen) Taking the Marvell 8040 as an example: the ACPI description does not expose the ICU interrupt controllers to the OS, but the firmware configures them and describes their configured state as ordinary GIC interrupts. Also, please bear in mind that the ACPI spec is owned by the UEFI/ACPI forum, and only members (who are all under a contract regarding reasonable and non-discriminatory (RAND) licensing terms to IP they own that is covered by the spec) can contribute. Individuals can become members for free AFAIR, but that doesn't mean individuals are typically interested in getting involved in a process that is rather tedious and bureaucratic. So my suggestion would be to find out to what extent the latest version of the spec can describe non-trivial MDIO topologies, and hopefully that includes the mvpp2 on the Marvell 8040.