#
# Distribution kernel (TOSHIBA TX3912 based model) kernel config file
#
#       $NetBSD: TX3912,v 1.89 2018/08/01 20:04:11 maxv Exp $
#
include         "arch/hpcmips/conf/std.hpcmips"

#options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary

maxusers        16

include         "arch/hpcmips/conf/std.hpcmips.tx39"
makeoptions     CPUFLAGS="-march=r3900" # CPU codegen options
options         TX391X                  # Product TMPR3912

options         TX39_DEBUG
options         TX39_WATCHDOGTIMER
#options        TX39ICU_DEBUG
#options        TX39CLOCK_DEBUG
#options        TX39BIU_DEBUG
#options        TX39POWER_DEBUG
#options        TX39UART_DEBUG

options         KLOADER
options         KLOADER_KERNEL_PATH="\"/netbsd\""
options         KLOADER_DEBUG

options         SERIALCONSSLOT=0        # UARTA 0, UARTB 1

options         DDB                     # in-kernel debugger
pseudo-device   ksyms
#options        DDB_ONPANIC=0           # don't enter debugger on panic
options         DIAGNOSTIC              # extra kernel debugging checks
options         DEBUG                   # extra kernel debugging support
options         KTRACE                  # system call tracing support
#options        SYSCALL_DEBUG           # for debug
#options        MEMORY_DISK_ROOT_SIZE=10000
options         MSGBUFSIZE=65534        # for dmesg

#options        MEMORY_DISK_HOOKS
#options        MEMORY_DISK_IS_ROOT     # force root on memory disk
#options        MEMORY_DISK_SERVER=0    # no userspace memory disk support
#options        MEMORY_DISK_ROOT_SIZE=12288     # size of memory disk, in blocks

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)

include         "conf/compat_netbsd16.config"

options         SCSIVERBOSE     # human readable SCSI error messages
options         PCMCIAVERBOSE   # verbose PCMCIA configuration messages

options         NTP                     # network time protocol

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

# 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     PROCFS          # /proc
#file-system    UMAPFS          # NULLFS + uid and gid remapping
file-system     UNION           # union file system
#file-system    CODA            # Coda File System; also needs vcoda (below)
file-system     PTYFS           # /dev/pts/N support

# Networking options
#options        GATEWAY         # IP packet forwarding
options         INET            # IP + ICMP + TCP + UDP
options         INET6           # IPV6
#options        IPSEC           # IP security
#options        IPSEC_DEBUG     # debug for IP security
#options        MROUTING        # Multicast routing support
#options        PIM             # Protocol Independent Multicast

# JIT compiler for bpfilter
#options        SLJIT
#options        BPFJIT

options         NFSSERVER       # Sun NFS-compatible filesystem (server)
options         WAPBL           # File system journaling support
#options        QUOTA           # legacy UFS quotas
#options        QUOTA2          # new, in-filesystem UFS quotas
options         FFS_NO_SNAPSHOT # No FFS snapshot support

options         NFS_BOOT_DHCP

# compile options
#makeoptions    DEFGP="-G 14"

config          netbsd          root on ? type ?

# temporally power management
hpcapm0 at mainbus0                     # power management
apmdev0 at hpcapm0                      # APM

#
# System Internal Modules (TX391X specific)
#
tx3912video*    at txsim?
tx39ir*         at txcom1

#
# TX39 external modules. (Platform dependent)
#
options         USE_POLL        # keyboard / touchpanel device requires this

# IO module manager (virtual bridge) DO NOT DELETE
txioman* at txsim?
# iochip 0 TX39 internal MFIO
#        1 TX39 internal IO
#        2 BETTY IO
#       (3 ITE IO notyet)
# edge  0 no interrupt.
# edge  1 positive edge
# edge  2 negative edge
# edge  3 both edge
# initial ... set initial state (on/off)
hpcioman3 at txioman? platform COMPAQ_C_2010
hpcout* at hpcioman3 iochip 0 evtype POWER  id PWCTL_LED        port 3  initvalue 0
hpcin*  at hpcioman3 iochip 1 evtype BUTTON id BTN_REC          port 6  edge 1
hpcin*  at hpcioman3 iochip 1 evtype BUTTON id BTN_APP0         port 5  edge 1
hpcin*  at hpcioman3 iochip 0 evtype EVENT  id PME_AC           port 28 edge 1
hpcin*  at hpcioman3 iochip 0 evtype EVENT  id COM0_DCD         port 30 edge 3
hpcin*  at hpcioman3 iochip 0 evtype EVENT  id COM0_CTS         port 5  edge 3
hpcout* at hpcioman3 iochip 0 evtype SET    id COM0_DTR         port 31
hpcout* at hpcioman3 iochip 0 evtype SET    id COM0_RTS         port 6

