arm: Add support for LEGO MINDSTORMS EV3
This is based on the davinci da850evm. It can boot from either the
on-board 16MB flash or from a microSD card. It also reads board
information from an I2C EEPROM.
The EV3 itself initally boots from write-protected EEPROM, so no
u-boot SPL is needed.
Signed-off-by: David Lechner <david@lechnology.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index a8d3e2f..5d1c5c5 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -22,6 +22,9 @@
config TARGET_CALIMAIN
bool "Calimain board"
+config TARGET_LEGOEV3
+ bool "LEGO MINDSTORMS EV3"
+
endchoice
config SYS_SOC
@@ -31,5 +34,6 @@
source "board/davinci/da8xxevm/Kconfig"
source "board/davinci/ea20/Kconfig"
source "board/omicron/calimain/Kconfig"
+source "board/lego/ev3/Kconfig"
endif
diff --git a/arch/arm/mach-davinci/da850_pinmux.c b/arch/arm/mach-davinci/da850_pinmux.c
index 6105f63..758109e 100644
--- a/arch/arm/mach-davinci/da850_pinmux.c
+++ b/arch/arm/mach-davinci/da850_pinmux.c
@@ -12,6 +12,16 @@
#include <asm/arch/pinmux_defs.h>
/* SPI pin muxer settings */
+const struct pinmux_config spi0_pins_base[] = {
+ { pinmux(3), 1, 0 }, /* SPI0_CLK */
+ { pinmux(3), 1, 2 }, /* SPI0_SOMI */
+ { pinmux(3), 1, 3 }, /* SPI0_SIMO */
+};
+
+const struct pinmux_config spi0_pins_scs0[] = {
+ { pinmux(4), 1, 1 }, /* SPI0_SCS[0] */
+};
+
const struct pinmux_config spi1_pins_base[] = {
{ pinmux(5), 1, 2 }, /* SPI1_CLK */
{ pinmux(5), 1, 4 }, /* SPI1_SOMI */
diff --git a/arch/arm/mach-davinci/include/mach/hardware.h b/arch/arm/mach-davinci/include/mach/hardware.h
index a4eb0bd..2a0360a 100644
--- a/arch/arm/mach-davinci/include/mach/hardware.h
+++ b/arch/arm/mach-davinci/include/mach/hardware.h
@@ -503,6 +503,7 @@
#define DAVINCI_SYSCFG_SUSPSRC_SPI0 (1 << 21)
#define DAVINCI_SYSCFG_SUSPSRC_SPI1 (1 << 22)
#define DAVINCI_SYSCFG_SUSPSRC_UART0 (1 << 18)
+#define DAVINCI_SYSCFG_SUSPSRC_UART1 (1 << 19)
#define DAVINCI_SYSCFG_SUSPSRC_UART2 (1 << 20)
#define DAVINCI_SYSCFG_SUSPSRC_TIMER0 (1 << 27)