diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2016-02-27 19:19:06 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-03-15 15:12:52 -0400 |
commit | e66782e6eae2b918bffd56d7146895f8ad1c00dc (patch) | |
tree | ed2a5b6c8f9c40df3743a95d0f12a62458ac9ba9 /board/amazon | |
parent | 27754d18fc1b5a5c6a6e86ababf44b382a6dc7d9 (diff) | |
download | u-boot-imx-e66782e6eae2b918bffd56d7146895f8ad1c00dc.zip u-boot-imx-e66782e6eae2b918bffd56d7146895f8ad1c00dc.tar.gz u-boot-imx-e66782e6eae2b918bffd56d7146895f8ad1c00dc.tar.bz2 |
kc1: MUSB USB controller and fastboot USB gadget support
This adds support for the MUSB USB dual-role controller in peripheral mode,
with configuration options for the fastboot USB gadget.
At this point, flashing the internal eMMC is support.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'board/amazon')
-rw-r--r-- | board/amazon/kc1/kc1.c | 27 | ||||
-rw-r--r-- | board/amazon/kc1/kc1.h | 4 |
2 files changed, 31 insertions, 0 deletions
diff --git a/board/amazon/kc1/kc1.c b/board/amazon/kc1/kc1.c index a189bb2..29d9c64 100644 --- a/board/amazon/kc1/kc1.c +++ b/board/amazon/kc1/kc1.c @@ -8,6 +8,9 @@ #include <config.h> #include <common.h> +#include <linux/ctype.h> +#include <linux/usb/musb.h> +#include <asm/omap_musb.h> #include <asm/arch/sys_proto.h> #include <asm/arch/mmc_host_def.h> #include <asm/gpio.h> @@ -21,6 +24,26 @@ const struct omap_sysinfo sysinfo = { .board_string = "kc1" }; +static struct musb_hdrc_config musb_config = { + .multipoint = 1, + .dyn_fifo = 1, + .num_eps = 16, + .ram_bits = 12 +}; + +static struct omap_musb_board_data musb_board_data = { + .interface_type = MUSB_INTERFACE_UTMI, +}; + +static struct musb_hdrc_platform_data musb_platform_data = { + .mode = MUSB_PERIPHERAL, + .config = &musb_config, + .power = 100, + .platform_ops = &omap2430_ops, + .board_data = &musb_board_data, +}; + + void set_muxconf_regs(void) { do_set_mux((*ctrl)->control_padconf_core_base, core_padconf_array, @@ -66,6 +89,10 @@ int misc_init_r(void) omap_die_id_serial(); + /* MUSB */ + + musb_register(&musb_platform_data, &musb_board_data, (void *)MUSB_BASE); + return 0; } diff --git a/board/amazon/kc1/kc1.h b/board/amazon/kc1/kc1.h index 886bd38..67d008f 100644 --- a/board/amazon/kc1/kc1.h +++ b/board/amazon/kc1/kc1.h @@ -87,6 +87,10 @@ const struct pad_conf_entry core_padconf_array[] = { { UNIPRO_RY1, (IEN | DIS | M3) }, /* gpio_178 */ { UNIPRO_RX2, (IDIS | DIS | M7) }, /* safe_mode */ { UNIPRO_RY2, (IDIS | DIS | M7) }, /* safe_mode */ + /* USBA0_OTG */ + { USBA0_OTG_CE, (IDIS | PTD | M0) }, /* usba0_otg_ce */ + { USBA0_OTG_DP, (IEN | DIS | M0) }, /* usba0_otg_dp */ + { USBA0_OTG_DM, (IEN | DIS | M0) }, /* usba0_otg_dm */ }; #endif |