2022-10-13 15:29:52 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022 Martin Jäger <martin@libre.solar>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2023-07-06 14:06:40 +08:00
|
|
|
/* Enable CAN bus */
|
2022-10-13 15:29:52 +08:00
|
|
|
&twai {
|
2023-07-06 14:06:40 +08:00
|
|
|
status = "okay";
|
|
|
|
pinctrl-0 = <&twai_default>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
bus-speed = <125000>;
|
|
|
|
|
|
|
|
can-transceiver {
|
|
|
|
max-bitrate = <1000000>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&pinctrl {
|
|
|
|
twai_default: twai_default {
|
|
|
|
group1 {
|
|
|
|
pinmux = <TWAI_RX_GPIO5>;
|
|
|
|
output-enable; /* enable internal loopback */
|
|
|
|
};
|
|
|
|
group2 {
|
|
|
|
pinmux = <TWAI_TX_GPIO5>;
|
|
|
|
input-enable; /* enable internal loopback */
|
|
|
|
};
|
|
|
|
};
|
2022-10-13 15:29:52 +08:00
|
|
|
};
|