zephyr/dts/bindings/can/can-controller.yaml
Henrik Brix Andersen 71c3e4c369 dts: bindings: add devicetree bindings for CAN transceivers
Add generic devicetree bindings for simple CAN transceivers.

Always-on CAN transceivers are considered passive and just provide a
maximum supported bitrate.

Active CAN controllers can typically be controlled by the MCU via either
SPI, I2C, or GPIO. Common GPIO controlled CAN transceivers provide
either a stand-by or an enable pin (or both) for controlling the state
of the CAN transceiver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-15 14:32:29 -05:00

72 lines
1.7 KiB
YAML

# Common fields for CAN controllers
include: base.yaml
properties:
bus-speed:
type: int
required: true
description: bus speed in Baud/s
sjw:
type: int
required: true
description: Resynchronization jump width (ISO 11898-1)
prop-seg:
type: int
required: false
description: Time quantums of propagation segment (ISO 11898-1)
phase-seg1:
type: int
required: false
description: Time quantums of phase buffer 1 segment (ISO 11898-1)
phase-seg2:
type: int
required: false
description: Time quantums of phase buffer 2 segment (ISO 11898-1)
sample-point:
type: int
required: false
description: >
Sample point in permille.
This param is required if segments are not given.
If the sample point is given, the segments are ignored.
phys:
type: phandle
required: false
description: |
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-binding:
description: |
Passive CAN transceiver. The child node must be named "can-transceiver".
Example:
&can0 {
status = "okay";
can-transceiver {
max-bitrate = <1000000>;
};
};
properties:
max-bitrate:
type: int
required: true
description: |
The maximum bitrate supported by the CAN transceiver in bits/s.