From patchwork Thu Aug 8 14:03:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Luo X-Patchwork-Id: 13757524 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B7957C3DA4A for ; Thu, 8 Aug 2024 14:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=p2YUPwwXAfbcS25kXOW1+pIM9WQ4zb8c2WzP5UzMuWA=; b=AixPwGdcTm6N7uMd/MIa4zHXpb iP87gKJS4bE35MrELdqXiOPu8uL6RD8IZI7DEGahjmGqTGzzDLVOBgxLCS61l158VmN5vx26ETnL7 BYT2GxsVzYUBf8mAde3u+Y8RjxaFR4Mldgyjnrkx3NWNnW1tYIOyfp0hmT1pZy1+ZhNImWkwGZbtm 8u7tEu2Lv5TOjqbCONAObblz/vRMwTx5pZo4qlWucGGx7iMRw2+A2zG//XkQi6Yr8zWFeXElP1Li8 Vuvyc+UWdfoNDyeh2lxNQvJQHy/WIFtIREq7xfGg9ATudmY7BevP3EbXql2RE6v3PQ9z+ls22D44f FhQ2SxxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sc3lY-00000008RmP-3Gcc; Thu, 08 Aug 2024 14:05:20 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sc3kS-00000008RSO-2JSH for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2024 14:04:14 +0000 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47890bsc000996; Thu, 8 Aug 2024 14:04:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= p2YUPwwXAfbcS25kXOW1+pIM9WQ4zb8c2WzP5UzMuWA=; b=fpqbtqo0rombt/0W cgU4A2UaARFInfDHVvWGpJnFS1PtL3dvbq6i51WwRnz531I3abUPkfw71Q+kINit rTnYVMG/QrqDzIDM7KYN8Y24lagDgnGtbE1J8L4BnaEGB+Grhka3gE4oq20+ofHC XgdMZQG+U/Wt/oXxkIkHAgEEdr+F1lXAzWTbZNMkZ1DOQKeraLqYc+lQbcRjOr+c VsqHDpwFabdIoQp4E/eLMGZiQpK1I5MdePaIHVx2W8GreF1bWz60qHlx97+iavy/ EboVOyE9OEK6aGhYoDLwOE/Xh61dqkFvxasHCbZh+KsmqsOvBkpSDSFbLPXHRLJq /2qsrQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 40vfav2ba4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Aug 2024 14:04:05 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA01.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 478E44bB020893 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 8 Aug 2024 14:04:04 GMT Received: from nsssdc-sh01-lnx.ap.qualcomm.com (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.1544.9; Thu, 8 Aug 2024 07:03:59 -0700 From: Luo Jie Date: Thu, 8 Aug 2024 22:03:12 +0800 Subject: [PATCH 1/4] dt-bindings: clock: qcom: Add common PLL clock controller for IPQ SoC MIME-Version: 1.0 Message-ID: <20240808-qcom_ipq_cmnpll-v1-1-b0631dcbf785@quicinc.com> References: <20240808-qcom_ipq_cmnpll-v1-0-b0631dcbf785@quicinc.com> In-Reply-To: <20240808-qcom_ipq_cmnpll-v1-0-b0631dcbf785@quicinc.com> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Konrad Dybcio CC: , , , , , , , , , , Luo Jie X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1723125835; l=3457; i=quic_luoj@quicinc.com; s=20240808; h=from:subject:message-id; bh=bqymaGN7lV2NoCv9XT3InR9+WQfCR0oVo66v/yxIWRI=; b=Nk7Wez3VXXPKqrcKEJNmQZcnuf0h0fDNO7KboC9aiMoFLsAgatw7B2lrHrIKzwk0sPfBSIvfi 5+Scdq024P5D3cNhbQo83hA4MNuAiEuK6VQDd5LgRXPhESu14oRsXc7 X-Developer-Key: i=quic_luoj@quicinc.com; a=ed25519; pk=P81jeEL23FcOkZtXZXeDDiPwIwgAHVZFASJV12w3U6w= X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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-ORIG-GUID: StMIi3mr6pk-Rfde23clEiARM9B7MHkk X-Proofpoint-GUID: StMIi3mr6pk-Rfde23clEiARM9B7MHkk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-08_14,2024-08-07_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 adultscore=0 lowpriorityscore=0 mlxscore=0 bulkscore=0 phishscore=0 suspectscore=0 impostorscore=0 clxscore=1011 spamscore=0 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2408080099 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240808_070412_642061_29014CB9 X-CRM114-Status: GOOD ( 14.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The common PLL controller provides clocks to networking hardware blocks on Qualcomm IPQ SoC. It receives input clock from the on-chip Wi-Fi, and produces output clocks at fixed rates. These output rates are predetermined, and are unrelated to the input clock rate. The output clocks are supplied to the Ethernet hardware such as PPE (packet process engine) and the externally connected switch or PHY device. The common PLL driver is initially being supported for IPQ9574 SoC. Signed-off-by: Luo Jie --- .../bindings/clock/qcom,ipq-cmn-pll.yaml | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,ipq-cmn-pll.yaml b/Documentation/devicetree/bindings/clock/qcom,ipq-cmn-pll.yaml new file mode 100644 index 000000000000..c45b3a201751 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,ipq-cmn-pll.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,ipq-cmn-pll.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Common PLL Clock Controller on IPQ SoC + +maintainers: + - Bjorn Andersson + - Luo Jie + +description: + The common PLL clock controller expects a reference input clock. + This reference clock is from the on-board Wi-Fi. The CMN PLL + supplies a number of fixed rate output clocks to the Ethernet + devices including PPE (packet process engine) and the connected + switch or PHY device. + +properties: + compatible: + enum: + - qcom,ipq9574-cmn-pll + + reg: + maxItems: 1 + + clocks: + items: + - description: The reference clock, the supported clock rates include + 25000000, 31250000, 40000000, 48000000, 50000000 and 96000000 HZ. + - description: The AHB clock + - description: The SYS clock + description: + The reference clock is the source clock of CMN PLL, which is from the + Wi-Fi. The AHB and SYS clocks must be enabled to access common PLL + clock registers. + + clock-names: + items: + - const: ref + - const: ahb + - const: sys + + clock-output-names: + items: + - const: ppe-353mhz + - const: eth0-50mhz + - const: eth1-50mhz + - const: eth2-50mhz + - const: eth-25mhz + description: + The output clocks are given to Ethernet blocks that includes PPE and + the connected switch or PHY device. + + "#clock-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - clock-output-names + - "#clock-cells" + +additionalProperties: false + +examples: + - | + #include + + clock-controller@9b000 { + compatible = "qcom,ipq9574-cmn-pll"; + reg = <0x0009b000 0x800>; + clocks = <&cmn_pll_ref_clk>, + <&gcc GCC_CMN_12GPLL_AHB_CLK>, + <&gcc GCC_CMN_12GPLL_SYS_CLK>; + clock-names = "ref", "ahb", "sys"; + clock-output-names = "ppe-353mhz", + "eth0-50mhz", + "eth1-50mhz", + "eth2-50mhz", + "eth-25mhz"; + #clock-cells = <1>; + }; +...