All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support
@ 2015-03-03 11:10 Dileep Katta
  2015-03-03 11:10 ` [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb Dileep Katta
                   ` (5 more replies)
  0 siblings, 6 replies; 49+ messages in thread
From: Dileep Katta @ 2015-03-03 11:10 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
---
 arch/arm/cpu/armv7/omap5/Kconfig     |   5 +
 board/ti/dra7xx/Kconfig              |  13 ++
 board/ti/dra7xx/MAINTAINERS          |   2 +
 configs/dra7xx_evm_android_defconfig |   5 +
 include/configs/dra7xx_evm_android.h | 313 +++++++++++++++++++++++++++++++++++
 5 files changed, 338 insertions(+)
 create mode 100644 configs/dra7xx_evm_android_defconfig
 create mode 100644 include/configs/dra7xx_evm_android.h

diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
index aca862d..d8e9b2d 100644
--- a/arch/arm/cpu/armv7/omap5/Kconfig
+++ b/arch/arm/cpu/armv7/omap5/Kconfig
@@ -12,6 +12,11 @@ config TARGET_OMAP5_UEVM
 config TARGET_DRA7XX_EVM
 	bool "TI DRA7XX"
 
+config TARGET_DRA7XX_EVM_ANDROID
+	bool "TI DRA7XX ANDROID"
+	---help---
+	TI DRA7XX build for Android. Enables Fastboot.
+
 config TARGET_BEAGLE_X15
 	bool "BeagleBoard X15"
 
diff --git a/board/ti/dra7xx/Kconfig b/board/ti/dra7xx/Kconfig
index 3bbd866..6837998 100644
--- a/board/ti/dra7xx/Kconfig
+++ b/board/ti/dra7xx/Kconfig
@@ -10,3 +10,16 @@ config SYS_CONFIG_NAME
 	default "dra7xx_evm"
 
 endif
+
+if TARGET_DRA7XX_EVM_ANDROID
+
+config SYS_BOARD
+	default "dra7xx"
+
+config SYS_VENDOR
+	default "ti"
+
+config SYS_CONFIG_NAME
+	default "dra7xx_evm_android"
+
+endif
diff --git a/board/ti/dra7xx/MAINTAINERS b/board/ti/dra7xx/MAINTAINERS
index 5ec6769..efd4f81 100644
--- a/board/ti/dra7xx/MAINTAINERS
+++ b/board/ti/dra7xx/MAINTAINERS
@@ -6,3 +6,5 @@ F:	include/configs/dra7xx_evm.h
 F:	configs/dra7xx_evm_defconfig
 F:	configs/dra7xx_evm_qspiboot_defconfig
 F:	configs/dra7xx_evm_uart3_defconfig
