From patchwork Tue Aug 27 12:45:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Luo X-Patchwork-Id: 13779508 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 EE39CC54735 for ; Tue, 27 Aug 2024 12:48:27 +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=7Uj4LHv1ILRMKVBGYYHPtT45Q6AjC6e8sSeCwNDDVkk=; b=ejFFiqZDzzvv7nuUyv18oz+Qb/ pGhiLLeb2J0fq0PcJ9Bez9rr8J0qNQG4wOyq4xAYsYFkrlnS7WlJ2byRUM6tK/JYC3MjdXh+r8W8G XLNPgQOQ2LduPx2np/s1hqJFZDWVCRLR8Y2QOWnrRXwvUcvA+yzyp5XOqfGsIXauv/B3PSAig9bUs wGq7DU6a/F/dYop3VOEQ7cfJYdI8FcKms5oe+PHx2IBYdKppDCUkFAC/asnslH2p0d7CLsUGGPBEi SDLaTqKvFu/tMePwhY9bqvCA9QOtdWoApM7yIPK7Z4UgKO6Suu3CqNmhtc3HM4c55eiBJOSgSyiwZ 0j4XgCUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sivcN-0000000BJQN-0OSh; Tue, 27 Aug 2024 12:48:15 +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 1sivag-0000000BIsB-3PPC for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 12:46:33 +0000 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47R7lY0v023264; Tue, 27 Aug 2024 12:46:21 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= 7Uj4LHv1ILRMKVBGYYHPtT45Q6AjC6e8sSeCwNDDVkk=; b=ParELpY6qYSm8qiO YFLS3moEZ/lisE+3byx6dUHCWiyUqyt09AL7ciOWAH+HyslIJbmhFiHOcIZYX3dy yQy6XaHuA95zA9MKY9zraivfVFdm8Pku1CgQLYfVFePw8qRoSkbIWMXxnT+4Aq1x IIuv6SXPJyuTl3nhijinHTpdKcKwS9CgF9IUmWHacFi5FMjTi3YKw6YyZnd9cT/i d4s9kSwoCmaQXxz6XE44dqvboWBpfo8CXNy6YeZtg/QjaElbj3ZMJ8wcrdClripo squHHG3dP7wthruAnylKX3pFF0ZQy5ikc0hUk+m990YvsFFo+0knDdCDB59nYMwJ MN+MCA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 417980xyq1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Aug 2024 12:46:21 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 47RCkKa8019843 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Aug 2024 12:46:20 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; Tue, 27 Aug 2024 05:46:15 -0700 From: Luo Jie Date: Tue, 27 Aug 2024 20:45:59 +0800 Subject: [PATCH v3 1/4] dt-bindings: clock: qcom: Add CMN PLL clock controller for IPQ SoC MIME-Version: 1.0 Message-ID: <20240827-qcom_ipq_cmnpll-v3-1-8e009cece8b2@quicinc.com> References: <20240827-qcom_ipq_cmnpll-v3-0-8e009cece8b2@quicinc.com> In-Reply-To: <20240827-qcom_ipq_cmnpll-v3-0-8e009cece8b2@quicinc.com> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Konrad Dybcio CC: , , , , , , , , , , , , Luo Jie , Krzysztof Kozlowski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1724762769; l=3811; i=quic_luoj@quicinc.com; s=20240808; h=from:subject:message-id; bh=3GbQJzw/8wGhHOr2feAaJ0aET+YDZy/b9qSnEfHA2JA=; b=ToDHBqJi5hYK2WESlX8VE0lImAYhUdp3vZgjCVnj+dhI7WVmdOmYp66htA3j9GxYMfj88Qd25 1rzy6tRhECGA/ajIL0DcBfQtwMuI6RqVM8JNfbcERIOZxw7GxMsuBz9 X-Developer-Key: i=quic_luoj@quicinc.com; a=ed25519; pk=P81jeEL23FcOkZtXZXeDDiPwIwgAHVZFASJV12w3U6w= X-Originating-IP: [10.80.80.8] 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: 2KJsMiOnCStha7re87a-J4rs05PN_7-3 X-Proofpoint-ORIG-GUID: 2KJsMiOnCStha7re87a-J4rs05PN_7-3 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-27_06,2024-08-27_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 adultscore=0 mlxlogscore=999 spamscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 phishscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2408270094 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_054630_897834_50F743C1 X-CRM114-Status: GOOD ( 15.66 ) 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 CMN PLL controller provides clocks to networking hardware blocks on Qualcomm IPQ9574 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. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luo Jie --- .../bindings/clock/qcom,ipq9574-cmn-pll.yaml | 72 ++++++++++++++++++++++ include/dt-bindings/clock/qcom,ipq-cmn-pll.h | 15 +++++ 2 files changed, 87 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,ipq9574-cmn-pll.yaml b/Documentation/devicetree/bindings/clock/qcom,ipq9574-cmn-pll.yaml new file mode 100644 index 000000000000..1d9aa5ea01eb --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,ipq9574-cmn-pll.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,ipq9574-cmn-pll.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm CMN PLL Clock Controller on IPQ SoC + +maintainers: + - Bjorn Andersson + - Luo Jie + +description: + The CMN 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. The CMN (or common) PLL's only function + is to enable clocks to Ethernet hardware used with the IPQ SoC + and does not include any other function. + +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 CMN PLL + clock registers. + + clock-names: + items: + - const: ref + - const: ahb + - const: sys + + "#clock-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-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-cells = <1>; + }; +... diff --git a/include/dt-bindings/clock/qcom,ipq-cmn-pll.h b/include/dt-bindings/clock/qcom,ipq-cmn-pll.h new file mode 100644 index 000000000000..64b228659389 --- /dev/null +++ b/include/dt-bindings/clock/qcom,ipq-cmn-pll.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#ifndef _DT_BINDINGS_CLK_QCOM_IPQ_CMN_PLL_H +#define _DT_BINDINGS_CLK_QCOM_IPQ_CMN_PLL_H + +/* The output clocks from CMN PLL of IPQ9574. */ +#define PPE_353MHZ_CLK 0 +#define ETH0_50MHZ_CLK 1 +#define ETH1_50MHZ_CLK 2 +#define ETH2_50MHZ_CLK 3 +#define ETH_25MHZ_CLK 4 +#endif