diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index 31fe0686e4be845e2d078f41228d066973432f87..9f64167e16ff524d3828df2e8c435738164d16e4 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -425,6 +425,9 @@ config TARGET_JLM config TARGET_LS bool "ls" +config TARGET_LSHORE + bool "lshore" + config TARGET_NITROGEN6X bool "nitrogen6x" imply USB_HOST_ETHER @@ -589,6 +592,7 @@ source "board/boundary/insp/Kconfig" source "board/boundary/ioc/Kconfig" source "board/boundary/jlm/Kconfig" source "board/boundary/ls/Kconfig" +source "board/boundary/lshore/Kconfig" source "board/boundary/nitrogen6x/Kconfig" source "board/boundary/ys/Kconfig" source "board/bticino/mamoj/Kconfig" diff --git a/board/boundary/lshore/Kconfig b/board/boundary/lshore/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..c88f0e706e73bcfa67ac8c22052e8ddcea315b76 --- /dev/null +++ b/board/boundary/lshore/Kconfig @@ -0,0 +1,24 @@ +if TARGET_LSHORE + +config SYS_CPU + default "armv7" + +config SYS_BOARD + default "lshore" + +config SYS_VENDOR + default "boundary" + +config SYS_SOC + default "mx6" + +config SYS_CONFIG_NAME + default "lshore" + +config ENV_WLMAC + bool + default y + +source "board/boundary/common/Kconfig" + +endif diff --git a/board/boundary/lshore/MAINTAINERS b/board/boundary/lshore/MAINTAINERS new file mode 100644 index 0000000000000000000000000000000000000000..8d20350a344c208f5ad0ca78ffda9eb43aa604a7 --- /dev/null +++ b/board/boundary/lshore/MAINTAINERS @@ -0,0 +1,7 @@ +LSHORE BOARD +M: Troy Kisky <troy.kisky@boundarydevices.com> +S: Maintained +F: board/boundary/lshore/ +F: include/configs/lshore.h +F: configs/lshore_defconfig + diff --git a/board/boundary/lshore/Makefile b/board/boundary/lshore/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..e178a54b12962a96984d9bc88fe6bdf37fbb134e --- /dev/null +++ b/board/boundary/lshore/Makefile @@ -0,0 +1,9 @@ +# +# Copyright (C) 2012-2013, Guennadi Liakhovetski <lg@denx.de> +# (C) Copyright 2012-2013 Freescale Semiconductor, Inc. +# Copyright (C) 2013, Boundary Devices <info@boundarydevices.com> +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := lshore.o diff --git a/board/boundary/lshore/lshore.c b/board/boundary/lshore/lshore.c new file mode 100644 index 0000000000000000000000000000000000000000..c897e01d48e2c3faf6185b9d413164b74994e9f9 --- /dev/null +++ b/board/boundary/lshore/lshore.c @@ -0,0 +1,445 @@ +/* + * Copyright (C) 2010-2013 Freescale Semiconductor, Inc. + * Copyright (C) 2013, Boundary Devices <info@boundarydevices.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <asm/io.h> +#include <asm/arch/clock.h> +#include <asm/arch/imx-regs.h> +#include <asm/arch/iomux.h> +#include <asm/arch/sys_proto.h> +#include <malloc.h> +#include <asm/arch/mx6-pins.h> +#include <linux/errno.h> +#include <asm/gpio.h> +#include <asm/mach-imx/boot_mode.h> +#include <asm/mach-imx/fbpanel.h> +#include <asm/mach-imx/iomux-v3.h> +#include <asm/mach-imx/mxc_i2c.h> +#include <asm/mach-imx/spi.h> +#include <mmc.h> +#include <fsl_esdhc.h> +#include <linux/fb.h> +#include <ipu_pixfmt.h> +#include <asm/arch/crm_regs.h> +#include <asm/arch/mxc_hdmi.h> +#include <i2c.h> +#include <input.h> +#include <usb/ehci-ci.h> + +/* Special MXCFB sync flags are here. */ +#include "../drivers/video/mxcfb.h" +#include "../common/bd_common.h" +#include "../common/padctrl.h" + +DECLARE_GLOBAL_DATA_PTR; + +#define I2C_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ + PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ + PAD_CTL_ODE | PAD_CTL_SRE_FAST) + +#define RGB_PAD_CTRL PAD_CTL_DSE_120ohm + +#define SPI_PAD_CTRL (PAD_CTL_HYS | \ + PAD_CTL_PUS_100K_DOWN | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) + +#define UART_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ + PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS) + +#define USDHC_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ + PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_LOW | \ + PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS) + +static const iomux_v3_cfg_t init_pads[] = { + /* WiFi/BT pads */ +#define GP_WLAN_EN IMX_GPIO_NR(6, 15) + IOMUX_PAD_CTRL(NANDF_CS2__GPIO6_IO15, WEAK_PULLUP), +#define GP_BT_EN IMX_GPIO_NR(6, 16) + IOMUX_PAD_CTRL(NANDF_CS3__GPIO6_IO16, WEAK_PULLUP), +#define GPIRQ_WL1271_WL IMX_GPIO_NR(6, 14) + IOMUX_PAD_CTRL(NANDF_CS0__GPIO6_IO11, WEAK_PULLDN), + + /* ECSPI1 */ + IOMUX_PAD_CTRL(EIM_D17__ECSPI1_MISO, SPI_PAD_CTRL), + IOMUX_PAD_CTRL(EIM_D18__ECSPI1_MOSI, SPI_PAD_CTRL), + IOMUX_PAD_CTRL(EIM_D16__ECSPI1_SCLK, SPI_PAD_CTRL), +#define GP_ECSPI1_NOR_CS IMX_GPIO_NR(3, 19) + IOMUX_PAD_CTRL(EIM_D19__GPIO3_IO19, SPI_PAD_CTRL), + + /* ENET pads that don't change for PHY reset */ + IOMUX_PAD_CTRL(ENET_MDIO__ENET_MDIO, PAD_CTRL_ENET_MDIO), + IOMUX_PAD_CTRL(ENET_MDC__ENET_MDC, PAD_CTRL_ENET_MDC), + IOMUX_PAD_CTRL(RGMII_TXC__RGMII_TXC, PAD_CTRL_ENET_TX), + IOMUX_PAD_CTRL(RGMII_TD0__RGMII_TD0, PAD_CTRL_ENET_TX), + IOMUX_PAD_CTRL(RGMII_TD1__RGMII_TD1, PAD_CTRL_ENET_TX), + IOMUX_PAD_CTRL(RGMII_TD2__RGMII_TD2, PAD_CTRL_ENET_TX), + IOMUX_PAD_CTRL(RGMII_TD3__RGMII_TD3, PAD_CTRL_ENET_TX), + IOMUX_PAD_CTRL(RGMII_TX_CTL__RGMII_TX_CTL, PAD_CTRL_ENET_TX), + IOMUX_PAD_CTRL(ENET_REF_CLK__ENET_TX_CLK, PAD_CTRL_ENET_TX), + IOMUX_PAD_CTRL(EIM_D23__GPIO3_IO23, WEAK_PULLUP), + /* pin 42 PHY nRST */ +#define GP_RGMII_PHY_RESET IMX_GPIO_NR(1, 27) + IOMUX_PAD_CTRL(ENET_RXD0__GPIO1_IO27, WEAK_PULLDN), + + /* GPIOs */ +#define GPIRQ_ACC_INT1 IMX_GPIO_NR(1, 2) + IOMUX_PAD_CTRL(GPIO_2__GPIO1_IO02, WEAK_PULLUP), +#define GPIRQ_ACC_INT2 IMX_GPIO_NR(1, 3) + IOMUX_PAD_CTRL(GPIO_3__GPIO1_IO03, WEAK_PULLUP), +#define GPIRQ_USB320_INTR IMX_GPIO_NR(1, 7) + IOMUX_PAD_CTRL(GPIO_7__GPIO1_IO07, WEAK_PULLUP), +#define GP_LED_GREEN IMX_GPIO_NR(3, 8) + IOMUX_PAD_CTRL(EIM_DA8__GPIO3_IO08, WEAK_PULLDN), +#define GP_LED_RED IMX_GPIO_NR(3, 6) + IOMUX_PAD_CTRL(EIM_DA6__GPIO3_IO06, WEAK_PULLDN), +#define GP_LED_YELLOW IMX_GPIO_NR(3, 5) + IOMUX_PAD_CTRL(EIM_DA5__GPIO3_IO05, WEAK_PULLDN), + +#define GP_SW1 IMX_GPIO_NR(3, 9) + IOMUX_PAD_CTRL(EIM_DA9__GPIO3_IO09, WEAK_PULLUP), +#define GP_SW2 IMX_GPIO_NR(3, 10) + IOMUX_PAD_CTRL(EIM_DA10__GPIO3_IO10, WEAK_PULLUP), +#define GP_SW3 IMX_GPIO_NR(3, 11) + IOMUX_PAD_CTRL(EIM_DA11__GPIO3_IO11, WEAK_PULLUP), +#define GP_SW4 IMX_GPIO_NR(3, 12) + IOMUX_PAD_CTRL(EIM_DA12__GPIO3_IO12, WEAK_PULLUP), +#define GP_SW5 IMX_GPIO_NR(3, 13) + IOMUX_PAD_CTRL(EIM_DA13__GPIO3_IO13, WEAK_PULLUP), + +#define GP_TP71 IMX_GPIO_NR(1, 30) + IOMUX_PAD_CTRL(ENET_TXD0__GPIO1_IO30, WEAK_PULLUP), + + /* PWM1 - Backlight on RGB connector */ +#define GP_BACKLIGHT_RGB IMX_GPIO_NR(1, 21) + IOMUX_PAD_CTRL(SD1_DAT3__GPIO1_IO21, WEAK_PULLUP), + + /* PWM4 on LVDS connector */ +#define GP_BACKLIGHT_LVDS IMX_GPIO_NR(1, 18) + IOMUX_PAD_CTRL(SD1_CMD__GPIO1_IO18, WEAK_PULLUP), + + /* DISP0_CONTRAST */ +#define GP_BACKLIGHT_LVDS_EN IMX_GPIO_NR(7, 12) + IOMUX_PAD_CTRL(GPIO_17__GPIO7_IO12, WEAK_PULLUP), + + /* UART1 */ + IOMUX_PAD_CTRL(SD3_DAT6__UART1_RX_DATA, UART_PAD_CTRL), + IOMUX_PAD_CTRL(SD3_DAT7__UART1_TX_DATA, UART_PAD_CTRL), + + /* UART2 */ +#ifndef CONFIG_SILENT_UART + IOMUX_PAD_CTRL(EIM_D26__UART2_TX_DATA, UART_PAD_CTRL), + IOMUX_PAD_CTRL(EIM_D27__UART2_RX_DATA, UART_PAD_CTRL), +#else + IOMUX_PAD_CTRL(EIM_D26__GPIO3_IO26, UART_PAD_CTRL), + IOMUX_PAD_CTRL(EIM_D27__GPIO3_IO27, UART_PAD_CTRL), +#endif + + /* UART3 */ + IOMUX_PAD_CTRL(EIM_D24__UART3_TX_DATA, UART_PAD_CTRL), + IOMUX_PAD_CTRL(EIM_D25__UART3_RX_DATA, UART_PAD_CTRL), + IOMUX_PAD_CTRL(EIM_D23__UART3_CTS_B, UART_PAD_CTRL), + IOMUX_PAD_CTRL(EIM_D31__UART3_RTS_B, UART_PAD_CTRL), + + /* UART4 */ + IOMUX_PAD_CTRL(CSI0_DAT12__UART4_TX_DATA, UART_PAD_CTRL), + IOMUX_PAD_CTRL(CSI0_DAT13__UART4_RX_DATA, UART_PAD_CTRL), + + /* USBH1 */ + IOMUX_PAD_CTRL(EIM_D30__USB_H1_OC, WEAK_PULLUP), + + /* USBOTG */ + IOMUX_PAD_CTRL(GPIO_1__USB_OTG_ID, WEAK_PULLUP), + IOMUX_PAD_CTRL(KEY_COL4__USB_OTG_OC, WEAK_PULLUP), +#define GP_REG_USBOTG IMX_GPIO_NR(3, 22) + IOMUX_PAD_CTRL(EIM_D22__GPIO3_IO22, WEAK_PULLDN), + + /* USDHC2 - Wifi */ + IOMUX_PAD_CTRL(SD2_CLK__SD2_CLK, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD2_CMD__SD2_CMD, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD2_DAT0__SD2_DATA0, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD2_DAT1__SD2_DATA1, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD2_DAT2__SD2_DATA2, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD2_DAT3__SD2_DATA3, USDHC_PAD_CTRL), + + /* USDHC3 */ + IOMUX_PAD_CTRL(SD3_CLK__SD3_CLK, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD3_CMD__SD3_CMD, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD3_DAT0__SD3_DATA0, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD3_DAT1__SD3_DATA1, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD3_DAT2__SD3_DATA2, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD3_DAT3__SD3_DATA3, USDHC_PAD_CTRL), +#define GP_USDHC3_CD IMX_GPIO_NR(7, 0) + IOMUX_PAD_CTRL(SD3_DAT5__GPIO7_IO00, WEAK_PULLUP), + + /* USDHC4 */ + IOMUX_PAD_CTRL(SD4_CMD__SD4_CMD, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD4_CLK__SD4_CLK, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD4_DAT0__SD4_DATA0, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD4_DAT1__SD4_DATA1, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD4_DAT2__SD4_DATA2, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD4_DAT3__SD4_DATA3, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD4_DAT4__SD4_DATA4, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD4_DAT5__SD4_DATA5, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD4_DAT6__SD4_DATA6, USDHC_PAD_CTRL), + IOMUX_PAD_CTRL(SD4_DAT7__SD4_DATA7, USDHC_PAD_CTRL), +#define GP_EMMC_RESET IMX_GPIO_NR(2, 6) + IOMUX_PAD_CTRL(NANDF_D6__GPIO2_IO06, WEAK_PULLUP), +}; + +#ifdef CONFIG_CMD_FBPANEL +static const iomux_v3_cfg_t rgb_pads[] = { + IOMUX_PAD_CTRL(DI0_DISP_CLK__IPU1_DI0_DISP_CLK, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DI0_PIN15__IPU1_DI0_PIN15, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DI0_PIN2__IPU1_DI0_PIN02, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DI0_PIN3__IPU1_DI0_PIN03, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DI0_PIN4__GPIO4_IO20, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT0__IPU1_DISP0_DATA00, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT1__IPU1_DISP0_DATA01, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT2__IPU1_DISP0_DATA02, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT3__IPU1_DISP0_DATA03, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT4__IPU1_DISP0_DATA04, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT5__IPU1_DISP0_DATA05, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT6__IPU1_DISP0_DATA06, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT7__IPU1_DISP0_DATA07, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT8__IPU1_DISP0_DATA08, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT9__IPU1_DISP0_DATA09, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT10__IPU1_DISP0_DATA10, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT11__IPU1_DISP0_DATA11, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT12__IPU1_DISP0_DATA12, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT13__IPU1_DISP0_DATA13, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT14__IPU1_DISP0_DATA14, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT15__IPU1_DISP0_DATA15, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT16__IPU1_DISP0_DATA16, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT17__IPU1_DISP0_DATA17, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT18__IPU1_DISP0_DATA18, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT19__IPU1_DISP0_DATA19, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT20__IPU1_DISP0_DATA20, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT21__IPU1_DISP0_DATA21, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT22__IPU1_DISP0_DATA22, RGB_PAD_CTRL), + IOMUX_PAD_CTRL(DISP0_DAT23__IPU1_DISP0_DATA23, RGB_PAD_CTRL), +}; +#endif + +static const iomux_v3_cfg_t rgb_gpio_pads[] = { + IOMUX_PAD_CTRL(DI0_DISP_CLK__GPIO4_IO16, WEAK_PULLUP), + IOMUX_PAD_CTRL(DI0_PIN15__GPIO4_IO17, WEAK_PULLUP), + IOMUX_PAD_CTRL(DI0_PIN2__GPIO4_IO18, WEAK_PULLUP), + IOMUX_PAD_CTRL(DI0_PIN3__GPIO4_IO19, WEAK_PULLUP), + IOMUX_PAD_CTRL(DI0_PIN4__GPIO4_IO20, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT0__GPIO4_IO21, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT1__GPIO4_IO22, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT2__GPIO4_IO23, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT3__GPIO4_IO24, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT4__GPIO4_IO25, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT5__GPIO4_IO26, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT6__GPIO4_IO27, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT7__GPIO4_IO28, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT8__GPIO4_IO29, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT9__GPIO4_IO30, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT10__GPIO4_IO31, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT11__GPIO5_IO05, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT12__GPIO5_IO06, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT13__GPIO5_IO07, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT14__GPIO5_IO08, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT15__GPIO5_IO09, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT16__GPIO5_IO10, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT17__GPIO5_IO11, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT18__GPIO5_IO12, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT19__GPIO5_IO13, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT20__GPIO5_IO14, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT21__GPIO5_IO15, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT22__GPIO5_IO16, WEAK_PULLUP), + IOMUX_PAD_CTRL(DISP0_DAT23__GPIO5_IO17, WEAK_PULLUP), +}; + +static const struct i2c_pads_info i2c_pads[] = { + /* I2C1, SGTL5000 */ + I2C_PADS_INFO_ENTRY(I2C1, EIM_D21, 3, 21, EIM_D28, 3, 28, I2C_PAD_CTRL), + /* I2C2 Camera, MIPI */ + I2C_PADS_INFO_ENTRY(I2C2, KEY_COL3, 4, 12, KEY_ROW3, 4, 13, I2C_PAD_CTRL), + /* I2C3, J15 - RGB connector */ + I2C_PADS_INFO_ENTRY(I2C3, GPIO_5, 1, 05, GPIO_16, 7, 11, I2C_PAD_CTRL), +}; +#define I2C_BUS_CNT 3 + +#ifdef CONFIG_USB_EHCI_MX6 +int board_ehci_power(int port, int on) +{ + if (port) + return 0; + gpio_set_value(GP_REG_USBOTG, on); + return 0; +} +#endif + +#ifdef CONFIG_FSL_ESDHC +struct fsl_esdhc_cfg board_usdhc_cfg[] = { + {.esdhc_base = USDHC3_BASE_ADDR, .bus_width = 4, + .gp_cd = GP_USDHC3_CD}, + {.esdhc_base = USDHC4_BASE_ADDR, .bus_width = 8, + .gp_reset = GP_EMMC_RESET}, +}; +#endif + +#ifdef CONFIG_MXC_SPI +int board_spi_cs_gpio(unsigned bus, unsigned cs) +{ + return (bus == 0 && cs == 0) ? GP_ECSPI1_NOR_CS : -1; +} +#endif + +#ifdef CONFIG_CMD_FBPANEL +void board_enable_lvds(const struct display_info_t *di, int enable) +{ + gpio_direction_output(GP_BACKLIGHT_LVDS, enable); + gpio_direction_output(GP_BACKLIGHT_LVDS_EN, enable); +} + +void board_enable_lcd(const struct display_info_t *di, int enable) +{ + if (enable) + SETUP_IOMUX_PADS(rgb_pads); + else + SETUP_IOMUX_PADS(rgb_gpio_pads); + gpio_direction_output(GP_BACKLIGHT_RGB, enable); +} + +static const struct display_info_t displays[] = { + /* LCD */ + VD_ASIT500MA6F5D(LCD, NULL, 2, 0x38), + + /* LVDS */ + VD_HANNSTAR7(LVDS, NULL, 2, 0x38), + VD_AUO_B101EW05(LVDS, NULL, 2, 0x38), + VD_LG1280_800(LVDS, NULL, 2, 0x38), + VD_DT070BTFT(LVDS, NULL, 2, 0x38), + VD_WSVGA(LVDS, NULL, 2, 0x38), + VD_HANNSTAR(LVDS, NULL, 2, 0x04), + VD_LG9_7(LVDS, NULL, 2, 0x04), + VD_SHARP_LQ101K1LY04(LVDS, NULL, 0, 0x00), + VD_WXGA_J(LVDS, NULL, 0, 0x00), + VD_WVGA_J(LVDS, NULL, 0, 0x00), +}; +#define display_cnt ARRAY_SIZE(displays) +#else +#define displays NULL +#define display_cnt 0 +#endif + +static const unsigned short gpios_out_low[] = { + GP_RGMII_PHY_RESET, + /* Disable wifi */ + GP_WLAN_EN, + GP_BT_EN, + GP_REG_USBOTG, + GP_LED_GREEN, + GP_LED_RED, + GP_LED_YELLOW, + GP_EMMC_RESET, +}; +static const unsigned short gpios_out_high[] = { + GP_ECSPI1_NOR_CS, /* SS1 of spi nor */ +}; + +static const unsigned short gpios_in[] = { + GP_BACKLIGHT_RGB, + GP_BACKLIGHT_LVDS, + GP_BACKLIGHT_LVDS_EN, + GPIRQ_ACC_INT1, + GPIRQ_ACC_INT2, + GPIRQ_USB320_INTR, + GPIRQ_WL1271_WL, + GP_USDHC3_CD, + GP_SW1, + GP_SW2, + GP_SW3, + GP_SW4, + GP_SW5, + GP_TP71, +}; + +int board_early_init_f(void) +{ + set_gpios_in(gpios_in, ARRAY_SIZE(gpios_in)); + set_gpios(gpios_out_high, ARRAY_SIZE(gpios_out_high), 1); + set_gpios(gpios_out_low, ARRAY_SIZE(gpios_out_low), 0); + SETUP_IOMUX_PADS(init_pads); + SETUP_IOMUX_PADS(rgb_gpio_pads); + return 0; +} + +int board_init(void) +{ + common_board_init(i2c_pads, I2C_BUS_CNT, IOMUXC_GPR1_OTG_ID_GPIO1, + displays, display_cnt, 0); + return 0; +} + +const struct button_key board_buttons[] = { + {"tp71", GP_TP71, 't', 1}, + {NULL, 0, 0, 0}, +}; + +#ifdef CONFIG_CMD_BMODE +const struct boot_mode board_boot_modes[] = { + /* 4 bit bus width */ + {"mmc0", MAKE_CFGVAL(0x40, 0x30, 0x00, 0x00)}, + {"mmc1", MAKE_CFGVAL(0x60, 0x58, 0x00, 0x00)}, /* 8-bit eMMC */ + {NULL, 0}, +}; +#endif + +unsigned short switches[] = { + GP_SW1, + GP_SW2, + GP_SW3, + GP_SW4, + GP_SW5, +}; + +static int get_board_rev(void) +{ + int i, v; + int value = 0; + + for (i = 0; i < ARRAY_SIZE(switches); i++) { + v = gpio_get_value(switches[i]); + value |= (v ? 1 : 0) << i; + } + return value; +} + +#ifndef CONFIG_SYS_BOARD + +static char board_name[] = "lshore\0\0\0\0\0"; +const char *board_get_board_type(void) +{ + int value = get_board_rev(); + + if (value != 31) + snprintf(board_name, sizeof(board_name), "lshore-r%d", value); + return board_name; +} +#endif + +static int do_board_rev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + char buf[32]; + + snprintf(buf, sizeof(buf), "%d", get_board_rev()); + env_set("board_rev", buf); + printf("%s\n", buf); + return 0; +} + +U_BOOT_CMD( + board_rev, 1, 1, do_board_rev, + "Determine board revision #", + "Prints revision." +); diff --git a/board/boundary/lshore/lshore_dl.cfg b/board/boundary/lshore/lshore_dl.cfg new file mode 100644 index 0000000000000000000000000000000000000000..e02a69d1cbc9f14457be91a12c124ed144e9ab3e --- /dev/null +++ b/board/boundary/lshore/lshore_dl.cfg @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2013 Boundary Devices + * + * SPDX-License-Identifier: GPL-2.0+ + * + * Refer docs/README.imxmage for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ + +/* image version */ +IMAGE_VERSION 2 + +/* + * Boot Device : one of + * spi, sd (the board has no nand neither onenand) + */ +BOOT_FROM spi + +#define __ASSEMBLY__ +#include <config.h> +#include "asm/arch/mx6-ddr.h" +#include "asm/arch/iomux.h" +#include "asm/arch/crm_regs.h" + +/* 1 board sample */ +#define MX6_MMDC_P0_MPDGCTRL0_VAL 0x423c0238 +#define MX6_MMDC_P0_MPDGCTRL1_VAL 0x02200224 +#define MX6_MMDC_P1_MPDGCTRL0_VAL 0x42100218 +#define MX6_MMDC_P1_MPDGCTRL1_VAL 0x020c0210 +#define MX6_MMDC_P0_MPRDDLCTL_VAL 0x44484e4e +#define MX6_MMDC_P1_MPRDDLCTL_VAL 0x484a4a42 +#define MX6_MMDC_P0_MPWRDLCTL_VAL 0x38362c2c +#define MX6_MMDC_P1_MPWRDLCTL_VAL 0x3032322e +#define MX6_MMDC_P0_MPWLDECTRL0_VAL 0x00470054 +#define MX6_MMDC_P0_MPWLDECTRL1_VAL 0x003f0044 +#define MX6_MMDC_P1_MPWLDECTRL0_VAL 0x00220024 +#define MX6_MMDC_P1_MPWLDECTRL1_VAL 0x00280036 +#define WALAT 1 + +#include "../common/mx6/ddr-setup.cfg" +#define RANK 0 +#define BUS_WIDTH 64 +/* H5TC2G63FFR-PBA */ +#include "../common/mx6/800mhz_128mx16.cfg" +#include "../common/mx6/clocks.cfg" diff --git a/board/boundary/lshore/lshore_solo.cfg b/board/boundary/lshore/lshore_solo.cfg new file mode 100644 index 0000000000000000000000000000000000000000..9ea6b95a8dcb27e3c4b246bdf029b3f3dd034dcf --- /dev/null +++ b/board/boundary/lshore/lshore_solo.cfg @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2013 Boundary Devices + * + * SPDX-License-Identifier: GPL-2.0+ + * + * Refer docs/README.imxmage for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ + +/* image version */ +IMAGE_VERSION 2 + +/* + * Boot Device : one of + * spi, sd (the board has no nand neither onenand) + */ +BOOT_FROM spi + +#define __ASSEMBLY__ +#include <config.h> +#include "asm/arch/mx6-ddr.h" +#include "asm/arch/iomux.h" +#include "asm/arch/crm_regs.h" + +/* 1 board sample */ +#define MX6_MMDC_P0_MPDGCTRL0_VAL 0x42380238 +#define MX6_MMDC_P0_MPDGCTRL1_VAL 0x02200220 +#define MX6_MMDC_P0_MPRDDLCTL_VAL 0x42484e52 +#define MX6_MMDC_P0_MPWRDLCTL_VAL 0x38362c2a +#define MX6_MMDC_P0_MPWLDECTRL0_VAL 0x003d004a +#define MX6_MMDC_P0_MPWLDECTRL1_VAL 0x0036003d +#define WALAT 1 + +#include "../common/mx6/ddr-setup.cfg" +#define RANK 0 +#define BUS_WIDTH 32 +/* H5TC2G63FFR-PBA */ +#include "../common/mx6/800mhz_128mx16.cfg" +#include "../common/mx6/clocks.cfg" diff --git a/configs/lshore_dl_defconfig b/configs/lshore_dl_defconfig new file mode 100644 index 0000000000000000000000000000000000000000..18e91a64a8be196b08e238b156a24053d69a8a71 --- /dev/null +++ b/configs/lshore_dl_defconfig @@ -0,0 +1,71 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX6=y +CONFIG_SYS_TEXT_BASE=0x17800000 +CONFIG_TARGET_LSHORE=y +CONFIG_ENV_VARS_UBOOT_CONFIG=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/lshore/lshore_dl.cfg,MX6DL,DDR_MB=1024,DEFCONFIG=\"lshore_dl\"" +CONFIG_BOOTDELAY=1 +CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y +CONFIG_SUPPORT_RAW_INITRD=y +CONFIG_BOARD_EARLY_INIT_F=y +CONFIG_HUSH_PARSER=y +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_MEMTEST=y +CONFIG_SYS_ALT_MEMTEST=y +CONFIG_CMD_DFU=y +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_GPIO=y +CONFIG_CMD_GPT=y +# CONFIG_RANDOM_UUID is not set +CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y +CONFIG_CMD_SF=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_TIME=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_PARTITION_TYPE_GUID=y +CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x12000000 +CONFIG_FASTBOOT_BUF_SIZE=0x26000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 +CONFIG_FSL_ESDHC=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_SST=y +CONFIG_PHYLIB=y +CONFIG_PHY_ATHEROS=y +CONFIG_NETDEVICES=y +CONFIG_FEC_MXC=y +CONFIG_SPI=y +CONFIG_MXC_SPI=y +CONFIG_USB=y +CONFIG_USB_STORAGE=y +CONFIG_USB_KEYBOARD=y +CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="Boundary" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 +CONFIG_CI_UDC=y +CONFIG_USB_ETHER=y +CONFIG_USB_ETH_CDC=y +CONFIG_USB_HOST_ETHER=y +CONFIG_USB_ETHER_ASIX=y +CONFIG_USB_ETHER_MCS7830=y +CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_VIDEO=y +# CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_OF_LIBFDT=y diff --git a/configs/lshore_solo_defconfig b/configs/lshore_solo_defconfig new file mode 100644 index 0000000000000000000000000000000000000000..3c0a11dbcb923f0ec76ae71c02d00db8c83d076e --- /dev/null +++ b/configs/lshore_solo_defconfig @@ -0,0 +1,71 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX6=y +CONFIG_SYS_TEXT_BASE=0x17800000 +CONFIG_TARGET_LSHORE=y +CONFIG_ENV_VARS_UBOOT_CONFIG=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/lshore/lshore_solo.cfg,MX6S,DDR_MB=512,DEFCONFIG=\"lshore_solo\"" +CONFIG_BOOTDELAY=1 +CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y +CONFIG_SUPPORT_RAW_INITRD=y +CONFIG_BOARD_EARLY_INIT_F=y +CONFIG_HUSH_PARSER=y +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_MEMTEST=y +CONFIG_SYS_ALT_MEMTEST=y +CONFIG_CMD_DFU=y +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_GPIO=y +CONFIG_CMD_GPT=y +# CONFIG_RANDOM_UUID is not set +CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y +CONFIG_CMD_SF=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_TIME=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_PARTITION_TYPE_GUID=y +CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x12000000 +CONFIG_FASTBOOT_BUF_SIZE=0x26000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 +CONFIG_FSL_ESDHC=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_SST=y +CONFIG_PHYLIB=y +CONFIG_PHY_ATHEROS=y +CONFIG_NETDEVICES=y +CONFIG_FEC_MXC=y +CONFIG_SPI=y +CONFIG_MXC_SPI=y +CONFIG_USB=y +CONFIG_USB_STORAGE=y +CONFIG_USB_KEYBOARD=y +CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="Boundary" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 +CONFIG_CI_UDC=y +CONFIG_USB_ETHER=y +CONFIG_USB_ETH_CDC=y +CONFIG_USB_HOST_ETHER=y +CONFIG_USB_ETHER_ASIX=y +CONFIG_USB_ETHER_MCS7830=y +CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_VIDEO=y +# CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_OF_LIBFDT=y diff --git a/include/configs/lshore.h b/include/configs/lshore.h new file mode 100644 index 0000000000000000000000000000000000000000..e9a9d7bf08b51675ea510e16cfb0c973c05a963f --- /dev/null +++ b/include/configs/lshore.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. + * + * Configuration settings for the Boundary Devices L-Shore + * board. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#define CONFIG_BOOTDELAY 1 + +#include "mx6_common.h" + +#define CONFIG_MACH_TYPE 3771 + +/* Size of malloc() pool */ +#define CONFIG_SYS_MALLOC_LEN (40 * 1024 * 1024) + +#define CONFIG_VIDEO_LOGO + +#define CONFIG_IMX_HDMI +#define CONFIG_SYS_FSL_USDHC_NUM 2 +#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +#define BD_I2C_MASK 7 +#define BD_MMC_UMS_DISKS "0" + +#undef CONFIG_SYS_BOARD +#define BOOT_TARGET_DEVICES(func) \ + DISTRO_BOOT_DEV_USB(func) \ + DISTRO_BOOT_DEV_MMC(func) + +#include "boundary.h" +#define CONFIG_EXTRA_ENV_SETTINGS BD_BOUNDARY_ENV_SETTINGS \ + +#endif /* __CONFIG_H */