[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221026084007.1583333-2-mkl@pengutronix.de>
Date: Wed, 26 Oct 2022 10:39:39 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, linux-can@...r.kernel.org,
kernel@...gutronix.de, "Daniel S. Trevitz" <dan@...rev.com>,
Marc Kleine-Budde <mkl@...gutronix.de>
Subject: [PATCH net-next 01/29] can: add termination resistor documentation
From: "Daniel S. Trevitz" <dan@...rev.com>
Add documentation for how to use and setup the switchable termination
resistor support for CAN controllers.
Signed-off-by: Daniel Trevitz <dan@...rev.com>
Link: https://lore.kernel.org/all/3441354.44csPzL39Z@daniel6430
Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
---
Documentation/networking/can.rst | 33 ++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/Documentation/networking/can.rst b/Documentation/networking/can.rst
index ebc822e605f5..90121deef217 100644
--- a/Documentation/networking/can.rst
+++ b/Documentation/networking/can.rst
@@ -1148,6 +1148,39 @@ tuning on deep embedded systems'. The author is running a MPC603e
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)
-----------------------------
base-commit: a526a3cc9c8d426713f8bebc18ebbe39a8495d82
--
2.35.1
Powered by blists - more mailing lists