From patchwork Tue Jun 11 22:22:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2707211 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 863BBC1459 for ; Tue, 11 Jun 2013 22:24:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC2722041B for ; Tue, 11 Jun 2013 22:24:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC9B82040A for ; Tue, 11 Jun 2013 22:24:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756454Ab3FKWXO (ORCPT ); Tue, 11 Jun 2013 18:23:14 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:37953 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757586Ab3FKWXL (ORCPT ); Tue, 11 Jun 2013 18:23:11 -0400 Received: from avalon.ideasonboard.com (unknown [91.177.151.179]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 64DDB35A6F; Wed, 12 Jun 2013 00:23:03 +0200 (CEST) From: Laurent Pinchart To: linux-sh@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, Linus Walleij , Magnus Damm , Guennadi Liakhovetski , James Hogan Subject: [PATCH v5 19/22] ARM: shmobile: kzm9g-reference: Move SDHI regulators to DT Date: Wed, 12 Jun 2013 00:22:48 +0200 Message-Id: <1370989371-30846-20-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1370989371-30846-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1370989371-30846-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> 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.1 required=5.0 tests=BAYES_00, 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 Create two GPIO-controlled fixed-voltage regulators in the kzm9g-reference DT and remove manual configuration of the corresponding GPIOs from board code. Signed-off-by: Laurent Pinchart --- arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 23 +++++++++++++++++++++-- arch/arm/mach-shmobile/board-kzm9g-reference.c | 6 ------ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts index 24f7b04..6374965 100644 --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts @@ -13,6 +13,7 @@ /dts-v1/; /include/ "sh73a0.dtsi" +#include / { model = "KZM-A9-GT"; @@ -58,6 +59,24 @@ regulator-boot-on; }; + vmmc_sdhi0: regulator@2 { + compatible = "regulator-fixed"; + regulator-name = "SDHI0 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&pfc 15 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vmmc_sdhi2: regulator@3 { + compatible = "regulator-fixed"; + regulator-name = "SDHI2 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&pfc 14 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + lan9220@10000000 { compatible = "smsc,lan9220", "smsc,lan9115"; reg = <0x10000000 0x100>; @@ -200,7 +219,7 @@ pinctrl-0 = <&sdhi0_pins>; pinctrl-names = "default"; - vmmc-supply = <®_3p3v>; + vmmc-supply = <&vmmc_sdhi0>; bus-width = <4>; status = "okay"; }; @@ -209,7 +228,7 @@ pinctrl-0 = <&sdhi2_pins>; pinctrl-names = "default"; - vmmc-supply = <®_3p3v>; + vmmc-supply = <&vmmc_sdhi2>; bus-width = <4>; broken-cd; status = "okay"; diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c index fc2bb37..1847b4d 100644 --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c @@ -21,7 +21,6 @@ */ #include -#include #include #include #include @@ -37,11 +36,6 @@ static void __init kzm_init(void) { sh73a0_add_standard_devices_dt(); - /* enable SD */ - gpio_request_one(15, GPIOF_OUT_INIT_HIGH, NULL); /* power */ - - gpio_request_one(14, GPIOF_OUT_INIT_HIGH, NULL); /* power */ - #ifdef CONFIG_CACHE_L2X0 /* Early BRESP enable, Shared attribute override enable, 64K*8way */ l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff);