From 70616df2bfbb4de675b93aa85e8aec744346fede Mon Sep 17 00:00:00 2001 From: Sandy Patterson Date: Mon, 29 Aug 2016 07:31:17 -0400 Subject: Enable ROCKCHIP_SPL_BACK_TO_BROM for rock2 board Rock2 has been tested with back to brom feature. The tricky part is that with this feature the default environment is inside u-boot, and it's defined for every rk3288 board independetly. So I just changed it for rock2 here if ROCKCHIP_SPL_BACK_TO_BROM. Solve by moving environment after u-boot before 1M boundary Signed-off-by: Sandy Patterson Acked-by: Simon Glass --- include/configs/rock2.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/configs/rock2.h b/include/configs/rock2.h index ee924c3816d..99d69155d21 100644 --- a/include/configs/rock2.h +++ b/include/configs/rock2.h @@ -16,11 +16,20 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 + +#ifdef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM +/* SPL @ 32k for 34k + * u-boot directly after @ 68k for 400k or so + * ENV @ 992k + */ +#define CONFIG_ENV_OFFSET ((1024-32) * 1024) +#else /* SPL @ 32k for ~36k * ENV @ 96k * u-boot @ 128K */ #define CONFIG_ENV_OFFSET (96 * 1024) +#endif #define CONFIG_SYS_WHITE_ON_BLACK #define CONFIG_CONSOLE_SCROLL_LINES 10 -- cgit v1.2.3 From e73e5fcd8498b5db7bb604ef2223d636a54505ff Mon Sep 17 00:00:00 2001 From: "jacob2.chen" Date: Tue, 30 Aug 2016 01:26:14 +0800 Subject: rockchip: add usb mass storage feature support for rk3036 Enable ums feature for rk3036 boards, so that we can mount the mmc device to PC. Signed-off-by: jacob2.chen Acked-by: Simon Glass --- include/configs/rk3036_common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h index 4b266627441..1b411c06320 100644 --- a/include/configs/rk3036_common.h +++ b/include/configs/rk3036_common.h @@ -70,6 +70,10 @@ #define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR #define CONFIG_FASTBOOT_BUF_SIZE 0x08000000 +/* usb mass storage */ +#define CONFIG_USB_FUNCTION_MASS_STORAGE +#define CONFIG_CMD_USB_MASS_STORAGE + #define CONFIG_USB_GADGET_DOWNLOAD #define CONFIG_G_DNL_MANUFACTURER "Rockchip" #define CONFIG_G_DNL_VENDOR_NUM 0x2207 -- cgit v1.2.3 From c12777a625544a6ac19c4496d255ff6010f3a8a8 Mon Sep 17 00:00:00 2001 From: Xu Ziyuan Date: Fri, 9 Sep 2016 21:44:50 +0800 Subject: rockchip: miniarm: remove eMMC support The latest rk3288-miniarm board doesn't have eMMC device, so remove it. Signed-off-by: Ziyuan Xu Acked-by: Simon Glass --- include/configs/miniarm_rk3288.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/miniarm_rk3288.h b/include/configs/miniarm_rk3288.h index 390c243cae7..aa259dbefd3 100644 --- a/include/configs/miniarm_rk3288.h +++ b/include/configs/miniarm_rk3288.h @@ -10,8 +10,13 @@ #define ROCKCHIP_DEVICE_SETTINGS #include +#undef BOOT_TARGET_DEVICES + +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) + #define CONFIG_ENV_IS_IN_MMC -#define CONFIG_SYS_MMC_ENV_DEV 1 +#define CONFIG_SYS_MMC_ENV_DEV 0 /* SPL @ 32k for ~36k * ENV @ 96k * u-boot @ 128K -- cgit v1.2.3 From 73a85989713cce45a6999ea4305a5d09f0db25dd Mon Sep 17 00:00:00 2001 From: Jacob Chen Date: Mon, 19 Sep 2016 18:46:25 +0800 Subject: rockchip: move partitons define from 3036-kylin to 3036-common To keep it same with 3288. Signed-off-by: Jacob Chen Acked-by: Simon Glass --- include/configs/kylin_rk3036.h | 24 ------------------------ include/configs/rk3036_common.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 24 deletions(-) (limited to 'include') diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h index e8ca76dfcfa..39fb2393e36 100644 --- a/include/configs/kylin_rk3036.h +++ b/include/configs/kylin_rk3036.h @@ -23,30 +23,6 @@ #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) #define CONFIG_SYS_REDUNDAND_ENVIRONMENT -/* Enable gpt partition table */ -#define CONFIG_CMD_GPT -#define CONFIG_RANDOM_UUID -#define PARTS_DEFAULT \ - "uuid_disk=${uuid_gpt_disk};" \ - "name=loader,start=32K,size=4000K,uuid=${uuid_gpt_loader};" \ - "name=reserved,size=64K,uuid=${uuid_gpt_reserved};" \ - "name=misc,size=4M,uuid=${uuid_gpt_misc};" \ - "name=recovery,size=32M,uuid=${uuid_gpt_recovery};" \ - "name=boot_a,size=32M,uuid=${uuid_gpt_boot_a};" \ - "name=boot_b,size=32M,uuid=${uuid_gpt_boot_b};" \ - "name=system_a,size=818M,uuid=${uuid_gpt_system_a};" \ - "name=system_b,size=818M,uuid=${uuid_gpt_system_b};" \ - "name=vendor_a,size=50M,uuid=${uuid_gpt_vendor_a};" \ - "name=vendor_b,size=50M,uuid=${uuid_gpt_vendor_b};" \ - "name=cache,size=100M,uuid=${uuid_gpt_cache};" \ - "name=metadata,size=16M,uuid=${uuid_gpt_metadata};" \ - "name=persist,size=4M,uuid=${uuid_gpt_persist};" \ - "name=userdata,size=-,uuid=${uuid_gpt_userdata};\0" \ - -#undef CONFIG_EXTRA_ENV_SETTINGS -#define CONFIG_EXTRA_ENV_SETTINGS \ - "partitions=" PARTS_DEFAULT \ - #endif #define CONFIG_BOARD_LATE_INIT diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h index 1b411c06320..6ddf0d9f4b8 100644 --- a/include/configs/rk3036_common.h +++ b/include/configs/rk3036_common.h @@ -79,6 +79,9 @@ #define CONFIG_G_DNL_VENDOR_NUM 0x2207 #define CONFIG_G_DNL_PRODUCT_NUM 0x310a +/* Enable gpt partition table */ +#define CONFIG_CMD_GPT + #include #define ENV_MEM_LAYOUT_SETTINGS \ @@ -88,6 +91,12 @@ "kernel_addr_r=0x62000000\0" \ "ramdisk_addr_r=0x64000000\0" +#define CONFIG_RANDOM_UUID +#define PARTS_DEFAULT \ + "uuid_disk=${uuid_gpt_disk};" \ + "name=boot,start=8M,size=64M,bootable,uuid=${uuid_gpt_boot};" \ + "name=rootfs,size=-,uuid=${uuid_gpt_rootfs};\0" \ + /* First try to boot from SD (index 0), then eMMC (index 1 */ #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ @@ -99,6 +108,7 @@ * so limit the fdt reallocation to that */ #define CONFIG_EXTRA_ENV_SETTINGS \ "fdt_high=0x7fffffff\0" \ + "partitions=" PARTS_DEFAULT \ ENV_MEM_LAYOUT_SETTINGS \ BOOTENV #endif -- cgit v1.2.3 From 67171e13a3e0665b18c657a6704a22ca7900f4c3 Mon Sep 17 00:00:00 2001 From: Jacob Chen Date: Mon, 19 Sep 2016 18:46:28 +0800 Subject: rockchip: add boot-mode support for rk3288, rk3036 rockchip platform have a protocol to pass the the kernel reboot mode to bootloader by some special registers when system reboot. In bootloader we should read it and take action. We can only setup boot_mode in board_late_init becasue "setenv" need env setuped. So add CONFIG_BOARD_LATE_INIT to common header and use a entry "rk_board_late_init" to replace "board_late_init" in board file. Signed-off-by: Jacob Chen Acked-by: Simon Glass --- include/configs/kylin_rk3036.h | 3 --- include/configs/rk3036_common.h | 3 +++ include/configs/rk3288_common.h | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h index 39fb2393e36..4f0bd84ad82 100644 --- a/include/configs/kylin_rk3036.h +++ b/include/configs/kylin_rk3036.h @@ -25,7 +25,4 @@ #endif -#define CONFIG_BOARD_LATE_INIT -#define CONFIG_PREBOOT - #endif diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h index 6ddf0d9f4b8..73830e4aa53 100644 --- a/include/configs/rk3036_common.h +++ b/include/configs/rk3036_common.h @@ -113,4 +113,7 @@ BOOTENV #endif +#define CONFIG_BOARD_LATE_INIT +#define CONFIG_PREBOOT + #endif diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h index e8bf9878f24..9ddfe1daeb6 100644 --- a/include/configs/rk3288_common.h +++ b/include/configs/rk3288_common.h @@ -132,4 +132,7 @@ BOOTENV #endif +#define CONFIG_BOARD_LATE_INIT +#define CONFIG_PREBOOT + #endif -- cgit v1.2.3