diff mbox

[v2,1/1] ARM: DRA7XX: Add config file for Android with fastboot support

Message ID 1426617503-12477-1-git-send-email-dileep.katta@linaro.org
State New
Headers show

Commit Message

Dileep Katta March 17, 2015, 6:38 p.m. UTC
- Added new configuration for Android fastboot
	- This is based on following patch modified accordingly
http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=b2e04f92b5d91c708b6fd6b79d2266966ac51f4b

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
---
Changes in v2:
	- Merged the header file content to existing dra7xx_evm.h to avoid duplication
	- Removed unnecessary definitions as per comments

 board/ti/dra7xx/MAINTAINERS          |  1 +
 configs/dra7xx_evm_android_defconfig |  5 +++++
 include/configs/dra7xx_evm.h         | 30 ++++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+)
 create mode 100644 configs/dra7xx_evm_android_defconfig

Comments

Dileep Katta March 18, 2015, 9:12 p.m. UTC | #1
Hi Tom,

On 18 March 2015 at 21:41, Tom Rini <trini@konsulko.com> wrote:

> On Wed, Mar 18, 2015 at 12:08:23AM +0530, Dileep Katta wrote:
>
> >       - Added new configuration for Android fastboot
> >       - This is based on following patch modified accordingly
> >
> http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=b2e04f92b5d91c708b6fd6b79d2266966ac51f4b
> >
> > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> [snip]
> > @@ -43,6 +43,16 @@
> >       "uuid_disk=${uuid_gpt_disk};" \
> >       "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
> >
> > +#ifdef CONFIG_DRA7XX_ANDROID
> > +/* Fastboot */
> > +#define CONFIG_CMD_FASTBOOT
> > +#define CONFIG_ANDROID_BOOT_IMAGE
> > +#define CONFIG_USB_FASTBOOT_BUF_ADDR    CONFIG_SYS_LOAD_ADDR
> > +#define CONFIG_USB_FASTBOOT_BUF_SIZE    0x2F000000
> > +#define CONFIG_FASTBOOT_FLASH
> > +#define CONFIG_FASTBOOT_FLASH_MMC_DEV   1
> > +#endif
> > +
> >  #include <configs/ti_omap5_common.h>
>
> No, just enable fastboot.  There's a growing population of people whose
> workflow is "use fastboot to shove a new test kernel at my device" that
> aren't strictly using Android, lets enable them.
>
OK, will enable fastboot unconditional.
Now there is no much difference for android_defconfig, but will still keep
separate config for future changes.

>
> > @@ -115,7 +125,11 @@
> >  #define CONFIG_SPL_SPI_SUPPORT
> >  #define CONFIG_SPL_SPI_LOAD
> >  #define CONFIG_SPL_SPI_FLASH_SUPPORT
> > +#ifdef CONFIG_DRA7XX_ANDROID
> > +#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x80000
> > +#else
> >  #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x40000
> > +#endif
>
> Why are you moving U-Boot so much higher in SPI flash?
>
This is done to accommodate  larger size MLO.

>
> > @@ -130,6 +144,22 @@
> >  #define CONFIG_OMAP_USB_PHY
> >  #define CONFIG_OMAP_USB2PHY2_HOST
> >
> > +/* USB GADGET */
> > +#define CONFIG_USB_GADGET
> > +#define CONFIG_MUSB_GADGET
> > +#define CONFIG_MUSB_PIO_ONLY
>
> This board doesn't have MUSB, DWC3 only.
>
Thanks. DWC3 is enabled in dwc3_gadget developer branch of DFU custodian
tree.
Will submit the updated patch on top of the same

