File tree Expand file tree Collapse file tree 12 files changed +150
-0
lines changed
tests/drivers/spi/spi_loopback/boards Expand file tree Collapse file tree 12 files changed +150
-0
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,18 @@ void board_early_init_hook(void)
222
222
223
223
#endif
224
224
225
+ #if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (lpspi0 ))
226
+ /* Configure input clock to be able to reach the datasheet specified band rate. */
227
+ CLOCK_SetClockDiv (kCLOCK_DivLPSPI0 , 1u );
228
+ CLOCK_AttachClk (kFRO_LF_DIV_to_LPSPI0 );
229
+ #endif
230
+
231
+ #if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (lpspi1 ))
232
+ /* Configure input clock to be able to reach the datasheet specified band rate. */
233
+ CLOCK_SetClockDiv (kCLOCK_DivLPSPI1 , 1u );
234
+ CLOCK_AttachClk (kFRO_LF_DIV_to_LPSPI1 );
235
+ #endif
236
+
225
237
#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (lptmr0 ))
226
238
227
239
/*
Original file line number Diff line number Diff line change 69
69
};
70
70
};
71
71
72
+ pinmux_lpspi0: pinmux_lpspi0 {
73
+ group0 {
74
+ pinmux = <LPSPI0_SDO_P1_0>,
75
+ <LPSPI0_SCK_P1_1>,
76
+ <LPSPI0_SDI_P1_2>,
77
+ <LPSPI0_PCS0_P1_3>;
78
+ slew-rate = "fast";
79
+ drive-strength = "low";
80
+ input-enable;
81
+ };
82
+ };
72
83
};
Original file line number Diff line number Diff line change 138
138
pinctrl-names = "default";
139
139
};
140
140
141
+ &lpspi0 {
142
+ status = "okay";
143
+ pinctrl-0 = <&pinmux_lpspi0>;
144
+ pinctrl-names = "default";
145
+ };
146
+
141
147
&flash {
142
148
partitions {
143
149
compatible = "fixed-partitions";
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ supported:
19
19
- flash
20
20
- adc
21
21
- i2c
22
+ - spi
22
23
- watchdog
23
24
- counter
24
25
- dma
Original file line number Diff line number Diff line change @@ -222,6 +222,18 @@ void board_early_init_hook(void)
222
222
223
223
#endif
224
224
225
+ #if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (lpspi0 ))
226
+ /* Configure input clock to be able to reach the datasheet specified band rate. */
227
+ CLOCK_SetClockDiv (kCLOCK_DivLPSPI0 , 1u );
228
+ CLOCK_AttachClk (kFRO_LF_DIV_to_LPSPI0 );
229
+ #endif
230
+
231
+ #if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (lpspi1 ))
232
+ /* Configure input clock to be able to reach the datasheet specified band rate. */
233
+ CLOCK_SetClockDiv (kCLOCK_DivLPSPI1 , 1u );
234
+ CLOCK_AttachClk (kFRO_LF_DIV_to_LPSPI1 );
235
+ #endif
236
+
225
237
#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (lptmr0 ))
226
238
227
239
/*
Original file line number Diff line number Diff line change 69
69
};
70
70
};
71
71
72
+ pinmux_lpspi0: pinmux_lpspi0 {
73
+ group0 {
74
+ pinmux = <LPSPI0_SDO_P1_0>,
75
+ <LPSPI0_SCK_P1_1>,
76
+ <LPSPI0_SDI_P1_2>,
77
+ <LPSPI0_PCS0_P1_3>;
78
+ slew-rate = "fast";
79
+ drive-strength = "low";
80
+ input-enable;
81
+ };
82
+ };
72
83
};
Original file line number Diff line number Diff line change 138
138
pinctrl-names = "default";
139
139
};
140
140
141
+ &lpspi0 {
142
+ status = "okay";
143
+ pinctrl-0 = <&pinmux_lpspi0>;
144
+ pinctrl-names = "default";
145
+ };
146
+
141
147
&flash {
142
148
partitions {
143
149
compatible = "fixed-partitions";
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ supported:
19
19
- flash
20
20
- adc
21
21
- i2c
22
+ - spi
22
23
- watchdog
23
24
- counter
24
25
- dma
Original file line number Diff line number Diff line change 363
363
status = "disabled";
364
364
};
365
365
366
+ lpspi0: spi@4009c000 {
367
+ compatible = "nxp,lpspi";
368
+ reg = <0x4009c000 0x1000>;
369
+ interrupts = <28 0>;
370
+ clocks = <&syscon MCUX_LPSPI0_CLK>;
371
+ tx-fifo-size = <4>;
372
+ rx-fifo-size = <4>;
373
+ #address-cells = <1>;
374
+ #size-cells = <0>;
375
+ status = "disabled";
376
+ };
377
+
378
+ lpspi1: spi@4009d000 {
379
+ compatible = "nxp,lpspi";
380
+ reg = <0x4009d000 0x1000>;
381
+ interrupts = <29 0>;
382
+ clocks = <&syscon MCUX_LPSPI1_CLK>;
383
+ tx-fifo-size = <4>;
384
+ rx-fifo-size = <4>;
385
+ #address-cells = <1>;
386
+ #size-cells = <0>;
387
+ status = "disabled";
388
+ };
389
+
366
390
wwdt0: watchdog@4000c000 {
367
391
compatible = "nxp,lpc-wwdt";
368
392
reg = <0x4000c000 0x1000>;
Original file line number Diff line number Diff line change 363
363
status = "disabled";
364
364
};
365
365
366
+ lpspi0: spi@4009c000 {
367
+ compatible = "nxp,lpspi";
368
+ reg = <0x4009c000 0x1000>;
369
+ interrupts = <28 0>;
370
+ clocks = <&syscon MCUX_LPSPI0_CLK>;
371
+ tx-fifo-size = <4>;
372
+ rx-fifo-size = <4>;
373
+ #address-cells = <1>;
374
+ #size-cells = <0>;
375
+ status = "disabled";
376
+ };
377
+
378
+ lpspi1: spi@4009d000 {
379
+ compatible = "nxp,lpspi";
380
+ reg = <0x4009d000 0x1000>;
381
+ interrupts = <29 0>;
382
+ clocks = <&syscon MCUX_LPSPI1_CLK>;
383
+ tx-fifo-size = <4>;
384
+ rx-fifo-size = <4>;
385
+ #address-cells = <1>;
386
+ #size-cells = <0>;
387
+ status = "disabled";
388
+ };
389
+
366
390
wwdt0: watchdog@4000c000 {
367
391
compatible = "nxp,lpc-wwdt";
368
392
reg = <0x4000c000 0x1000>;
You can’t perform that action at this time.
0 commit comments