Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1965874ybl; Thu, 15 Aug 2019 04:20:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqye3/7f/YRDrGUQrz09ybYBuD9SaPtnajA4Cpe45LHwDitK4o9m2yneRs+jSnjtukxgGQDH X-Received: by 2002:a17:90a:d14a:: with SMTP id t10mr1769996pjw.85.1565868046509; Thu, 15 Aug 2019 04:20:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565868046; cv=none; d=google.com; s=arc-20160816; b=fGrfH5qyI+lLtLjFG9pY4ceOMO9Zg5v5q7T8JyYHUZHEOwZ4JYX2Li493338mudQ9V En2c0e4jXUqegwVi0pBBnJiItKLLi/PKYEiK4MjW4AThh/wE+fykBudOR8tESS4NqJhG 7n4gZXDWnIEuwX9lQTOqygxJIjumwl3WnqZwIWPi+XYFLPqRRIkZGBxRDsjNuEPERtQs kOZDNL0jkWxTdm1UTHcQMOjgCc4+SbejY8Zq1YLsZ3I1+NIHza/CyZVkupo8J1k5DRpD iX1XmhXL7wdPITONWYOrIxAgaIvI4413aa9gAJTr/siA67jWtu6Yiun2pjOIt1W8F29F tNxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=luHZxXf0ltsB/rYchS6jyTX6ZocQzaBBG4mozVabYYU=; b=cupwe0CtoXkXC2tlIciZQ8eeCbhb3DkuuzdPgtfxndgeSYpSlR3/orzKrbYb6T+xln Dt3fxfAHK82CmXYSlfa513Ni6HGLDdXRGV5zo7PyMc7K5cgGq+63VhLK3FfqgHrBBMQs qcjyz6tw5XhWi5McORCpyqsZq9xkDJT8BvX9pguQPmyYuXD2wZwuFXuK87GJTnFtPWXd dq9EDJ5m+rcKuUZfjPBsXhpenOIeS27np0tXJXBfmWOliMcI4XVtaToGrjSIdZIVWNwE VVRVALSk/UoAAoXjo+q3waf/QTTvAhPmp4dxHgnTijvyGykVlK3Q2thFwy7bb+R7nBtq BEhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o21si1691730pgd.223.2019.08.15.04.20.30; Thu, 15 Aug 2019 04:20:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731559AbfHOLS1 (ORCPT + 99 others); Thu, 15 Aug 2019 07:18:27 -0400 Received: from inva021.nxp.com ([92.121.34.21]:42662 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731216AbfHOLSX (ORCPT ); Thu, 15 Aug 2019 07:18:23 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C82F42000B7; Thu, 15 Aug 2019 13:18:20 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E3819200296; Thu, 15 Aug 2019 13:18:12 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 8A56340313; Thu, 15 Aug 2019 19:18:03 +0800 (SGT) From: Anson.Huang@nxp.com To: robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, rjw@rjwysocki.net, viresh.kumar@linaro.org, leonard.crestez@nxp.com, abel.vesa@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH 6/6] arm64: dts: imx8mn: Add cpu-freq support Date: Thu, 15 Aug 2019 06:59:43 -0400 Message-Id: <1565866783-19672-6-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565866783-19672-1-git-send-email-Anson.Huang@nxp.com> References: <1565866783-19672-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anson Huang Add A53 OPP table, cpu regulator and speed grading node to support cpu-freq driver. Signed-off-by: Anson Huang --- arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts | 4 +++ arch/arm64/boot/dts/freescale/imx8mn.dtsi | 41 +++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts b/arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts index 10ebf77..11c705d 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts @@ -27,6 +27,10 @@ }; }; +&A53_0 { + cpu-supply = <&buck2_reg>; +}; + &iomuxc { pinctrl-names = "default"; diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi index 1d8899b..785f4c4 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi @@ -51,6 +51,9 @@ clocks = <&clk IMX8MN_CLK_ARM>; enable-method = "psci"; next-level-cache = <&A53_L2>; + operating-points-v2 = <&a53_opp_table>; + nvmem-cells = <&cpu_speed_grade>; + nvmem-cell-names = "speed_grade"; }; A53_1: cpu@1 { @@ -61,6 +64,7 @@ clocks = <&clk IMX8MN_CLK_ARM>; enable-method = "psci"; next-level-cache = <&A53_L2>; + operating-points-v2 = <&a53_opp_table>; }; A53_2: cpu@2 { @@ -71,6 +75,7 @@ clocks = <&clk IMX8MN_CLK_ARM>; enable-method = "psci"; next-level-cache = <&A53_L2>; + operating-points-v2 = <&a53_opp_table>; }; A53_3: cpu@3 { @@ -81,6 +86,7 @@ clocks = <&clk IMX8MN_CLK_ARM>; enable-method = "psci"; next-level-cache = <&A53_L2>; + operating-points-v2 = <&a53_opp_table>; }; A53_L2: l2-cache0 { @@ -88,6 +94,35 @@ }; }; + a53_opp_table: opp-table { + compatible = "operating-points-v2"; + opp-shared; + + opp-1200000000 { + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <850000>; + opp-supported-hw = <0xb00>, <0x7>; + clock-latency-ns = <150000>; + opp-suspend; + }; + + opp-1400000000 { + opp-hz = /bits/ 64 <1400000000>; + opp-microvolt = <950000>; + opp-supported-hw = <0x300>, <0x7>; + clock-latency-ns = <150000>; + opp-suspend; + }; + + opp-1500000000 { + opp-hz = /bits/ 64 <1500000000>; + opp-microvolt = <1000000>; + opp-supported-hw = <0x100>, <0x3>; + clock-latency-ns = <150000>; + opp-suspend; + }; + }; + memory@40000000 { device_type = "memory"; reg = <0x0 0x40000000 0 0x80000000>; @@ -288,6 +323,12 @@ compatible = "fsl,imx8mn-ocotp", "fsl,imx7d-ocotp", "syscon"; reg = <0x30350000 0x10000>; clocks = <&clk IMX8MN_CLK_OCOTP_ROOT>; + #address-cells = <1>; + #size-cells = <1>; + + cpu_speed_grade: speed-grade@10 { + reg = <0x10 4>; + }; }; anatop: anatop@30360000 { -- 2.7.4