* [PATCH] can: add documentation about CAN FD controller specific configuration
@ 2015-09-17 19:58 Oliver Hartkopp
2015-09-17 20:32 ` Marc Kleine-Budde
2015-09-17 20:33 ` Marc Kleine-Budde
0 siblings, 2 replies; 3+ messages in thread
From: Oliver Hartkopp @ 2015-09-17 19:58 UTC (permalink / raw)
To: linux-can; +Cc: Oliver Hartkopp
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
---
Documentation/networking/can.txt | 75 +++++++++++++++++++++++++++++-----------
1 file changed, 55 insertions(+), 20 deletions(-)
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index fd1a1aa..56bad15 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -1018,25 +1018,34 @@ solution for a couple of reasons:
$ ip link set can0 type can help
Usage: ip link set DEVICE type can
- [ bitrate BITRATE [ sample-point SAMPLE-POINT] ] |
- [ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1
- phase-seg2 PHASE-SEG2 [ sjw SJW ] ]
-
- [ loopback { on | off } ]
- [ listen-only { on | off } ]
- [ triple-sampling { on | off } ]
-
- [ restart-ms TIME-MS ]
- [ restart ]
-
- Where: BITRATE := { 1..1000000 }
- SAMPLE-POINT := { 0.000..0.999 }
- TQ := { NUMBER }
- PROP-SEG := { 1..8 }
- PHASE-SEG1 := { 1..8 }
- PHASE-SEG2 := { 1..8 }
- SJW := { 1..4 }
- RESTART-MS := { 0 | NUMBER }
+ [ bitrate BITRATE [ sample-point SAMPLE-POINT] ] |
+ [ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1
+ phase-seg2 PHASE-SEG2 [ sjw SJW ] ]
+
+ [ dbitrate BITRATE [ dsample-point SAMPLE-POINT] ] |
+ [ dtq TQ dprop-seg PROP_SEG dphase-seg1 PHASE-SEG1
+ dphase-seg2 PHASE-SEG2 [ dsjw SJW ] ]
+
+ [ loopback { on | off } ]
+ [ listen-only { on | off } ]
+ [ triple-sampling { on | off } ]
+ [ one-shot { on | off } ]
+ [ berr-reporting { on | off } ]
+ [ fd { on | off } ]
+ [ fd-non-iso { on | off } ]
+ [ presume-ack { on | off } ]
+
+ [ restart-ms TIME-MS ]
+ [ restart ]
+
+ Where: BITRATE := { 1..1000000 }
+ SAMPLE-POINT := { 0.000..0.999 }
+ TQ := { NUMBER }
+ PROP-SEG := { 1..8 }
+ PHASE-SEG1 := { 1..8 }
+ PHASE-SEG2 := { 1..8 }
+ SJW := { 1..4 }
+ RESTART-MS := { 0 | NUMBER }
- Display CAN device details and statistics:
@@ -1178,7 +1187,33 @@ solution for a couple of reasons:
The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall.
N.B. CAN FD capable devices can also handle and send legacy CAN frames.
- FIXME: Add details about the CAN FD controller configuration when available.
+ When configuring CAN FD capable CAN controllers an additional 'data' bitrate
+ has to be set. This bitrate for the data phase of the CAN FD frame has to be
+ at least the bitrate which was configured for the arbitration phase. This
+ second bitrate is specified analogue to the first bitrate but the bitrate
+ setting keywords for the 'data' bitrate start with 'd' e.g. dbitrate,
+ dsample-point, dsjw or dtq and similar settings. When a data bitrate is set
+ within the configuration process the controller option "fd on" can be
+ specified to enable the CAN FD mode in the CAN controller. This controller
+ option also switches the device MTU to 72 (CANFD_MTU).
+
+ The first CAN FD specification presented as whitepaper at the International
+ CAN Conference 2012 needed to be improved for data integrity reasons.
+ Therefore two CAN FD implementations have to be distinguished today:
+
+ - ISO compliant: The ISO 11898-1:2015 CAN FD implementation (default)
+ - non-ISO compliant: The CAN FD implementation following the 2012 whitepaper
+
+ Finally there are three types of CAN FD controllers:
+
+ 1. ISO compliant (fixed)
+ 2. non-ISO compliant (fixed, like the M_CAN IP core v3.0.1 in m_can.c)
+ 3. ISO/non-ISO CAN FD controllers (switchable, like the PEAK PCAN-USB FD)
+
+ The current ISO/non-ISO mode is announced by the CAN controller driver via
+ netlink and displayed by the 'ip' tool (controller option FD-NON-ISO).
+ The ISO/non-ISO-mode can be altered by setting 'fd-non-iso {on|off}' for
+ switchable CAN FD controllers only.
6.7 Supported CAN hardware
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] can: add documentation about CAN FD controller specific configuration
2015-09-17 19:58 [PATCH] can: add documentation about CAN FD controller specific configuration Oliver Hartkopp
@ 2015-09-17 20:32 ` Marc Kleine-Budde
2015-09-17 20:33 ` Marc Kleine-Budde
1 sibling, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2015-09-17 20:32 UTC (permalink / raw)
To: Oliver Hartkopp, linux-can
[-- Attachment #1: Type: text/plain, Size: 763 bytes --]
On 09/17/2015 09:58 PM, Oliver Hartkopp wrote:
Please give short commit message.
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
> ---
> Documentation/networking/can.txt | 75 +++++++++++++++++++++++++++++-----------
> 1 file changed, 55 insertions(+), 20 deletions(-)
>
> diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
Please add Jonathan (Cc'ed) for the next round, he usually takes
Documentation related patches.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] can: add documentation about CAN FD controller specific configuration
2015-09-17 19:58 [PATCH] can: add documentation about CAN FD controller specific configuration Oliver Hartkopp
2015-09-17 20:32 ` Marc Kleine-Budde
@ 2015-09-17 20:33 ` Marc Kleine-Budde
1 sibling, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2015-09-17 20:33 UTC (permalink / raw)
To: Oliver Hartkopp, linux-can; +Cc: Jonathan Corbet
[-- Attachment #1: Type: text/plain, Size: 788 bytes --]
On 09/17/2015 09:58 PM, Oliver Hartkopp wrote:
Please give short commit message.
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
> ---
> Documentation/networking/can.txt | 75 +++++++++++++++++++++++++++++-----------
> 1 file changed, 55 insertions(+), 20 deletions(-)
>
> diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
Please add Jonathan (Cc'ed - this time for real) for the next round, he
usually takes Documentation related patches.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-17 20:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-17 19:58 [PATCH] can: add documentation about CAN FD controller specific configuration Oliver Hartkopp
2015-09-17 20:32 ` Marc Kleine-Budde
2015-09-17 20:33 ` Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox