From patchwork Mon Jul 8 16:04:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2824953 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 583549F7D6 for ; Mon, 8 Jul 2013 16:05:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2AE0420149 for ; Mon, 8 Jul 2013 16:05:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE58220160 for ; Mon, 8 Jul 2013 16:05:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751305Ab3GHQFF (ORCPT ); Mon, 8 Jul 2013 12:05:05 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:50558 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534Ab3GHQFE (ORCPT ); Mon, 8 Jul 2013 12:05:04 -0400 Received: from axis700.grange (dslb-094-221-113-239.pools.arcor-ip.net [94.221.113.239]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MW9RR-1Uh1ON3kSH-00XrXO; Mon, 08 Jul 2013 18:04:59 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id 8C02140BB5; Mon, 8 Jul 2013 18:04:58 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1UwDvu-0002cX-Cf; Mon, 08 Jul 2013 18:04:58 +0200 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Cc: Magnus Damm , Simon Horman , Guennadi Liakhovetski Subject: [PATCH v3 2/2] ARM: shmobile: ape6evm-reference: add CPUFreq support Date: Mon, 8 Jul 2013 18:04:58 +0200 Message-Id: <1373299498-10044-3-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1373299498-10044-1-git-send-email-g.liakhovetski@gmx.de> References: <1373299498-10044-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:RQTKU6ILWtkiM6+ogQFDdsodXZeFb61z6auHWQeORyb cd+GW6VnTV3CpN3ush76Vi7W3HxDV84bnUtCQpQceaDdGJI9GO 1VCS9frEsUNs6+qGq4hmYxRyDVVT4IIBPVOU/l5YsY/nVDfhF4 qWDXjEpROqTkfmrauZiWyA6pP3aeOsII1BRZZwNKedtEk19Ytf nSesV2U7FrpB7kCcJTk8zUJxGftrpVIc5xYTPYSHOOAxyb/d0Y rs4+PBVnCEGjyqvjm9zokrH/PY0vMy10O40P32vQHgI0E/QPFn s9xmBDFhsqliFfBQiddejX7W9sDni8FVXjseY3u7EneVL+CkNA NEZ4KAK+JwvVlOtu33YloCWkFwXhGWLSJbMJj0SHSHvbUGHlr0 FDEfYfhIxJ1Hw== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add CPUFreq support to ape6evm-reference, using a max8973 regulator, that is supplying V_DVFS for the 4 CA15 cores on r8a73a4. Signed-off-by: Guennadi Liakhovetski --- v3: call platform_device_register_simple() directly arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts | 22 ++++++++++++++++++++++ arch/arm/mach-shmobile/board-ape6evm-reference.c | 2 ++ 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts index 3251f05..6f4506e 100644 --- a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts +++ b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts @@ -31,3 +31,25 @@ ranges = <0 0 0 0x80000000>; }; }; + +&i2c5 { + vdd_dvfs: max8973@1b { + compatible = "maxim,max8973"; + reg = <0x1b>; + + regulator-min-microvolt = <935000>; + regulator-max-microvolt = <1200000>; + regulator-boot-on; + regulator-always-on; + }; +}; + +&cpu0 { + cpu0-supply = <&vdd_dvfs>; + operating-points = < + /* kHz uV */ + 1950000 1115000 + 1462500 995000 + >; + voltage-tolerance = <1>; /* 1% */ +}; diff --git a/arch/arm/mach-shmobile/board-ape6evm-reference.c b/arch/arm/mach-shmobile/board-ape6evm-reference.c index c828874..46b41de 100644 --- a/arch/arm/mach-shmobile/board-ape6evm-reference.c +++ b/arch/arm/mach-shmobile/board-ape6evm-reference.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,7 @@ static void __init ape6evm_add_standard_devices(void) r8a73a4_pinmux_init(); r8a73a4_add_dt_devices(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0); } static const char *ape6evm_boards_compat_dt[] __initdata = {