* [U-Boot] [PATCH 1/4] usb: mxs: Disable USB Port 1 for i.MX23
@ 2013-01-28 19:13 Otavio Salvador
2013-01-28 19:13 ` [U-Boot] [PATCH 2/4] mx23evk: Enable USB support Otavio Salvador
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Otavio Salvador @ 2013-01-28 19:13 UTC (permalink / raw)
To: u-boot
The i.MX23 just one USB port so disable the second controller probe
when building for i.MX23.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
drivers/usb/host/ehci-mxs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c
index 5062af5..28c8cde 100644
--- a/drivers/usb/host/ehci-mxs.c
+++ b/drivers/usb/host/ehci-mxs.c
@@ -50,10 +50,12 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port)
usb_base = MXS_USBCTRL0_BASE;
phy_base = MXS_USBPHY0_BASE;
break;
+#ifdef CONFIG_MX28
case 1:
usb_base = MXS_USBCTRL1_BASE;
phy_base = MXS_USBPHY1_BASE;
break;
+#endif
default:
printf("CONFIG_EHCI_MXS_PORT (port = %d)\n", port);
return -1;
--
1.8.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [U-Boot] [PATCH 2/4] mx23evk: Enable USB support 2013-01-28 19:13 [U-Boot] [PATCH 1/4] usb: mxs: Disable USB Port 1 for i.MX23 Otavio Salvador @ 2013-01-28 19:13 ` Otavio Salvador 2013-01-28 19:13 ` [U-Boot] [PATCH 3/4] mx23_olinuxino: " Otavio Salvador 2013-01-28 19:14 ` [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support Otavio Salvador 2 siblings, 0 replies; 14+ messages in thread From: Otavio Salvador @ 2013-01-28 19:13 UTC (permalink / raw) To: u-boot Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> --- include/configs/mx23evk.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index d206c95..99dfb8f 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -58,6 +58,7 @@ #define CONFIG_CMD_FAT #define CONFIG_CMD_GPIO #define CONFIG_CMD_MMC +#define CONFIG_CMD_USB #define CONFIG_CMD_BOOTZ /* Memory configurations */ @@ -122,6 +123,15 @@ #define CONFIG_MXS_MMC #endif +/* USB */ +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_MXS +#define CONFIG_EHCI_MXS_PORT 0 +#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_STORAGE +#endif + /* Boot Linux */ #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS -- 1.8.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 3/4] mx23_olinuxino: Enable USB support 2013-01-28 19:13 [U-Boot] [PATCH 1/4] usb: mxs: Disable USB Port 1 for i.MX23 Otavio Salvador 2013-01-28 19:13 ` [U-Boot] [PATCH 2/4] mx23evk: Enable USB support Otavio Salvador @ 2013-01-28 19:13 ` Otavio Salvador 2013-01-28 19:15 ` Marek Vasut 2013-01-28 19:14 ` [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support Otavio Salvador 2 siblings, 1 reply; 14+ messages in thread From: Otavio Salvador @ 2013-01-28 19:13 UTC (permalink / raw) To: u-boot Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> --- include/configs/mx23_olinuxino.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index d019944..e081c49 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -60,6 +60,7 @@ #define CONFIG_CMD_GPIO #define CONFIG_CMD_LED #define CONFIG_CMD_MMC +#define CONFIG_CMD_USB /* * Memory configurations @@ -140,6 +141,15 @@ */ #define CONFIG_APBH_DMA +/* USB */ +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_MXS +#define CONFIG_EHCI_MXS_PORT 0 +#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_STORAGE +#endif + /* * Boot Linux */ -- 1.8.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 3/4] mx23_olinuxino: Enable USB support 2013-01-28 19:13 ` [U-Boot] [PATCH 3/4] mx23_olinuxino: " Otavio Salvador @ 2013-01-28 19:15 ` Marek Vasut 2013-01-28 19:30 ` Otavio Salvador 0 siblings, 1 reply; 14+ messages in thread From: Marek Vasut @ 2013-01-28 19:15 UTC (permalink / raw) To: u-boot Dear Otavio Salvador, Missing commit message ... _AGAIN_ ... how many times do I have to repeat myself? Write it down or something already :/ > Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> > --- > include/configs/mx23_olinuxino.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/configs/mx23_olinuxino.h > b/include/configs/mx23_olinuxino.h index d019944..e081c49 100644 > --- a/include/configs/mx23_olinuxino.h > +++ b/include/configs/mx23_olinuxino.h > @@ -60,6 +60,7 @@ > #define CONFIG_CMD_GPIO > #define CONFIG_CMD_LED > #define CONFIG_CMD_MMC > +#define CONFIG_CMD_USB > > /* > * Memory configurations > @@ -140,6 +141,15 @@ > */ > #define CONFIG_APBH_DMA > > +/* USB */ > +#ifdef CONFIG_CMD_USB > +#define CONFIG_USB_EHCI > +#define CONFIG_USB_EHCI_MXS > +#define CONFIG_EHCI_MXS_PORT 0 > +#define CONFIG_EHCI_IS_TDI > +#define CONFIG_USB_STORAGE > +#endif > + > /* > * Boot Linux > */ Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 3/4] mx23_olinuxino: Enable USB support 2013-01-28 19:15 ` Marek Vasut @ 2013-01-28 19:30 ` Otavio Salvador 0 siblings, 0 replies; 14+ messages in thread From: Otavio Salvador @ 2013-01-28 19:30 UTC (permalink / raw) To: u-boot On Mon, Jan 28, 2013 at 5:15 PM, Marek Vasut <marex@denx.de> wrote: > Dear Otavio Salvador, > > Missing commit message ... _AGAIN_ ... how many times do I have to repeat > myself? Write it down or something already :/ What I need to put to make it more clear than "Enable USB support"? It seems clear; it does only it! -- Otavio Salvador O.S. Systems E-mail: otavio at ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support 2013-01-28 19:13 [U-Boot] [PATCH 1/4] usb: mxs: Disable USB Port 1 for i.MX23 Otavio Salvador 2013-01-28 19:13 ` [U-Boot] [PATCH 2/4] mx23evk: Enable USB support Otavio Salvador 2013-01-28 19:13 ` [U-Boot] [PATCH 3/4] mx23_olinuxino: " Otavio Salvador @ 2013-01-28 19:14 ` Otavio Salvador 2013-01-28 19:12 ` Fabio Estevam ` (2 more replies) 2 siblings, 3 replies; 14+ messages in thread From: Otavio Salvador @ 2013-01-28 19:14 UTC (permalink / raw) To: u-boot Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> --- board/olimex/mx23_olinuxino/mx23_olinuxino.c | 8 ++++++ board/olimex/mx23_olinuxino/spl_boot.c | 4 +++ include/configs/mx23_olinuxino.h | 41 ++++++++++++++++++++++++++-- 3 files changed, 50 insertions(+), 3 deletions(-) diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index 2501417..6077d70 100644 --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c @@ -53,6 +53,14 @@ int dram_init(void) return mxs_dram_init(); } +#ifdef CONFIG_CMD_NET +int board_eth_init(bd_t *bis) +{ + /* Power-on Ethernet */ + gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1); +} +#endif + #ifdef CONFIG_CMD_MMC static int mx23_olx_mmc_cd(int id) { diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c index 3bbf5ad..8f7ba0b 100644 --- a/board/olimex/mx23_olinuxino/spl_boot.c +++ b/board/olimex/mx23_olinuxino/spl_boot.c @@ -95,6 +95,10 @@ const iomux_cfg_t iomux_setup[] = { MX23_PAD_SSP1_DATA2__SSP1_DATA2 | MUX_CONFIG_SSP, MX23_PAD_SSP1_DATA3__SSP1_DATA3 | MUX_CONFIG_SSP, MX23_PAD_SSP1_SCK__SSP1_SCK | MUX_CONFIG_SSP, + + /* Ethernet */ + MX23_PAD_GPMI_ALE__GPIO_0_17 | + (MXS_PAD_12MA | MXS_PAD_3V3), }; void board_init_ll(void) diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index e081c49..9adbb9c 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -55,11 +55,13 @@ #define CONFIG_DOS_PARTITION #define CONFIG_CMD_CACHE +#define CONFIG_CMD_DHCP #define CONFIG_CMD_EXT2 #define CONFIG_CMD_FAT #define CONFIG_CMD_GPIO #define CONFIG_CMD_LED #define CONFIG_CMD_MMC +#define CONFIG_CMD_NET #define CONFIG_CMD_USB /* @@ -150,6 +152,12 @@ #define CONFIG_USB_STORAGE #endif +/* Ethernet */ +#ifdef CONFIG_CMD_NET +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX +#endif + /* * Boot Linux */ @@ -175,6 +183,7 @@ /* * Extra Environments */ + #define CONFIG_EXTRA_ENV_SETTINGS \ "update_sd_firmware_filename=u-boot.sd\0" \ "update_sd_firmware=" /* Update the SD firmware partition */ \ @@ -191,6 +200,8 @@ "fdt_file=imx23-olinuxino.dtb\0" \ "fdt_addr=0x41000000\0" \ "boot_fdt=try\0" \ + "ip_dyn=yes\0" \ + "usbethaddr=00:11:22:33:44:55\0" \ "mmcdev=0\0" \ "mmcpart=2\0" \ "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \ @@ -216,6 +227,31 @@ "fi; " \ "else " \ "bootm; " \ + "fi;\0" \ + "netargs=setenv bootargs console=${console_mainline},${baudrate} " \ + "root=/dev/nfs " \ + "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ + "netboot=echo Booting from net ...; " \ + "usb start; " \ + "run netargs; " \ + "if test ${ip_dyn} = yes; then " \ + "setenv get_cmd dhcp; " \ + "else " \ + "setenv get_cmd tftp; " \ + "fi; " \ + "${get_cmd} ${uimage}; " \ + "if test ${boot_fdt} = yes; then " \ + "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ + "bootm ${loadaddr} - ${fdt_addr}; " \ + "else " \ + "if test ${boot_fdt} = try; then " \ + "bootm; " \ + "else " \ + "echo WARN: Cannot load the DT; " \ + "fi;" \ + "fi; " \ + "else " \ + "bootm; " \ "fi;\0" #define CONFIG_BOOTCOMMAND \ @@ -225,10 +261,9 @@ "else " \ "if run loaduimage; then " \ "run mmcboot; " \ - "else " \ - "echo ERR: Fail to boot from MMC; " \ + "else run netboot; " \ "fi; " \ "fi; " \ - "else exit; fi" + "else run netboot; fi" #endif /* __MX23_OLINUXINO_CONFIG_H__ */ -- 1.8.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support 2013-01-28 19:14 ` [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support Otavio Salvador @ 2013-01-28 19:12 ` Fabio Estevam 2013-01-28 19:13 ` Otavio Salvador 2013-01-28 19:16 ` Marek Vasut 2013-01-28 19:48 ` Fabio Estevam 2 siblings, 1 reply; 14+ messages in thread From: Fabio Estevam @ 2013-01-28 19:12 UTC (permalink / raw) To: u-boot On Mon, Jan 28, 2013 at 5:14 PM, Otavio Salvador <otavio@ossystems.com.br> wrote: > + "ip_dyn=yes\0" \ > + "usbethaddr=00:11:22:33:44:55\0" \ You should not hardcode a MAC address. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support 2013-01-28 19:12 ` Fabio Estevam @ 2013-01-28 19:13 ` Otavio Salvador 2013-01-28 19:17 ` Marek Vasut 2013-01-28 19:21 ` Fabio Estevam 0 siblings, 2 replies; 14+ messages in thread From: Otavio Salvador @ 2013-01-28 19:13 UTC (permalink / raw) To: u-boot On Mon, Jan 28, 2013 at 5:12 PM, Fabio Estevam <festevam@gmail.com> wrote: > On Mon, Jan 28, 2013 at 5:14 PM, Otavio Salvador > <otavio@ossystems.com.br> wrote: > >> + "ip_dyn=yes\0" \ >> + "usbethaddr=00:11:22:33:44:55\0" \ > > You should not hardcode a MAC address. It does not provide one. -- Otavio Salvador O.S. Systems E-mail: otavio at ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support 2013-01-28 19:13 ` Otavio Salvador @ 2013-01-28 19:17 ` Marek Vasut 2013-01-28 19:21 ` Fabio Estevam 1 sibling, 0 replies; 14+ messages in thread From: Marek Vasut @ 2013-01-28 19:17 UTC (permalink / raw) To: u-boot Dear Otavio Salvador, > On Mon, Jan 28, 2013 at 5:12 PM, Fabio Estevam <festevam@gmail.com> wrote: > > On Mon, Jan 28, 2013 at 5:14 PM, Otavio Salvador > > > > <otavio@ossystems.com.br> wrote: > >> + "ip_dyn=yes\0" \ > >> + "usbethaddr=00:11:22:33:44:55\0" \ > > > > You should not hardcode a MAC address. > > It does not provide one. Your dongle? Then leave that up to user. Besides, there's a tool in tools/ for generating a random MAC. Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support 2013-01-28 19:13 ` Otavio Salvador 2013-01-28 19:17 ` Marek Vasut @ 2013-01-28 19:21 ` Fabio Estevam 1 sibling, 0 replies; 14+ messages in thread From: Fabio Estevam @ 2013-01-28 19:21 UTC (permalink / raw) To: u-boot On Mon, Jan 28, 2013 at 5:13 PM, Otavio Salvador <otavio@ossystems.com.br> wrote: >> You should not hardcode a MAC address. > > It does not provide one. Right, but you can not force all olinuxino boards to have the same MAC address, so just remove the MAC setting and each one can set its own. Also, please read: http://www.denx.de/wiki/view/DULG/WhereCanIGetAValidMACAddresshttp://www.denx.de/wiki/view/DULG/WhereCanIGetAValidMACAddress ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support 2013-01-28 19:14 ` [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support Otavio Salvador 2013-01-28 19:12 ` Fabio Estevam @ 2013-01-28 19:16 ` Marek Vasut 2013-01-28 19:48 ` Fabio Estevam 2 siblings, 0 replies; 14+ messages in thread From: Marek Vasut @ 2013-01-28 19:16 UTC (permalink / raw) To: u-boot Dear Otavio Salvador, And again ... NAK Anyway, will the hub function properly if you toggle the GPIO in board_eth_init? I dont think so. [..] Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support 2013-01-28 19:14 ` [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support Otavio Salvador 2013-01-28 19:12 ` Fabio Estevam 2013-01-28 19:16 ` Marek Vasut @ 2013-01-28 19:48 ` Fabio Estevam 2013-01-28 19:56 ` Marek Vasut 2 siblings, 1 reply; 14+ messages in thread From: Fabio Estevam @ 2013-01-28 19:48 UTC (permalink / raw) To: u-boot On Mon, Jan 28, 2013 at 5:14 PM, Otavio Salvador <otavio@ossystems.com.br> wrote: > +#ifdef CONFIG_CMD_NET > +int board_eth_init(bd_t *bis) > +{ > + /* Power-on Ethernet */ > + gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1); > +} > +#endif This function expects to return an integer, and there is no return value here. Also, maybe you could set the GPIO inside board_early_init_f() like we do on mx28. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support 2013-01-28 19:48 ` Fabio Estevam @ 2013-01-28 19:56 ` Marek Vasut 2013-01-28 20:03 ` Otavio Salvador 0 siblings, 1 reply; 14+ messages in thread From: Marek Vasut @ 2013-01-28 19:56 UTC (permalink / raw) To: u-boot Dear Fabio Estevam, > On Mon, Jan 28, 2013 at 5:14 PM, Otavio Salvador > > <otavio@ossystems.com.br> wrote: > > +#ifdef CONFIG_CMD_NET > > +int board_eth_init(bd_t *bis) > > +{ > > + /* Power-on Ethernet */ > > + gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1); > > +} > > +#endif > > This function expects to return an integer, and there is no return value > here. > > Also, maybe you could set the GPIO inside board_early_init_f() like we > do on mx28. How come it didn't emit an error? Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support 2013-01-28 19:56 ` Marek Vasut @ 2013-01-28 20:03 ` Otavio Salvador 0 siblings, 0 replies; 14+ messages in thread From: Otavio Salvador @ 2013-01-28 20:03 UTC (permalink / raw) To: u-boot On Mon, Jan 28, 2013 at 5:56 PM, Marek Vasut <marex@denx.de> wrote: > Dear Fabio Estevam, > >> On Mon, Jan 28, 2013 at 5:14 PM, Otavio Salvador >> >> <otavio@ossystems.com.br> wrote: >> > +#ifdef CONFIG_CMD_NET >> > +int board_eth_init(bd_t *bis) >> > +{ >> > + /* Power-on Ethernet */ >> > + gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1); >> > +} >> > +#endif >> >> This function expects to return an integer, and there is no return value >> here. >> >> Also, maybe you could set the GPIO inside board_early_init_f() like we >> do on mx28. > > How come it didn't emit an error? It works; I tested it and sent the new patch version with it. -- Otavio Salvador O.S. Systems E-mail: otavio at ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2013-01-28 20:03 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-01-28 19:13 [U-Boot] [PATCH 1/4] usb: mxs: Disable USB Port 1 for i.MX23 Otavio Salvador 2013-01-28 19:13 ` [U-Boot] [PATCH 2/4] mx23evk: Enable USB support Otavio Salvador 2013-01-28 19:13 ` [U-Boot] [PATCH 3/4] mx23_olinuxino: " Otavio Salvador 2013-01-28 19:15 ` Marek Vasut 2013-01-28 19:30 ` Otavio Salvador 2013-01-28 19:14 ` [U-Boot] [PATCH 4/4] mx23_olinuxino: Add ethernet support Otavio Salvador 2013-01-28 19:12 ` Fabio Estevam 2013-01-28 19:13 ` Otavio Salvador 2013-01-28 19:17 ` Marek Vasut 2013-01-28 19:21 ` Fabio Estevam 2013-01-28 19:16 ` Marek Vasut 2013-01-28 19:48 ` Fabio Estevam 2013-01-28 19:56 ` Marek Vasut 2013-01-28 20:03 ` Otavio Salvador
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox