void sama5d4_xplained_mci1_hw_init(void) { at91_set_c_periph(AT91_PIO_PORTE, 19, 1); /* MCI1 CDA */ at91_set_c_periph(AT91_PIO_PORTE, 20, 1); /* MCI1 DA0 */ at91_set_c_periph(AT91_PIO_PORTE, 21, 1); /* MCI1 DA1 */ at91_set_c_periph(AT91_PIO_PORTE, 22, 1); /* MCI1 DA2 */ at91_set_c_periph(AT91_PIO_PORTE, 23, 1); /* MCI1 DA3 */ at91_set_c_periph(AT91_PIO_PORTE, 18, 0); /* MCI1 CLK */ /* * As the mci io internal pull down is too strong, so if the io needs * external pull up, the pull up resistor will be very small, if so * the power consumption will increase, so disable the interanl pull * down to save the power. */ at91_set_pio_pulldown(AT91_PIO_PORTE, 18, 0); at91_set_pio_pulldown(AT91_PIO_PORTE, 19, 0); at91_set_pio_pulldown(AT91_PIO_PORTE, 20, 0); at91_set_pio_pulldown(AT91_PIO_PORTE, 21, 0); at91_set_pio_pulldown(AT91_PIO_PORTE, 22, 0); at91_set_pio_pulldown(AT91_PIO_PORTE, 23, 0); /* Enable clock */ at91_periph_clk_enable(ATMEL_ID_MCI1); }
static void sama5d3xek_lcd_hw_init(void) { gd->fb_base = CONFIG_SAMA5D3_LCD_BASE; /* The higher 8 bit of LCD is board related */ at91_set_c_periph(AT91_PIO_PORTC, 14, 0); /* LCDD16 */ at91_set_c_periph(AT91_PIO_PORTC, 13, 0); /* LCDD17 */ at91_set_c_periph(AT91_PIO_PORTC, 12, 0); /* LCDD18 */ at91_set_c_periph(AT91_PIO_PORTC, 11, 0); /* LCDD19 */ at91_set_c_periph(AT91_PIO_PORTC, 10, 0); /* LCDD20 */ at91_set_c_periph(AT91_PIO_PORTC, 15, 0); /* LCDD21 */ at91_set_c_periph(AT91_PIO_PORTE, 27, 0); /* LCDD22 */ at91_set_c_periph(AT91_PIO_PORTE, 28, 0); /* LCDD23 */ /* Configure lower 16 bit of LCD and enable clock */ at91_lcd_hw_init(); }
void at91_lcd_hw_init(void) { at91_set_a_periph(AT91_PIO_PORTA, 24, 0); /* LCDPWM */ at91_set_a_periph(AT91_PIO_PORTA, 25, 0); /* LCDDISP */ at91_set_a_periph(AT91_PIO_PORTA, 26, 0); /* LCDVSYNC */ at91_set_a_periph(AT91_PIO_PORTA, 27, 0); /* LCDHSYNC */ at91_set_a_periph(AT91_PIO_PORTA, 28, 0); /* LCDDOTCK */ at91_set_a_periph(AT91_PIO_PORTA, 29, 0); /* LCDDEN */ at91_set_a_periph(AT91_PIO_PORTA, 0, 0); /* LCDD0 */ at91_set_a_periph(AT91_PIO_PORTA, 1, 0); /* LCDD1 */ at91_set_a_periph(AT91_PIO_PORTA, 2, 0); /* LCDD2 */ at91_set_a_periph(AT91_PIO_PORTA, 3, 0); /* LCDD3 */ at91_set_a_periph(AT91_PIO_PORTA, 4, 0); /* LCDD4 */ at91_set_a_periph(AT91_PIO_PORTA, 5, 0); /* LCDD5 */ at91_set_a_periph(AT91_PIO_PORTA, 6, 0); /* LCDD6 */ at91_set_a_periph(AT91_PIO_PORTA, 7, 0); /* LCDD7 */ at91_set_a_periph(AT91_PIO_PORTA, 8, 0); /* LCDD8 */ at91_set_a_periph(AT91_PIO_PORTA, 9, 0); /* LCDD9 */ at91_set_a_periph(AT91_PIO_PORTA, 10, 0); /* LCDD10 */ at91_set_a_periph(AT91_PIO_PORTA, 11, 0); /* LCDD11 */ at91_set_a_periph(AT91_PIO_PORTA, 12, 0); /* LCDD12 */ at91_set_a_periph(AT91_PIO_PORTA, 13, 0); /* LCDD13 */ at91_set_a_periph(AT91_PIO_PORTA, 14, 0); /* LCDD14 */ at91_set_a_periph(AT91_PIO_PORTA, 15, 0); /* LCDD15 */ at91_set_c_periph(AT91_PIO_PORTC, 14, 0); /* LCDD16 */ at91_set_c_periph(AT91_PIO_PORTC, 13, 0); /* LCDD17 */ at91_set_c_periph(AT91_PIO_PORTC, 12, 0); /* LCDD18 */ at91_set_c_periph(AT91_PIO_PORTC, 11, 0); /* LCDD19 */ at91_set_c_periph(AT91_PIO_PORTC, 10, 0); /* LCDD20 */ at91_set_c_periph(AT91_PIO_PORTC, 15, 0); /* LCDD21 */ at91_set_c_periph(AT91_PIO_PORTE, 27, 0); /* LCDD22 */ at91_set_c_periph(AT91_PIO_PORTE, 28, 0); /* LCDD23 */ /* Enable clock */ at91_periph_clk_enable(ATMEL_ID_LCDC); }