This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

zephyr,fake-can

Vendor: Zephyr-specific binding

Description

This binding provides a fake CAN controller for use as either a stub or a mock in Zephyr
testing.

Properties

Top level properties

These property descriptions apply to “zephyr,fake-can” nodes themselves. This page also describes child node properties in the following sections.

Properties not inherited from the base binding file.

Name

Type

Details

bus-speed-data

int

Initial data phase bitrate in bit/s.

This property is required.

sample-point-data

int

Initial data phase sample point in per mille (e.g. 875 equals 87.5%).

If this is unset (or if it is set to 0), the initial sample point will default to 75.0% for
bitrates over 800 kbit/s, 80.0% for bitrates over 500 kbit/s, and 87.5% for all other
bitrates.

bus-speed

int

Initial bitrate in bit/s.

This property is required.

sample-point

int

Initial sample point in per mille (e.g. 875 equals 87.5%).

If this is unset (or if it is set to 0), the initial sample point will default to 75.0% for
bitrates over 800 kbit/s, 80.0% for bitrates over 500 kbit/s, and 87.5% for all other
bitrates.

phys

phandle

Actively controlled CAN transceiver.

Example:
  transceiver0: can-phy0 {
    compatible = "nxp,tja1040", "can-transceiver-gpio";
    standby-gpios = <gpioa 0 GPIO_ACTIVE_HIGH>;
    max-bitrate = <1000000>;
    #phy-cells = <0>;
  };

  &can0 {
    status = "okay";

    phys = <&transceiver0>;
  };

Child node properties

Name

Type

Details

min-bitrate

int

The minimum bitrate supported by the CAN transceiver in bits/s.

max-bitrate

int

The maximum bitrate supported by the CAN transceiver in bits/s.

This property is required.