hpcioman4 at txioman? platform COMPAQ_C_810
hpcout* at hpcioman4 iochip 0 evtype POWER  id PWCTL_LED        port 3  initvalue 0
hpcin*  at hpcioman4 iochip 1 evtype BUTTON id BTN_REC          port 6  edge 1
hpcin*  at hpcioman4 iochip 1 evtype BUTTON id BTN_APP0         port 5  edge 1
hpcin*  at hpcioman4 iochip 0 evtype EVENT  id PME_AC           port 28 edge 1
hpcin*  at hpcioman4 iochip 0 evtype EVENT  id COM0_DCD         port 30 edge 3
hpcin*  at hpcioman4 iochip 0 evtype EVENT  id COM0_CTS         port 5  edge 3
hpcout* at hpcioman4 iochip 0 evtype SET    id COM0_DTR         port 31
hpcout* at hpcioman4 iochip 0 evtype SET    id COM0_RTS         port 6
hpcout* at hpcioman4 iochip 2 evtype BUTTON id BTN_LIGHT        port 5

hpcioman5 at txioman? platform SHARP_MOBILON
hpcout* at hpcioman5 iochip 0 evtype POWER  id PWCTL_LCDLIGHT   port 14
hpcin*  at hpcioman5 iochip 1 evtype BUTTON id BTN_REC          port 0  edge 1
hpcin*  at hpcioman5 iochip 0 evtype BUTTON id BTN_APP0         port 31 edge 1
hpcin*  at hpcioman5 iochip 0 evtype BUTTON id BTN_COVER        port 29 edge 1
#hpcin* at hpcioman5 iochip 1 evtype EVENT  id COM0_CTS         port 4  edge 3 # DANGER
#hpcin* at hpcioman5 iochip 1 evtype EVENT  id COM0_DCD         port 6  edge 3 # DANGER
hpcout* at hpcioman5 iochip 1 evtype SET    id COM0_RTS         port 5
hpcout* at hpcioman5 iochip 0 evtype SET    id COM0_DTR         port 15

# Chip select manager
txcsbus3        at tx39biu? platform COMPAQ_C
txcsbus4        at tx39biu? platform PHILIPS_NINO
txcsbus5        at tx39biu? platform SHARP_MOBILON
txcsbus*        at tx39biu?     # misc unknown.

# PHILIPS 74ALVC*1624? / TOSHIBA TC5165BFTS buffer chip (keyboard)
tc5165buf*      at txcsbus3 iocs 3 iocsbase 0 iocssize 0x100 iocswidth 16
tc5165buf*      at txcsbus5 iocs 4 iocsbase 0 iocssize 0x100 iocswidth 16
hpckbd*         at tc5165buf?

# ITE IT8368E PCMCIA / TOSHIBA TC6345AF buffer chip (PCMCIA)
# card/insert   ... 3:2 (98)
# remove        ... 5:8 (168)
options         IT8368E_LEGACY_MODE     # Mobilon HC-4100 requires this
it8368e*        at txcsbus? regcs 2 regcsbase 0 regcssize 0x20 regcswidth 16 iocs 8 iocsbase 0 iocssize 0x4000000 iocswidth 16 irq1 98 irq2 168 irq3 98

# PHILIPS UCB1200 / TOSHIBA TC35413F (modem/audio analog front-end)
ucb*            at tx39sib? slot 0
ucbtp*          at ucb?
ucbsnd*         at ucb?
ucbio*          at ucb?

