Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1563588rdb; Wed, 31 Jan 2024 02:28:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IGz+zJMLFj8Hs+t4gpFPCYXZvN/swsfJElegupBmilRadNNa8vAUCG9RwJ+QQn8C41VAh8d X-Received: by 2002:a05:6a21:9703:b0:19c:ae4c:1757 with SMTP id ub3-20020a056a21970300b0019cae4c1757mr923340pzb.52.1706696892048; Wed, 31 Jan 2024 02:28:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706696892; cv=pass; d=google.com; s=arc-20160816; b=nEJfFUu3lbBdPJRQi7VGBqHSb9LHu899sojB52pMJbngkbwGxrSVfoUQfzzJ+DGw4y F7GydaUnOEDSj57BZu9jwdUxlR8B+R9fKleU2Eu2vlckgNb/yrJTFE1EhfdkF2ZDDXw8 eSjxICL5WAuUZN+WnI/6izwW/+ixJdg3k5pUXci++kd+fQqxZzzd79vCr4NdkWgOSxdG Vo58+T5AwsdPmeSAJXfqbR/cjbQxj5FbfODj2kq0GUAKDo+IoP/Ugbohsr3DXYk4BlmU C/P/KQ8E98Pl359UfdpVwN9ZRe5XJekeP8BeT3rDIEv4Q3T95Eu8BvhxZv7sMa+oxFmM 8tMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=KCx8K4V3NI3cmWjVvQ8onFPcU47BM5FGm/5VEL3GmcU=; fh=b8e8Ft3OP5EHepCYHDzCvNaWHWsJ9LLLiZvwxWAqxpo=; b=aUhmyWKttRsWuocTiHeesCbjMCQsm08rPtnn9rHXQhTwjtLvE7vjkD40hk/swp7T3Z mZ/GngMfdYh9PzCQkcSIDiaShbmJ8a1s7Q6DYqpyr1pY2PEVI5NmUbHnbR7iD21S5ya4 n8OvjgWqfimAZVwbe+/ZOefV3Ql1h7vNLCtyFSx/EeWp2R2ro/fkHXXmPorQB+3qh1nG gpjBxIooNGB2CHgvQEPMJHAXlVfRNqfFd752RkSFczh7ZxFkcOqKmokzlfowRB5qjol6 wpYggUKZ/y9q316IGrfgt7bC65gJYMMjI2ccKz5FTJUCKxKXzqtJ5ckB67eoRfgwj+Nt QPuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=jmu.edu.cn dmarc=pass fromdomain=jmu.edu.cn); spf=pass (google.com: domain of linux-kernel+bounces-46211-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46211-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=jmu.edu.cn X-Forwarded-Encrypted: i=1; AJvYcCWsVu3e6+X+q6He3Qx9UABZL/hR15FWxy6SxDdxsgBHbnvsBMJy76IYggXvlHuTXcPchSZ66DwzQ5g81mav+FY5DZiIRaYGK38Z7MTtfQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t2-20020a6564c2000000b005d77ddddadfsi9132519pgv.567.2024.01.31.02.28.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:28:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46211-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=jmu.edu.cn dmarc=pass fromdomain=jmu.edu.cn); spf=pass (google.com: domain of linux-kernel+bounces-46211-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46211-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=jmu.edu.cn 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2CACB28DAA7 for ; Wed, 31 Jan 2024 10:22:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AA10D79DA9; Wed, 31 Jan 2024 10:20:45 +0000 (UTC) Received: from mail-m155101.qiye.163.com (mail-m155101.qiye.163.com [101.71.155.101]) (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 D4E4F762DC; Wed, 31 Jan 2024 10:20:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=101.71.155.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696444; cv=none; b=iZ8s1PXPREu+N47QzUhNmd5UIpXUbfkhI4hqJ2uFOwQghGZYmDFrBC6JoNl9FYCq/PZAJd2gHzzDVDSuEbBYs4gvRrR3pq8KCciRMtBjfVe2qZFuD8oZ3dAJnzSvRpjAQL8ZTtzteyG02l7sGQnIdwSwvrzQrkN/CjHIVw5/MTQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696444; c=relaxed/simple; bh=ncR9ZVIZnZgWBEFvpVMj29/3lFamrXl8RVdJlKMnu6U=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=u2/IMq7VMxtlEk07+oNCNPGoiwZnSNPAcW/8Hl0Zy1ADVwjd2pACFeGZgQjbE0fb2fVpo9bIkUTLCXv0E7QQpk+4Pyf6Y6wVLFOcATSSrlnBxcP4m4+kIsAbrMokxQ9z5RBvZ3avAdOWdILmv6vrQmE8lKywKf6lgiQW/GKd14o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=jmu.edu.cn; spf=pass smtp.mailfrom=jmu.edu.cn; arc=none smtp.client-ip=101.71.155.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=jmu.edu.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=jmu.edu.cn Received: from amadeus-Vostro-3710.lan (unknown [116.25.94.16]) by smtp.qiye.163.com (Hmail) with ESMTPA id C9EF57E010C; Wed, 31 Jan 2024 18:20:14 +0800 (CST) From: Chukun Pan To: Bjorn Andersson Cc: Konrad Dybcio , Krzysztof Kozlowski , Conor Dooley , Rob Herring , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Chukun Pan Subject: [PATCH 1/3] arm64: dts: qcom: ipq6018: separate CPU OPP tables Date: Wed, 31 Jan 2024 18:20:01 +0800 Message-Id: <20240131102003.2061203-1-amadeus@jmu.edu.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlCHk0fVhpPHhoZHk8ZGUxDSlUTARMWGhIXJBQOD1 lXWRgSC1lBWUpKTVVJTlVCT1VKTVlXWRYaDxIVHRRZQVlPS0hVSkhKQkhLVUpLS1VLWQY+ X-HM-Tid: 0a8d5f08985f03a2kunmc9ef57e010c X-HM-MType: 10 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Mhw6NRw5AjMJTU9CC04eAUgI HwgwFDlVSlVKTEtNTUJNT0pNS09JVTMWGhIXVRoWGh8eDgg7ERYOVR4fDlUYFUVZV1kSC1lBWUpK TVVJTlVCT1VKTVlXWQgBWUFNTk5LNwY+ Some IPQ6000 SoCs do not come with PMIC (MP5496) chip, which causes cpufreq to be unavailable due to lack of cpu-supply. Separate CPU OPP tables from soc.dtsi to support versions with and without PMIC chip. Signed-off-by: Chukun Pan --- arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 1 + arch/arm64/boot/dts/qcom/ipq6018-opp.dtsi | 74 ++++++++++++++++++++ arch/arm64/boot/dts/qcom/ipq6018.dtsi | 56 --------------- 3 files changed, 75 insertions(+), 56 deletions(-) create mode 100644 arch/arm64/boot/dts/qcom/ipq6018-opp.dtsi diff --git a/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts b/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts index f5f4827c0e17..06dfc2cb6b7f 100644 --- a/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts +++ b/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts @@ -8,6 +8,7 @@ /dts-v1/; #include "ipq6018.dtsi" +#include "ipq6018-opp.dtsi" / { model = "Qualcomm Technologies, Inc. IPQ6018/AP-CP01-C1"; diff --git a/arch/arm64/boot/dts/qcom/ipq6018-opp.dtsi b/arch/arm64/boot/dts/qcom/ipq6018-opp.dtsi new file mode 100644 index 000000000000..9c0bed2d8bf5 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/ipq6018-opp.dtsi @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * IPQ60xx with PMIC (MP5496) CPU OPP tables + */ + +/ { + cpu_opp_table: opp-table-cpu { + compatible = "operating-points-v2-kryo-cpu"; + nvmem-cells = <&cpu_speed_bin>; + opp-shared; + + opp-864000000 { + opp-hz = /bits/ 64 <864000000>; + opp-microvolt = <725000>; + opp-supported-hw = <0xf>; + clock-latency-ns = <200000>; + }; + + opp-1056000000 { + opp-hz = /bits/ 64 <1056000000>; + opp-microvolt = <787500>; + opp-supported-hw = <0xf>; + clock-latency-ns = <200000>; + }; + + opp-1320000000 { + opp-hz = /bits/ 64 <1320000000>; + opp-microvolt = <862500>; + opp-supported-hw = <0x3>; + clock-latency-ns = <200000>; + }; + + opp-1440000000 { + opp-hz = /bits/ 64 <1440000000>; + opp-microvolt = <925000>; + opp-supported-hw = <0x3>; + clock-latency-ns = <200000>; + }; + + opp-1608000000 { + opp-hz = /bits/ 64 <1608000000>; + opp-microvolt = <987500>; + opp-supported-hw = <0x1>; + clock-latency-ns = <200000>; + }; + + opp-1800000000 { + opp-hz = /bits/ 64 <1800000000>; + opp-microvolt = <1062500>; + opp-supported-hw = <0x1>; + clock-latency-ns = <200000>; + }; + }; +}; + +&CPU0 { + operating-points-v2 = <&cpu_opp_table>; + cpu-supply = <&ipq6018_s2>; +}; + +&CPU1 { + operating-points-v2 = <&cpu_opp_table>; + cpu-supply = <&ipq6018_s2>; +}; + +&CPU2 { + operating-points-v2 = <&cpu_opp_table>; + cpu-supply = <&ipq6018_s2>; +}; + +&CPU3 { + operating-points-v2 = <&cpu_opp_table>; + cpu-supply = <&ipq6018_s2>; +}; diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi index 5e1277fea725..ea72fd5739ac 100644 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi @@ -41,8 +41,6 @@ CPU0: cpu@0 { next-level-cache = <&L2_0>; clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>; clock-names = "cpu"; - operating-points-v2 = <&cpu_opp_table>; - cpu-supply = <&ipq6018_s2>; }; CPU1: cpu@1 { @@ -53,8 +51,6 @@ CPU1: cpu@1 { next-level-cache = <&L2_0>; clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>; clock-names = "cpu"; - operating-points-v2 = <&cpu_opp_table>; - cpu-supply = <&ipq6018_s2>; }; CPU2: cpu@2 { @@ -65,8 +61,6 @@ CPU2: cpu@2 { next-level-cache = <&L2_0>; clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>; clock-names = "cpu"; - operating-points-v2 = <&cpu_opp_table>; - cpu-supply = <&ipq6018_s2>; }; CPU3: cpu@3 { @@ -77,8 +71,6 @@ CPU3: cpu@3 { next-level-cache = <&L2_0>; clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>; clock-names = "cpu"; - operating-points-v2 = <&cpu_opp_table>; - cpu-supply = <&ipq6018_s2>; }; L2_0: l2-cache { @@ -95,54 +87,6 @@ scm { }; }; - cpu_opp_table: opp-table-cpu { - compatible = "operating-points-v2-kryo-cpu"; - nvmem-cells = <&cpu_speed_bin>; - opp-shared; - - opp-864000000 { - opp-hz = /bits/ 64 <864000000>; - opp-microvolt = <725000>; - opp-supported-hw = <0xf>; - clock-latency-ns = <200000>; - }; - - opp-1056000000 { - opp-hz = /bits/ 64 <1056000000>; - opp-microvolt = <787500>; - opp-supported-hw = <0xf>; - clock-latency-ns = <200000>; - }; - - opp-1320000000 { - opp-hz = /bits/ 64 <1320000000>; - opp-microvolt = <862500>; - opp-supported-hw = <0x3>; - clock-latency-ns = <200000>; - }; - - opp-1440000000 { - opp-hz = /bits/ 64 <1440000000>; - opp-microvolt = <925000>; - opp-supported-hw = <0x3>; - clock-latency-ns = <200000>; - }; - - opp-1608000000 { - opp-hz = /bits/ 64 <1608000000>; - opp-microvolt = <987500>; - opp-supported-hw = <0x1>; - clock-latency-ns = <200000>; - }; - - opp-1800000000 { - opp-hz = /bits/ 64 <1800000000>; - opp-microvolt = <1062500>; - opp-supported-hw = <0x1>; - clock-latency-ns = <200000>; - }; - }; - pmuv8: pmu { compatible = "arm,cortex-a53-pmu"; interrupts = ; -- 2.25.1