[U-Boot] [PATCH 7/9] board: ti: am57xx: Add support for the am571x idk

2016-11-24 Thread Lokesh Vutla
From: Steve Kipisz 

The AM571x Industrial Development Kit (IDK) is a board based on TI's
AM571x SoC which has a single core 1.5GHz Cortex-A15processor. This
board is a development platform for the Industrial Market with:

- 1GB of DDR3L
- Dual 1Gbps Ethernet
- HDMI
- PRU-ICSS
- uSD
- 16GB eMMC
- CAN
- RS-485
- PCIe
- USB3.0
- Video Input Port
- Industrial IO port and expansion connector

The PRU/ICSS will be supported by 3rd party software for EtherCat,
Profibus, and other Industrial protocols.

The link to the data sheet and TRM can be found here:
http://www.ti.com/product/AM5718

Signed-off-by: Steve Kipisz 
Signed-off-by: Nishanth Menon 
Signed-off-by: Lokesh Vutla 
---
 board/ti/am57xx/board.c   |  24 +++-
 board/ti/am57xx/mux_data.h| 263 ++
 include/configs/ti_omap5_common.h |   2 +
 3 files changed, 286 insertions(+), 3 deletions(-)

diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index f6a4314..a4bb117 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -42,6 +42,7 @@
(board_ti_is("AM572PM_") && \
 (strncmp("A.30", board_ti_get_rev(), 3) <= 0))
 #define board_is_am572x_idk()  board_ti_is("AM572IDK")
+#define board_is_am571x_idk()  board_ti_is("AM571IDK")
 
 #ifdef CONFIG_DRIVER_TI_CPSW
 #include 
@@ -63,9 +64,17 @@ static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = 
{
.is_ma_present  = 0x1
 };
 
+static const struct dmm_lisa_map_regs am571x_idk_lisa_regs = {
+   .dmm_lisa_map_3 = 0x80640100,
+   .is_ma_present  = 0x1
+};
+
 void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
 {
-   *dmm_lisa_regs = &beagle_x15_lisa_regs;
+   if (board_is_am571x_idk())
+   *dmm_lisa_regs = &am571x_idk_lisa_regs;
+   else
+   *dmm_lisa_regs = &beagle_x15_lisa_regs;
 }
 
 static const struct emif_regs beagle_x15_emif1_ddr3_532mhz_emif_regs = {
@@ -379,6 +388,8 @@ void do_board_detect(void)
bname = "AM572x EVM";
else if (board_is_am572x_idk())
bname = "AM572x IDK";
+   else if (board_is_am571x_idk())
+   bname = "AM571x IDK";
 
if (bname)
snprintf(sysinfo.board_string, SYSINFO_BOARD_NAME_MAX_LEN,
@@ -407,6 +418,8 @@ static void setup_board_eeprom_env(void)
name = "am57xx_evm";
} else if (board_is_am572x_idk()) {
name = "am572x_idk";
+   } else if (board_is_am571x_idk()) {
+   name = "am571x_idk";
} else {
printf("Unidentified board claims %s in eeprom header\n",
   board_ti_get_name());
@@ -472,6 +485,11 @@ void recalibrate_iodelay(void)
pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am572x_idk);
iod = iodelay_cfg_array_am572x_idk;
iod_sz = ARRAY_SIZE(iodelay_cfg_array_am572x_idk);
+   } else if (board_is_am571x_idk()) {
+   pconf = core_padconf_array_essential_am571x_idk;
+   pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am571x_idk);
+   iod = iodelay_cfg_array_am571x_idk;
+   iod_sz = ARRAY_SIZE(iodelay_cfg_array_am571x_idk);
} else {
/* Common for X15/GPEVM */
pconf = core_padconf_array_essential_x15;
@@ -749,8 +767,8 @@ int board_eth_init(bd_t *bis)
ctrl_val |= 0x22;
writel(ctrl_val, (*ctrl)->control_core_control_io1);
 
-   /* The phy address for the AM572x IDK are different than x15 */
-   if (board_is_am572x_idk()) {
+   /* The phy address for the AM57xx IDK are different than x15 */
+   if (board_is_am572x_idk() || board_is_am571x_idk()) {
cpsw_data.slave_data[0].phy_addr = 0;
cpsw_data.slave_data[1].phy_addr = 1;
}
diff --git a/board/ti/am57xx/mux_data.h b/board/ti/am57xx/mux_data.h
index d612ec2..2f5243e 100644
--- a/board/ti/am57xx/mux_data.h
+++ b/board/ti/am57xx/mux_data.h
@@ -501,6 +501,232 @@ const struct pad_conf_entry 
core_padconf_array_essential_am572x_idk[] = {
{RSTOUTN, (M0 | PIN_OUTPUT)},   /* rstoutn.rstoutn */
 };
 
+const struct pad_conf_entry core_padconf_array_essential_am571x_idk[] = {
+   {GPMC_A0, (M6 | PIN_INPUT_PULLDOWN | VIRTUAL_MODE13)},  /* 
gpmc_a0.vin1b_d0 */
+   {GPMC_A1, (M6 | PIN_INPUT_PULLDOWN | VIRTUAL_MODE13)},  /* 
gpmc_a1.vin1b_d1 */
+   {GPMC_A2, (M6 | PIN_INPUT_PULLDOWN | VIRTUAL_MODE13)},  /* 
gpmc_a2.vin1b_d2 */
+   {GPMC_A3, (M6 | PIN_INPUT_PULLDOWN | VIRTUAL_MODE11)},  /* 
gpmc_a3.vin1b_d3 */
+   {GPMC_A4, (M6 | PIN_INPUT_PULLDOWN | VIRTUAL_MODE11)},  /* 
gpmc_a4.vin1b_d4 */
+   {GPMC_A5, (M6 | PIN_INPUT_PULLDOWN | VIRTUAL_MODE13)},  /* 
gpmc_a5.vin1b_d5 */
+   {GPMC_A6, (M6 | PIN_INPUT_PULLDOWN | VIRTUAL_MODE13)},  /* 
gpmc_a6.vin1b_d6 */
+   {GPMC_A7, (M6 | PIN_INPUT_PULLDOWN | VIRTUAL_MODE13)},  /* 

Re: [U-Boot] [PATCH 7/9] board: ti: am57xx: Add support for the am571x idk

2016-11-26 Thread Tom Rini
On Fri, Nov 25, 2016 at 11:14:24AM +0530, Lokesh Vutla wrote:

> From: Steve Kipisz 
> 
> The AM571x Industrial Development Kit (IDK) is a board based on TI's
> AM571x SoC which has a single core 1.5GHz Cortex-A15processor. This
> board is a development platform for the Industrial Market with:
> 
> - 1GB of DDR3L
> - Dual 1Gbps Ethernet
> - HDMI
> - PRU-ICSS
> - uSD
> - 16GB eMMC
> - CAN
> - RS-485
> - PCIe
> - USB3.0
> - Video Input Port
> - Industrial IO port and expansion connector
> 
> The PRU/ICSS will be supported by 3rd party software for EtherCat,
> Profibus, and other Industrial protocols.
> 
> The link to the data sheet and TRM can be found here:
> http://www.ti.com/product/AM5718
> 
> Signed-off-by: Steve Kipisz 
> Signed-off-by: Nishanth Menon 
> Signed-off-by: Lokesh Vutla 

Reviewed-by: Tom Rini 

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot