Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2334624pxj; Sun, 13 Jun 2021 17:12:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzk820sFkP3sD/ozJwfxxSgM8J/CmDtSVFevovegzVjOwzpXeQE6iNWwPSEZRMwKZjnWRsn X-Received: by 2002:a50:fd0a:: with SMTP id i10mr14633738eds.78.1623629531796; Sun, 13 Jun 2021 17:12:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623629531; cv=none; d=google.com; s=arc-20160816; b=V15uh+DkycVRn/tD6bFANa5ZH34IUYLERixGpSz1xDkcaMMFGsM5pAO0V2deIVB9Ph p++E1OcoxyRKsLYlUZoMCeTXwSgRpLzY7pBVG2vqXLyjnpJIrVzC0068unm2gfEhqBc1 HhAq29rPEmVQ5wHns/5/n2Zw32mC01cCmfD4+9SwOnWxCl8bRQet/Ig78Z/nYTE/M9kG NQO//tKK8sf20j/3ajCfOHB6CcHU3pHPdBi966riuGGtUMMiz9NT3aptvPeu1oWUTg1n m8npjMhiXhHhTvexBCfOBsyNHejC/pWFK4Wa3HT4wZIxzpJaw+xl/6eRq1Q0o3bVHgjw tCWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Inv7FxLlJNFNOYFXJpWfC0TcFgAvHVW5NM8/fw1hffE=; b=JGYrPcrOw62ecq0LBMjLqy9aUbz/u+kvIw0Gvpf6a1NtSaB2pMU7ZDnryRXKyXyDkK RF+9MxoBzNPO+bq/w6YzNN6HJ5RB5DCd6l86xgBLpMpFrHQkcITT+ayZbuXP3U2GJwpd QrcKG8a71t1mTA2QDuFwfBiYLbLMd6oDpz9xt6CbtkJvPc9zPeyvGF04+n+BebrzGtkp JZVmb7KunnpWLu0QCWmue60xg8PQAknvh5yqTz8veebapbgr06qzmtwNrPTDObip12h/ HHEfVUxfBSFkPDrPTsoJ91Quh4Af5UrpfXUMluZrZaVWvEXRjfx9JbTja7TxTA+g7xms CUXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=R8HjPwiP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u16si10608301edb.334.2021.06.13.17.11.29; Sun, 13 Jun 2021 17:12:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=R8HjPwiP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232234AbhFNAK0 (ORCPT + 99 others); Sun, 13 Jun 2021 20:10:26 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:34874 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232076AbhFNAKZ (ORCPT ); Sun, 13 Jun 2021 20:10:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=Inv7FxLlJNFNOYFXJpWfC0TcFgAvHVW5NM8/fw1hffE=; b=R8 HjPwiPuSs8ZagDi0rLWtYL3jDyrZw7AGFoqVJyxU8y1B3u6KvRWdnek+HTTKdxgzIc8mAgX0GoARm diDc+RUWwlsV9kejPxA2e3SwhxMPNttpwzNFxeP9miD8xF6uH5xQhYGkNjr87G6Yz8r4D8hJOLjLF qoYvNcXHTu/RlzM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lsa9L-009E8L-GP; Mon, 14 Jun 2021 02:08:19 +0200 Date: Mon, 14 Jun 2021 02:08:19 +0200 From: Andrew Lunn To: Marcin Wojtas Cc: Linux Kernel Mailing List , netdev , "David S. Miller" , Jakub Kicinski , Russell King - ARM Linux , Grzegorz Jaszczyk , Grzegorz Bernacki , upstream@semihalf.com, Samer El-Haj-Mahmoud , Jon Nettleton , Jon Masters , rjw@rjwysocki.net, lenb@kernel.org Subject: Re: [net-next: PATCH 2/3] net: mvpp2: enable using phylink with ACPI Message-ID: References: <20210613183520.2247415-1-mw@semihalf.com> <20210613183520.2247415-3-mw@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 14, 2021 at 01:46:06AM +0200, Marcin Wojtas wrote: > > > Hi Andrew, > > niedz., 13 cze 2021 o 23:35 Andrew Lunn napisaƂ(a): > > > > > True. I picked the port type properties that are interpreted by > > > phylink. Basically, I think that everything that's described in: > > > devicetree/bindings/net/ethernet-controller.yaml > > > is valid for the ACPI as well > > > > So you are saying ACPI is just DT stuff into tables? Then why bother > > with ACPI? Just use DT. > > Any user is free to use whatever they like, however apparently there > must have been valid reasons, why ARM is choosing ACPI as the > preferred way of describing the hardware over DT. In such > circumstances, we all work to improve adoption and its usability for > existing devices. > > Regarding the properties in _DSD package, please refer to > https://www.kernel.org/doc/html/latest/firmware-guide/acpi/DSD-properties-rules.html, > especially to two fragments: > "The _DSD (Device Specific Data) configuration object, introduced in > ACPI 5.1, allows any type of device configuration data to be provided > via the ACPI namespace. In principle, the format of the data may be > arbitrary [...]" > "It often is useful to make _DSD return property sets that follow > Device Tree bindings." > Therefore what I understand is that (within some constraints) simple > reusing existing sets of nodes' properties, should not violate ACPI > spec. In this patchset no new extension/interfaces/method is > introduced. > > > > > Right, O.K. Please document anything which phylink already supports: > > > > hylink.c: ret = fwnode_property_read_u32(fixed_node, "speed", &speed); > > phylink.c: if (fwnode_property_read_bool(fixed_node, "full-duplex")) > > phylink.c: if (fwnode_property_read_bool(fixed_node, "pause")) > > phylink.c: if (fwnode_property_read_bool(fixed_node, "asym-pause")) > > phylink.c: ret = fwnode_property_read_u32_array(fwnode, "fixed-link", > > phylink.c: ret = fwnode_property_read_u32_array(fwnode, "fixed-link", > > phylink.c: if (dn || fwnode_property_present(fwnode, "fixed-link")) > > phylink.c: if ((fwnode_property_read_string(fwnode, "managed", &managed) == 0 && > > > > If you are adding new properties, please do that In a separate patch, > > which needs an ACPI maintainer to ACK it before it gets merged. > > > > Ok, I can extend the documentation. My real fear is snowflakes. Each ACPI implementation is unique. That is going to be a maintenance nightmare, and it will make it very hard to change the APIs between phylib/phylink and MAC drivers. To avoid that, we need to push are much as possible into the core, document as much as possible, and NACK anything does looks like a snowflake. I actually like what you pointed out above. It makes it possible to say, ACPI for phylink/phylib needs to follow device tree, 1 to 1. It also means we should be able to remove a lot of the if (is_of()) {} else if (is_acpi() {} else return -EINVAL; in drivers, and put it into the core. Andrew