+F:	include/configs/dra7xx_evm_android.h
+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..64ae4b3
--- /dev/null
+++ b/configs/dra7xx_evm_android_defconfig
@@ -0,0 +1,5 @@
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=1"
++S:CONFIG_ARM=y
++S:CONFIG_OMAP54XX=y
++S:CONFIG_TARGET_DRA7XX_EVM_ANDROID=y
diff --git a/include/configs/dra7xx_evm_android.h b/include/configs/dra7xx_evm_android.h
new file mode 100644
index 0000000..68e7eec
--- /dev/null
+++ b/include/configs/dra7xx_evm_android.h
@@ -0,0 +1,313 @@
+/*
+ * (C) Copyright 2013
+ * Texas Instruments Incorporated.
+ * Lokesh Vutla	  <lokeshvutla@ti.com>
+ *
+ * Configuration settings for the TI DRA7XX board.
+ * See ti_omap5_common.h for omap5 common settings.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __CONFIG_DRA7XX_EVM_ANDROID_H
+#define __CONFIG_DRA7XX_EVM_ANDROID_H
+
+#define CONFIG_DRA7XX
+#define CONFIG_BOARD_EARLY_INIT_F
+
+#ifndef CONFIG_QSPI_BOOT
+/* MMC ENV related defines */
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV		1	/* SLOT2: eMMC(1) */
+#define CONFIG_ENV_SIZE			(128 << 10)
+#define CONFIG_ENV_OFFSET		0xE0000
+#define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+#endif
+#define CONFIG_CMD_SAVEENV
+
+#if (CONFIG_CONS_INDEX == 1)
+#define CONSOLEDEV			"ttyO0"
+#elif (CONFIG_CONS_INDEX == 3)
+#define CONSOLEDEV			"ttyO2"
+#endif
+#define CONFIG_SYS_NS16550_COM1		UART1_BASE	/* Base EVM has UART0 */
+#define CONFIG_SYS_NS16550_COM2		UART2_BASE	/* UART2 */
+#define CONFIG_SYS_NS16550_COM3		UART3_BASE	/* UART3 */
+#define CONFIG_BAUDRATE			115200
+
+#define CONFIG_SYS_OMAP_ABE_SYSCK
+
+/* Define the default GPT table for eMMC */
+#define PARTS_DEFAULT \
+	"uuid_disk=${uuid_gpt_disk};" \
+	"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
+
+#ifdef CONFIG_NAND
+/* Define NAND information. */
+#define NANDARGS \
+	"mtdids=" MTDIDS_DEFAULT "\0" \
+	"mtdparts=" MTDPARTS_DEFAULT "\0" \
+	"nandargs=setenv bootargs console=${console} " \
+		"${optargs} " \
+		"root=${nandroot} " \
+		"rootfstype=${nandrootfstype}\0" \
+	"nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \
+	"nandrootfstype=ubifs rootwait=1\0" \
+	"nandboot=echo Booting from nand ...; " \
+		"run nandargs; " \
+		"nand read ${fdtaddr} NAND.u-boot-spl-os; " \
+		"nand read ${loadaddr} NAND.kernel; " \
+		"bootz ${loadaddr} - ${fdtaddr}\0"
+#define NANDBOOT			"run nandboot; "
+#endif
+
+#define DFU_ALT_INFO_MMC \
+	"dfu_alt_info_mmc=" \
+	"boot part 0 1;" \
+	"rootfs part 0 2;" \
+	"MLO fat 0 1;" \
+	"spl-os-args fat 0 1;" \
+	"spl-os-image fat 0 1;" \
+	"u-boot.img fat 0 1;" \
+	"uEnv.txt fat 0 1\0"
+
+#define DFU_ALT_INFO_EMMC \
+	"dfu_alt_info_emmc=" \
+	"MLO raw 0x100 0x100 mmcpart 0;" \
+	"u-boot.img raw 0x300 0x1000 mmcpart 0\0"
+
+#define DFU_ALT_INFO_RAM \
+	"dfu_alt_info_ram=" \
+	"kernel ram 0x80200000 0x4000000;" \
+	"fdt ram 0x80f80000 0x80000;" \
+	"ramdisk ram 0x81000000 0x4000000\0"
+
+#define DFUARGS \
+	"dfu_bufsiz=0x10000\0" \
+	DFU_ALT_INFO_MMC \
+	DFU_ALT_INFO_EMMC \
+	DFU_ALT_INFO_RAM
+
+/* 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
+
+#include <configs/ti_omap5_common.h>
+
+/* Enhance our eMMC support / experience. */
+#define CONFIG_CMD_GPT
+#define CONFIG_EFI_PARTITION
+#define CONFIG_PARTITION_UUIDS
+#define CONFIG_CMD_PART
+
+/* CPSW Ethernet */
+#define CONFIG_CMD_NET			/* 'bootp' and 'tftp' */
+#define CONFIG_CMD_DHCP
+#define CONFIG_BOOTP_DNS		/* Configurable parts of CMD_DHCP */
+#define CONFIG_BOOTP_DNS2
+#define CONFIG_BOOTP_SEND_HOSTNAME
+#define CONFIG_BOOTP_GATEWAY
+#define CONFIG_BOOTP_SUBNETMASK
+#define CONFIG_NET_RETRY_COUNT		10
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_MII
+#define CONFIG_DRIVER_TI_CPSW		/* Driver for IP block */
+#define CONFIG_MII			/* Required in net/eth.c */
+#define CONFIG_PHY_GIGE			/* per-board part of CPSW */
+#define CONFIG_PHYLIB
+
+/* SPI */
+#undef	CONFIG_OMAP3_SPI
+#define CONFIG_TI_QSPI
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_SPANSION
+#define CONFIG_CMD_SF
+#define CONFIG_CMD_SPI
+#define CONFIG_SPI_FLASH_BAR
+#define CONFIG_TI_SPI_MMAP
+#define CONFIG_SF_DEFAULT_SPEED                48000000
+#define CONFIG_DEFAULT_SPI_MODE                SPI_MODE_3
+
+/*
+ * Default to using SPI for environment, etc.
+ * 0x000000 - 0x010000 : QSPI.SPL (64KiB)
+ * 0x010000 - 0x020000 : QSPI.SPL.backup1 (64KiB)
+ * 0x020000 - 0x030000 : QSPI.SPL.backup2 (64KiB)
+ * 0x030000 - 0x040000 : QSPI.SPL.backup3 (64KiB)
+ * 0x040000 - 0x140000 : QSPI.u-boot (1MiB)
+ * 0x140000 - 0x1C0000 : QSPI.u-boot-spl-os (512KiB)
+ * 0x1C0000 - 0x1D0000 : QSPI.u-boot-env (64KiB)
+ * 0x1D0000 - 0x1E0000 : QSPI.u-boot-env.backup1 (64KiB)
+ * 0x1E0000 - 0x9E0000 : QSPI.kernel (8MiB)
+ * 0x9E0000 - 0x2000000 : USERLAND
+ */
+#define CONFIG_SYS_SPI_KERNEL_OFFS	0x1E0000
+#define CONFIG_SYS_SPI_ARGS_OFFS	0x140000
+#define CONFIG_SYS_SPI_ARGS_SIZE	0x80000
+#if defined(CONFIG_QSPI_BOOT)
+/* In SPL, use the environment and discard MMC support for space. */
+#ifdef CONFIG_SPL_BUILD
+#undef CONFIG_SPL_MMC_SUPPORT
+#undef CONFIG_SPL_MAX_SIZE
+#define CONFIG_SPL_MAX_SIZE             (64 << 10) /* 64 KiB */
+#endif
+#define CONFIG_SPL_ENV_SUPPORT
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+#define CONFIG_ENV_SPI_MAX_HZ           CONFIG_SF_DEFAULT_SPEED
+#define CONFIG_ENV_SIZE			(64 << 10)
+#define CONFIG_ENV_SECT_SIZE		(64 << 10) /* 64 KB sectors */
+#define CONFIG_ENV_OFFSET		0x1C0000
+#define CONFIG_ENV_OFFSET_REDUND	0x1D0000
+#endif
+
+/* SPI SPL */
+#define CONFIG_SPL_SPI_SUPPORT
+#define CONFIG_SPL_DMA_SUPPORT
+#ifdef CONFIG_SPL_BUILD
+#define CONFIG_TI_EDMA
+#endif
+#define CONFIG_SPL_SPI_LOAD
+#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_BUS             0
+#define CONFIG_SPL_SPI_CS              0
+#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x80000
+
+#define CONFIG_SUPPORT_EMMC_BOOT
+
+/* USB xHCI HOST */
+#define CONFIG_CMD_USB
+#define CONFIG_USB_HOST
+#define CONFIG_USB_XHCI
+#define CONFIG_USB_XHCI_OMAP
+#define CONFIG_USB_STORAGE
+#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
+
+#define CONFIG_OMAP_USB_PHY
+#define CONFIG_OMAP_USB2PHY2_HOST
+
+/* USB GADGET */
+#define CONFIG_USB_DWC3_PHY_OMAP
+#define CONFIG_USB_DWC3_OMAP
+#define CONFIG_USB_DWC3
+#define CONFIG_USB_DWC3_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"
+#define CONFIG_G_DNL_VENDOR_NUM 0x0451
+#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
+#define CONFIG_USB_GADGET_DUALSPEED
+
+/* USB Device Firmware Update support */
+#define CONFIG_DFU_FUNCTION
+#define CONFIG_DFU_RAM
+#define CONFIG_CMD_DFU
+
+#define CONFIG_DFU_MMC
+#define CONFIG_DFU_RAM
+
+/* SATA */
+#define CONFIG_BOARD_LATE_INIT
+#define CONFIG_CMD_SCSI
+#define CONFIG_LIBATA
+#define CONFIG_SCSI_AHCI
+#define CONFIG_SCSI_AHCI_PLAT
+#define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
+#define CONFIG_SYS_SCSI_MAX_LUN		1
+#define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
+						CONFIG_SYS_SCSI_MAX_LUN)
+
+/* NAND support */
+#ifdef CONFIG_NAND
+/* NAND: device related configs */
+#define CONFIG_SYS_NAND_PAGE_SIZE	2048
+#define CONFIG_SYS_NAND_OOBSIZE		64
+#define CONFIG_SYS_NAND_BLOCK_SIZE	(128*1024)
+#define CONFIG_SYS_NAND_BUSWIDTH_16BIT
+#define CONFIG_SYS_NAND_PAGE_COUNT	(CONFIG_SYS_NAND_BLOCK_SIZE / \
+					 CONFIG_SYS_NAND_PAGE_SIZE)
+#define CONFIG_SYS_NAND_5_ADDR_CYCLE
+/* NAND: driver related configs */
+#define CONFIG_NAND_OMAP_GPMC
+#define CONFIG_NAND_OMAP_ELM
+#define CONFIG_SYS_NAND_ONFI_DETECTION
+#define CONFIG_NAND_OMAP_ECCSCHEME	OMAP_ECC_BCH8_CODE_HW
+#define CONFIG_SYS_NAND_BAD_BLOCK_POS	NAND_LARGE_BADBLOCK_POS
+#define CONFIG_SYS_NAND_ECCPOS		{ 2, 3, 4, 5, 6, 7, 8, 9, \
+					 10, 11, 12, 13, 14, 15, 16, 17, \
+					 18, 19, 20, 21, 22, 23, 24, 25, \
+					 26, 27, 28, 29, 30, 31, 32, 33, \
+					 34, 35, 36, 37, 38, 39, 40, 41, \
+					 42, 43, 44, 45, 46, 47, 48, 49, \
+					 50, 51, 52, 53, 54, 55, 56, 57, }
+#define CONFIG_SYS_NAND_ECCSIZE		512
+#define CONFIG_SYS_NAND_ECCBYTES	14
+#define MTDIDS_DEFAULT			"nand0=nand.0"
+#define MTDPARTS_DEFAULT		"mtdparts=nand.0:" \
+					"128k(NAND.SPL)," \
+					"128k(NAND.SPL.backup1)," \
+					"128k(NAND.SPL.backup2)," \
+					"128k(NAND.SPL.backup3)," \
+					"256k(NAND.u-boot-spl-os)," \
+					"1m(NAND.u-boot)," \
+					"128k(NAND.u-boot-env)," \
+					"128k(NAND.u-boot-env.backup1)," \
+					"8m(NAND.kernel)," \
+					"-(NAND.file-system)"
+#define CONFIG_SYS_NAND_U_BOOT_OFFS	0x000c0000
+/* NAND: SPL related configs */
+#ifdef CONFIG_SPL_NAND_SUPPORT
+#define CONFIG_SPL_NAND_AM33XX_BCH
+#endif
+/* NAND: SPL falcon mode configs */
+#ifdef CONFIG_SPL_OS_BOOT
+#define CONFIG_CMD_SPL_NAND_OFS		0x00080000 /* os-boot params*/
+#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS	0x00200000 /* kernel offset */
+#define CONFIG_CMD_SPL_WRITE_SIZE	0x2000
+#endif
+#endif /* !CONFIG_NAND */
+
+/* Parallel NOR Support */
+#if defined(CONFIG_NOR)
+/* NOR: device related configs */
+#define CONFIG_SYS_MAX_FLASH_SECT	512
+#define CONFIG_SYS_FLASH_CFI_WIDTH	FLASH_CFI_16BIT
+#define CONFIG_SYS_FLASH_SIZE		(64 * 1024 * 1024) /* 64 MB */
+/* #define CONFIG_INIT_IGNORE_ERROR */
+#undef CONFIG_SYS_NO_FLASH
+#define CONFIG_CMD_FLASH
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#define CONFIG_SYS_FLASH_PROTECTION
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_MTD
+#define CONFIG_SYS_MAX_FLASH_BANKS	1
+#define CONFIG_SYS_FLASH_BASE		(0x08000000)
+#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
+/* Reduce SPL size by removing unlikey targets */
+#ifdef CONFIG_NOR_BOOT
+#define CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_SECT_SIZE		(128 * 1024)	/* 128 KiB */
+#define MTDIDS_DEFAULT			"nor0=physmap-flash.0"
+#define MTDPARTS_DEFAULT		"mtdparts=physmap-flash.0:" \
+					"1m(NOR.u-boot)," \
+					"128k(NOR.u-boot-env)," \
+					"128k(NOR.u-boot-env.backup1)," \
+					"256k(NOR.u-boot-spl-os)," \
+					"8m(NOR.kernel)," \
+					"-(NOR.rootfs)"
+#define CONFIG_ENV_OFFSET		0x00100000
+#define CONFIG_ENV_OFFSET_REDUND	0x00120000
+#endif
+#endif  /* NOR support */
+
+#endif /* __CONFIG_DRA7XX_EVM_ANDROID_H */
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-03 11:10 [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support Dileep Katta
@ 2015-03-03 11:10 ` Dileep Katta
  2015-03-04 13:19   ` Lukasz Majewski
  2015-03-04 17:05   ` Stegmaier, Angela
  2015-03-03 11:10 ` [U-Boot] [PATCH v3 3/4] ARM: DRA7: Set serial number environment variable Dileep Katta
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 49+ messages in thread
From: Dileep Katta @ 2015-03-03 11:10 UTC (permalink / raw)
  To: u-boot

g_dnl_gadget_register() fails for dra7xx dwc3 gadget
when running cmd_fastboot.
Calling board_usb_init() fixes this.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
---
 common/cmd_fastboot.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
index 346ab80..d7b8f6d 100644
--- a/common/cmd_fastboot.c
+++ b/common/cmd_fastboot.c
@@ -10,11 +10,13 @@
 #include <common.h>
 #include <command.h>
 #include <g_dnl.h>
+#include <usb.h>
 
 static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret;
 
+	board_usb_init(0, USB_INIT_DEVICE);
 	g_dnl_clear_detach();
 	ret = g_dnl_register("usb_dnl_fastboot");
 	if (ret)
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v3 3/4] ARM: DRA7: Set serial number environment variable
  2015-03-03 11:10 [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support Dileep Katta
  2015-03-03 11:10 ` [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb Dileep Katta
@ 2015-03-03 11:10 ` Dileep Katta
  2015-03-04 13:23   ` Lukasz Majewski
                     ` (2 more replies)
  2015-03-03 11:10 ` [U-Boot] [PATCH v1 4/4] ARM: DRA7: fastboot: Implement reboot-bootloader command - Implemented fb_set_reboot_flag() for DRA7 - Defined a weak function, fb_check_reboot_flag() - Implemented for DRA7 Dileep Katta
                   ` (3 subsequent siblings)
  5 siblings, 3 replies; 49+ messages in thread
From: Dileep Katta @ 2015-03-03 11:10 UTC (permalink / raw)
  To: u-boot

Adds the registers to get the serial number of dra7xx boards.
Serial# environment variable will be set if not done already.
This will be useful to show correct information in
"fastboot devices" commands.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
---
 arch/arm/cpu/armv7/omap5/prcm-regs.c |  2 ++
 arch/arm/include/asm/omap_common.h   |  2 ++
 board/ti/dra7xx/evm.c                | 11 +++++++++++
 3 files changed, 15 insertions(+)

diff --git a/arch/arm/cpu/armv7/omap5/prcm-regs.c b/arch/arm/cpu/armv7/omap5/prcm-regs.c
index 0745d42..020a964 100644
--- a/arch/arm/cpu/armv7/omap5/prcm-regs.c
+++ b/arch/arm/cpu/armv7/omap5/prcm-regs.c
@@ -440,6 +440,8 @@ struct omap_sys_ctrl_regs const dra7xx_ctrl = {
 	.control_emif1_sdram_config_ext		= 0x4AE0C144,
 	.control_emif2_sdram_config_ext		= 0x4AE0C148,
 	.control_wkup_ldovbb_mpu_voltage_ctrl	= 0x4AE0C158,
+	.control_std_fuse_die_id_3		= 0x4AE0C210,
+	.control_std_fuse_prod_id_0		= 0x4AE0C214,
 	.control_padconf_mode			= 0x4AE0C5A0,
 	.control_xtal_oscillator		= 0x4AE0C5A4,
 	.control_i2c_2				= 0x4AE0C5A8,
diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h
index 323952f..b329803 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -362,6 +362,8 @@ struct omap_sys_ctrl_regs {
 	u32 control_core_control_io1;
 	u32 control_core_control_io2;
 	u32 control_id_code;
+	u32 control_std_fuse_die_id_3;
+	u32 control_std_fuse_prod_id_0;
 	u32 control_std_fuse_opp_bgap;
 	u32 control_ldosram_iva_voltage_ctrl;
 	u32 control_ldosram_mpu_voltage_ctrl;
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 6522241..e20d950 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -88,10 +88,21 @@ int board_init(void)
 int board_late_init(void)
 {
 #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+	char serialno[72];
+	uint32_t serialno_lo, serialno_hi;
+
 	if (omap_revision() == DRA722_ES1_0)
 		setenv("board_name", "dra72x");
 	else
 		setenv("board_name", "dra7xx");
+
+	if (!getenv("serial#")) {
+		printf("serial# not set, setting...\n");
+		serialno_lo = readl((*ctrl)->control_std_fuse_die_id_3);
+		serialno_hi = readl((*ctrl)->control_std_fuse_prod_id_0);
+		sprintf(serialno, "%08x%08x", serialno_hi, serialno_lo);
+		setenv("serial#", serialno);
+	}
 #endif
 	return 0;
 }
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v1 4/4] ARM: DRA7: fastboot: Implement reboot-bootloader command - Implemented fb_set_reboot_flag() for DRA7 - Defined a weak function, fb_check_reboot_flag() - Implemented for DRA7
  2015-03-03 11:10 [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support Dileep Katta
  2015-03-03 11:10 ` [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb Dileep Katta
  2015-03-03 11:10 ` [U-Boot] [PATCH v3 3/4] ARM: DRA7: Set serial number environment variable Dileep Katta
@ 2015-03-03 11:10 ` Dileep Katta
  2015-03-03 14:15   ` Rob Herring
  2015-03-04 13:31   ` Lukasz Majewski
  2015-03-03 11:53 ` [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support Dileep Katta
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 49+ messages in thread
From: Dileep Katta @ 2015-03-03 11:10 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
---
 board/ti/dra7xx/Makefile             |  1 +
 board/ti/dra7xx/fastboot.c           | 45 ++++++++++++++++++++++++++++++++++++
 common/cmd_bootm.c                   |  5 ++++
 drivers/usb/gadget/f_fastboot.c      |  5 ++++
 include/configs/dra7xx_evm_android.h | 14 +++++++++++
 5 files changed, 70 insertions(+)
 create mode 100644 board/ti/dra7xx/fastboot.c

diff --git a/board/ti/dra7xx/Makefile b/board/ti/dra7xx/Makefile
index 434e8d1..ae730ae 100644
--- a/board/ti/dra7xx/Makefile
+++ b/board/ti/dra7xx/Makefile
@@ -6,3 +6,4 @@
 #
 
 obj-y	:= evm.o
+obj-$(CONFIG_CMD_FASTBOOT) += fastboot.o
diff --git a/board/ti/dra7xx/fastboot.c b/board/ti/dra7xx/fastboot.c
new file mode 100644
index 0000000..e05010d
--- /dev/null
+++ b/board/ti/dra7xx/fastboot.c
@@ -0,0 +1,45 @@
+/*
+ * (C) Copyright 2013
+ * Texas Instruments Incorporated, <www.ti.com>
+ *
+ * Lokesh Vutla <lokeshvutla@ti.com>
+ *
+ * Based on previous work by:
+ * Aneesh V       <aneesh@ti.com>
+ * Steve Sakoman  <steve@sakoman.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+#include <common.h>
+#include <asm/io.h>
+#include <asm-generic/gpio.h>
+#include <config.h>
+
+
+int fb_set_reboot_flag(void)
+{
+	/* clear all reset events */
+	__raw_writel(DRA7XX_PRM_RSTST_CLR, PRM_RSTST);
+	strncpy((char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE, "bootloader",
+		DRA7XX_REBOOT_REASON_SIZE - 1);
+	*(((char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE) +
+				DRA7XX_REBOOT_REASON_SIZE - 1) = '\0';
+	/* trigger warm reset */
+	__raw_writel(DRA7XX_PRM_RSTCTRL_RESET_WARM_BIT, DRA7XX_PRM_RSTCTRL);
+
+	return 0;
+}
+
+int fb_check_reboot_flag(void)
+{
+	/* Check if we are coming from a warm reset */
+	if (__raw_readl(DRA7XX_PRM_RSTST) & DRA7XX_PRM_RSTST_RESET_WARM_BIT)
+		if (!strncmp((const char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE,
+				"bootloader", DRA7XX_REBOOT_REASON_SIZE)) {
+			strncpy((char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE, "",
+				DRA7XX_REBOOT_REASON_SIZE);
+			return 0;
+		}
+
+	return 1;
+}
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 48199bf..00791be 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -729,6 +729,11 @@ int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	int ret;
 
+#if defined(CONFIG_CMD_FASTBOOT)
+	if (!fb_check_reboot_flag())
+		do_fastboot(cmdtp, flag, argc, argv);
+#endif
+
 	/* Consume 'booti' */
 	argc--; argv++;
 
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 206b6d1..a450357 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -332,6 +332,11 @@ int __weak fb_set_reboot_flag(void)
 	return -ENOSYS;
 }
 
+int __weak fb_check_reboot_flag(void)
+{
+	return -ENOSYS;
+}
+
 static void cb_reboot(struct usb_ep *ep, struct usb_request *req)
 {
 	char *cmd = req->buf;
diff --git a/include/configs/dra7xx_evm_android.h b/include/configs/dra7xx_evm_android.h
index 68e7eec..2038e00 100644
--- a/include/configs/dra7xx_evm_android.h
+++ b/include/configs/dra7xx_evm_android.h
@@ -310,4 +310,18 @@
 #endif
 #endif  /* NOR support */
 
+#define DRA7XX_PUBLIC_SAR_RAM_1_FREE           (0x4AE26000 + 0xFE0)
+#define DRA7XX_PRM_RSTCTRL_RESET_WARM_BIT      (1<<0)
+#define DRA7XX_PRM_RSTST_RESET_WARM_BIT        (1<<1)
+#define DRA7XX_PRM_RSTST                       0x4AE07D04
+#define DRA7XX_PRM_RSTCTRL                     0x4AE07D00
+#define DRA7XX_PRM_RSTST_CLR                   0xfff
+#define DRA7XX_REBOOT_REASON_SIZE              0xf
+
+#define CONFIG_BOARD_MACH_TYPE                  4070
+#define MEMORY_BASE                             0x80000000
+#define CONFIG_ADDR_ATAGS                       (MEMORY_BASE + 0x100)
+#define CONFIG_ADDR_DOWNLOAD                    (MEMORY_BASE + 0x02000000)
+#define DEVICE_TREE                             0x82f80000
+
 #endif /* __CONFIG_DRA7XX_EVM_ANDROID_H */
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support
  2015-03-03 11:10 [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support Dileep Katta
                   ` (2 preceding siblings ...)
  2015-03-03 11:10 ` [U-Boot] [PATCH v1 4/4] ARM: DRA7: fastboot: Implement reboot-bootloader command - Implemented fb_set_reboot_flag() for DRA7 - Defined a weak function, fb_check_reboot_flag() - Implemented for DRA7 Dileep Katta
@ 2015-03-03 11:53 ` Dileep Katta
  2015-03-04 13:18 ` Lukasz Majewski
  2015-03-04 16:52 ` Tom Rini
  5 siblings, 0 replies; 49+ messages in thread
From: Dileep Katta @ 2015-03-03 11:53 UTC (permalink / raw)
  To: u-boot

Corrected Tom Rini's mail id.

Regards,
Dileep

On 3 March 2015 at 16:40, Dileep Katta <dileep.katta@linaro.org> wrote:

> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> ---
>  arch/arm/cpu/armv7/omap5/Kconfig     |   5 +
>  board/ti/dra7xx/Kconfig              |  13 ++
>  board/ti/dra7xx/MAINTAINERS          |   2 +
>  configs/dra7xx_evm_android_defconfig |   5 +
>  include/configs/dra7xx_evm_android.h | 313
> +++++++++++++++++++++++++++++++++++
>  5 files changed, 338 insertions(+)
>  create mode 100644 configs/dra7xx_evm_android_defconfig
>  create mode 100644 include/configs/dra7xx_evm_android.h
>
> diff --git a/arch/arm/cpu/armv7/omap5/Kconfig
> b/arch/arm/cpu/armv7/omap5/Kconfig
> index aca862d..d8e9b2d 100644
> --- a/arch/arm/cpu/armv7/omap5/Kconfig
> +++ b/arch/arm/cpu/armv7/omap5/Kconfig
> @@ -12,6 +12,11 @@ config TARGET_OMAP5_UEVM
>  config TARGET_DRA7XX_EVM
>         bool "TI DRA7XX"
>
> +config TARGET_DRA7XX_EVM_ANDROID
> +       bool "TI DRA7XX ANDROID"
> +       ---help---
> +       TI DRA7XX build for Android. Enables Fastboot.
> +
>  config TARGET_BEAGLE_X15
>         bool "BeagleBoard X15"
>
> diff --git a/board/ti/dra7xx/Kconfig b/board/ti/dra7xx/Kconfig
> index 3bbd866..6837998 100644
> --- a/board/ti/dra7xx/Kconfig
> +++ b/board/ti/dra7xx/Kconfig
> @@ -10,3 +10,16 @@ config SYS_CONFIG_NAME
>         default "dra7xx_evm"
>
>  endif
> +
> +if TARGET_DRA7XX_EVM_ANDROID
> +
> +config SYS_BOARD
> +       default "dra7xx"
> +
> +config SYS_VENDOR
> +       default "ti"
> +
> +config SYS_CONFIG_NAME
> +       default "dra7xx_evm_android"
> +
> +endif
> diff --git a/board/ti/dra7xx/MAINTAINERS b/board/ti/dra7xx/MAINTAINERS
> index 5ec6769..efd4f81 100644
> --- a/board/ti/dra7xx/MAINTAINERS
> +++ b/board/ti/dra7xx/MAINTAINERS
> @@ -6,3 +6,5 @@ F:      include/configs/dra7xx_evm.h
>  F:     configs/dra7xx_evm_defconfig
>  F:     configs/dra7xx_evm_qspiboot_defconfig
>  F:     configs/dra7xx_evm_uart3_defconfig
> +F:     include/configs/dra7xx_evm_android.h
> +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..64ae4b3
> --- /dev/null
> +++ b/configs/dra7xx_evm_android_defconfig
> @@ -0,0 +1,5 @@
> +CONFIG_SPL=y
> +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=1"
> ++S:CONFIG_ARM=y
> ++S:CONFIG_OMAP54XX=y
> ++S:CONFIG_TARGET_DRA7XX_EVM_ANDROID=y
> diff --git a/include/configs/dra7xx_evm_android.h
> b/include/configs/dra7xx_evm_android.h
> new file mode 100644
> index 0000000..68e7eec
> --- /dev/null
> +++ b/include/configs/dra7xx_evm_android.h
> @@ -0,0 +1,313 @@
> +/*
> + * (C) Copyright 2013
> + * Texas Instruments Incorporated.
> + * Lokesh Vutla          <lokeshvutla@ti.com>
> + *
> + * Configuration settings for the TI DRA7XX board.
> + * See ti_omap5_common.h for omap5 common settings.
> + *
> + * SPDX-License-Identifier:    GPL-2.0+
> + */
> +
> +#ifndef __CONFIG_DRA7XX_EVM_ANDROID_H
> +#define __CONFIG_DRA7XX_EVM_ANDROID_H
> +
> +#define CONFIG_DRA7XX
> +#define CONFIG_BOARD_EARLY_INIT_F
> +
> +#ifndef CONFIG_QSPI_BOOT
> +/* MMC ENV related defines */
> +#define CONFIG_ENV_IS_IN_MMC
> +#define CONFIG_SYS_MMC_ENV_DEV         1       /* SLOT2: eMMC(1) */
> +#define CONFIG_ENV_SIZE                        (128 << 10)
> +#define CONFIG_ENV_OFFSET              0xE0000
> +#define CONFIG_ENV_OFFSET_REDUND       (CONFIG_ENV_OFFSET +
> CONFIG_ENV_SIZE)
> +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
> +#endif
> +#define CONFIG_CMD_SAVEENV
> +
> +#if (CONFIG_CONS_INDEX == 1)
> +#define CONSOLEDEV                     "ttyO0"
> +#elif (CONFIG_CONS_INDEX == 3)
> +#define CONSOLEDEV                     "ttyO2"
> +#endif
> +#define CONFIG_SYS_NS16550_COM1                UART1_BASE      /* Base
> EVM has UART0 */
> +#define CONFIG_SYS_NS16550_COM2                UART2_BASE      /* UART2 */
> +#define CONFIG_SYS_NS16550_COM3                UART3_BASE      /* UART3 */
> +#define CONFIG_BAUDRATE                        115200
> +
> +#define CONFIG_SYS_OMAP_ABE_SYSCK
> +
> +/* Define the default GPT table for eMMC */
> +#define PARTS_DEFAULT \
> +       "uuid_disk=${uuid_gpt_disk};" \
> +       "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
> +
> +#ifdef CONFIG_NAND
> +/* Define NAND information. */
> +#define NANDARGS \
> +       "mtdids=" MTDIDS_DEFAULT "\0" \
> +       "mtdparts=" MTDPARTS_DEFAULT "\0" \
> +       "nandargs=setenv bootargs console=${console} " \
> +               "${optargs} " \
> +               "root=${nandroot} " \
> +               "rootfstype=${nandrootfstype}\0" \
> +       "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \
> +       "nandrootfstype=ubifs rootwait=1\0" \
> +       "nandboot=echo Booting from nand ...; " \
> +               "run nandargs; " \
> +               "nand read ${fdtaddr} NAND.u-boot-spl-os; " \
> +               "nand read ${loadaddr} NAND.kernel; " \
> +               "bootz ${loadaddr} - ${fdtaddr}\0"
> +#define NANDBOOT                       "run nandboot; "
> +#endif
> +
> +#define DFU_ALT_INFO_MMC \
> +       "dfu_alt_info_mmc=" \
> +       "boot part 0 1;" \
> +       "rootfs part 0 2;" \
> +       "MLO fat 0 1;" \
> +       "spl-os-args fat 0 1;" \
> +       "spl-os-image fat 0 1;" \
> +       "u-boot.img fat 0 1;" \
> +       "uEnv.txt fat 0 1\0"
> +
> +#define DFU_ALT_INFO_EMMC \
> +       "dfu_alt_info_emmc=" \
> +       "MLO raw 0x100 0x100 mmcpart 0;" \
> +       "u-boot.img raw 0x300 0x1000 mmcpart 0\0"
> +
> +#define DFU_ALT_INFO_RAM \
> +       "dfu_alt_info_ram=" \
> +       "kernel ram 0x80200000 0x4000000;" \
> +       "fdt ram 0x80f80000 0x80000;" \
> +       "ramdisk ram 0x81000000 0x4000000\0"
> +
> +#define DFUARGS \
> +       "dfu_bufsiz=0x10000\0" \
> +       DFU_ALT_INFO_MMC \
> +       DFU_ALT_INFO_EMMC \
> +       DFU_ALT_INFO_RAM
> +
> +/* 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
> +
> +#include <configs/ti_omap5_common.h>
> +
> +/* Enhance our eMMC support / experience. */
> +#define CONFIG_CMD_GPT
> +#define CONFIG_EFI_PARTITION
> +#define CONFIG_PARTITION_UUIDS
> +#define CONFIG_CMD_PART
> +
> +/* CPSW Ethernet */
> +#define CONFIG_CMD_NET                 /* 'bootp' and 'tftp' */
> +#define CONFIG_CMD_DHCP
> +#define CONFIG_BOOTP_DNS               /* Configurable parts of CMD_DHCP
> */
> +#define CONFIG_BOOTP_DNS2
> +#define CONFIG_BOOTP_SEND_HOSTNAME
> +#define CONFIG_BOOTP_GATEWAY
> +#define CONFIG_BOOTP_SUBNETMASK
> +#define CONFIG_NET_RETRY_COUNT         10
> +#define CONFIG_CMD_PING
> +#define CONFIG_CMD_MII
> +#define CONFIG_DRIVER_TI_CPSW          /* Driver for IP block */
> +#define CONFIG_MII                     /* Required in net/eth.c */
> +#define CONFIG_PHY_GIGE                        /* per-board part of CPSW
> */
> +#define CONFIG_PHYLIB
> +
> +/* SPI */
> +#undef CONFIG_OMAP3_SPI
> +#define CONFIG_TI_QSPI
> +#define CONFIG_SPI_FLASH
> +#define CONFIG_SPI_FLASH_SPANSION
> +#define CONFIG_CMD_SF
> +#define CONFIG_CMD_SPI
> +#define CONFIG_SPI_FLASH_BAR
> +#define CONFIG_TI_SPI_MMAP
> +#define CONFIG_SF_DEFAULT_SPEED                48000000
> +#define CONFIG_DEFAULT_SPI_MODE                SPI_MODE_3
> +
> +/*
> + * Default to using SPI for environment, etc.
> + * 0x000000 - 0x010000 : QSPI.SPL (64KiB)
> + * 0x010000 - 0x020000 : QSPI.SPL.backup1 (64KiB)
> + * 0x020000 - 0x030000 : QSPI.SPL.backup2 (64KiB)
> + * 0x030000 - 0x040000 : QSPI.SPL.backup3 (64KiB)
> + * 0x040000 - 0x140000 : QSPI.u-boot (1MiB)
> + * 0x140000 - 0x1C0000 : QSPI.u-boot-spl-os (512KiB)
> + * 0x1C0000 - 0x1D0000 : QSPI.u-boot-env (64KiB)
> + * 0x1D0000 - 0x1E0000 : QSPI.u-boot-env.backup1 (64KiB)
> + * 0x1E0000 - 0x9E0000 : QSPI.kernel (8MiB)
> + * 0x9E0000 - 0x2000000 : USERLAND
> + */
> +#define CONFIG_SYS_SPI_KERNEL_OFFS     0x1E0000
> +#define CONFIG_SYS_SPI_ARGS_OFFS       0x140000
> +#define CONFIG_SYS_SPI_ARGS_SIZE       0x80000
> +#if defined(CONFIG_QSPI_BOOT)
> +/* In SPL, use the environment and discard MMC support for space. */
> +#ifdef CONFIG_SPL_BUILD
> +#undef CONFIG_SPL_MMC_SUPPORT
> +#undef CONFIG_SPL_MAX_SIZE
> +#define CONFIG_SPL_MAX_SIZE             (64 << 10) /* 64 KiB */
> +#endif
> +#define CONFIG_SPL_ENV_SUPPORT
> +#define CONFIG_ENV_IS_IN_SPI_FLASH
> +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
> +#define CONFIG_ENV_SPI_MAX_HZ           CONFIG_SF_DEFAULT_SPEED
> +#define CONFIG_ENV_SIZE                        (64 << 10)
> +#define CONFIG_ENV_SECT_SIZE           (64 << 10) /* 64 KB sectors */
> +#define CONFIG_ENV_OFFSET              0x1C0000
> +#define CONFIG_ENV_OFFSET_REDUND       0x1D0000
> +#endif
> +
> +/* SPI SPL */
> +#define CONFIG_SPL_SPI_SUPPORT
> +#define CONFIG_SPL_DMA_SUPPORT
> +#ifdef CONFIG_SPL_BUILD
> +#define CONFIG_TI_EDMA
> +#endif
> +#define CONFIG_SPL_SPI_LOAD
> +#define CONFIG_SPL_SPI_FLASH_SUPPORT
> +#define CONFIG_SPL_SPI_BUS             0
> +#define CONFIG_SPL_SPI_CS              0
> +#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x80000
> +
> +#define CONFIG_SUPPORT_EMMC_BOOT
> +
> +/* USB xHCI HOST */
> +#define CONFIG_CMD_USB
> +#define CONFIG_USB_HOST
> +#define CONFIG_USB_XHCI
> +#define CONFIG_USB_XHCI_OMAP
> +#define CONFIG_USB_STORAGE
> +#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
> +
> +#define CONFIG_OMAP_USB_PHY
> +#define CONFIG_OMAP_USB2PHY2_HOST
> +
> +/* USB GADGET */
> +#define CONFIG_USB_DWC3_PHY_OMAP
> +#define CONFIG_USB_DWC3_OMAP
> +#define CONFIG_USB_DWC3
> +#define CONFIG_USB_DWC3_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"
> +#define CONFIG_G_DNL_VENDOR_NUM 0x0451
> +#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
> +#define CONFIG_USB_GADGET_DUALSPEED
> +
> +/* USB Device Firmware Update support */
> +#define CONFIG_DFU_FUNCTION
> +#define CONFIG_DFU_RAM
> +#define CONFIG_CMD_DFU
> +
> +#define CONFIG_DFU_MMC
> +#define CONFIG_DFU_RAM
> +
> +/* SATA */
> +#define CONFIG_BOARD_LATE_INIT
> +#define CONFIG_CMD_SCSI
> +#define CONFIG_LIBATA
> +#define CONFIG_SCSI_AHCI
> +#define CONFIG_SCSI_AHCI_PLAT
> +#define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
> +#define CONFIG_SYS_SCSI_MAX_LUN                1
> +#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
> +                                               CONFIG_SYS_SCSI_MAX_LUN)
> +
> +/* NAND support */
> +#ifdef CONFIG_NAND
> +/* NAND: device related configs */
> +#define CONFIG_SYS_NAND_PAGE_SIZE      2048
> +#define CONFIG_SYS_NAND_OOBSIZE                64
> +#define CONFIG_SYS_NAND_BLOCK_SIZE     (128*1024)
> +#define CONFIG_SYS_NAND_BUSWIDTH_16BIT
> +#define CONFIG_SYS_NAND_PAGE_COUNT     (CONFIG_SYS_NAND_BLOCK_SIZE / \
> +                                        CONFIG_SYS_NAND_PAGE_SIZE)
> +#define CONFIG_SYS_NAND_5_ADDR_CYCLE
> +/* NAND: driver related configs */
> +#define CONFIG_NAND_OMAP_GPMC
> +#define CONFIG_NAND_OMAP_ELM
> +#define CONFIG_SYS_NAND_ONFI_DETECTION
> +#define CONFIG_NAND_OMAP_ECCSCHEME     OMAP_ECC_BCH8_CODE_HW
> +#define CONFIG_SYS_NAND_BAD_BLOCK_POS  NAND_LARGE_BADBLOCK_POS
> +#define CONFIG_SYS_NAND_ECCPOS         { 2, 3, 4, 5, 6, 7, 8, 9, \
> +                                        10, 11, 12, 13, 14, 15, 16, 17, \
> +                                        18, 19, 20, 21, 22, 23, 24, 25, \
> +                                        26, 27, 28, 29, 30, 31, 32, 33, \
> +                                        34, 35, 36, 37, 38, 39, 40, 41, \
> +                                        42, 43, 44, 45, 46, 47, 48, 49, \
> +                                        50, 51, 52, 53, 54, 55, 56, 57, }
> +#define CONFIG_SYS_NAND_ECCSIZE                512
> +#define CONFIG_SYS_NAND_ECCBYTES       14
> +#define MTDIDS_DEFAULT                 "nand0=nand.0"
> +#define MTDPARTS_DEFAULT               "mtdparts=nand.0:" \
> +                                       "128k(NAND.SPL)," \
> +                                       "128k(NAND.SPL.backup1)," \
> +                                       "128k(NAND.SPL.backup2)," \
> +                                       "128k(NAND.SPL.backup3)," \
> +                                       "256k(NAND.u-boot-spl-os)," \
> +                                       "1m(NAND.u-boot)," \
> +                                       "128k(NAND.u-boot-env)," \
> +                                       "128k(NAND.u-boot-env.backup1)," \
> +                                       "8m(NAND.kernel)," \
> +                                       "-(NAND.file-system)"
> +#define CONFIG_SYS_NAND_U_BOOT_OFFS    0x000c0000
> +/* NAND: SPL related configs */
> +#ifdef CONFIG_SPL_NAND_SUPPORT
> +#define CONFIG_SPL_NAND_AM33XX_BCH
> +#endif
> +/* NAND: SPL falcon mode configs */
> +#ifdef CONFIG_SPL_OS_BOOT
> +#define CONFIG_CMD_SPL_NAND_OFS                0x00080000 /* os-boot
> params*/
> +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS        0x00200000 /* kernel
> offset */
> +#define CONFIG_CMD_SPL_WRITE_SIZE      0x2000
> +#endif
> +#endif /* !CONFIG_NAND */
> +
> +/* Parallel NOR Support */
> +#if defined(CONFIG_NOR)
> +/* NOR: device related configs */
> +#define CONFIG_SYS_MAX_FLASH_SECT      512
> +#define CONFIG_SYS_FLASH_CFI_WIDTH     FLASH_CFI_16BIT
> +#define CONFIG_SYS_FLASH_SIZE          (64 * 1024 * 1024) /* 64 MB */
> +/* #define CONFIG_INIT_IGNORE_ERROR */
> +#undef CONFIG_SYS_NO_FLASH
> +#define CONFIG_CMD_FLASH
> +#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
> +#define CONFIG_SYS_FLASH_PROTECTION
> +#define CONFIG_SYS_FLASH_CFI
> +#define CONFIG_FLASH_CFI_DRIVER
> +#define CONFIG_FLASH_CFI_MTD
> +#define CONFIG_SYS_MAX_FLASH_BANKS     1
> +#define CONFIG_SYS_FLASH_BASE          (0x08000000)
> +#define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_FLASH_BASE
> +/* Reduce SPL size by removing unlikey targets */
> +#ifdef CONFIG_NOR_BOOT
> +#define CONFIG_ENV_IS_IN_FLASH
> +#define CONFIG_ENV_SECT_SIZE           (128 * 1024)    /* 128 KiB */
> +#define MTDIDS_DEFAULT                 "nor0=physmap-flash.0"
> +#define MTDPARTS_DEFAULT               "mtdparts=physmap-flash.0:" \
> +                                       "1m(NOR.u-boot)," \
> +                                       "128k(NOR.u-boot-env)," \
> +                                       "128k(NOR.u-boot-env.backup1)," \
> +                                       "256k(NOR.u-boot-spl-os)," \
> +                                       "8m(NOR.kernel)," \
> +                                       "-(NOR.rootfs)"
> +#define CONFIG_ENV_OFFSET              0x00100000
> +#define CONFIG_ENV_OFFSET_REDUND       0x00120000
> +#endif
> +#endif  /* NOR support */
> +
> +#endif /* __CONFIG_DRA7XX_EVM_ANDROID_H */
> --
> 1.8.3.2
>
>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v1 4/4] ARM: DRA7: fastboot: Implement reboot-bootloader command - Implemented fb_set_reboot_flag() for DRA7 - Defined a weak function, fb_check_reboot_flag() - Implemented for DRA7
  2015-03-03 11:10 ` [U-Boot] [PATCH v1 4/4] ARM: DRA7: fastboot: Implement reboot-bootloader command - Implemented fb_set_reboot_flag() for DRA7 - Defined a weak function, fb_check_reboot_flag() - Implemented for DRA7 Dileep Katta
@ 2015-03-03 14:15   ` Rob Herring
  2015-03-04 16:57     ` Tom Rini
  2015-03-04 13:31   ` Lukasz Majewski
  1 sibling, 1 reply; 49+ messages in thread
From: Rob Herring @ 2015-03-03 14:15 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 3, 2015 at 5:10 AM, Dileep Katta <dileep.katta@linaro.org> wrote:
> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> ---
>  board/ti/dra7xx/Makefile             |  1 +
>  board/ti/dra7xx/fastboot.c           | 45 ++++++++++++++++++++++++++++++++++++
>  common/cmd_bootm.c                   |  5 ++++
>  drivers/usb/gadget/f_fastboot.c      |  5 ++++
>  include/configs/dra7xx_evm_android.h | 14 +++++++++++
>  5 files changed, 70 insertions(+)
>  create mode 100644 board/ti/dra7xx/fastboot.c
>
> diff --git a/board/ti/dra7xx/Makefile b/board/ti/dra7xx/Makefile
> index 434e8d1..ae730ae 100644
> --- a/board/ti/dra7xx/Makefile
> +++ b/board/ti/dra7xx/Makefile
> @@ -6,3 +6,4 @@
>  #
>
>  obj-y  := evm.o
> +obj-$(CONFIG_CMD_FASTBOOT) += fastboot.o
> diff --git a/board/ti/dra7xx/fastboot.c b/board/ti/dra7xx/fastboot.c
> new file mode 100644
> index 0000000..e05010d
> --- /dev/null
> +++ b/board/ti/dra7xx/fastboot.c
> @@ -0,0 +1,45 @@
> +/*
> + * (C) Copyright 2013
> + * Texas Instruments Incorporated, <www.ti.com>
> + *
> + * Lokesh Vutla <lokeshvutla@ti.com>
> + *
> + * Based on previous work by:
> + * Aneesh V       <aneesh@ti.com>
> + * Steve Sakoman  <steve@sakoman.com>
> + *
> + * SPDX-License-Identifier:    GPL-2.0+
> + */
> +#include <common.h>
> +#include <asm/io.h>
> +#include <asm-generic/gpio.h>
> +#include <config.h>
> +
> +
> +int fb_set_reboot_flag(void)
> +{
> +       /* clear all reset events */
> +       __raw_writel(DRA7XX_PRM_RSTST_CLR, PRM_RSTST);
> +       strncpy((char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE, "bootloader",
> +               DRA7XX_REBOOT_REASON_SIZE - 1);
> +       *(((char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE) +
> +                               DRA7XX_REBOOT_REASON_SIZE - 1) = '\0';
> +       /* trigger warm reset */
> +       __raw_writel(DRA7XX_PRM_RSTCTRL_RESET_WARM_BIT, DRA7XX_PRM_RSTCTRL);

Does this reset immediately? If so, then you will fail to send a
response to the client.

> +
> +       return 0;
> +}
> +
> +int fb_check_reboot_flag(void)
> +{
> +       /* Check if we are coming from a warm reset */
> +       if (__raw_readl(DRA7XX_PRM_RSTST) & DRA7XX_PRM_RSTST_RESET_WARM_BIT)
> +               if (!strncmp((const char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE,
> +                               "bootloader", DRA7XX_REBOOT_REASON_SIZE)) {
> +                       strncpy((char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE, "",
> +                               DRA7XX_REBOOT_REASON_SIZE);
> +                       return 0;
> +               }
> +
> +       return 1;
> +}
> diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
> index 48199bf..00791be 100644
> --- a/common/cmd_bootm.c
> +++ b/common/cmd_bootm.c
> @@ -729,6 +729,11 @@ int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>  {
>         int ret;
>
> +#if defined(CONFIG_CMD_FASTBOOT)
> +       if (!fb_check_reboot_flag())
> +               do_fastboot(cmdtp, flag, argc, argv);
> +#endif

Part of the booti command? First, booti is for arm64 Image files. How
does this work for you?

More importantly, this should not be tied into any bootX command. It
should probably be done in a boot script. If the flag is set, the
board code can set some environment variable. Then the boot script can
run the fastboot command if the env var is set.

> +
>         /* Consume 'booti' */
>         argc--; argv++;
>
> diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
> index 206b6d1..a450357 100644
> --- a/drivers/usb/gadget/f_fastboot.c
> +++ b/drivers/usb/gadget/f_fastboot.c
> @@ -332,6 +332,11 @@ int __weak fb_set_reboot_flag(void)
>         return -ENOSYS;
>  }
>
> +int __weak fb_check_reboot_flag(void)
> +{
> +       return -ENOSYS;
> +}
> +
>  static void cb_reboot(struct usb_ep *ep, struct usb_request *req)
>  {
>         char *cmd = req->buf;
> diff --git a/include/configs/dra7xx_evm_android.h b/include/configs/dra7xx_evm_android.h
> index 68e7eec..2038e00 100644
> --- a/include/configs/dra7xx_evm_android.h
> +++ b/include/configs/dra7xx_evm_android.h
> @@ -310,4 +310,18 @@
>  #endif
>  #endif  /* NOR support */
>
> +#define DRA7XX_PUBLIC_SAR_RAM_1_FREE           (0x4AE26000 + 0xFE0)
> +#define DRA7XX_PRM_RSTCTRL_RESET_WARM_BIT      (1<<0)
> +#define DRA7XX_PRM_RSTST_RESET_WARM_BIT        (1<<1)
> +#define DRA7XX_PRM_RSTST                       0x4AE07D04
> +#define DRA7XX_PRM_RSTCTRL                     0x4AE07D00
> +#define DRA7XX_PRM_RSTST_CLR                   0xfff
> +#define DRA7XX_REBOOT_REASON_SIZE              0xf
> +
> +#define CONFIG_BOARD_MACH_TYPE                  4070

You shouldn't need this anymore, right?

> +#define MEMORY_BASE                             0x80000000
> +#define CONFIG_ADDR_ATAGS                       (MEMORY_BASE + 0x100)

Or this?

> +#define CONFIG_ADDR_DOWNLOAD                    (MEMORY_BASE + 0x02000000)
> +#define DEVICE_TREE                             0x82f80000

Use fdt_addr_r env var instead?

Rob

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support
  2015-03-03 11:10 [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support Dileep Katta
                   ` (3 preceding siblings ...)
  2015-03-03 11:53 ` [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support Dileep Katta
@ 2015-03-04 13:18 ` Lukasz Majewski
  2015-03-04 16:52 ` Tom Rini
  5 siblings, 0 replies; 49+ messages in thread
From: Lukasz Majewski @ 2015-03-04 13:18 UTC (permalink / raw)
  To: u-boot

Hi Dileep,

> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> ---
>  arch/arm/cpu/armv7/omap5/Kconfig     |   5 +
>  board/ti/dra7xx/Kconfig              |  13 ++
>  board/ti/dra7xx/MAINTAINERS          |   2 +
>  configs/dra7xx_evm_android_defconfig |   5 +
>  include/configs/dra7xx_evm_android.h | 313
> +++++++++++++++++++++++++++++++++++ 5 files changed, 338 insertions(+)
>  create mode 100644 configs/dra7xx_evm_android_defconfig
>  create mode 100644 include/configs/dra7xx_evm_android.h
> 
> diff --git a/arch/arm/cpu/armv7/omap5/Kconfig
> b/arch/arm/cpu/armv7/omap5/Kconfig index aca862d..d8e9b2d 100644
> --- a/arch/arm/cpu/armv7/omap5/Kconfig
> +++ b/arch/arm/cpu/armv7/omap5/Kconfig
> @@ -12,6 +12,11 @@ config TARGET_OMAP5_UEVM
>  config TARGET_DRA7XX_EVM
>  	bool "TI DRA7XX"
>  
> +config TARGET_DRA7XX_EVM_ANDROID
> +	bool "TI DRA7XX ANDROID"
> +	---help---
> +	TI DRA7XX build for Android. Enables Fastboot.
> +
>  config TARGET_BEAGLE_X15
>  	bool "BeagleBoard X15"
>  
> diff --git a/board/ti/dra7xx/Kconfig b/board/ti/dra7xx/Kconfig
> index 3bbd866..6837998 100644
> --- a/board/ti/dra7xx/Kconfig
> +++ b/board/ti/dra7xx/Kconfig
> @@ -10,3 +10,16 @@ config SYS_CONFIG_NAME
>  	default "dra7xx_evm"
>  
>  endif
> +
> +if TARGET_DRA7XX_EVM_ANDROID
> +

No needed blank line

> +config SYS_BOARD
> +	default "dra7xx"
> +
> +config SYS_VENDOR
> +	default "ti"
> +
> +config SYS_CONFIG_NAME
> +	default "dra7xx_evm_android"
> +

ditto

> +endif
> diff --git a/board/ti/dra7xx/MAINTAINERS b/board/ti/dra7xx/MAINTAINERS
> index 5ec6769..efd4f81 100644
> --- a/board/ti/dra7xx/MAINTAINERS
> +++ b/board/ti/dra7xx/MAINTAINERS
> @@ -6,3 +6,5 @@ F:	include/configs/dra7xx_evm.h
>  F:	configs/dra7xx_evm_defconfig
>  F:	configs/dra7xx_evm_qspiboot_defconfig
>  F:	configs/dra7xx_evm_uart3_defconfig
> +F:	include/configs/dra7xx_evm_android.h
> +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..64ae4b3
> --- /dev/null
> +++ b/configs/dra7xx_evm_android_defconfig
> @@ -0,0 +1,5 @@
> +CONFIG_SPL=y
> +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=1"
> ++S:CONFIG_ARM=y
> ++S:CONFIG_OMAP54XX=y
> ++S:CONFIG_TARGET_DRA7XX_EVM_ANDROID=y
> diff --git a/include/configs/dra7xx_evm_android.h
> b/include/configs/dra7xx_evm_android.h new file mode 100644
> index 0000000..68e7eec
> --- /dev/null
> +++ b/include/configs/dra7xx_evm_android.h
> @@ -0,0 +1,313 @@
> +/*
> + * (C) Copyright 2013
> + * Texas Instruments Incorporated.
> + * Lokesh Vutla	  <lokeshvutla@ti.com>
> + *
> + * Configuration settings for the TI DRA7XX board.
> + * See ti_omap5_common.h for omap5 common settings.
> + *
> + * SPDX-License-Identifier:	GPL-2.0+
> + */
> +
> +#ifndef __CONFIG_DRA7XX_EVM_ANDROID_H
> +#define __CONFIG_DRA7XX_EVM_ANDROID_H
> +
> +#define CONFIG_DRA7XX
> +#define CONFIG_BOARD_EARLY_INIT_F
> +
> +#ifndef CONFIG_QSPI_BOOT
> +/* MMC ENV related defines */
> +#define CONFIG_ENV_IS_IN_MMC
> +#define CONFIG_SYS_MMC_ENV_DEV		1	/* SLOT2:
> eMMC(1) */ +#define CONFIG_ENV_SIZE			(128 << 10)
				
				Please use SZ_1K instead of << 10
> +#define CONFIG_ENV_OFFSET		0xE0000
> +#define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET +
> CONFIG_ENV_SIZE) +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
> +#endif
> +#define CONFIG_CMD_SAVEENV
> +
> +#if (CONFIG_CONS_INDEX == 1)
> +#define CONSOLEDEV			"ttyO0"
> +#elif (CONFIG_CONS_INDEX == 3)
> +#define CONSOLEDEV			"ttyO2"
> +#endif
> +#define CONFIG_SYS_NS16550_COM1		UART1_BASE	/*
> Base EVM has UART0 */ +#define CONFIG_SYS_NS16550_COM2
> UART2_BASE	/* UART2 */ +#define
> CONFIG_SYS_NS16550_COM3		UART3_BASE	/* UART3 */
> +#define CONFIG_BAUDRATE			115200 +
> +#define CONFIG_SYS_OMAP_ABE_SYSCK
> +
> +/* Define the default GPT table for eMMC */
> +#define PARTS_DEFAULT \
> +	"uuid_disk=${uuid_gpt_disk};" \
> +	"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
> +
> +#ifdef CONFIG_NAND
> +/* Define NAND information. */
> +#define NANDARGS \
> +	"mtdids=" MTDIDS_DEFAULT "\0" \
> +	"mtdparts=" MTDPARTS_DEFAULT "\0" \
> +	"nandargs=setenv bootargs console=${console} " \
> +		"${optargs} " \
> +		"root=${nandroot} " \
> +		"rootfstype=${nandrootfstype}\0" \
> +	"nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \
> +	"nandrootfstype=ubifs rootwait=1\0" \
> +	"nandboot=echo Booting from nand ...; " \
> +		"run nandargs; " \
> +		"nand read ${fdtaddr} NAND.u-boot-spl-os; " \
> +		"nand read ${loadaddr} NAND.kernel; " \
> +		"bootz ${loadaddr} - ${fdtaddr}\0"
> +#define NANDBOOT			"run nandboot; "
> +#endif
> +
> +#define DFU_ALT_INFO_MMC \
> +	"dfu_alt_info_mmc=" \
> +	"boot part 0 1;" \
> +	"rootfs part 0 2;" \
> +	"MLO fat 0 1;" \
> +	"spl-os-args fat 0 1;" \
> +	"spl-os-image fat 0 1;" \
> +	"u-boot.img fat 0 1;" \
> +	"uEnv.txt fat 0 1\0"
> +
> +#define DFU_ALT_INFO_EMMC \
> +	"dfu_alt_info_emmc=" \
> +	"MLO raw 0x100 0x100 mmcpart 0;" \
> +	"u-boot.img raw 0x300 0x1000 mmcpart 0\0"
> +
> +#define DFU_ALT_INFO_RAM \
> +	"dfu_alt_info_ram=" \
> +	"kernel ram 0x80200000 0x4000000;" \
> +	"fdt ram 0x80f80000 0x80000;" \
> +	"ramdisk ram 0x81000000 0x4000000\0"
> +
> +#define DFUARGS \
> +	"dfu_bufsiz=0x10000\0" \
> +	DFU_ALT_INFO_MMC \
> +	DFU_ALT_INFO_EMMC \
> +	DFU_ALT_INFO_RAM
> +
> +/* 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
> +
> +#include <configs/ti_omap5_common.h>
> +
> +/* Enhance our eMMC support / experience. */
> +#define CONFIG_CMD_GPT
> +#define CONFIG_EFI_PARTITION
> +#define CONFIG_PARTITION_UUIDS
> +#define CONFIG_CMD_PART
> +
> +/* CPSW Ethernet */
> +#define CONFIG_CMD_NET			/* 'bootp' and 'tftp'
> */ +#define CONFIG_CMD_DHCP
> +#define CONFIG_BOOTP_DNS		/* Configurable parts of
> CMD_DHCP */ +#define CONFIG_BOOTP_DNS2
> +#define CONFIG_BOOTP_SEND_HOSTNAME
> +#define CONFIG_BOOTP_GATEWAY
> +#define CONFIG_BOOTP_SUBNETMASK
> +#define CONFIG_NET_RETRY_COUNT		10
> +#define CONFIG_CMD_PING
> +#define CONFIG_CMD_MII
> +#define CONFIG_DRIVER_TI_CPSW		/* Driver for IP block
> */ +#define CONFIG_MII			/* Required in
> net/eth.c */ +#define CONFIG_PHY_GIGE			/*
> per-board part of CPSW */ +#define CONFIG_PHYLIB
> +
> +/* SPI */
> +#undef	CONFIG_OMAP3_SPI
> +#define CONFIG_TI_QSPI
> +#define CONFIG_SPI_FLASH
> +#define CONFIG_SPI_FLASH_SPANSION
> +#define CONFIG_CMD_SF
> +#define CONFIG_CMD_SPI
> +#define CONFIG_SPI_FLASH_BAR
> +#define CONFIG_TI_SPI_MMAP
> +#define CONFIG_SF_DEFAULT_SPEED                48000000
> +#define CONFIG_DEFAULT_SPI_MODE                SPI_MODE_3
> +
> +/*
> + * Default to using SPI for environment, etc.
> + * 0x000000 - 0x010000 : QSPI.SPL (64KiB)
> + * 0x010000 - 0x020000 : QSPI.SPL.backup1 (64KiB)
> + * 0x020000 - 0x030000 : QSPI.SPL.backup2 (64KiB)
> + * 0x030000 - 0x040000 : QSPI.SPL.backup3 (64KiB)
> + * 0x040000 - 0x140000 : QSPI.u-boot (1MiB)
> + * 0x140000 - 0x1C0000 : QSPI.u-boot-spl-os (512KiB)
> + * 0x1C0000 - 0x1D0000 : QSPI.u-boot-env (64KiB)
> + * 0x1D0000 - 0x1E0000 : QSPI.u-boot-env.backup1 (64KiB)
> + * 0x1E0000 - 0x9E0000 : QSPI.kernel (8MiB)
> + * 0x9E0000 - 0x2000000 : USERLAND
> + */
> +#define CONFIG_SYS_SPI_KERNEL_OFFS	0x1E0000
> +#define CONFIG_SYS_SPI_ARGS_OFFS	0x140000
> +#define CONFIG_SYS_SPI_ARGS_SIZE	0x80000
> +#if defined(CONFIG_QSPI_BOOT)
> +/* In SPL, use the environment and discard MMC support for space. */
> +#ifdef CONFIG_SPL_BUILD
> +#undef CONFIG_SPL_MMC_SUPPORT
> +#undef CONFIG_SPL_MAX_SIZE
> +#define CONFIG_SPL_MAX_SIZE             (64 << 10) /* 64 KiB */
					          SZ_1K
			Please use globally.
> +#endif
> +#define CONFIG_SPL_ENV_SUPPORT
> +#define CONFIG_ENV_IS_IN_SPI_FLASH
> +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
> +#define CONFIG_ENV_SPI_MAX_HZ           CONFIG_SF_DEFAULT_SPEED
> +#define CONFIG_ENV_SIZE			(64 << 10)
> +#define CONFIG_ENV_SECT_SIZE		(64 << 10) /* 64 KB
> sectors */ +#define CONFIG_ENV_OFFSET		0x1C0000
> +#define CONFIG_ENV_OFFSET_REDUND	0x1D0000
> +#endif
> +
> +/* SPI SPL */
> +#define CONFIG_SPL_SPI_SUPPORT
> +#define CONFIG_SPL_DMA_SUPPORT
> +#ifdef CONFIG_SPL_BUILD
> +#define CONFIG_TI_EDMA
> +#endif
> +#define CONFIG_SPL_SPI_LOAD
> +#define CONFIG_SPL_SPI_FLASH_SUPPORT
> +#define CONFIG_SPL_SPI_BUS             0
> +#define CONFIG_SPL_SPI_CS              0
> +#define CONFIG_SYS_SPI_U_BOOT_OFFS     0x80000
> +
> +#define CONFIG_SUPPORT_EMMC_BOOT
> +
> +/* USB xHCI HOST */
> +#define CONFIG_CMD_USB
> +#define CONFIG_USB_HOST
> +#define CONFIG_USB_XHCI
> +#define CONFIG_USB_XHCI_OMAP
> +#define CONFIG_USB_STORAGE
> +#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
> +
> +#define CONFIG_OMAP_USB_PHY
> +#define CONFIG_OMAP_USB2PHY2_HOST
> +
> +/* USB GADGET */
> +#define CONFIG_USB_DWC3_PHY_OMAP
> +#define CONFIG_USB_DWC3_OMAP
> +#define CONFIG_USB_DWC3
> +#define CONFIG_USB_DWC3_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"
> +#define CONFIG_G_DNL_VENDOR_NUM 0x0451
> +#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
> +#define CONFIG_USB_GADGET_DUALSPEED
> +
> +/* USB Device Firmware Update support */
> +#define CONFIG_DFU_FUNCTION
> +#define CONFIG_DFU_RAM
> +#define CONFIG_CMD_DFU
> +
> +#define CONFIG_DFU_MMC
> +#define CONFIG_DFU_RAM
> +
> +/* SATA */
> +#define CONFIG_BOARD_LATE_INIT
> +#define CONFIG_CMD_SCSI
> +#define CONFIG_LIBATA
> +#define CONFIG_SCSI_AHCI
> +#define CONFIG_SCSI_AHCI_PLAT
> +#define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
> +#define CONFIG_SYS_SCSI_MAX_LUN		1
> +#define CONFIG_SYS_SCSI_MAX_DEVICE
> (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
> +
> CONFIG_SYS_SCSI_MAX_LUN) +
> +/* NAND support */
> +#ifdef CONFIG_NAND
> +/* NAND: device related configs */
> +#define CONFIG_SYS_NAND_PAGE_SIZE	2048
> +#define CONFIG_SYS_NAND_OOBSIZE		64
> +#define CONFIG_SYS_NAND_BLOCK_SIZE	(128*1024)
> +#define CONFIG_SYS_NAND_BUSWIDTH_16BIT
> +#define CONFIG_SYS_NAND_PAGE_COUNT
> (CONFIG_SYS_NAND_BLOCK_SIZE / \
> +					 CONFIG_SYS_NAND_PAGE_SIZE)
> +#define CONFIG_SYS_NAND_5_ADDR_CYCLE
> +/* NAND: driver related configs */
> +#define CONFIG_NAND_OMAP_GPMC
> +#define CONFIG_NAND_OMAP_ELM
> +#define CONFIG_SYS_NAND_ONFI_DETECTION
> +#define CONFIG_NAND_OMAP_ECCSCHEME	OMAP_ECC_BCH8_CODE_HW
> +#define CONFIG_SYS_NAND_BAD_BLOCK_POS	NAND_LARGE_BADBLOCK_POS
> +#define CONFIG_SYS_NAND_ECCPOS		{ 2, 3, 4, 5, 6, 7, 8,
> 9, \
> +					 10, 11, 12, 13, 14, 15, 16,
> 17, \
> +					 18, 19, 20, 21, 22, 23, 24,
> 25, \
> +					 26, 27, 28, 29, 30, 31, 32,
> 33, \
> +					 34, 35, 36, 37, 38, 39, 40,
> 41, \
> +					 42, 43, 44, 45, 46, 47, 48,
> 49, \
> +					 50, 51, 52, 53, 54, 55, 56,
> 57, } +#define CONFIG_SYS_NAND_ECCSIZE		512
> +#define CONFIG_SYS_NAND_ECCBYTES	14
> +#define MTDIDS_DEFAULT			"nand0=nand.0"
> +#define MTDPARTS_DEFAULT		"mtdparts=nand.0:" \
> +					"128k(NAND.SPL)," \
> +					"128k(NAND.SPL.backup1)," \
> +					"128k(NAND.SPL.backup2)," \
> +					"128k(NAND.SPL.backup3)," \
> +					"256k(NAND.u-boot-spl-os)," \
> +					"1m(NAND.u-boot)," \
> +					"128k(NAND.u-boot-env)," \
> +					"128k(NAND.u-boot-env.backup1),"
> \
> +					"8m(NAND.kernel)," \
> +					"-(NAND.file-system)"
> +#define CONFIG_SYS_NAND_U_BOOT_OFFS	0x000c0000
> +/* NAND: SPL related configs */
> +#ifdef CONFIG_SPL_NAND_SUPPORT
> +#define CONFIG_SPL_NAND_AM33XX_BCH
> +#endif
> +/* NAND: SPL falcon mode configs */
> +#ifdef CONFIG_SPL_OS_BOOT
> +#define CONFIG_CMD_SPL_NAND_OFS		0x00080000 /* os-boot
> params*/ +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS
> 0x00200000 /* kernel offset */ +#define
> CONFIG_CMD_SPL_WRITE_SIZE	0x2000 +#endif
> +#endif /* !CONFIG_NAND */
> +
> +/* Parallel NOR Support */
> +#if defined(CONFIG_NOR)
> +/* NOR: device related configs */
> +#define CONFIG_SYS_MAX_FLASH_SECT	512
> +#define CONFIG_SYS_FLASH_CFI_WIDTH	FLASH_CFI_16BIT
> +#define CONFIG_SYS_FLASH_SIZE		(64 * 1024 * 1024) /*
> 64 MB */ +/* #define CONFIG_INIT_IGNORE_ERROR */
> +#undef CONFIG_SYS_NO_FLASH
> +#define CONFIG_CMD_FLASH
> +#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
> +#define CONFIG_SYS_FLASH_PROTECTION
> +#define CONFIG_SYS_FLASH_CFI
> +#define CONFIG_FLASH_CFI_DRIVER
> +#define CONFIG_FLASH_CFI_MTD
> +#define CONFIG_SYS_MAX_FLASH_BANKS	1
> +#define CONFIG_SYS_FLASH_BASE		(0x08000000)
> +#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
> +/* Reduce SPL size by removing unlikey targets */
> +#ifdef CONFIG_NOR_BOOT
> +#define CONFIG_ENV_IS_IN_FLASH
> +#define CONFIG_ENV_SECT_SIZE		(128 * 1024)	/*
> 128 KiB */ +#define
> MTDIDS_DEFAULT			"nor0=physmap-flash.0" +#define
> MTDPARTS_DEFAULT		"mtdparts=physmap-flash.0:" \
> +					"1m(NOR.u-boot)," \
> +					"128k(NOR.u-boot-env)," \
> +					"128k(NOR.u-boot-env.backup1),"
> \
> +					"256k(NOR.u-boot-spl-os)," \
> +					"8m(NOR.kernel)," \
> +					"-(NOR.rootfs)"
> +#define CONFIG_ENV_OFFSET		0x00100000
> +#define CONFIG_ENV_OFFSET_REDUND	0x00120000
> +#endif
> +#endif  /* NOR support */
> +
> +#endif /* __CONFIG_DRA7XX_EVM_ANDROID_H */

Despite some minor comments,

Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-03 11:10 ` [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb Dileep Katta
@ 2015-03-04 13:19   ` Lukasz Majewski
  2015-03-04 17:05   ` Stegmaier, Angela
  1 sibling, 0 replies; 49+ messages in thread
From: Lukasz Majewski @ 2015-03-04 13:19 UTC (permalink / raw)
  To: u-boot

Hi Dileep,

> g_dnl_gadget_register() fails for dra7xx dwc3 gadget
> when running cmd_fastboot.
> Calling board_usb_init() fixes this.
> 
> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> ---
>  common/cmd_fastboot.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> index 346ab80..d7b8f6d 100644
> --- a/common/cmd_fastboot.c
> +++ b/common/cmd_fastboot.c
> @@ -10,11 +10,13 @@
>  #include <common.h>
>  #include <command.h>
>  #include <g_dnl.h>
> +#include <usb.h>
>  
>  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char
> *const argv[]) {
>  	int ret;
>  
> +	board_usb_init(0, USB_INIT_DEVICE);
>  	g_dnl_clear_detach();
>  	ret = g_dnl_register("usb_dnl_fastboot");
>  	if (ret)

Acked-by: Lukasz Majewski <l.majewski@samsung.com>

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v3 3/4] ARM: DRA7: Set serial number environment variable
  2015-03-03 11:10 ` [U-Boot] [PATCH v3 3/4] ARM: DRA7: Set serial number environment variable Dileep Katta
@ 2015-03-04 13:23   ` Lukasz Majewski
  2015-03-04 16:53   ` Tom Rini
  2015-03-07  7:00   ` Nishanth Menon
  2 siblings, 0 replies; 49+ messages in thread
From: Lukasz Majewski @ 2015-03-04 13:23 UTC (permalink / raw)
  To: u-boot

Hi Dileep,

> Adds the registers to get the serial number of dra7xx boards.
> Serial# environment variable will be set if not done already.
> This will be useful to show correct information in
> "fastboot devices" commands.
> 
> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> ---
>  arch/arm/cpu/armv7/omap5/prcm-regs.c |  2 ++
>  arch/arm/include/asm/omap_common.h   |  2 ++
>  board/ti/dra7xx/evm.c                | 11 +++++++++++
>  3 files changed, 15 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv7/omap5/prcm-regs.c
> b/arch/arm/cpu/armv7/omap5/prcm-regs.c index 0745d42..020a964 100644
> --- a/arch/arm/cpu/armv7/omap5/prcm-regs.c
> +++ b/arch/arm/cpu/armv7/omap5/prcm-regs.c
> @@ -440,6 +440,8 @@ struct omap_sys_ctrl_regs const dra7xx_ctrl = {
>  	.control_emif1_sdram_config_ext		= 0x4AE0C144,
>  	.control_emif2_sdram_config_ext		= 0x4AE0C148,
>  	.control_wkup_ldovbb_mpu_voltage_ctrl	= 0x4AE0C158,
> +	.control_std_fuse_die_id_3		= 0x4AE0C210,
> +	.control_std_fuse_prod_id_0		= 0x4AE0C214,
>  	.control_padconf_mode			= 0x4AE0C5A0,
>  	.control_xtal_oscillator		= 0x4AE0C5A4,
>  	.control_i2c_2				= 0x4AE0C5A8,
> diff --git a/arch/arm/include/asm/omap_common.h
> b/arch/arm/include/asm/omap_common.h index 323952f..b329803 100644
> --- a/arch/arm/include/asm/omap_common.h
> +++ b/arch/arm/include/asm/omap_common.h
> @@ -362,6 +362,8 @@ struct omap_sys_ctrl_regs {
>  	u32 control_core_control_io1;
>  	u32 control_core_control_io2;
>  	u32 control_id_code;
> +	u32 control_std_fuse_die_id_3;
> +	u32 control_std_fuse_prod_id_0;
>  	u32 control_std_fuse_opp_bgap;
>  	u32 control_ldosram_iva_voltage_ctrl;
>  	u32 control_ldosram_mpu_voltage_ctrl;
> diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
> index 6522241..e20d950 100644
> --- a/board/ti/dra7xx/evm.c
> +++ b/board/ti/dra7xx/evm.c
> @@ -88,10 +88,21 @@ int board_init(void)
>  int board_late_init(void)
>  {
>  #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
> +	char serialno[72];
> +	uint32_t serialno_lo, serialno_hi;
> +
>  	if (omap_revision() == DRA722_ES1_0)
>  		setenv("board_name", "dra72x");
>  	else
>  		setenv("board_name", "dra7xx");
> +
> +	if (!getenv("serial#")) {
> +		printf("serial# not set, setting...\n");
> +		serialno_lo =
> readl((*ctrl)->control_std_fuse_die_id_3);
> +		serialno_hi =
> readl((*ctrl)->control_std_fuse_prod_id_0);
> +		sprintf(serialno, "%08x%08x", serialno_hi,
> serialno_lo);
> +		setenv("serial#", serialno);
> +	}
>  #endif
>  	return 0;
>  }

Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v1 4/4] ARM: DRA7: fastboot: Implement reboot-bootloader command - Implemented fb_set_reboot_flag() for DRA7 - Defined a weak function, fb_check_reboot_flag() - Implemented for DRA7
  2015-03-03 11:10 ` [U-Boot] [PATCH v1 4/4] ARM: DRA7: fastboot: Implement reboot-bootloader command - Implemented fb_set_reboot_flag() for DRA7 - Defined a weak function, fb_check_reboot_flag() - Implemented for DRA7 Dileep Katta
  2015-03-03 14:15   ` Rob Herring
@ 2015-03-04 13:31   ` Lukasz Majewski
  1 sibling, 0 replies; 49+ messages in thread
From: Lukasz Majewski @ 2015-03-04 13:31 UTC (permalink / raw)
  To: u-boot

Hi Dileep,

> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> ---
>  board/ti/dra7xx/Makefile             |  1 +
>  board/ti/dra7xx/fastboot.c           | 45
> ++++++++++++++++++++++++++++++++++++
> common/cmd_bootm.c                   |  5 ++++
> drivers/usb/gadget/f_fastboot.c      |  5 ++++
> include/configs/dra7xx_evm_android.h | 14 +++++++++++ 5 files
> changed, 70 insertions(+) create mode 100644
> board/ti/dra7xx/fastboot.c
> 
> diff --git a/board/ti/dra7xx/Makefile b/board/ti/dra7xx/Makefile
> index 434e8d1..ae730ae 100644
> --- a/board/ti/dra7xx/Makefile
> +++ b/board/ti/dra7xx/Makefile
> @@ -6,3 +6,4 @@
>  #
>  
>  obj-y	:= evm.o
> +obj-$(CONFIG_CMD_FASTBOOT) += fastboot.o
> diff --git a/board/ti/dra7xx/fastboot.c b/board/ti/dra7xx/fastboot.c
> new file mode 100644
> index 0000000..e05010d
> --- /dev/null
> +++ b/board/ti/dra7xx/fastboot.c
> @@ -0,0 +1,45 @@
> +/*
> + * (C) Copyright 2013
> + * Texas Instruments Incorporated, <www.ti.com>
> + *
> + * Lokesh Vutla <lokeshvutla@ti.com>
> + *
> + * Based on previous work by:
> + * Aneesh V       <aneesh@ti.com>
> + * Steve Sakoman  <steve@sakoman.com>
> + *
> + * SPDX-License-Identifier:	GPL-2.0+
> + */
> +#include <common.h>
> +#include <asm/io.h>
> +#include <asm-generic/gpio.h>
> +#include <config.h>
> +
> +
> +int fb_set_reboot_flag(void)
> +{
> +	/* clear all reset events */
> +	__raw_writel(DRA7XX_PRM_RSTST_CLR, PRM_RSTST);
> +	strncpy((char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE, "bootloader",
> +		DRA7XX_REBOOT_REASON_SIZE - 1);
> +	*(((char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE) +
> +				DRA7XX_REBOOT_REASON_SIZE - 1) =
> '\0';
> +	/* trigger warm reset */
> +	__raw_writel(DRA7XX_PRM_RSTCTRL_RESET_WARM_BIT,
> DRA7XX_PRM_RSTCTRL); +
> +	return 0;
> +}
> +
> +int fb_check_reboot_flag(void)
> +{
> +	/* Check if we are coming from a warm reset */
> +	if (__raw_readl(DRA7XX_PRM_RSTST) &
> DRA7XX_PRM_RSTST_RESET_WARM_BIT)
> +		if (!strncmp((const char
> *)DRA7XX_PUBLIC_SAR_RAM_1_FREE,
> +				"bootloader",
> DRA7XX_REBOOT_REASON_SIZE)) {
> +			strncpy((char
> *)DRA7XX_PUBLIC_SAR_RAM_1_FREE, "",
> +				DRA7XX_REBOOT_REASON_SIZE);
> +			return 0;
> +		}
> +
> +	return 1;
> +}
> diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
> index 48199bf..00791be 100644
> --- a/common/cmd_bootm.c
> +++ b/common/cmd_bootm.c
> @@ -729,6 +729,11 @@ int do_booti(cmd_tbl_t *cmdtp, int flag, int
> argc, char * const argv[]) {
>  	int ret;
>  
> +#if defined(CONFIG_CMD_FASTBOOT)
> +	if (!fb_check_reboot_flag())
> +		do_fastboot(cmdtp, flag, argc, argv);
> +#endif
> +
>  	/* Consume 'booti' */
>  	argc--; argv++;
>  
> diff --git a/drivers/usb/gadget/f_fastboot.c
> b/drivers/usb/gadget/f_fastboot.c index 206b6d1..a450357 100644
> --- a/drivers/usb/gadget/f_fastboot.c
> +++ b/drivers/usb/gadget/f_fastboot.c
> @@ -332,6 +332,11 @@ int __weak fb_set_reboot_flag(void)
>  	return -ENOSYS;
>  }
>  
> +int __weak fb_check_reboot_flag(void)
> +{
> +	return -ENOSYS;
> +}
> +
>  static void cb_reboot(struct usb_ep *ep, struct usb_request *req)
>  {
>  	char *cmd = req->buf;
> diff --git a/include/configs/dra7xx_evm_android.h
> b/include/configs/dra7xx_evm_android.h index 68e7eec..2038e00 100644
> --- a/include/configs/dra7xx_evm_android.h
> +++ b/include/configs/dra7xx_evm_android.h
> @@ -310,4 +310,18 @@
>  #endif
>  #endif  /* NOR support */
>  
> +#define DRA7XX_PUBLIC_SAR_RAM_1_FREE           (0x4AE26000 + 0xFE0)
> +#define DRA7XX_PRM_RSTCTRL_RESET_WARM_BIT      (1<<0)
> +#define DRA7XX_PRM_RSTST_RESET_WARM_BIT        (1<<1)
> +#define DRA7XX_PRM_RSTST                       0x4AE07D04
> +#define DRA7XX_PRM_RSTCTRL                     0x4AE07D00
> +#define DRA7XX_PRM_RSTST_CLR                   0xfff
> +#define DRA7XX_REBOOT_REASON_SIZE              0xf
> +
> +#define CONFIG_BOARD_MACH_TYPE                  4070
> +#define MEMORY_BASE                             0x80000000
> +#define CONFIG_ADDR_ATAGS                       (MEMORY_BASE + 0x100)
> +#define CONFIG_ADDR_DOWNLOAD                    (MEMORY_BASE +
> 0x02000000) +#define DEVICE_TREE
> 0x82f80000 +
>  #endif /* __CONFIG_DRA7XX_EVM_ANDROID_H */

Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support
  2015-03-03 11:10 [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support Dileep Katta
                   ` (4 preceding siblings ...)
  2015-03-04 13:18 ` Lukasz Majewski
@ 2015-03-04 16:52 ` Tom Rini
  2015-03-12  6:31   ` Dileep Katta
  5 siblings, 1 reply; 49+ messages in thread
From: Tom Rini @ 2015-03-04 16:52 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 03, 2015 at 04:40:41PM +0530, Dileep Katta wrote:

> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> ---
>  arch/arm/cpu/armv7/omap5/Kconfig     |   5 +
>  board/ti/dra7xx/Kconfig              |  13 ++
>  board/ti/dra7xx/MAINTAINERS          |   2 +
>  configs/dra7xx_evm_android_defconfig |   5 +
>  include/configs/dra7xx_evm_android.h | 313 +++++++++++++++++++++++++++++++++++
>  5 files changed, 338 insertions(+)
>  create mode 100644 configs/dra7xx_evm_android_defconfig
>  create mode 100644 include/configs/dra7xx_evm_android.h

I _really_ don't like how we're duplicating large hunks of dra7xx_evm.h.
The first question is, what parts of this are not appropriate to just do
in dra7xx_evm.h directly?  And the second question would be, which of
those cannot simply be done via Kconfig choices.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150304/922eae41/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v3 3/4] ARM: DRA7: Set serial number environment variable
  2015-03-03 11:10 ` [U-Boot] [PATCH v3 3/4] ARM: DRA7: Set serial number environment variable Dileep Katta
  2015-03-04 13:23   ` Lukasz Majewski
@ 2015-03-04 16:53   ` Tom Rini
  2015-03-07  7:00   ` Nishanth Menon
  2 siblings, 0 replies; 49+ messages in thread
From: Tom Rini @ 2015-03-04 16:53 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 03, 2015 at 04:40:43PM +0530, Dileep Katta wrote:

> Adds the registers to get the serial number of dra7xx boards.
> Serial# environment variable will be set if not done already.
> This will be useful to show correct information in
> "fastboot devices" commands.
> 
> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>

I wish we could do this a bit more generically but...

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150304/03b57710/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v1 4/4] ARM: DRA7: fastboot: Implement reboot-bootloader command - Implemented fb_set_reboot_flag() for DRA7 - Defined a weak function, fb_check_reboot_flag() - Implemented for DRA7
  2015-03-03 14:15   ` Rob Herring
@ 2015-03-04 16:57     ` Tom Rini
  0 siblings, 0 replies; 49+ messages in thread
From: Tom Rini @ 2015-03-04 16:57 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 03, 2015 at 08:15:56AM -0600, Rob Herring wrote:
> On Tue, Mar 3, 2015 at 5:10 AM, Dileep Katta <dileep.katta@linaro.org> wrote:
> > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>

You need a full commit message as I don't really understand what this is
supposed to be doing or why it's needed.

> > ---
> >  board/ti/dra7xx/Makefile             |  1 +
> >  board/ti/dra7xx/fastboot.c           | 45 ++++++++++++++++++++++++++++++++++++
> >  common/cmd_bootm.c                   |  5 ++++
> >  drivers/usb/gadget/f_fastboot.c      |  5 ++++
> >  include/configs/dra7xx_evm_android.h | 14 +++++++++++
> >  5 files changed, 70 insertions(+)
> >  create mode 100644 board/ti/dra7xx/fastboot.c
> >
> > diff --git a/board/ti/dra7xx/Makefile b/board/ti/dra7xx/Makefile
> > index 434e8d1..ae730ae 100644
> > --- a/board/ti/dra7xx/Makefile
> > +++ b/board/ti/dra7xx/Makefile
> > @@ -6,3 +6,4 @@
> >  #
> >
> >  obj-y  := evm.o
> > +obj-$(CONFIG_CMD_FASTBOOT) += fastboot.o
> > diff --git a/board/ti/dra7xx/fastboot.c b/board/ti/dra7xx/fastboot.c
> > new file mode 100644
> > index 0000000..e05010d
> > --- /dev/null
> > +++ b/board/ti/dra7xx/fastboot.c
> > @@ -0,0 +1,45 @@
> > +/*
> > + * (C) Copyright 2013
> > + * Texas Instruments Incorporated, <www.ti.com>
> > + *
> > + * Lokesh Vutla <lokeshvutla@ti.com>
> > + *
> > + * Based on previous work by:
> > + * Aneesh V       <aneesh@ti.com>
> > + * Steve Sakoman  <steve@sakoman.com>
> > + *
> > + * SPDX-License-Identifier:    GPL-2.0+
> > + */
> > +#include <common.h>
> > +#include <asm/io.h>
> > +#include <asm-generic/gpio.h>
> > +#include <config.h>
> > +
> > +
> > +int fb_set_reboot_flag(void)
> > +{
> > +       /* clear all reset events */
> > +       __raw_writel(DRA7XX_PRM_RSTST_CLR, PRM_RSTST);
> > +       strncpy((char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE, "bootloader",
> > +               DRA7XX_REBOOT_REASON_SIZE - 1);
> > +       *(((char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE) +
> > +                               DRA7XX_REBOOT_REASON_SIZE - 1) = '\0';
> > +       /* trigger warm reset */
> > +       __raw_writel(DRA7XX_PRM_RSTCTRL_RESET_WARM_BIT, DRA7XX_PRM_RSTCTRL);
> 
> Does this reset immediately? If so, then you will fail to send a
> response to the client.
> 
> > +
> > +       return 0;
> > +}
> > +
> > +int fb_check_reboot_flag(void)
> > +{
> > +       /* Check if we are coming from a warm reset */
> > +       if (__raw_readl(DRA7XX_PRM_RSTST) & DRA7XX_PRM_RSTST_RESET_WARM_BIT)
> > +               if (!strncmp((const char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE,
> > +                               "bootloader", DRA7XX_REBOOT_REASON_SIZE)) {
> > +                       strncpy((char *)DRA7XX_PUBLIC_SAR_RAM_1_FREE, "",
> > +                               DRA7XX_REBOOT_REASON_SIZE);
> > +                       return 0;
> > +               }
> > +
> > +       return 1;
> > +}
> > diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
> > index 48199bf..00791be 100644
> > --- a/common/cmd_bootm.c
> > +++ b/common/cmd_bootm.c
> > @@ -729,6 +729,11 @@ int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> >  {
> >         int ret;
> >
> > +#if defined(CONFIG_CMD_FASTBOOT)
> > +       if (!fb_check_reboot_flag())
> > +               do_fastboot(cmdtp, flag, argc, argv);
> > +#endif
> 
> Part of the booti command? First, booti is for arm64 Image files. How
> does this work for you?
> 
> More importantly, this should not be tied into any bootX command. It
> should probably be done in a boot script. If the flag is set, the
> board code can set some environment variable. Then the boot script can
> run the fastboot command if the env var is set.
> 
> > +
> >         /* Consume 'booti' */
> >         argc--; argv++;
> >
> > diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
> > index 206b6d1..a450357 100644
> > --- a/drivers/usb/gadget/f_fastboot.c
> > +++ b/drivers/usb/gadget/f_fastboot.c
> > @@ -332,6 +332,11 @@ int __weak fb_set_reboot_flag(void)
> >         return -ENOSYS;
> >  }
> >
> > +int __weak fb_check_reboot_flag(void)
> > +{
> > +       return -ENOSYS;
> > +}
> > +
> >  static void cb_reboot(struct usb_ep *ep, struct usb_request *req)
> >  {
> >         char *cmd = req->buf;
> > diff --git a/include/configs/dra7xx_evm_android.h b/include/configs/dra7xx_evm_android.h
> > index 68e7eec..2038e00 100644
> > --- a/include/configs/dra7xx_evm_android.h
> > +++ b/include/configs/dra7xx_evm_android.h
> > @@ -310,4 +310,18 @@
> >  #endif
> >  #endif  /* NOR support */
> >
> > +#define DRA7XX_PUBLIC_SAR_RAM_1_FREE           (0x4AE26000 + 0xFE0)
> > +#define DRA7XX_PRM_RSTCTRL_RESET_WARM_BIT      (1<<0)
> > +#define DRA7XX_PRM_RSTST_RESET_WARM_BIT        (1<<1)
> > +#define DRA7XX_PRM_RSTST                       0x4AE07D04
> > +#define DRA7XX_PRM_RSTCTRL                     0x4AE07D00
> > +#define DRA7XX_PRM_RSTST_CLR                   0xfff
> > +#define DRA7XX_REBOOT_REASON_SIZE              0xf

These defines, if really needed, need to end up somewhere under
arch/arm/include/asm/arch-omap5/ and the code using them somewhere under
arch/arm/cpu/armv7/omap-common/

> > +#define CONFIG_BOARD_MACH_TYPE                  4070
> 
> You shouldn't need this anymore, right?
> 
> > +#define MEMORY_BASE                             0x80000000
> > +#define CONFIG_ADDR_ATAGS                       (MEMORY_BASE + 0x100)
> 
> Or this?
> 
> > +#define CONFIG_ADDR_DOWNLOAD                    (MEMORY_BASE + 0x02000000)
> > +#define DEVICE_TREE                             0x82f80000
> 
> Use fdt_addr_r env var instead?

Yeah, this doesn't look right, nor genericially done for something I
imagine "everyone" doing fastboot would want to get at.

> 
> Rob
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150304/d432dbbe/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-03 11:10 ` [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb Dileep Katta
  2015-03-04 13:19   ` Lukasz Majewski
@ 2015-03-04 17:05   ` Stegmaier, Angela
  2015-03-04 18:29     ` Tom Rini
  1 sibling, 1 reply; 49+ messages in thread
From: Stegmaier, Angela @ 2015-03-04 17:05 UTC (permalink / raw)
  To: u-boot

Hi Dileep,

> -----Original Message-----
> From: Dileep Katta [mailto:dileep.katta at linaro.org]
> Sent: Tuesday, March 03, 2015 5:11 AM
> To: u-boot at lists.denx.de; robherring2 at gmail.com; Rini, Tom;
> rob.herring at linaro.org; srae at broadcom.com; l.majewski at samsung.com;
> Stegmaier, Angela
> Cc: Dileep Katta
> Subject: [U-Boot][PATCH v2 2/4] fastboot: call board_usb_init() to enable
> usb
> 
> g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running
> cmd_fastboot.
> Calling board_usb_init() fixes this.
> 
> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> ---
>  common/cmd_fastboot.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index
> 346ab80..d7b8f6d 100644
> --- a/common/cmd_fastboot.c
> +++ b/common/cmd_fastboot.c
> @@ -10,11 +10,13 @@
>  #include <common.h>
>  #include <command.h>
>  #include <g_dnl.h>
> +#include <usb.h>
> 
>  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const
> argv[])  {
>  	int ret;
> 
> +	board_usb_init(0, USB_INIT_DEVICE);

The controller index should be configurable. Also, should board_usb_cleanup be called at the end?

Thanks,
Angela

>  	g_dnl_clear_detach();
>  	ret = g_dnl_register("usb_dnl_fastboot");
>  	if (ret)
> --
> 1.8.3.2

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-04 17:05   ` Stegmaier, Angela
@ 2015-03-04 18:29     ` Tom Rini
  2015-03-04 19:06       ` Dileep Katta
  0 siblings, 1 reply; 49+ messages in thread
From: Tom Rini @ 2015-03-04 18:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 04, 2015 at 05:05:11PM +0000, Stegmaier, Angela wrote:
> Hi Dileep,
> 
> > -----Original Message-----
> > From: Dileep Katta [mailto:dileep.katta at linaro.org]
> > Sent: Tuesday, March 03, 2015 5:11 AM
> > To: u-boot at lists.denx.de; robherring2 at gmail.com; Rini, Tom;
> > rob.herring at linaro.org; srae at broadcom.com; l.majewski at samsung.com;
> > Stegmaier, Angela
> > Cc: Dileep Katta
> > Subject: [U-Boot][PATCH v2 2/4] fastboot: call board_usb_init() to enable
> > usb
> > 
> > g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running
> > cmd_fastboot.
> > Calling board_usb_init() fixes this.
> > 
> > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> > ---
> >  common/cmd_fastboot.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index
> > 346ab80..d7b8f6d 100644
> > --- a/common/cmd_fastboot.c
> > +++ b/common/cmd_fastboot.c
> > @@ -10,11 +10,13 @@
> >  #include <common.h>
> >  #include <command.h>
> >  #include <g_dnl.h>
> > +#include <usb.h>
> > 
> >  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const
> > argv[])  {
> >  	int ret;
> > 
> > +	board_usb_init(0, USB_INIT_DEVICE);
> 
> The controller index should be configurable. Also, should board_usb_cleanup be called at the end?

I _really_ _really_ want to see if we can modify things so that we don't
have to sprinkle ever gadget driver with a cleanup() and every gadget
too if we don't have to.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150304/78047300/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-04 18:29     ` Tom Rini
@ 2015-03-04 19:06       ` Dileep Katta
  2015-03-05 14:37         ` Tom Rini
  0 siblings, 1 reply; 49+ messages in thread
From: Dileep Katta @ 2015-03-04 19:06 UTC (permalink / raw)
  To: u-boot

On 4 March 2015 at 23:59, Tom Rini <trini@konsulko.com> wrote:

> On Wed, Mar 04, 2015 at 05:05:11PM +0000, Stegmaier, Angela wrote:
> > Hi Dileep,
> >
> > > -----Original Message-----
> > > From: Dileep Katta [mailto:dileep.katta at linaro.org]
> > > Sent: Tuesday, March 03, 2015 5:11 AM
> > > To: u-boot at lists.denx.de; robherring2 at gmail.com; Rini, Tom;
> > > rob.herring at linaro.org; srae at broadcom.com; l.majewski at samsung.com;
> > > Stegmaier, Angela
> > > Cc: Dileep Katta
> > > Subject: [U-Boot][PATCH v2 2/4] fastboot: call board_usb_init() to
> enable
> > > usb
> > >
> > > g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running
> > > cmd_fastboot.
> > > Calling board_usb_init() fixes this.
> > >
> > > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> > > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> > > ---
> > >  common/cmd_fastboot.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index
> > > 346ab80..d7b8f6d 100644
> > > --- a/common/cmd_fastboot.c
> > > +++ b/common/cmd_fastboot.c
> > > @@ -10,11 +10,13 @@
> > >  #include <common.h>
> > >  #include <command.h>
> > >  #include <g_dnl.h>
> > > +#include <usb.h>
> > >
> > >  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char
> *const
> > > argv[])  {
> > >     int ret;
> > >
> > > +   board_usb_init(0, USB_INIT_DEVICE);
> >
> > The controller index should be configurable. Also, should
> board_usb_cleanup be called at the end?
>
> I _really_ _really_ want to see if we can modify things so that we don't
> have to sprinkle ever gadget driver with a cleanup() and every gadget
> too if we don't have to.  Thanks!
>
Most of the boards have board_usb_cleanup() as just a stub. For some, the
function is not present, and adding board_usb_cleanup() here breaks the
build for others with fastboot enabled.

>
> --
> Tom
>
Regards, Dileep

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-04 19:06       ` Dileep Katta
@ 2015-03-05 14:37         ` Tom Rini
  2015-03-12  6:36           ` Dileep Katta
  0 siblings, 1 reply; 49+ messages in thread
From: Tom Rini @ 2015-03-05 14:37 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 05, 2015 at 12:36:57AM +0530, Dileep Katta wrote:
> On 4 March 2015 at 23:59, Tom Rini <trini@konsulko.com> wrote:
> 
> > On Wed, Mar 04, 2015 at 05:05:11PM +0000, Stegmaier, Angela wrote:
> > > Hi Dileep,
> > >
> > > > -----Original Message-----
> > > > From: Dileep Katta [mailto:dileep.katta at linaro.org]
> > > > Sent: Tuesday, March 03, 2015 5:11 AM
> > > > To: u-boot at lists.denx.de; robherring2 at gmail.com; Rini, Tom;
> > > > rob.herring at linaro.org; srae at broadcom.com; l.majewski at samsung.com;
> > > > Stegmaier, Angela
> > > > Cc: Dileep Katta
> > > > Subject: [U-Boot][PATCH v2 2/4] fastboot: call board_usb_init() to
> > enable
> > > > usb
> > > >
> > > > g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running
> > > > cmd_fastboot.
> > > > Calling board_usb_init() fixes this.
> > > >
> > > > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> > > > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> > > > ---
> > > >  common/cmd_fastboot.c | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index
> > > > 346ab80..d7b8f6d 100644
> > > > --- a/common/cmd_fastboot.c
> > > > +++ b/common/cmd_fastboot.c
> > > > @@ -10,11 +10,13 @@
> > > >  #include <common.h>
> > > >  #include <command.h>
> > > >  #include <g_dnl.h>
> > > > +#include <usb.h>
> > > >
> > > >  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char
> > *const
> > > > argv[])  {
> > > >     int ret;
> > > >
> > > > +   board_usb_init(0, USB_INIT_DEVICE);
> > >
> > > The controller index should be configurable. Also, should
> > board_usb_cleanup be called at the end?
> >
> > I _really_ _really_ want to see if we can modify things so that we don't
> > have to sprinkle ever gadget driver with a cleanup() and every gadget
> > too if we don't have to.  Thanks!
>
> Most of the boards have board_usb_cleanup() as just a stub. For some, the
> function is not present, and adding board_usb_cleanup() here breaks the
> build for others with fastboot enabled.

That's a problem that needs fixing since those boards without a
functional board_usb_cleanup() are likely causing breakage in Linux.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150305/a10609de/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v3 3/4] ARM: DRA7: Set serial number environment variable
  2015-03-03 11:10 ` [U-Boot] [PATCH v3 3/4] ARM: DRA7: Set serial number environment variable Dileep Katta
  2015-03-04 13:23   ` Lukasz Majewski
  2015-03-04 16:53   ` Tom Rini
@ 2015-03-07  7:00   ` Nishanth Menon
  2 siblings, 0 replies; 49+ messages in thread
From: Nishanth Menon @ 2015-03-07  7:00 UTC (permalink / raw)
  To: u-boot

On 03/03/2015 05:10 AM, Dileep Katta wrote:
> Adds the registers to get the serial number of dra7xx boards.
> Serial# environment variable will be set if not done already.
> This will be useful to show correct information in
> "fastboot devices" commands.
> 
> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> ---
>  arch/arm/cpu/armv7/omap5/prcm-regs.c |  2 ++
>  arch/arm/include/asm/omap_common.h   |  2 ++
>  board/ti/dra7xx/evm.c                | 11 +++++++++++
>  3 files changed, 15 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv7/omap5/prcm-regs.c b/arch/arm/cpu/armv7/omap5/prcm-regs.c
> index 0745d42..020a964 100644
> --- a/arch/arm/cpu/armv7/omap5/prcm-regs.c
> +++ b/arch/arm/cpu/armv7/omap5/prcm-regs.c
> @@ -440,6 +440,8 @@ struct omap_sys_ctrl_regs const dra7xx_ctrl = {
>  	.control_emif1_sdram_config_ext		= 0x4AE0C144,
>  	.control_emif2_sdram_config_ext		= 0x4AE0C148,
>  	.control_wkup_ldovbb_mpu_voltage_ctrl	= 0x4AE0C158,
> +	.control_std_fuse_die_id_3		= 0x4AE0C210,
> +	.control_std_fuse_prod_id_0		= 0x4AE0C214,

Are these serial numbers of dra7 "boards"? they dont match up with
commit message.

http://www.ti.com/lit/ug/spruhz6/spruhz6.pdf
See section "AM572x Device Identification" on page 357
you would rather want to use CTRL_WKUP_STD_FUSE_DIE_ID_0,1,2,3


Is'nt better to unify with existing requirements such as
arch/arm/cpu/armv7/omap3/sys_info.c dieid_num_r() such that every
omap3,4,5,dra7 SoCs can use the same function in different ways
(example: usb_fake_mac_from_die_id in omap5_uevm and panda) ?

here we do fastboot_serial_from_die_id? Standardizing such information
allows us to just hook up the missing information for various SoCs and
reuse the common code.

>  	.control_padconf_mode			= 0x4AE0C5A0,
>  	.control_xtal_oscillator		= 0x4AE0C5A4,
>  	.control_i2c_2				= 0x4AE0C5A8,
> diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h
> index 323952f..b329803 100644
> --- a/arch/arm/include/asm/omap_common.h
> +++ b/arch/arm/include/asm/omap_common.h
> @@ -362,6 +362,8 @@ struct omap_sys_ctrl_regs {
>  	u32 control_core_control_io1;
>  	u32 control_core_control_io2;
>  	u32 control_id_code;
> +	u32 control_std_fuse_die_id_3;
> +	u32 control_std_fuse_prod_id_0;
>  	u32 control_std_fuse_opp_bgap;
>  	u32 control_ldosram_iva_voltage_ctrl;
>  	u32 control_ldosram_mpu_voltage_ctrl;
> diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
> index 6522241..e20d950 100644
> --- a/board/ti/dra7xx/evm.c
> +++ b/board/ti/dra7xx/evm.c
> @@ -88,10 +88,21 @@ int board_init(void)
>  int board_late_init(void)
>  {
>  #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
> +	char serialno[72];
> +	uint32_t serialno_lo, serialno_hi;
> +
>  	if (omap_revision() == DRA722_ES1_0)
>  		setenv("board_name", "dra72x");
>  	else
>  		setenv("board_name", "dra7xx");
> +
> +	if (!getenv("serial#")) {
> +		printf("serial# not set, setting...\n");
> +		serialno_lo = readl((*ctrl)->control_std_fuse_die_id_3);
> +		serialno_hi = readl((*ctrl)->control_std_fuse_prod_id_0);
> +		sprintf(serialno, "%08x%08x", serialno_hi, serialno_lo);
> +		setenv("serial#", serialno);
> +	}
>  #endif
>  	return 0;
>  }
> 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support
  2015-03-04 16:52 ` Tom Rini
@ 2015-03-12  6:31   ` Dileep Katta
  2015-03-12 19:29     ` Tom Rini
  0 siblings, 1 reply; 49+ messages in thread
From: Dileep Katta @ 2015-03-12  6:31 UTC (permalink / raw)
  To: u-boot

Hi Tom and Lukasz,

On 4 March 2015 at 22:22, Tom Rini <trini@konsulko.com> wrote:

> On Tue, Mar 03, 2015 at 04:40:41PM +0530, Dileep Katta wrote:
>
> > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> > ---
> >  arch/arm/cpu/armv7/omap5/Kconfig     |   5 +
> >  board/ti/dra7xx/Kconfig              |  13 ++
> >  board/ti/dra7xx/MAINTAINERS          |   2 +
> >  configs/dra7xx_evm_android_defconfig |   5 +
> >  include/configs/dra7xx_evm_android.h | 313
> +++++++++++++++++++++++++++++++++++
> >  5 files changed, 338 insertions(+)
> >  create mode 100644 configs/dra7xx_evm_android_defconfig
> >  create mode 100644 include/configs/dra7xx_evm_android.h
>
> I _really_ don't like how we're duplicating large hunks of dra7xx_evm.h.
> The first question is, what parts of this are not appropriate to just do
> in dra7xx_evm.h directly?  And the second question would be, which of
> those cannot simply be done via Kconfig choices.
>
> --
> Tom
>
Discussed this with Angela from TI, and arrived at a common header file so
that the duplication could be avoided. Will send a follow-up patch with the
update.
Thanks for the comments.

Regards, Dileep

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-05 14:37         ` Tom Rini
@ 2015-03-12  6:36           ` Dileep Katta
  2015-03-12  8:55             ` Lukasz Majewski
  0 siblings, 1 reply; 49+ messages in thread
From: Dileep Katta @ 2015-03-12  6:36 UTC (permalink / raw)
  To: u-boot

On 5 March 2015 at 20:07, Tom Rini <trini@konsulko.com> wrote:

> On Thu, Mar 05, 2015 at 12:36:57AM +0530, Dileep Katta wrote:
> > On 4 March 2015 at 23:59, Tom Rini <trini@konsulko.com> wrote:
> >
> > > On Wed, Mar 04, 2015 at 05:05:11PM +0000, Stegmaier, Angela wrote:
> > > > Hi Dileep,
> > > >
> > > > > -----Original Message-----
> > > > > From: Dileep Katta [mailto:dileep.katta at linaro.org]
> > > > > Sent: Tuesday, March 03, 2015 5:11 AM
> > > > > To: u-boot at lists.denx.de; robherring2 at gmail.com; Rini, Tom;
> > > > > rob.herring at linaro.org; srae at broadcom.com; l.majewski at samsung.com;
> > > > > Stegmaier, Angela
> > > > > Cc: Dileep Katta
> > > > > Subject: [U-Boot][PATCH v2 2/4] fastboot: call board_usb_init() to
> > > enable
> > > > > usb
> > > > >
> > > > > g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running
> > > > > cmd_fastboot.
> > > > > Calling board_usb_init() fixes this.
> > > > >
> > > > > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> > > > > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> > > > > ---
> > > > >  common/cmd_fastboot.c | 2 ++
> > > > >  1 file changed, 2 insertions(+)
> > > > >
> > > > > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index
> > > > > 346ab80..d7b8f6d 100644
> > > > > --- a/common/cmd_fastboot.c
> > > > > +++ b/common/cmd_fastboot.c
> > > > > @@ -10,11 +10,13 @@
> > > > >  #include <common.h>
> > > > >  #include <command.h>
> > > > >  #include <g_dnl.h>
> > > > > +#include <usb.h>
> > > > >
> > > > >  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char
> > > *const
> > > > > argv[])  {
> > > > >     int ret;
> > > > >
> > > > > +   board_usb_init(0, USB_INIT_DEVICE);
> > > >
> > > > The controller index should be configurable.
>
We are not getting controller Index as an argument for fastboot function.
Might have to add extra logic to get the same.
But do we need configurable index here for fastboot?
Experts, please advise.

> Also, should
> > > board_usb_cleanup be called at the end?
> > >
> > > I _really_ _really_ want to see if we can modify things so that we
> don't
> > > have to sprinkle ever gadget driver with a cleanup() and every gadget
> > > too if we don't have to.  Thanks!
> >
> > Most of the boards have board_usb_cleanup() as just a stub. For some, the
> > function is not present, and adding board_usb_cleanup() here breaks the
> > build for others with fastboot enabled.
>
> That's a problem that needs fixing since those boards without a
> functional board_usb_cleanup() are likely causing breakage in Linux.
>
Will add the board_usb_cleanup() function at the end.

>
> --
> Tom
>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-12  6:36           ` Dileep Katta
@ 2015-03-12  8:55             ` Lukasz Majewski
  2015-03-12 17:28               ` Marek Vasut
  0 siblings, 1 reply; 49+ messages in thread
From: Lukasz Majewski @ 2015-03-12  8:55 UTC (permalink / raw)
  To: u-boot

Hi Dileep, Marek

> On 5 March 2015 at 20:07, Tom Rini <trini@konsulko.com> wrote:
> 
> > On Thu, Mar 05, 2015 at 12:36:57AM +0530, Dileep Katta wrote:
> > > On 4 March 2015 at 23:59, Tom Rini <trini@konsulko.com> wrote:
> > >
> > > > On Wed, Mar 04, 2015 at 05:05:11PM +0000, Stegmaier, Angela
> > > > wrote:
> > > > > Hi Dileep,
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Dileep Katta [mailto:dileep.katta at linaro.org]
> > > > > > Sent: Tuesday, March 03, 2015 5:11 AM
> > > > > > To: u-boot at lists.denx.de; robherring2 at gmail.com; Rini, Tom;
> > > > > > rob.herring at linaro.org; srae at broadcom.com;
> > > > > > l.majewski at samsung.com; Stegmaier, Angela
> > > > > > Cc: Dileep Katta
> > > > > > Subject: [U-Boot][PATCH v2 2/4] fastboot: call
> > > > > > board_usb_init() to
> > > > enable
> > > > > > usb
> > > > > >
> > > > > > g_dnl_gadget_register() fails for dra7xx dwc3 gadget when
> > > > > > running cmd_fastboot.
> > > > > > Calling board_usb_init() fixes this.
> > > > > >
> > > > > > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> > > > > > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> > > > > > ---
> > > > > >  common/cmd_fastboot.c | 2 ++
> > > > > >  1 file changed, 2 insertions(+)
> > > > > >
> > > > > > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> > > > > > index 346ab80..d7b8f6d 100644
> > > > > > --- a/common/cmd_fastboot.c
> > > > > > +++ b/common/cmd_fastboot.c
> > > > > > @@ -10,11 +10,13 @@
> > > > > >  #include <common.h>
> > > > > >  #include <command.h>
> > > > > >  #include <g_dnl.h>
> > > > > > +#include <usb.h>
> > > > > >
> > > > > >  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int
> > > > > > argc, char
> > > > *const
> > > > > > argv[])  {
> > > > > >     int ret;
> > > > > >
> > > > > > +   board_usb_init(0, USB_INIT_DEVICE);
> > > > >
> > > > > The controller index should be configurable.
> >
> We are not getting controller Index as an argument for fastboot
> function. Might have to add extra logic to get the same.
> But do we need configurable index here for fastboot?
> Experts, please advise.

Some time ago we have changed syntax of all gadget related commands
(from e.g. dfu mmc 0 -> dfu 0 mmc 0) to support different controllers.
Rationale was to prepare ourself for future changes.

IMHO it would be feasible to do the same with fastboot command.
However, lets wait for Marek's opinion.

> 
> > Also, should
> > > > board_usb_cleanup be called at the end?
> > > >
> > > > I _really_ _really_ want to see if we can modify things so that
> > > > we
> > don't
> > > > have to sprinkle ever gadget driver with a cleanup() and every
> > > > gadget too if we don't have to.  Thanks!
> > >
> > > Most of the boards have board_usb_cleanup() as just a stub. For
> > > some, the function is not present, and adding board_usb_cleanup()
> > > here breaks the build for others with fastboot enabled.
> >
> > That's a problem that needs fixing since those boards without a
> > functional board_usb_cleanup() are likely causing breakage in Linux.
> >
> Will add the board_usb_cleanup() function at the end.

+1

> 
> >
> > --
> > Tom
> >



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-12  8:55             ` Lukasz Majewski
@ 2015-03-12 17:28               ` Marek Vasut
  2015-03-12 21:12                 ` Dileep Katta
  0 siblings, 1 reply; 49+ messages in thread
From: Marek Vasut @ 2015-03-12 17:28 UTC (permalink / raw)
  To: u-boot

On Thursday, March 12, 2015 at 09:55:57 AM, Lukasz Majewski wrote:

Hi!

[...]

> > We are not getting controller Index as an argument for fastboot
> > function. Might have to add extra logic to get the same.
> > But do we need configurable index here for fastboot?
> > Experts, please advise.
> 
> Some time ago we have changed syntax of all gadget related commands
> (from e.g. dfu mmc 0 -> dfu 0 mmc 0) to support different controllers.
> Rationale was to prepare ourself for future changes.
> 
> IMHO it would be feasible to do the same with fastboot command.
> However, lets wait for Marek's opinion.

I'm all for that.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support
  2015-03-12  6:31   ` Dileep Katta
@ 2015-03-12 19:29     ` Tom Rini
  2015-03-17 18:38       ` [U-Boot] [PATCH v2 1/1] " Dileep Katta
  0 siblings, 1 reply; 49+ messages in thread
From: Tom Rini @ 2015-03-12 19:29 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 12, 2015 at 12:01:15PM +0530, Dileep Katta wrote:
> Hi Tom and Lukasz,
> 
> On 4 March 2015 at 22:22, Tom Rini <trini@konsulko.com> wrote:
> 
> > On Tue, Mar 03, 2015 at 04:40:41PM +0530, Dileep Katta wrote:
> >
> > > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> > > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> > > ---
> > >  arch/arm/cpu/armv7/omap5/Kconfig     |   5 +
> > >  board/ti/dra7xx/Kconfig              |  13 ++
> > >  board/ti/dra7xx/MAINTAINERS          |   2 +
> > >  configs/dra7xx_evm_android_defconfig |   5 +
> > >  include/configs/dra7xx_evm_android.h | 313
> > +++++++++++++++++++++++++++++++++++
> > >  5 files changed, 338 insertions(+)
> > >  create mode 100644 configs/dra7xx_evm_android_defconfig
> > >  create mode 100644 include/configs/dra7xx_evm_android.h
> >
> > I _really_ don't like how we're duplicating large hunks of dra7xx_evm.h.
> > The first question is, what parts of this are not appropriate to just do
> > in dra7xx_evm.h directly?  And the second question would be, which of
> > those cannot simply be done via Kconfig choices.
>
> Discussed this with Angela from TI, and arrived at a common header file so
> that the duplication could be avoided. Will send a follow-up patch with the
> update.

Note that I'm still skeptical that there's things that can't just be
Kconfig choices and the rest just be in dra7xx_evm.h.  Sort out and come
up with a common flash/etc layout and so forth.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150312/ed8fe5c6/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-12 17:28               ` Marek Vasut
@ 2015-03-12 21:12                 ` Dileep Katta
  2015-03-13  7:53                   ` Lukasz Majewski
  0 siblings, 1 reply; 49+ messages in thread
From: Dileep Katta @ 2015-03-12 21:12 UTC (permalink / raw)
  To: u-boot

g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running
cmd_fastboot. Calling board_usb_init() to fix this.
fastboot command is now added with an optional controller index argument
with default value as 0, to facilitate configurable controller index.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
---
Changes in v2:
	- Changed fastboot command to facilitate passing controller index
	- Added board_usb_cleanup()
This patch considers the following change by Inha Song, without which
the build will be broken on BeagleBone Black platform
	https://patchwork.ozlabs.org/patch/430303/
	
 common/cmd_fastboot.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
index 346ab80..9ca4a2f 100644
--- a/common/cmd_fastboot.c
+++ b/common/cmd_fastboot.c
@@ -10,11 +10,19 @@
 #include <common.h>
 #include <command.h>
 #include <g_dnl.h>
+#include <usb.h>
 
 static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret;
+	int controller_index = 0;
 
+	if (argc == 2) {
+		char *usb_controller = argv[1];
+		controller_index = simple_strtoul(usb_controller, NULL, 0);
+	}
+
+	board_usb_init(controller_index, USB_INIT_DEVICE);
 	g_dnl_clear_detach();
 	ret = g_dnl_register("usb_dnl_fastboot");
 	if (ret)
@@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 
 	g_dnl_unregister();
 	g_dnl_clear_detach();
+	board_usb_cleanup(controller_index, USB_INIT_DEVICE);
 	return CMD_RET_SUCCESS;
 }
 
 U_BOOT_CMD(
-	fastboot,	1,	0,	do_fastboot,
+	fastboot,	2,	0,	do_fastboot,
 	"use USB Fastboot protocol",
-	"\n"
-	"    - run as a fastboot usb device"
+	"[<USB_controller>]\n"
+	"    - run as a fastboot usb device via <USB_controller>"
 );
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-12 21:12                 ` Dileep Katta
@ 2015-03-13  7:53                   ` Lukasz Majewski
  2015-03-13 19:28                     ` Dileep Katta
  0 siblings, 1 reply; 49+ messages in thread
From: Lukasz Majewski @ 2015-03-13  7:53 UTC (permalink / raw)
  To: u-boot

Hi Dileep,

> g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running
> cmd_fastboot. Calling board_usb_init() to fix this.
> fastboot command is now added with an optional controller index
> argument with default value as 0, to facilitate configurable
> controller index.
> 
> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> ---
> Changes in v2:
> 	- Changed fastboot command to facilitate passing controller
> index
> 	- Added board_usb_cleanup()
> This patch considers the following change by Inha Song, without which
> the build will be broken on BeagleBone Black platform
> 	https://patchwork.ozlabs.org/patch/430303/
> 	
>  common/cmd_fastboot.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> index 346ab80..9ca4a2f 100644
> --- a/common/cmd_fastboot.c
> +++ b/common/cmd_fastboot.c
> @@ -10,11 +10,19 @@
>  #include <common.h>
>  #include <command.h>
>  #include <g_dnl.h>
> +#include <usb.h>
>  
>  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char
> *const argv[]) {
>  	int ret;
> +	int controller_index = 0;
>  
> +	if (argc == 2) {
> +		char *usb_controller = argv[1];
> +		controller_index = simple_strtoul(usb_controller,
> NULL, 0);
> +	}
> +
> +	board_usb_init(controller_index, USB_INIT_DEVICE);
>  	g_dnl_clear_detach();
>  	ret = g_dnl_register("usb_dnl_fastboot");
>  	if (ret)
> @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int
> flag, int argc, char *const argv[]) 
>  	g_dnl_unregister();
>  	g_dnl_clear_detach();
> +	board_usb_cleanup(controller_index, USB_INIT_DEVICE);
>  	return CMD_RET_SUCCESS;
>  }
>  
>  U_BOOT_CMD(
> -	fastboot,	1,	0,	do_fastboot,
> +	fastboot,	2,	0,	do_fastboot,
>  	"use USB Fastboot protocol",
> -	"\nLukasz Majewski <l.majewski@samsung.com>"
> -	"    - run as a fastboot usb device"
> +	"[<USB_controller>]\n"
> +	"    - run as a fastboot usb device via <USB_controller>"
>  );

Acked-by: Lukasz Majewski <l.majewski@samsung.com>

Since I'm not CC'ed to all patches, I assume that this work would go
via other tree?

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-13  7:53                   ` Lukasz Majewski
@ 2015-03-13 19:28                     ` Dileep Katta
  2015-03-13 20:55                       ` Lukasz Majewski
  0 siblings, 1 reply; 49+ messages in thread
From: Dileep Katta @ 2015-03-13 19:28 UTC (permalink / raw)
  To: u-boot

Hi Lukasz,

On 13 March 2015 at 13:23, Lukasz Majewski <l.majewski@samsung.com> wrote:

> Hi Dileep,
>
> > g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running
> > cmd_fastboot. Calling board_usb_init() to fix this.
> > fastboot command is now added with an optional controller index
> > argument with default value as 0, to facilitate configurable
> > controller index.
> >
> > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> > ---
> > Changes in v2:
> >       - Changed fastboot command to facilitate passing controller
> > index
> >       - Added board_usb_cleanup()
> > This patch considers the following change by Inha Song, without which
> > the build will be broken on BeagleBone Black platform
> >       https://patchwork.ozlabs.org/patch/430303/
> >
> >  common/cmd_fastboot.c | 15 ++++++++++++---
> >  1 file changed, 12 insertions(+), 3 deletions(-)
> >
> > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> > index 346ab80..9ca4a2f 100644
> > --- a/common/cmd_fastboot.c
> > +++ b/common/cmd_fastboot.c
> > @@ -10,11 +10,19 @@
> >  #include <common.h>
> >  #include <command.h>
> >  #include <g_dnl.h>
> > +#include <usb.h>
> >
> >  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char
> > *const argv[]) {
> >       int ret;
> > +     int controller_index = 0;
> >
> > +     if (argc == 2) {
> > +             char *usb_controller = argv[1];
> > +             controller_index = simple_strtoul(usb_controller,
> > NULL, 0);
> > +     }
> > +
> > +     board_usb_init(controller_index, USB_INIT_DEVICE);
> >       g_dnl_clear_detach();
> >       ret = g_dnl_register("usb_dnl_fastboot");
> >       if (ret)
> > @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int
> > flag, int argc, char *const argv[])
> >       g_dnl_unregister();
> >       g_dnl_clear_detach();
> > +     board_usb_cleanup(controller_index, USB_INIT_DEVICE);
> >       return CMD_RET_SUCCESS;
> >  }
> >
> >  U_BOOT_CMD(
> > -     fastboot,       1,      0,      do_fastboot,
> > +     fastboot,       2,      0,      do_fastboot,
> >       "use USB Fastboot protocol",
> > -     "\nLukasz Majewski <l.majewski@samsung.com>"
> > -     "    - run as a fastboot usb device"
> > +     "[<USB_controller>]\n"
> > +     "    - run as a fastboot usb device via <USB_controller>"
> >  );
>
> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
>
> Since I'm not CC'ed to all patches, I assume that this work would go
> via other tree?
>
Other patches are TI board specific and I am working on next version of the
patches as per the review comments.
I felt that this is generic functionality and hence sent it separately. Do
you want me send all patches?

Regards, Dileep

>
> --
> Best regards,
>
> Lukasz Majewski
>
> Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-13 19:28                     ` Dileep Katta
@ 2015-03-13 20:55                       ` Lukasz Majewski
  2015-03-27 17:53                         ` Dileep Katta
  0 siblings, 1 reply; 49+ messages in thread
From: Lukasz Majewski @ 2015-03-13 20:55 UTC (permalink / raw)
  To: u-boot

On Sat, 14 Mar 2015 00:58:51 +0530
Dileep Katta <dileep.katta@linaro.org> wrote:

> Hi Lukasz,
> 
> On 13 March 2015 at 13:23, Lukasz Majewski <l.majewski@samsung.com>
> wrote:
> 
> > Hi Dileep,
> >
> > > g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running
> > > cmd_fastboot. Calling board_usb_init() to fix this.
> > > fastboot command is now added with an optional controller index
> > > argument with default value as 0, to facilitate configurable
> > > controller index.
> > >
> > > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> > > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> > > ---
> > > Changes in v2:
> > >       - Changed fastboot command to facilitate passing controller
> > > index
> > >       - Added board_usb_cleanup()
> > > This patch considers the following change by Inha Song, without
> > > which the build will be broken on BeagleBone Black platform
> > >       https://patchwork.ozlabs.org/patch/430303/
> > >
> > >  common/cmd_fastboot.c | 15 ++++++++++++---
> > >  1 file changed, 12 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> > > index 346ab80..9ca4a2f 100644
> > > --- a/common/cmd_fastboot.c
> > > +++ b/common/cmd_fastboot.c
> > > @@ -10,11 +10,19 @@
> > >  #include <common.h>
> > >  #include <command.h>
> > >  #include <g_dnl.h>
> > > +#include <usb.h>
> > >
> > >  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char
> > > *const argv[]) {
> > >       int ret;
> > > +     int controller_index = 0;
> > >
> > > +     if (argc == 2) {
> > > +             char *usb_controller = argv[1];
> > > +             controller_index = simple_strtoul(usb_controller,
> > > NULL, 0);
> > > +     }
> > > +
> > > +     board_usb_init(controller_index, USB_INIT_DEVICE);
> > >       g_dnl_clear_detach();
> > >       ret = g_dnl_register("usb_dnl_fastboot");
> > >       if (ret)
> > > @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int
> > > flag, int argc, char *const argv[])
> > >       g_dnl_unregister();
> > >       g_dnl_clear_detach();
> > > +     board_usb_cleanup(controller_index, USB_INIT_DEVICE);
> > >       return CMD_RET_SUCCESS;
> > >  }
> > >
> > >  U_BOOT_CMD(
> > > -     fastboot,       1,      0,      do_fastboot,
> > > +     fastboot,       2,      0,      do_fastboot,
> > >       "use USB Fastboot protocol",
> > > -     "\nLukasz Majewski <l.majewski@samsung.com>"
> > > -     "    - run as a fastboot usb device"
> > > +     "[<USB_controller>]\n"
> > > +     "    - run as a fastboot usb device via <USB_controller>"
> > >  );
> >
> > Acked-by: Lukasz Majewski <l.majewski@samsung.com>
> >
> > Since I'm not CC'ed to all patches, I assume that this work would go
> > via other tree?
> >
> Other patches are TI board specific and I am working on next version
> of the patches as per the review comments.
> I felt that this is generic functionality and hence sent it
> separately. Do you want me send all patches?

No, it is not necessary. Regarding above, I assume that Tom will
probably fetch those patches.

I was just concern about tree to which this patch should belong.

Regards,
Lukasz

> 
> Regards, Dileep
> 
> >
> > --
> > Best regards,
> >
> > Lukasz Majewski
> >
> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
> >
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150313/0cb0630a/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 1/1] ARM: DRA7XX: Add config file for Android with fastboot support
  2015-03-12 19:29     ` Tom Rini
@ 2015-03-17 18:38       ` Dileep Katta
  2015-03-18 16:11         ` Tom Rini
  2015-03-23  8:50         ` [U-Boot] [PATCH v2 1/1] ARM: DRA7XX: Add config file for Android with fastboot support Lukasz Majewski
  0 siblings, 2 replies; 49+ messages in thread
From: Dileep Katta @ 2015-03-17 18:38 UTC (permalink / raw)
  To: u-boot

	- 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

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
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 1/1] ARM: DRA7XX: Add config file for Android with fastboot support
  2015-03-17 18:38       ` [U-Boot] [PATCH v2 1/1] " Dileep Katta
@ 2015-03-18 16:11         ` Tom Rini
  2015-03-18 21:12           ` Dileep Katta
  2015-03-23  8:50         ` [U-Boot] [PATCH v2 1/1] ARM: DRA7XX: Add config file for Android with fastboot support Lukasz Majewski
  1 sibling, 1 reply; 49+ messages in thread
From: Tom Rini @ 2015-03-18 16:11 UTC (permalink / raw)
  To: u-boot

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.

> @@ -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?

> @@ -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.

> +#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?

-- 
Tom

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 1/1] ARM: DRA7XX: Add config file for Android with fastboot support
  2015-03-18 16:11         ` Tom Rini
@ 2015-03-18 21:12           ` Dileep Katta
  2015-03-19 13:15             ` Tom Rini
  0 siblings, 1 reply; 49+ messages in thread
From: Dileep Katta @ 2015-03-18 21:12 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 1/1] ARM: DRA7XX: Add config file for Android with fastboot support
  2015-03-18 21:12           ` Dileep Katta
@ 2015-03-19 13:15             ` Tom Rini
  2015-03-23 22:41               ` Dileep Katta
  0 siblings, 1 reply; 49+ messages in thread
From: Tom Rini @ 2015-03-19 13:15 UTC (permalink / raw)
  To: u-boot

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.

> > > @@ -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.

> > > +#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.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150319/3dd09668/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 1/1] ARM: DRA7XX: Add config file for Android with fastboot support
  2015-03-17 18:38       ` [U-Boot] [PATCH v2 1/1] " Dileep Katta
  2015-03-18 16:11         ` Tom Rini
@ 2015-03-23  8:50         ` Lukasz Majewski
  1 sibling, 0 replies; 49+ messages in thread
From: Lukasz Majewski @ 2015-03-23  8:50 UTC (permalink / raw)
  To: u-boot

Hi Dileep,

> 	- 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
> 
> 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

Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 1/1] ARM: DRA7XX: Add config file for Android with fastboot support
  2015-03-19 13:15             ` Tom Rini
@ 2015-03-23 22:41               ` Dileep Katta
  2015-03-24 22:34                 ` [U-Boot] [PATCH v3 1/3] ARM: DRA7XX: Enable Fastboot Dileep Katta
  0 siblings, 1 reply; 49+ messages in thread
From: Dileep Katta @ 2015-03-23 22:41 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v3 1/3] ARM: DRA7XX: Enable Fastboot
  2015-03-23 22:41               ` Dileep Katta
@ 2015-03-24 22:34                 ` Dileep Katta
  2015-03-24 22:34                   ` [U-Boot] [PATCH v3 2/3] ARM: DRA7: Set serial number environment variable Dileep Katta
                                     ` (3 more replies)
  0 siblings, 4 replies; 49+ messages in thread
From: Dileep Katta @ 2015-03-24 22:34 UTC (permalink / raw)
  To: u-boot

	- Fastboot is enable by default for DRA7XX
        - 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
Changes in v3:
	- Added the changes on dwc3_gadget developer branch of DFU tree
	- Added the changes as part of existing dra7xx_evm_defconfig
	- Enabled fastboot by default
	- Kept fastboot aware VID/PID only
	- reverted change made for U-Boot offset

 include/configs/dra7xx_evm.h | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index e94b618..7acd907 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -84,6 +84,14 @@
 	DFU_ALT_INFO_EMMC \
 	DFU_ALT_INFO_RAM
 
+/* 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
+
 #include <configs/ti_omap5_common.h>
 
 /* Enhance our eMMC support / experience. */
@@ -181,8 +189,8 @@
 #define CONFIG_USBDOWNLOAD_GADGET
 #define CONFIG_USB_GADGET_VBUS_DRAW 2
 #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
-#define CONFIG_G_DNL_VENDOR_NUM 0x0403
-#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
+#define CONFIG_G_DNL_VENDOR_NUM 0x0451
+#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
 #define CONFIG_USB_GADGET_DUALSPEED
 
 /* USB Device Firmware Update support */
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v3 2/3] ARM: DRA7: Set serial number environment variable
  2015-03-24 22:34                 ` [U-Boot] [PATCH v3 1/3] ARM: DRA7XX: Enable Fastboot Dileep Katta
@ 2015-03-24 22:34                   ` Dileep Katta
  2015-03-27 14:19                     ` Tom Rini
  2015-04-23 22:03                     ` [U-Boot] [U-Boot, v3, " Tom Rini
  2015-03-24 22:34                   ` [U-Boot] [PATCH v3 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader Dileep Katta
                                     ` (2 subsequent siblings)
  3 siblings, 2 replies; 49+ messages in thread
From: Dileep Katta @ 2015-03-24 22:34 UTC (permalink / raw)
  To: u-boot

This patch populates serial number environment variable from
die_id_0 and die_id_1 register values for DRA7xx boards.

The function is added in omap common code so that this can be re-used.

Serial# environment variable will be useful to show correct
information in "fastboot devices" commands.

Ref:
http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=a6bcaaf67f6e4bcd97808f53d0ceb4b0c04d583c

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
---
Changes in v2:
	- None
Changes in v3:
	- corrected the error in the computation of serial# variable
	- Made it more generic and reusable as per the comments

 arch/arm/cpu/armv7/omap-common/utils.c | 13 +++++++++++++
 arch/arm/cpu/armv7/omap5/prcm-regs.c   |  4 ++++
 arch/arm/include/asm/omap_common.h     |  5 +++++
 board/ti/dra7xx/evm.c                  |  6 ++++++
 4 files changed, 28 insertions(+)

diff --git a/arch/arm/cpu/armv7/omap-common/utils.c b/arch/arm/cpu/armv7/omap-common/utils.c
index 1696c2d..df5f817 100644
--- a/arch/arm/cpu/armv7/omap-common/utils.c
+++ b/arch/arm/cpu/armv7/omap-common/utils.c
@@ -60,3 +60,16 @@ void __weak usb_fake_mac_from_die_id(u32 *id)
 		eth_setenv_enetaddr("usbethaddr", device_mac);
 	}
 }
