From patchwork Tue Dec 13 15:22:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9472607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4ADA660476 for ; Tue, 13 Dec 2016 15:28:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B2F72851B for ; Tue, 13 Dec 2016 15:28:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EAE028563; Tue, 13 Dec 2016 15:28:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 12DD72851B for ; Tue, 13 Dec 2016 15:28:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cGoyi-0000bk-9T; Tue, 13 Dec 2016 15:26:52 +0000 Received: from forward7j.cmail.yandex.net ([5.255.227.108]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cGoyc-0000Fg-1Z for linux-arm-kernel@lists.infradead.org; Tue, 13 Dec 2016 15:26:48 +0000 Received: from smtp2h.mail.yandex.net (smtp2h.mail.yandex.net [IPv6:2a02:6b8:0:f05::116]) by forward7j.cmail.yandex.net (Yandex) with ESMTP id 2C8C42182C; Tue, 13 Dec 2016 18:26:21 +0300 (MSK) Received: from smtp2h.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2h.mail.yandex.net (Yandex) with ESMTP id 82D2B7809FD; Tue, 13 Dec 2016 18:26:08 +0300 (MSK) Received: by smtp2h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id VrbkazA9aJ-Pxn0nt83; Tue, 13 Dec 2016 18:26:07 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aosc.xyz; s=mail; t=1481642768; bh=gGRGkQ5EGwbvFoIlQ/XulZcxju9Q+UwFVHcbvNfaGAk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=oqC+Cje7NRh1z5ilODS7WmgscCpUhf8snFthMJnw2KZa60gmgtqtfcoqNQyHpiGfX nSrP5tqzJWOh4tJeBPO1XFzJbEwIhon5Dmib0CnpMXkSd2akR4zv1HE8EkTUOoT44g MnvtT53X3DRftFPdTTnlnhEn1tq3WDLS+S9idNlk= Authentication-Results: smtp2h.mail.yandex.net; dkim=pass header.i=@aosc.xyz X-Yandex-ForeignMX: FR X-Yandex-Suid-Status: 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 1130000036118848 From: Icenowy Zheng To: Russell King , Maxime Ripard , Chen-Yu Tsai , Michael Turquette , Stephen Boyd , Jorik Jonker , Hans de Goede , Quentin Schulz Subject: [PATCH 4/6] ARM: dts: sun8i: add opp-v2 table for A33 Date: Tue, 13 Dec 2016 23:22:50 +0800 Message-Id: <20161213152252.53749-5-icenowy@aosc.xyz> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161213152252.53749-1-icenowy@aosc.xyz> References: <20161213152252.53749-1-icenowy@aosc.xyz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161213_072646_406376_F8B0EFF7 X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Icenowy Zheng , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP An operating point table is needed for the cpu frequency adjusting to work. The operating point table is converted from the common value in extracted script.fex from many A33 board/tablets. 1.344GHz is set as a turbo-mode operating point, as it's described as "extremity_freq" in the FEX file. (the "max_freq" is 1.2GHz) Signed-off-by: Icenowy Zheng --- arch/arm/boot/dts/sun8i-a33.dtsi | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi index 504996cbee29..035c058324b8 100644 --- a/arch/arm/boot/dts/sun8i-a33.dtsi +++ b/arch/arm/boot/dts/sun8i-a33.dtsi @@ -46,7 +46,45 @@ #include / { + cpu0_opp_table: opp_table0 { + compatible = "operating-points-v2"; + opp-shared; + + opp@648000000 { + opp-hz = /bits/ 64 <648000000>; + opp-microvolt = <1040000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + opp@816000000 { + opp-hz = /bits/ 64 <816000000>; + opp-microvolt = <1100000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + opp@1008000000 { + opp-hz = /bits/ 64 <1008000000>; + opp-microvolt = <1200000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + opp@1200000000 { + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <1320000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + opp@1344000000 { + opp-hz = /bits/ 64 <1344000000>; + opp-microvolt = <1460000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + turbo-mode; + }; + }; + cpus { + cpu0: cpu@0 { + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; + operating-points-v2 = <&cpu0_opp_table>; + }; + cpu@2 { compatible = "arm,cortex-a7"; device_type = "cpu";