boards: arm: lpcxpresso55s16: add MCAN support

Add NXP LPC MCAN support for the NXP lpcxpresso55s16 board definition.

Fixes #35437

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit is contained in:
Henrik Brix Andersen 2021-05-31 22:23:15 +02:00 committed by Carles Cufí
parent 25433f1414
commit 190c9ba377
4 changed files with 37 additions and 0 deletions

View File

@ -73,6 +73,8 @@ hardware features:
+-----------+------------+-------------------------------------+
| CLOCK | on-chip | clock_control |
+-----------+------------+-------------------------------------+
| CAN | on-chip | canbus |
+-----------+------------+-------------------------------------+
Other hardware features are not currently enabled.
@ -119,6 +121,10 @@ the functionality of a pin.
+---------+-----------------+----------------------------+
| PIO1_26 | GPIO | FXOS8700 INT1 |
+---------+-----------------+----------------------------+
| PIO1_22 | CAN | CAN RXD |
+---------+-----------------+----------------------------+
| PIO1_27 | CAN | CAN TXD |
+---------+-----------------+----------------------------+
System Clock
============

View File

@ -18,6 +18,8 @@ supported:
- arduino_gpio
- arduino_i2c
- arduino_spi
- can
- canfd
- gpio
- i2c
- spi

View File

@ -12,6 +12,7 @@
zephyr,console = &flexcomm0;
zephyr,shell-uart = &flexcomm0;
zephyr,entropy = &rng;
zephyr,canbus = &can0;
};
aliases{
@ -131,6 +132,12 @@
};
};
&can0 {
status = "okay";
bus-speed = <125000>;
bus-speed-data = <1000000>;
};
&hs_lspi {
status = "okay";
};

View File

@ -181,6 +181,28 @@ static int lpcxpresso_55s16_pinmux_init(const struct device *dev)
IOCON_PIO_OPENDRAIN_DI);
#endif
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(can0), nxp_lpc_mcan, okay) && CONFIG_CAN
/* CAN RXD, TXD */
uint32_t port1_pin22_config = (
IOCON_PIO_FUNC9 |
IOCON_PIO_MODE_INACT |
IOCON_PIO_INV_DI |
IOCON_PIO_DIGITAL_EN |
IOCON_PIO_SLEW_STANDARD |
IOCON_PIO_OPENDRAIN_DI
);
uint32_t port1_pin27_config = (
IOCON_PIO_FUNC9 |
IOCON_PIO_MODE_INACT |
IOCON_PIO_INV_DI |
IOCON_PIO_DIGITAL_EN |
IOCON_PIO_SLEW_STANDARD |
IOCON_PIO_OPENDRAIN_DI
);
pinmux_pin_set(port1, 22, port1_pin22_config);
pinmux_pin_set(port1, 27, port1_pin27_config);
#endif
return 0;
}