#	$NetBSD: ALLWINNER_A80,v 1.20 2017/01/08 05:11:24 christos Exp $
#
#	ALLWINNER_A80 - Allwinner A80 boards (Cubieboard4, OptimusBoard, etc)
#

include	"arch/evbarm/conf/std.awin"
include	"arch/evbarm/conf/GENERIC.common"

no makeoptions	CPUFLAGS
makeoptions	CPUFLAGS="-mcpu=cortex-a7 -mfpu=neon"
no makeoptions	BOARDTYPE
makeoptions	BOARDTYPE="allwinner_a80"
no makeoptions	KERNEL_BASE_PHYS
no makeoptions	KERNEL_BASE_VIRT
makeoptions 	KERNEL_BASE_PHYS="0x80000000"
makeoptions 	KERNEL_BASE_VIRT="0x80000000"
options 	PMAP_NEED_ALLOC_POOLPAGE

options 	ALLWINNER_A80
options 	MULTIPROCESSOR
options 	MEMSIZE=2048
options 	AWIN_CONSOLE_EARLY
options 	AWIN_GPIO_IGNORE_FW

#options 	DEBUG
#options 	VERBOSE_INIT_ARM # verbose bootstraping messages
makeoptions	DEBUG="-g"	# compile full symbol table
makeoptions	COPY_SYMTAB=1

config		netbsd		root on ? type ?

mainbus0	at root
cpu*		at mainbus?

# A7 core devices
armperiph0	at mainbus?
armgic0		at armperiph?				# Interrupt Controller
armgtmr0	at armperiph?				# ARM Generic Timer

# SoC I/O
awinio0		at mainbus?

# SD/MMC controllers
awinmmc0	at awinio0 port 0	# SD card slot
sdmmc0		at awinmmc0
ld0		at sdmmc0

awinmmc2	at awinio0 port 2	# eMMC
sdmmc2		at awinmmc2
ld2		at sdmmc2

# Interrupt Controller
awinicu0	at awinio0 

# DMA Controller
awindma0	at awinio0

# 64-bit counter
#awincnt0	at awinio0

# GPIO Controller
awingpio0	at awinio0

gpio*		at awingpio?

# I2C Controllers
awiniic0	at awinio? port 0
iic0		at awiniic0

awiniic1	at awinio? port 1
iic1		at awiniic1

awiniic2	at awinio? port 2
iic2		at awiniic2

# Reduced serial bus (RSB)
awinp2wi0	at awinio0
iic4		at awinp2wi0
axp806pm0	at iic4 addr 0x745	# AXP806 Power Management Unit
axp809pm0	at iic4 addr 0x3a3	# AXP809 Power Management Unit
ac100ic0	at iic4 addr 0xe89	# AC100 CODEC/RTC

options 	I2C_MAX_ADDR=0xfff

# On-board 16550 UARTs
com0		at awinio? port 0			# UART0 (console)
options 	CONADDR=0x07000000, CONSPEED=115200

# Consumer IR
awinir0		at awinio?
cir0		at awinir0

# Watchdog timers
awinwdt*	at awinio?

# GMAC Ethernet
awge0		at awinio0 port ?

# HDMI
#awinhdmi0	at awinio0
#awinhdmiaudio0	at awinio0
#audio1		at awinhdmiaudio0

#spkr*		at audio?		# PC speaker (synthesized)

# TCON
#awintcon0	at awinio0 port 0

# DE-BE
#awindebe0	at awinio0 port 0
awindebe0	at awinio0 port 1
options 	AWIN_DEBE_FWINIT

# Framebuffer
genfb0		at awindebe0
wsdisplay*	at genfb?
options 	VCONS_DRAW_INTR
options 	WSEMUL_VT100
options 	WS_KERNEL_FG=WSCOL_GREEN
options 	WS_KERNEL_BG=WSCOL_BLACK
options 	WSDISPLAY_COMPAT_PCVT
options 	WSDISPLAY_COMPAT_SYSCONS
options 	WSDISPLAY_COMPAT_USL
options 	WSDISPLAY_COMPAT_RAWKBD
options 	WSDISPLAY_DEFAULTSCREENS=4
pseudo-device 	wsmux
pseudo-device 	wsfont

# On-board USB
awinusb0	at awinio0 port 0
awinusb1	at awinio0 port 1
awinusb2	at awinio0 port 2
ohci*		at awinusb?
ehci*		at awinusb?
usb*		at ohci?
usb*		at ehci?

# USB OTG
#motg0		at awinio0
#usb*		at motg?

include "dev/usb/usbdevices.config"

midi*		at midibus?

rlphy*		at mii? phy ?
rgephy* 	at mii? phy ?
ukphy*		at mii? phy ?

cinclude "arch/evbarm/conf/ALLWINNER_A80.local"
