Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2622451rwd; Fri, 2 Jun 2023 12:02:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ50LYkQaXEu+UaFywmxb6ub+yz0Z+gqGCZoB5w5R/ZcutWLsRokAIDbxbAbLfG4KYEw30s3 X-Received: by 2002:a05:6a20:729c:b0:10c:67c9:2fda with SMTP id o28-20020a056a20729c00b0010c67c92fdamr11065594pzk.40.1685732564002; Fri, 02 Jun 2023 12:02:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685732563; cv=none; d=google.com; s=arc-20160816; b=J0r97roN3LlsDQ2QtctMAIu2hjSO6FMMeWPB8JvnGczXQfXMUnq9VIUu2WIyoEzbNR P8BJZmZqPdQ5t9sOnKftNDpl12pNy1lHPqmgViL57JBYtUofqBnc+R9thxCEWlelVJwj BI6aGy9bvirdPVzIygBO7F3cpxTImau9BAKgPQ0vSOcmJnDkoWT9WkgipjdhFMzuSRWz wXZxc5EEfXT209799UxvjedP2Dv0Mm0tKUWD30Q+dPwPLy2/vihFVfmD7cRX/pXyiIq2 dIMiMzjWjyuW/Pldhbau+PH88XkNdzBMOnzdglH8oXNOLRLX0kNE6Q/Exs02TnLqCo03 2BoA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eNfE8L27WSnMGrKhYSIEYK8Z+p50w3HySEc+m+GC5XM=; b=cn1TSUJPLxYYy6r9V3RsYk/xTccnDvyYsGxbKah5W/qnQX4R+UdR/Gv6tddUU9vgYX usJ9khQjLy5KbFaxrvK6RzrYkwKld6X1gL2ZMAToZawawtMGtP99P04pHQJA0pf+vQa2 SvcWMR4BQws8r2TKwk9pRG3JXmbe3zBTKLkt0cS0PnaWkmdCbLOkJc+gOT+Lb0KCtwku V/S8wO7vXkpXTONJpSTdwCgBs12DkDoGS1cedxHXyxcRShOHBN+QqSMzPSIsn6YD9eZ2 7vfH+U+dHTOc4aYKr3ja5CcpfnDv50FMey81AN4dzKpJYjgytQtpu7YvCbrhiNiL07Of q34Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=fxFy3Ip6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r20-20020a638f54000000b005323e566996si1403031pgn.58.2023.06.02.12.02.20; Fri, 02 Jun 2023 12:02:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=fxFy3Ip6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236472AbjFBSmy (ORCPT + 99 others); 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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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