]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
sunxi: Add basic H3 support
authorJens Kuske <jenskuske@gmail.com>
Tue, 17 Nov 2015 14:12:58 +0000 (15:12 +0100)
committerHans de Goede <hdegoede@redhat.com>
Sun, 22 Nov 2015 10:30:59 +0000 (11:30 +0100)
Add initial sun8i H3 support, only uart + mmc are supported for now.

Signed-off-by: Jens Kuske <jenskuske@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
arch/arm/cpu/armv7/sunxi/board.c
arch/arm/cpu/armv7/sunxi/cpu_info.c
arch/arm/include/asm/arch-sunxi/gpio.h
board/sunxi/Kconfig
drivers/power/Kconfig
include/configs/sun8i.h

index 794b829e1c976a51b252f756322d0fde43feb5be..0f26cb00f2b108593f914d0b5c41cc6f2c8e8a15 100644 (file)
@@ -72,6 +72,10 @@ static int gpio_init(void)
        sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUN8I_A33_GPB_UART0);
        sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN8I_A33_GPB_UART0);
        sunxi_gpio_set_pull(SUNXI_GPB(1), SUNXI_GPIO_PULL_UP);
+#elif CONFIG_CONS_INDEX == 1 && defined(CONFIG_MACH_SUN8I_H3)
+       sunxi_gpio_set_cfgpin(SUNXI_GPA(4), SUN8I_H3_GPA_UART0);
+       sunxi_gpio_set_cfgpin(SUNXI_GPA(5), SUN8I_H3_GPA_UART0);
+       sunxi_gpio_set_pull(SUNXI_GPA(5), SUNXI_GPIO_PULL_UP);
 #elif CONFIG_CONS_INDEX == 1 && defined(CONFIG_MACH_SUN9I)
        sunxi_gpio_set_cfgpin(SUNXI_GPH(12), SUN9I_GPH_UART0);
        sunxi_gpio_set_cfgpin(SUNXI_GPH(13), SUN9I_GPH_UART0);
index 05fef3216dce5b71ac2befd77dd89404ec9dfe79..1e73332d7e649f9fcf7e8c36154b04bb98511dc4 100644 (file)
@@ -69,6 +69,8 @@ int print_cpuinfo(void)
        puts("CPU:   Allwinner A23 (SUN8I)\n");
 #elif defined CONFIG_MACH_SUN8I_A33
        puts("CPU:   Allwinner A33 (SUN8I)\n");
+#elif defined CONFIG_MACH_SUN8I_H3
+       puts("CPU:   Allwinner H3 (SUN8I)\n");
 #elif defined CONFIG_MACH_SUN9I
        puts("CPU:   Allwinner A80 (SUN9I)\n");
 #else
index 8382101558c8ddaffabdff1e0d602d6e5eaba00d..7af5e295dc31f83bad7fd2b62616f7875340bd2a 100644 (file)
@@ -147,6 +147,7 @@ enum sunxi_gpio_number {
 #define SUN7I_GPA_GMAC         5
 #define SUN6I_GPA_SDC2         5
 #define SUN6I_GPA_SDC3         4
+#define SUN8I_H3_GPA_UART0     2
 
 #define SUN4I_GPB_TWI0         2
 #define SUN4I_GPB_TWI1         2
index f6f2a605eca32b16e12b4b110cb4e8ca80ec19f4..e1f574f9056945ac9b367a6fe0882d3ec0dd3e90 100644 (file)
@@ -68,6 +68,11 @@ config MACH_SUN8I_A33
        select SUPPORT_SPL
        select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
 
+config MACH_SUN8I_H3
+       bool "sun8i (Allwinner H3)"
+       select CPU_V7
+       select SUNXI_GEN_SUN6I
+
 config MACH_SUN9I
        bool "sun9i (Allwinner A80)"
        select CPU_V7
@@ -78,7 +83,7 @@ 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
+       default y if MACH_SUN8I_A23 || MACH_SUN8I_A33 || MACH_SUN8I_H3
 
 
 config DRAM_CLK
index 809f8f1180288c75210ef4a40bb4f2b854b5ef77..1936e5f1fcee72bb414cfb51b4d93ba045c289a8 100644 (file)
@@ -8,7 +8,8 @@ choice
        prompt "Select Sunxi PMIC Variant"
        depends on ARCH_SUNXI
        default AXP209_POWER if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
-       default AXP221_POWER if MACH_SUN6I || MACH_SUN8I
+       default AXP221_POWER if MACH_SUN6I || MACH_SUN8I_A23 || MACH_SUN8I_A33
+       default SUNXI_NO_PMIC if MACH_SUN8I_H3
 
 config SUNXI_NO_PMIC
        boolean "board without a pmic"
@@ -31,7 +32,7 @@ config AXP209_POWER
 
 config AXP221_POWER
        boolean "axp221 / axp223 pmic support"
-       depends on MACH_SUN6I || MACH_SUN8I
+       depends on MACH_SUN6I || MACH_SUN8I_A23 || MACH_SUN8I_A33
        ---help---
        Select this to enable support for the axp221/axp223 pmic found on most
        A23 and A31 boards.
index 4fc63650082cd71b018209126d5b63caa620bcf9..113e320f06c62cfdf74245360b5c056a2058aa66 100644 (file)
@@ -25,6 +25,8 @@
 #define CONFIG_ARMV7_PSCI_NR_CPUS      2
 #elif defined(CONFIG_MACH_SUN8I_A33)
 #define CONFIG_ARMV7_PSCI_NR_CPUS      4
+#elif defined(CONFIG_MACH_SUN8I_H3)
+#define CONFIG_ARMV7_PSCI_NR_CPUS      4
 #else
 #error Unsupported sun8i variant
 #endif