Commit 85700ac1 authored by Daniel S. Trevitz's avatar Daniel S. Trevitz Committed by Marc Kleine-Budde

can: add termination resistor documentation

Add documentation for how to use and setup the switchable termination
resistor support for CAN controllers.
Signed-off-by: default avatarDaniel Trevitz <dan@sstrev.com>
Link: https://lore.kernel.org/all/3441354.44csPzL39Z@daniel6430Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent a526a3cc
...@@ -1148,6 +1148,39 @@ tuning on deep embedded systems'. The author is running a MPC603e ...@@ -1148,6 +1148,39 @@ tuning on deep embedded systems'. The author is running a MPC603e
load without any problems ... load without any problems ...
Switchable Termination Resistors
--------------------------------
CAN bus requires a specific impedance across the differential pair,
typically provided by two 120Ohm resistors on the farthest nodes of
the bus. Some CAN controllers support activating / deactivating a
termination resistor(s) to provide the correct impedance.
Query the available resistances::
$ ip -details link show can0
...
termination 120 [ 0, 120 ]
Activate the terminating resistor::
$ ip link set dev can0 type can termination 120
Deactivate the terminating resistor::
$ ip link set dev can0 type can termination 0
To enable termination resistor support to a can-controller, either
implement in the controller's struct can-priv::
termination_const
termination_const_cnt
do_set_termination
or add gpio control with the device tree entries from
Documentation/devicetree/bindings/net/can/can-controller.yaml
The Virtual CAN Driver (vcan) The Virtual CAN Driver (vcan)
----------------------------- -----------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment