Skip to content

Commit

Permalink
mx6: iomux: add GPR1 defines for use with nitrogen6x
Browse files Browse the repository at this point in the history
Select GPIO1 as the USB OTG ID pin for Nitrogen6x

Signed-off-by: Troy Kisky <[email protected]>
  • Loading branch information
tkisky authored and Marek Vasut committed Oct 20, 2013
1 parent b065eb7 commit 7132869
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm/include/asm/arch-mx6/iomux.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
#define MX6_IOMUXC_GPR6 0x020e0018
#define MX6_IOMUXC_GPR7 0x020e001c

/*
* IOMUXC_GPR1 bit fields
*/
#define IOMUXC_GPR1_OTG_ID_ENET_RX_ERR (0<<13)
#define IOMUXC_GPR1_OTG_ID_GPIO1 (1<<13)
#define IOMUXC_GPR1_OTG_ID_MASK (1<<13)
/*
* IOMUXC_GPR13 bit fields
*/
Expand Down
7 changes: 7 additions & 0 deletions board/boundary/nitrogen6x/nitrogen6x.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,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;

Expand Down

0 comments on commit 7132869

Please sign in to comment.