#
# chipKIT WF32 board with microSD card on Adafruit 2.8" TFT Touch Shield
#
# To build the kernel, use:
#   cd sys/pic32/wf32
#   kconfig Config
#   make clean
#   make
#
# Format of this file is described on page:
# http://retrobsd.org/wiki/doku.php/doc/kconfig
#
architecture    "pic32"
cpu             "PIC32MX7"                  # Processor variant
board           "WF32"                      # Board type
ldscript        "max32/bootloader.ld"       # Linker script

# Standard system options
options         "CPU_KHZ=80000"             # Oscillator frequency of CPU core
options         "BUS_KHZ=80000"             # Frequency of peripheral bus
options         "BUS_DIV=1"                 # Bus clock divisor 1/2/4/8

# LEDs
signal          "LED_KERNEL" pin RA0        # kernel activity indicator
signal          "LED_DISK"   pin RA1        # disk activity indicator

# Root filesystem at /dev/sd0a, swap at /dev/sd0b
config          unix    root on sd0a
                        swap on sd0b

# Serial UART ports
device          uart1                       # Serial-to-USB converter

# Console options
options         "CONS_MAJOR=UART_MAJOR"     # UART device
options         "CONS_MINOR=0"              # /dev/tty0

# SPI ports
controller      spi2                        # SD card

# microSD card
device          sd0     at spi2 pin RF1     # select pin RF1 (Digital #4)
options         "SD_MHZ=10"                 # speed 10 MHz

# General purpose I/O ports
# Flags define a mask of available pins
# The following pins excluded:
#   RF2, RF8                - uart1
#   RG6, RG7, RG8, RD4      - spi2, SD card
#   RA14, RB0, RB2, RB4,
#   RB8, RB10, RD0, RD1,
#   RD2, RD3, RE8, RE9, RF1 - LCD display
#
device          gpio0   flags 0x86ff    # port A
device          gpio1   flags 0xfaea    # port B
device          gpio2   flags 0xf01e    # port C
device          gpio3   flags 0xffe0    # port D
device          gpio4   flags 0x00ff    # port E
device          gpio5   flags 0x3039    # port F
device          gpio6   flags 0xf20f    # port G

# ADC driver
device          adc

# PWM driver
device          pwm

# TFT display driver with SPI interface.
# Supported controllers: ILI9341.
device          sgpanel at spi2
                        pins RD4,       # CS - Digital #10
                             RD3        # DC - Digital #9