>
> > +#define CONFIG_USBDOWNLOAD_GADGET
> > +#define CONFIG_USB_GADGET_VBUS_DRAW 2
> > +#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
> > +#ifdef CONFIG_CMD_FASTBOOT
> > +#define CONFIG_G_DNL_VENDOR_NUM 0x0451
> > +#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
> > +#else
> > +#define CONFIG_G_DNL_VENDOR_NUM 0x0403
> > +#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
> > +#endif
> > +#define CONFIG_USB_GADGET_DUALSPEED
>
> Why can't we always use one vid/pid?
>
As we are restricted to use the vid which fastboot host application knows,
the other/original
vid/pid kept intact for the dependent functionality, if any.
Will check if 0x0403/0xBD00 could be removed.

>
> --
> Tom
>
Regards, Dileep
Dileep Katta March 23, 2015, 10:41 p.m. UTC | #2
Hi Tom,

On 19 March 2015 at 18:45, Tom Rini <trini@konsulko.com> wrote:

> On Thu, Mar 19, 2015 at 02:42:16AM +0530, Dileep Katta wrote:
> > Hi Tom,
> >
> > On 18 March 2015 at 21:41, Tom Rini <trini@konsulko.com> wrote:
> >
> > > On Wed, Mar 18, 2015 at 12:08:23AM +0530, Dileep Katta wrote:
> > >
> > > >       - Added new configuration for Android fastboot
> > > >       - This is based on following patch modified accordingly
> > > >
> > >
> http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=b2e04f92b5d91c708b6fd6b79d2266966ac51f4b
> > > >
> > > > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> > > > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> > > [snip]
> > > > @@ -43,6 +43,16 @@
> > > >       "uuid_disk=${uuid_gpt_disk};" \
> > > >       "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
> > > >
> > > > +#ifdef CONFIG_DRA7XX_ANDROID
> > > > +/* Fastboot */
> > > > +#define CONFIG_CMD_FASTBOOT
> > > > +#define CONFIG_ANDROID_BOOT_IMAGE
> > > > +#define CONFIG_USB_FASTBOOT_BUF_ADDR    CONFIG_SYS_LOAD_ADDR
> > > > +#define CONFIG_USB_FASTBOOT_BUF_SIZE    0x2F000000
> > > > +#define CONFIG_FASTBOOT_FLASH
> > > > +#define CONFIG_FASTBOOT_FLASH_MMC_DEV   1
> > > > +#endif
> > > > +
> > > >  #include <configs/ti_omap5_common.h>
> > >
> > > No, just enable fastboot.  There's a growing population of people whose
> > > workflow is "use fastboot to shove a new test kernel at my device" that
> > > aren't strictly using Android, lets enable them.
> > >
> > OK, will enable fastboot unconditional.
> > Now there is no much difference for android_defconfig, but will still
> keep
> > separate config for future changes.
>
> I remain unconvinced that we need a separate config upstream still.
>
Will remove separate config.

>
> > > > @@ -115,7 +125,11 @@
> > > >  #define CONFIG_SPL_SPI_SUPPORT
> > > >  #define CONFIG_SPL_SPI_LOAD
> > > >  #define CONFIG_SPL_SPI_FLASH_SUPPORT
> > > > +#ifdef CONFIG_DRA7XX_ANDROID
> > > > +#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x80000
> > > > +#else
> > > >  #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x40000
> > > > +#endif
> > >
> > > Why are you moving U-Boot so much higher in SPI flash?
> >
> > This is done to accommodate  larger size MLO.
>
> Oh that's right.  Some parts can be made with a larger SRAM and thus we
> could use a larger MLO.  But are we?  What functionality would we be
> shoving into a larger MLO that would make sense to do this really?
> Frankly I had been thinking that in these parts it makes more sense to
> jump to full U-Boot and skip SPL rather than make SPL be very
> complicated.
>
Strictly speaking, its not required now, and can be changed when required.

