#       $NetBSD: WII,v 1.9 2025/02/17 12:24:58 jmcneill Exp $
#
#       Nintendo Wii
#

include         "arch/evbppc/conf/std.wii"

#options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary

ident           "WII"

options         MSGBUFSIZE=0x10000

maxusers        32

options         INSECURE        # disable kernel security levels
options         NTP             # NTP phase/frequency locked loop
options         KTRACE          # system call tracing via ktrace(1)

options         SYSVMSG         # System V message queues
options         SYSVSEM         # System V semaphores
options         SYSVSHM         # System V shared memory

#options        USERCONF        # userconf(4) support
#options        PIPE_SOCKETPAIR # smaller, but slower pipe(2)
#options        SYSCTL_INCLUDE_DESCR    # Include sysctl descriptions in kernel

# Alternate buffer queue strategies for better responsiveness under high
# disk I/O load.
#options        BUFQ_READPRIO
options         BUFQ_PRIOCSCAN

# Diagnostic/debugging support options
options         DIAGNOSTIC      # cheap kernel consistency checks
#options        DEBUG           # expensive debugging checks/support
options         DDB             # in-kernel debugger
#options        DDB_HISTORY_SIZE=100    # enable history editing in DDB
#options        TRAP_PANICWAIT
makeoptions COPY_SYMTAB=1       # size for embedded symbol table

#options        KGDB            # remote debugger
#options        KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0xff600400,KGDB_DEVRATE=9600
makeoptions DEBUG="-g"  # compile full symbol table

# Compatibility options
include         "conf/compat_netbsd50.config"
#options        COMPAT_386BSD_MBRPART # recognize old partition ID

# Wedge support
options         DKWEDGE_AUTODISCOVER    # Automatically add dk(4) instances
options         DKWEDGE_METHOD_GPT      # Supports GPT partitions as wedges

# File systems
file-system     FFS             # UFS
#file-system    EXT2FS          # second extended file system (linux)
#file-system    LFS             # log-structured file system
file-system     MFS             # memory file system
file-system     NFS             # Network File System client
file-system     CD9660          # ISO 9660 + Rock Ridge file system
file-system     MSDOSFS         # MS-DOS file system
file-system     FDESC           # /dev/fd
file-system     KERNFS          # /kern
file-system     NULLFS          # loopback file system
file-system     OVERLAY         # overlay file system
file-system     PUFFS           # Userspace file systems (e.g. ntfs-3g & sshfs)
file-system     PROCFS          # /proc
file-system     TMPFS           # efficient memory file system
file-system     UMAPFS          # NULLFS + uid and gid remapping
file-system     UNION           # union file system
file-system     PTYFS           # /dev/pts/N support

# File system options
options         FFS_EI          # FFS Endian Independent support
options         FFS_NO_SNAPSHOT # No FFS snapshot support
#options        QUOTA           # legacy UFS quotas
#options        QUOTA2          # new, in-filesystem UFS quotas
#options        UFS_DIRHASH     # UFS Large Directory Hashing
#options        UFS_EXTATTR     # Extended attribute support for UFS1
options         WAPBL           # File system journaling support
#options        LFS_DIRHASH     # LFS version of UFS_DIRHASH - experimental
#options        EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
                               # immutable) behave as system flags.
options         DISKLABEL_EI    # disklabel Endian Independent support
#options        NFSSERVER       # Network File System server

options         NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM
options         NFS_BOOT_RWSIZE=1024

# Networking options
#options        GATEWAY         # packet forwarding
options         INET            # IP + ICMP + TCP + UDP
options         INET6           # IPV6
options         IPSEC           # IP security
#options        IPSEC_DEBUG     # debug for IP security
#options        MROUTING        # IP multicast routing
#options        PIM             # Protocol Independent Multicast
#options        NETATALK        # AppleTalk networking protocols
#options        PPP_BSDCOMP     # BSD-Compress compression support for PPP
#options        PPP_DEFLATE     # Deflate compression support for PPP
#options        PPP_FILTER      # Active filter support for PPP (requires bpf)
#options        TCP_DEBUG       # Record last TCP_NDEBUG packets with SO_DEBUG

# These options enable verbose messages for several subsystems.
# Warning, these may compile large string tables into the kernel!
#options        MIIVERBOSE      # verbose PHY autoconfig messages
#options        SCSIVERBOSE     # human readable SCSI error messages
#options        USBVERBOSE      # verbose USB device autoconfig messages

