summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-07-14 09:05:20 -0400
committerTom Rini <trini@konsulko.com>2019-07-14 09:05:20 -0400
commit6070ef409c1018860e8dd1f077297546d9d80115 (patch)
treeff914035d376420d37fd2d3d1ad0877220eed9c6 /board
parenta9758ece08bceb60634145c2126582e5d282bd09 (diff)
parentae8d23a668755d804748a1cf848426b28338b3d5 (diff)
downloadu-boot-6070ef409c1018860e8dd1f077297546d9d80115.tar.gz
Merge branch '2019-07-12-master-imports'
- First round of TI Davinci updates - Some OMAP3 DM updates - Other misc updates
Diffstat (limited to 'board')
-rw-r--r--board/davinci/da8xxevm/da850evm.c14
-rw-r--r--board/lego/ev3/README3
-rw-r--r--board/lego/ev3/legoev3.c22
-rw-r--r--board/phytec/phycore_am335x_r2/Kconfig15
-rw-r--r--board/phytec/phycore_am335x_r2/MAINTAINERS7
-rw-r--r--board/phytec/phycore_am335x_r2/Makefile11
-rw-r--r--board/phytec/phycore_am335x_r2/board.c260
-rw-r--r--board/phytec/phycore_am335x_r2/board.h24
-rw-r--r--board/phytec/phycore_am335x_r2/mux.c117
-rw-r--r--board/ronetix/pm9261/pm9261.c105
-rw-r--r--board/ronetix/pm9263/pm9263.c93
-rw-r--r--board/ti/evm/evm.c31
12 files changed, 449 insertions, 253 deletions
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index a90b7a3538..5180128db4 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -216,21 +216,29 @@ static const struct pinmux_config gpio_pins[] = {
};
const struct pinmux_resource pinmuxes[] = {
+#ifndef CONFIG_SPL_BUILD
#ifdef CONFIG_DRIVER_TI_EMAC
PINMUX_ITEM(emac_pins_mdio),
#ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
PINMUX_ITEM(emac_pins_rmii),
#else
PINMUX_ITEM(emac_pins_mii),
-#endif
-#endif
+#endif /* CONFIG_DRIVER_TI_EMAC */
+#endif /* CONFIG_DRIVER_TI_EMAC_USE_RMII */
+#endif /* CONFIG_SPL_BUILD */
#ifdef CONFIG_SPI_FLASH
+#if !CONFIG_IS_ENABLED(PINCTRL)
PINMUX_ITEM(spi1_pins_base),
PINMUX_ITEM(spi1_pins_scs0),
#endif
+#endif
+#if !CONFIG_IS_ENABLED(PINCTRL)
PINMUX_ITEM(uart2_pins_txrx),
PINMUX_ITEM(uart2_pins_rtscts),
+#endif
+#if !CONFIG_IS_ENABLED(PINCTRL)
PINMUX_ITEM(i2c0_pins),
+#endif
#ifdef CONFIG_NAND_DAVINCI
PINMUX_ITEM(emifa_pins_cs3),
PINMUX_ITEM(emifa_pins_cs4),
@@ -241,8 +249,10 @@ const struct pinmux_resource pinmuxes[] = {
#endif
PINMUX_ITEM(gpio_pins),
#ifdef CONFIG_MMC_DAVINCI
+#if !CONFIG_IS_ENABLED(PINCTRL)
PINMUX_ITEM(mmc0_pins),
#endif
+#endif
};
const int pinmuxes_size = ARRAY_SIZE(pinmuxes);
diff --git a/board/lego/ev3/README b/board/lego/ev3/README
index da62a649ba..9ad93e8205 100644
--- a/board/lego/ev3/README
+++ b/board/lego/ev3/README
@@ -50,3 +50,6 @@ software or a 3rd party program capable of uploading a firmware file.
If you are booting from the microSD card, it is enough to just write uboot.bin
to the flash. If you are not using a microSD card, you will need to create an
image file using the layout described above.
+
+IMPORTANT: The EEPROM bootloader only copies 256k, so u-boot.img must not
+exceed that size!
diff --git a/board/lego/ev3/legoev3.c b/board/lego/ev3/legoev3.c
index 423c2fa44b..fa099e95f5 100644
--- a/board/lego/ev3/legoev3.c
+++ b/board/lego/ev3/legoev3.c
@@ -25,11 +25,6 @@
#include <asm/mach-types.h>
#include <asm/setup.h>
-#ifdef CONFIG_MMC_DAVINCI
-#include <mmc.h>
-#include <asm/arch/sdmmc_defs.h>
-#endif
-
DECLARE_GLOBAL_DATA_PTR;
u8 board_rev;
@@ -38,23 +33,6 @@ u8 board_rev;
#define EEPROM_REV_OFFSET 0x3F00
#define EEPROM_MAC_OFFSET 0x3F06
-#ifdef CONFIG_MMC_DAVINCI
-static struct davinci_mmc mmc_sd0 = {
- .reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE,
- .host_caps = MMC_MODE_4BIT, /* DA850 supports only 4-bit SD/MMC */
- .voltages = MMC_VDD_32_33 | MMC_VDD_33_34,
- .version = MMC_CTLR_VERSION_2,
-};
-
-int board_mmc_init(bd_t *bis)
-{
- mmc_sd0.input_clk = clk_get(DAVINCI_MMCSD_CLKID);
-
- /* Add slot-0 to mmc subsystem */
- return davinci_mmc_init(bis, &mmc_sd0);
-}
-#endif
-
const struct pinmux_resource pinmuxes[] = {
PINMUX_ITEM(spi0_pins_base),
PINMUX_ITEM(spi0_pins_scs0),
diff --git a/board/phytec/phycore_am335x_r2/Kconfig b/board/phytec/phycore_am335x_r2/Kconfig
new file mode 100644
index 0000000000..77055e043c
--- /dev/null
+++ b/board/phytec/phycore_am335x_r2/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_PHYCORE_AM335X_R2
+
+config SYS_BOARD
+ default "phycore_am335x_r2"
+
+config SYS_VENDOR
+ default "phytec"
+
+config SYS_SOC
+ default "am33xx"
+
+config SYS_CONFIG_NAME
+ default "phycore_am335x_r2"
+
+endif
diff --git a/board/phytec/phycore_am335x_r2/MAINTAINERS b/board/phytec/phycore_am335x_r2/MAINTAINERS
new file mode 100644
index 0000000000..e56f30fdc0
--- /dev/null
+++ b/board/phytec/phycore_am335x_r2/MAINTAINERS
@@ -0,0 +1,7 @@
+phyCORE AM335x R2 WEGA BOARD
+M: Niel Fourie <lusus@denx.de>
+M: Parthiban Nallathambi <pn@denx.de>
+S: Maintained
+F: board/phytec/phycore_am335x_r2
+F: include/configs/phycore_am335x_r2.h
+F: configs/phycore-am335x-r2-wega_defconfig
diff --git a/board/phytec/phycore_am335x_r2/Makefile b/board/phytec/phycore_am335x_r2/Makefile
new file mode 100644
index 0000000000..ff6f8b4221
--- /dev/null
+++ b/board/phytec/phycore_am335x_r2/Makefile
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Makefile
+#
+# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+
+ifdef CONFIG_SPL_BUILD
+obj-y += mux.o
+endif
+
+obj-y += board.o
diff --git a/board/phytec/phycore_am335x_r2/board.c b/board/phytec/phycore_am335x_r2/board.c
new file mode 100644
index 0000000000..02d6c27cec
--- /dev/null
+++ b/board/phytec/phycore_am335x_r2/board.c
@@ -0,0 +1,260 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * board.c
+ *
+ * Board functions for Phytec phyCORE-AM335x R2 (PCL060 / PCM060) based boards
+ *
+ * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
+ * Copyright (C) 2013 Lars Poeschel, Lemonage Software GmbH
+ * Copyright (C) 2015 Wadim Egorov, PHYTEC Messtechnik GmbH
+ * Copyright (C) 2019 DENX Software Engineering GmbH
+ */
+
+#include <common.h>
+#include <spl.h>
+#include <asm/arch/cpu.h>
+#include <asm/arch/ddr_defs.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/sys_proto.h>
+#include <power/tps65910.h>
+#include <jffs2/load_kernel.h>
+#include <mtd_node.h>
+#include <fdt_support.h>
+#include "board.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifdef CONFIG_SPL_BUILD
+
+static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
+
+/* DDR RAM defines */
+#define DDR_CLK_MHZ 400 /* DDR_DPLL_MULT value */
+
+#define OSC (V_OSCK / 1000000)
+const struct dpll_params dpll_ddr = {
+ DDR_CLK_MHZ, OSC - 1, 1, -1, -1, -1, -1};
+
+const struct dpll_params *get_dpll_ddr_params(void)
+{
+ return &dpll_ddr;
+}
+
+const struct ctrl_ioregs ioregs = {
+ .cm0ioctl = 0x18B,
+ .cm1ioctl = 0x18B,
+ .cm2ioctl = 0x18B,
+ .dt0ioctl = 0x18B,
+ .dt1ioctl = 0x18B,
+};
+
+static const struct cmd_control ddr3_cmd_ctrl_data = {
+ .cmd0csratio = 0x80,
+ .cmd0iclkout = 0x0,
+
+ .cmd1csratio = 0x80,
+ .cmd1iclkout = 0x0,
+
+ .cmd2csratio = 0x80,
+ .cmd2iclkout = 0x0,
+};
+
+enum {
+ PHYCORE_R2_MT41K128M16JT_256MB,
+ PHYCORE_R2_MT41K256M16TW107IT_512MB,
+ PHYCORE_R2_MT41K512M16HA125IT_1024MB,
+};
+
+struct am335x_sdram_timings {
+ struct emif_regs ddr3_emif_reg_data;
+ struct ddr_data ddr3_data;
+};
+
+static struct am335x_sdram_timings physom_timings[] = {
+ [PHYCORE_R2_MT41K128M16JT_256MB] = {
+ .ddr3_emif_reg_data = {
+ .sdram_config = 0x61C052B2,
+ .ref_ctrl = 0x00000C30,
+ .sdram_tim1 = 0x0AAAD4DB,
+ .sdram_tim2 = 0x26437FDA,
+ .sdram_tim3 = 0x501F83FF,
+ .zq_config = 0x50074BE4,
+ .emif_ddr_phy_ctlr_1 = 0x7,
+ .ocp_config = 0x003d3d3d,
+ },
+ .ddr3_data = {
+ .datardsratio0 = 0x36,
+ .datawdsratio0 = 0x38,
+ .datafwsratio0 = 0x99,
+ .datawrsratio0 = 0x73,
+ },
+ },
+ [PHYCORE_R2_MT41K256M16TW107IT_512MB] = {
+ .ddr3_emif_reg_data = {
+ .sdram_config = 0x61C05332,
+ .ref_ctrl = 0x00000C30,
+ .sdram_tim1 = 0x0AAAD4DB,
+ .sdram_tim2 = 0x266B7FDA,
+ .sdram_tim3 = 0x501F867F,
+ .zq_config = 0x50074BE4,
+ .emif_ddr_phy_ctlr_1 = 0x7,
+ .ocp_config = 0x003d3d3d,
+ },
+ .ddr3_data = {
+ .datardsratio0 = 0x37,
+ .datawdsratio0 = 0x38,
+ .datafwsratio0 = 0x92,
+ .datawrsratio0 = 0x72,
+ },
+ },
+ [PHYCORE_R2_MT41K512M16HA125IT_1024MB] = {
+ .ddr3_emif_reg_data = {
+ .sdram_config = 0x61C053B2,
+ .ref_ctrl = 0x00000C30,
+ .sdram_tim1 = 0x0AAAD4DB,
+ .sdram_tim2 = 0x268F7FDA,
+ .sdram_tim3 = 0x501F88BF,
+ .zq_config = 0x50074BE4,
+ .emif_ddr_phy_ctlr_1 = 0x7,
+ .ocp_config = 0x003d3d3d,
+ },
+ .ddr3_data = {
+ .datardsratio0 = 0x38,
+ .datawdsratio0 = 0x4d,
+ .datafwsratio0 = 0x9d,
+ .datawrsratio0 = 0x82,
+ },
+ },
+};
+
+void sdram_init(void)
+{
+ /* Configure memory to maximum supported size for detection */
+ int ram_type_index = PHYCORE_R2_MT41K512M16HA125IT_1024MB;
+
+ config_ddr(DDR_CLK_MHZ, &ioregs,
+ &physom_timings[ram_type_index].ddr3_data,
+ &ddr3_cmd_ctrl_data,
+ &physom_timings[ram_type_index].ddr3_emif_reg_data,
+ 0);
+
+ /* Detect memory physically present */
+ gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
+ CONFIG_MAX_RAM_BANK_SIZE);
+
+ /* Reconfigure memory for actual detected size */
+ switch (gd->ram_size) {
+ case SZ_1G:
+ ram_type_index = PHYCORE_R2_MT41K512M16HA125IT_1024MB;
+ break;
+ case SZ_512M:
+ ram_type_index = PHYCORE_R2_MT41K256M16TW107IT_512MB;
+ break;
+ case SZ_256M:
+ default:
+ ram_type_index = PHYCORE_R2_MT41K128M16JT_256MB;
+ break;
+ }
+ config_ddr(DDR_CLK_MHZ, &ioregs,
+ &physom_timings[ram_type_index].ddr3_data,
+ &ddr3_cmd_ctrl_data,
+ &physom_timings[ram_type_index].ddr3_emif_reg_data,
+ 0);
+}
+
+const struct dpll_params *get_dpll_mpu_params(void)
+{
+ int ind = get_sys_clk_index();
+ int freq = am335x_get_efuse_mpu_max_freq(cdev);
+
+ switch (freq) {
+ case MPUPLL_M_1000:
+ return &dpll_mpu_opp[ind][5];
+ case MPUPLL_M_800:
+ return &dpll_mpu_opp[ind][4];
+ case MPUPLL_M_720:
+ return &dpll_mpu_opp[ind][3];
+ case MPUPLL_M_600:
+ return &dpll_mpu_opp[ind][2];
+ case MPUPLL_M_500:
+ return &dpll_mpu_opp100;
+ case MPUPLL_M_300:
+ return &dpll_mpu_opp[ind][0];
+ }
+
+ return &dpll_mpu_opp[ind][0];
+}
+
+static void scale_vcores_generic(int freq)
+{
+ int sil_rev, mpu_vdd;
+
+ /*
+ * We use a TPS65910 PMIC. For all MPU frequencies we support we use a
+ * CORE voltage of 1.10V. For MPU voltage we need to switch based on
+ * the frequency we are running at.
+ */
+ if (power_tps65910_init(0))
+ return;
+
+ /*
+ * Depending on MPU clock and PG we will need a different
+ * VDD to drive at that speed.
+ */
+ sil_rev = readl(&cdev->deviceid) >> 28;
+ mpu_vdd = am335x_get_tps65910_mpu_vdd(sil_rev, freq);
+
+ /* Tell the TPS65910 to use i2c */
+ tps65910_set_i2c_control();
+
+ /* First update MPU voltage. */
+ if (tps65910_voltage_update(MPU, mpu_vdd))
+ return;
+
+ /* Second, update the CORE voltage. */
+ if (tps65910_voltage_update(CORE, TPS65910_OP_REG_SEL_1_1_0))
+ return;
+}
+
+void scale_vcores(void)
+{
+ int freq;
+
+ freq = am335x_get_efuse_mpu_max_freq(cdev);
+ scale_vcores_generic(freq);
+}
+
+void set_uart_mux_conf(void)
+{
+ enable_uart0_pin_mux();
+}
+
+void set_mux_conf_regs(void)
+{
+ enable_i2c0_pin_mux();
+ enable_board_pin_mux();
+}
+#endif
+
+/*
+ * Basic board specific setup. Pinmux has been handled already.
+ */
+int board_init(void)
+{
+ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
+ return 0;
+}
+
+#ifdef CONFIG_OF_BOARD_SETUP
+int ft_board_setup(void *blob, bd_t *bd)
+{
+#ifdef CONFIG_FDT_FIXUP_PARTITIONS
+ static const struct node_info nodes[] = {
+ { "ti,omap2-nand", MTD_DEV_TYPE_NAND, },
+ };
+
+ fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
+#endif
+ return 0;
+}
+#endif
diff --git a/board/phytec/phycore_am335x_r2/board.h b/board/phytec/phycore_am335x_r2/board.h
new file mode 100644
index 0000000000..1b90861dd3
--- /dev/null
+++ b/board/phytec/phycore_am335x_r2/board.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * board.h
+ *
+ * Phytec phyCORE-AM335x (PCL060 / PCM060) boards information header
+ *
+ * Copyright (C) 2013 Lars Poeschel, Lemonage Software GmbH
+ * Copyright (C) 2019 DENX Software Engineering GmbH
+ */
+
+#ifndef _BOARD_H_
+#define _BOARD_H_
+
+/*
+ * We have three pin mux functions that must exist. We must be able to enable
+ * uart0, for initial output and i2c0 to access the PMIC. We then have a main
+ * pinmux function that can be overridden to enable all other pinmux that
+ * is required on the board.
+ */
+void enable_uart0_pin_mux(void);
+void enable_i2c0_pin_mux(void);
+void enable_board_pin_mux(void);
+void enable_cbmux_pin_mux(void);
+#endif
diff --git a/board/phytec/phycore_am335x_r2/mux.c b/board/phytec/phycore_am335x_r2/mux.c
new file mode 100644
index 0000000000..5fd452e66d
--- /dev/null
+++ b/board/phytec/phycore_am335x_r2/mux.c
@@ -0,0 +1,117 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * mux.c
+ *
+ * Copyright (C) 2013 Lars Poeschel, Lemonage Software GmbH
+ * Copyright (C) 2019 DENX Software Engineering GmbH
+ */
+
+#include <common.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/mux.h>
+#include <asm/io.h>
+#include "board.h"
+
+static struct module_pin_mux uart0_pin_mux[] = {
+ {OFFSET(uart0_rxd), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* UART0_RXD */
+ {OFFSET(uart0_txd), (MODE(0) | PULLUDEN)}, /* UART0_TXD */
+ {-1},
+};
+
+#ifdef CONFIG_MMC
+static struct module_pin_mux mmc0_pin_mux[] = {
+ {OFFSET(mmc0_dat3), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_DAT3 */
+ {OFFSET(mmc0_dat2), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_DAT2 */
+ {OFFSET(mmc0_dat1), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_DAT1 */
+ {OFFSET(mmc0_dat0), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_DAT0 */
+ {OFFSET(mmc0_clk), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_CLK */
+ {OFFSET(mmc0_cmd), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_CMD */
+ {OFFSET(spi0_cs1), (MODE(5) | RXACTIVE | PULLUP_EN)}, /* MMC0_CD */
+ {-1},
+};
+#endif
+
+static struct module_pin_mux i2c0_pin_mux[] = {
+ {OFFSET(i2c0_sda), (MODE(0) | RXACTIVE |
+ PULLUDEN | SLEWCTRL)}, /* I2C_DATA */
+ {OFFSET(i2c0_scl), (MODE(0) | RXACTIVE |
+ PULLUDEN | SLEWCTRL)}, /* I2C_SCLK */
+ {-1},
+};
+
+#ifdef CONFIG_SPI
+static struct module_pin_mux spi0_pin_mux[] = {
+ {OFFSET(spi0_sclk), (MODE(0) | RXACTIVE | PULLUDEN)}, /* SPI0_SCLK */
+ {OFFSET(spi0_d0), (MODE(0) | RXACTIVE |
+ PULLUDEN | PULLUP_EN)}, /* SPI0_D0 */
+ {OFFSET(spi0_d1), (MODE(0) | RXACTIVE | PULLUDEN)}, /* SPI0_D1 */
+ {OFFSET(spi0_cs0), (MODE(0) | RXACTIVE |
+ PULLUDEN | PULLUP_EN)}, /* SPI0_CS0 */
+ {-1},
+};
+#endif
+
+static struct module_pin_mux rmii1_pin_mux[] = {
+ {OFFSET(mii1_crs), MODE(1) | RXACTIVE}, /* RMII1_CRS */
+ {OFFSET(mii1_rxerr), MODE(1) | RXACTIVE}, /* RMII1_RXERR */
+ {OFFSET(mii1_txen), MODE(1)}, /* RMII1_TXEN */
+ {OFFSET(mii1_txd1), MODE(1)}, /* RMII1_TXD1 */
+ {OFFSET(mii1_txd0), MODE(1)}, /* RMII1_TXD0 */
+ {OFFSET(mii1_rxd1), MODE(1) | RXACTIVE}, /* RMII1_RXD1 */
+ {OFFSET(mii1_rxd0), MODE(1) | RXACTIVE}, /* RMII1_RXD0 */
+ {OFFSET(mdio_data), MODE(0) | RXACTIVE | PULLUP_EN}, /* MDIO_DATA */
+ {OFFSET(mdio_clk), MODE(0) | PULLUP_EN}, /* MDIO_CLK */
+ {OFFSET(rmii1_refclk), MODE(0) | RXACTIVE}, /* RMII1_REFCLK */
+ {-1},
+};
+
+static struct module_pin_mux cbmux_pin_mux[] = {
+ {OFFSET(uart0_ctsn), MODE(7) | RXACTIVE | PULLDOWN_EN}, /* JP3 */
+ {OFFSET(uart0_rtsn), MODE(7) | RXACTIVE | PULLUP_EN}, /* JP4 */
+ {-1},
+};
+
+#ifdef CONFIG_NAND
+static struct module_pin_mux nand_pin_mux[] = {
+ {OFFSET(gpmc_ad0), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD0 */
+ {OFFSET(gpmc_ad1), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD1 */
+ {OFFSET(gpmc_ad2), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD2 */
+ {OFFSET(gpmc_ad3), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD3 */
+ {OFFSET(gpmc_ad4), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD4 */
+ {OFFSET(gpmc_ad5), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD5 */
+ {OFFSET(gpmc_ad6), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD6 */
+ {OFFSET(gpmc_ad7), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD7 */
+ {OFFSET(gpmc_wait0), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* NAND WAIT */
+ {OFFSET(gpmc_wpn), (MODE(7) | PULLUP_EN | RXACTIVE)}, /* NAND_WPN */
+ {OFFSET(gpmc_csn0), (MODE(0) | PULLUDEN)}, /* NAND_CS0 */
+ {OFFSET(gpmc_advn_ale), (MODE(0) | PULLUDEN)}, /* NAND_ADV_ALE */
+ {OFFSET(gpmc_oen_ren), (MODE(0) | PULLUDEN)}, /* NAND_OE */
+ {OFFSET(gpmc_wen), (MODE(0) | PULLUDEN)}, /* NAND_WEN */
+ {OFFSET(gpmc_be0n_cle), (MODE(0) | PULLUDEN)}, /* NAND_BE_CLE */
+ {-1},
+};
+#endif
+
+void enable_uart0_pin_mux(void)
+{
+ configure_module_pin_mux(uart0_pin_mux);
+}
+
+void enable_i2c0_pin_mux(void)
+{
+ configure_module_pin_mux(i2c0_pin_mux);
+}
+
+void enable_board_pin_mux(void)
+{
+ configure_module_pin_mux(rmii1_pin_mux);
+ configure_module_pin_mux(mmc0_pin_mux);
+ configure_module_pin_mux(cbmux_pin_mux);
+#ifdef CONFIG_NAND
+ configure_module_pin_mux(nand_pin_mux);
+#endif
+#ifdef CONFIG_SPI
+ configure_module_pin_mux(spi0_pin_mux);
+#endif
+}
diff --git a/board/ronetix/pm9261/pm9261.c b/board/ronetix/pm9261/pm9261.c
index 0c7b4ee415..f1e7aab629 100644
--- a/board/ronetix/pm9261/pm9261.c
+++ b/board/ronetix/pm9261/pm9261.c
@@ -17,9 +17,6 @@
#include <asm/arch/at91_matrix.h>
#include <asm/arch/clk.h>
#include <asm/arch/gpio.h>
-
-#include <lcd.h>
-#include <atmel_lcdc.h>
#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_DRIVER_DM9000)
#include <net.h>
#endif
@@ -110,105 +107,6 @@ static void pm9261_dm9000_hw_init(void)
}
#endif
-#ifdef CONFIG_LCD
-vidinfo_t panel_info = {
- .vl_col = 240,
- .vl_row = 320,
- .vl_clk = 4965000,
- .vl_sync = ATMEL_LCDC_INVLINE_INVERTED |
- ATMEL_LCDC_INVFRAME_INVERTED,
- .vl_bpix = 3,
- .vl_tft = 1,
- .vl_hsync_len = 5,
- .vl_left_margin = 1,
- .vl_right_margin = 33,
- .vl_vsync_len = 1,
- .vl_upper_margin = 1,
- .vl_lower_margin = 0,
- .mmio = ATMEL_BASE_LCDC,
-};
-
-void lcd_enable(void)
-{
- at91_set_pio_value(AT91_PIO_PORTA, 22, 0); /* power up */
-}
-
-void lcd_disable(void)
-{
- at91_set_pio_value(AT91_PIO_PORTA, 22, 1); /* power down */
-}
-
-static void pm9261_lcd_hw_init(void)
-{
- at91_set_a_periph(AT91_PIO_PORTB, 1, 0); /* LCDHSYNC */
- at91_set_a_periph(AT91_PIO_PORTB, 2, 0); /* LCDDOTCK */
- at91_set_a_periph(AT91_PIO_PORTB, 3, 0); /* LCDDEN */
- at91_set_a_periph(AT91_PIO_PORTB, 4, 0); /* LCDCC */
- at91_set_a_periph(AT91_PIO_PORTB, 7, 0); /* LCDD2 */
- at91_set_a_periph(AT91_PIO_PORTB, 8, 0); /* LCDD3 */
- at91_set_a_periph(AT91_PIO_PORTB, 9, 0); /* LCDD4 */
- at91_set_a_periph(AT91_PIO_PORTB, 10, 0); /* LCDD5 */
- at91_set_a_periph(AT91_PIO_PORTB, 11, 0); /* LCDD6 */
- at91_set_a_periph(AT91_PIO_PORTB, 12, 0); /* LCDD7 */
- at91_set_a_periph(AT91_PIO_PORTB, 15, 0); /* LCDD10 */
- at91_set_a_periph(AT91_PIO_PORTB, 16, 0); /* LCDD11 */
- at91_set_a_periph(AT91_PIO_PORTB, 17, 0); /* LCDD12 */
- at91_set_a_periph(AT91_PIO_PORTB, 18, 0); /* LCDD13 */
- at91_set_a_periph(AT91_PIO_PORTB, 19, 0); /* LCDD14 */
- at91_set_a_periph(AT91_PIO_PORTB, 20, 0); /* LCDD15 */
- at91_set_b_periph(AT91_PIO_PORTB, 23, 0); /* LCDD18 */
- at91_set_b_periph(AT91_PIO_PORTB, 24, 0); /* LCDD19 */
- at91_set_b_periph(AT91_PIO_PORTB, 25, 0); /* LCDD20 */
- at91_set_b_periph(AT91_PIO_PORTB, 26, 0); /* LCDD21 */
- at91_set_b_periph(AT91_PIO_PORTB, 27, 0); /* LCDD22 */
- at91_set_b_periph(AT91_PIO_PORTB, 28, 0); /* LCDD23 */
-
- at91_system_clk_enable(AT91_PMC_HCK1);
-
- gd->fb_base = ATMEL_BASE_SRAM;
-}
-
-#ifdef CONFIG_LCD_INFO
-#include <nand.h>
-#include <version.h>
-
-extern flash_info_t flash_info[];
-
-void lcd_show_board_info(void)
-{
- ulong dram_size, nand_size, flash_size;
- int i;
- char temp[32];
-
- lcd_printf ("%s\n", U_BOOT_VERSION);
- lcd_printf ("(C) 2009 Ronetix GmbH\n");
- lcd_printf ("support@ronetix.at\n");
- lcd_printf ("%s CPU at %s MHz",
- CONFIG_SYS_AT91_CPU_NAME,
- strmhz(temp, get_cpu_clk_rate()));
-
- dram_size = 0;
- for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
- dram_size += gd->bd->bi_dram[i].size;
-
- nand_size = 0;
- for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++)
- nand_size += get_nand_dev_by_index(i)->size;
-
- flash_size = 0;
- for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++)
- flash_size += flash_info[i].size;
-
- lcd_printf ("%ld MB SDRAM, %ld MB NAND\n%ld MB NOR Flash\n"
- "%ld MB DataFlash\n",
- dram_size >> 20,
- nand_size >> 20,
- flash_size >> 20);
-}
-#endif /* CONFIG_LCD_INFO */
-
-#endif /* CONFIG_LCD */
-
int board_early_init_f(void)
{
return 0;
@@ -228,9 +126,6 @@ int board_init(void)
#ifdef CONFIG_DRIVER_DM9000
pm9261_dm9000_hw_init();
#endif
-#ifdef CONFIG_LCD
- pm9261_lcd_hw_init();
-#endif
return 0;
}
diff --git a/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c
index 692288d52e..2da39c4acd 100644
--- a/board/ronetix/pm9263/pm9263.c
+++ b/board/ronetix/pm9263/pm9263.c
@@ -17,8 +17,6 @@
#include <asm/arch/at91_matrix.h>
#include <asm/arch/clk.h>
#include <asm/arch/gpio.h>
-#include <lcd.h>
-#include <atmel_lcdc.h>
#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
#include <net.h>
#endif
@@ -109,32 +107,6 @@ static void pm9263_macb_hw_init(void)
#endif
#ifdef CONFIG_LCD
-vidinfo_t panel_info = {
- .vl_col = 240,
- .vl_row = 320,
- .vl_clk = 4965000,
- .vl_sync = ATMEL_LCDC_INVLINE_INVERTED |
- ATMEL_LCDC_INVFRAME_INVERTED,
- .vl_bpix = 3,
- .vl_tft = 1,
- .vl_hsync_len = 5,
- .vl_left_margin = 1,
- .vl_right_margin = 33,
- .vl_vsync_len = 1,
- .vl_upper_margin = 1,
- .vl_lower_margin = 0,
- .mmio = ATMEL_BASE_LCDC,
-};
-
-void lcd_enable(void)
-{
- at91_set_pio_value(AT91_PIO_PORTA, 22, 1); /* power up */
-}
-
-void lcd_disable(void)
-{
- at91_set_pio_value(AT91_PIO_PORTA, 22, 0); /* power down */
-}
#ifdef CONFIG_LCD_IN_PSRAM
@@ -226,32 +198,6 @@ static int pm9263_lcd_hw_psram_init(void)
static void pm9263_lcd_hw_init(void)
{
- at91_set_a_periph(AT91_PIO_PORTC, 0, 0); /* LCDVSYNC */
- at91_set_a_periph(AT91_PIO_PORTC, 1, 0); /* LCDHSYNC */
- at91_set_a_periph(AT91_PIO_PORTC, 2, 0); /* LCDDOTCK */
- at91_set_a_periph(AT91_PIO_PORTC, 3, 0); /* LCDDEN */
- at91_set_b_periph(AT91_PIO_PORTB, 9, 0); /* LCDCC */
- at91_set_a_periph(AT91_PIO_PORTC, 6, 0); /* LCDD2 */
- at91_set_a_periph(AT91_PIO_PORTC, 7, 0); /* LCDD3 */
- at91_set_a_periph(AT91_PIO_PORTC, 8, 0); /* LCDD4 */
- at91_set_a_periph(AT91_PIO_PORTC, 9, 0); /* LCDD5 */
- at91_set_a_periph(AT91_PIO_PORTC, 10, 0); /* LCDD6 */
- at91_set_a_periph(AT91_PIO_PORTC, 11, 0); /* LCDD7 */
- at91_set_a_periph(AT91_PIO_PORTC, 14, 0); /* LCDD10 */
- at91_set_a_periph(AT91_PIO_PORTC, 15, 0); /* LCDD11 */
- at91_set_a_periph(AT91_PIO_PORTC, 16, 0); /* LCDD12 */
- at91_set_b_periph(AT91_PIO_PORTC, 12, 0); /* LCDD13 */
- at91_set_a_periph(AT91_PIO_PORTC, 18, 0); /* LCDD14 */
- at91_set_a_periph(AT91_PIO_PORTC, 19, 0); /* LCDD15 */
- at91_set_a_periph(AT91_PIO_PORTC, 22, 0); /* LCDD18 */
- at91_set_a_periph(AT91_PIO_PORTC, 23, 0); /* LCDD19 */
- at91_set_a_periph(AT91_PIO_PORTC, 24, 0); /* LCDD20 */
- at91_set_b_periph(AT91_PIO_PORTC, 17, 0); /* LCDD21 */
- at91_set_a_periph(AT91_PIO_PORTC, 26, 0); /* LCDD22 */
- at91_set_a_periph(AT91_PIO_PORTC, 27, 0); /* LCDD23 */
-
- at91_periph_clk_enable(ATMEL_ID_LCDC);
-
/* Power Control */
at91_set_pio_output(AT91_PIO_PORTA, 22, 1);
at91_set_pio_value(AT91_PIO_PORTA, 22, 0); /* power down */
@@ -267,45 +213,6 @@ static void pm9263_lcd_hw_init(void)
}
-#ifdef CONFIG_LCD_INFO
-#include <nand.h>
-#include <version.h>
-
-extern flash_info_t flash_info[];
-
-void lcd_show_board_info(void)
-{
- ulong dram_size, nand_size, flash_size;
- int i;
- char temp[32];
-
- lcd_printf ("%s\n", U_BOOT_VERSION);
- lcd_printf ("(C) 2009 Ronetix GmbH\n");
- lcd_printf ("support@ronetix.at\n");
- lcd_printf ("%s CPU at %s MHz",
- CONFIG_SYS_AT91_CPU_NAME,
- strmhz(temp, get_cpu_clk_rate()));
-
- dram_size = 0;
- for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
- dram_size += gd->bd->bi_dram[i].size;
-
- nand_size = 0;
- for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++)
- nand_size += get_nand_dev_by_index(i)->size;
-
- flash_size = 0;
- for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++)
- flash_size += flash_info[i].size;
-
- lcd_printf ("%ld MB SDRAM, %ld MB NAND\n%ld MB NOR Flash\n"
- "4 MB PSRAM\n",
- dram_size >> 20,
- nand_size >> 20,
- flash_size >> 20);
-}
-#endif /* CONFIG_LCD_INFO */
-
#endif /* CONFIG_LCD */
int board_early_init_f(void)
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index daecb4af3e..93408047b2 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -30,11 +30,6 @@
#include <linux/usb/musb.h>
#include "evm.h"
-#ifdef CONFIG_USB_EHCI_HCD
-#include <usb.h>
-#include <asm/ehci-omap.h>
-#endif
-
#define OMAP3EVM_GPIO_ETH_RST_GEN1 64
#define OMAP3EVM_GPIO_ETH_RST_GEN2 7
@@ -307,32 +302,6 @@ void board_mmc_power_init(void)
}
#endif /* CONFIG_MMC */
-#if defined(CONFIG_USB_EHCI_HCD) && !defined(CONFIG_SPL_BUILD)
-/* Call usb_stop() before starting the kernel */
-void show_boot_progress(int val)
-{
- if (val == BOOTSTAGE_ID_RUN_OS)
- usb_stop();
-}
-
-static struct omap_usbhs_board_data usbhs_bdata = {
- .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
- .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED
-};
-
-int ehci_hcd_init(int index, enum usb_init_type init,
- struct ehci_hccr **hccr, struct ehci_hcor **hcor)
-{
- return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor);
-}
-
-int ehci_hcd_stop(int index)
-{
- return omap_ehci_hcd_stop();
-}
-#endif /* CONFIG_USB_EHCI_HCD */
-
#if defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET) && !defined(CONFIG_CMD_NET)
int board_eth_init(bd_t *bis)
{