From patchwork Thu Nov 21 18:51:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 3220411 Return-Path: X-Original-To: patchwork-linux-arm@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 310DD9F3A0 for ; Thu, 21 Nov 2013 18:53:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44DBC20783 for ; Thu, 21 Nov 2013 18:53:37 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3A9DC20738 for ; Thu, 21 Nov 2013 18:53:36 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjZMh-0004UD-HR; Thu, 21 Nov 2013 18:52:35 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjZMK-0003in-PX; Thu, 21 Nov 2013 18:52:12 +0000 Received: from mho-03-ewr.mailhop.org ([204.13.248.66] helo=mho-01-ewr.mailhop.org) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjZLe-0003df-QD for linux-arm-kernel@lists.infradead.org; Thu, 21 Nov 2013 18:51:34 +0000 Received: from c-50-131-214-131.hsd1.ca.comcast.net ([50.131.214.131] helo=muffinssi.muru.com) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VjZLN-0003DS-3n; Thu, 21 Nov 2013 18:51:13 +0000 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 50.131.214.131 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19dwiEKKgKhNMTb509Z88+2 From: Tony Lindgren To: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: [PATCH 3/3] ARM: OMAP2+: Fix eMMC on n900 with device tree Date: Thu, 21 Nov 2013 10:51:06 -0800 Message-Id: <1385059866-10646-4-git-send-email-tony@atomide.com> X-Mailer: git-send-email 1.8.1.1 In-Reply-To: <1385059866-10646-1-git-send-email-tony@atomide.com> References: <1385059866-10646-1-git-send-email-tony@atomide.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131121_135131_074927_E8B6DD7D X-CRM114-Status: GOOD ( 17.82 ) X-Spam-Score: -1.9 (-) Cc: devicetree@vger.kernel.org, Sebastian Reichel , Pavel Machek , Aaro Koskinen X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Looks like we need to configure the regulators and use the pdata quirk to make eMMC work with device tree. It seems that mostly vmmc2 is used, and only some earlier revisions like the macro board used vaux3. Note that we can add support for the macro board later as needed by including the common n900 .dts file and configuring the vaux3 instead of vmmc2, and adding support for the smc91x Ethernet. Cc: devicetree@vger.kernel.org Cc: Pavel Machek Cc: Aaro Koskinen Cc: Sebastian Reichel Signed-off-by: Tony Lindgren --- Can you guys please test this on production n900 devices? I've tested it with my old macro board where I had to patch in vaux3 instead of vmmc2. I think there's some confusion in the legacy code comments, or else I'm confused. In any case, vaux3 works for the macro board, and I suspect that the production versions have vmmc2. If this does not work and vaux3 as regulator works, please also dump out the system_rev from your board. --- arch/arm/boot/dts/omap3-n900.dts | 6 +++++- arch/arm/mach-omap2/pdata-quirks.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index c4f20bf..392ced2 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts @@ -359,7 +359,11 @@ }; &mmc2 { - status = "disabled"; + /* most boards use vmmc2, only the macro boards use vaux3 */ + vmmc-supply = <&vmmc2>; + vmmc_aux-supply = <&vsim>; + bus-width = <8>; + non-removable; }; &mmc3 { diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 10c7145..39f020c 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -139,6 +139,7 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { static struct pdata_init pdata_quirks[] __initdata = { #ifdef CONFIG_ARCH_OMAP3 + { "nokia,omap3-n900", hsmmc2_internal_input_clk, }, { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, { "isee,omap3-igep0020", omap3_igep0020_legacy_init, },