summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-05-04 17:50:20 -0400
committerTom Rini <trini@konsulko.com>2015-05-04 17:50:20 -0400
commit622da1c36aee9c39075f2109848228a5737925c0 (patch)
treee08cd8d033fd09e415d603bab26691d776365adb /board
parent281239ad9dc2a695a53ab34dda44cdbe31c69122 (diff)
parentfd01ae1384a67c354eb53fc8a4c1e0d519014ae8 (diff)
downloadu-boot-622da1c36aee9c39075f2109848228a5737925c0.tar.gz
u-boot-622da1c36aee9c39075f2109848228a5737925c0.tar.bz2
u-boot-622da1c36aee9c39075f2109848228a5737925c0.zip
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
Diffstat (limited to 'board')
-rw-r--r--board/sunxi/Kconfig56
-rw-r--r--board/sunxi/MAINTAINERS6
-rw-r--r--board/sunxi/board.c58
-rw-r--r--board/sunxi/gmac.c6
4 files changed, 111 insertions, 15 deletions
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 88e335836d..a60d0288fb 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -1,21 +1,40 @@
if ARCH_SUNXI
+# Note only one of these may be selected at a time! But hidden choices are
+# not supported by Kconfig
+config SUNXI_GEN_SUN4I
+ bool
+ ---help---
+ Select this for sunxi SoCs which have resets and clocks set up
+ as the original A10 (mach-sun4i).
+
+config SUNXI_GEN_SUN6I
+ bool
+ ---help---
+ Select this for sunxi SoCs which have sun6i like periphery, like
+ separate ahb reset control registers, custom pmic bus, new style
+ watchdog, etc.
+
+
choice
prompt "Sunxi SoC Variant"
config MACH_SUN4I
bool "sun4i (Allwinner A10)"
select CPU_V7
+ select SUNXI_GEN_SUN4I
select SUPPORT_SPL
config MACH_SUN5I
bool "sun5i (Allwinner A13)"
select CPU_V7
+ select SUNXI_GEN_SUN4I
select SUPPORT_SPL
config MACH_SUN6I
bool "sun6i (Allwinner A31)"
select CPU_V7
+ select SUNXI_GEN_SUN6I
select SUPPORT_SPL
config MACH_SUN7I
@@ -23,16 +42,30 @@ config MACH_SUN7I
select CPU_V7
select CPU_V7_HAS_NONSEC
select CPU_V7_HAS_VIRT
+ select SUNXI_GEN_SUN4I
select SUPPORT_SPL
select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
-config MACH_SUN8I
+config MACH_SUN8I_A23
bool "sun8i (Allwinner A23)"
select CPU_V7
+ select SUNXI_GEN_SUN6I
+ select SUPPORT_SPL
+
+config MACH_SUN8I_A33
+ bool "sun8i (Allwinner A33)"
+ select CPU_V7
+ select SUNXI_GEN_SUN6I
select SUPPORT_SPL
endchoice
+# The sun8i SoCs share a lot, this helps to avoid a lot of "if A23 || A33"
+config MACH_SUN8I
+ bool
+ default y if MACH_SUN8I_A23 || MACH_SUN8I_A33
+
+
config DRAM_CLK
int "sunxi dram clock speed"
default 312 if MACH_SUN6I || MACH_SUN8I
@@ -176,9 +209,6 @@ config UART0_PORT_F
at the same time, the system can be only booted in the FEL mode.
Only enable this if you really know what you are doing.
-config FDTFILE
- string "Default fdtfile env setting for this board"
-
config OLD_SUNXI_KERNEL_COMPAT
boolean "Enable workarounds for booting old kernels"
default n
@@ -307,6 +337,12 @@ config I2C4_ENABLE
See I2C0_ENABLE help text.
endif
+config AXP_GPIO
+ boolean "Enable support for gpio-s on axp PMICs"
+ default n
+ ---help---
+ Say Y here to enable support for the gpio pins of the axp PMIC ICs.
+
config VIDEO
boolean "Enable graphical uboot console on HDMI, LCD or VGA"
default y
@@ -507,4 +543,16 @@ config GMAC_TX_DELAY
---help---
Set the GMAC Transmit Clock Delay Chain value.
+config NET
+ default y
+
+config NETDEVICES
+ default y
+
+config DM_ETH
+ default y
+
+config DM_SERIAL
+ default y
+
endif
diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
index 75e8b5ab4f..339904b84f 100644
--- a/board/sunxi/MAINTAINERS
+++ b/board/sunxi/MAINTAINERS
@@ -38,6 +38,7 @@ F: configs/qt840a_defconfig
F: configs/Wits_Pro_A20_DKT_defconfig
F: include/configs/sun8i.h
F: configs/Ippo_q8h_v1_2_defconfig
+F: configs/Ippo_q8h_v1_2_a33_1024x600_defconfig
A20-OLINUXINO-LIME BOARD
M: FUKAUMI Naoki <naobsd@gmail.com>
@@ -59,6 +60,11 @@ M: Paul Kocialkowski <contact@paulk.fr>
S: Maintained
F: configs/Ampe_A76_defconfig
+Astar MID756 BOARD
+M: VishnuPatekar <vishnupatekar0510@gmail.com>
+S: Maintained
+F: configs/Astar_MID756_defconfig
+
COLOMBUS BOARD
M: Maxime Ripard <maxime.ripard@free-electrons.com>
S: Maintained
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index dda50b55a5..d9f7691373 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -28,7 +28,8 @@
#include <asm/arch/dram.h>
#include <asm/arch/gpio.h>
#include <asm/arch/mmc.h>
-#include <asm/arch/usbc.h>
+#include <asm/arch/usb_phy.h>
+#include <asm/gpio.h>
#include <asm/io.h>
#include <linux/usb/musb.h>
#include <net.h>
@@ -37,6 +38,41 @@
/* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */
int soft_i2c_gpio_sda;
int soft_i2c_gpio_scl;
+
+static int soft_i2c_board_init(void)
+{
+ int ret;
+
+ soft_i2c_gpio_sda = sunxi_name_to_gpio(CONFIG_VIDEO_LCD_PANEL_I2C_SDA);
+ if (soft_i2c_gpio_sda < 0) {
+ printf("Error invalid soft i2c sda pin: '%s', err %d\n",
+ CONFIG_VIDEO_LCD_PANEL_I2C_SDA, soft_i2c_gpio_sda);
+ return soft_i2c_gpio_sda;
+ }
+ ret = gpio_request(soft_i2c_gpio_sda, "soft-i2c-sda");
+ if (ret) {
+ printf("Error requesting soft i2c sda pin: '%s', err %d\n",
+ CONFIG_VIDEO_LCD_PANEL_I2C_SDA, ret);
+ return ret;
+ }
+
+ soft_i2c_gpio_scl = sunxi_name_to_gpio(CONFIG_VIDEO_LCD_PANEL_I2C_SCL);
+ if (soft_i2c_gpio_scl < 0) {
+ printf("Error invalid soft i2c scl pin: '%s', err %d\n",
+ CONFIG_VIDEO_LCD_PANEL_I2C_SCL, soft_i2c_gpio_scl);
+ return soft_i2c_gpio_scl;
+ }
+ ret = gpio_request(soft_i2c_gpio_scl, "soft-i2c-scl");
+ if (ret) {
+ printf("Error requesting soft i2c scl pin: '%s', err %d\n",
+ CONFIG_VIDEO_LCD_PANEL_I2C_SCL, ret);
+ return ret;
+ }
+
+ return 0;
+}
+#else
+static int soft_i2c_board_init(void) { return 0; }
#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -44,7 +80,7 @@ DECLARE_GLOBAL_DATA_PTR;
/* add board specific code here */
int board_init(void)
{
- int id_pfr1;
+ int id_pfr1, ret;
gd->bd->bi_boot_params = (PHYS_SDRAM_0 + 0x100);
@@ -57,7 +93,12 @@ int board_init(void)
asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r"(24000000));
}
- return 0;
+ ret = axp_gpio_init();
+ if (ret)
+ return ret;
+
+ /* Uses dm gpio code so do this here and not in i2c_init_board() */
+ return soft_i2c_board_init();
}
int dram_init(void)
@@ -351,11 +392,6 @@ void i2c_init_board(void)
clock_twi_onoff(4, 1);
#endif
#endif
-
-#if defined CONFIG_VIDEO_LCD_PANEL_I2C && !(defined CONFIG_SPL_BUILD)
- soft_i2c_gpio_sda = sunxi_name_to_gpio(CONFIG_VIDEO_LCD_PANEL_I2C_SDA);
- soft_i2c_gpio_scl = sunxi_name_to_gpio(CONFIG_VIDEO_LCD_PANEL_I2C_SCL);
-#endif
}
#ifdef CONFIG_SPL_BUILD
@@ -416,6 +452,8 @@ void sunxi_board_init(void)
#endif
#if defined(CONFIG_MUSB_HOST) || defined(CONFIG_MUSB_GADGET)
+extern const struct musb_platform_ops sunxi_musb_ops;
+
static struct musb_hdrc_config musb_config = {
.multipoint = 1,
.dyn_fifo = 1,
@@ -472,6 +510,10 @@ int misc_init_r(void)
}
}
+ ret = sunxi_usb_phy_probe();
+ if (ret)
+ return ret;
+
#if defined(CONFIG_MUSB_HOST) || defined(CONFIG_MUSB_GADGET)
musb_register(&musb_plat, NULL, (void *)SUNXI_USB0_BASE);
#endif
diff --git a/board/sunxi/gmac.c b/board/sunxi/gmac.c
index d90eed48f7..4e222d88c0 100644
--- a/board/sunxi/gmac.c
+++ b/board/sunxi/gmac.c
@@ -13,11 +13,11 @@ int sunxi_gmac_initialize(bd_t *bis)
(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
/* Set up clock gating */
-#ifndef CONFIG_MACH_SUN6I
- setbits_le32(&ccm->ahb_gate1, 0x1 << AHB_GATE_OFFSET_GMAC);
-#else
+#ifdef CONFIG_SUNXI_GEN_SUN6I
setbits_le32(&ccm->ahb_reset0_cfg, 0x1 << AHB_RESET_OFFSET_GMAC);
setbits_le32(&ccm->ahb_gate0, 0x1 << AHB_GATE_OFFSET_GMAC);
+#else
+ setbits_le32(&ccm->ahb_gate1, 0x1 << AHB_GATE_OFFSET_GMAC);
#endif
/* Set MII clock */