# WS console uses SUN or VT100 terminal emulation
hpcfb*          at tx3912video?
wsdisplay*      at hpcfb?
wskbd*          at hpckbd? mux 1
wsmouse*        at ucbtp? mux 0
btnmgr0         at mainbus0
wskbd*          at btnmgr0 mux 1

options         WSEMUL_VT100
options         WS_KERNEL_FG=WSCOL_BROWN
options         WS_KERNEL_BG=WSCOL_BLUE
options         WSDISPLAY_DEFAULTSCREENS=4
options         FONT_VT220L8x10
# compatibility to other console drivers
options         WSDISPLAY_COMPAT_PCVT           # emulate some ioctls
options         WSDISPLAY_COMPAT_SYSCONS        # emulate some ioctls
options         WSDISPLAY_COMPAT_USL            # wsconscfg VT handling
options         WSDISPLAY_COMPAT_RAWKBD         # can get raw scancodes

# PCMCIA bus support
pcmcia* at it8368e? controller ? socket ?

# PCMCIA IDE disk
wdc*    at pcmcia? function ?

# ATA (IDE) bus support
atabus* at ata?

# IDE drives
wd*     at atabus? drive ? flags 0x0000

# ATAPI bus support
atapibus* at atapi?

# ATAPI devices
# flags have the same meaning as for IDE drives.
cd*     at atapibus? drive ? flags 0x0000       # ATAPI CD-ROM drives
sd*     at atapibus? drive ? flags 0x0000       # ATAPI disk drives
#uk*    at atapibus? drive ? flags 0x0000       # ATAPI unknown

# PCMCIA network interfaces
#awi*   at pcmcia? function ?           # BayStack 650/660 (802.11FH/DS)
#cnw*   at pcmcia? function ?           # Xircom/Netwave AirSurfer
#ep*    at pcmcia? function ?           # 3Com 3c589 and 3c562 Ethernet
#mbe*   at pcmcia? function ?           # MB8696x based Ethernet
#ne*    at pcmcia? function ?           # NE2000-compatible Ethernet
#ray*   at pcmcia? function ?           # Raytheon Raylink (802.11)
#sm*    at pcmcia? function ?           # Megahertz Ethernet
#wi*    at pcmcia? function ?           # Lucent WaveLan IEEE (802.11)
#xe*    at pcmcia? function ?           # Xircom PCMCIA cards

#mhzc*  at pcmcia? function ?           # Megahertz Ethernet/Modem combo cards
#com*   at mhzc?
#sm*    at mhzc?

# PCMCIA serial interfaces
#com*   at pcmcia? function ?           # Modems and serial cards

#pcmcom*        at pcmcia? function ?           # PCMCIA multi-port serial cards
#com*   at pcmcom? slave ?              # ...and the slave devices

# PCMCIA SCSI interfaces
aic*    at pcmcia? function ?           # Adaptec APA-1460 SCSI
esp*    at pcmcia? function ?           # Qlogic ESP406/FAS408 SCSI

scsibus* at aic?
scsibus* at esp?

# 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
#ss*    at scsibus? target ? lun ?      # SCSI scanners
#uk*    at scsibus? target ? lun ?      # SCSI unknown

# disk/mass storage pseudo-devices
#pseudo-device  ccd                     # concatenated disks
#pseudo-device  raid                    # RAIDframe disk driver
#options        RAID_AUTOCONFIG         # auto-configuration of RAID components
#pseudo-device  fss                     # file system snapshot device
pseudo-device   md                      # memory disk
pseudo-device   vnd                     # disk-like interface to files

# network pseudo-devices
pseudo-device   bpfilter                # Berkeley packet filter
pseudo-device   npf                     # NPF packet filter
pseudo-device   loop                    # network loopback
pseudo-device   ppp                     # Point-to-Point Protocol

# mouse & keyboard multiplexor pseudo-devices
pseudo-device   wsmux

# a pseudo device needed for Coda       # also needs CODA (above)
#pseudo-device  vcoda                   # coda minicache <-> venus comm.

# miscellaneous pseudo-devices
pseudo-device   pty                     # pseudo-terminals
pseudo-device   clockctl                # user control of clock subsystem

# for IPv6
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