From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2609C7EE29 for ; Fri, 2 Jun 2023 18:42:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236881AbjFBSmy (ORCPT ); Fri, 2 Jun 2023 14:42:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236210AbjFBSmx (ORCPT ); Fri, 2 Jun 2023 14:42:53 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E82A1A5; Fri, 2 Jun 2023 11:42:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To: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=eNfE8L27WSnMGrKhYSIEYK8Z+p50w3HySEc+m+GC5XM=; b=fxFy3Ip6ShI5edhwdL9zyX2ZXD xS9Q+2ldQU6lAjXFBrnkHrBiNaVzxnimumOPaRZIjzpWmTq6E22hPXd98uv0fqKvu63Wq/ukcqmtd K8747UlDszc7me6WI+VwrHF2LPB9No4kSw7YH0OMzKxNQoNWnCeZ2zbGPt9ZqVDLecKE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1q59jS-00Ehfx-3D; Fri, 02 Jun 2023 20:42:38 +0200 Date: Fri, 2 Jun 2023 20:42:38 +0200 From: Andrew Lunn To: Detlev Casanova Cc: linux-kernel@vger.kernel.org, Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , netdev@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 2/3] dt-bindings: net: phy: Document support for external PHY clk Message-ID: <4255bc0a-491c-4fbb-88ea-ec1d864a1a24@lunn.ch> References: <20230602182659.307876-1-detlev.casanova@collabora.com> <20230602182659.307876-3-detlev.casanova@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230602182659.307876-3-detlev.casanova@collabora.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 02, 2023 at 02:26:58PM -0400, Detlev Casanova wrote: > Ethern PHYs can have external an clock that needs to be activated before > probing the PHY. `Ethernet PHYs can have an external clock.` We need to be careful with 'activated before probing the PHY'. phylib itself will not activate the clock. You must be putting the IDs into the compatible string, so the correct driver is loaded, and its probe function is called. The probe itself enables the clock, so it is not before probe, but during probe. I'm picky about this because we have issues with enumerating the MDIO bus to find PHYs. Some boards needs the PHY taking out of reset, regulators enabled, clocks enabled etc, before the PHY will respond on the bus. It is hard for the core to do this, before the probe. So we recommend putting IDs in the compatible, so the driver probe function to do any additional setup needed. > Signed-off-by: Detlev Casanova > --- > Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml > index 4f574532ee13..c1241c8a3b77 100644 > --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml > +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml > @@ -93,6 +93,12 @@ properties: > the turn around line low at end of the control phase of the > MDIO transaction. > > + clocks: > + maxItems: 1 > + description: > + External clock connected to the PHY. If not specified it is assumed > + that the PHY uses a fixed crystal or an internal oscillator. This text is good. Andrew --- pw-bot: cr