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 6777DC32771 for ; Fri, 19 Aug 2022 12:52:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349108AbiHSMwv (ORCPT ); Fri, 19 Aug 2022 08:52:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349075AbiHSMwn (ORCPT ); Fri, 19 Aug 2022 08:52:43 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C64BDAEEA for ; Fri, 19 Aug 2022 05:52:42 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id by6so4421271ljb.11 for ; Fri, 19 Aug 2022 05:52:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=mu4cs57so/hm5H36zlHi+oMf19bmDRm3sZ5zNgNtxQw=; b=hNhliri7Zq4aZR+zeEMCZ3lQ5ZYBtWNy2tq1eX2FnOUex3MB2/WSBsLtkv/Z5TzQeY zmY4neIXhtWCN5O8TJxlGZeZoO0EVY78CjIM1XKxHSKNcZSuwhcly4clBIh6BuJd1KBw /ICBLHjVgOgsoiIinTgW6BtGwpPC8bqf6Z36kq5FGi048T2GQRGNxl8iqK9u7WYUqTwa N7Xj2QJCQybpwQdQqpHze8XBJSRAGU6TPCy+3Lq4KZ4k8K9pYyrXWTA34Xx25dP9fmUz mtStDwoNwY4y27TMTTQvgYMgcpT8k+gjdvfJegMD1z6IZBkfcm/YftwrsKU7UILwaSC3 PhHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=mu4cs57so/hm5H36zlHi+oMf19bmDRm3sZ5zNgNtxQw=; b=wCyMcPOuryaCPxGDwARboy31GgWpVIxQbaNTOJj842bkvYYcX1NYu9k1MZubAMDz/e c989KF/ZDHqVUbNRVh7Jx8w0/x1nduaWSlZGr955EWrKXtCGwIsaVY//r5DczyRyxw4c Q6eHYqX1V1ohk3biioDISN204E0uUhtjAIs2/nSIDEydZfh4saS37nNkdmD/q9atuOe+ PVsCquvuDetZGhCJytcI7ApJVKju0YCgABJKA33Gkw51lD61Ejt/9wbF26hZqIlw4fw4 x77DatXXm/Xgt1DygllMMfaF1jISa/MHw5QyYiDgt9rVqcaWdKp89HA69wk6liP+o5Xq kZoA== X-Gm-Message-State: ACgBeo1sNVgptoH3UBpmHamPK9SUJ71kC6bvFNVM2Wyrygf4EUNwwgZj POnzoNmpaFt1YuI+/JQQn/7rgg== X-Google-Smtp-Source: AA6agR6E41JWNeYbhnyaHiir5IGmfC6Jpna2d622TenkdJ160D+d3YEw6fp21X0jdpUta0fOc4uQ3g== X-Received: by 2002:a05:651c:12c4:b0:25d:fe06:8658 with SMTP id 4-20020a05651c12c400b0025dfe068658mr2017908lje.301.1660913560695; Fri, 19 Aug 2022 05:52:40 -0700 (PDT) Received: from ?IPV6:2001:14bb:ac:e5a8:ef73:73ed:75b3:8ed5? (d1xw6v77xrs23np8r6z-4.rev.dnainternet.fi. [2001:14bb:ac:e5a8:ef73:73ed:75b3:8ed5]) by smtp.gmail.com with ESMTPSA id e16-20020ac24e10000000b00492ba56995asm630824lfr.101.2022.08.19.05.52.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Aug 2022 05:52:40 -0700 (PDT) Message-ID: <55c53ba1-8e13-599d-1b16-5dab417a3059@linaro.org> Date: Fri, 19 Aug 2022 15:52:38 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH net-next 1/2] dt-bindings: net: tja11xx: add nxp,refclk_in property Content-Language: en-US To: Andrew Lunn 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" References: <20220819074729.1496088-1-wei.fang@nxp.com> <20220819074729.1496088-2-wei.fang@nxp.com> <9ec575ba-784d-74f7-8861-da2f62fe0773@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/08/2022 15:44, Andrew Lunn wrote: > 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. IOW, all DTSes would have a fixed clock stub without any logic usable by Common CF (like enabling)? > 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. Indeed. Anyway the property name and typo need fixes. Best regards, Krzysztof