>
> > > > +#define CONFIG_USBDOWNLOAD_GADGET
> > > > +#define CONFIG_USB_GADGET_VBUS_DRAW 2
> > > > +#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
> > > > +#ifdef CONFIG_CMD_FASTBOOT
> > > > +#define CONFIG_G_DNL_VENDOR_NUM 0x0451
> > > > +#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
> > > > +#else
> > > > +#define CONFIG_G_DNL_VENDOR_NUM 0x0403
> > > > +#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
> > > > +#endif
> > > > +#define CONFIG_USB_GADGET_DUALSPEED
> > >
> > > Why can't we always use one vid/pid?
> > >
> > As we are restricted to use the vid which fastboot host application
> knows,
> > the other/original
> > vid/pid kept intact for the dependent functionality, if any.
> > Will check if 0x0403/0xBD00 could be removed.
>
> I think we can just always use the VID/PID that fastboot knows, DFU
> isn't nearly so picky and other gadget use cases don't care I believe.
>
Will use fastboot aware  VID/PID pair, always.

>
> --
> Tom
>
Regards, Dileep
diff mbox

Patch

diff --git a/board/ti/dra7xx/MAINTAINERS b/board/ti/dra7xx/MAINTAINERS
index 5ec6769..1b5ae71 100644
--- a/board/ti/dra7xx/MAINTAINERS
+++ b/board/ti/dra7xx/MAINTAINERS
@@ -6,3 +6,4 @@  F:	include/configs/dra7xx_evm.h
 F:	configs/dra7xx_evm_defconfig
 F:	configs/dra7xx_evm_qspiboot_defconfig
 F:	configs/dra7xx_evm_uart3_defconfig
+F:	configs/dra7xx_evm_android_defconfig
diff --git a/configs/dra7xx_evm_android_defconfig b/configs/dra7xx_evm_android_defconfig
new file mode 100644
index 0000000..5fdce85
--- /dev/null
+++ b/configs/dra7xx_evm_android_defconfig
@@ -0,0 +1,5 @@ 
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=1,DRA7XX_ANDROID"
++S:CONFIG_ARM=y
++S:CONFIG_OMAP54XX=y
++S:CONFIG_TARGET_DRA7XX_EVM=y
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index dee2b11..dd20e08 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -43,6 +43,16 @@ 
 	"uuid_disk=${uuid_gpt_disk};" \
 	"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
 
+#ifdef CONFIG_DRA7XX_ANDROID
+/* Fastboot */
+#define CONFIG_CMD_FASTBOOT
+#define CONFIG_ANDROID_BOOT_IMAGE
+#define CONFIG_USB_FASTBOOT_BUF_ADDR    CONFIG_SYS_LOAD_ADDR
+#define CONFIG_USB_FASTBOOT_BUF_SIZE    0x2F000000
+#define CONFIG_FASTBOOT_FLASH
+#define CONFIG_FASTBOOT_FLASH_MMC_DEV   1
+#endif
+
 #include <configs/ti_omap5_common.h>
 
 /* Enhance our eMMC support / experience. */
@@ -115,7 +125,11 @@ 
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
+#ifdef CONFIG_DRA7XX_ANDROID
+#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x80000
+#else
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x40000
+#endif
 
 #define CONFIG_SUPPORT_EMMC_BOOT
 
@@ -130,6 +144,22 @@ 
 #define CONFIG_OMAP_USB_PHY
 #define CONFIG_OMAP_USB2PHY2_HOST
 
+/* USB GADGET */
+#define CONFIG_USB_GADGET
+#define CONFIG_MUSB_GADGET
+#define CONFIG_MUSB_PIO_ONLY
+#define CONFIG_USBDOWNLOAD_GADGET
+#define CONFIG_USB_GADGET_VBUS_DRAW 2
+#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
+#ifdef CONFIG_CMD_FASTBOOT
+#define CONFIG_G_DNL_VENDOR_NUM 0x0451
+#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
+#else
+#define CONFIG_G_DNL_VENDOR_NUM 0x0403
+#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
+#endif
+#define CONFIG_USB_GADGET_DUALSPEED
+
 /* SATA */
 #define CONFIG_BOARD_LATE_INIT
 #define CONFIG_CMD_SCSI