Linux Audio
Check our new training course
Embedded Linux Audio
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
/* * Copyright (c) 2018, NXP * * SPDX-License-Identifier: Apache-2.0 */ #include <init.h> #include "device_imx.h" static int udoo_neo_full_m4_init(struct device *dev) { ARG_UNUSED(dev); #ifdef CONFIG_GPIO_IMX_PORT_4 /* GPIO4_IO06 pin mux configuration (red LED) */ IOMUXC_SW_MUX_CTL_PAD_NAND_DATA02 = IOMUXC_SW_MUX_CTL_PAD_NAND_DATA02_MUX_MODE(5); IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02 = IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_PUE_MASK | IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_PKE_MASK | IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_SPEED(2) | IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_DSE(6); #endif /* CONFIG_GPIO_IMX_PORT_4 */ #ifdef CONFIG_UART_IMX_UART_5 /* UART5 pin mux configuration */ IOMUXC_SW_MUX_CTL_PAD_SD4_DATA4 = IOMUXC_SW_MUX_CTL_PAD_SD4_DATA4_MUX_MODE(2); IOMUXC_SW_MUX_CTL_PAD_SD4_DATA5 = IOMUXC_SW_MUX_CTL_PAD_SD4_DATA5_MUX_MODE(2); IOMUXC_SW_PAD_CTL_PAD_SD4_DATA4 = IOMUXC_SW_PAD_CTL_PAD_SD4_DATA4_PKE_MASK | IOMUXC_SW_PAD_CTL_PAD_SD4_DATA4_PUE_MASK | IOMUXC_SW_PAD_CTL_PAD_SD4_DATA4_PUS(2) | IOMUXC_SW_PAD_CTL_PAD_SD4_DATA4_SPEED(2) | IOMUXC_SW_PAD_CTL_PAD_SD4_DATA4_DSE(6) | IOMUXC_SW_PAD_CTL_PAD_SD4_DATA4_SRE_MASK | IOMUXC_SW_PAD_CTL_PAD_SD4_DATA4_HYS_MASK; IOMUXC_SW_PAD_CTL_PAD_SD4_DATA5 = IOMUXC_SW_PAD_CTL_PAD_SD4_DATA5_PKE_MASK | IOMUXC_SW_PAD_CTL_PAD_SD4_DATA5_PUE_MASK | IOMUXC_SW_PAD_CTL_PAD_SD4_DATA5_PUS(2) | IOMUXC_SW_PAD_CTL_PAD_SD4_DATA5_SPEED(2) | IOMUXC_SW_PAD_CTL_PAD_SD4_DATA5_DSE(6) | IOMUXC_SW_PAD_CTL_PAD_SD4_DATA5_SRE_MASK | IOMUXC_SW_PAD_CTL_PAD_SD4_DATA5_HYS_MASK; IOMUXC_UART5_IPP_UART_RXD_MUX_SELECT_INPUT = IOMUXC_UART5_IPP_UART_RXD_MUX_SELECT_INPUT_DAISY(0); #endif /* CONFIG_UART_IMX_UART_5 */ return 0; } SYS_INIT(udoo_neo_full_m4_init, PRE_KERNEL_1, 0);