ARM: k2g: Add support for new K2G ICE EVM.
Subsystems (5)
cover ARM: k2g: Add support for new K2G ICE EVM.
This patchset adds support for the new Keystone 2 Industrial Communication Engine board.
This patchset includes the introduction of embedded FIT images in U-boot. This creates a FIT image of dtb files that enables board specific code to select which DTB to use at runtime. Initially during boot a generic DTB is required that enables board detection to occur and once it has can later be swapped out for the correct dtb.
Franklin S Cooper Jr (28):
spl: fit: Break out some functions into a common file
boot_fit: Create helper functions that can be used to select DTB out
of FIT
fdt: Enable selecting correct DTB from append FIT Image
ti: common: board_detect: Add function to determine if EEPROM was read
dts: Allow OF_LIST to depend on FIT_EMBED
arm: dts: Add new "generic" 66AK2Gx device tree file.
ti_armv7_keystone2: Define scratch space in SRAM
ARM: k2g: Enable TI board detection code
board_f: Add new function to allow runtime DTB selection
Makefile: Build additional binaries for dtb FIT blobs appended to
U-boot
ARM: keystone2: Allow to build with all image formats
ARM: k2g: Define embedded_dtb_select for runtime DTB selection in
U-boot
ARM: keystone2: Define board_fit_config_name_match for Keystone 2
boards
ks2_evm: Add EEPROM based board detection
defconfig: keystone2: Enable U-boot runtime DTB detection
ARM: keystone2: Add additional fields used for DDR3 configuration
ARM: k2g: Program DDR PHY MR2 register with the default value
ARM: k2g: Program DDRPHY_DATX8 registers via mask and value variables
ks2_evm: Add EEPROM based board detection helper functions
ARM: k2g: Add pinmux support for K2G ICE evm
ARM: k2g: Add DDR3 configuration for K2G ICE evm
board: ks2: Use board detection to wrap code not specific to K2G ICE
evm
ARM: k2g: Use board detection to wrap K2G GP specific calls
ARM: k2g: Update board_name u-boot env variable at runtime
ARM: dts: k2g: Disable netcp by default
ARM: dts: k2g: Add DT support for K2G Industrial Communication Engine
evm
ARM: k2g: Add K2G ICE DTB to the list of possible DTBs
defconfig: k2g_evm_defconfig: Add K2G ICE to OF_LIST
Lokesh Vutla (1):
ti: common: board_detect: Rename EEPROM scratch start macro
Nishanth Menon (1):
ti: common: board_detect: Allow settings board detection variables
manually
Roger Quadros (1):
ARM: Use Kconfig for board EEPROM's I2C bus and chip address
.gitignore | 1 + Makefile | 18 ++++- arch/arm/dts/Makefile | 4 +- arch/arm/dts/keystone-k2g-evm.dts | 4 ++ arch/arm/dts/keystone-k2g-generic.dts | 21 ++++++ arch/arm/dts/keystone-k2g-ice.dts | 25 +++++++ arch/arm/dts/keystone-k2g-netcp.dtsi | 1 + arch/arm/include/asm/omap_common.h | 8 ++- arch/arm/mach-keystone/Kconfig | 1 + arch/arm/mach-keystone/config.mk | 4 +- arch/arm/mach-keystone/ddr3.c | 35 ++++++++-- arch/arm/mach-keystone/include/mach/ddr3.h | 14 ++++ arch/arm/mach-keystone/include/mach/hardware.h | 3 + board/ti/common/Kconfig | 20 +++++- board/ti/common/board_detect.c | 34 ++++++++++ board/ti/common/board_detect.h | 28 +++++++- board/ti/ks2_evm/Kconfig | 2 + board/ti/ks2_evm/board.c | 21 ++++-- board/ti/ks2_evm/board.h | 21 ++++++ board/ti/ks2_evm/board_k2e.c | 10 +++ board/ti/ks2_evm/board_k2g.c | 93 +++++++++++++++++++++++--- board/ti/ks2_evm/board_k2hk.c | 10 +++ board/ti/ks2_evm/board_k2l.c | 10 +++ board/ti/ks2_evm/ddr3_k2g.c | 78 ++++++++++++++++++++- board/ti/ks2_evm/mux-k2g.h | 45 ++++++++++++- common/Kconfig | 18 +++++ common/Makefile | 2 + common/board_f.c | 3 + common/boot_fit.c | 58 ++++++++++++++++ common/common_fit.c | 86 ++++++++++++++++++++++++ common/spl/spl_fit.c | 76 +-------------------- configs/k2e_evm_defconfig | 3 + configs/k2g_evm_defconfig | 3 + configs/k2hk_evm_defconfig | 3 + configs/k2l_evm_defconfig | 3 + dts/Kconfig | 11 +-- include/boot_fit.h | 9 +++ include/common.h | 4 ++ include/configs/am57xx_evm.h | 4 -- include/configs/dra7xx_evm.h | 4 -- include/configs/k2g_evm.h | 14 +++- include/configs/ti_armv7_keystone2.h | 7 ++ include/image.h | 8 +++ lib/fdtdec.c | 10 +++ 44 files changed, 710 insertions(+), 127 deletions(-) create mode 100644 arch/arm/dts/keystone-k2g-generic.dts create mode 100644 arch/arm/dts/keystone-k2g-ice.dts create mode 100644 common/boot_fit.c create mode 100644 common/common_fit.c create mode 100644 include/boot_fit.h
Signature · 1 line
2.10.0
PATCH 1/31 ti: common: board_detect: Allow settings board detection variables manually
From: Nishanth Menon <[email protected]>
In some situations the EEPROM used for board detection may not be programmed or simply programmed incorrectly. Therefore, it may be necessary to "simulate" reading the contents of the EEPROM to set appropriate variables used in the board detection code.
This may also be helpful in certain boot modes where doing i2c reads may be costly and the config supports running only a specific board.
--- board/ti/common/board_detect.c | 24 ++++++++++++++++++++++++ board/ti/common/board_detect.h | 17 +++++++++++++++++ 2 files changed, 41 insertions(+)
board/ti/common/board_detect.c +24 -0
@@ -116,6 +116,30 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr,return 0 ; } +int __maybe_unused ti_i2c_eeprom_am_set (const char *name,const char *rev) +{ +struct ti_common_eeprom *ep; + +if (!name || !rev) +return -1 ; + + ep =TI_EEPROM_DATA ; +if (ep->header ==TI_EEPROM_HEADER_MAGIC ) + goto already_set; + +/* Set to 0 all fields */ +memset (ep,0 ,sizeof (*ep)); +strncpy (ep->name, name,TI_EEPROM_HDR_NAME_LEN ); +strncpy (ep->version, rev,TI_EEPROM_HDR_REV_LEN ); +/* Some dummy serial number to identify the platform */ +strncpy (ep->serial,"0000" ,TI_EEPROM_HDR_SERIAL_LEN ); +/* Mark it with a valid header */ + ep->header =TI_EEPROM_HEADER_MAGIC ; + +already_set: +return 0 ; +} +int __maybe_unused ti_i2c_eeprom_am_get (int bus_addr,int dev_addr) {int rc;
board/ti/common/board_detect.h +17 -0
@@ -193,4 +193,21 @@ u64 board_ti_get_emif2_size(void);*/ void set_board_info_env (char *name); +/** +* ti_i2c_eeprom_am_set() - Setup the eeprom data with predefined values +* @name: Name of the board +* @rev: Revision of the board +* +* In some cases such as in RTC-only mode, we are able to skip reading eeprom +* and wasting i2c based initialization time by using predefined flags for +* detecting what platform we are booting on. For those platforms, provide +* a handy function to pre-program information. +* +* NOTE: many eeprom information such as serial number, mac address etc is not +* available. +* +* Return: 0 if all went fine, else return error. +*/ +int ti_i2c_eeprom_am_set (const char *name,const char *rev); +#endif /* __BOARD_DETECT_H */
Signature · 1 line
2.10.0
PATCH 1/31 ti: common: board_detect: Allow settings board detection variables manually
Hi,
Quoted 61 lines · Franklin S Cooper Jr
From: Nishanth Menon <[email protected]>
In some situations the EEPROM used for board detection may not be programmed or simply programmed incorrectly. Therefore, it may be necessary to "simulate" reading the contents of the EEPROM to set appropriate variables used in the board detection code.
This may also be helpful in certain boot modes where doing i2c reads may be costly and the config supports running only a specific board.
Signed-off-by Nishanth Menon <[email protected]>Signed-off-by Tero Kristo <[email protected]>Signed-off-by Keerthy <[email protected]>Signed-off-by Franklin S Cooper Jr. <[email protected]>--- board/ti/common/board_detect.c | 24 ++++++++++++++++++++++++ board/ti/common/board_detect.h | 17 +++++++++++++++++ 2 files changed, 41 insertions(+)board/ti/common/board_detect.c +24
-0@@ -116,6 +116,30 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr,return 0 ; } +int __maybe_unused ti_i2c_eeprom_am_set (const char *name,const char *rev) +{ +struct ti_common_eeprom *ep; + +if (!name || !rev) +return -1 ; + + ep =TI_EEPROM_DATA ; +if (ep->header ==TI_EEPROM_HEADER_MAGIC ) + goto already_set; + +/* Set to 0 all fields */ +memset (ep,0 ,sizeof (*ep)); +strncpy (ep->name, name,TI_EEPROM_HDR_NAME_LEN ); +strncpy (ep->version, rev,TI_EEPROM_HDR_REV_LEN ); +/* Some dummy serial number to identify the platform */ +strncpy (ep->serial,"0000" ,TI_EEPROM_HDR_SERIAL_LEN ); +/* Mark it with a valid header */ + ep->header =TI_EEPROM_HEADER_MAGIC ; + +already_set: +return 0 ; +} +int __maybe_unused ti_i2c_eeprom_am_get (int bus_addr,int dev_addr) {int rc;board/ti/common/board_detect.h +0
-0@@ -193,4 +193,21 @@ u64 board_ti_get_emif2_size(void);*/ void set_board_info_env (char *name);
board/ti/common/board_detect.h u64 board_ti_get_emif2_size(void); · line 204
Quoted 10 lines
board/ti/common/board_detect.h +9
-0+/** +* ti_i2c_eeprom_am_set() - Setup the eeprom data with predefined values +* @name: Name of the board +* @rev: Revision of the board +* +* In some cases such as in RTC-only mode, we are able to skip reading eeprom +* and wasting i2c based initialization time by using predefined flags for +* detecting what platform we are booting on. For those platforms, provide +* a handy function to pre-program information.
there's a micro-optimization for some cases here. You can try to read i2c only on first time and save the result to environment. Something like:
if (!getenv("serial#")) {
read_serial_from_eeprom(&serial);
setenv("serial#", serial);
saveenv();
}Of course, this assumes i2c is available and eeprom is properly programmed. For bogus eeprom data, well, can't do much.
Signature · 1 line
balbi
PATCH 1/31 ti: common: board_detect: Allow settings board detection variables manually
Quoted 80 lines · Felipe Balbi
Hi,
Quoted 61 lines · Franklin S Cooper Jr
From: Nishanth Menon <[email protected]>
In some situations the EEPROM used for board detection may not be programmed or simply programmed incorrectly. Therefore, it may be necessary to "simulate" reading the contents of the EEPROM to set appropriate variables used in the board detection code.
This may also be helpful in certain boot modes where doing i2c reads may be costly and the config supports running only a specific board.
Signed-off-by Nishanth Menon <[email protected]>Signed-off-by Tero Kristo <[email protected]>Signed-off-by Keerthy <[email protected]>Signed-off-by Franklin S Cooper Jr. <[email protected]>--- board/ti/common/board_detect.c | 24 ++++++++++++++++++++++++ board/ti/common/board_detect.h | 17 +++++++++++++++++ 2 files changed, 41 insertions(+)board/ti/common/board_detect.c +24
-0@@ -116,6 +116,30 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr,return 0 ; } +int __maybe_unused ti_i2c_eeprom_am_set (const char *name,const char *rev) +{ +struct ti_common_eeprom *ep; + +if (!name || !rev) +return -1 ; + + ep =TI_EEPROM_DATA ; +if (ep->header ==TI_EEPROM_HEADER_MAGIC ) + goto already_set; + +/* Set to 0 all fields */ +memset (ep,0 ,sizeof (*ep)); +strncpy (ep->name, name,TI_EEPROM_HDR_NAME_LEN ); +strncpy (ep->version, rev,TI_EEPROM_HDR_REV_LEN ); +/* Some dummy serial number to identify the platform */ +strncpy (ep->serial,"0000" ,TI_EEPROM_HDR_SERIAL_LEN ); +/* Mark it with a valid header */ + ep->header =TI_EEPROM_HEADER_MAGIC ; + +already_set: +return 0 ; +} +int __maybe_unused ti_i2c_eeprom_am_get (int bus_addr,int dev_addr) {int rc;board/ti/common/board_detect.h +0
-0@@ -193,4 +193,21 @@ u64 board_ti_get_emif2_size(void);*/ void set_board_info_env (char *name);board/ti/common/board_detect.h u64 board_ti_get_emif2_size(void); · line 204
Quoted 10 lines
board/ti/common/board_detect.h +9
-0+/** +* ti_i2c_eeprom_am_set() - Setup the eeprom data with predefined values +* @name: Name of the board +* @rev: Revision of the board +* +* In some cases such as in RTC-only mode, we are able to skip reading eeprom +* and wasting i2c based initialization time by using predefined flags for +* detecting what platform we are booting on. For those platforms, provide +* a handy function to pre-program information. there's a micro-optimization for some cases here. You can try to read i2c only on first time and save the result to environment. Something like:
Quoted 8 lines
if (!getenv("serial#")) { read_serial_from_eeprom(&serial); setenv("serial#", serial); saveenv(); }Of course, this assumes i2c is available and eeprom is properly programmed. For bogus eeprom data, well, can't do much.
Atleast for the purposes I'm using it for I have to deal with non programmed eeprom. The other usecase I've seen was wanting to avoid touching the EEPROM at all.
Quoted 1 line
PATCH 2/31 spl: fit: Break out some functions into a common file
In reply to Franklin S Cooper JrSome of the functions within spl_fit will be used for non spl purposes. Instead of duplicating functions simply break the functions to be reused into its own file.
--- common/Makefile | 1 + common/common_fit.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ common/spl/spl_fit.c | 76 +--------------------------------------------- include/image.h | 8 +++++ 4 files changed, 96 insertions(+), 75 deletions(-) create mode 100644 common/common_fit.c
common/Makefile +1 -0
@@ -94,6 +94,7 @@ obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o +obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o obj-$(CONFIG_SPL_OF_TRANSLATE) += fdt_support.o ifdef CONFIG_SPL_USB_HOST_SUPPORT
common/common_fit.c new file +86 -0
86 lines not on this page · raw message
common/spl/spl_fit.c +1 -75
88 lines not on this page · raw message
include/image.h +8 -0
@@ -18,6 +18,7 @@#include "compiler.h" #include <asm/byteorder.h> +#include <linux/kconfig.h> /* Define this to avoid #ifdefs later on */ struct lmb ;
@@ -1274,6 +1275,13 @@ int board_fit_config_name_match(const char *name);void board_fit_image_post_process (void **p_image,size_t *p_size);#endif /* CONFIG_SPL_FIT_IMAGE_POST_PROCESS */ +#if IS_ENABLED (CONFIG_SPL_LOAD_FIT ) + +ulong fdt_getprop_u32 (const void *fdt,int node,const char *prop); +int fit_select_fdt (const void *fdt,int images,int *fdt_offsetp); + +#endif +/** * Mapping of image types to function handlers to be invoked on the associated * loaded images
Signature · 1 line
2.10.0
PATCH 2/31 spl: fit: Break out some functions into a common file
Hi Franklin,
Quoted 6 lines · Franklin S Cooper Jr
Some of the functions within
spl_fitwill be used for non spl purposes. Instead of duplicating functions simply break the functions to be reused into its own file.Signed-off-by Franklin S Cooper Jr <[email protected]>Reviewed-by Tom Rini <[email protected]>
Quoted 7 lines
--- common/Makefile | 1 + common/common_fit.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ common/spl/spl_fit.c | 76 +--------------------------------------------- include/image.h | 8 +++++ 4 files changed, 96 insertions(+), 75 deletions(-) create mode 100644 common/common_fit.c
This seems to conflict with Andre's series. What is the plan here?
- Simon
PATCH 2/31 spl: fit: Break out some functions into a common file
+Andre
Quoted 17 lines · Simon Glass
Hi Franklin,
Quoted 6 lines · Franklin S Cooper Jr
Some of the functions within
spl_fitwill be used for non spl purposes. Instead of duplicating functions simply break the functions to be reused into its own file.Signed-off-by Franklin S Cooper Jr <[email protected]>Reviewed-by Tom Rini <[email protected]>Quoted 7 lines
--- common/Makefile | 1 + common/common_fit.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ common/spl/spl_fit.c | 76 +--------------------------------------------- include/image.h | 8 +++++ 4 files changed, 96 insertions(+), 75 deletions(-) create mode 100644 common/common_fit.c
Quoted 1 line
This seems to conflict with Andre's series. What is the plan here?
I'll have to look at it closely again but from what I remember Andre's series was adding additional functionality to functions within spl_fit while I only care about making those same functions accessible beyond SPL. So it depends on whose code is merged first but I don't think it is a big problem to manage.
Quoted 3 lines
- Simon
PATCH 2/31 spl: fit: Break out some functions into a common file
In reply to Franklin S Cooper JrQuoted 6 lines · Franklin S Cooper Jr
Some of the functions within
spl_fitwill be used for non spl purposes. Instead of duplicating functions simply break the functions to be reused into its own file.Signed-off-by Franklin S Cooper Jr <[email protected]>Reviewed-by Tom Rini <[email protected]>
Quoted 7 lines
--- common/Makefile | 1 + common/common_fit.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ common/spl/spl_fit.c | 76 +--------------------------------------------- include/image.h | 8 +++++ 4 files changed, 96 insertions(+), 75 deletions(-) create mode 100644 common/common_fit.c
PATCH 3/31 boot_fit: Create helper functions that can be used to select DTB out of FIT
In reply to Franklin S Cooper JrSome platforms may append a FIT image to the U-boot image. This function aids in parsing the FIT image and selecting the correct DTB at runtime.
--- common/Kconfig | 8 ++++++++ common/Makefile | 1 + common/boot_fit.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ include/boot_fit.h | 9 +++++++++ include/image.h | 2 +- 5 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 common/boot_fit.c create mode 100644 include/boot_fit.h
common/Kconfig +8 -0
@@ -352,6 +352,14 @@ config SYS_STDIO_DEREGISTER endmenu +config FIT_EMBED + bool "Support a FIT image embedded in the U-boot image" + default n + help + This option provides hooks to allow U-boot to parse an + appended FIT image and enable board specific code to then select + the correct DTB to be used. + config DEFAULT_FDT_FILE string "Default fdt file" help
common/Makefile +1 -0
@@ -150,6 +150,7 @@ obj-y += image.o obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o obj-$(CONFIG_$(SPL_)OF_LIBFDT) += image-fdt.o obj-$(CONFIG_$(SPL_)FIT) += image-fit.o +obj-$(CONFIG_FIT_EMBED) += boot_fit.o common_fit.o obj-$(CONFIG_$(SPL_)FIT_SIGNATURE) += image-sig.o obj-$(CONFIG_IO_TRACE) += iotrace.o obj-y += memsize.o
common/boot_fit.c new file +58 -0
58 lines not on this page · raw message
include/boot_fit.h new file +9 -0
@@ -0,0 +1,9 @@ +/* +* Copyright (C) 2017 Texas Instruments +* Written by Franklin Cooper Jr. <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +int fdt_offset (void *fit); +void *locate_dtb_in_fit (void *fit);
include/image.h +1 -1
@@ -1275,7 +1275,7 @@ int board_fit_config_name_match(const char *name);void board_fit_image_post_process (void **p_image,size_t *p_size);#endif /* CONFIG_SPL_FIT_IMAGE_POST_PROCESS */ -#if IS_ENABLED (CONFIG_SPL_LOAD_FIT ) +#if IS_ENABLED (CONFIG_SPL_LOAD_FIT ) ||IS_ENABLED (CONFIG_FIT_EMBED )ulong fdt_getprop_u32 (const void *fdt,int node,const char *prop);int fit_select_fdt (const void *fdt,int images,int *fdt_offsetp);
Signature · 1 line
2.10.0
PATCH 4/31 fdt: Enable selecting correct DTB from append FIT Image
In reply to Franklin S Cooper JrThis patch gives U-boot the runtime support to have the board specific code decide which FDT to use. This is especially useful for devices that need this type of runtime determination and also doesn't use SPL.
--- lib/fdtdec.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
lib/fdtdec.c +10 -0
@@ -4,6 +4,7 @@*/ #ifndef USE_HOSTCC +#include <boot_fit.h> #include <common.h> #include <dm.h> #include <errno.h>
@@ -1243,6 +1244,15 @@ int fdtdec_setup(void) gd->fdt_blob = (ulong *)&_image_binary_end; else gd->fdt_blob = (ulong *)&__bss_end; + +# elif definedCONFIG_FIT_EMBED + gd->fdt_blob =locate_dtb_in_fit (&_end); + +if (gd->fdt_blob ==NULL || gd->fdt_blob <= ((void *)&_end)) { +puts ("Failed to find proper dtb in embedded FIT Image\n" ); +return -1 ; + } +# else /* FDT is@end of image */ gd->fdt_blob = (ulong *)&_end;
Signature · 1 line
2.10.0
PATCH 4/31 fdt: Enable selecting correct DTB from append FIT Image
Quoted 6 lines · Franklin S Cooper Jr
This patch gives U-boot the runtime support to have the board specific code decide which FDT to use. This is especially useful for devices that need this type of runtime determination and also doesn't use SPL.
Signed-off-by Franklin S Cooper Jr <[email protected]>Reviewed-by Lokesh Vutla <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/598a6049/attachment.sig>
PATCH 5/31 ti: common: board_detect: Add function to determine if EEPROM was read
In reply to Franklin S Cooper JrWhen the EEPROM is first read its contents are stored in memory as a cache to avoid further I2C operations. To determine if the EEPROM was previously read the easiest way is to check the memory to see if the EEPROM's magic header value is set. Create a new function that can determine if the EEPROM was previously read or not without having to perform a I2C transaction.
--- board/ti/common/board_detect.c | 10 ++++++++++ board/ti/common/board_detect.h | 9 +++++++++ 2 files changed, 19 insertions(+)
board/ti/common/board_detect.c +10 -0
@@ -338,3 +338,13 @@ void __maybe_unused set_board_info_env(char *name)else setenv ("board_serial" , unknown); } + +bool __maybe_unused board_ti_was_eeprom_read (void ) +{ +struct ti_common_eeprom *ep =TI_EEPROM_DATA ; + +if (ep->header ==TI_EEPROM_HEADER_MAGIC ) +return true; +else +return false; +}
board/ti/common/board_detect.h +9 -0
@@ -194,6 +194,15 @@ u64 board_ti_get_emif2_size(void);void set_board_info_env (char *name);/** +* board_ti_was_eeprom_read() - Check to see if the eeprom contents have been read +* +* This function is useful to determine if the eeprom has already been read and +* its contents have already been loaded into memory. It utiltzes the magic +* number that the header value is set to upon successful eeprom read. +*/ +bool board_ti_was_eeprom_read (void ); + +/** * ti_i2c_eeprom_am_set() - Setup the eeprom data with predefined values * @name: Name of the board * @rev: Revision of the board
Signature · 1 line
2.10.0
PATCH 5/31 ti: common: board_detect: Add function to determine if EEPROM was read
Quoted 8 lines · Franklin S Cooper Jr
When the EEPROM is first read its contents are stored in memory as a cache to avoid further I2C operations. To determine if the EEPROM was previously read the easiest way is to check the memory to see if the EEPROM's magic header value is set. Create a new function that can determine if the EEPROM was previously read or not without having to perform a I2C transaction.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/7b3505a2/attachment.sig>
PATCH 6/31 dts: Allow OF_LIST to depend on FIT_EMBED
In reply to Franklin S Cooper JrOF_LIST will be useable by SPL and U-boot. Therefore, update its dependency to allow it to be enable by either SPL or U-boot specific config option.
--- dts/Kconfig | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
dts/Kconfig +6 -5
@@ -61,14 +61,15 @@ config DEFAULT_DEVICE_TREE config OF_LIST string "List of device tree files to include for DT control" - depends on SPL_LOAD_FIT + depends on SPL_LOAD_FIT || FIT_EMBED default DEFAULT_DEVICE_TREE help This option specifies a list of device tree files to use for DT - control. These will be packaged into a FIT. At run-time, SPL will - select the correct DT to use by examining the hardware (e.g. - reading a board ID value). This is a list of device tree files - (without the directory or .dtb suffix) separated by <space>. + control. These will be packaged into a FIT. At run-time, U-boot + or SPL will select the correct DT to use by examining the + hardware (e.g. reading a board ID value). This is a list of + device tree files (without the directory or .dtb suffix) + separated by <space>. config OF_SPL_REMOVE_PROPS string "List of device tree properties to drop for SPL"
Signature · 1 line
2.10.0
PATCH 7/31 arm: dts: Add new "generic" 66AK2Gx device tree file.
In reply to Franklin S Cooper JrWith U-boot runtime board detect for DTB selection a "default" dtb needs to be created. This will be used temporarily until the "proper" dtb is selected.
--- arch/arm/dts/Makefile | 3 ++- arch/arm/dts/keystone-k2g-generic.dts | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/keystone-k2g-generic.dts
arch/arm/dts/Makefile +2 -1
@@ -323,7 +323,8 @@ dtb-$(CONFIG_MX7) += imx7-colibri.dtb dtb-$(CONFIG_SOC_KEYSTONE) += keystone-k2hk-evm.dtb \ keystone-k2l-evm.dtb \ keystone-k2e-evm.dtb \ - keystone-k2g-evm.dtb + keystone-k2g-evm.dtb \ + keystone-k2g-generic.dtb dtb-$(CONFIG_TARGET_SAMA5D2_XPLAINED) += \ at91-sama5d2_xplained.dtb
arch/arm/dts/keystone-k2g-generic.dts new file +21 -0
@@ -0,0 +1,21 @@ +/* + * Copyright 2017 Texas Instruments, Inc. + * + * 66AK2G0X Generic File + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +/dts-v1/; + +#include "keystone-k2g.dtsi" + +/ { + compatible = "ti,k2g-generic", "ti,k2g", "ti,keystone"; + model = "Texas Instruments 66AK2G02 Generic"; + + chosen { + stdout-path = &uart0; + }; +};
Signature · 1 line
2.10.0
PATCH 8/31 ti: common: board_detect: Rename EEPROM scratch start macro
In reply to Franklin S Cooper JrFrom: Lokesh Vutla <[email protected]>
Non OMAP platforms i.e. Keystone will also need to use the board EEPROM helpers so let's make the macro platform independent.
--- arch/arm/include/asm/omap_common.h | 8 +++++--- board/ti/common/board_detect.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-)
arch/arm/include/asm/omap_common.h +5 -3
@@ -767,9 +767,11 @@ static inline u8 is_dra72x(void)#define OMAP_SRAM_SCRATCH_VCORES_PTR (SRAM_SCRATCH_SPACE_ADDR + 0x1C)#define OMAP_SRAM_SCRATCH_SYS_CTRL (SRAM_SCRATCH_SPACE_ADDR + 0x20)#define OMAP_SRAM_SCRATCH_BOOT_PARAMS (SRAM_SCRATCH_SPACE_ADDR + 0x24) -#define OMAP_SRAM_SCRATCH_BOARD_EEPROM_START (SRAM_SCRATCH_SPACE_ADDR + 0x28) -#define OMAP_SRAM_SCRATCH_BOARD_EEPROM_END (SRAM_SCRATCH_SPACE_ADDR + 0x200) -#define OMAP_SRAM_SCRATCH_SPACE_END (OMAP_SRAM_SCRATCH_BOARD_EEPROM_END) +#ifndef TI_SRAM_SCRATCH_BOARD_EEPROM_START +#define TI_SRAM_SCRATCH_BOARD_EEPROM_START (SRAM_SCRATCH_SPACE_ADDR + 0x28) +#define TI_SRAM_SCRATCH_BOARD_EEPROM_END (SRAM_SCRATCH_SPACE_ADDR + 0x200) +#endif +#define OMAP_SRAM_SCRATCH_SPACE_END (TI_SRAM_SCRATCH_BOARD_EEPROM_END)/* Boot parameters */ #define DEVICE_DATA_OFFSET 0x18
board/ti/common/board_detect.h +1 -1
@@ -98,7 +98,7 @@ struct ti_common_eeprom { };#define TI_EEPROM_DATA ((struct ti_common_eeprom *)\ - OMAP_SRAM_SCRATCH_BOARD_EEPROM_START) + TI_SRAM_SCRATCH_BOARD_EEPROM_START)/** * ti_i2c_eeprom_am_get() - Consolidated eeprom data collection for AM* TI EVMs
Signature · 1 line
2.10.0
PATCH 9/31 ti_armv7_keystone2: Define scratch space in SRAM
In reply to Franklin S Cooper JrScratch space can be used for features such as board detection. Define an area within SRAM that can be used for this purpose.
--- include/configs/ti_armv7_keystone2.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/configs/ti_armv7_keystone2.h +7 -0
@@ -55,6 +55,13 @@#define CONFIG_SPL_SPI_LOAD #define CONFIG_SYS_SPI_U_BOOT_OFFS CONFIG_SPL_PAD_TO +/* SRAM scratch space entries */ +#define SRAM_SCRATCH_SPACE_ADDR CONFIG_SPL_STACK + 0x8 + +#define TI_SRAM_SCRATCH_BOARD_EEPROM_START (SRAM_SCRATCH_SPACE_ADDR) +#define TI_SRAM_SCRATCH_BOARD_EEPROM_END (SRAM_SCRATCH_SPACE_ADDR + 0x200) +#define KEYSTONE_SRAM_SCRATCH_SPACE_END (TI_SRAM_SCRATCH_BOARD_EEPROM_END) +/* UART Configuration */ #define CONFIG_SYS_NS16550_MEM32 #if defined(CONFIG_SPL_BUILD ) || !defined(CONFIG_DM_SERIAL )
Signature · 1 line
2.10.0
PATCH 9/31 ti_armv7_keystone2: Define scratch space in SRAM
Quoted 14 lines · Franklin S Cooper Jr
Scratch space can be used for features such as board detection. Define an area within SRAM that can be used for this purpose.
Signed-off-by Franklin S Cooper Jr <[email protected]>Signed-off-by Roger Quadros <[email protected]>--- include/configs/ti_armv7_keystone2.h | 7 +++++++ 1 file changed, 7 insertions(+)include/configs/ti_armv7_keystone2.h +0
-0
include/configs/ti_armv7_keystone2.h line 63
Quoted 9 lines
include/configs/ti_armv7_keystone2.h +6
-0@@ -55,6 +55,13 @@#define CONFIG_SPL_SPI_LOAD #define CONFIG_SYS_SPI_U_BOOT_OFFS CONFIG_SPL_PAD_TO +/* SRAM scratch space entries */ +#define SRAM_SCRATCH_SPACE_ADDR CONFIG_SPL_STACK + 0x8 + +#define TI_SRAM_SCRATCH_BOARD_EEPROM_START (SRAM_SCRATCH_SPACE_ADDR) +#define TI_SRAM_SCRATCH_BOARD_EEPROM_END (SRAM_SCRATCH_SPACE_ADDR + 0x200) +#define KEYSTONE_SRAM_SCRATCH_SPACE_END (TI_SRAM_SCRATCH_BOARD_EEPROM_END)
Lets start figuring out a better place for this information that's not in include/configs/ so that when these files go away there'll be one less thing to worry about. There must be some reasonable <asm/arch/xxxx> file that's common to all of the various platforms already to place this in. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/f6ba4784/attachment.sig>
PATCH 10/31 ARM: Use Kconfig for board EEPROM's I2C bus and chip address
In reply to Franklin S Cooper JrFrom: Roger Quadros <[email protected]>
In stead of defining the board EEPROM address in the board headers let's define them in the board config files and make them configurable by Kconfig.
--- board/ti/common/Kconfig | 20 +++++++++++++++++--- board/ti/ks2_evm/Kconfig | 2 ++ include/configs/am57xx_evm.h | 4 ---- include/configs/dra7xx_evm.h | 4 ---- 4 files changed, 19 insertions(+), 11 deletions(-)
board/ti/common/Kconfig +17 -3
@@ -1,12 +1,24 @@ -config SPL_ENV_SUPPORT - default y - config TI_I2C_BOARD_DETECT bool "Support for Board detection for TI platforms" help Support for detection board information on Texas Instrument's Evaluation Boards which have I2C based EEPROM detection +config EEPROM_BUS_ADDRESS + int "Board EEPROM's I2C bus address" + range 0 8 + default 0 + +config EEPROM_CHIP_ADDRESS + hex "Board EEPROM's I2C chip address" + range 0 0xff + default 0x50 + +if ARCH_OMAP2 + +config SPL_ENV_SUPPORT + default y + config SPL_EXT_SUPPORT default y
@@ -39,3 +51,5 @@ config SPL_POWER_SUPPORT config SPL_SERIAL_SUPPORT default y + +endif
board/ti/ks2_evm/Kconfig +2 -0
@@ -49,3 +49,5 @@ config SYS_CONFIG_NAME default "k2g_evm" endif + +source "board/ti/common/Kconfig"
include/configs/am57xx_evm.h +0 -4
@@ -103,10 +103,6 @@#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN) -/* EEPROM */ -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 -#define CONFIG_EEPROM_BUS_ADDRESS 0 -/* * Default to using SPI for environment, etc. * 0x000000 - 0x040000 : QSPI.SPL (256KiB)
include/configs/dra7xx_evm.h +0 -4
@@ -261,8 +261,4 @@#endif #endif /* NOR support */ -/* EEPROM */ -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 -#define CONFIG_EEPROM_BUS_ADDRESS 0 -#endif /* __CONFIG_DRA7XX_EVM_H */
Signature · 1 line
2.10.0
PATCH 11/31 ARM: k2g: Enable TI board detection code
In reply to Franklin S Cooper JrK2G boards have a EEPROM that will be used for board detection. Therefore, select the board detection config for K2G evms.
--- arch/arm/mach-keystone/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-keystone/Kconfig +1 -0
@@ -15,6 +15,7 @@ config TARGET_K2L_EVM config TARGET_K2G_EVM bool "TI Keystone 2 Galileo EVM" + select TI_I2C_BOARD_DETECT endchoice
Signature · 1 line
2.10.0
PATCH 11/31 ARM: k2g: Enable TI board detection code
Quoted 4 lines · Franklin S Cooper Jr
K2G boards have a EEPROM that will be used for board detection. Therefore, select the board detection config for K2G evms.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/3fb1e577/attachment.sig>
PATCH 12/31 board_f: Add new function to allow runtime DTB selection
In reply to Franklin S Cooper JrRuntime U-boot dtb selection is generally a two step process. First step is to simply use an initial generic dtb. The second step is to select the dtb and perhaps execute additional code ones U-boot knows what board it is running on. Embedded_dtb_select handles the second step by allowing board specific code to run and perform what ever necessary configuration that is needed.
--- common/Kconfig | 10 ++++++++++ common/board_f.c | 3 +++ include/common.h | 4 ++++ 3 files changed, 17 insertions(+)
common/Kconfig +10 -0
@@ -352,6 +352,16 @@ config SYS_STDIO_DEREGISTER endmenu +config DTB_RESELECT + bool "Support swapping dtbs at a later point in boot" + depends on FIT_EMBED + default n + help + It is possible during initial boot you may need to use a generic + dtb until you can fully determine the board your running on. This + config allows boards to implement a function at a later point + during boot to switch to the "correct" dtb. + config FIT_EMBED bool "Support a FIT image embedded in the U-boot image" default n
common/board_f.c +3 -0
@@ -920,6 +920,9 @@ static const init_fnc_t init_sequence_f[] = {#if defined(CONFIG_DISPLAY_CPUINFO ) print_cpuinfo, /* display cpu info (and speed) */#endif +#if defined(CONFIG_DTB_RESELECT ) + embedded_dtb_select, +#endif #if defined(CONFIG_DISPLAY_BOARDINFO ) show_board_info,#endif
include/common.h +4 -0
@@ -451,6 +451,10 @@ void pci_init_board(void);#endif #endif +#if defined(CONFIG_DTB_RESELECT ) +int embedded_dtb_select (void ); +#endif +int misc_init_f (void );int misc_init_r (void );
Signature · 1 line
2.10.0
PATCH 12/31 board_f: Add new function to allow runtime DTB selection
Quoted 6 lines · Franklin S Cooper Jr
Runtime U-boot dtb selection is generally a two step process. First step is to simply use an initial generic dtb. The second step is to select the dtb and perhaps execute additional code ones U-boot knows what board it is running on.
Embedded_dtb_selecthandles the second step by allowing board specific code to run and perform what ever necessary configuration that is needed.
So I'm not 100% sure on how to proceed here exactly. We have a few things to consider. First, I bet the generic dtb is good enough for loading up and booting to Linux (and loading/passing a different, complete and board specific DTB). Second, we have the (reasonable) set of patches and discussion to make the DTB that we use available easily so that it could be passed on to Linux (or EFI apps or whatever). So, this is probably the right thing to do in the long run, but is also another data point in the "but we need to think and talk about if some platforms really shouldn't be shipping their full FT on the HW somewhere".
Quoted 2 lines
Signed-off-by Franklin S Cooper Jr <[email protected]>
[snip]
common/Kconfig config SYS_STDIO_DEREGISTER · line 358
Quoted 4 lines
common/Kconfig +4
-0+config DTB_RESELECT + bool "Support swapping dtbs at a later point in boot" + depends on FIT_EMBED + default n
This is the default, you can drop it.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/458ac87b/attachment.sig>
PATCH 12/31 board_f: Add new function to allow runtime DTB selection
Quoted 9 lines · On Thu, 9 Mar 2017 08:08:20 -0500 Tom Rini <[email protected]> wrote:
Quoted 6 lines · Franklin S Cooper Jr
Runtime U-boot dtb selection is generally a two step process. First step is to simply use an initial generic dtb. The second step is to select the dtb and perhaps execute additional code ones U-boot knows what board it is running on.
Embedded_dtb_selecthandles the second step by allowing board specific code to run and perform what ever necessary configuration that is needed.
Quoted 10 lines
So I'm not 100% sure on how to proceed here exactly. We have a few things to consider. First, I bet the generic dtb is good enough for loading up and booting to Linux (and loading/passing a different, complete and board specific DTB). Second, we have the (reasonable) set of patches and discussion to make the DTB that we use available easily so that it could be passed on to Linux (or EFI apps or whatever). So, this is probably the right thing to do in the long run, but is also another data point in the "but we need to think and talk about if some platforms really shouldn't be shipping their full FT on the HW somewhere".
It might also happen that somebody would like to have one "blessed" u-boot binary stored in one place and then only change u-boot DTB stored on another memory region (like eMMC, NOR).
The above also seems like a valid use case, especially when one wants to support device for a long time (many DTBs) and avoid uncontrolled grown of final u-boot.img binary size (as this is now the case for TI).
Quoted 11 lines
Quoted 3 lines
Signed-off-by Franklin S Cooper Jr <[email protected]>[snip]
common/Kconfig config SYS_STDIO_DEREGISTER · line 358
Quoted 4 lines
common/Kconfig +4
-0+config DTB_RESELECT + bool "Support swapping dtbs at a later point in boot" + depends on FIT_EMBED + default nThis is the default, you can drop it.
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- 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/20170309/d7f70d6c/attachment.sig>
PATCH 12/31 board_f: Add new function to allow runtime DTB selection
Quoted 23 lines · Lukasz Majewski
Quoted 9 lines · On Thu, 9 Mar 2017 08:08:20 -0500 Tom Rini <[email protected]> wrote:
Quoted 6 lines · Franklin S Cooper Jr
Runtime U-boot dtb selection is generally a two step process. First step is to simply use an initial generic dtb. The second step is to select the dtb and perhaps execute additional code ones U-boot knows what board it is running on.
Embedded_dtb_selecthandles the second step by allowing board specific code to run and perform what ever necessary configuration that is needed.Quoted 10 lines
So I'm not 100% sure on how to proceed here exactly. We have a few things to consider. First, I bet the generic dtb is good enough for loading up and booting to Linux (and loading/passing a different, complete and board specific DTB). Second, we have the (reasonable) set of patches and discussion to make the DTB that we use available easily so that it could be passed on to Linux (or EFI apps or whatever). So, this is probably the right thing to do in the long run, but is also another data point in the "but we need to think and talk about if some platforms really shouldn't be shipping their full FT on the HW somewhere".
Quoted 7 lines
It might also happen that somebody would like to have one "blessed" u-boot binary stored in one place and then only change u-boot DTB stored on another memory region (like eMMC, NOR).
The above also seems like a valid use case, especially when one wants to support device for a long time (many DTBs) and avoid uncontrolled grown of final u-boot.img binary size (as this is now the case for TI).
I'd rather stress that the problem is that when we want to support N boards and we do that by including N device tree blobs, the size is going to grow with each board. What's not happening yet is the DTB is being stored in the device and accessed that way. I'd really like to see some boards moving in that direction. And it seems like perhaps you're working on some that could? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170310/b556d77c/attachment.sig>
PATCH 12/31 board_f: Add new function to allow runtime DTB selection
Quoted 32 lines · Tom Rini
Quoted 23 lines · Lukasz Majewski
Quoted 9 lines · On Thu, 9 Mar 2017 08:08:20 -0500 Tom Rini <[email protected]> wrote:
Quoted 6 lines · Franklin S Cooper Jr
Runtime U-boot dtb selection is generally a two step process. First step is to simply use an initial generic dtb. The second step is to select the dtb and perhaps execute additional code ones U-boot knows what board it is running on.
Embedded_dtb_selecthandles the second step by allowing board specific code to run and perform what ever necessary configuration that is needed.Quoted 10 lines
So I'm not 100% sure on how to proceed here exactly. We have a few things to consider. First, I bet the generic dtb is good enough for loading up and booting to Linux (and loading/passing a different, complete and board specific DTB). Second, we have the (reasonable) set of patches and discussion to make the DTB that we use available easily so that it could be passed on to Linux (or EFI apps or whatever). So, this is probably the right thing to do in the long run, but is also another data point in the "but we need to think and talk about if some platforms really shouldn't be shipping their full FT on the HW somewhere".
Quoted 7 lines
It might also happen that somebody would like to have one "blessed" u-boot binary stored in one place and then only change u-boot DTB stored on another memory region (like eMMC, NOR).
The above also seems like a valid use case, especially when one wants to support device for a long time (many DTBs) and avoid uncontrolled grown of final u-boot.img binary size (as this is now the case for TI).
Quoted 6 lines
I'd rather stress that the problem is that when we want to support N boards and we do that by including N device tree blobs, the size is going to grow with each board. What's not happening yet is the DTB is being stored in the device and accessed that way. I'd really like to see some boards moving in that direction. And it seems like perhaps you're working on some that could? Thanks!
The problem I see is storing dtbs that U-boot needs as part of booting at a different location requires alot of guarantees across all the evms being supported by the single image. If for NAND boot one board stores U-boot's dtb blobs in one partition vs another then things fall apart. The larger this minimal dtb is the harder it is to guarantee that it will be valid in the future when/if new boards are introduced or reved.
The benefit of having a dtb bundled in the U-boot image is that no matter the boot mode or board differences as long as something loads U-boot it can then select the proper dtb to use from memory. I think I remember Andrew also saying how having U-boot's dtbs built in will make things easier in the HS world.
Now the method that U-boot is loaded and where U-boot is stored will need to deal with U-boots larger size. But I think its rather enviable since atleast for TI evms we kept space allowance for U-boot in NOR and NAND rather small for no real reason.
In general if someone adds support and makes use of using a minimal U-boot dtb and loading the "correct" one from some other location I wouldn't have an issue with that. But atleast to me I don't think that is the direction for TI evms.
Quoted 1 line
PATCH 13/31 Makefile: Build additional binaries for dtb FIT blobs appended to U-boot
In reply to Franklin S Cooper JrAdd additional make targets and options for building embedded FIT U-boot images.
--- .gitignore | 1 + Makefile | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-)
.gitignore +1 -0
@@ -30,6 +30,7 @@ # # Top-level generic files # +fit-dtb.blob /MLO* /SPL* /System.map
Makefile +16 -2
@@ -862,7 +862,21 @@ dts/dt.dtb: checkdtc u-boot quiet_cmd_copy = COPY $@ cmd_copy = cp $< $@ -ifeq ($(CONFIG_OF_SEPARATE),y) +ifeq ($(CONFIG_FIT_EMBED),y) + +fit-dtb.blob: dts/dt.dtb FORCE + $(call if_changed,mkimage) + +MKIMAGEFLAGS_fit-dtb.blob = -f auto -A $(ARCH) -T firmware -C none -O u-boot \ + -a 0 -e 0 -E \ + $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) -d /dev/null + +u-boot-fit-dtb.bin: u-boot-nodtb.bin fit-dtb.blob + $(call if_changed,cat) + +u-boot.bin: u-boot-fit-dtb.bin FORCE + $(call if_changed,copy) +else ifeq ($(CONFIG_OF_SEPARATE),y) u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE $(call if_changed,cat)
@@ -1429,7 +1443,7 @@ CLEAN_DIRS += $(MODVERDIR) \ $(filter-out include, $(shell ls -1 $d 2>/dev/null)))) CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \ - boot* u-boot* MLO* SPL System.map + boot* u-boot* MLO* SPL System.map fit-dtb.blob # Directories & files removed with 'make mrproper' MRPROPER_DIRS += include/config include/generated spl tpl \
Signature · 1 line
2.10.0
PATCH 13/31 Makefile: Build additional binaries for dtb FIT blobs appended to U-boot
Quoted 4 lines · Franklin S Cooper Jr
Add additional make targets and options for building embedded FIT U-boot images.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/615bdf50/attachment.sig>
PATCH 14/31 ARM: keystone2: Allow to build with all image formats
In reply to Franklin S Cooper Jru-boot.bin is a copy of:
u-boot-fit-dtb.bin if CONFIG_FIT_EMBED is enabled, u-boot-dtb.bin if CONFIG_OF_SEPARATE is enabled, u-boot-nodtb.bin if DT is not enabled.
So, use u-boot.bin to to generate keystone images instead of u-boot-dtb.bin
--- arch/arm/mach-keystone/config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-keystone/config.mk +2 -2
@@ -16,13 +16,13 @@ spl/u-boot-spl.gph: spl/u-boot-spl.bin FORCE OBJCOPYFLAGS_u-boot-spi.gph = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \ --gap-fill=0 -u-boot-spi.gph: spl/u-boot-spl.gph u-boot-dtb.img FORCE +u-boot-spi.gph: spl/u-boot-spl.gph u-boot.img FORCE $(call if_changed,pad_cat) ifndef CONFIG_SPL_BUILD MKIMAGEFLAGS_MLO = -A $(ARCH) -T gpimage -C none \ -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -n U-Boot -MLO: u-boot-dtb.bin FORCE +MLO: u-boot.bin FORCE $(call if_changed,mkimage) @dd if=/dev/zero bs=8 count=1 2>/dev/null >> $@ endif
Signature · 1 line
2.10.0
PATCH 14/31 ARM: keystone2: Allow to build with all image formats
Quoted 8 lines · Franklin S Cooper Jr
u-boot.bin is a copy of:
u-boot-fit-dtb.bin ifCONFIG_FIT_EMBEDis enabled, u-boot-dtb.bin ifCONFIG_OF_SEPARATEis enabled, u-boot-nodtb.bin if DT is not enabled.
So, use u-boot.bin to to generate keystone images instead of u-boot-dtb.binSigned-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/68b5beb5/attachment.sig>
PATCH 15/31 ARM: k2g: Define embedded_dtb_select for runtime DTB selection in U-boot
In reply to Franklin S Cooper JrFor K2G, runtime DTB selection utilitizes the embedded_dtb_select function. Therefore, define the function which will perform a EEPROM read and then retries selecting the correct dtb now that it can detect which board its on. For other Keystone devices use an empty function since they will still use the embedded FIT functionality but their FIT will only contain a single dtb.
Most production K2G boards do not have their EEPROM programmed. Therefore, perform a test to verify a K2G GP is currently being used and if it is then set the values normally set by a EEPROM read.
--- board/ti/ks2_evm/board.c | 7 +++++++ board/ti/ks2_evm/board_k2g.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+)
board/ti/ks2_evm/board.c +7 -0
@@ -277,3 +277,10 @@ void ft_board_setup_ex(void *blob, bd_t *bd) ddr3_check_ecc_int(KS2_DDR3A_EMIF_CTRL_BASE); }#endif /* CONFIG_OF_BOARD_SETUP */ + +#if defined(CONFIG_DTB_RESELECT ) +int __weak embedded_dtb_select (void ) +{ +return 0 ; +} +#endif
board/ti/ks2_evm/board_k2g.c +38 -0
@@ -11,9 +11,13 @@#include <asm/ti-common/keystone_net.h> #include <asm/arch/psc_defs.h> #include <asm/arch/mmc_host_def.h> +#include <fdtdec.h> +#include <i2c.h> +#include "../common/board_detect.h" #include "mux-k2g.h" #define SYS_CLK 24000000 +#define K2G_GP_AUDIO_CODEC_ADDRESS 0x1Bunsigned int external_clk[ext_clk_count] = { [sys_clk] =SYS_CLK ,
@@ -116,6 +120,40 @@ int board_mmc_init(bd_t *bis) }#endif +#if defined(CONFIG_DTB_RESELECT ) +static int k2g_alt_board_detect (void ) +{ +int rc; + + rc =i2c_set_bus_num (1 ); +if (rc) +return rc; + + rc =i2c_probe (K2G_GP_AUDIO_CODEC_ADDRESS ); +if (rc) +return rc; + +ti_i2c_eeprom_am_set ("66AK2GGP" ,"1.0X" ); + +return 0 ; +} + +int embedded_dtb_select (void ) +{ +int rc; + + rc =k2g_alt_board_detect (); +if (rc) { +printf ("Unable to do board detection\n" ); +return -1 ; + } + +fdtdec_setup (); + +return 0 ; +} +#endif +#ifdef CONFIG_BOARD_EARLY_INIT_F static void k2g_reset_mux_config (void )
Signature · 1 line
2.10.0
PATCH 15/31 ARM: k2g: Define embedded_dtb_select for runtime DTB selection in U-boot
Quoted 7 lines · Franklin S Cooper Jr
For K2G, runtime DTB selection utilitizes the
embedded_dtb_selectfunction. Therefore, define the function which will perform a EEPROM read and then retries selecting the correct dtb now that it can detect which board its on. For other Keystone devices use an empty function since they will still use the embedded FIT functionality but their FIT will only contain a single dtb.
Quoted 5 lines
Most production K2G boards do not have their EEPROM programmed. Therefore, perform a test to verify a K2G GP is currently being used and if it is then set the values normally set by a EEPROM read.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/0decc728/attachment.sig>
PATCH 16/31 ARM: keystone2: Define board_fit_config_name_match for Keystone 2 boards
In reply to Franklin S Cooper JrNow with support for U-boot runtime dtb selection each board needs to define board_fit_config_name_match so U-boot can determine what the correct dtb is within the FIT blob.
--- board/ti/ks2_evm/board_k2e.c | 10 ++++++++++ board/ti/ks2_evm/board_k2g.c | 14 ++++++++++++++ board/ti/ks2_evm/board_k2hk.c | 10 ++++++++++ board/ti/ks2_evm/board_k2l.c | 10 ++++++++++ 4 files changed, 44 insertions(+)
board/ti/ks2_evm/board_k2e.c +10 -0
@@ -148,6 +148,16 @@ int get_num_eth_ports(void) }#endif +#if defined(CONFIG_FIT_EMBED ) +int board_fit_config_name_match (const char *name) +{ +if (!strcmp (name,"keystone-k2e-evm" )) +return 0 ; + +return -1 ; +} +#endif +#if defined(CONFIG_BOARD_EARLY_INIT_F )int board_early_init_f (void ) {
board/ti/ks2_evm/board_k2g.c +14 -0
@@ -120,6 +120,20 @@ int board_mmc_init(bd_t *bis) }#endif +#if defined(CONFIG_FIT_EMBED ) +int board_fit_config_name_match (const char *name) +{ +bool eeprom_read =board_ti_was_eeprom_read (); + +if (!strcmp (name,"keystone-k2g-generic" ) && !eeprom_read) +return 0 ; +else if (!strcmp (name,"keystone-k2g-evm" ) &&board_ti_is ("66AK2GGP" )) +return 0 ; +else +return -1 ; +} +#endif +#if defined(CONFIG_DTB_RESELECT )static int k2g_alt_board_detect (void ) {
board/ti/ks2_evm/board_k2hk.c +10 -0
@@ -119,6 +119,16 @@ int board_early_init_f(void) }#endif +#if defined(CONFIG_FIT_EMBED ) +int board_fit_config_name_match (const char *name) +{ +if (!strcmp (name,"keystone-k2hk-evm" )) +return 0 ; + +return -1 ; +} +#endif +#ifdef CONFIG_SPL_BUILD void spl_init_keystone_plls (void ) {
board/ti/ks2_evm/board_k2l.c +10 -0
@@ -118,6 +118,16 @@ int board_early_init_f(void) }#endif +#if defined(CONFIG_FIT_EMBED ) +int board_fit_config_name_match (const char *name) +{ +if (!strcmp (name,"keystone-k2l-evm" )) +return 0 ; + +return -1 ; +} +#endif +#ifdef CONFIG_SPL_BUILD void spl_init_keystone_plls (void ) {
Signature · 1 line
2.10.0
PATCH 16/31 ARM: keystone2: Define board_fit_config_name_match for Keystone 2 boards
Quoted 5 lines · Franklin S Cooper Jr
Now with support for U-boot runtime dtb selection each board needs to define
board_fit_config_name_matchso U-boot can determine what the correct dtb is within the FIT blob.Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/e6b8728b/attachment.sig>
PATCH 17/31 ks2_evm: Add EEPROM based board detection
In reply to Franklin S Cooper JrSome K2G evms have their EEPROM programming while most do not. Therefore, add EEPROM board detection to be used as the default method and fall back to the alternative board detection when needed.
Also reorder board configuration. Perform bare minimal configuration initially since board detection hasn't ran. Finish board configuration once the board has been identified.
--- board/ti/ks2_evm/board.h | 1 + board/ti/ks2_evm/board_k2g.c | 44 +++++++++++++++++++++++--------------------- 2 files changed, 24 insertions(+), 21 deletions(-)
board/ti/ks2_evm/board.h +1 -0
@@ -11,6 +11,7 @@#define _KS2_BOARD#include <asm/ti-common/keystone_net.h> +#include "../common/board_detect.h" extern struct eth_priv_t eth_priv_cfg[];
board/ti/ks2_evm/board_k2g.c +23 -21
64 lines not on this page · raw message
Signature · 1 line
2.10.0
PATCH 17/31 ks2_evm: Add EEPROM based board detection
Quoted 9 lines · Franklin S Cooper Jr
Some K2G evms have their EEPROM programming while most do not. Therefore, add EEPROM board detection to be used as the default method and fall back to the alternative board detection when needed.
Also reorder board configuration. Perform bare minimal configuration initially since board detection hasn't ran. Finish board configuration once the board has been identified.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/a11c1afd/attachment.sig>
PATCH 18/31 defconfig: keystone2: Enable U-boot runtime DTB detection
In reply to Franklin S Cooper JrEnable various config options to allow U-boot at runtime to select the proper dtb to use from the list of dtb's within the FIT image.
--- configs/k2e_evm_defconfig | 3 +++ configs/k2g_evm_defconfig | 3 +++ configs/k2hk_evm_defconfig | 3 +++ configs/k2l_evm_defconfig | 3 +++ 4 files changed, 12 insertions(+)
configs/k2e_evm_defconfig +3 -0
@@ -54,3 +54,6 @@ CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_STORAGE=y +CONFIG_DTB_RESELECT=y +CONFIG_FIT_EMBED=y +CONFIG_OF_LIST="keystone-k2e-evm"
configs/k2g_evm_defconfig +3 -0
@@ -58,3 +58,6 @@ CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_STORAGE=y +CONFIG_DTB_RESELECT=y +CONFIG_FIT_EMBED=y +CONFIG_OF_LIST="keystone-k2g-generic keystone-k2g-evm"
configs/k2hk_evm_defconfig +3 -0
@@ -54,3 +54,6 @@ CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_STORAGE=y +CONFIG_DTB_RESELECT=y +CONFIG_FIT_EMBED=y +CONFIG_OF_LIST="keystone-k2hk-evm"
configs/k2l_evm_defconfig +3 -0
@@ -54,3 +54,6 @@ CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_STORAGE=y +CONFIG_DTB_RESELECT=y +CONFIG_FIT_EMBED=y +CONFIG_OF_LIST="keystone-k2l-evm"
Signature · 1 line
2.10.0
PATCH 18/31 defconfig: keystone2: Enable U-boot runtime DTB detection
Quoted 4 lines · Franklin S Cooper Jr
Enable various config options to allow U-boot at runtime to select the proper dtb to use from the list of dtb's within the FIT image.
Signed-off-by Franklin S Cooper Jr <[email protected]>
... but is the goal here to eventually support more than one EVM in a single binary, on all of these platforms?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/ad8586c0/attachment.sig>
PATCH 18/31 defconfig: keystone2: Enable U-boot runtime DTB detection
Quoted 9 lines · Tom Rini
Quoted 4 lines · Franklin S Cooper Jr
Enable various config options to allow U-boot at runtime to select the proper dtb to use from the list of dtb's within the FIT image.
Signed-off-by Franklin S Cooper Jr <[email protected]>... but is the goal here to eventually support more than one EVM in a single binary, on all of these platforms?
Yes the goal is to have a single binary that support multiple evms for a given SoC family. Similar to what we are doing for OMAP devices except using U-boot instead of SPL.
Quoted 3 lines
Reviewed-by Tom Rini <[email protected]>
PATCH 19/31 ARM: keystone2: Add additional fields used for DDR3 configuration
In reply to Franklin S Cooper JrFuture boards will need to configure DDR3 registers in a slightly different manner. Support this by defining additional variables and defines that will be utilized later.
--- arch/arm/mach-keystone/include/mach/ddr3.h | 14 ++++++++++++++ arch/arm/mach-keystone/include/mach/hardware.h | 3 +++ 2 files changed, 17 insertions(+)
arch/arm/mach-keystone/include/mach/ddr3.h +14 -0
@@ -35,6 +35,20 @@ struct ddr3_phy_config {unsigned int zq1cr1;unsigned int zq2cr1;unsigned int pir_v1; +unsigned int datx8_2_mask; +unsigned int datx8_2_val; +unsigned int datx8_3_mask; +unsigned int datx8_3_val; +unsigned int datx8_4_mask; +unsigned int datx8_4_val; +unsigned int datx8_5_mask; +unsigned int datx8_5_val; +unsigned int datx8_6_mask; +unsigned int datx8_6_val; +unsigned int datx8_7_mask; +unsigned int datx8_7_val; +unsigned int datx8_8_mask; +unsigned int datx8_8_val;unsigned int pir_v2; };
arch/arm/mach-keystone/include/mach/hardware.h +3 -0
@@ -52,6 +52,8 @@ typedef volatile unsigned int *dv_reg_p;#define KS2_DDRPHY_ZQ2CR1_OFFSET 0x1A4#define KS2_DDRPHY_ZQ3CR1_OFFSET 0x1B4 +#define KS2_DDRPHY_DATX8_2_OFFSET 0x240 +#define KS2_DDRPHY_DATX8_3_OFFSET 0x280#define KS2_DDRPHY_DATX8_4_OFFSET 0x2C0#define KS2_DDRPHY_DATX8_5_OFFSET 0x300#define KS2_DDRPHY_DATX8_6_OFFSET 0x340
@@ -70,6 +72,7 @@ typedef volatile unsigned int *dv_reg_p;#define PDQ_MASK 0x00000070#define NOSRA_MASK 0x08000000#define ECC_MASK 0x00000001 +#define DXEN_MASK 0x00000001/* DDR3 definitions */ #define KS2_DDR3A_EMIF_CTRL_BASE 0x21010000
Signature · 1 line
2.10.0
PATCH 19/31 ARM: keystone2: Add additional fields used for DDR3 configuration
Quoted 5 lines · Franklin S Cooper Jr
Future boards will need to configure DDR3 registers in a slightly different manner. Support this by defining additional variables and defines that will be utilized later.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/b3a7dbd2/attachment.sig>
PATCH 20/31 ARM: k2g: Program DDR PHY MR2 register with the default value
In reply to Franklin S Cooper JrK2G GP doesn't require the MR2 register to be programed since the default is good enough. However, newer K2G boards do need to change this register value. Therefore, instead of not writing this register if ran on a K2G board just program the value to be written to match the default/reset value.
--- arch/arm/mach-keystone/ddr3.c | 3 +-- board/ti/ks2_evm/ddr3_k2g.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
arch/arm/mach-keystone/ddr3.c +1 -2
@@ -52,8 +52,7 @@ void ddr3_init_ddrphy(u32 base, struct ddr3_phy_config *phy_cfg)__raw_writel (phy_cfg->dtpr2, base +KS2_DDRPHY_DTPR2_OFFSET );__raw_writel (phy_cfg->mr0, base +KS2_DDRPHY_MR0_OFFSET );__raw_writel (phy_cfg->mr1, base +KS2_DDRPHY_MR1_OFFSET ); -if (!cpu_is_k2g ()) -__raw_writel (phy_cfg->mr2, base +KS2_DDRPHY_MR2_OFFSET ); +__raw_writel (phy_cfg->mr2, base +KS2_DDRPHY_MR2_OFFSET );__raw_writel (phy_cfg->dtcr, base +KS2_DDRPHY_DTCR_OFFSET );__raw_writel (phy_cfg->pgcr2, base +KS2_DDRPHY_PGCR2_OFFSET );
board/ti/ks2_evm/ddr3_k2g.c +1 -1
@@ -27,7 +27,7 @@ struct ddr3_phy_config ddr3phy_800_2g = { .dtpr2 = 0x50022A00ul, .mr0 = 0x00001430ul, .mr1 = 0x00000006ul, - .mr2 = 0x00000018ul, + .mr2 = 0x00000000ul, .dtcr = 0x710035C7ul, .pgcr2 = 0x00F03D09ul, .zq0cr1 = 0x0001005Dul,
Signature · 1 line
2.10.0
PATCH 20/31 ARM: k2g: Program DDR PHY MR2 register with the default value
Quoted 7 lines · Franklin S Cooper Jr
K2G GP doesn't require the MR2 register to be programed since the default is good enough. However, newer K2G boards do need to change this register value. Therefore, instead of not writing this register if ran on a K2G board just program the value to be written to match the default/reset value.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/73484f32/attachment.sig>
PATCH 21/31 ARM: k2g: Program DDRPHY_DATX8 registers via mask and value variables
In reply to Franklin S Cooper JrDifferent K2G evms may need to program the various KS2_DDRPHY_DATX8_X_OFFSET registers in different ways. Therefore, use the mask and val registers for each KS2_DDRPHY_DATAX_X_OFFSET to properly program the register.
--- arch/arm/mach-keystone/ddr3.c | 32 +++++++++++++++++++++++++++----- board/ti/ks2_evm/ddr3_k2g.c | 14 ++++++++++++++ 2 files changed, 41 insertions(+), 5 deletions(-)
arch/arm/mach-keystone/ddr3.c +27 -5
@@ -65,11 +65,33 @@ void ddr3_init_ddrphy(u32 base, struct ddr3_phy_config *phy_cfg) ;if (cpu_is_k2g ()) { -setbits_le32 (base +KS2_DDRPHY_DATX8_4_OFFSET ,0x1 ); -clrbits_le32 (base +KS2_DDRPHY_DATX8_5_OFFSET ,0x1 ); -clrbits_le32 (base +KS2_DDRPHY_DATX8_6_OFFSET ,0x1 ); -clrbits_le32 (base +KS2_DDRPHY_DATX8_7_OFFSET ,0x1 ); -clrbits_le32 (base +KS2_DDRPHY_DATX8_8_OFFSET ,0x1 ); +clrsetbits_le32 (base +KS2_DDRPHY_DATX8_2_OFFSET , + phy_cfg->datx8_2_mask, + phy_cfg->datx8_2_val); + +clrsetbits_le32 (base +KS2_DDRPHY_DATX8_3_OFFSET , + phy_cfg->datx8_3_mask, + phy_cfg->datx8_3_val); + +clrsetbits_le32 (base +KS2_DDRPHY_DATX8_4_OFFSET , + phy_cfg->datx8_4_mask, + phy_cfg->datx8_4_val); + +clrsetbits_le32 (base +KS2_DDRPHY_DATX8_5_OFFSET , + phy_cfg->datx8_5_mask, + phy_cfg->datx8_5_val); + +clrsetbits_le32 (base +KS2_DDRPHY_DATX8_6_OFFSET , + phy_cfg->datx8_6_mask, + phy_cfg->datx8_6_val); + +clrsetbits_le32 (base +KS2_DDRPHY_DATX8_7_OFFSET , + phy_cfg->datx8_7_mask, + phy_cfg->datx8_7_val); + +clrsetbits_le32 (base +KS2_DDRPHY_DATX8_8_OFFSET , + phy_cfg->datx8_8_mask, + phy_cfg->datx8_8_val); }__raw_writel (phy_cfg->pir_v2, base +KS2_DDRPHY_PIR_OFFSET );
board/ti/ks2_evm/ddr3_k2g.c +14 -0
@@ -34,6 +34,20 @@ struct ddr3_phy_config ddr3phy_800_2g = { .zq1cr1 = 0x0001005Bul, .zq2cr1 = 0x0001005Bul, .pir_v1 = 0x00000033ul, + .datx8_2_mask = 0, + .datx8_2_val = 0, + .datx8_3_mask = 0, + .datx8_3_val = 0, + .datx8_4_mask = 0, + .datx8_4_val = ((1 << 0)), + .datx8_5_mask = DXEN_MASK, + .datx8_5_val = 0, + .datx8_6_mask = DXEN_MASK, + .datx8_6_val = 0, + .datx8_7_mask = DXEN_MASK, + .datx8_7_val = 0, + .datx8_8_mask = DXEN_MASK, + .datx8_8_val = 0, .pir_v2 = 0x00000F81ul, };
Signature · 1 line
2.10.0
PATCH 21/31 ARM: k2g: Program DDRPHY_DATX8 registers via mask and value variables
Quoted 6 lines · Franklin S Cooper Jr
Different K2G evms may need to program the various
KS2_DDRPHY_DATX8_X_OFFSETregisters in different ways. Therefore, use the mask and val registers for eachKS2_DDRPHY_DATAX_X_OFFSETto properly program the register.Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/791aaff5/attachment.sig>
PATCH 22/31 ks2_evm: Add EEPROM based board detection helper functions
In reply to Franklin S Cooper JrAdd a function that can be used to determine if the board being ran on is a K2G Industrial Communication Engine EVM or K2G General Purpose EVM based on values programmed on the EEPROM.
--- board/ti/ks2_evm/board.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
board/ti/ks2_evm/board.h +20 -0
@@ -15,6 +15,26 @@extern struct eth_priv_t eth_priv_cfg[]; +#if defined(CONFIG_TI_I2C_BOARD_DETECT ) +static inline int board_is_k2g_gp (void ) +{ +return board_ti_is ("66AK2GGP" ); +} +static inline int board_is_k2g_ice (void ) +{ +return board_ti_is ("66AK2GIC" ); +} +#else +static inline int board_is_k2g_gp (void ) +{ +return false; +} +static inline int board_is_k2g_ice (void ) +{ +return false; +} +#endif +int get_num_eth_ports (void );void spl_init_keystone_plls (void );
Signature · 1 line
2.10.0
PATCH 22/31 ks2_evm: Add EEPROM based board detection helper functions
Quoted 5 lines · Franklin S Cooper Jr
Add a function that can be used to determine if the board being ran on is a K2G Industrial Communication Engine EVM or K2G General Purpose EVM based on values programmed on the EEPROM.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/2c6a39c6/attachment.sig>
PATCH 23/31 ARM: k2g: Add pinmux support for K2G ICE evm
In reply to Franklin S Cooper JrAdd basic pinmux data for new K2G ICE evm. Also add pinmuxing for a generic K2G evm which includes I2C 0 and 1 used for board detection purposes.
Since multiple K2G boards are supported that means initially generic pinmuxing should be used when board detection hasn't ran. Once board detection runs the proper pinmuxing can be reran to match the board being ran on.
--- board/ti/ks2_evm/board_k2g.c | 2 ++ board/ti/ks2_evm/mux-k2g.h | 45 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-)
board/ti/ks2_evm/board_k2g.c +2 -0
@@ -180,6 +180,8 @@ int embedded_dtb_select(void)fdtdec_setup (); +k2g_mux_config (); +k2g_reset_mux_config ();/* deassert FLASH_HOLD */
board/ti/ks2_evm/mux-k2g.h +44 -1
57 lines not on this page · raw message
Signature · 1 line
2.10.0
PATCH 23/31 ARM: k2g: Add pinmux support for K2G ICE evm
Quoted 10 lines · Franklin S Cooper Jr
Add basic pinmux data for new K2G ICE evm. Also add pinmuxing for a generic K2G evm which includes I2C 0 and 1 used for board detection purposes.
Since multiple K2G boards are supported that means initially generic pinmuxing should be used when board detection hasn't ran. Once board detection runs the proper pinmuxing can be reran to match the board being ran on.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/82e1c899/attachment.sig>
PATCH 24/31 ARM: k2g: Add DDR3 configuration for K2G ICE evm
In reply to Franklin S Cooper JrAdd configuration settings used by the K2G ICE evm. Also use board detection to determine which DDR3 configuration to use.
--- board/ti/ks2_evm/ddr3_k2g.c | 62 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-)
board/ti/ks2_evm/ddr3_k2g.c +60 -2
@@ -10,7 +10,9 @@#include <common.h> #include "ddr3_cfg.h" #include <asm/arch/ddr3.h> +#include "board.h" +/* K2G GP EVM DDR3 Configuration */ struct ddr3_phy_config ddr3phy_800_2g = { .pllcr =0x000DC000ul , .pgcr1_mask = (IODDRM_MASK |ZCKSEL_MASK ),
@@ -61,13 +63,69 @@ struct ddr3_emif_config ddr3_800_2g = { .sdrfc = 0x00000C34ul, }; +/* K2G ICE evm DDR3 Configuration */ +struct ddr3_phy_config ddr3phy_800_512mb = { + .pllcr =0x000DC000ul , + .pgcr1_mask = (IODDRM_MASK |ZCKSEL_MASK ), + .pgcr1_val = ((1 <<2 ) | (2 <<7 ) | (1 <<23 )), + .ptr0 =0x42C21590ul , + .ptr1 =0xD05612C0ul , + .ptr2 =0 , + .ptr3 =0x06C30D40ul , + .ptr4 =0x06413880ul , + .dcr_mask = (PDQ_MASK |MPRDQ_MASK |BYTEMASK_MASK ), + .dcr_val = ((1 <<10 )), + .dtpr0 =0x550E6644ul , + .dtpr1 =0x32834200ul , + .dtpr2 =0x50022A00ul , + .mr0 =0x00001430ul , + .mr1 =0x00000006ul , + .mr2 =0x00000008ul , + .dtcr =0x710035C7ul , + .pgcr2 =0x00F03D09ul , + .zq0cr1 =0x0001005Dul , + .zq1cr1 =0x0001005Bul , + .zq2cr1 =0x0001005Bul , + .pir_v1 =0x00000033ul , + .datx8_2_mask =DXEN_MASK , + .datx8_2_val =0 , + .datx8_3_mask =DXEN_MASK , + .datx8_3_val =0 , + .datx8_4_mask =DXEN_MASK , + .datx8_4_val =0 , + .datx8_5_mask =DXEN_MASK , + .datx8_5_val =0 , + .datx8_6_mask =DXEN_MASK , + .datx8_6_val =0 , + .datx8_7_mask =DXEN_MASK , + .datx8_7_val =0 , + .datx8_8_mask =DXEN_MASK , + .datx8_8_val =0 , + .pir_v2 =0x00000F81ul , +}; + +struct ddr3_emif_config ddr3_800_512mb = { + .sdcfg =0x62006662ul , + .sdtim1 =0x0A385033ul , + .sdtim2 =0x00001CA5ul , + .sdtim3 =0x21ADFF32ul , + .sdtim4 =0x533F067Ful , + .zqcfg =0x70073200ul , + .sdrfc =0x00000C34ul , +}; +u32 ddr3_init (void ) {/* Reset DDR3 PHY after PLL enabled */ ddr3_reset_ddrphy (); -ddr3_init_ddrphy (KS2_DDR3A_DDRPHYC , &ddr3phy_800_2g); -ddr3_init_ddremif (KS2_DDR3A_EMIF_CTRL_BASE , &ddr3_800_2g); +if (board_is_k2g_gp ()) { +ddr3_init_ddrphy (KS2_DDR3A_DDRPHYC , &ddr3phy_800_2g); +ddr3_init_ddremif (KS2_DDR3A_EMIF_CTRL_BASE , &ddr3_800_2g); + }else if (board_is_k2g_ice ()) { +ddr3_init_ddrphy (KS2_DDR3A_DDRPHYC , &ddr3phy_800_512mb); +ddr3_init_ddremif (KS2_DDR3A_EMIF_CTRL_BASE , &ddr3_800_512mb); + }return 0 ; }
Signature · 1 line
2.10.0
PATCH 24/31 ARM: k2g: Add DDR3 configuration for K2G ICE evm
Quoted 4 lines · Franklin S Cooper Jr
Add configuration settings used by the K2G ICE evm. Also use board detection to determine which DDR3 configuration to use.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/d45289df/attachment.sig>
PATCH 25/31 board: ks2: Use board detection to wrap code not specific to K2G ICE evm
In reply to Franklin S Cooper JrSome code doesn't apply to K2G ICE evm. Therefore, use board detection to wrap these calls.
--- board/ti/ks2_evm/board.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
board/ti/ks2_evm/board.c +9 -5
@@ -45,13 +45,17 @@ int dram_init(void) gd->ram_size =get_ram_size ((long *)CONFIG_SYS_SDRAM_BASE ,CONFIG_MAX_RAM_BANK_SIZE );#if defined(CONFIG_TI_AEMIF ) -aemif_init (ARRAY_SIZE (aemif_configs), aemif_configs); +if (!board_is_k2g_ice ()) +aemif_init (ARRAY_SIZE (aemif_configs), aemif_configs);#endif -if (ddr3_size) -ddr3_init_ecc (KS2_DDR3A_EMIF_CTRL_BASE , ddr3_size); -else -ddr3_init_ecc (KS2_DDR3A_EMIF_CTRL_BASE , gd->ram_size >>30 ); +if (!board_is_k2g_ice ()) { +if (ddr3_size) +ddr3_init_ecc (KS2_DDR3A_EMIF_CTRL_BASE , ddr3_size); +else +ddr3_init_ecc (KS2_DDR3A_EMIF_CTRL_BASE , + gd->ram_size >>30 ); + }return 0 ; }
Signature · 1 line
2.10.0
PATCH 25/31 board: ks2: Use board detection to wrap code not specific to K2G ICE evm
Quoted 4 lines · Franklin S Cooper Jr
Some code doesn't apply to K2G ICE evm. Therefore, use board detection to wrap these calls.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/517c95bd/attachment.sig>
PATCH 26/31 ARM: k2g: Use board detection to wrap K2G GP specific calls
In reply to Franklin S Cooper JrCertain peripherals used by K2G GP aren't used on K2G ICE evm. Or configuration is slightly different. Therefore, use board detection to deal with these variations.
--- board/ti/ks2_evm/board_k2g.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
board/ti/ks2_evm/board_k2g.c +10 -6
@@ -114,7 +114,9 @@ int board_mmc_init(bd_t *bis)return -1 ; } -omap_mmc_init (0 ,0 ,0 ,-1 ,-1 ); +if (board_is_k2g_gp ()) +omap_mmc_init (0 ,0 ,0 ,-1 ,-1 ); +omap_mmc_init (1 ,0 ,0 ,-1 ,-1 );return 0 ; }
@@ -184,11 +186,13 @@ int embedded_dtb_select(void)k2g_reset_mux_config (); -/* deassert FLASH_HOLD */ -clrbits_le32 (K2G_GPIO1_BANK2_BASE +K2G_GPIO_DIR_OFFSET , -BIT (9 )); -setbits_le32 (K2G_GPIO1_BANK2_BASE +K2G_GPIO_SETDATA_OFFSET , -BIT (9 )); +if (board_is_k2g_gp ()) { +/* deassert FLASH_HOLD */ +clrbits_le32 (K2G_GPIO1_BANK2_BASE +K2G_GPIO_DIR_OFFSET , +BIT (9 )); +setbits_le32 (K2G_GPIO1_BANK2_BASE +K2G_GPIO_SETDATA_OFFSET , +BIT (9 )); + }return 0 ; }
Signature · 1 line
2.10.0
PATCH 26/31 ARM: k2g: Use board detection to wrap K2G GP specific calls
Quoted 5 lines · Franklin S Cooper Jr
Certain peripherals used by K2G GP aren't used on K2G ICE evm. Or configuration is slightly different. Therefore, use board detection to deal with these variations.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/61dd9858/attachment.sig>
PATCH 27/31 ARM: k2g: Update board_name u-boot env variable at runtime
In reply to Franklin S Cooper JrEnable CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG to allow "board_name" to be set depending on the board it is being ran on.
Update findfdt to use this new dynamic board_name value to determine which dtb should be used.
--- board/ti/ks2_evm/board_k2g.c | 13 +++++++++++++ include/configs/k2g_evm.h | 14 ++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-)
board/ti/ks2_evm/board_k2g.c +13 -0
@@ -198,6 +198,19 @@ int embedded_dtb_select(void) }#endif +#ifdef CONFIG_BOARD_LATE_INIT +int board_late_init (void ) +{ +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +if (board_is_k2g_gp ()) +setenv ("board_name" ,"66AK2GGP\0" ); +else if (board_is_k2g_ice ()) +setenv ("board_name" ,"66AK2GIC\0" ); +#endif +return 0 ; +} +#endif +#ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f (void ) {
include/configs/k2g_evm.h +12 -2
@@ -13,6 +13,9 @@/* Platform type */ #define CONFIG_SOC_K2G +#define CONFIG_BOARD_LATE_INIT +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +/* U-Boot general configuration */ #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ DEFAULT_MMC_TI_ARGS \
@@ -25,7 +28,14 @@"rd_spec=-\0" \"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \"root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \ -"name_fdt=keystone-k2g-evm.dtb\0" \ +"findfdt=" \ +"if test $board_name = 66AK2GGP; then " \ +"setenv name_fdt keystone-k2g-evm.dtb; " \ +"else if test $board_name = 66AK2GIC; then " \ +"setenv name_fdt keystone-k2g-ice.dtb; " \ +"else if test $name_fdt = undefined; then " \ +"echo WARNING: Could not determine device tree to use;" \ +"fi;fi;fi;\0" \"name_mon=skern-k2g.bin\0" \"name_ubi=k2g-evm-ubifs.ubi\0" \"name_uboot=u-boot-spi-k2g-evm.gph\0" \
@@ -43,7 +53,7 @@"run envboot; " \"run set_name_pmmc init_${boot} init_fw_rd_${boot} " \"get_pmmc_${boot} run_pmmc get_mon_${boot} run_mon " \ - "get_fdt_${boot} get_kern_${boot} run_kern" + "findfdt get_fdt_${boot} get_kern_${boot} run_kern"#include <configs/ti_armv7_keystone2.h>
Signature · 1 line
2.10.0
PATCH 27/31 ARM: k2g: Update board_name u-boot env variable at runtime
Quoted 7 lines · Franklin S Cooper Jr
Enable
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIGto allow "board_name" to be set depending on the board it is being ran on.Update findfdt to use this new dynamic
board_namevalue to determine which dtb should be used.Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/9bddbdac/attachment.sig>
PATCH 28/31 ARM: dts: k2g: Disable netcp by default
In reply to Franklin S Cooper JrDisable netcp by default like all other peripherals in the dtsi file. Enable the peripheral explicitly in the board specific dts file.
--- arch/arm/dts/keystone-k2g-evm.dts | 4 ++++ arch/arm/dts/keystone-k2g-netcp.dtsi | 1 + 2 files changed, 5 insertions(+)
arch/arm/dts/keystone-k2g-evm.dts +4 -0
@@ -32,6 +32,10 @@ phy-handle = <ðphy0>; }; +&netcp { + status = "okay"; +}; + &spi1 { status = "okay";
arch/arm/dts/keystone-k2g-netcp.dtsi +1 -0
@@ -99,6 +99,7 @@ netcp: netcp at 4000000 { reg = <0x2620110 0x8>; reg-names = "efuse"; compatible = "ti,netcp-1.0"; + status = "disabled"; #address-cells = <1>; #size-cells = <1>; /* power-domains = <&k2g_pds K2G_DEV_NSS0>; */
Signature · 1 line
2.10.0
PATCH 28/31 ARM: dts: k2g: Disable netcp by default
Quoted 4 lines · Franklin S Cooper Jr
Disable netcp by default like all other peripherals in the dtsi file. Enable the peripheral explicitly in the board specific dts file.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Has this been pushed up to Linux yet? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/f40b1a9a/attachment.sig>
PATCH 28/31 ARM: dts: k2g: Disable netcp by default
Quoted 8 lines · Tom Rini
Quoted 4 lines · Franklin S Cooper Jr
Disable netcp by default like all other peripherals in the dtsi file. Enable the peripheral explicitly in the board specific dts file.
Signed-off-by Franklin S Cooper Jr <[email protected]>Has this been pushed up to Linux yet? Thanks!
Only an extremely bare minimal dts exist in upstream. So this patch isn't applicable.
Quoted 1 line
PATCH 29/31 ARM: dts: k2g: Add DT support for K2G Industrial Communication Engine evm
In reply to Franklin S Cooper JrAdd basic DT support for K2G ICE evm. Only minimal peripherals are supported to allow console output and MMC boot.
--- arch/arm/dts/Makefile | 3 ++- arch/arm/dts/keystone-k2g-ice.dts | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/keystone-k2g-ice.dts
arch/arm/dts/Makefile +2 -1
@@ -324,7 +324,8 @@ dtb-$(CONFIG_SOC_KEYSTONE) += keystone-k2hk-evm.dtb \ keystone-k2l-evm.dtb \ keystone-k2e-evm.dtb \ keystone-k2g-evm.dtb \ - keystone-k2g-generic.dtb + keystone-k2g-generic.dtb \ + keystone-k2g-ice.dtb dtb-$(CONFIG_TARGET_SAMA5D2_XPLAINED) += \ at91-sama5d2_xplained.dtb
arch/arm/dts/keystone-k2g-ice.dts new file +25 -0
@@ -0,0 +1,25 @@ +/* + * Copyright 2017 Texas Instruments, Inc. + * + * K2G Industrial Communication Engine EVM device tree + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +/dts-v1/; + +#include "keystone-k2g.dtsi" + +/ { + compatible = "ti,k2g-ice", "ti,k2g", "ti,keystone"; + model = "Texas Instruments K2G Industrial Communication EVM"; + + chosen { + stdout-path = &uart0; + }; +}; + +&mmc1 { + status = "okay"; +};
Signature · 1 line
2.10.0
PATCH 29/31 ARM: dts: k2g: Add DT support for K2G Industrial Communication Engine evm
Quoted 7 lines · Franklin S Cooper Jr
Add basic DT support for K2G ICE evm. Only minimal peripherals are supported to allow console output and MMC boot.
Signed-off-by Franklin S Cooper Jr <[email protected]>--- arch/arm/dts/Makefile | 3 ++- arch/arm/dts/keystone-k2g-ice.dts | 25 +++++++++++++++++++++++++
Has this been pushed up to Linux yet? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/0c22b4ba/attachment.sig>
PATCH 29/31 ARM: dts: k2g: Add DT support for K2G Industrial Communication Engine evm
Quoted 11 lines · Tom Rini
Quoted 7 lines · Franklin S Cooper Jr
Add basic DT support for K2G ICE evm. Only minimal peripherals are supported to allow console output and MMC boot.
Signed-off-by Franklin S Cooper Jr <[email protected]>--- arch/arm/dts/Makefile | 3 ++- arch/arm/dts/keystone-k2g-ice.dts | 25 +++++++++++++++++++++++++Has this been pushed up to Linux yet? Thanks!
Not yet.
Quoted 1 line
PATCH 29/31 ARM: dts: k2g: Add DT support for K2G Industrial Communication Engine evm
Quoted 8 lines · Franklin S Cooper Jr
Quoted 5 lines · Tom Rini
Quoted 3 lines · Franklin S Cooper Jr
Add basic DT support for K2G ICE evm. Only minimal peripherals are supported to allow console output and MMC boot.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Signed-off-by Franklin S Cooper Jr <[email protected]>--- arch/arm/dts/Makefile | 3 ++- arch/arm/dts/keystone-k2g-ice.dts | 25 +++++++++++++++++++++++++Has this been pushed up to Linux yet? Thanks!
Not yet.
OK. The point for here (and patch 28) is that I'd like to see the DTS queued up in the appropriate tree for the kernel before we pull it in here (or at least the maintainer saying they'll pull it when gathering stuff next) so that we don't have them getting out of sync. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170317/fc848a65/attachment.sig>
PATCH 30/31 ARM: k2g: Add K2G ICE DTB to the list of possible DTBs
In reply to Franklin S Cooper JrK2G ICE evm will have its own dtb. Therefore, add it to the list of dtbs located in the appended U-boot dtb FIT image. Therefore, when swapping out dtbs K2G ICE boards can grab the correct one.
--- board/ti/ks2_evm/board_k2g.c | 2 ++ 1 file changed, 2 insertions(+)
board/ti/ks2_evm/board_k2g.c +2 -0
@@ -131,6 +131,8 @@ int board_fit_config_name_match(const char *name)return 0 ; else if (!strcmp(name, "keystone-k2g-evm") && board_ti_is("66AK2GGP"))return 0 ; + else if (!strcmp(name, "keystone-k2g-ice") && board_ti_is("66AK2GIC")) +return 0 ; else return -1; }
Signature · 1 line
2.10.0
PATCH 30/31 ARM: k2g: Add K2G ICE DTB to the list of possible DTBs
Quoted 5 lines · Franklin S Cooper Jr
K2G ICE evm will have its own dtb. Therefore, add it to the list of dtbs located in the appended U-boot dtb FIT image. Therefore, when swapping out dtbs K2G ICE boards can grab the correct one.
Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/fe125b7b/attachment.sig>
PATCH 31/31 defconfig: k2g_evm_defconfig: Add K2G ICE to OF_LIST
In reply to Franklin S Cooper JrInclude K2G ICE to OF_LIST so it can be used for runtime board detection.
--- configs/k2g_evm_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configs/k2g_evm_defconfig +1 -1
@@ -60,4 +60,4 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_STORAGE=y CONFIG_DTB_RESELECT=y CONFIG_FIT_EMBED=y -CONFIG_OF_LIST="keystone-k2g-generic keystone-k2g-evm" +CONFIG_OF_LIST="keystone-k2g-generic keystone-k2g-evm keystone-k2g-ice"
Signature · 1 line
2.10.0
PATCH 31/31 defconfig: k2g_evm_defconfig: Add K2G ICE to OF_LIST
Quoted 4 lines · Franklin S Cooper Jr
Include K2G ICE to
OF_LISTso it can be used for runtime board detection.Signed-off-by Franklin S Cooper Jr <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/3b3d9cda/attachment.sig>