Skip to content

Commit

Permalink
boards: mimxrt: enable pps output
Browse files Browse the repository at this point in the history
Enable pps output for mimxrt1050 and mimxrt1060 based boards for gptp
sample application validation.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Co-authored-by: Seb Laveze <sebastien.laveze@nxp.com>
Signed-off-by: Xabier Marquiegui <xmarquiegui@ainguraiiot.com>
  • Loading branch information
2 people authored and dleach02 committed Feb 11, 2022
1 parent 79047b5 commit 28ee068
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
4 changes: 4 additions & 0 deletions boards/arm/mimxrt1050_evk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ The MIMXRT1050 SoC has five pairs of pinmux/gpio controllers.
+---------------+-----------------+---------------------------+
| GPIO_SD_B0_05 | USDHC1_DATA3 | SD Card |
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_02 | 1588_EVENT2_OUT | 1588 |
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_03 | 1588_EVENT2_IN | 1588 |
+---------------+-----------------+---------------------------+

.. note::
In order to use the SPI peripheral on this board, resistors R278,
Expand Down
11 changes: 11 additions & 0 deletions boards/arm/mimxrt1050_evk/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,17 @@ static int mimxrt1050_evk_init(const struct device *dev)
/* pull up the ENET_INT before RESET. */
GPIO_WritePinOutput(GPIO1, 10, 1);
GPIO_WritePinOutput(GPIO1, 9, 0);

#if defined(CONFIG_PTP_CLOCK_MCUX)
/* GPIO_AD_B1_02 is configured as 1588_EVENT2_OUT */
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_02_ENET_1588_EVENT2_OUT, 0U);
/* GPIO_AD_B1_02 PAD functional properties */
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_02_ENET_1588_EVENT2_OUT, 0x10B0u);
/* GPIO_AD_B1_03 is configured as 1588_EVENT2_IN */
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_03_ENET_1588_EVENT2_IN, 0U);
/* GPIO_AD_B1_03 PAD functional properties */
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_03_ENET_1588_EVENT2_IN, 0xB0E9);
#endif
#endif

#if DT_NODE_HAS_STATUS(DT_NODELABEL(lcdif), okay) && CONFIG_DISPLAY
Expand Down
4 changes: 4 additions & 0 deletions boards/arm/mimxrt1060_evk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ The MIMXRT1060 SoC has five pairs of pinmux/gpio controllers.
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_15 | SAI1_TX_SYNC | I2S |
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_02 | 1588_EVENT2_OUT | 1588 |
+---------------+-----------------+---------------------------+
| GPIO_AD_B1_03 | 1588_EVENT2_IN | 1588 |
+---------------+-----------------+---------------------------+

.. note::
In order to use the SPI peripheral on this board, resistors R278, R279,
Expand Down
12 changes: 12 additions & 0 deletions boards/arm/mimxrt1060_evk/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,18 @@ static int mimxrt1060_evk_init(const struct device *dev)
/* pull up the ENET_INT before RESET. */
GPIO_WritePinOutput(GPIO1, 10, 1);
GPIO_WritePinOutput(GPIO1, 9, 0);

#if defined(CONFIG_PTP_CLOCK_MCUX)
/* GPIO_AD_B1_02 is configured as 1588_EVENT2_OUT */
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_02_ENET_1588_EVENT2_OUT, 0U);
/* GPIO_AD_B1_02 PAD functional properties */
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_02_ENET_1588_EVENT2_OUT, 0x10B0u);
/* GPIO_AD_B1_03 is configured as 1588_EVENT2_IN */
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_03_ENET_1588_EVENT2_IN, 0U);
/* GPIO_AD_B1_03 PAD functional properties */
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_03_ENET_1588_EVENT2_IN, 0xB0E9);
#endif

#endif

#if DT_NODE_HAS_STATUS(DT_NODELABEL(lcdif), okay) && CONFIG_DISPLAY
Expand Down

0 comments on commit 28ee068

Please sign in to comment.