Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp260325pxx; Thu, 29 Oct 2020 01:48:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBIMBJUfgLZor9ivr1VjXutb4P7MiqV3V4KbNO6abxPl9D2tgg/G7JSPpNJT5xxOB6MQGy X-Received: by 2002:a17:906:5e49:: with SMTP id b9mr3034233eju.436.1603961322448; Thu, 29 Oct 2020 01:48:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603961322; cv=none; d=google.com; s=arc-20160816; b=qaDSXFwU2YdsZOIdiMp51Z5aaSgqFSpC36BSA5pPjndOZ0tKo68YRAsqhVWQUhmK8X /jJZ4peCvhv3Mxq00YuUjfl3kRqMoZxyJh55ZyccX6sCfTGZ19FGr6Fpwbw5l+AF2+8L kVcrin/d1ivrtpJ+BwqjAGWC+t8VxSYGtyc6hwzoo8O1x6pRN4b8D6BAeuHEuiE+t+gk KBbiRukwiQk9xgzY2vvAbKNi9zJJ76TOwwa0E5sw2sDXACpS9/00vNwEE6xrkz/ZUbFh MbMPvrNDhcEa6gJsbsBIqOagt41DmL3Yo2bSloLg+BH8pRecblzIg4CQU6M5N/BXS3nI fbow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=D6r8L1EL8IRRyXeugahLoJIBCwA8PIgOemZAnAuCVb8=; b=K5JKy/Zl9gH+5Bw2s6FBH8jV0N8ZrlRoFsJe7hvJpqbncoi4FHJcAXvrnd3Hxy25lM aN2cyF605FdbFl9iSuV0pv1XfrH/zH26+Ld6uxJTE2e4wYKVDh6xnTekHfm820AkjerD LYj2SNO4f+bfi2rpsrbH30bVH/y7QZKN6DjlcijKDYzzAl1aFd/0LI64lfoAqezLaJkW rFZvyir12jS1as+tEti4EAkGokDgJdhqO54GgnotUS8tMFwoHc/cq4/y+fE0urK9QwM+ CASJ949RCHx4j8ZluN3d5gIFK6cavIE8gDYoDky68+r4omLJJunqWn8qIMEy1b0vTqZz Nj9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uuzuF6Xe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qc1si1471692ejb.315.2020.10.29.01.48.20; Thu, 29 Oct 2020 01:48:42 -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=@gmail.com header.s=20161025 header.b=uuzuF6Xe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728828AbgJ2BxO (ORCPT + 99 others); Wed, 28 Oct 2020 21:53:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728699AbgJ1V5k (ORCPT ); Wed, 28 Oct 2020 17:57:40 -0400 Received: from mail-vk1-xa41.google.com (mail-vk1-xa41.google.com [IPv6:2607:f8b0:4864:20::a41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E33A3C0613CF; Wed, 28 Oct 2020 14:57:40 -0700 (PDT) Received: by mail-vk1-xa41.google.com with SMTP id r17so262295vkf.6; Wed, 28 Oct 2020 14:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=D6r8L1EL8IRRyXeugahLoJIBCwA8PIgOemZAnAuCVb8=; b=uuzuF6Xe35sYv6i6Zbvct8ucdXbm37frPNTUGoTTKAgTeLAJ8eyLqo7SjFoqygYrzG cV0rzpN4+6JHzoypRBulKccyUtdZhl2iwBxhnoNcSvKr20+NF5KeBpDNZ0ShE5ffHLQB msHfTrWuj2ENc3HGxEOIliyZAxSRbZaeVNV24OLriqJsdH4Mw28Bn9XodLIEyQG/l1CP 8A8SbPIXuVlVxafxS5VtnG47s+3z6nJpLbrjPI0ThbHMMgsbmAK+w6mzpQCq6PQNxBev bTAgOr/Fo8YjsqA+XwgS62lEhUxAnRTfylYjwXbfdaceA7zTZ4fjTPFMKFYIQzhxNp2E xbBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=D6r8L1EL8IRRyXeugahLoJIBCwA8PIgOemZAnAuCVb8=; b=Aa7ha+GR51Z4NfCiZTKCTKv9DgME5rUoJnEhx43sHEolyJeNMWxhRVrdDDTniBwN8V jbiztT5pX8B2+Bgl2CdnoPGstZax60JQJtrXA3X6hUznuiqDQNLaMLKXMBhH1GQYynPB GNGJZwsDYzrETC37V4qnkC4xY6ktDTnWF+3Y7F4J1EKqBbb1VngtGZussHyQ/m/Eeu5M QNMWvu/yqo7cjpwc5IRG5lUs+iMe9SXazPTrOnbomPiZqsI+tJYB2gNtQcz4IR3Uf5SV kmKGBvbLa8ruFqZL4UaWLPUztxPuO4XSPa5DKzd6OGO5LGJFg1SmRj79zEoxeV1sLhHk wzSg== X-Gm-Message-State: AOAM5319hySo63QtEpMsS/xDD8plz1dF15178fJCp/z76xDOfnaWmUck PeRbRKRc68QInht0BfSiQlLYi/xqR4k= X-Received: by 2002:a62:ab0e:0:b029:164:1790:a11b with SMTP id p14-20020a62ab0e0000b02901641790a11bmr1135778pff.73.1603919138691; Wed, 28 Oct 2020 14:05:38 -0700 (PDT) Received: from [10.230.0.148] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id 5sm491991pfn.83.2020.10.28.14.05.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Oct 2020 14:05:38 -0700 (PDT) Subject: Re: [PATCH] RFC: net: phy: of phys probe/reset issue To: Grygorii Strashko , Andrew Lunn Cc: "David S. Miller" , netdev@vger.kernel.org, Jakub Kicinski , Heiner Kallweit , Sekhar Nori , linux-kernel@vger.kernel.org, Vignesh Raghavendra , Roger Quadros , Russell King , Rob Herring References: <20201023174750.21356-1-grygorii.strashko@ti.com> <450d262e-242c-77f1-9f06-e25943cc595c@gmail.com> <20201023201046.GB752111@lunn.ch> <87f264f7-da24-61db-2339-59a88d88e533@ti.com> From: Florian Fainelli Message-ID: Date: Wed, 28 Oct 2020 14:05:35 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <87f264f7-da24-61db-2339-59a88d88e533@ti.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/28/2020 12:32 PM, Grygorii Strashko wrote: > hi Andrew, > > On 23/10/2020 23:10, Andrew Lunn wrote: >>> Yes there is: have your Ethernet PHY compatible string be of the form >>> "ethernetAAAA.BBBB" and then there is no need for such hacking. >>> of_get_phy_id() will parse that compatible and that will trigger >>> of_mdiobus_register_phy() to take the phy_device_create() path. >> >> Yep. That does seem like the cleanest way to do this. Let the PHY >> driver deal with the resources it needs. > > Thanks you for your comments. > > huh. I gave it try and some thinking. it works as W/A, but what does it > mean in the long term? I believe this was made clearer before: this is the only forward that works across all subsystems, independently of the PHY and MDIO layers. > > Neither Linux documentation, neither DT bindings suggest such solution > in any way > (and there is *Zero* users of ""ethernet-phy-id%4x.%4x" in the current > LKML). > And the main reason for this RFC is really bad customer experience while > migrating to the new kernels, as > mdio reset does not support multi-phys and phy resets are not working. It is documented in the binding, but the binding is a document about a contract, not about how Linux implements things, so I suppose you are right that we are missing additional documentation to describe how it is useful: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/ethernet-phy.yaml#n30 > > Following your comments, my understanding for the long term (to avoid > user's confusions) is: > "for OF case the usage of 'ethernet-phy-id%4x.%4x' compatibly is became > mandatory for PHYs > to avoid PHY resets dependencies from board design and bootloader". > > Which in turn means - update all reference boards by adding > ""ethernet-phy-id%4x.%4x" and add > new DT board files for boards which are differ by only PHY version. Well, you can have the boot loader absorb some of those board specific details, after all, the entire point of moving ARM towards Device Tree was to do just that. The appended DTB was offered as an interim solution. -- Florian