boards: arm: mr_canhubk3: enable support for LPSPI
Configure LPSPI instances on this board. All of them are routed with SDI and SDO data pins inverted. Enable SPI tests without DMA support for the moment. Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
This commit is contained in:
parent
c7200cac00
commit
565e582b8d
5 changed files with 112 additions and 0 deletions
|
@ -53,6 +53,7 @@ QSPI on-chip flash
|
|||
FLEXCAN on-chip can
|
||||
LPI2C on-chip i2c
|
||||
ADC SAR on-chip adc
|
||||
LPSPI on-chip spi
|
||||
============ ========== ================================
|
||||
|
||||
The default configuration can be found in the Kconfig file
|
||||
|
|
|
@ -194,4 +194,63 @@
|
|||
output-enable;
|
||||
};
|
||||
};
|
||||
|
||||
lpspi1_default: lpspi1_default {
|
||||
group1 {
|
||||
pinmux = <PTA28_LPSPI1_SCK_O>, <PTA29_LPSPI1_SIN_O>,
|
||||
<PTA21_LPSPI1_PCS0_O>, <PTE4_LPSPI1_PCS1_O>;
|
||||
output-enable;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <PTA30_LPSPI1_SOUT_I>;
|
||||
input-enable;
|
||||
};
|
||||
};
|
||||
|
||||
lpspi2_default: lpspi2_default {
|
||||
group1 {
|
||||
pinmux = <PTB29_LPSPI2_SCK_O>, <PTB28_LPSPI2_SIN_O>,
|
||||
<PTB25_LPSPI2_PCS0_O>, <PTC19_LPSPI2_PCS1_O>;
|
||||
output-enable;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <PTB27_LPSPI2_SOUT_I>;
|
||||
input-enable;
|
||||
};
|
||||
};
|
||||
|
||||
lpspi3_default: lpspi3_default {
|
||||
group1 {
|
||||
pinmux = <PTD1_LPSPI3_SCK_O>, <PTE10_LPSPI3_SIN_O>,
|
||||
<PTD17_LPSPI3_PCS0_O>;
|
||||
output-enable;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <PTD0_LPSPI3_SOUT_I>;
|
||||
input-enable;
|
||||
};
|
||||
};
|
||||
|
||||
lpspi4_default: lpspi4_default {
|
||||
group1 {
|
||||
pinmux = <PTB10_LPSPI4_SCK_O>, <PTB11_LPSPI4_SIN_O>,
|
||||
<PTB8_LPSPI4_PCS0_O>;
|
||||
output-enable;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <PTB9_LPSPI4_SOUT_I>;
|
||||
input-enable;
|
||||
};
|
||||
};
|
||||
|
||||
lpspi5_default: lpspi5_default {
|
||||
group1 {
|
||||
pinmux = <PTD26_LPSPI5_SCK_O>, <PTD28_LPSPI5_SIN_O>;
|
||||
output-enable;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <PTD27_LPSPI5_SOUT_I>;
|
||||
input-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -320,3 +320,33 @@
|
|||
pinctrl-names = "default";
|
||||
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||
};
|
||||
|
||||
&lpspi1 {
|
||||
pinctrl-0 = <&lpspi1_default>;
|
||||
pinctrl-names = "default";
|
||||
data-pin-config = "sdo-in,sdi-out";
|
||||
};
|
||||
|
||||
&lpspi2 {
|
||||
pinctrl-0 = <&lpspi2_default>;
|
||||
pinctrl-names = "default";
|
||||
data-pin-config = "sdo-in,sdi-out";
|
||||
};
|
||||
|
||||
&lpspi3 {
|
||||
pinctrl-0 = <&lpspi3_default>;
|
||||
pinctrl-names = "default";
|
||||
data-pin-config = "sdo-in,sdi-out";
|
||||
};
|
||||
|
||||
&lpspi4 {
|
||||
pinctrl-0 = <&lpspi4_default>;
|
||||
pinctrl-names = "default";
|
||||
data-pin-config = "sdo-in,sdi-out";
|
||||
};
|
||||
|
||||
&lpspi5 {
|
||||
pinctrl-0 = <&lpspi5_default>;
|
||||
pinctrl-names = "default";
|
||||
data-pin-config = "sdo-in,sdi-out";
|
||||
};
|
||||
|
|
|
@ -15,3 +15,4 @@ supported:
|
|||
- can
|
||||
- i2c
|
||||
- adc
|
||||
- spi
|
||||
|
|
21
tests/drivers/spi/spi_loopback/boards/mr_canhubk3.overlay
Normal file
21
tests/drivers/spi/spi_loopback/boards/mr_canhubk3.overlay
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright 2023 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&lpspi1 {
|
||||
status = "okay";
|
||||
|
||||
slow@0 {
|
||||
compatible = "test-spi-loopback-slow";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <500000>;
|
||||
};
|
||||
|
||||
fast@0 {
|
||||
compatible = "test-spi-loopback-fast";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <5000000>;
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue