Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6557829rdb; Fri, 15 Dec 2023 01:50:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHiHybJyJQZglK3xc+BLBxTCQGgg8tdPTPKwyGJleOGg/1MPHJW0qDBUOBs8jXeEp6obzlC X-Received: by 2002:a05:6e02:174b:b0:35d:6211:80cd with SMTP id y11-20020a056e02174b00b0035d621180cdmr18552603ill.14.1702633824126; Fri, 15 Dec 2023 01:50:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702633824; cv=none; d=google.com; s=arc-20160816; b=UJC02bY4u1W8p3FwNhx8ejcm1huQp49lnvOR4yYEve/PXdn7N8Ms8ibAQdKePLW7S3 pAGmW9kq7fDOWv7RD0uAIN6t0st+9o0cSFiT6DnfCvsHQmxLoqcpPQ+VR32EbqQAtRvX v1H8FN/INyawk+15K7QOF+uK4o3hDP8Ro0YXWdGJXTp315DDDFbWes/rI2yFeRF4Yduf yfZXNk7bjHGKXuRJYhbJrIKfM6/rWhqquPcrmIEdLHVaXQLSO76a82bIk9O9mjECsolf g6Jef1YcbbhzLv8LL8/jn8jDGnDbqpL3iMPmLnkims2lZdaXqS+lkhGtF+JQ904ph+Q+ U/oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=gfyAeUwdG3kWmiG3zDIkkFIHvBG2DgV0KYTjf8nFcfI=; fh=E6KyOMgQ07fYDMc4DWdnHEI7H/QspqzFhznyhwHy6X4=; b=Dn8erxeVhtNNgB8Z3RgKwpOtmT29ZMt4dUA8uBLzeyPG9laQQy2i4m0Ss5GYIVFNZP WM2SxLwcDbjItBTfE50zLmJ79/+YfUzCTvbIoS3CjPu4nWNE6piWo5A90wmQb15Arrbp 9gIYFzqpVEXNZwWiNjDJF4XPpPzTe/zjcd9VASKFSDnV1RhP9cSodJkV19D3BVFMnXO9 n25mJNXYdIgdEp3MBMXmqQu0p55bYgz0DhT1h3Y0sdlFWwbRD/FQcJ2E4YFktUdG1CTS 4xwUoFcXvt2A8+DNot7T/i/QOip/mykVkLvFaO314eJZ204ipWmNr5g2pakyN72M9gm9 LyxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=RgWfEKNt; spf=pass (google.com: domain of linux-kernel+bounces-702-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-702-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o13-20020a65614d000000b005aaab9e7bcfsi12566143pgv.388.2023.12.15.01.50.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 01:50:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-702-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=RgWfEKNt; spf=pass (google.com: domain of linux-kernel+bounces-702-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-702-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D5A0AB22BF1 for ; Fri, 15 Dec 2023 09:50:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95E5F18C14; Fri, 15 Dec 2023 09:50:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="RgWfEKNt" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2753D182CA; Fri, 15 Dec 2023 09:50:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BF5VRwn002763; Fri, 15 Dec 2023 09:49:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=gfyAeUwdG3kWmiG3zDIkkFIHvBG2DgV0KYTjf8nFcfI=; b=Rg WfEKNtiyGOEfZnSZOI4vMjBbQe69Uoq+PGUvLdqUcAN8hbhoMsiGuDQc1fSTZvLr Hp82GVaCS3w8dE7NGXsaEwIA5df96BWCjwZPhbMWfb5r9Umsf9MbfrB8a56HJfbL Qoo/0PCGwMuZ2XprvfSrxqW9nZtGm9rSBYEBK6pTRjmNkXR0kgbKhL8SxMIFK6dL ZooBIGxCVvoAQeYWwCsZPKGJoNVAfOTLpO4UekVYecnlayawuSzboBVJDLWBcMAJ GAT+Wej7/5Wiws4mczbs4S0SKYOEirHdupBLdJQ4I3iCf8ADiK2PVrj9GoCC8t2L KR3CMZh9iVJaX8YKMqTw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3v0a37hren-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Dec 2023 09:49:43 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BF9ng6q009472 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Dec 2023 09:49:42 GMT Received: from [10.253.13.71] (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 15 Dec 2023 01:49:36 -0800 Message-ID: Date: Fri, 15 Dec 2023 17:49:33 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/5] dt-bindings: net: ipq4019-mdio: Document ipq5332 platform Content-Language: en-US To: Krzysztof Kozlowski , Conor Dooley CC: , , , , , , , , , , , , , , , , , , References: <20231212115151.20016-1-quic_luoj@quicinc.com> <20231212115151.20016-6-quic_luoj@quicinc.com> <20231212-caution-improvise-ed3cc6a1d305@spud> <11ffc985-3f2b-46b9-ae0b-911f7abe98d1@quicinc.com> <20231214-outshine-shush-8a11c68607cd@spud> From: Jie Luo In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: OT9xVU3sVdR7qO0SnfVKInj3WAR011_h X-Proofpoint-ORIG-GUID: OT9xVU3sVdR7qO0SnfVKInj3WAR011_h X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 malwarescore=0 clxscore=1015 bulkscore=0 adultscore=0 mlxlogscore=999 spamscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312150066 On 12/15/2023 3:29 PM, Krzysztof Kozlowski wrote: > On 15/12/2023 07:46, Jie Luo wrote: >> >> >> On 12/15/2023 1:12 AM, Conor Dooley wrote: >>> On Wed, Dec 13, 2023 at 04:26:56PM +0800, Jie Luo wrote: >>>> >>>> >>>> On 12/13/2023 12:06 AM, Conor Dooley wrote: >>>>> On Tue, Dec 12, 2023 at 07:51:50PM +0800, Luo Jie wrote: >>>>>> Update the yaml file for the new DTS properties. >>>>>> >>>>>> 1. cmn-reference-clock for the CMN PLL source clock select. >>>>>> 2. clock-frequency for MDIO clock frequency config. >>>>>> 3. add uniphy AHB & SYS GCC clocks. >>>>>> 4. add reset-gpios for MDIO bus level reset. >>>>>> >>>>>> Signed-off-by: Luo Jie >>>>>> --- >>>>>> .../bindings/net/qcom,ipq4019-mdio.yaml | 157 +++++++++++++++++- >>>>>> 1 file changed, 153 insertions(+), 4 deletions(-) >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml >>>>>> index 3407e909e8a7..9546a6ad7841 100644 >>>>>> --- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml >>>>>> +++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml >>>>>> @@ -20,6 +20,8 @@ properties: >>>>>> - enum: >>>>>> - qcom,ipq6018-mdio >>>>>> - qcom,ipq8074-mdio >>>>>> + - qcom,ipq9574-mdio >>>>>> + - qcom,ipq5332-mdio >>>>>> - const: qcom,ipq4019-mdio >>>>>> "#address-cells": >>>>>> @@ -30,19 +32,71 @@ properties: >>>>>> reg: >>>>>> minItems: 1 >>>>>> - maxItems: 2 >>>>>> + maxItems: 5 >>>>>> description: >>>>>> - the first Address and length of the register set for the MDIO controller. >>>>>> - the second Address and length of the register for ethernet LDO, this second >>>>>> - address range is only required by the platform IPQ50xx. >>>>>> + the first Address and length of the register set for the MDIO controller, >>>>>> + the optional second, third and fourth address and length of the register >>>>>> + for ethernet LDO, these three address range are required by the platform >>>>>> + IPQ50xx/IPQ5332/IPQ9574, the last address and length is for the CMN clock >>>>>> + to select the reference clock. >>>>>> + >>>>>> + reg-names: >>>>>> + minItems: 1 >>>>>> + maxItems: 5 >>>>>> clocks: >>>>>> + minItems: 1 >>>>>> items: >>>>>> - description: MDIO clock source frequency fixed to 100MHZ >>>>>> + - description: UNIPHY0 AHB clock source frequency fixed to 100MHZ >>>>>> + - description: UNIPHY1 AHB clock source frequency fixed to 100MHZ >>>>>> + - description: UNIPHY0 SYS clock source frequency fixed to 24MHZ >>>>>> + - description: UNIPHY1 SYS clock source frequency fixed to 24MHZ >>>>>> clock-names: >>>>>> + minItems: 1 >>>>>> items: >>>>>> - const: gcc_mdio_ahb_clk >>>>>> + - const: gcc_uniphy0_ahb_clk >>>>>> + - const: gcc_uniphy1_ahb_clk >>>>>> + - const: gcc_uniphy0_sys_clk >>>>>> + - const: gcc_uniphy1_sys_clk >>>>> >>>>>> + cmn-reference-clock: >>>>>> + oneOf: >>>>>> + - items: >>>>>> + - enum: >>>>>> + - 0 # CMN PLL reference internal 48MHZ >>>>>> + - 1 # CMN PLL reference external 25MHZ >>>>>> + - 2 # CMN PLL reference external 31250KHZ >>>>>> + - 3 # CMN PLL reference external 40MHZ >>>>>> + - 4 # CMN PLL reference external 48MHZ >>>>>> + - 5 # CMN PLL reference external 50MHZ >>>>>> + - 6 # CMN PLL reference internal 96MHZ >>>>> >>>>> Why is this not represented by an element of the clocks property? >>>> >>>> This property is for the reference clock source selection of CMN PLL, >>>> CMN PLL generates the different clock rates for the different Ethernet >>>> blocks, this CMN PLL configuration is not located in the GCC, so the >>>> clock framework can't be used, which is the general hardware register >>>> instead of RCG register for GCC. >>> >>> I don't see how the clock being provided by the "GCC" (whatever that is) >>> or by some other clock controller or fixed clock makes a difference. >>> Why can't the other clock provider be represented in the devicetree? >>> >> >> cmn-reference-clock is for selecting the reference clock source for the >> whole Ethernet block, which is just the standalone configure register. > > Sure, you are aware though that all clocks are just configure registers? > > Which clocks are these mentioned in the property? From where do they come? > > Anyway, property is in existing form is not correct - this is not a > generic property. > This property cmn-reference-clock is just the hardware register configuration, since the different IPQ platform needs to select the different reference clock source for the CMN PLL block that provides the various clock outputs to the all kinds of Ethernet devices, which is not from GCC provider. This is indeed not a generic property, which is the Ethernet function configs same as clock-frequency. > >> however the clock provider has the logical register distribution, such >> as for one clock tree, there is RCG, DIVIDER and branch registers in >> the qcom soc chip. >> >> The clock consumer defines the clock IDs of device tree to reference the >> clocks provided by the clock controller, and these clock IDs are >> provided by the header file of clock provider. >> >> like this, >> clocks = <&gcc GCC_MDIO_AHB_CLK>, >> >> <&gcc GCC_UNIPHY0_AHB_CLK>, >> >> <&gcc GCC_UNIPHY1_AHB_CLK>, >> >> <&gcc GCC_UNIPHY0_SYS_CLK>, >> >> <&gcc GCC_UNIPHY1_SYS_CLK>; >> >> gcc is the device node of clock provider, and GCC_MDIO_AHB_CLK is the >> clock ID. > > > > Best regards, > Krzysztof >