zephyr/tests/drivers/can/api/twai-enable.overlay
Eric Holmberg 1b919bbc28 tests: drivers: can: api: add virtual CAN TX <-> RX Jumper
Remove the need for the can_transceiver fixture by assigning the CAN TX
and CAN RX lines to the same GPIO pin to allow for testing without a
transceiver or physical jumper.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-07-10 15:13:52 +02:00

31 lines
524 B
Plaintext

/*
* Copyright (c) 2022 Martin Jäger <martin@libre.solar>
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Enable CAN bus */
&twai {
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 */
};
};
};