summaryrefslogtreecommitdiffstats
path: root/include/configs/omap3_igep00x0.h
diff options
context:
space:
mode:
authorPau Pajuelo <ppajuel@gmail.com>2017-08-17 03:09:14 +0200
committerTom Rini <trini@konsulko.com>2017-08-26 14:56:12 -0400
commit195dc23185400fa605d268c3d903c83286ecae37 (patch)
tree150654fbc9101cf12a74f53ed1289276f17a40b9 /include/configs/omap3_igep00x0.h
parent4c699a4747e763e82cc813c955d318b966303b81 (diff)
downloadu-boot-195dc23185400fa605d268c3d903c83286ecae37.tar.gz
u-boot-195dc23185400fa605d268c3d903c83286ecae37.tar.xz
u-boot-195dc23185400fa605d268c3d903c83286ecae37.zip
igep00x0: merge igep0020 and igep0030 defconfigs to igep00x0_defconfig
Update igep00x0 code with the following features: - Add board and revision detection for the boards: - IGEP0020-RF - IGEP0020-RC - IGEP0030-RG - IGEP0030-RE - Merge IGEP0020 and IGEP0030 mux tables - Add suport to use GPIO_126, GPIO_127 and GPIO_129 - board_name and board_rev environment variables display board and revision informations - Move dtb name selection from code to boot script Signed-off-by: Pau Pajuelo <ppajuel@gmail.com> Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Tested-by: Pau Pajuelo <ppajuel@gmail.com>
Diffstat (limited to 'include/configs/omap3_igep00x0.h')
-rw-r--r--include/configs/omap3_igep00x0.h45
1 files changed, 35 insertions, 10 deletions
diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h
index a029b54804..dc137dbd41 100644
--- a/include/configs/omap3_igep00x0.h
+++ b/include/configs/omap3_igep00x0.h
@@ -13,7 +13,6 @@
#define CONFIG_NR_DRAM_BANKS 2
#include <configs/ti_omap3_common.h>
-#include <asm/mach-types.h>
/*
* We are only ever GP parts and will utilize all of the "downloaded image"
@@ -26,15 +25,21 @@
#define CONFIG_REVISION_TAG 1
-/* Status LED available for IGEP0020 and IGEP0030 but not IGEP0032 */
-#if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0020) || \
- (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0030)
-#if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0020)
-#define RED_LED_GPIO 27
-#elif (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0030)
-#define RED_LED_GPIO 16
-#endif
-#endif
+/* GPIO banks */
+#define CONFIG_OMAP3_GPIO_2 /* GPIO32..63 is in GPIO bank 2 */
+#define CONFIG_OMAP3_GPIO_4 /* GPIO96..127 is in GPIO bank 4 */
+
+/* TPS65950 */
+#define PBIASLITEVMODE1 (1 << 8)
+
+/* LED */
+#define IGEP0020_GPIO_LED 27
+#define IGEP0030_GPIO_LED 16
+
+/* Board and revision detection GPIOs */
+#define IGEP0030_USB_TRANSCEIVER_RESET 54
+#define GPIO_IGEP00X0_BOARD_DETECTION 28
+#define GPIO_IGEP00X0_REVISION_DETECTION 129
/* USB */
#define CONFIG_USB_MUSB_UDC 1
@@ -67,9 +72,29 @@
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0)
+#define CONFIG_BOOTCOMMAND \
+ "run findfdt; " \
+ "run distro_bootcmd"
+
#include <config_distro_bootcmd.h>
+#define ENV_FINDFDT \
+ "findfdt="\
+ "if test ${board_name} = igep0020; then " \
+ "if test ${board_rev} = F; then " \
+ "setenv fdtfile omap3-igep0020-rev-f.dtb; " \
+ "else " \
+ "setenv fdtfile omap3-igep0020.dtb; fi; fi; " \
+ "if test ${board_name} = igep0030; then " \
+ "if test ${board_rev} = G; then " \
+ "setenv fdtfile omap3-igep0030-rev-g.dtb; " \
+ "else " \
+ "setenv fdtfile omap3-igep0030.dtb; fi; fi; " \
+ "if test ${fdtfile} = ''; then " \
+ "echo WARNING: Could not determine device tree to use; fi; \0"
+
#define CONFIG_EXTRA_ENV_SETTINGS \
+ ENV_FINDFDT \
ENV_DEVICE_SETTINGS \
MEM_LAYOUT_SETTINGS \
BOOTENV