-
Notifications
You must be signed in to change notification settings - Fork 7.7k
NXP LPSPI: Add support for Peripheral (slave) mode #87144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright 2025 NXP | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&lpspi1 { | ||
status = "okay"; | ||
pinctrl-0 = <&pinmux_lpspi1>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
&pinctrl { | ||
/* J2 pins 12, 10, 8, 6 -> CLK, MISO, MOSI, PCS */ | ||
pinmux_lpspi1: pinmux_lpspi1 { | ||
group0 { | ||
pinmux = <LPSPI1_SDO_P2_13>, | ||
<LPSPI1_SCK_P2_12>, | ||
<LPSPI1_SDI_P2_16>, | ||
<LPSPI1_PCS1_P2_6>; | ||
slew-rate = "fast"; | ||
drive-strength = "high"; | ||
input-enable; | ||
}; | ||
}; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2025 NXP | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <lpspi1_header.overlay> | ||
|
||
/ { | ||
zephyr,user { | ||
peripheral-cs = <1>; | ||
}; | ||
}; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be useful for testing if you could include the connection setup in a comment here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. its in the board level dts , also its just the only two standard spi headers on the board which are labelled on silk screen, mikrobus and arduino |
||
&lpspi0 { | ||
dut_spi_dt: test-spi-dev@0 { | ||
compatible = "vnd,spi-device"; | ||
reg = <0>; | ||
spi-max-frequency = <10000000>; | ||
}; | ||
transfer-delay = <100>; | ||
sck-pcs-delay = <10>; | ||
pcs-sck-delay = <10>; | ||
/* lower the master interrupt priority so slave can interrupt */ | ||
interrupts = <28 1>; | ||
label = "spi_master"; | ||
}; | ||
|
||
dut_spis: &lpspi1 { | ||
label = "spi_slave"; | ||
}; |
Uh oh!
There was an error while loading. Please reload this page.