@@ -646,10 +646,11 @@ dtb-$(CONFIG_MACH_SUN8I_R40) += \
sun8i-r40-oka40i-c.dtb \
sun8i-t3-cqa3t-bv3.dtb \
sun8i-v40-bananapi-m2-berry.dtb
-dtb-$(CONFIG_MACH_SUN8I_V3S) += \
+dtb-$(CONFIG_MACH_SUN8I_V3) += \
sun8i-s3-elimo-initium.dtb \
sun8i-s3-pinecube.dtb \
- sun8i-v3-sl631-imx179.dtb \
+ sun8i-v3-sl631-imx179.dtb
+dtb-$(CONFIG_MACH_SUN8I_V3S) += \
sun8i-v3s-licheepi-zero.dtb \
sun8i-v3s-licheepi-zero-dock.dtb
dtb-$(CONFIG_MACH_SUN8I_R528) += \
@@ -13,6 +13,7 @@
#if defined(CONFIG_SUNXI_GEN_SUN6I) && \
!defined(CONFIG_MACH_SUN8I_R40) && \
+ !defined(CONFIG_MACH_SUN8I_V3) && \
!defined(CONFIG_MACH_SUN8I_V3S)
#define SUNXI_SRAM_A2_BASE 0x00040000
#ifdef CONFIG_MACH_SUN8I_H3
@@ -400,8 +400,20 @@ config MACH_SUN8I_R528
select SUPPORT_SPL
select DRAM_SUN20I_D1
+config MACH_SUN8I_V3
+ bool "sun8i (Allwinner V3/S3)"
+ select CPU_V7A
+ select CPU_V7_HAS_NONSEC
+ select CPU_V7_HAS_VIRT
+ select ARCH_SUPPORT_PSCI
+ select SUNXI_GEN_SUN6I
+ select SUNXI_DRAM_DW
+ select SUNXI_DRAM_DW_16BIT
+ select SUPPORT_SPL
+ select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
+
config MACH_SUN8I_V3S
- bool "sun8i (Allwinner V3/V3s/S3/S3L)"
+ bool "sun8i (Allwinner V3s)"
select CPU_V7A
select CPU_V7_HAS_NONSEC
select CPU_V7_HAS_VIRT
@@ -472,6 +484,7 @@ config MACH_SUN8I
default y if MACH_SUN8I_A83T
default y if MACH_SUNXI_H3_H5
default y if MACH_SUN8I_R40
+ default y if MACH_SUN8I_V3
default y if MACH_SUN8I_V3S
config RESERVE_ALLWINNER_BOOT0_HEADER
@@ -592,7 +605,7 @@ config DRAM_CLK
default 792 if MACH_SUN9I
default 648 if MACH_SUN8I_R40
default 360 if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || \
- MACH_SUN8I_V3S
+ MACH_SUN8I_V3 || MACH_SUN8I_V3S
default 312 if MACH_SUN6I || MACH_SUN8I
default 672 if MACH_SUN50I
default 744 if MACH_SUN50I_H6
@@ -617,7 +630,7 @@ config DRAM_ZQ
default 123 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || \
MACH_SUN8I_A23 || MACH_SUN8I_A33 || MACH_SUN8I_A83T
default 127 if MACH_SUN7I
- default 14779 if MACH_SUN8I_V3S
+ default 14779 if MACH_SUN8I_V3 || MACH_SUN8I_V3S
default 3881979 if MACH_SUNXI_H3_H5 || MACH_SUN8I_R40 || MACH_SUN50I_H6
default 4145117 if MACH_SUN9I
default 3881915 if MACH_SUN50I
@@ -743,7 +756,7 @@ config SYS_SOC
config SUNXI_MINIMUM_DRAM_MB
int "minimum DRAM size"
default 32 if MACH_SUNIV
- default 64 if MACH_SUN8I_V3S
+ default 64 if MACH_SUN8I_V3 || MACH_SUN8I_V3S
default 256
---help---
Minimum DRAM size expected on the board. Traditionally we assumed
@@ -784,7 +797,8 @@ config MMC_SUNXI_SLOT_EXTRA
config I2C0_ENABLE
bool "Enable I2C/TWI controller 0"
- default y if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUN8I_R40
+ default y if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || \
+ MACH_SUN8I_R40 || MACH_SUN8I_V3
default n if MACH_SUN6I || MACH_SUN8I
select CMD_I2C
---help---
@@ -829,6 +843,7 @@ config VIDEO_SUNXI
depends on !MACH_SUN8I_A83T
depends on !MACH_SUNXI_H3_H5
depends on !MACH_SUN8I_R40
+ depends on !MACH_SUN8I_V3
depends on !MACH_SUN8I_V3S
depends on !MACH_SUN9I
depends on !MACH_SUN50I
@@ -1052,7 +1067,7 @@ config SPL_STACK_R_ADDR
config SPL_SPI_SUNXI
bool "Support for SPI Flash on Allwinner SoCs in SPL"
- depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNXI_H3_H5 || MACH_SUN50I || MACH_SUN8I_R40 || MACH_SUN8I_V3S || SUN50I_GEN_H6 || MACH_SUNIV || SUNXI_GEN_NCAT2
+ depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNXI_H3_H5 || MACH_SUN50I || MACH_SUN8I_R40 || MACH_SUN8I_V3 || MACH_SUN8I_V3S || SUN50I_GEN_H6 || MACH_SUNIV || SUNXI_GEN_NCAT2
help
Enable support for SPI Flash. This option allows SPL to read from
sunxi SPI Flash. It uses the same method as the boot ROM, so does
@@ -141,7 +141,8 @@ static int gpio_init(void)
sunxi_gpio_set_cfgpin(SUNXI_GPB(9), SUN8I_A83T_GPB_UART0);
sunxi_gpio_set_cfgpin(SUNXI_GPB(10), SUN8I_A83T_GPB_UART0);
sunxi_gpio_set_pull(SUNXI_GPB(10), SUNXI_GPIO_PULL_UP);
-#elif CONFIG_CONS_INDEX == 1 && defined(CONFIG_MACH_SUN8I_V3S)
+#elif CONFIG_CONS_INDEX == 1 && (defined(CONFIG_MACH_SUN8I_V3) || \
+ defined(CONFIG_MACH_SUN8I_V3S))
sunxi_gpio_set_cfgpin(SUNXI_GPB(8), SUN8I_V3S_GPB_UART0);
sunxi_gpio_set_cfgpin(SUNXI_GPB(9), SUN8I_V3S_GPB_UART0);
sunxi_gpio_set_pull(SUNXI_GPB(9), SUNXI_GPIO_PULL_UP);
@@ -90,6 +90,8 @@ int print_cpuinfo(void)
printf("CPU: Allwinner H3 (SUN8I %04x)\n", sunxi_get_sram_id());
#elif defined CONFIG_MACH_SUN8I_R40
printf("CPU: Allwinner R40 (SUN8I %04x)\n", sunxi_get_sram_id());
+#elif defined CONFIG_MACH_SUN8I_V3
+ printf("CPU: Allwinner V3/S3 (SUN8I %04x)\n", sunxi_get_sram_id());
#elif defined CONFIG_MACH_SUN8I_V3S
printf("CPU: Allwinner V3s (SUN8I %04x)\n", sunxi_get_sram_id());
#elif defined CONFIG_MACH_SUN8I_R528
@@ -851,7 +851,7 @@ unsigned long sunxi_dram_init(void)
.dx_read_delays = SUN8I_H3_DX_READ_DELAYS,
.dx_write_delays = SUN8I_H3_DX_WRITE_DELAYS,
.ac_delays = SUN8I_H3_AC_DELAYS,
-#elif defined(CONFIG_MACH_SUN8I_V3S)
+#elif defined(CONFIG_MACH_SUN8I_V3) || defined(CONFIG_MACH_SUN8I_V3S)
.dx_read_delays = SUN8I_V3S_DX_READ_DELAYS,
.dx_write_delays = SUN8I_V3S_DX_WRITE_DELAYS,
.ac_delays = SUN8I_V3S_AC_DELAYS,
@@ -878,7 +878,7 @@ unsigned long sunxi_dram_init(void)
uint16_t socid = SOCID_H3;
#elif defined(CONFIG_MACH_SUN8I_R40)
uint16_t socid = SOCID_R40;
-#elif defined(CONFIG_MACH_SUN8I_V3S)
+#elif defined(CONFIG_MACH_SUN8I_V3) || defined(CONFIG_MACH_SUN8I_V3S)
uint16_t socid = SOCID_V3S;
#elif defined(CONFIG_MACH_SUN50I)
uint16_t socid = SOCID_A64;
@@ -141,6 +141,7 @@ static bool is_sun6i_gen_spi(void)
return IS_ENABLED(CONFIG_SUNXI_GEN_SUN6I) ||
IS_ENABLED(CONFIG_SUN50I_GEN_H6) ||
IS_ENABLED(CONFIG_SUNXI_GEN_NCAT2) ||
+ IS_ENABLED(CONFIG_MACH_SUN8I_V3) ||
IS_ENABLED(CONFIG_MACH_SUN8I_V3S);
}
@@ -68,7 +68,7 @@ void i2c_init_board(void)
sunxi_gpio_set_cfgpin(SUNXI_GPH(14), SUN6I_GPH_TWI0);
sunxi_gpio_set_cfgpin(SUNXI_GPH(15), SUN6I_GPH_TWI0);
clock_twi_onoff(0, 1);
-#elif defined(CONFIG_MACH_SUN8I_V3S)
+#elif defined(CONFIG_MACH_SUN8I_V3) || defined(CONFIG_MACH_SUN8I_V3S)
sunxi_gpio_set_cfgpin(SUNXI_GPB(6), SUN8I_V3S_GPB_TWI0);
sunxi_gpio_set_cfgpin(SUNXI_GPB(7), SUN8I_V3S_GPB_TWI0);
clock_twi_onoff(0, 1);
@@ -2,11 +2,9 @@ CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_DEFAULT_DEVICE_TREE="sun8i-s3-pinecube"
CONFIG_SPL=y
-CONFIG_MACH_SUN8I_V3S=y
-CONFIG_SUNXI_DRAM_DDR3_1333=y
+CONFIG_MACH_SUN8I_V3=y
CONFIG_DRAM_CLK=504
CONFIG_DRAM_ODT_EN=y
-CONFIG_I2C0_ENABLE=y
# CONFIG_HAS_ARMV7_SECURE_BASE is not set
CONFIG_SPL_I2C=y
CONFIG_NO_NET=y
@@ -68,7 +68,7 @@ config CLK_SUN8I_R40
config CLK_SUN8I_V3S
bool "Clock driver for Allwinner V3S"
- default MACH_SUN8I_V3S
+ default MACH_SUN8I_V3 || MACH_SUN8I_V3S
help
This enables common clock driver support for platforms based
on Allwinner V3S SoC.
@@ -5,7 +5,7 @@ config PHY_SUN4I_USB
bool "Allwinner Sun4I USB PHY driver"
depends on ARCH_SUNXI
depends on !MACH_SUN9I
- default n if MACH_SUN8I_V3S
+ default n if MACH_SUN8I_V3 || MACH_SUN8I_V3S
default y
select DM_REGULATOR
select PHY
@@ -76,7 +76,7 @@ config PINCTRL_SUN8I_H3_R
config PINCTRL_SUN8I_V3S
bool "Support for the Allwinner V3s PIO"
- default MACH_SUN8I_V3S
+ default MACH_SUN8I_V3 || MACH_SUN8I_V3S
select PINCTRL_SUNXI
config PINCTRL_SUN9I_A80
@@ -54,7 +54,7 @@ source "drivers/power/regulator/Kconfig"
choice
prompt "Select Sunxi PMIC Variant"
depends on ARCH_SUNXI
- default AXP209_POWER if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
+ default AXP209_POWER if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUN8I_V3
default AXP221_POWER if MACH_SUN6I || MACH_SUN8I_A23 || MACH_SUN8I_A33 || MACH_SUN8I_R40
default AXP818_POWER if MACH_SUN8I_A83T
default SUNXI_NO_PMIC if MACH_SUNXI_H3_H5 || MACH_SUN50I || MACH_SUN8I_V3S
@@ -75,7 +75,7 @@ config AXP152_POWER
config AXP209_POWER
bool "axp209 pmic support"
- depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUN8I_V3S
+ depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUN8I_V3
select AXP_PMIC_BUS
select CMD_POWEROFF
---help---