aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2014-11-17 15:37:26 -0600
committerRob Herring <robh@kernel.org>2014-11-17 15:37:26 -0600
commit43dbf1ec084e8541e9ce088d6d28603b5e53d070 (patch)
tree8b7ae703644c4a549031474d0b3c1c30196de8c4 /include
parent9e8ee913228a55458d570028672c6701b2b3f59e (diff)
parent248084f4fec630cc54d92b0aefcf4a94f6d294ac (diff)
Merge branches 'v2014.10-pxa1928' and 'v2014.10-jetson' into v2014.10-ara
Diffstat (limited to 'include')
-rw-r--r--include/android_image.h3
-rw-r--r--include/command.h7
-rw-r--r--include/config_distro_bootcmd.h19
-rw-r--r--include/configs/jetson-tk1.h59
-rw-r--r--include/configs/tegra-common-post.h12
-rw-r--r--include/configs/tegra-common-usb-gadget.h6
-rw-r--r--include/configs/tegra-common.h2
-rw-r--r--include/configs/tegra124-common.h6
8 files changed, 112 insertions, 2 deletions
diff --git a/include/android_image.h b/include/android_image.h
index 094d60afe8..e982111484 100644
--- a/include/android_image.h
+++ b/include/android_image.h
@@ -31,7 +31,8 @@ struct andr_img_hdr {
u32 tags_addr; /* physical addr for kernel tags */
u32 page_size; /* flash page size we assume */
- u32 unused[2]; /* future expansion: should be 0 */
+ u32 dt_size; /* device tree in bytes */
+ u32 unused; /* future expansion: should be 0 */
char name[ANDR_BOOT_NAME_SIZE]; /* asciiz product name */
diff --git a/include/command.h b/include/command.h
index 6f06db1cc3..dc1d4ba73b 100644
--- a/include/command.h
+++ b/include/command.h
@@ -89,12 +89,19 @@ int cmd_process_error(cmd_tbl_t *cmdtp, int err);
extern int cmd_get_data_size(char* arg, int default_size);
#endif
+#ifdef CONFIG_CMD_FASTBOOT
+extern int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
+#endif
+
#ifdef CONFIG_CMD_BOOTD
extern int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
#endif
#ifdef CONFIG_CMD_BOOTM
extern int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
extern int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd);
+#ifdef CONFIG_CMD_BOOTAI
+extern int do_bootai(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+#endif
#else
static inline int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd)
{
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index be616e8bfd..56cc33745c 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -28,6 +28,25 @@
#define BOOTENV_DEV_NAME_BLKDEV(devtypeu, devtypel, instance) \
#devtypel #instance " "
+#ifdef CONFIG_CMD_BOOTAI
+#define BOOTENV_DEV_BLKDEV_ANDROID(devtypeu, devtypel, instance) \
+ "bootcmd_" #devtypel #instance "=" \
+ "if mmc dev " #instance "; " \
+ "then setenv devtype mmc; " \
+ "setenv devnum " #instance "; " \
+ "bootai " #instance "; fi\0"
+
+#define BOOTENV_SHARED_ANDROID
+#define BOOTENV_DEV_ANDROID BOOTENV_DEV_BLKDEV_ANDROID
+#define BOOTENV_DEV_NAME_ANDROID BOOTENV_DEV_NAME_BLKDEV
+#else
+#define BOOTENV_SHARED_ANDROID
+#define BOOTENV_DEV_ANDROID \
+ BOOT_TARGET_DEVICES_references_ANDROID_without_CONFIG_CMD_BOOTAI
+#define BOOTENV_DEV_NAME_ANDROID \
+ BOOT_TARGET_DEVICES_references_ANDROID_without_CONFIG_CMD_BOOTAI
+#endif
+
#ifdef CONFIG_CMD_MMC
#define BOOTENV_SHARED_MMC BOOTENV_SHARED_BLKDEV(mmc)
#define BOOTENV_DEV_MMC BOOTENV_DEV_BLKDEV
diff --git a/include/configs/jetson-tk1.h b/include/configs/jetson-tk1.h
index d67c025b9c..bf522b6990 100644
--- a/include/configs/jetson-tk1.h
+++ b/include/configs/jetson-tk1.h
@@ -10,8 +10,36 @@
#include <linux/sizes.h>
+/* LP0 suspend / resume */
+#define CONFIG_TEGRA_LP0
+#define CONFIG_AES
+
#include "tegra124-common.h"
+#ifdef CONFIG_SYS_MALLOC_LEN
+#undef CONFIG_SYS_MALLOC_LEN
+#endif
+#define CONFIG_SYS_MALLOC_LEN (128 << 20) /* 128MB for fastboot bounce_buffer */
+
+#ifdef CONFIG_TEGRA_LP0
+#define CONFIG_TEGRA124_LP0
+#endif
+
+#define CONFIG_OF_LIBFDT
+#define CONFIG_OF_BOARD_SETUP
+#define CONFIG_MISC_INIT_R /* call misc_init_r during start up */
+
+#define CONFIG_SETUP_MEMORY_TAGS 1
+#define CONFIG_INITRD_TAG 1
+#define CONFIG_SERIAL_TAG 1
+
+/* The following are used to retrieve the board id from an eeprom */
+#define CONFIG_SERIAL_EEPROM
+#define EEPROM_I2C_BUS 1
+#define EEPROM_I2C_ADDRESS 0x56
+#define EEPROM_SERIAL_OFFSET 0x04
+#define NUM_SERIAL_ID_BYTES 8
+
/* High-level configuration options */
#define V_PROMPT "Tegra124 (Jetson TK1) # "
#define CONFIG_TEGRA_BOARD_STRING "NVIDIA Jetson TK1"
@@ -22,6 +50,7 @@
#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
#define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_BOARD_LATE_INIT
/* I2C */
#define CONFIG_SYS_I2C_TEGRA
@@ -70,6 +99,36 @@
#define CONFIG_CMD_NET
#define CONFIG_CMD_DHCP
+/* Fastboot support */
+#define CONFIG_CMD_FASTBOOT
+
+#ifdef CONFIG_CMD_FASTBOOT
+#define CONFIG_ANDROID_BOOT_IMAGE
+#define CONFIG_CMD_BOOTAI
+#define CONFIG_CMD_BOOTAI_IGNORE_HDR_ADDR
+#define MEMORY_BASE 0x80000000
+#define CONFIG_ADDR_DOWNLOAD (MEMORY_BASE + 0x12000000)
+#define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_ADDR_DOWNLOAD
+#define CONFIG_USB_FASTBOOT_BUF_SIZE 0x40000000
+#define CONFIG_FASTBOOT_FLASH
+#define CONFIG_FASTBOOT_FLASH_MMC_DEV 0
+#define BOARD_EXTRA_ENV_SETTINGS \
+ "bootargs_append=" \
+ "init=init console=ttyS0,115200n8 " \
+ "lp0_vec=2064@0xf46ff000 mem=1862M@2048M vpr=151M@3945M tsec=32M@3913M " \
+ "core_edp_mv=1150 core_edp_ma=4000 " \
+ "tegraid=40.1.1.0.0 tegra_fbmem=32899072@0xad012000 fbcon=map:1 " \
+ "video=tegrafb memtype=255 ddr_die=2048M@2048M section=256M " \
+ "debug_uartport=lsport,3 " \
+ "power_supply=Adapter audio_codec=rt5640 " \
+ "modem_id=0 commchip_id=0 " \
+ "usbcore.old_scheme_first=1 usb_port_owner_info=0 " \
+ "lane_owner_info=6 emc_max_dvfs=0 touch_id=0@0 " \
+ "pmuboard=0x0177:0x0000:0x02:0x43:0x00 " \
+ "otf_key=c75e5bb91eb3bd947560357b64422f85 " \
+ "board_info=0x0177:0x0000:0x02:0x43:0x00\0"
+#endif
+
#include "tegra-common-usb-gadget.h"
#include "tegra-common-post.h"
diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
index 23e3c8af31..dfe0229934 100644
--- a/include/configs/tegra-common-post.h
+++ b/include/configs/tegra-common-post.h
@@ -9,12 +9,24 @@
#define __TEGRA_COMMON_POST_H
#ifndef CONFIG_SPL_BUILD
+#ifdef CONFIG_CMD_BOOTAI
+#define CONFIG_CMD_BOOTAI_BOOT_PART "LNX"
+#define CONFIG_CMD_BOOTAI_RECOVERY_PART "SOS"
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
+ func(ANDROID, android, 0) \
func(MMC, mmc, 0) \
func(USB, usb, 0) \
func(PXE, pxe, na) \
func(DHCP, dhcp, na)
+#else
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 1) \
+ func(MMC, mmc, 0) \
+ func(USB, usb, 0) \
+ func(PXE, pxe, na) \
+ func(DHCP, dhcp, na)
+#endif
#include <config_distro_bootcmd.h>
#else
#define BOOTENV
diff --git a/include/configs/tegra-common-usb-gadget.h b/include/configs/tegra-common-usb-gadget.h
index 287460c132..ea3794feb3 100644
--- a/include/configs/tegra-common-usb-gadget.h
+++ b/include/configs/tegra-common-usb-gadget.h
@@ -15,8 +15,14 @@
#define CONFIG_CI_UDC
#define CONFIG_CI_UDC_HAS_HOSTPC
#define CONFIG_USB_GADGET_DUALSPEED
+#ifdef CONFIG_CMD_FASTBOOT
+/* Use Google fastboot vid/pid */
+#define CONFIG_G_DNL_VENDOR_NUM 0x18d1
+#define CONFIG_G_DNL_PRODUCT_NUM 0x0100
+#else
#define CONFIG_G_DNL_VENDOR_NUM 0x0955
#define CONFIG_G_DNL_PRODUCT_NUM 0x701A
+#endif
#define CONFIG_G_DNL_MANUFACTURER "NVIDIA"
#define CONFIG_USBDOWNLOAD_GADGET
/* USB mass storage protocol */
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 834b3d5686..ed80b45bfe 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -105,7 +105,7 @@
* Increasing the size of the IO buffer as default nfsargs size is more
* than 256 and so it is not possible to edit it
*/
-#define CONFIG_SYS_CBSIZE (256 * 2) /* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE (512 * 2) /* Console I/O Buffer Size */
/* Print Buffer Size */
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
sizeof(CONFIG_SYS_PROMPT) + 16)
diff --git a/include/configs/tegra124-common.h b/include/configs/tegra124-common.h
index 61e5026574..9fe04f81de 100644
--- a/include/configs/tegra124-common.h
+++ b/include/configs/tegra124-common.h
@@ -76,4 +76,10 @@
#define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10
#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 1
+#ifdef CONFIG_TEGRA_LP0
+#define TEGRA_LP0_ADDR 0xF46FF000
+#define TEGRA_LP0_SIZE 0x2000
+#define TEGRA_LP0_ALIGN 0x10
+#endif
+
#endif /* _TEGRA124_COMMON_H_ */