From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] nitrogen6x: initialize WL12XX pads, use to determine board type
Date: Thu, 4 Oct 2012 12:49:09 -0700 [thread overview]
Message-ID: <1349380149-8693-4-git-send-email-eric.nelson@boundarydevices.com> (raw)
In-Reply-To: <1349380149-8693-1-git-send-email-eric.nelson@boundarydevices.com>
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
board/boundary/nitrogen6x/nitrogen6x.c | 34 +++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 469a044..16469b7 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -69,6 +69,18 @@ DECLARE_GLOBAL_DATA_PTR;
PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \
PAD_CTL_ODE | PAD_CTL_SRE_FAST)
+#define WEAK_PULLUP (PAD_CTL_PKE | PAD_CTL_PUE | \
+ PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
+ PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \
+ PAD_CTL_SRE_SLOW)
+
+#define WEAK_PULLDOWN (PAD_CTL_PKE | PAD_CTL_PUE | \
+ PAD_CTL_PUS_100K_DOWN | PAD_CTL_SPEED_MED | \
+ PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \
+ PAD_CTL_SRE_SLOW)
+
+#define OUTPUT_40OHM (PAD_CTL_SPEED_MED|PAD_CTL_DSE_40ohm)
+
int dram_init(void)
{
gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
@@ -186,6 +198,16 @@ iomux_v3_cfg_t const enet_pads2[] = {
MX6Q_PAD_RGMII_RX_CTL__RGMII_RX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL),
};
+/* wl1271 pads on nitrogen6x */
+iomux_v3_cfg_t const wl12xx_pads[] = {
+ (MX6Q_PAD_NANDF_CS1__GPIO_6_14 & ~MUX_PAD_CTRL_MASK) | MUX_PAD_CTRL(WEAK_PULLDOWN),
+ (MX6Q_PAD_NANDF_CS2__GPIO_6_15 & ~MUX_PAD_CTRL_MASK) | MUX_PAD_CTRL(OUTPUT_40OHM),
+ (MX6Q_PAD_NANDF_CS3__GPIO_6_16 & ~MUX_PAD_CTRL_MASK) | MUX_PAD_CTRL(OUTPUT_40OHM),
+};
+#define WL12XX_WL_IRQ_GP IMX_GPIO_NR(6,14)
+#define WL12XX_WL_ENABLE_GP IMX_GPIO_NR(6,15)
+#define WL12XX_BT_ENABLE_GP IMX_GPIO_NR(6,16)
+
/* Button assignments for J14 */
static iomux_v3_cfg_t const button_pads[] = {
/* Menu */
@@ -695,6 +717,13 @@ static void setup_display(void)
int board_early_init_f(void)
{
setup_iomux_uart();
+
+ /* Disable wl1271 For Nitrogen6w */
+ gpio_direction_input(WL12XX_WL_IRQ_GP);
+ gpio_direction_output(WL12XX_WL_ENABLE_GP,0);
+ gpio_direction_output(WL12XX_BT_ENABLE_GP,0);
+
+ imx_iomux_v3_setup_multiple_pads(wl12xx_pads, ARRAY_SIZE(wl12xx_pads));
setup_buttons();
#if defined(CONFIG_VIDEO_IPUV3)
@@ -733,7 +762,10 @@ int board_init(void)
int checkboard(void)
{
- puts("Board: Nitrogen6X or MX6Q-Sabre Lite\n");
+ if (gpio_get_value(WL12XX_WL_IRQ_GP)) {
+ puts("Board: Nitrogen6X\n");
+ } else
+ puts("Board: SABRE Lite\n");
return 0;
}
--
1.7.9
next prev parent reply other threads:[~2012-10-04 19:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-04 19:49 [U-Boot] [PATCH 0/3] Add support for the Boundary Devices Nitrogen6x board Eric Nelson
2012-10-04 19:49 ` [U-Boot] [PATCH 1/3] Add nitrogen6x board Eric Nelson
2012-10-04 21:42 ` Sinan Akman
2012-10-04 21:51 ` Sinan Akman
2012-10-04 21:56 ` Fabio Estevam
2012-10-05 17:24 ` Albert ARIBAUD
2012-10-05 18:42 ` Eric Nelson
2012-10-05 19:00 ` Tom Rini
2012-10-05 20:03 ` Eric Nelson
2012-10-05 22:46 ` Tom Rini
2012-10-08 12:54 ` Stefano Babic
2012-10-08 17:24 ` Eric Nelson
2012-10-05 19:29 ` Albert ARIBAUD
2012-10-06 0:23 ` Eric Nelson
2012-10-08 12:28 ` Stefano Babic
2012-10-08 16:05 ` Eric Nelson
2012-10-08 20:30 ` Troy Kisky
2012-10-08 21:03 ` Stefano Babic
2012-10-08 21:24 ` Troy Kisky
2012-10-04 19:49 ` [U-Boot] [PATCH 2/3] nitrogen6x: configure and toggle PHY reset for Nitrogen6x Eric Nelson
2012-10-04 19:49 ` Eric Nelson [this message]
2012-10-08 12:32 ` [U-Boot] [PATCH 3/3] nitrogen6x: initialize WL12XX pads, use to determine board type Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349380149-8693-4-git-send-email-eric.nelson@boundarydevices.com \
--to=eric.nelson@boundarydevices.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox