Revert "stm32: Change USART port to USART6 for stm32f746 discovery board"
[platform/kernel/u-boot.git] / board / st / stm32f746-disco / stm32f746-disco.c
index 47aa058..404fdfa 100644 (file)
@@ -32,7 +32,7 @@ const struct stm32_gpio_ctl gpio_ctl_usart = {
        .otype = STM32_GPIO_OTYPE_PP,
        .speed = STM32_GPIO_SPEED_50M,
        .pupd = STM32_GPIO_PUPD_UP,
-       .af = STM32_GPIO_AF8
+       .af = STM32_GPIO_AF7
 };
 
 const struct stm32_gpio_ctl gpio_ctl_fmc = {
@@ -251,8 +251,8 @@ int dram_init(void)
 }
 
 static const struct stm32_gpio_dsc usart_gpio[] = {
-       {STM32_GPIO_PORT_C, STM32_GPIO_PIN_6},  /* TX */
-       {STM32_GPIO_PORT_C, STM32_GPIO_PIN_7},  /* RX */
+       {STM32_GPIO_PORT_A, STM32_GPIO_PIN_9},  /* TX */
+       {STM32_GPIO_PORT_B, STM32_GPIO_PIN_7},  /* RX */
 };
 
 int uart_setup_gpio(void)
@@ -260,7 +260,8 @@ int uart_setup_gpio(void)
        int i;
        int rv = 0;
 
-       clock_setup(GPIO_C_CLOCK_CFG);
+       clock_setup(GPIO_A_CLOCK_CFG);
+       clock_setup(GPIO_B_CLOCK_CFG);
        for (i = 0; i < ARRAY_SIZE(usart_gpio); i++) {
                rv = stm32_gpio_config(&usart_gpio[i], &gpio_ctl_usart);
                if (rv)
@@ -272,7 +273,7 @@ out:
 }
 
 static const struct stm32x7_serial_platdata serial_platdata = {
-       .base = (struct stm32_usart *)USART6_BASE,
+       .base = (struct stm32_usart *)USART1_BASE,
        .clock = CONFIG_SYS_CLK_FREQ,
 };
 
@@ -291,7 +292,7 @@ int board_early_init_f(void)
        int res;
 
        res = uart_setup_gpio();
-       clock_setup(USART6_CLOCK_CFG);
+       clock_setup(USART1_CLOCK_CFG);
        if (res)
                return res;