Skip to contentSkip to conversation

board: ti: am57xx: Add board detection logic for am57xx evm

PATCH New Steve Kipisz 2 participants 2 messages Oct 28, 2015 – Oct 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: ti: am57xx: Add board detection logic for am57xx evm

Add board detection logic for the AM57xx EVM. More information about the EVM can be found here
http://www.ti.com/tool/tmdxevm5728

The AM572x Evaluation Module provides an affordable platform to quickly start evaluation of Sitara. ARM Cortex-A15 AM57x Processors (AM5728, AM5726, AM5718, AM5716) and accelerate development for HMI, machine vision, networking, medical imaging and many other industrial applications. It is a development platform based on the dual ARM Cortex-A15, dual C66x DSP processor that is integrated with tons of connectivity such as PCIe, SATA, HDMI, USB 3.0/2.0, Dual Gigabit Ethernet, and more.

The AM572x Evaluation Module also integrates video and 3D/2D graphics acceleration, as well as a quad-core Programmable Real-time Unit (PRU) and dual ARM Cortex-M4 cores.

---
 board/ti/am57xx/board.c           | 4 +++-
 board/ti/am57xx/board.h           | 5 +++++
 include/configs/ti_omap5_common.h | 2 ++
 3 files changed, 10 insertions(+), 1 deletion(-)
board/ti/am57xx/board.c +3 -1
index 869bbe7..d075a49 100644
@@ -277,6 +277,8 @@ int board_late_init(void)
 	 */
 	if (board_is_x15())
 		setenv("board_name", "beagle_x15");
+	if (board_is_evm())
+		setenv("board_name", "am57xx_evm");
 
 	return 0;
 }
@@ -304,7 +306,7 @@ void recalibrate_iodelay(void)
 		}
 	}
 
-	if (board_is_x15())
+	if ((board_is_x15() || board_is_evm()))
 		__recalibrate_iodelay(core_padconf_array_essential,
 			ARRAY_SIZE(core_padconf_array_essential),
 			iodelay_cfg_array, ARRAY_SIZE(iodelay_cfg_array));
board/ti/am57xx/board.h +5 -0
index 55719ce..a380a58 100644
@@ -26,4 +26,9 @@ static inline int board_is_x15(void)
 {
 	return !strncmp(am57xx_board_name, "BBRDX15_", HDR_NAME_LEN);
 }
+
+static inline int board_is_evm(void)
+{
+	return !strncmp(am57xx_board_name, "AM572PM_", HDR_NAME_LEN);
+}
 #endif
include/configs/ti_omap5_common.h +2 -0
index 5acbc92..ae6e2a5 100644
@@ -120,6 +120,8 @@
 			"setenv fdtfile dra72-evm.dtb; fi;" \
 		"if test $board_name = beagle_x15; then " \
 			"setenv fdtfile am57xx-beagle-x15.dtb; fi;" \
+		"if test $board_name = am57xx_evm; then " \
+			"setenv fdtfile am57xx-evm.dtb; fi;" \
 		"if test $fdtfile = undefined; then " \
 			"echo WARNING: Could not determine device tree to use; fi; \0" \
 	"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 board: ti: am57xx: Add board detection logic for am57xx evm

Quoted 29 lines · Steve Kipisz

Add board detection logic for the AM57xx EVM. More information about the EVM can be found here
http://www.ti.com/tool/tmdxevm5728

The AM572x Evaluation Module provides an affordable platform to quickly start evaluation of Sitara. ARM Cortex-A15 AM57x Processors (AM5728, AM5726, AM5718, AM5716) and accelerate development for HMI, machine vision, networking, medical imaging and many other industrial applications. It is a development platform based on the dual ARM Cortex-A15, dual C66x DSP processor that is integrated with tons of connectivity such as PCIe, SATA, HDMI, USB 3.0/2.0, Dual Gigabit Ethernet, and more.

The AM572x Evaluation Module also integrates video and 3D/2D graphics acceleration, as well as a quad-core Programmable Real-time Unit (PRU) and dual ARM Cortex-M4 cores.

---
 board/ti/am57xx/board.c           | 4 +++-
 board/ti/am57xx/board.h           | 5 +++++
 include/configs/ti_omap5_common.h | 2 ++
 3 files changed, 10 insertions(+), 1 deletion(-)
board/ti/am57xx/board.c +0 -0
index 869bbe7..d075a49 100644

board/ti/am57xx/board.c int board_late_init(void) · line 279

Quoted 3 lines
board/ti/am57xx/board.c +0 -0
@@ -277,6 +277,8 @@ int board_late_init(void)
 	 */
 	if (board_is_x15())
 		setenv("board_name", "beagle_x15");

The above change depends on a previous patch which introduces board_is_x15() and then builds on it, However, the patch is not submitted as a proper series in the right order.

Quoted 33 lines
board/ti/am57xx/board.c +3 -1
+	if (board_is_evm())
+		setenv("board_name", "am57xx_evm");
 
 	return 0;
 }
@@ -304,7 +306,7 @@ void recalibrate_iodelay(void)
 		}
 	}
 
-	if (board_is_x15())
+	if ((board_is_x15() || board_is_evm()))
 		__recalibrate_iodelay(core_padconf_array_essential,
 			ARRAY_SIZE(core_padconf_array_essential),
 			iodelay_cfg_array, ARRAY_SIZE(iodelay_cfg_array));
board/ti/am57xx/board.h +5 -0
index 55719ce..a380a58 100644
@@ -26,4 +26,9 @@ static inline int board_is_x15(void)
 {
 	return !strncmp(am57xx_board_name, "BBRDX15_", HDR_NAME_LEN);
 }
+
+static inline int board_is_evm(void)
+{
+	return !strncmp(am57xx_board_name, "AM572PM_", HDR_NAME_LEN);
+}
 #endif
include/configs/ti_omap5_common.h +0 -0
index 5acbc92..ae6e2a5 100644

include/configs/ti_omap5_common.h line 124

Quoted 5 lines
include/configs/ti_omap5_common.h +2 -0
@@ -120,6 +120,8 @@
 			"setenv fdtfile dra72-evm.dtb; fi;" \
 		"if test $board_name = beagle_x15; then " \
 			"setenv fdtfile am57xx-beagle-x15.dtb; fi;" \
+		"if test $board_name = am57xx_evm; then " \
+			"setenv fdtfile am57xx-evm.dtb; fi;" \

Further, no such DTB exists in upstream kernel -> I suggest splitting out this specific change out of the series and repost once upstream kernel has support for the same.

Quoted 4 lines
include/configs/ti_omap5_common.h +0 -0
 		"if test $fdtfile = undefined; then " \
 			"echo WARNING: Could not determine device tree to use; fi; \0" \
 	"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
Signature · 2 lines
Regards,
Nishanth Menon