boards: arm: lpcxpress55s16: enable SPI support
Enable the high-speed SPI controller on the NXP LPCXpresso55S16 board. Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit is contained in:
parent
25cf045b79
commit
b30fea4dc9
4 changed files with 50 additions and 0 deletions
|
@ -147,6 +147,40 @@ static int lpcxpresso_55s16_pinmux_init(struct device *dev)
|
|||
IOCON_PIO_OPENDRAIN_DI);
|
||||
#endif
|
||||
|
||||
#if DT_HAS_NODE(DT_NODELABEL(hs_lspi))
|
||||
/* PORT0 PIN26 is configured as HS_SPI_MOSI */
|
||||
pinmux_pin_set(port0, 26, IOCON_PIO_FUNC9 |
|
||||
IOCON_PIO_MODE_PULLUP |
|
||||
IOCON_PIO_INV_DI |
|
||||
IOCON_PIO_DIGITAL_EN |
|
||||
IOCON_PIO_SLEW_STANDARD |
|
||||
IOCON_PIO_OPENDRAIN_DI);
|
||||
|
||||
/* PORT1 PIN1 is configured as HS_SPI_SSEL1 */
|
||||
pinmux_pin_set(port1, 1, IOCON_PIO_FUNC5 |
|
||||
IOCON_PIO_MODE_PULLUP |
|
||||
IOCON_PIO_INV_DI |
|
||||
IOCON_PIO_DIGITAL_EN |
|
||||
IOCON_PIO_SLEW_STANDARD |
|
||||
IOCON_PIO_OPENDRAIN_DI);
|
||||
|
||||
/* PORT1 PIN2 is configured as HS_SPI_SCK */
|
||||
pinmux_pin_set(port1, 2, IOCON_PIO_FUNC6 |
|
||||
IOCON_PIO_MODE_PULLUP |
|
||||
IOCON_PIO_INV_DI |
|
||||
IOCON_PIO_DIGITAL_EN |
|
||||
IOCON_PIO_SLEW_STANDARD |
|
||||
IOCON_PIO_OPENDRAIN_DI);
|
||||
|
||||
/* PORT1 PIN3 is configured as HS_SPI_MISO */
|
||||
pinmux_pin_set(port1, 3, IOCON_PIO_FUNC6 |
|
||||
IOCON_PIO_MODE_PULLUP |
|
||||
IOCON_PIO_INV_DI |
|
||||
IOCON_PIO_DIGITAL_EN |
|
||||
IOCON_PIO_SLEW_STANDARD |
|
||||
IOCON_PIO_OPENDRAIN_DI);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue