#include <common.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
+#include <malloc.h>
+#include <net.h>
#include <palmas.h>
#include <sata.h>
#include <serial.h>
#include <ti-usb-phy-uboot.h>
#include <mmc.h>
#include <dm/uclass.h>
+#include <hang.h>
#include "../common/board_detect.h"
#include "mux_data.h"
#define board_is_am571x_idk() board_ti_is("AM571IDK")
#define board_is_bbai() board_ti_is("BBONE-AI")
+#define board_is_ti_idk() board_is_am574x_idk() || \
+ board_is_am572x_idk() || \
+ board_is_am571x_idk()
+
#ifdef CONFIG_DRIVER_TI_CPSW
#include <cpsw.h>
#endif
DECLARE_GLOBAL_DATA_PTR;
#define GPIO_ETH_LCD GPIO_TO_PIN(2, 22)
-/* GPIO 7_11 */
-#define GPIO_DDR_VTT_EN 203
+#define GPIO_DDR_VTT_EN GPIO_TO_PIN(7, 11)
/* Touch screen controller to identify the LCD */
#define OSD_TS_FT_BUS_ADDRESS 0
struct udevice *dev;
/* Only valid for IDKs */
- if (board_is_x15() || board_is_am572x_evm() || board_is_bbai())
+ if (!board_is_ti_idk())
return;
/* Only AM571x IDK has gpio control detect.. so check that */
}
out:
env_set("idk_lcd", idk_lcd);
+
+ /*
+ * On AM571x_IDK, no Display with J51 set to LCD is considered as an
+ * invalid configuration and we prevent boot to get user attention.
+ */
+ if (board_is_am571x_idk() && am571x_idk_needs_lcd() &&
+ !strncmp(idk_lcd, "no", 2)) {
+ printf("%s: Invalid HW configuration: display not detected/supported but J51 is set. Remove J51 to boot without display.\n",
+ __func__);
+ hang();
+ }
+
return;
}