#
# chipKIT WF32 board with microSD card on 2.4" LCD TFT display 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 RD4     # select pin RD4
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 8-bit parallel interface.
# Supported controllers: ST7781, ILI9341, NT35702
device          gpanel
signal          "LCD_RST"   pin RB10    # arduino A4
signal          "LCD_CS"    pin RB0     # arduino A3
signal          "LCD_RS"    pin RB8     # arduino A2
signal          "LCD_WR"    pin RB4     # arduino A1
signal          "LCD_RD"    pin RB2     # arduino A0
signal          "LCD_D2"    pin RE8     # arduino D2
signal          "LCD_D3"    pin RD0     # arduino D3
signal          "LCD_D4"    pin RF1     # arduino D4
signal          "LCD_D5"    pin RD1     # arduino D5
signal          "LCD_D6"    pin RD2     # arduino D6
signal          "LCD_D7"    pin RE9     # arduino D7
signal          "LCD_D0"    pin RA14    # arduino D8
signal          "LCD_D1"    pin RD3     # arduino D9
