From patchwork Fri May 20 10:50:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koen Kooi X-Patchwork-Id: 803112 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4KAocj7007862 for ; Fri, 20 May 2011 10:50:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934203Ab1ETKuh (ORCPT ); Fri, 20 May 2011 06:50:37 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:51136 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934174Ab1ETKug (ORCPT ); Fri, 20 May 2011 06:50:36 -0400 Received: by wya21 with SMTP id 21so2624249wya.19 for ; Fri, 20 May 2011 03:50:35 -0700 (PDT) Received: by 10.216.191.208 with SMTP id g58mr3842977wen.85.1305888634853; Fri, 20 May 2011 03:50:34 -0700 (PDT) Received: from localhost (ip545070eb.adsl-surfen.hetnet.nl [84.80.112.235]) by mx.google.com with ESMTPS id h39sm1767091wes.29.2011.05.20.03.50.33 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 May 2011 03:50:34 -0700 (PDT) From: Koen Kooi To: linux-omap@vger.kernel.org Cc: jkridner@beagleboard.org, Koen Kooi Subject: [PATCH] OMAP3: beagle: add support for beagleboard xM revision C Date: Fri, 20 May 2011 12:50:15 +0200 Message-Id: <1305888615-28472-1-git-send-email-koen@dominion.thruhere.net> X-Mailer: git-send-email 1.6.6.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 20 May 2011 10:50:40 +0000 (UTC) The USB enable GPIO has been inverted and the USER button moved. Signed-off-by: Koen Kooi --- arch/arm/mach-omap2/board-omap3beagle.c | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 2de4b02..05c5bab 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -62,7 +62,9 @@ * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1 * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0 * C4 = GPIO173, GPIO172, GPIO171: 1 0 1 - * XM = GPIO173, GPIO172, GPIO171: 0 0 0 + * XMA = GPIO173, GPIO172, GPIO171: 0 0 0 + * XMB = GPIO173, GPIO172, GPIO171: 0 0 1 + * XMC = GPIO173, GPIO172, GPIO171: 0 1 0 */ enum { OMAP3BEAGLE_BOARD_UNKN = 0, @@ -70,6 +72,7 @@ enum { OMAP3BEAGLE_BOARD_C1_3, OMAP3BEAGLE_BOARD_C4, OMAP3BEAGLE_BOARD_XM, + OMAP3BEAGLE_BOARD_XMC, }; static u8 omap3_beagle_version; @@ -124,9 +127,17 @@ static void __init omap3_beagle_init_rev(void) printk(KERN_INFO "OMAP3 Beagle Rev: xM\n"); omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; break; + case 1: + printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n"); + omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; + break; + case 2: + printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n"); + omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC; + break; default: - printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev); - omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN; + printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd, assuming xM C or newer\n", beagle_rev); + omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC; } return; @@ -298,7 +309,7 @@ static int beagle_twl_gpio_setup(struct device *dev, /* REVISIT: need ehci-omap hooks for external VBUS * power switch and overcurrent detect */ - if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) { + if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM && omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMC) { r = gpio_request(gpio + 1, "EHCI_nOC"); if (!r) { r = gpio_direction_input(gpio + 1); @@ -625,7 +636,7 @@ static void __init beagle_opp_init(void) } /* Custom OPP enabled for XM */ - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM || omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC) { struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); struct omap_hwmod *dh = omap_hwmod_lookup("iva"); struct device *dev; @@ -665,6 +676,11 @@ static void __init omap3_beagle_init(void) omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_beagle_init_rev(); omap3_beagle_i2c_init(); + + if (cpu_is_omap3630()) { + gpio_buttons[0].gpio = 4; + } + platform_add_devices(omap3_beagle_devices, ARRAY_SIZE(omap3_beagle_devices)); omap_display_init(&beagle_dss_data);