Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4132270ybl; Mon, 3 Feb 2020 13:13:00 -0800 (PST) X-Google-Smtp-Source: APXvYqyUGxkk8kfwBXNxyoU5KFNezAfYfMynMTgZFBxL/ThyuyzOVWbbDVkgJdEY4bPE+fN0hvtE X-Received: by 2002:aca:2419:: with SMTP id n25mr746051oic.13.1580764380758; Mon, 03 Feb 2020 13:13:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580764380; cv=none; d=google.com; s=arc-20160816; b=VoOC99jCd/dcw7EXGIYZ6HK/9t7iYwhIxxbdo+ZJruNxbKya8BJXwE+zv4MhjMABJp rB2H3PcIr+4l2lfTPgSY5tta99QkkukFrZm6zNxdPXOBm8NqI6nrMDahm3C+GJbwB/vQ j8ZG5y4qi5BGp4FLLTp5G7G3u1i0Z09VFx0sCQhQHRFDDrpIgSoRXAEnQtCEoqAVUdI5 or8L+OzNV7AUngtpvMOtMDYftUiz0AAL0yItT62LPDuT03nF+EWN+zHXljc9e071HaJl 9iXY3vAXt04siObXuBiZo+56m+5F9s6hp43ehUAO2Uus5sBJk8o8TvhHZKQHDApTO+dx DWPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=jU0TX5o7AgbpjHjPcKuUnJFBDeaG847nimcmooOBzDo=; b=Q1BDV9pBFCyQMI0bdV1zhVJ3cjgRQl6cYR7/tz/iw0dsqP9W6qPC1E2YNDatXchZks kjQRJatFf/s1tPvgTtTbUXfdtlhcykcOBtzbpf/d8TMN9E4Q6hQyRIdLm/K80G87QFir qp5QO1UlPA/qeuppdYAdGYdBWikMGmEmndiaBIWFcWR8IOHxLoRF7PFeXtXyXvxGEw/d 2Piv/pcnFvq2U/7pkNFCaNpUoZq1juYqMbM6FDMGBcDRZBrkIXBVmXLGvyBIAk+HBUtA wU3Wf+gVZ9MH+4XpkCDTBVjsOW/UjQJDv+/u5EoLe8542KSMBhHHWmQ/PMesEpGev2Z9 qtUw== 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 l17si3700625otq.59.2020.02.03.13.12.48; Mon, 03 Feb 2020 13:13: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 S1727127AbgBCVKZ (ORCPT + 99 others); Mon, 3 Feb 2020 16:10:25 -0500 Received: from foss.arm.com ([217.140.110.172]:59412 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbgBCVKZ (ORCPT ); Mon, 3 Feb 2020 16:10:25 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 47B17101E; Mon, 3 Feb 2020 13:10:24 -0800 (PST) Received: from [192.168.122.164] (unknown [10.118.28.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1D9543F68E; Mon, 3 Feb 2020 13:10:24 -0800 (PST) Subject: Re: [PATCH 3/6] net: bcmgenet: enable automatic phy discovery To: Andrew Lunn Cc: netdev@vger.kernel.org, opendmb@gmail.com, f.fainelli@gmail.com, davem@davemloft.net, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, wahrenst@gmx.net, hkallweit1@gmail.com References: <20200201074625.8698-1-jeremy.linton@arm.com> <20200201074625.8698-4-jeremy.linton@arm.com> <20200201152518.GI9639@lunn.ch> <20200203011528.GA30319@lunn.ch> From: Jeremy Linton Message-ID: Date: Mon, 3 Feb 2020 15:10:23 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200203011528.GA30319@lunn.ch> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2/2/20 7:15 PM, Andrew Lunn wrote: >> I though I should clarify the direct question here about ACPI. ACPI does >> have the ability to do what you describe, but it a more rigorous way. If you >> look at the ACPI GenericSerialBus abstraction you will see how ACPI would >> likely handle this situation. I've been considering making a similar comment >> in that large fwnode patch set posted the other day. I should have been a lot more specific here, but I didn't want to write a book. > > I know ~0 about ACPI. But it does not seem unreasonable to describe an > MDIO bus in the same way as an i2c bus, or an spi bus. Each can have > devices on it, at specific addresses. Each needs common properties > like interrupts, and each needs bus specific properties like SPI > polarity. And you need pointers to these devices, so that other > subsystems can use them. > > So maybe the correct way to describe this is to use ACPI > GenericSerialBus? AFAIK, not as the specification stands today. First its not defined for MDIO (see 6-240 in acpi 6.3) , and secondly because its intended to be used from AML (one of the examples IIRC is to read battery vendor info). That implies to me, that the ACPI standards body's would also have to add some additional methods which configure and return state about the phys. AKA some of the linux phy_() functions would just redirect to AML equivalents the same way there are AML battery functions for returning status/etc.