Message ID | 1251405798-2732-1-git-send-email-s-paulraj@ti.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
I found that there was bug in the USB source clock in the DM365 baseport. I have sent 1 patch to address that and the patch below is to enable USB on the Dm365 EVM. For USB to actually work on the Dm365 based on the current implementation, we need to update the USB driver with cpu_is_davinci_dm365 functions which is an absolute no-no. In any case as I understand from e-mails on the mailing list that is going to be updated soon > -----Original Message----- > From: Paulraj, Sandeep > Sent: Thursday, August 27, 2009 4:43 PM > To: davinci-linux-open-source@linux.davincidsp.com > Cc: Paulraj, Sandeep > Subject: [PATCH] DaVinci:DM365: Enable USB in DM365 EVM > > From: Sandeep Paulraj <s-paulraj@ti.com> > > This patch enables USB on the DM365 EVM > > Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com> > --- > arch/arm/mach-davinci/board-dm365-evm.c | 14 ++++++++++++++ > 1 files changed, 14 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach- > davinci/board-dm365-evm.c > index f6adf79..e43933f 100644 > --- a/arch/arm/mach-davinci/board-dm365-evm.c > +++ b/arch/arm/mach-davinci/board-dm365-evm.c > @@ -24,6 +24,8 @@ > #include <linux/mtd/mtd.h> > #include <linux/mtd/partitions.h> > #include <linux/mtd/nand.h> > +#include <linux/gpio.h> > + > #include <asm/setup.h> > #include <asm/mach-types.h> > #include <asm/mach/arch.h> > @@ -270,6 +272,16 @@ static void dm365evm_mmc_configure(void) > davinci_cfg_reg(DM365_SD1_DATA0); > } > > +static void dm365evm_usb_configure(void) > +{ > + davinci_cfg_reg(DM365_GPIO33); > + > + gpio_request(33, "usb"); > + gpio_direction_output(33, 1); > + > + setup_usb(500, 8); > +} > + > static void __init evm_init_i2c(void) > { > davinci_init_i2c(&i2c_pdata); > @@ -476,6 +488,8 @@ static __init void dm365_evm_init(void) > > /* maybe setup mmc1/etc ... _after_ mmc0 */ > evm_init_cpld(); > + > + dm365evm_usb_configure(); > } > > static __init void dm365_evm_irq_init(void) > -- > 1.6.0.4
s-paulraj@ti.com writes: > From: Sandeep Paulraj <s-paulraj@ti.com> > > This patch enables USB on the DM365 EVM > > Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com> Can you add a more descriptive changelog. > --- > arch/arm/mach-davinci/board-dm365-evm.c | 14 ++++++++++++++ > 1 files changed, 14 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c > index f6adf79..e43933f 100644 > --- a/arch/arm/mach-davinci/board-dm365-evm.c > +++ b/arch/arm/mach-davinci/board-dm365-evm.c > @@ -24,6 +24,8 @@ > #include <linux/mtd/mtd.h> > #include <linux/mtd/partitions.h> > #include <linux/mtd/nand.h> > +#include <linux/gpio.h> > + > #include <asm/setup.h> > #include <asm/mach-types.h> > #include <asm/mach/arch.h> > @@ -270,6 +272,16 @@ static void dm365evm_mmc_configure(void) > davinci_cfg_reg(DM365_SD1_DATA0); > } > > +static void dm365evm_usb_configure(void) > +{ > + davinci_cfg_reg(DM365_GPIO33); > + > + gpio_request(33, "usb"); I assume this GPIO is used for VBUS. A more descriptive name and a comment would be helpful, on other boards the pin name on the schematic was used, like nDRV_VBUS. > + gpio_direction_output(33, 1); To prepare for the future when we have platform specific hooks for enabling/disabling you should put this in a separate static function. Kevin > + setup_usb(500, 8); > +} > + > static void __init evm_init_i2c(void) > { > davinci_init_i2c(&i2c_pdata); > @@ -476,6 +488,8 @@ static __init void dm365_evm_init(void) > > /* maybe setup mmc1/etc ... _after_ mmc0 */ > evm_init_cpld(); > + > + dm365evm_usb_configure(); > } > > static __init void dm365_evm_irq_init(void) > -- > 1.6.0.4 > > _______________________________________________ > Davinci-linux-open-source mailing list > Davinci-linux-open-source@linux.davincidsp.com > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index f6adf79..e43933f 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c @@ -24,6 +24,8 @@ #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> #include <linux/mtd/nand.h> +#include <linux/gpio.h> + #include <asm/setup.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -270,6 +272,16 @@ static void dm365evm_mmc_configure(void) davinci_cfg_reg(DM365_SD1_DATA0); } +static void dm365evm_usb_configure(void) +{ + davinci_cfg_reg(DM365_GPIO33); + + gpio_request(33, "usb"); + gpio_direction_output(33, 1); + + setup_usb(500, 8); +} + static void __init evm_init_i2c(void) { davinci_init_i2c(&i2c_pdata); @@ -476,6 +488,8 @@ static __init void dm365_evm_init(void) /* maybe setup mmc1/etc ... _after_ mmc0 */ evm_init_cpld(); + + dm365evm_usb_configure(); } static __init void dm365_evm_irq_init(void)