From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] nitrogen6x: initialize WL12XX pads, use to determine board type
Date: Mon, 08 Oct 2012 14:32:44 +0200 [thread overview]
Message-ID: <5072C7EC.2070404@denx.de> (raw)
In-Reply-To: <1349380149-8693-4-git-send-email-eric.nelson@boundarydevices.com>
On 04/10/2012 21:49, Eric Nelson wrote:
> 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");
This answer a comment of mine for PATCH1/3. Anyway, I think it is better
to squash the three patches together. This avoid you push in the same
patchset new code in one patch and you modify in the next one.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
prev parent reply other threads:[~2012-10-08 12:32 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 ` [U-Boot] [PATCH 3/3] nitrogen6x: initialize WL12XX pads, use to determine board type Eric Nelson
2012-10-08 12:32 ` Stefano Babic [this message]
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=5072C7EC.2070404@denx.de \
--to=sbabic@denx.de \
--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