summaryrefslogtreecommitdiffstats
path: root/board/atmel
diff options
context:
space:
mode:
authorLudovic Desroches <ludovic.desroches@microchip.com>2018-04-24 10:16:01 +0300
committerTom Rini <trini@konsulko.com>2018-05-08 09:07:36 -0400
commit8ee54672df3d569e3e916b5fa270fab62df36cc4 (patch)
tree81883147c1581124c4e2b0129e79512aeb6b771d /board/atmel
parent9ab66d0d207451a834a7995a45c018a6395fc160 (diff)
downloadu-boot-8ee54672df3d569e3e916b5fa270fab62df36cc4.tar.gz
u-boot-8ee54672df3d569e3e916b5fa270fab62df36cc4.tar.xz
u-boot-8ee54672df3d569e3e916b5fa270fab62df36cc4.zip
gpio: atmel_pio4: give a full configuration when muxing pins
When a pin is muxed to a peripheral or as a GPIO, the only configuration that can be set is the pullup. It is too restrictive so this patch allows to give a full configuration. Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Diffstat (limited to 'board/atmel')
-rw-r--r--board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c2
-rw-r--r--board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c12
-rw-r--r--board/atmel/sama5d2_xplained/sama5d2_xplained.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
index d805068ac9..3c97315015 100644
--- a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
+++ b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
@@ -35,7 +35,7 @@ int board_late_init(void)
#ifdef CONFIG_DEBUG_UART_BOARD_INIT
static void board_uart1_hw_init(void)
{
- atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, 1); /* URXD1 */
+ atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, ATMEL_PIO_PUEN_MASK); /* URXD1 */
atmel_pio4_set_a_periph(AT91_PIO_PORTD, 3, 0); /* UTXD1 */
at91_periph_clk_enable(ATMEL_ID_UART1);
diff --git a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c
index 5e8e650cd9..206e858b32 100644
--- a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c
+++ b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c
@@ -58,22 +58,22 @@ static void board_nand_hw_init(void)
atmel_pio4_set_b_periph(AT91_PIO_PORTA, 29, ATMEL_PIO_DRVSTR_ME); /* D7 */
atmel_pio4_set_b_periph(AT91_PIO_PORTB, 2, 0); /* RE */
atmel_pio4_set_b_periph(AT91_PIO_PORTA, 30, 0); /* WE */
- atmel_pio4_set_b_periph(AT91_PIO_PORTA, 31, 1); /* NCS */
- atmel_pio4_set_b_periph(AT91_PIO_PORTC, 8, 1); /* RDY */
- atmel_pio4_set_b_periph(AT91_PIO_PORTB, 0, 1); /* ALE */
- atmel_pio4_set_b_periph(AT91_PIO_PORTB, 1, 1); /* CLE */
+ atmel_pio4_set_b_periph(AT91_PIO_PORTA, 31, ATMEL_PIO_PUEN_MASK); /* NCS */
+ atmel_pio4_set_b_periph(AT91_PIO_PORTC, 8, ATMEL_PIO_PUEN_MASK); /* RDY */
+ atmel_pio4_set_b_periph(AT91_PIO_PORTB, 0, ATMEL_PIO_PUEN_MASK); /* ALE */
+ atmel_pio4_set_b_periph(AT91_PIO_PORTB, 1, ATMEL_PIO_PUEN_MASK); /* CLE */
}
#endif
static void board_usb_hw_init(void)
{
- atmel_pio4_set_pio_output(AT91_PIO_PORTB, 12, 1);
+ atmel_pio4_set_pio_output(AT91_PIO_PORTB, 12, ATMEL_PIO_PUEN_MASK);
}
#ifdef CONFIG_DEBUG_UART_BOARD_INIT
static void board_uart0_hw_init(void)
{
- atmel_pio4_set_c_periph(AT91_PIO_PORTB, 26, 1); /* URXD0 */
+ atmel_pio4_set_c_periph(AT91_PIO_PORTB, 26, ATMEL_PIO_PUEN_MASK); /* URXD0 */
atmel_pio4_set_c_periph(AT91_PIO_PORTB, 27, 0); /* UTXD0 */
at91_periph_clk_enable(ATMEL_ID_UART0);
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
index 0ae2e2fec6..592b4d82dd 100644
--- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c
+++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
@@ -35,7 +35,7 @@ int board_late_init(void)
#ifdef CONFIG_DEBUG_UART_BOARD_INIT
static void board_uart1_hw_init(void)
{
- atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, 1); /* URXD1 */
+ atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, ATMEL_PIO_PUEN_MASK); /* URXD1 */
atmel_pio4_set_a_periph(AT91_PIO_PORTD, 3, 0); /* UTXD1 */
at91_periph_clk_enable(ATMEL_ID_UART1);