Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1601613rwb; Fri, 19 Aug 2022 06:30:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR5dZErI8omKo9bH8iZtvR9h521EO6cAg3fyavCjMFQCHIaHqUbR5x7nzinGXTQnCHmH50GO X-Received: by 2002:a17:907:1690:b0:731:56b6:fded with SMTP id hc16-20020a170907169000b0073156b6fdedmr4962328ejc.119.1660915829290; Fri, 19 Aug 2022 06:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660915829; cv=none; d=google.com; s=arc-20160816; b=XbowLXZrCqkRlzDPABqKcpjtFZrjW96u0qBYhbPUQAqUop+kRT9WzGGpq1UdDVxdxT lJ3kXqxTOF9ZrfA52weEorw9AAF9mNGFdQp+QnskenA0Kd6TVcb6gXc0c94u4+aLc4Vh uB3welNYjqsM3ElJwvNgFg9zQP1EUeBjun1XHGc+dmsXnJPBEZSWnux6Nio7bIeqZiaO OPpZ3UU+UAhiEOOtPOm2gPmAhmAVn/AP9hidh71Q1BUFscH22QYyS4eT/hguiCoQt9Kf BPpt/qNhJHZZCIieNzWDtBr3U0cpxIKsCp3muea/NgN7woPoTsZyOOP8coGoqLIh1TLl iNYQ== 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=dSwJx5rR8Lt0DjDqYcDYjxzsWNyMCSlR3JILmPEc0Gs=; b=i3JM7O1EYn5ZejKBDOp8jqYQpDDp1HW8QXFDl0mft7hfhxjA0jHQkH4EIxPIv6J1as h0n2h4/INSTBjempQYiIcXGy/pXMlrhS7h6TKB7trVV84rDrCNhbbBdKiJIASgfjtSIf rEu6nR5cew5KK+zOWufQhi1D3SG9nF5JIW8p6FDLod688ZGSPYrFCpjX4hvMY5QUMWGd CzphlxSQZEliBfr4i2CXLqLm7cgd/zLEqfFoEqDUGzQIlITPX8uu7E59XrOi3YwO9+GB OTzPEoUGLgXKxHTY3vDhXyWzh9OnRCeyln4LcCiDnHMCWAOVW5hLAJDuAo/7B24E6+/z mGpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=lXTSFuth; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i12-20020a170906250c00b0072ee50dd4e6si2639106ejb.470.2022.08.19.06.30.03; Fri, 19 Aug 2022 06:30:29 -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=lXTSFuth; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349056AbiHSMpJ (ORCPT + 99 others); Fri, 19 Aug 2022 08:45:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349051AbiHSMo6 (ORCPT ); Fri, 19 Aug 2022 08:44:58 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B71199A942; Fri, 19 Aug 2022 05:44:55 -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=dSwJx5rR8Lt0DjDqYcDYjxzsWNyMCSlR3JILmPEc0Gs=; b=lXTSFuth2KRMYL1geYu4QyYr6W koUidmk/224fozLt9ISXEiugAU65hj/NlvdmdfdtPKyVwavJL9eeGJOnho8SefRAJ7E/uMCkthGuu CwYiAF7+OB/9yC3rB2KD1/IGhV/A4qYyJX+9hq+sdmieOZQpEboVrak90RxWs8DVjdCw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oP1Mg-00DufM-K7; Fri, 19 Aug 2022 14:44:42 +0200 Date: Fri, 19 Aug 2022 14:44:42 +0200 From: Andrew Lunn To: Krzysztof Kozlowski Cc: Wei Fang , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "f.fainelli@gmail.com" , "hkallweit1@gmail.com" , "linux@armlinux.org.uk" , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net-next 1/2] dt-bindings: net: tja11xx: add nxp,refclk_in property Message-ID: References: <20220819074729.1496088-1-wei.fang@nxp.com> <20220819074729.1496088-2-wei.fang@nxp.com> <9ec575ba-784d-74f7-8861-da2f62fe0773@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9ec575ba-784d-74f7-8861-da2f62fe0773@linaro.org> 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 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, Aug 19, 2022 at 02:37:36PM +0300, Krzysztof Kozlowski wrote: > On 19/08/2022 12:37, Wei Fang wrote: > >> > >>> + in RMII mode. This clock signal is provided by the PHY and is > >>> + typically derived from an external 25MHz crystal. Alternatively, > >>> + a 50MHz clock signal generated by an external oscillator can be > >>> + connected to pin REF_CLK. A third option is to connect a 25MHz > >>> + clock to pin CLK_IN_OUT. So, the REF_CLK should be configured > >>> + as input or output according to the actual circuit connection. > >>> + If present, indicates that the REF_CLK will be configured as > >>> + interface reference clock input when RMII mode enabled. > >>> + If not present, the REF_CLK will be configured as interface > >>> + reference clock output when RMII mode enabled. > >>> + Only supported on TJA1100 and TJA1101. > >> > >> Then disallow it on other variants. > >> > >> Shouldn't this be just "clocks" property? > >> > >> > > This property is to configure the pin REF_CLK of PHY as a input pin through phy register, > > indicates that the REF_CLK signal is provided by an external oscillator. so I don't think it's a > > "clock" property. > > clocks, not clock. > > You just repeated pieces of description as an counter-argument, so this > does not explain anything. > > If it is external oscillator shouldn't it be represented in DTS and then > obtained by driver (clk_get + clk_prepare_enable)? Otherwise how are you > sure that clock is actually enabled? And the lack of presence of the > external clock means it is derived from PHY? Using the common clock framework has been discussed in the past. But no PHY actually does this. When the SoC provides the clock, a few PHYs do make use of the common clock framework as clock consumers to ensure the clock is ticking. Plus, as the description says, this pin can be either a clock producer or a consumer. I don't think the common clock code allows this. It is also not something you negotiate between the MAC and PHY. The hardware designer typically decides based on the MAC and PHY actually used. So this is a fixed hardware property. Andrew