diff --git a/configs/mirtoo/Kconfig b/configs/mirtoo/Kconfig index fe15952f31..1ff7e4246b 100644 --- a/configs/mirtoo/Kconfig +++ b/configs/mirtoo/Kconfig @@ -10,4 +10,9 @@ config ARCH_LEDS ---help--- "Support control of board LEDs by NuttX to indicate system state" +config MIRTOO_RELEASE + int "Mirtoo Release 1 (R1)" + default 2 + ---help--- + Select the Mirtoo release number endif diff --git a/configs/mirtoo/README.txt b/configs/mirtoo/README.txt index e0b7dc3bc8..488884ba58 100644 --- a/configs/mirtoo/README.txt +++ b/configs/mirtoo/README.txt @@ -199,19 +199,19 @@ PIN PIC32 SIGNAL(s) BOARD SIGNAL/USAGE --- ------------------------------------------------ ---------------------------------- ---------------------------------- 29 VSS VSS Not available off module --- ------------------------------------------------ ---------------------------------- ---------------------------------- -30 OSC1/CLKI/RPA2/RA2 SO Not available off module +30 OSC1/CLKI/RPA2/RA2 SO (R1) DIN0 (R2) Not available off module OSC1 Oscillator crystal input Not available CLKI External clock source input Not available RPRA2 Peripheral Selection PORTA, Pin 2 Used for SO RA2 PORTA, Pin 2 Not available --- ------------------------------------------------ ---------------------------------- ---------------------------------- -31 OSC2/CLKO/RPA3/RA3 DIN0 PORT0, to X1, pin 2 +31 OSC2/CLKO/RPA3/RA3 DIN0 (R1) DIN3 (R2) PORT0, to X1, pin 2 OSC2 Oscillator crystal output Not available (also X13, pin1) CLKO Oscillator crystal output Not available RPA3 Peripheral Selection for PORTA, Pin 3 May be used for peripheral input RA3 PORTA, Pin 3 May be used for GPIO input --- ------------------------------------------------ ---------------------------------- ---------------------------------- -32 TDO/RPA8/PMA8/RA8 DIN3 PORT3, to X5, pin 2 +32 TDO/RPA8/PMA8/RA8 DIN3 (R1) S0 (R2) PORT3, to X5, pin 2 TDO JTAG test data output pin Not available (also X13, pin7) RPA8 PORTA, Pin 8 May be used for peripheral input PMA8 Parallel Master Port Address bit 8 Not available diff --git a/configs/mirtoo/src/up_spi2.c b/configs/mirtoo/src/up_spi2.c index 3b43497d7d..0565707106 100644 --- a/configs/mirtoo/src/up_spi2.c +++ b/configs/mirtoo/src/up_spi2.c @@ -74,7 +74,8 @@ * PIN SIGNAL BOARD CONNECTION NOTES * ------ -------- ------------------------- -------------------------------- * RPA1 SI PGA117 and SST25VF032B SPI2 data OUT (SDO2) - * RPA2 SO PGA117 and SST25VF032B SPI2 data IN (SDI2) + * RPA2 SO PGA117 and SST25VF032B R1, SPI2 data IN (SDI2) + * RPA3 SO PGA117 and SST25VF032B R0, SPI2 data IN (SDI2) * SCK2 SCK PGA117 and SST25VF032B SPI2 clock * * RB7 ~CSAI PGA117 PGA117 chip select (active low) @@ -82,8 +83,12 @@ */ #define GPIO_SI (GPIO_OUTPUT|GPIO_PORTA|GPIO_PIN1) -#define GPIO_SO (GPIO_INPUT|GPIO_PORTA|GPIO_PIN1) -#define GPIO_SCK (GPIO_OUTPUT|GPIO_PORTA|GPIO_PIN1) +#ifdef CONFIG_MIRTOO_RELEASE == 1 +# define GPIO_SO (GPIO_INPUT|GPIO_PORTA|GPIO_PIN2) +#else +# define GPIO_SO (GPIO_INPUT|GPIO_PORTA|GPIO_PIN3) +#endif +#define GPIO_SCK (GPIO_OUTPUT|GPIO_PORTB|GPIO_PIN15) #define GPIO_PGA117_CS (GPIO_OUTPUT|GPIO_VALUE_ONE|GPIO_PORTB|GPIO_PIN7) #define GPIO_SST25VF032B_CS (GPIO_OUTPUT|GPIO_VALUE_ONE|GPIO_PORTB|GPIO_PIN13)