Skip to content

Commit

Permalink
Further work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
mubes committed Feb 20, 2020
1 parent f305a3f commit 62cebf5
Show file tree
Hide file tree
Showing 9 changed files with 292 additions and 87 deletions.
77 changes: 74 additions & 3 deletions hw/bsp/mimxrt1010_evk/board_config.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
#ifndef _BOARD_CONFIG_H_
#define _BOARD_CONFIG_H_

#define VENDOR_NAME "NXP"
// ===============================================================================
//
// TinyUF2 Configuration for NXP MIMXRT1010-EVK
//
// ===============================================================================

// Basic Data
// ==========

#define VENDOR_NAME "NXP"
#define PRODUCT_NAME "MIMXRT1010-EVK"
#define VOLUME_LABEL "UF2BOOT"
#define INDEX_URL ""
#define BOARD_ID "MIMXRT1010-EVK"
#define INDEX_URL ""
#define BOARD_ID "MIMXRT1010-EVK"

// Set VID & PID for board in bootloader mode
#define USB_VID 0x239A
#define USB_PID 0x0077

Expand All @@ -17,4 +27,65 @@
//#define BOARD_FLASH_SIZE 0x1000000
#define BOARD_FLASH_SIZE 0x800000


// TinyUF2 Behaviour
// =================

// How long to wait for tap in mS
#define BOARD_TAP_WAIT 500

// Define this for a different blinking interval in mS
#define BOARD_BLINK_INERVAL 100

// If you want multiple taps (i.e. more than two) define this to the correct value
#define BOARD_MULTITAP_COUNT 4

// If you want the LED on while in UF2 boot wait mode
#define BOARD_LED_ON_UF2_START


// Board Pinning Data
// ==================

// LED used for status indication
#define PIN_LED IOMUXC_GPIO_11_GPIOMUX_IO11
#define PIN_LED_MUX 0U
#define PIN_LED_CFG 0x10B0U
#define LED_GPIO_PORT GPIO1
#define LED_GPIO_PIN 11
#define LED_STATE_ON 0

// UART
#define UART_PORT LPUART1
#define PIN_UART_RX IOMUXC_GPIO_09_LPUART1_RXD
#define PIN_UART_RX_MUX 0U
#define PIN_UART_RX_CFG 0x10B0u
#define PIN_UART_TX IOMUXC_GPIO_10_LPUART1_TXD
#define PIN_UART_TX_MUX 0U
#define PIN_UART_TX_CFG 0x10B0u

// Connection to QSPI
#define PIN_SS0 IOMUXC_GPIO_SD_06_FLEXSPI_A_SS0_B
#define PIN_SS0_MUX 1U
#define PIN_SS0_CFG 0x10E1U
#define PIN_DATA1 IOMUXC_GPIO_SD_07_FLEXSPI_A_DATA1
#define PIN_DATA1_MUX 1U
#define PIN_DATA1_CFG 0x10E1U
#define PIN_DATA2 IOMUXC_GPIO_SD_08_FLEXSPI_A_DATA2
#define PIN_DATA2_MUX 1U
#define PIN_DATA2_CFG 0x10E1U
#define PIN_DATA0 IOMUXC_GPIO_SD_09_FLEXSPI_A_DATA0
#define PIN_DATA0_MUX 1U
#define PIN_DATA0_CFG 0x10E1U
#define PIN_SCLK IOMUXC_GPIO_SD_10_FLEXSPI_A_SCLK
#define PIN_SCLK_MUX 1U
#define PIN_SCLK_CFG 0x10E1U
#define PIN_DATA3 IOMUXC_GPIO_SD_11_FLEXSPI_A_DATA3
#define PIN_DATA3_MUX 1U
#define PIN_DATA3_CFG 0x10E1U
#define PIN_DQS IOMUXC_GPIO_SD_12_FLEXSPI_A_DQS
#define PIN_DQS_MUX 1U
#define PIN_DQS_CFG 0x10E1U


#endif
116 changes: 72 additions & 44 deletions hw/bsp/mimxrt1020_evk/board_config.h
Original file line number Diff line number Diff line change
@@ -1,55 +1,83 @@
#ifndef _BOARD_CONFIG_H_
#define _BOARD_CONFIG_H_

#define VENDOR_NAME "NXP"
#define PRODUCT_NAME "MIMXRT1020-EVK"
#define CHIP_MIMXRT1020
#define VOLUME_LABEL "UF2BOOT"
#define INDEX_URL ""
#define BOARD_ID "MIMXRT1020-EVK"
// ===============================================================================
//
// TinyUF2 Configuration for NXP MIMXRT1020-EVK
//
// ===============================================================================

