Skip to content

Commit 36e646f

Browse files
CristXugalak
authored andcommitted
lpspi: the lpspi driver for rt1170
enable the lpspi1 for the rt1170 evk board Signed-off-by: Crist Xu <crist.xu@nxp.com>
1 parent 7cd77c2 commit 36e646f

File tree

5 files changed

+29
-1
lines changed

5 files changed

+29
-1
lines changed

boards/arm/mimxrt1170_evk/doc/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ features:
100100
+-----------+------------+-------------------------------------+
101101
| CAN | on-chip | flexcan |
102102
+-----------+------------+-------------------------------------+
103+
| SPI | on-chip | spi |
104+
+-----------+------------+-------------------------------------+
103105
| UART | on-chip | serial port-polling; |
104106
| | | serial port-interrupt |
105107
+-----------+------------+-------------------------------------+
@@ -129,6 +131,15 @@ The MIMXRT1170 SoC has six pairs of pinmux/gpio controllers.
129131
+---------------+-----------------+---------------------------+
130132
| GPIO_LPSR_01 | CAN3_RX | flexcan |
131133
+---------------+-----------------+---------------------------+
134+
| GPIO_AD_29 | SPI1_CS0 | spi |
135+
+---------------+-----------------+---------------------------+
136+
| GPIO_AD_28 | SPI1_CLK | spi |
137+
+---------------+-----------------+---------------------------+
138+
| GPIO_AD_30 | SPI1_SDO | spi |
139+
+---------------+-----------------+---------------------------+
140+
| GPIO_AD_31 | SPI1_SDI | spi |
141+
+---------------+-----------------+---------------------------+
142+
132143

133144
System Clock
134145
============

boards/arm/mimxrt1170_evk/mimxrt1170_evk_cm7.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
bus-speed = <125000>;
3939
};
4040

41+
&lpspi1 {
42+
status = "okay";
43+
};
44+
4145
&flexspi1 {
4246
reg = <0x400cc000 0x4000>, <0x30000000 DT_SIZE_M(16)>;
4347
is25wp128: is25wp128@0 {

boards/arm/mimxrt1170_evk/mimxrt1170_evk_cm7.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ supported:
1818
- gpio
1919
- counter
2020
- can
21+
- spi

boards/arm/mimxrt1170_evk/pinmux.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,18 @@ static int mimxrt1170_evk_init(const struct device *dev)
121121
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_09_LPI2C1_SDA, 0x10U);
122122
#endif
123123

124+
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi1), okay) && CONFIG_SPI
125+
/* LPIPI1 SCK, PCS0, SIN, SOUT */
126+
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_28_LPSPI1_SCK, 0U);
127+
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_29_LPSPI1_PCS0, 0U);
128+
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_30_LPSPI1_SOUT, 0U);
129+
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_31_LPSPI1_SIN, 0U);
130+
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_28_LPSPI1_SCK, 0x02U);
131+
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_29_LPSPI1_PCS0, 0x02U);
132+
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_30_LPSPI1_SOUT, 0x02U);
133+
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_31_LPSPI1_SIN, 0x02U);
134+
#endif
135+
124136
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && CONFIG_NET_L2_ETHERNET
125137
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_32_ENET_MDC, 0U);
126138
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_33_ENET_MDIO, 0U);

samples/drivers/jesd216/sample.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sample:
33
tests:
44
sample.drivers.jesd216:
55
tags: spi flash
6-
platform_exclude: hifive1
6+
platform_exclude: hifive1 mimxrt1170_evk_cm7 mimxrt1170_evk_cm4
77
filter: dt_compat_enabled("jedec,spi-nor")
88
harness: console
99
harness_config:

0 commit comments

Comments
 (0)