# SPDX-License-Identifier: GPL-2.0-only
menuconfig ARCH_SUNXI
	bool "Allwinner SoCs"
	depends on ARCH_MULTI_V5 || ARCH_MULTI_V7
	select ARCH_HAS_RESET_CONTROLLER
	select CLKSRC_MMIO
	select GENERIC_IRQ_CHIP
	select GPIOLIB
	select PINCTRL
	select PM_OPP
	select SUN4I_TIMER
	select RESET_CONTROLLER
	help
	  Support for Allwinner ARM-based family of processors

if ARCH_SUNXI

config ARCH_SUNXI_BOARD
	bool "Allwinner sunxi SDK board"
	help
	  This enables SDK board dtb.

if ARCH_MULTI_V7

config MACH_SUN4I
	bool "Allwinner A10 (sun4i) SoCs support"
	default ARCH_SUNXI

config MACH_SUN5I
	bool "Allwinner A10s / A13 (sun5i) SoCs support"
	default ARCH_SUNXI
	select SUN5I_HSTIMER

config MACH_SUN6I
	bool "Allwinner A31 (sun6i) SoCs support"
	default ARCH_SUNXI
	select ARM_GIC
	select MFD_SUN6I_PRCM
	select SUN5I_HSTIMER

config MACH_SUN7I
	bool "Allwinner A20 (sun7i) SoCs support"
	default ARCH_SUNXI
	select ARM_GIC
	select ARM_PSCI
	select ARCH_SUPPORTS_BIG_ENDIAN
	select HAVE_ARM_ARCH_TIMER
	select SUN5I_HSTIMER

config MACH_SUN8I
	bool "Allwinner sun8i Family SoCs support"
	default ARCH_SUNXI
	select ARM_GIC
	select MFD_SUN6I_PRCM

config MACH_SUN9I
	bool "Allwinner (sun9i) SoCs support"
	default ARCH_SUNXI
	select ARM_GIC

config ARCH_SUNXI_MC_SMP
	bool
	depends on SMP
	default MACH_SUN9I || MACH_SUN8I
	select ARM_CCI400_PORT_CTRL
	select ARM_CPU_SUSPEND

endif

if ARCH_MULTI_V5

config MACH_SUNIV
	bool "Allwinner ARMv5 F-series (suniv) SoCs support"
	default ARCH_SUNXI
	help
	  Support for Allwinner suniv ARMv5 SoCs.
	  (F1C100A, F1C100s, F1C200s, F1C500, F1C600)

endif

choice
	prompt "Select the architecture of SoC"
	default ARCH_SUN8I
	help
	  Select the architecture for SoC
	  sunxi
	  `-- sun8i ----- Cortex-A7 based Family SoCs

config ARCH_SUN8I
	bool "Allwinner A7 smp SoCs"
	select ARM_GIC
	select CPU_V7
	select HAVE_SMP
	select HAVE_ARM_ARCH_TIMER
	select SUN4I_TIMER
	select MIGHT_HAVE_CACHE_L2X0
	select PINCTRL
	select PINCTRL_SUNXI
	select ARCH_REQUIRE_GPIOLIB
	select COMMON_CLK
	select CLKDEV_LOOKUP
	select CLKSRC_MMIO
	select CLKSRC_OF
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_CHIP
	select SPARSE_IRQ
	select GENERIC_ALLOCATOR
	help
	  Allwinner A7 smp SoCs(sun8i)
endchoice

# Select the wafer with sun8i

if ARCH_SUN8I
choice
	prompt "Select the wafer with arch sun8i"
	default ARCH_SUN8IW2
	help
	  Select the wafer with arch sun8i

config ARCH_SUN8IW1
        bool "Allwinner sun8iw1 SoCs"
        help
          Allwinner sun8iw1 SoCs

config ARCH_SUN8IW2
        bool "Allwinner sun8iw2 SoCs"
        help
          Allwinner sun8iw2 SoCs

config ARCH_SUN8IW3
        bool "Allwinner sun8iw3 SoCs"
        help
          Allwinner sun8iw3 SoCs

config ARCH_SUN8IW5
        bool "Allwinner sun8iw5 SoCs"
        help
          Allwinner sun8iw5 SoCs

config ARCH_SUN8IW6
        bool "Allwinner sun8iw6 SoCs"
        help
          Allwinner sun8iw6 SoCs

config ARCH_SUN8IW7
        bool "Allwinner sun8iw7 SoCs"
        help
          Allwinner sun8iw7 SoCs

config ARCH_SUN8IW8
        bool "Allwinner sun8iw8 SoCs"
        help
          Allwinner sun8iw8 SoCs

config ARCH_SUN8IW10
        bool "Allwinner sun8iw10 SoCs"
        help
          Allwinner sun8iw10 SoCs

config ARCH_SUN8IW11
        bool "Allwinner sun8iw11 SoCs"
        help
          Allwinner sun8iw11 SoCs

config ARCH_SUN8IW12
        bool "Allwinner sun8iw12 SoCs"
        help
          Allwinner sun8iw12 SoCs

config ARCH_SUN8IW15
        bool "Allwinner sun8iw15 SoCs"
        help
          Allwinner sun8iw15 SoCs

config ARCH_SUN8IW16
        bool "Allwinner sun8iw16 SoCs"
        help
          Allwinner sun8iw16 SoCs

config ARCH_SUN8IW17
        bool "Allwinner sun8iw17 SoCs"
        help
          Allwinner sun8iw17 SoCs

config ARCH_SUN8IW18
        bool "Allwinner sun8iw18 SoCs"
        help
          Allwinner sun8iw18 SoCs

config ARCH_SUN8IW19
        bool "Allwinner sun8iw19 SoCs"
        help
          Allwinner sun8iw19 SoCs

config ARCH_SUN8IW20
        bool "Allwinner sun8iw20 SoCs"
        help
          Allwinner sun8iw20 SoCs

endchoice
endif

# Select the SoC with specific arch and wafer

if ARCH_SUN8IW10
choice
	prompt "Select the SoC with wafer sun8iw10"
	default ARCH_SUN8IW10P1
	help
	 Select the SoC with wafer sun8iw10

config ARCH_SUN8IW10P1
	bool "Allwinner sun8iw10p1 SoC"
	help
	  Allwinner sun8iw10p1 SoC
endchoice
endif

if ARCH_SUN8IW15
choice
	prompt "Select the SoC with wafer sun8iw15"
	default ARCH_SUN8IW15P1
	help
	 Select the SoC with wafer sun8iw15

config ARCH_SUN8IW15P1
	bool "Allwinner sun8iw15p1 SoC"
	help
	  Allwinner sun8iw15p1 SoC
endchoice
endif

# Select the board between FPGA and EVB

choice
	prompt "Allwinner development Board"
	depends on ARCH_SUNXI
	default FPGA_V4_PLATFORM

config FPGA_V4_PLATFORM
       bool "FPGAv4 board"
       help
         Support for Allwinner's FPGAv4 board

config FPGA_V7_PLATFORM
       bool "FPGAv7 board"
       help
         Support for Allwinner's FPGAv4 board

config EVB_PLATFORM
       bool "EVB board"
       help
         Support for Allwinner's EVB board
endchoice

config SUNXI_SOC_NAME
	string "The name of Sunxi SoC"
	default ""
	help
	  Used for /proc/cpuinfo and /sys/.../sysinfo.

endif
