boards: twr_ke18f: enable CAN controller
Enable CAN bus controller on the NXP TWR-KE18F development board. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
52cfe30d5e
commit
348ef0f2a4
5 changed files with 21 additions and 0 deletions
|
@ -37,6 +37,13 @@ config SPI_1
|
||||||
|
|
||||||
endif # SPI_MCUX_LPSPI
|
endif # SPI_MCUX_LPSPI
|
||||||
|
|
||||||
|
if CAN
|
||||||
|
|
||||||
|
config CAN_0
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # CAN
|
||||||
|
|
||||||
if PINMUX_MCUX
|
if PINMUX_MCUX
|
||||||
|
|
||||||
config PINMUX_MCUX_PORTA
|
config PINMUX_MCUX_PORTA
|
||||||
|
|
|
@ -78,6 +78,8 @@ features:
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
| ADC | on-chip | adc |
|
| ADC | on-chip | adc |
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
|
| CAN | on-chip | can |
|
||||||
|
+-----------+------------+-------------------------------------+
|
||||||
|
|
||||||
The default configuration can be found in the defconfig file:
|
The default configuration can be found in the defconfig file:
|
||||||
``boards/arm/twr_ke18f/twr_ke18f_defconfig``.
|
``boards/arm/twr_ke18f/twr_ke18f_defconfig``.
|
||||||
|
|
|
@ -102,6 +102,12 @@ static int twr_ke18f_pinmux_init(struct device *dev)
|
||||||
pinmux_pin_set(portd, 8, PORT_PCR_MUX(kPORT_MuxAlt2));
|
pinmux_pin_set(portd, 8, PORT_PCR_MUX(kPORT_MuxAlt2));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_CAN_0
|
||||||
|
/* FlexCAN0 RX, TX */
|
||||||
|
pinmux_pin_set(porte, 4, PORT_PCR_MUX(kPORT_MuxAlt5));
|
||||||
|
pinmux_pin_set(porte, 5, PORT_PCR_MUX(kPORT_MuxAlt5));
|
||||||
|
#endif
|
||||||
|
|
||||||
/* FXOS8700 INT1, INT2, RST */
|
/* FXOS8700 INT1, INT2, RST */
|
||||||
#ifdef DT_INST_0_NXP_FXOS8700_INT1_GPIOS_PIN
|
#ifdef DT_INST_0_NXP_FXOS8700_INT1_GPIOS_PIN
|
||||||
pinmux_pin_set(porta, 14, PORT_PCR_MUX(kPORT_MuxAsGpio));
|
pinmux_pin_set(porta, 14, PORT_PCR_MUX(kPORT_MuxAsGpio));
|
||||||
|
|
|
@ -146,6 +146,11 @@
|
||||||
sample-time = <12>;
|
sample-time = <12>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&can0 {
|
||||||
|
status = "ok";
|
||||||
|
bus-speed = <125000>;
|
||||||
|
};
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
/*
|
/*
|
||||||
* For more information, see:
|
* For more information, see:
|
||||||
|
|
|
@ -15,3 +15,4 @@ supported:
|
||||||
- hwinfo
|
- hwinfo
|
||||||
- spi
|
- spi
|
||||||
- adc
|
- adc
|
||||||
|
- can
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue