From patchwork Thu Dec 27 22:21:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 1913791 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 9C212DF2A2 for ; Thu, 27 Dec 2012 22:24:52 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1ToLq8-0000jA-Pn; Thu, 27 Dec 2012 22:22:13 +0000 Received: from mail-bk0-f54.google.com ([209.85.214.54]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1ToLq5-0000il-EU for linux-arm-kernel@lists.infradead.org; Thu, 27 Dec 2012 22:22:10 +0000 Received: by mail-bk0-f54.google.com with SMTP id je9so4505702bkc.27 for ; Thu, 27 Dec 2012 14:22:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=8rORsDmTb4sFp6tjmybUGB7HgLANdL1yWE5YvoLgYmA=; b=k1zHEhcUYSsnZ7wjQo1J6n5wdlDqa+aQlKoP4RCeZoPSG1dcrt9/UYVU/7+7owu9pE t/rYsotuUh3kuXDDUUcJpciYZiXLBdJ/2g6ilQZ5lhStdDMw74vf/5g6KOsW12RdaWoL ps3LUOoqe27IODZgm0bgCoB55B0pPzr7O5JcMop7VFVFjTqGHcfWnNAKjUtvaS7DP/oV kDfr9ko7pIOcGVbiKowW0dgEJdFbrV/WQVZYuwBOEMrVcuXi5PFin0c25UN3wiWEUL0K HJST2qIGOpbwL3le73jcfXUhE+lsvMt92gxs92cm6BoclZJFGD/b9NfeEpM8DQquEHIR qoIw== X-Received: by 10.204.5.202 with SMTP id 10mr14928415bkw.135.1356646927376; Thu, 27 Dec 2012 14:22:07 -0800 (PST) Received: from nijin.lan (dslc-082-083-232-148.pools.arcor-ip.net. [82.83.232.148]) by mx.google.com with ESMTPS id m20sm21621007bkw.4.2012.12.27.14.22.05 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Dec 2012 14:22:06 -0800 (PST) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH] ARM: Dove: add fixed regulator for CuBox USB power Date: Thu, 27 Dec 2012 23:21:59 +0100 Message-Id: <1356646919-2974-1-git-send-email-sebastian.hesselbarth@gmail.com> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121227_172209_676238_2D84DA67 X-CRM114-Status: GOOD ( 12.30 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (sebastian.hesselbarth[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.54 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Andrew Lunn , Russell King , Jason Cooper , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org CuBox needs to enable USB power on a gpio pin. Add a fixed regulator to always enable usb power on boot. Signed-off-by: Sebastian Hesselbarth --- Cc: Russell King Cc: Jason Cooper Cc: Andrew Lunn Cc: Sebastian Hesselbarth Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/boot/dts/dove-cubox.dts | 25 ++++++++++++++++++++++++- arch/arm/mach-dove/Kconfig | 2 ++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts index bed5b62..7e3065a 100644 --- a/arch/arm/boot/dts/dove-cubox.dts +++ b/arch/arm/boot/dts/dove-cubox.dts @@ -26,6 +26,24 @@ linux,default-trigger = "default-on"; }; }; + + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + usb_power: regulator@1 { + compatible = "regulator-fixed"; + reg = <1>; + regulator-name = "USB Power"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + regulator-always-on; + regulator-boot-on; + gpio = <&gpio0 1 0>; + }; + }; }; &uart0 { status = "okay"; }; @@ -50,9 +68,14 @@ }; &pinctrl { - pinctrl-0 = <&pmx_gpio_12>; + pinctrl-0 = <&pmx_gpio_1 &pmx_gpio_12>; pinctrl-names = "default"; + pmx_gpio_1: pmx-gpio-1 { + marvell,pins = "mpp1"; + marvell,function = "gpio"; + }; + pmx_gpio_12: pmx-gpio-12 { marvell,pins = "mpp12"; marvell,function = "gpio"; diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig index aedd0ba..36469d8 100644 --- a/arch/arm/mach-dove/Kconfig +++ b/arch/arm/mach-dove/Kconfig @@ -24,6 +24,8 @@ config MACH_DOVE_DT bool "Marvell Dove Flattened Device Tree" select MVEBU_CLK_CORE select MVEBU_CLK_GATING + select REGULATOR + select REGULATOR_FIXED_VOLTAGE select USE_OF help Say 'Y' here if you want your kernel to support the