+
+void __weak usb_set_serial_num_from_die_id(u32 *id)
+{
+	char serialno[72];
+	uint32_t serialno_lo, serialno_hi;
+
+	if (!getenv("serial#")) {
+		serialno_hi = id[0];
+		serialno_lo = id[1];
+		sprintf(serialno, "%08x%08x", serialno_hi, serialno_lo);
+		setenv("serial#", serialno);
+	}
+}
diff --git a/arch/arm/cpu/armv7/omap5/prcm-regs.c b/arch/arm/cpu/armv7/omap5/prcm-regs.c
index 440bb40..f80d36d 100644
--- a/arch/arm/cpu/armv7/omap5/prcm-regs.c
+++ b/arch/arm/cpu/armv7/omap5/prcm-regs.c
@@ -440,6 +440,10 @@ struct omap_sys_ctrl_regs const dra7xx_ctrl = {
 	.control_emif1_sdram_config_ext		= 0x4AE0C144,
 	.control_emif2_sdram_config_ext		= 0x4AE0C148,
 	.control_wkup_ldovbb_mpu_voltage_ctrl	= 0x4AE0C158,
+	.control_std_fuse_die_id_0		= 0x4AE0C200,
+	.control_std_fuse_die_id_1		= 0x4AE0C208,
+	.control_std_fuse_die_id_2		= 0x4AE0C20C,
+	.control_std_fuse_die_id_3		= 0x4AE0C210,
 	.control_padconf_mode			= 0x4AE0C5A0,
 	.control_xtal_oscillator		= 0x4AE0C5A4,
 	.control_i2c_2				= 0x4AE0C5A8,
diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h
index bd43099..13a57ab 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -362,6 +362,10 @@ struct omap_sys_ctrl_regs {
 	u32 control_core_control_io1;
 	u32 control_core_control_io2;
 	u32 control_id_code;
+	u32 control_std_fuse_die_id_0;
+	u32 control_std_fuse_die_id_1;
+	u32 control_std_fuse_die_id_2;
+	u32 control_std_fuse_die_id_3;
 	u32 control_std_fuse_opp_bgap;
 	u32 control_ldosram_iva_voltage_ctrl;
 	u32 control_ldosram_mpu_voltage_ctrl;
@@ -578,6 +582,7 @@ void abb_setup(u32 fuse, u32 ldovbb, u32 setup, u32 control,
 s8 abb_setup_ldovbb(u32 fuse, u32 ldovbb);
 
 void usb_fake_mac_from_die_id(u32 *id);
+void usb_set_serial_num_from_die_id(u32 *id);
 
 /* ABB */
 #define OMAP_ABB_NOMINAL_OPP		0
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 3089fa2..cadff5a 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -93,10 +93,16 @@ int board_init(void)
 int board_late_init(void)
 {
 #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+	u32 id[4];
+
 	if (omap_revision() == DRA722_ES1_0)
 		setenv("board_name", "dra72x");
 	else
 		setenv("board_name", "dra7xx");
+
+	id[0] = readl((*ctrl)->control_std_fuse_die_id_0);
+	id[1] = readl((*ctrl)->control_std_fuse_die_id_1);
+	usb_set_serial_num_from_die_id(id);
 #endif
 	return 0;
 }
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v3 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader
  2015-03-24 22:34                 ` [U-Boot] [PATCH v3 1/3] ARM: DRA7XX: Enable Fastboot Dileep Katta
  2015-03-24 22:34                   ` [U-Boot] [PATCH v3 2/3] ARM: DRA7: Set serial number environment variable Dileep Katta
@ 2015-03-24 22:34                   ` Dileep Katta
  2015-03-27 14:19                     ` Tom Rini
  2015-03-27 14:19                   ` [U-Boot] [PATCH v3 1/3] ARM: DRA7XX: Enable Fastboot Tom Rini
  2015-04-23 22:03                   ` [U-Boot] [U-Boot,v3,1/3] " Tom Rini
  3 siblings, 1 reply; 49+ messages in thread
From: Dileep Katta @ 2015-03-24 22:34 UTC (permalink / raw)
  To: u-boot

Implemented fb_set_reboot_flag() for OMAP5 to set
an environment variable 'dofastboot' when reboot-bootloader called.

This environment variable will be checked in boot command and fastboot
will be called if the variable is set.
If the bootcmd env variable of OMAP5 common is overwritten with board-specific
command, then these changes will not apply.

This was originally intended for DRA7 platform, but now applies to all OMAP5.

Ref:
http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=19da2e436e9806259cf1f4988b9e046ab256bf2c

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
---
Changes in v2:
	- None
Changes in v3:
	- Changed the implementation to be more abstract
	- Used environment variable instead of board-specific registers
	- Moved the code to OMAP5

 arch/arm/cpu/armv7/omap-common/boot-common.c | 11 +++++++++++
 include/configs/ti_omap5_common.h            |  7 +++++++
 2 files changed, 18 insertions(+)

diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c
index 17500f2..1aff7c8 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
@@ -162,3 +162,14 @@ void arch_preboot_os(void)
 	ahci_reset(DWC_AHSATA_BASE);
 }
 #endif
+
+#ifdef CONFIG_CMD_FASTBOOT
+int fb_set_reboot_flag(void)
+{
+	printf("Setting reboot to fastboot flag ...\n");
+	setenv("dofastboot", "1");
+	saveenv();
+	udelay(60);
+	return 0;
+}
+#endif
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index cd92454..c5d97ea 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -141,13 +141,20 @@
 	"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
 	DFUARGS \
 
+
 #define CONFIG_BOOTCOMMAND \
+	"if test ${dofastboot} -eq 1; then " \
+		"echo Boot fastboot requested, resetting dofastboot ...;" \
+		"setenv dofastboot 0; saveenv; sleep 1;" \
+		"echo Booting into fastboot ...; fastboot;" \
+	"fi;" \
 	"run findfdt; " \
 	"run mmcboot;" \
 	"setenv mmcdev 1; " \
 	"setenv bootpart 1:2; " \
 	"setenv mmcroot /dev/mmcblk0p2 rw; " \
 	"run mmcboot;" \
+	""
 
 
 /*
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v3 1/3] ARM: DRA7XX: Enable Fastboot
  2015-03-24 22:34                 ` [U-Boot] [PATCH v3 1/3] ARM: DRA7XX: Enable Fastboot Dileep Katta
  2015-03-24 22:34                   ` [U-Boot] [PATCH v3 2/3] ARM: DRA7: Set serial number environment variable Dileep Katta
  2015-03-24 22:34                   ` [U-Boot] [PATCH v3 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader Dileep Katta
@ 2015-03-27 14:19                   ` Tom Rini
  2015-04-23 22:03                   ` [U-Boot] [U-Boot,v3,1/3] " Tom Rini
  3 siblings, 0 replies; 49+ messages in thread
From: Tom Rini @ 2015-03-27 14:19 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 25, 2015 at 04:04:50AM +0530, Dileep Katta wrote:

> 	- Fastboot is enable by default for DRA7XX
>         - 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>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150327/791f9c90/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v3 2/3] ARM: DRA7: Set serial number environment variable
  2015-03-24 22:34                   ` [U-Boot] [PATCH v3 2/3] ARM: DRA7: Set serial number environment variable Dileep Katta
@ 2015-03-27 14:19                     ` Tom Rini
  2015-04-23 22:03                     ` [U-Boot] [U-Boot, v3, " Tom Rini
  1 sibling, 0 replies; 49+ messages in thread
From: Tom Rini @ 2015-03-27 14:19 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 25, 2015 at 04:04:51AM +0530, Dileep Katta wrote:

> This patch populates serial number environment variable from
> die_id_0 and die_id_1 register values for DRA7xx boards.
> 
> The function is added in omap common code so that this can be re-used.
> 
> Serial# environment variable will be useful to show correct
> information in "fastboot devices" commands.
> 
> Ref:
> http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=a6bcaaf67f6e4bcd97808f53d0ceb4b0c04d583c
> 
> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150327/982c85c1/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v3 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader
  2015-03-24 22:34                   ` [U-Boot] [PATCH v3 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader Dileep Katta
@ 2015-03-27 14:19                     ` Tom Rini
  2015-03-27 17:28                       ` Dileep Katta
  0 siblings, 1 reply; 49+ messages in thread
From: Tom Rini @ 2015-03-27 14:19 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 25, 2015 at 04:04:52AM +0530, Dileep Katta wrote:

> Implemented fb_set_reboot_flag() for OMAP5 to set
> an environment variable 'dofastboot' when reboot-bootloader called.
> 
> This environment variable will be checked in boot command and fastboot
> will be called if the variable is set.
> If the bootcmd env variable of OMAP5 common is overwritten with board-specific
> command, then these changes will not apply.
[snip]
> +	printf("Setting reboot to fastboot flag ...\n");
> +	setenv("dofastboot", "1");
> +	saveenv();
> +	udelay(60);
[snip]
>  #define CONFIG_BOOTCOMMAND \
> +	"if test ${dofastboot} -eq 1; then " \
> +		"echo Boot fastboot requested, resetting dofastboot ...;" \
> +		"setenv dofastboot 0; saveenv; sleep 1;" \
> +		"echo Booting into fastboot ...; fastboot;" \

No.  When saveenv returns environment is saved.  If it doesn't there's a
bug that must be addressed.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150327/04be634e/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v3 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader
  2015-03-27 14:19                     ` Tom Rini
@ 2015-03-27 17:28                       ` Dileep Katta
  2015-03-27 17:36                         ` [U-Boot] [PATCH v4 " Dileep Katta
  0 siblings, 1 reply; 49+ messages in thread
From: Dileep Katta @ 2015-03-27 17:28 UTC (permalink / raw)
  To: u-boot

On 27/03/2015, Tom Rini <trini@konsulko.com> wrote:
> On Wed, Mar 25, 2015 at 04:04:52AM +0530, Dileep Katta wrote:
>
>> Implemented fb_set_reboot_flag() for OMAP5 to set
>> an environment variable 'dofastboot' when reboot-bootloader called.
>>
>> This environment variable will be checked in boot command and fastboot
>> will be called if the variable is set.
>> If the bootcmd env variable of OMAP5 common is overwritten with
>> board-specific
>> command, then these changes will not apply.
> [snip]
>> +	printf("Setting reboot to fastboot flag ...\n");
>> +	setenv("dofastboot", "1");
>> +	saveenv();
>> +	udelay(60);
> [snip]
>>  #define CONFIG_BOOTCOMMAND \
>> +	"if test ${dofastboot} -eq 1; then " \
>> +		"echo Boot fastboot requested, resetting dofastboot ...;" \
>> +		"setenv dofastboot 0; saveenv; sleep 1;" \
>> +		"echo Booting into fastboot ...; fastboot;" \
>
> No.  When saveenv returns environment is saved.  If it doesn't there's a
> bug that must be addressed.
sleep/udelay not required. Will remove and send an updated patch.
>
> --
> Tom
>
Thanks for the comment.
Regards, Dileep

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v4 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader
  2015-03-27 17:28                       ` Dileep Katta
@ 2015-03-27 17:36                         ` Dileep Katta
  2015-03-27 18:02                           ` Tom Rini
  2015-04-23 22:03                           ` [U-Boot] [U-Boot, v4, " Tom Rini
  0 siblings, 2 replies; 49+ messages in thread
From: Dileep Katta @ 2015-03-27 17:36 UTC (permalink / raw)
  To: u-boot

Implemented fb_set_reboot_flag() for OMAP5 to set
an environment variable 'dofastboot' when reboot-bootloader called.

This environment variable will be checked in boot command and fastboot
will be called if the variable is set.
If the bootcmd env variable of OMAP5 common is overwritten with board-specific
command, then these changes will not apply.

This was originally intended for DRA7 platform, but now applies to all OMAP5.

Ref:
http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=19da2e436e9806259cf1f4988b9e046ab256bf2c

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
---
Changes in v2:
        - None
Changes in v3:
        - Changed the implementation to be more abstract
        - Used environment variable instead of board-specific registers
        - Moved the code to OMAP5
Changes in v4:
	- Removed udelay and sleep after saveenv

 arch/arm/cpu/armv7/omap-common/boot-common.c | 10 ++++++++++
 include/configs/ti_omap5_common.h            |  7 +++++++
 2 files changed, 17 insertions(+)

diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c
index 17500f2..55ca94d 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
@@ -162,3 +162,13 @@ void arch_preboot_os(void)
 	ahci_reset(DWC_AHSATA_BASE);
 }
 #endif
+
+#ifdef CONFIG_CMD_FASTBOOT
+int fb_set_reboot_flag(void)
+{
+	printf("Setting reboot to fastboot flag ...\n");
+	setenv("dofastboot", "1");
+	saveenv();
+	return 0;
+}
+#endif
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index cd92454..24f8021 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -141,13 +141,20 @@
 	"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
 	DFUARGS \
 
+
 #define CONFIG_BOOTCOMMAND \
+	"if test ${dofastboot} -eq 1; then " \
+		"echo Boot fastboot requested, resetting dofastboot ...;" \
+		"setenv dofastboot 0; saveenv;" \
+		"echo Booting into fastboot ...; fastboot;" \
+	"fi;" \
 	"run findfdt; " \
 	"run mmcboot;" \
 	"setenv mmcdev 1; " \
 	"setenv bootpart 1:2; " \
 	"setenv mmcroot /dev/mmcblk0p2 rw; " \
 	"run mmcboot;" \
+	""
 
 
 /*
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-13 20:55                       ` Lukasz Majewski
@ 2015-03-27 17:53                         ` Dileep Katta
  2015-03-27 18:15                           ` Tom Rini
  0 siblings, 1 reply; 49+ messages in thread
From: Dileep Katta @ 2015-03-27 17:53 UTC (permalink / raw)
  To: u-boot

Experts,
Please send your valuable comments if this patch needs any change.

Regards, Dileep

On 14/03/2015, Lukasz Majewski <l.majewski@majess.pl> wrote:
> On Sat, 14 Mar 2015 00:58:51 +0530
> Dileep Katta <dileep.katta@linaro.org> wrote:
>
>> Hi Lukasz,
>>
>> On 13 March 2015 at 13:23, Lukasz Majewski <l.majewski@samsung.com>
>> wrote:
>>
>> > Hi Dileep,
>> >
>> > > g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running
>> > > cmd_fastboot. Calling board_usb_init() to fix this.
>> > > fastboot command is now added with an optional controller index
>> > > argument with default value as 0, to facilitate configurable
>> > > controller index.
>> > >
>> > > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
>> > > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
>> > > ---
>> > > Changes in v2:
>> > >       - Changed fastboot command to facilitate passing controller
>> > > index
>> > >       - Added board_usb_cleanup()
>> > > This patch considers the following change by Inha Song, without
>> > > which the build will be broken on BeagleBone Black platform
>> > >       https://patchwork.ozlabs.org/patch/430303/
>> > >
>> > >  common/cmd_fastboot.c | 15 ++++++++++++---
>> > >  1 file changed, 12 insertions(+), 3 deletions(-)
>> > >
>> > > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
>> > > index 346ab80..9ca4a2f 100644
>> > > --- a/common/cmd_fastboot.c
>> > > +++ b/common/cmd_fastboot.c
>> > > @@ -10,11 +10,19 @@
>> > >  #include <common.h>
>> > >  #include <command.h>
>> > >  #include <g_dnl.h>
>> > > +#include <usb.h>
>> > >
>> > >  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char
>> > > *const argv[]) {
>> > >       int ret;
>> > > +     int controller_index = 0;
>> > >
>> > > +     if (argc == 2) {
>> > > +             char *usb_controller = argv[1];
>> > > +             controller_index = simple_strtoul(usb_controller,
>> > > NULL, 0);
>> > > +     }
>> > > +
>> > > +     board_usb_init(controller_index, USB_INIT_DEVICE);
>> > >       g_dnl_clear_detach();
>> > >       ret = g_dnl_register("usb_dnl_fastboot");
>> > >       if (ret)
>> > > @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int
>> > > flag, int argc, char *const argv[])
>> > >       g_dnl_unregister();
>> > >       g_dnl_clear_detach();
>> > > +     board_usb_cleanup(controller_index, USB_INIT_DEVICE);
>> > >       return CMD_RET_SUCCESS;
>> > >  }
>> > >
>> > >  U_BOOT_CMD(
>> > > -     fastboot,       1,      0,      do_fastboot,
>> > > +     fastboot,       2,      0,      do_fastboot,
>> > >       "use USB Fastboot protocol",
>> > > -     "\nLukasz Majewski <l.majewski@samsung.com>"
>> > > -     "    - run as a fastboot usb device"
>> > > +     "[<USB_controller>]\n"
>> > > +     "    - run as a fastboot usb device via <USB_controller>"
>> > >  );
>> >
>> > Acked-by: Lukasz Majewski <l.majewski@samsung.com>
>> >
>> > Since I'm not CC'ed to all patches, I assume that this work would go
>> > via other tree?
>> >
>> Other patches are TI board specific and I am working on next version
>> of the patches as per the review comments.
>> I felt that this is generic functionality and hence sent it
>> separately. Do you want me send all patches?
>
> No, it is not necessary. Regarding above, I assume that Tom will
> probably fetch those patches.
>
> I was just concern about tree to which this patch should belong.
>
> Regards,
> Lukasz
>
>>
>> Regards, Dileep
>>
>> >
>> > --
>> > Best regards,
>> >
>> > Lukasz Majewski
>> >
>> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
>> >
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>
>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v4 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader
  2015-03-27 17:36                         ` [U-Boot] [PATCH v4 " Dileep Katta
@ 2015-03-27 18:02                           ` Tom Rini
  2015-04-23 22:03                           ` [U-Boot] [U-Boot, v4, " Tom Rini
  1 sibling, 0 replies; 49+ messages in thread
From: Tom Rini @ 2015-03-27 18:02 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 27, 2015 at 11:06:57PM +0530, Dileep Katta wrote:

> Implemented fb_set_reboot_flag() for OMAP5 to set
> an environment variable 'dofastboot' when reboot-bootloader called.
> 
> This environment variable will be checked in boot command and fastboot
> will be called if the variable is set.
> If the bootcmd env variable of OMAP5 common is overwritten with board-specific
> command, then these changes will not apply.
> 
> This was originally intended for DRA7 platform, but now applies to all OMAP5.
> 
> Ref:
> http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=19da2e436e9806259cf1f4988b9e046ab256bf2c
> 
> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150327/186c3cad/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-27 17:53                         ` Dileep Katta
@ 2015-03-27 18:15                           ` Tom Rini
  2015-03-27 18:25                             ` Marek Vasut
  0 siblings, 1 reply; 49+ messages in thread
From: Tom Rini @ 2015-03-27 18:15 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 27, 2015 at 11:23:08PM +0530, Dileep Katta wrote:

> Experts,
> Please send your valuable comments if this patch needs any change.

Assuming everything has acks I'll pick it up for the next release,
thanks.

> 
> Regards, Dileep
> 
> On 14/03/2015, Lukasz Majewski <l.majewski@majess.pl> wrote:
> > On Sat, 14 Mar 2015 00:58:51 +0530
> > Dileep Katta <dileep.katta@linaro.org> wrote:
> >
> >> Hi Lukasz,
> >>
> >> On 13 March 2015 at 13:23, Lukasz Majewski <l.majewski@samsung.com>
> >> wrote:
> >>
> >> > Hi Dileep,
> >> >
> >> > > g_dnl_gadget_register() fails for dra7xx dwc3 gadget when running
> >> > > cmd_fastboot. Calling board_usb_init() to fix this.
> >> > > fastboot command is now added with an optional controller index
> >> > > argument with default value as 0, to facilitate configurable
> >> > > controller index.
> >> > >
> >> > > Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> >> > > Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> >> > > ---
> >> > > Changes in v2:
> >> > >       - Changed fastboot command to facilitate passing controller
> >> > > index
> >> > >       - Added board_usb_cleanup()
> >> > > This patch considers the following change by Inha Song, without
> >> > > which the build will be broken on BeagleBone Black platform
> >> > >       https://patchwork.ozlabs.org/patch/430303/
> >> > >
> >> > >  common/cmd_fastboot.c | 15 ++++++++++++---
> >> > >  1 file changed, 12 insertions(+), 3 deletions(-)
> >> > >
> >> > > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> >> > > index 346ab80..9ca4a2f 100644
> >> > > --- a/common/cmd_fastboot.c
> >> > > +++ b/common/cmd_fastboot.c
> >> > > @@ -10,11 +10,19 @@
> >> > >  #include <common.h>
> >> > >  #include <command.h>
> >> > >  #include <g_dnl.h>
> >> > > +#include <usb.h>
> >> > >
> >> > >  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char
> >> > > *const argv[]) {
> >> > >       int ret;
> >> > > +     int controller_index = 0;
> >> > >
> >> > > +     if (argc == 2) {
> >> > > +             char *usb_controller = argv[1];
> >> > > +             controller_index = simple_strtoul(usb_controller,
> >> > > NULL, 0);
> >> > > +     }
> >> > > +
> >> > > +     board_usb_init(controller_index, USB_INIT_DEVICE);
> >> > >       g_dnl_clear_detach();
> >> > >       ret = g_dnl_register("usb_dnl_fastboot");
> >> > >       if (ret)
> >> > > @@ -36,12 +44,13 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int
> >> > > flag, int argc, char *const argv[])
> >> > >       g_dnl_unregister();
> >> > >       g_dnl_clear_detach();
> >> > > +     board_usb_cleanup(controller_index, USB_INIT_DEVICE);
> >> > >       return CMD_RET_SUCCESS;
> >> > >  }
> >> > >
> >> > >  U_BOOT_CMD(
> >> > > -     fastboot,       1,      0,      do_fastboot,
> >> > > +     fastboot,       2,      0,      do_fastboot,
> >> > >       "use USB Fastboot protocol",
> >> > > -     "\nLukasz Majewski <l.majewski@samsung.com>"
> >> > > -     "    - run as a fastboot usb device"
> >> > > +     "[<USB_controller>]\n"
> >> > > +     "    - run as a fastboot usb device via <USB_controller>"
> >> > >  );
> >> >
> >> > Acked-by: Lukasz Majewski <l.majewski@samsung.com>
> >> >
> >> > Since I'm not CC'ed to all patches, I assume that this work would go
> >> > via other tree?
> >> >
> >> Other patches are TI board specific and I am working on next version
> >> of the patches as per the review comments.
> >> I felt that this is generic functionality and hence sent it
> >> separately. Do you want me send all patches?
> >
> > No, it is not necessary. Regarding above, I assume that Tom will
> > probably fetch those patches.
> >
> > I was just concern about tree to which this patch should belong.
> >
> > Regards,
> > Lukasz
> >
> >>
> >> Regards, Dileep
> >>
> >> >
> >> > --
> >> > Best regards,
> >> >
> >> > Lukasz Majewski
> >> >
> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
> >> >
> >> _______________________________________________
> >> U-Boot mailing list
> >> U-Boot at lists.denx.de
> >> http://lists.denx.de/mailman/listinfo/u-boot
> >
> >
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150327/772761df/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-27 18:15                           ` Tom Rini
@ 2015-03-27 18:25                             ` Marek Vasut
  2015-03-30  8:38                               ` Lukasz Majewski
  0 siblings, 1 reply; 49+ messages in thread
From: Marek Vasut @ 2015-03-27 18:25 UTC (permalink / raw)
  To: u-boot

On Friday, March 27, 2015 at 07:15:18 PM, Tom Rini wrote:
> On Fri, Mar 27, 2015 at 11:23:08PM +0530, Dileep Katta wrote:
> > Experts,
> > Please send your valuable comments if this patch needs any change.
> 
> Assuming everything has acks I'll pick it up for the next release,
> thanks.

Lukasz can pick it through the correct tree for next release just fine I think.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb
  2015-03-27 18:25                             ` Marek Vasut
@ 2015-03-30  8:38                               ` Lukasz Majewski
  0 siblings, 0 replies; 49+ messages in thread
From: Lukasz Majewski @ 2015-03-30  8:38 UTC (permalink / raw)
  To: u-boot

Hi Marek,

> On Friday, March 27, 2015 at 07:15:18 PM, Tom Rini wrote:
> > On Fri, Mar 27, 2015 at 11:23:08PM +0530, Dileep Katta wrote:
> > > Experts,
> > > Please send your valuable comments if this patch needs any change.
> > 
> > Assuming everything has acks I'll pick it up for the next release,
> > thanks.
> 
> Lukasz can pick it through the correct tree for next release just
> fine I think.

And adding Lukasz to CC would really speed up the process :-)

> 
> Best regards,
> Marek Vasut



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [U-Boot,v3,1/3] ARM: DRA7XX: Enable Fastboot
  2015-03-24 22:34                 ` [U-Boot] [PATCH v3 1/3] ARM: DRA7XX: Enable Fastboot Dileep Katta
                                     ` (2 preceding siblings ...)
  2015-03-27 14:19                   ` [U-Boot] [PATCH v3 1/3] ARM: DRA7XX: Enable Fastboot Tom Rini
@ 2015-04-23 22:03                   ` Tom Rini
  3 siblings, 0 replies; 49+ messages in thread
From: Tom Rini @ 2015-04-23 22:03 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 25, 2015 at 04:04:50AM +0530, Dileep Katta wrote:

> - Fastboot is enable by default for DRA7XX
>         - 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>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150423/29a57da6/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [U-Boot, v3, 2/3] ARM: DRA7: Set serial number environment variable
  2015-03-24 22:34                   ` [U-Boot] [PATCH v3 2/3] ARM: DRA7: Set serial number environment variable Dileep Katta
  2015-03-27 14:19                     ` Tom Rini
@ 2015-04-23 22:03                     ` Tom Rini
  1 sibling, 0 replies; 49+ messages in thread
From: Tom Rini @ 2015-04-23 22:03 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 25, 2015 at 04:04:51AM +0530, Dileep Katta wrote:

> This patch populates serial number environment variable from
> die_id_0 and die_id_1 register values for DRA7xx boards.
> 
> The function is added in omap common code so that this can be re-used.
> 
> Serial# environment variable will be useful to show correct
> information in "fastboot devices" commands.
> 
> Ref:
> http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=a6bcaaf67f6e4bcd97808f53d0ceb4b0c04d583c
> 
> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150423/05cf1beb/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [U-Boot] [U-Boot, v4, 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader
  2015-03-27 17:36                         ` [U-Boot] [PATCH v4 " Dileep Katta
  2015-03-27 18:02                           ` Tom Rini
@ 2015-04-23 22:03                           ` Tom Rini
  1 sibling, 0 replies; 49+ messages in thread
From: Tom Rini @ 2015-04-23 22:03 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 27, 2015 at 11:06:57PM +0530, Dileep Katta wrote:
> Implemented fb_set_reboot_flag() for OMAP5 to set

> an environment variable 'dofastboot' when reboot-bootloader called.
> 
> This environment variable will be checked in boot command and fastboot
> will be called if the variable is set.
> If the bootcmd env variable of OMAP5 common is overwritten with board-specific
> command, then these changes will not apply.
> 
> This was originally intended for DRA7 platform, but now applies to all OMAP5.
> 
> Ref:
> http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=19da2e436e9806259cf1f4988b9e046ab256bf2c
> 
> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150423/0c20527f/attachment.sig>

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2015-04-23 22:03 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03 11:10 [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support Dileep Katta
2015-03-03 11:10 ` [U-Boot] [PATCH v2 2/4] fastboot: call board_usb_init() to enable usb Dileep Katta
2015-03-04 13:19   ` Lukasz Majewski
2015-03-04 17:05   ` Stegmaier, Angela
2015-03-04 18:29     ` Tom Rini
2015-03-04 19:06       ` Dileep Katta
2015-03-05 14:37         ` Tom Rini
2015-03-12  6:36           ` Dileep Katta
2015-03-12  8:55             ` Lukasz Majewski
2015-03-12 17:28               ` Marek Vasut
2015-03-12 21:12                 ` Dileep Katta
2015-03-13  7:53                   ` Lukasz Majewski
2015-03-13 19:28                     ` Dileep Katta
2015-03-13 20:55                       ` Lukasz Majewski
2015-03-27 17:53                         ` Dileep Katta
2015-03-27 18:15                           ` Tom Rini
2015-03-27 18:25                             ` Marek Vasut
2015-03-30  8:38                               ` Lukasz Majewski
2015-03-03 11:10 ` [U-Boot] [PATCH v3 3/4] ARM: DRA7: Set serial number environment variable Dileep Katta
2015-03-04 13:23   ` Lukasz Majewski
2015-03-04 16:53   ` Tom Rini
2015-03-07  7:00   ` Nishanth Menon
2015-03-03 11:10 ` [U-Boot] [PATCH v1 4/4] ARM: DRA7: fastboot: Implement reboot-bootloader command - Implemented fb_set_reboot_flag() for DRA7 - Defined a weak function, fb_check_reboot_flag() - Implemented for DRA7 Dileep Katta
2015-03-03 14:15   ` Rob Herring
2015-03-04 16:57     ` Tom Rini
2015-03-04 13:31   ` Lukasz Majewski
2015-03-03 11:53 ` [U-Boot] [PATCH v1 1/4] ARM: DRA7XX: Add config file for Android with fastboot support Dileep Katta
2015-03-04 13:18 ` Lukasz Majewski
2015-03-04 16:52 ` Tom Rini
2015-03-12  6:31   ` Dileep Katta
2015-03-12 19:29     ` Tom Rini
2015-03-17 18:38       ` [U-Boot] [PATCH v2 1/1] " Dileep Katta
2015-03-18 16:11         ` Tom Rini
2015-03-18 21:12           ` Dileep Katta
2015-03-19 13:15             ` Tom Rini
2015-03-23 22:41               ` Dileep Katta
2015-03-24 22:34                 ` [U-Boot] [PATCH v3 1/3] ARM: DRA7XX: Enable Fastboot Dileep Katta
2015-03-24 22:34                   ` [U-Boot] [PATCH v3 2/3] ARM: DRA7: Set serial number environment variable Dileep Katta
2015-03-27 14:19                     ` Tom Rini
2015-04-23 22:03                     ` [U-Boot] [U-Boot, v3, " Tom Rini
2015-03-24 22:34                   ` [U-Boot] [PATCH v3 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader Dileep Katta
2015-03-27 14:19                     ` Tom Rini
2015-03-27 17:28                       ` Dileep Katta
2015-03-27 17:36                         ` [U-Boot] [PATCH v4 " Dileep Katta
2015-03-27 18:02                           ` Tom Rini
2015-04-23 22:03                           ` [U-Boot] [U-Boot, v4, " Tom Rini
2015-03-27 14:19                   ` [U-Boot] [PATCH v3 1/3] ARM: DRA7XX: Enable Fastboot Tom Rini
2015-04-23 22:03                   ` [U-Boot] [U-Boot,v3,1/3] " Tom Rini
2015-03-23  8:50         ` [U-Boot] [PATCH v2 1/1] ARM: DRA7XX: Add config file for Android with fastboot support Lukasz Majewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.