File tree Expand file tree Collapse file tree 4 files changed +37
-0
lines changed
boards/arm/lpcxpresso55s16 Expand file tree Collapse file tree 4 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ hardware features:
7373+-----------+------------+-------------------------------------+
7474| CLOCK | on-chip | clock_control |
7575+-----------+------------+-------------------------------------+
76+ | CAN | on-chip | canbus |
77+ +-----------+------------+-------------------------------------+
7678
7779Other hardware features are not currently enabled.
7880
@@ -119,6 +121,10 @@ the functionality of a pin.
119121+---------+-----------------+----------------------------+
120122| PIO1_26 | GPIO | FXOS8700 INT1 |
121123+---------+-----------------+----------------------------+
124+ | PIO1_22 | CAN | CAN RXD |
125+ +---------+-----------------+----------------------------+
126+ | PIO1_27 | CAN | CAN TXD |
127+ +---------+-----------------+----------------------------+
122128
123129System Clock
124130============
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ supported:
1818 - arduino_gpio
1919 - arduino_i2c
2020 - arduino_spi
21+ - can
22+ - canfd
2123 - gpio
2224 - i2c
2325 - spi
Original file line number Diff line number Diff line change 1212 zephyr,console = &flexcomm0;
1313 zephyr,shell-uart = &flexcomm0;
1414 zephyr,entropy = &rng;
15+ zephyr,canbus = &can0;
1516 };
1617
1718 aliases{
131132 };
132133};
133134
135+ &can0 {
136+ status = "okay";
137+ bus-speed = <125000>;
138+ bus-speed-data = <1000000>;
139+ };
140+
134141&hs_lspi {
135142 status = "okay";
136143};
Original file line number Diff line number Diff line change @@ -181,6 +181,28 @@ static int lpcxpresso_55s16_pinmux_init(const struct device *dev)
181181 IOCON_PIO_OPENDRAIN_DI );
182182#endif
183183
184+ #if DT_NODE_HAS_COMPAT_STATUS (DT_NODELABEL (can0 ), nxp_lpc_mcan , okay ) && CONFIG_CAN
185+ /* CAN RXD, TXD */
186+ uint32_t port1_pin22_config = (
187+ IOCON_PIO_FUNC9 |
188+ IOCON_PIO_MODE_INACT |
189+ IOCON_PIO_INV_DI |
190+ IOCON_PIO_DIGITAL_EN |
191+ IOCON_PIO_SLEW_STANDARD |
192+ IOCON_PIO_OPENDRAIN_DI
193+ );
194+ uint32_t port1_pin27_config = (
195+ IOCON_PIO_FUNC9 |
196+ IOCON_PIO_MODE_INACT |
197+ IOCON_PIO_INV_DI |
198+ IOCON_PIO_DIGITAL_EN |
199+ IOCON_PIO_SLEW_STANDARD |
200+ IOCON_PIO_OPENDRAIN_DI
201+ );
202+ pinmux_pin_set (port1 , 22 , port1_pin22_config );
203+ pinmux_pin_set (port1 , 27 , port1_pin27_config );
204+ #endif
205+
184206 return 0 ;
185207}
186208
You can’t perform that action at this time.
0 commit comments