static void configPIO(void) { /* Setup PIOs for ASC device */ #if CFG_STM_ASC_BASE == ST40_ASC3_REGS_BASE /* * Route UART3 via PIO24/25 for TX, RX, RTS & CTS (Alternative #1). * * Note: on the MB903A, RS232_RTS is connected (incorrectly) * to PIO24[6], this is corrected in MB903B. */ PIOALT(24, 4, 1, &stx7108_pioalt_pad_out); /* UART3-TX */ PIOALT(24, 5, 1, &stx7108_pioalt_pad_in); /* UART3-RX */ PIOALT(24, 7, 1, &stx7108_pioalt_pad_out); /* UART3-RTS */ PIOALT(25, 0, 1, &stx7108_pioalt_pad_in); /* UART3-CTS */ #else #error Unknown ASC port selected! #endif /* CFG_STM_ASC_BASE == ST40_ASCx_REGS_BASE */ #ifdef CONFIG_DRIVER_NET_STM_GMAC /* * Configure the Ethernet PHY Reset signal * PIO20[0] == GMII0_notRESET * PIO15[4] == GMII1_notRESET */ SET_PIO_PIN(ST40_PIO_BASE(15), 4, STPIO_OUT); #endif /* CONFIG_DRIVER_NET_STM_GMAC */ }
static void configPIO(void) { /* Setup PIOs for ASC device */ #if CONFIG_SYS_STM_ASC_BASE == STXH205_ASC1_BASE /* Route UART #1 via PIO11 for TX & RX (JK1, 4-pin header) */ PIOALT(11, 0, 3, stm_pad_direction_output); /* UART1-TX */ PIOALT(11, 1, 3, stm_pad_direction_input); /* UART1-RX */ // PIOALT(11, 2, 3, stm_pad_direction_output); /* UART1-RTS */ // PIOALT(11, 4, 3, stm_pad_direction_input); /* UART1-CTS */ #elif CONFIG_SYS_STM_ASC_BASE == STXH205_ASC10_BASE /* Route UART #10 via PIO3 for TX & RX (JM5, DB9) */ PIOALT(3, 5, 2, stm_pad_direction_output); /* UART10-TX */ PIOALT(3, 6, 2, stm_pad_direction_input); /* UART10-RX */ // PIOALT(3, 4, 2, stm_pad_direction_output); /* UART10-RTS */ // PIOALT(3, 7, 2, stm_pad_direction_input); /* UART10-CTS */ #else #error Unknown ASC port selected! #endif /* CONFIG_SYS_STM_ASC_BASE == STXH205_ASCx_BASE */ #ifdef CONFIG_DRIVER_NET_STM_GMAC /* * Configure the Ethernet PHY Reset signal */ SET_PIO_PIN2(POWER_ON_ETH, STPIO_OUT); #endif /* CONFIG_DRIVER_NET_STM_GMAC */ #if defined(CONFIG_CMD_NAND) /* * Configure FLASH_WP# (Active-Low, FLASH Write-Protect) */ SET_PIO_PIN2(FLASH_notWP, STPIO_OUT); #endif /* CONFIG_CMD_NAND */ }
static void configPIO(void) { /* Setup PIOs for ASC device */ #if CONFIG_SYS_STM_ASC_BASE == ST40_ASC2_REGS_BASE /* Route UART2 via PIO14 for TX, RX, CTS & RTS (Alternative #1) */ PIOALT(14, 4, 1, stm_pad_direction_output); /* UART2-TX */ PIOALT(14, 5, 1, stm_pad_direction_input); /* UART2-RX */ PIOALT(14, 6, 1, stm_pad_direction_output); /* UART2-RTS */ PIOALT(14, 7, 1, stm_pad_direction_input); /* UART2-CTS */ #elif CONFIG_SYS_STM_ASC_BASE == ST40_ASC3_REGS_BASE /* Route UART3 via PIO21 for TX, RX, CTS & RTS (Alternative #2) */ PIOALT(21, 0, 2, stm_pad_direction_output); /* UART3-TX */ PIOALT(21, 1, 2, stm_pad_direction_input); /* UART3-RX */ PIOALT(21, 3, 2, stm_pad_direction_output); /* UART3-RTS */ PIOALT(21, 4, 2, stm_pad_direction_input); /* UART3-CTS */ #else #error Unknown ASC port selected! #endif /* CONFIG_SYS_STM_ASC_BASE == ST40_ASCx_REGS_BASE */ }
static void configPIO(void) { /* Setup PIOs for ASC device */ #if CONFIG_SYS_STM_ASC_BASE == ST40_ASC1_REGS_BASE /* Route UART1 via PIO5 for TX, RX, CTS & RTS (Alternative #1) */ PIOALT(5, 1, 1, stm_pad_direction_output); /* UART1-TX */ PIOALT(5, 2, 1, stm_pad_direction_input); /* UART1-RX */ PIOALT(5, 4, 1, stm_pad_direction_output); /* UART1-RTS */ PIOALT(5, 3, 1, stm_pad_direction_input); /* UART1-CTS */ #elif CONFIG_SYS_STM_ASC_BASE == ST40_ASC3_REGS_BASE /* Route UART3 via PIO24/25 for TX, RX (Alternative #1) */ PIOALT(24, 4, 1, stm_pad_direction_output); /* UART3-TX */ PIOALT(24, 5, 1, stm_pad_direction_input); /* UART3-RX */ // PIOALT(24, 7, 1, stm_pad_direction_output); /* UART3-RTS */ // PIOALT(25, 0, 1, stm_pad_direction_input); /* UART3-CTS */ #else #error Unknown ASC port selected! #endif /* CONFIG_SYS_STM_ASC_BASE == ST40_ASCx_REGS_BASE */ #ifdef CONFIG_DRIVER_NET_STM_GMAC /* * Configure the Ethernet PHY Reset signal * PIO15[4] == POWER_ON_ETH (a.k.a. ETH_RESET) */ SET_PIO_PIN(ST40_PIO_BASE(15), 4, STPIO_OUT); #endif /* CONFIG_DRIVER_NET_STM_GMAC */ /* * Some of the peripherals are powered by regulators * controlled by the following PIO line... * PIO5[0] == POWER_ON */ SET_PIO_PIN(ST40_PIO_BASE(5), 0, STPIO_OUT); STPIO_SET_PIN(ST40_PIO_BASE(5), 0, 1); }