# Kernel root file system and dump configuration.
config          netbsd  root on ? type ?

#
# Device configuration
#

mainbus0 at root

cpu0            at mainbus0
genfb0          at mainbus0 addr 0x0c002000
wsdisplay*      at wsemuldisplaydev?
options         WSEMUL_VT100
options         WSDISPLAY_CUSTOM_OUTPUT
options         WS_DEFAULT_FG=WSCOL_WHITE
options         WS_DEFAULT_BG=WSCOL_BLACK
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
options         WSDISPLAY_SCROLLSUPPORT

hollywood0      at mainbus0 irq 14
exi0            at mainbus0 addr 0x0d006800 irq 4       # External interface
rtcsram0        at exi0                                 # RTC/SRAM chip
bwai0           at mainbus0 addr 0x0d006c00 irq 5       # Audio interface
bwdsp0          at mainbus0 addr 0x0c005000 irq 6       # DSP

hwgpio0         at hollywood0 addr 0x0d0000c0 irq 10    # GPIO
gpio0           at hwgpio0
gpioiic0        at gpio0 offset 0 mask 0xc000 flag 1
iic0            at gpioiic0
avenc0          at iic0 addr 0x70                       # A/V Encoder

resetbtn0       at hollywood0 irq 17                    # Reset button

ehci0           at hollywood0 addr 0x0d040000 irq 4     # EHCI
ohci0           at hollywood0 addr 0x0d050000 irq 5     # OHCI0
ohci1           at hollywood0 addr 0x0d060000 irq 6     # OHCI1
usb*            at usbus?

sdhc0           at hollywood0 addr 0x0d070000 irq 7     # SD card
sdhc1           at hollywood0 addr 0x0d080000 irq 8     # SDIO/BT
sdmmc*          at sdmmcbus?
ld*             at sdmmc?
bwi*            at sdmmc?                               # WLAN

di0             at hollywood0 addr 0x0d806000 irq 18    # Drive interface

include "dev/usb/usbdevices.config"
include "dev/bluetooth/bluetoothdevices.config"

# MII/PHY support
urlphy*         at mii? phy ?
ukphy*          at mii? phy ?

# Radio support
radio*  at radiodev?

# Audio support
audio*  at audiobus?
spkr*   at audio?               # PC speaker (synthesized)
midi*   at midibus?
pseudo-device   sequencer       # MIDI sequencer

# SCSI bus support
scsibus* at scsi? channel ?

# SCSI devices
sd*     at scsibus? target ? lun ?      # SCSI disk drives
st*     at scsibus? target ? lun ?      # SCSI tape drives
cd*     at scsibus? target ? lun ?      # SCSI CD-ROM drives
ch*     at scsibus? target ? lun ?      # SCSI autochangers
ses*    at scsibus? target ? lun ?      # SCSI Enclosure Services devices
ss*     at scsibus? target ? lun ?      # SCSI scanners
uk*     at scsibus? target ? lun ?      # SCSI unknown

pseudo-device   vnd                     # disk-like interface to files
#pseudo-device  fss                     # file system snapshot device
#pseudo-device  cgd                     # cryptographic disk devices
#pseudo-device  md                      # memory disk device
pseudo-device   loop                    # network loopback
pseudo-device   bpfilter                # packet filter
#pseudo-device  carp                    # Common Address Redundancy Protocol
pseudo-device   npf                     # NPF packet filter
pseudo-device   ppp                     # Point-to-Point Protocol
pseudo-device   sl                      # Serial Line IP
pseudo-device   tun                     # network tunneling over tty
pseudo-device   gre                     # generic L3 over IP tunnel
pseudo-device   gif                     # IPv[46] over IPv[46] tunnel (RFC1933)
#pseudo-device  faith                   # IPv[46] tcp relay translation i/f
pseudo-device   stf                     # 6to4 IPv6 over IPv4 encapsulation
pseudo-device   vlan                    # IEEE 802.1q encapsulation
pseudo-device   pty                     # pseudo-terminals
pseudo-device   clockctl                # user control of clock subsystem
pseudo-device   drvctl                  # user control of drive subsystem
pseudo-device   putter                  # for puffs and pud
pseudo-device   ksyms

# wscons pseudo-devices
pseudo-device   wsmux                   # mouse & keyboard multiplexor
pseudo-device   wsfont
options         FONT_BOLD8x16