// Basic Data
// ==========
#define VENDOR_NAME "NXP"
#define PRODUCT_NAME "MIMXRT1020-EVK"
#define VOLUME_LABEL "UF2BOOT"
#define INDEX_URL ""
#define BOARD_ID "MIMXRT1020-EVK"
#define BOARD_FLASH_SIZE 0x800000

// Set VID & PID for board in bootloader mode
#define USB_VID 0x239A
#define USB_PID 0x0077

#define LED_PINMUX IOMUXC_GPIO_AD_B0_05_GPIO1_IO05
#define LED_PORT GPIO1
#define LED_PIN 05
#define LED_STATE_ON 0

// TinyUF2 Behaviour
// =================
// How long to wait for tap in mS
#define BOARD_TAP_WAIT 500

// Define this for a different blinking interval in mS
#define BOARD_BLINK_INTERVAL 100

// If you want multiple taps (i.e. more than two) define this to the correct value
#define BOARD_MULTITAP_COUNT 4

// If you want the LED on while in UF2 boot wait mode
#define BOARD_LED_ON_UF2_START


// Board Pinning Data
// ==================

// LED used for status indication
#define PIN_LED IOMUXC_GPIO_AD_B0_05_GPIO1_IO05
#define PIN_LED_MUX 0U
#define PIN_LED_CFG 0x10B0U
#define LED_GPIO_PORT GPIO1
#define LED_GPIO_PIN 05
#define LED_STATE_ON 0

// UART
#define UART_PORT LPUART1
#define UART_RX_PINMUX IOMUXC_GPIO_AD_B0_07_LPUART1_RX
#define UART_TX_PINMUX IOMUXC_GPIO_AD_B0_06_LPUART1_TX

#define PIN_SS0 IOMUXC_GPIO_SD_B1_11_FLEXSPI_A_SS0_B
#define PIN_DATA1 IOMUXC_GPIO_SD_B1_10_FLEXSPI_A_DATA01
#define PIN_DATA2 IOMUXC_GPIO_SD_B1_09_FLEXSPI_A_DATA02
#define PIN_DATA0 IOMUXC_GPIO_SD_B1_08_FLEXSPI_A_DATA00
#define PIN_SCLK IOMUXC_GPIO_SD_B1_07_FLEXSPI_A_SCLK
#define PIN_DATA3 IOMUXC_GPIO_SD_B1_06_FLEXSPI_A_DATA03
#define PIN_DQS IOMUXC_GPIO_SD_B1_05_FLEXSPI_A_DQS

#define PIN_MUX_SS0 1U
#define PIN_MUX_DATA1 1U
#define PIN_MUX_DATA2 1U
#define PIN_MUX_DATA0 1U
#define PIN_MUX_SCLK 1U
#define PIN_MUX_DATA3 1U
#define PIN_MUX_DQS 1U

#define PIN_CFG_SS0 0x10E1U
#define PIN_CFG_DATA1 0x10E1U
#define PIN_CFG_DATA2 0x10E1U
#define PIN_CFG_DATA0 0x10E1U
#define PIN_CFG_SCLK 0x10E1U
#define PIN_CFG_DATA3 0x10E1U
#define PIN_CFG_DQS 0x10E1U

// The EVK uses 16MB Flash but that would force the MSC
// drive to be larger than 65535 sectors and requires
// additional modifications to the code, we'll take care
// of that in the future. For now 8MB works.
//#define BOARD_FLASH_SIZE 0x1000000
#define BOARD_FLASH_SIZE 0x800000
#define UART_PORT LPUART1
#define PIN_UART_RX IOMUXC_GPIO_AD_B0_07_LPUART1_RX
#define PIN_UART_RX_MUX 0U
#define PIN_UART_RX_CFG 0x10B0u
#define PIN_UART_TX IOMUXC_GPIO_AD_B0_06_LPUART1_TX
#define PIN_UART_TX_MUX 0U
#define PIN_UART_TX_CFG 0x10B0u

