arch/mcimx7_m4: Add pad, clock and gate config for GPIO7 and UART6
Adds the necessery configuration for using the GPIO7 and UART6 on i.MX7 platforms. Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
This commit is contained in:
parent
4eee8a67f1
commit
671cb652a1
1 changed files with 21 additions and 0 deletions
|
@ -69,6 +69,13 @@ static void nxp_mcimx7_gpio_config(void)
|
||||||
CCM_ControlGate(CCM, ccmCcgrGateGpio2, ccmClockNeededRunWait);
|
CCM_ControlGate(CCM, ccmCcgrGateGpio2, ccmClockNeededRunWait);
|
||||||
#endif /* CONFIG_GPIO_IMX_PORT_2 */
|
#endif /* CONFIG_GPIO_IMX_PORT_2 */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef CONFIG_GPIO_IMX_PORT_7
|
||||||
|
RDC_SetPdapAccess(RDC, rdcPdapGpio7, GPIO_7_RDC, false, false);
|
||||||
|
/* Enable gpio clock gate */
|
||||||
|
CCM_ControlGate(CCM, ccmCcgrGateGpio7, ccmClockNeededRunWait);
|
||||||
|
#endif /* CONFIG_GPIO_IMX_PORT_2 */
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_GPIO_IMX */
|
#endif /* CONFIG_GPIO_IMX */
|
||||||
|
|
||||||
|
@ -91,6 +98,20 @@ static void nxp_mcimx7_uart_config(void)
|
||||||
CCM_ControlGate(CCM, ccmCcgrGateUart2, ccmClockNeededAll);
|
CCM_ControlGate(CCM, ccmCcgrGateUart2, ccmClockNeededAll);
|
||||||
#endif /* #ifdef CONFIG_UART_IMX_UART_2 */
|
#endif /* #ifdef CONFIG_UART_IMX_UART_2 */
|
||||||
|
|
||||||
|
#ifdef CONFIG_UART_IMX_UART_6
|
||||||
|
/* We need to grasp board uart exclusively */
|
||||||
|
RDC_SetPdapAccess(RDC, rdcPdapUart6, UART_6_RDC, false, false);
|
||||||
|
/* Select clock derived from OSC clock(24M) */
|
||||||
|
CCM_UpdateRoot(CCM, ccmRootUart6, ccmRootmuxUartOsc24m, 0, 0);
|
||||||
|
/* Enable uart clock */
|
||||||
|
CCM_EnableRoot(CCM, ccmRootUart6);
|
||||||
|
/*
|
||||||
|
* IC Limitation
|
||||||
|
* M4 stop will cause A7 UART lose functionality
|
||||||
|
* So we need UART clock all the time
|
||||||
|
*/
|
||||||
|
CCM_ControlGate(CCM, ccmCcgrGateUart6, ccmClockNeededAll);
|
||||||
|
#endif /* #ifdef CONFIG_UART_IMX_UART_6 */
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_UART_IMX */
|
#endif /* CONFIG_UART_IMX */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue