Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp536449pxu; Wed, 7 Oct 2020 09:19:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxldZNOhsjXe/5guuCb6wUcIZXugmPgA5JyuQ/uiSToIcg2sVK3zdY39jHA8kkP0YsAjma X-Received: by 2002:a17:906:eb59:: with SMTP id mc25mr4078189ejb.34.1602087567084; Wed, 07 Oct 2020 09:19:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602087567; cv=none; d=google.com; s=arc-20160816; b=pMixDVTfMJnZA/9sp5Hor3NZkHgpHNLAZtvJZNuKRmVXoenrAR6NX0J9SkxUhdckeh oH4ynUniG9gO9w0TinUAgJOStE12PhHGeg4jBa+3dwegB0QN86t2BJkgum8UcnUX3q+s OAZhR/MftLvBiEYeoHid7VcIGVA9g0/YJeDlYzpIteQttyRmKGPF4Ie4ODx2LzGHncmY +AyycgY/WGgYXNsLyWi4ELoik1hbvS6ykIUa70hES56Le5JcvpjEECbqMTQMp8TEPUSE tAStUf2abdP3hH2Nc43pnfdIX6j3QMCS3U5n90wMyi9hxI0FD+qqVKWVRTmjH9pwFBFw pIUw== 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:subject:from :references:cc:to:dkim-signature; bh=OopvoL5bmYi+0qGhF3VP83b68UDgKQrkU07BBY2nqsU=; b=0i3uJ9GCTSpWlCOP28q7ziYzbfDhsALcNlD3lxPIdL8D5pdc8jHufe8zffO55nQc6z gHFCm7u9kvBtKUil6OqmtaSdm9MiEsZMLAe7akPWKawEFa9bZYqfjTw4mE/C8jmF8H60 tUsqDVHDjkpoj+/AYX5g5/lFHwAkOYap5VKP3mF1zFx9uWqWmqb44ILK67HTUaOPl0ES QGHSfQZWTMgXnUNPfS2FaQGk4o/tGxgvDi+RljCTwdrNUJL2VT6pbDqbzm8294C0MRap CEVlrxJvr0z+XuQMfZk6+rdb0T9epXRW/G3lab9nea9X1SpcYHmK0ASQMJjWikFlj3xT /N5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Ig/V6oAt"; 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 10si1662882ejn.207.2020.10.07.09.19.02; Wed, 07 Oct 2020 09:19:27 -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="Ig/V6oAt"; 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 S1728277AbgJGPo5 (ORCPT + 99 others); Wed, 7 Oct 2020 11:44:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727005AbgJGPo4 (ORCPT ); Wed, 7 Oct 2020 11:44:56 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE40CC061755; Wed, 7 Oct 2020 08:44:56 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id ds1so1229160pjb.5; Wed, 07 Oct 2020 08:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:references:from:subject:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OopvoL5bmYi+0qGhF3VP83b68UDgKQrkU07BBY2nqsU=; b=Ig/V6oAtwr/rda438Rz4wdMGeHF553yyGeIjxYz9QCthXwy0yvoevXQ6NpwmseSPuV CNlUq05As99tyk81B67xqF9YFCHxzedVnIssvfxH44QkoFOvs4xv/ykeQrf9AkZd7798 JXXL6M8aO47whWXB2WV/GIPXPXMANYDolePAAFhSw9zQL8nvFG4AU8RcJVfiV9VLY2wK s8pmXOv2E0zj37KmflRfe8LhAxjJGc4iNlXAhlqa22NBs/kcwtkTbTEnuuFBiY+W06tv kv8Sd1jYdH/kWrRf+8R0MbJz+dRQB7z7NxXKTmHfKo0XdSQAPlmQvdNB2+p2coe+Z3M9 T1kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OopvoL5bmYi+0qGhF3VP83b68UDgKQrkU07BBY2nqsU=; b=PDFae633qPyRC9VKlWUTkYGzVu/E7uL6Ub6qrJqKDp++n0GlYYeem7i2qkKynIPJ6h VXheR+Dec4AVxVZSVnbQvC1U2RaEqk02MUGqzxGtERHkgCsjWLLO3R0hXclnHk6qCpKB 3RHh9H22+nFWylTch7RYp7YRyWo25udhEk44Le6f85ZJvwcF6xflFAEmcENQ/V61kPTR pqM2hEm8An0TlYpmo1iJ+1j5hLVeT8Sm4rdTNl65POhVp9GvmN9ANXbzofk62/Yy5ivZ I30zQkQNVzeLlwlucikr1cLiCRqnIzwF/hlvNXMgOQefI9tbpRs9XYmuh/+w/RgoKi0d icww== X-Gm-Message-State: AOAM5301A/MhgOPPioknRmx246a5V+hwKtepd8E/IkpD6fulA5g+Z/MN OjQytV98jjubgODJmpxB3TR4rra4rG2qPQ== X-Received: by 2002:a17:90b:4b05:: with SMTP id lx5mr3263313pjb.42.1602085496169; Wed, 07 Oct 2020 08:44:56 -0700 (PDT) Received: from [192.168.1.3] (ip68-111-84-250.oc.oc.cox.net. [68.111.84.250]) by smtp.gmail.com with ESMTPSA id e8sm3745514pgj.8.2020.10.07.08.44.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Oct 2020 08:44:55 -0700 (PDT) To: Marco Felsch , Marek Vasut , Rob Herring Cc: Oleksij Rempel , Andrew Lunn , netdev@vger.kernel.org, Russell King , linux-kernel@vger.kernel.org, mkl@pengutronix.de, kernel@pengutronix.de, David Jander References: <20201006080424.GA6988@pengutronix.de> <2cc5ea02-707e-dbb5-c081-4c5202bd5815@gmail.com> <42d4c4b2-d3ea-9130-ef7f-3d1955116fdc@denx.de> <0687984c-5768-7c71-5796-8e16169f5192@gmail.com> <20201007081410.jk5fi6x5w3ab3726@pengutronix.de> <7edb2e01-bec5-05b0-aa47-caf6e214e5a0@denx.de> <20201007090636.t5rsus3tnkwuekjj@pengutronix.de> <2b6a1616-beb8-fd12-9932-1e7d1ef04769@denx.de> <20201007104757.fntgjiwt4tst3w3f@pengutronix.de> From: Florian Fainelli Subject: Re: PHY reset question Message-ID: Date: Wed, 7 Oct 2020 08:44:53 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201007104757.fntgjiwt4tst3w3f@pengutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/7/2020 3:47 AM, Marco Felsch wrote: > Florian did you send a new version of those patches? I did not because we had a good conversation with Rob over IRC and the conclusion was that the only solution that scaled across drivers, subsystems and type of resources (regulators, clocks, resets, etc.) was to have a compatible string for the given device that contains the ID. For Ethernet PHY or MDIO device nodes that is "ethernet-phyAAAA.BBBB". When the bus determines the presence of such a compatible string it needs to bypass the dynamic identification of the device and needs to bind the PHY driver and the device instance directly. MDIO does that, and so does I2C and SPI AFAICT with the modalias/compatible (there is not a standardized way to runtime detect an I2C or SPI client anyway), while PCI and USB do not, but arguably could in the future. For the specific use case that I had which required turning on a clock to the Ethernet PHY, I ended up modifying the firmware to provide that compatible string "ethernetAAAA.BBBB" and have the driver request the clock from its probe function: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/drivers/net/phy/bcm7xxx.c?id=ba4ee3c053659119472135231dbef8f6880ce1fb -- Florian