// Connection to QSPI
#define PIN_SS0 IOMUXC_GPIO_SD_B1_11_FLEXSPI_A_SS0_B
#define PIN_SS0_MUX 1U
#define PIN_SS0_CFG 0x10E1U
#define PIN_DATA1 IOMUXC_GPIO_SD_B1_10_FLEXSPI_A_DATA01
#define PIN_DATA1_MUX 1U
#define PIN_DATA1_CFG 0x10E1U
#define PIN_DATA2 IOMUXC_GPIO_SD_B1_09_FLEXSPI_A_DATA02
#define PIN_DATA2_MUX 1U
#define PIN_DATA2_CFG 0x10E1U
#define PIN_DATA0 IOMUXC_GPIO_SD_B1_08_FLEXSPI_A_DATA00
#define PIN_DATA0_MUX 1U
#define PIN_DATA0_CFG 0x10E1U
#define PIN_SCLK IOMUXC_GPIO_SD_B1_07_FLEXSPI_A_SCLK
#define PIN_SCLK_MUX 1U
#define PIN_SCLK_CFG 0x10E1U
#define PIN_DATA3 IOMUXC_GPIO_SD_B1_06_FLEXSPI_A_DATA03
#define PIN_DATA3_MUX 1U
#define PIN_DATA3_CFG 0x10E1U
#define PIN_DQS IOMUXC_GPIO_SD_B1_05_FLEXSPI_A_DQS
#define PIN_DQS_MUX 1U
#define PIN_DQS_CFG 0x10E1U


#endif
2 changes: 2 additions & 0 deletions hw/bsp/versiboard2/board.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CHIP_FAMILY = mimxrt10xx
CHIP_VARIANT = MIMXRT1021DAG5A
80 changes: 80 additions & 0 deletions hw/bsp/versiboard2/board_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#ifndef _BOARD_CONFIG_H_
#define _BOARD_CONFIG_H_

// ===============================================================================
//
// TinyUF2 Configuration for Versiboard2
//
// ===============================================================================

// Basic Data
// ==========
#define VENDOR_NAME "Orbcode"
#define PRODUCT_NAME "Versiboard2"
#define VOLUME_LABEL "VB2-BOOT"
#define INDEX_URL ""
#define BOARD_ID "Versiboard2"
#define BOARD_FLASH_SIZE 0x800000

// Set VID & PID for board in bootloader mode
#define USB_VID 0x239A
#define USB_PID 0x0077


// TinyUF2 Behaviour
// =================
// How long to wait for tap in mS
#define BOARD_TAP_WAIT 500

// Define this for a different blinking interval in mS
#define BOARD_BLINK_INTERVAL 100

// If you want multiple taps (i.e. more than two) define this to the correct value
#define BOARD_MULTITAP_COUNT 4

// If you want the LED on while in UF2 boot wait mode
#define BOARD_LED_ON_UF2_START


// Board Pinning Data
// ==================

// LED used for status indication
#define PIN_LED IOMUXC_GPIO_EMC_04_GPIO2_IO04
#define PIN_LED_MUX 5U
#define PIN_LED_CFG 0x10B0U
#define LED_GPIO_PORT GPIO2
#define LED_GPIO_PIN 04
#define LED_STATE_ON 1

// UART
#define UART_PORT LPUART1
#define PIN_UART_RX IOMUXC_GPIO_AD_B0_07_LPUART1_RX
#define PIN_UART_RX_MUX 2U
#define PIN_UART_RX_CFG 0x10B0u
#define PIN_UART_TX IOMUXC_GPIO_AD_B0_06_LPUART1_TX
#define PIN_UART_TX_MUX 2U
#define PIN_UART_TX_CFG 0x10B0u

// Connection to QSPI
#define PIN_SS0 IOMUXC_GPIO_AD_B1_05_FLEXSPI_A_SS0_B
#define PIN_SS0_MUX 1U
#define PIN_SS0_CFG 0x10E1U
#define PIN_DATA1 IOMUXC_GPIO_AD_B1_04_FLEXSPI_A_DATA01
#define PIN_DATA1_MUX 1U
#define PIN_DATA1_CFG 0x10E1U
#define PIN_DATA2 IOMUXC_GPIO_AD_B1_03_FLEXSPI_A_DATA02
#define PIN_DATA2_MUX 1U
#define PIN_DATA2_CFG 0x10E1U
#define PIN_DATA0 IOMUXC_GPIO_AD_B1_02_FLEXSPI_A_DATA00
#define PIN_DATA0_MUX 1U
#define PIN_DATA0_CFG 0x10E1U
#define PIN_SCLK IOMUXC_GPIO_AD_B1_01_FLEXSPI_A_SCLK
#define PIN_SCLK_MUX 1U
#define PIN_SCLK_CFG 0x10E1U
#define PIN_DATA3 IOMUXC_GPIO_AD_B1_00_FLEXSPI_A_DATA03
#define PIN_DATA3_MUX 1U
#define PIN_DATA3_CFG 0x10E1U
// (No DQS on this board)

#endif
Loading

0 comments on commit 62cebf5

Please sign in to comment.