From patchwork Tue Jul 16 20:47:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 259506 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id D246A2C016E for ; Wed, 17 Jul 2013 06:53:32 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A1D994A058; Tue, 16 Jul 2013 22:51:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y7zED55RrXwj; Tue, 16 Jul 2013 22:51:06 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D629F4A0A6; Tue, 16 Jul 2013 22:49:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5AA684A050 for ; Tue, 16 Jul 2013 22:48:59 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P8j1NcZRBFda for ; Tue, 16 Jul 2013 22:48:43 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=ERR(-1.5) (only DNSBL check requested) Received: from mail-pb0-f41.google.com (mail-pb0-f41.google.com [209.85.160.41]) by theia.denx.de (Postfix) with ESMTPS id 859014A01B for ; Tue, 16 Jul 2013 22:48:06 +0200 (CEST) Received: by mail-pb0-f41.google.com with SMTP id rp16so1109512pbb.14 for ; Tue, 16 Jul 2013 13:47:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=BEKlZXeeib1IemX+5FCEBOR3UMt2VuuCyxb141bH6Eo=; b=AxlFfeUoVOOKwIqRAafR3RDUpCfFAue1I0Cg8jUJYq1o326aXuA7DhMTBJ/h04KWHY 2s7HAXp0JTvErmUYZpdZ33ZjQHn5llYlW7X+sCprop9FlvnIR50RjguneWpCA8EmpSMS OXg9hOtG9p9l/KD5ghnktoswpwkSvddMguhKRfgmm8Noa7tfOQ0woVh5VboSghDFNrtJ 5/XCZdsLlviLi1iOtMh+eAgqT0vvF/Y8GUSbmmLgvYrPO6nhGQNIGt8fIwcFo2Qrj1l6 figaJL5q1DbvtPo4iyBCfmCMcxuNH06ClqzuaJRhazTbFen/lIuouUBZFLtWUMpeBH+N A1Vg== X-Received: by 10.68.110.163 with SMTP id ib3mr3227947pbb.196.1374007674395; Tue, 16 Jul 2013 13:47:54 -0700 (PDT) Received: from officeserver-2 ([70.96.116.236]) by mx.google.com with ESMTPSA id iq6sm3742088pbc.1.2013.07.16.13.47.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 16 Jul 2013 13:47:53 -0700 (PDT) Received: from tkisky by officeserver-2 with local (Exim 4.80) (envelope-from ) id 1UzCA2-0000jS-G7; Tue, 16 Jul 2013 13:47:50 -0700 From: Troy Kisky To: marek.vasut@gmail.com Date: Tue, 16 Jul 2013 13:47:32 -0700 Message-Id: <1374007666-2749-5-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1374007666-2749-1-git-send-email-troy.kisky@boundarydevices.com> References: <1374007666-2749-1-git-send-email-troy.kisky@boundarydevices.com> X-Gm-Message-State: ALoCoQmOoUIfUrBeUHVlP06lM0OQZrnvX0VV+SqK6NjtoqsNEgoYco24fsCmoLHY86OoEISAJJi0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH RFC V1 04/18] nitrogen6x: add otg usb ethernet gadget support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Troy Kisky --- board/boundary/nitrogen6x/nitrogen6x.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 8f0f9b8..a845ee5 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -46,6 +46,7 @@ #include DECLARE_GLOBAL_DATA_PTR; +#define GP_USB_OTG_PWR IMX_GPIO_NR(3, 22) #define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \ @@ -385,6 +386,13 @@ int board_eth_init(bd_t *bis) free(bus); } #endif + +#ifdef CONFIG_MV_UDC + otg_enable(); + + /* For otg ethernet*/ + usb_eth_initialize(bis); +#endif return 0; } @@ -733,6 +741,7 @@ int board_early_init_f(void) gpio_direction_input(WL12XX_WL_IRQ_GP); gpio_direction_output(WL12XX_WL_ENABLE_GP, 0); gpio_direction_output(WL12XX_BT_ENABLE_GP, 0); + gpio_direction_output(GP_USB_OTG_PWR, 0); /* OTG power off */ imx_iomux_v3_setup_multiple_pads(wl12xx_pads, ARRAY_SIZE(wl12xx_pads)); setup_buttons(); @@ -754,6 +763,13 @@ int overwrite_console(void) int board_init(void) { + struct iomuxc_base_regs *const iomuxc_regs + = (struct iomuxc_base_regs *)IOMUXC_BASE_ADDR; + + clrsetbits_le32(&iomuxc_regs->gpr[1], + IOMUXC_GPR1_OTG_ID_MASK, + IOMUXC_GPR1_OTG_ID_GPIO1); + /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;