Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0-or-later
0002 
0003 CTU CAN FD Driver
0004 =================
0005 
0006 Author: Martin Jerabek <martin.jerabek01@gmail.com>
0007 
0008 
0009 About CTU CAN FD IP Core
0010 ------------------------
0011 
0012 `CTU CAN FD <https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core>`_
0013 is an open source soft core written in VHDL.
0014 It originated in 2015 as Ondrej Ille's project
0015 at the `Department of Measurement <https://meas.fel.cvut.cz/>`_
0016 of `FEE <http://www.fel.cvut.cz/en/>`_ at `CTU <https://www.cvut.cz/en>`_.
0017 
0018 The SocketCAN driver for Xilinx Zynq SoC based MicroZed board
0019 `Vivado integration <https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top>`_
0020 and Intel Cyclone V 5CSEMA4U23C6 based DE0-Nano-SoC Terasic board
0021 `QSys integration <https://gitlab.fel.cvut.cz/canbus/intel-soc-ctucanfd>`_
0022 has been developed as well as support for
0023 `PCIe integration <https://gitlab.fel.cvut.cz/canbus/pcie-ctucanfd>`_ of the core.
0024 
0025 In the case of Zynq, the core is connected via the APB system bus, which does
0026 not have enumeration support, and the device must be specified in Device Tree.
0027 This kind of devices is called platform device in the kernel and is
0028 handled by a platform device driver.
0029 
0030 The basic functional model of the CTU CAN FD peripheral has been
0031 accepted into QEMU mainline. See QEMU `CAN emulation support <https://www.qemu.org/docs/master/system/devices/can.html>`_
0032 for CAN FD buses, host connection and CTU CAN FD core emulation. The development
0033 version of emulation support can be cloned from ctu-canfd branch of QEMU local
0034 development `repository <https://gitlab.fel.cvut.cz/canbus/qemu-canbus>`_.
0035 
0036 
0037 About SocketCAN
0038 ---------------
0039 
0040 SocketCAN is a standard common interface for CAN devices in the Linux
0041 kernel. As the name suggests, the bus is accessed via sockets, similarly
0042 to common network devices. The reasoning behind this is in depth
0043 described in `Linux SocketCAN <https://www.kernel.org/doc/html/latest/networking/can.html>`_.
0044 In short, it offers a
0045 natural way to implement and work with higher layer protocols over CAN,
0046 in the same way as, e.g., UDP/IP over Ethernet.
0047 
0048 Device probe
0049 ~~~~~~~~~~~~
0050 
0051 Before going into detail about the structure of a CAN bus device driver,
0052 let's reiterate how the kernel gets to know about the device at all.
0053 Some buses, like PCI or PCIe, support device enumeration. That is, when
0054 the system boots, it discovers all the devices on the bus and reads
0055 their configuration. The kernel identifies the device via its vendor ID
0056 and device ID, and if there is a driver registered for this identifier
0057 combination, its probe method is invoked to populate the driver's
0058 instance for the given hardware. A similar situation goes with USB, only
0059 it allows for device hot-plug.
0060 
0061 The situation is different for peripherals which are directly embedded
0062 in the SoC and connected to an internal system bus (AXI, APB, Avalon,
0063 and others). These buses do not support enumeration, and thus the kernel
0064 has to learn about the devices from elsewhere. This is exactly what the
0065 Device Tree was made for.
0066 
0067 Device tree
0068 ~~~~~~~~~~~
0069 
0070 An entry in device tree states that a device exists in the system, how
0071 it is reachable (on which bus it resides) and its configuration –
0072 registers address, interrupts and so on. An example of such a device
0073 tree is given in .
0074 
0075 ::
0076 
0077            / {
0078                /* ... */
0079                amba: amba {
0080                    #address-cells = <1>;
0081                    #size-cells = <1>;
0082                    compatible = "simple-bus";
0083 
0084                    CTU_CAN_FD_0: CTU_CAN_FD@43c30000 {
0085                        compatible = "ctu,ctucanfd";
0086                        interrupt-parent = <&intc>;
0087                        interrupts = <0 30 4>;
0088                        clocks = <&clkc 15>;
0089                        reg = <0x43c30000 0x10000>;
0090                    };
0091                };
0092            };
0093 
0094 
0095 .. _sec:socketcan:drv:
0096 
0097 Driver structure
0098 ~~~~~~~~~~~~~~~~
0099 
0100 The driver can be divided into two parts – platform-dependent device
0101 discovery and set up, and platform-independent CAN network device
0102 implementation.
0103 
0104 .. _sec:socketcan:platdev:
0105 
0106 Platform device driver
0107 ^^^^^^^^^^^^^^^^^^^^^^
0108 
0109 In the case of Zynq, the core is connected via the AXI system bus, which
0110 does not have enumeration support, and the device must be specified in
0111 Device Tree. This kind of devices is called *platform device* in the
0112 kernel and is handled by a *platform device driver*\  [1]_.
0113 
0114 A platform device driver provides the following things:
0115 
0116 -  A *probe* function
0117 
0118 -  A *remove* function
0119 
0120 -  A table of *compatible* devices that the driver can handle
0121 
0122 The *probe* function is called exactly once when the device appears (or
0123 the driver is loaded, whichever happens later). If there are more
0124 devices handled by the same driver, the *probe* function is called for
0125 each one of them. Its role is to allocate and initialize resources
0126 required for handling the device, as well as set up low-level functions
0127 for the platform-independent layer, e.g., *read_reg* and *write_reg*.
0128 After that, the driver registers the device to a higher layer, in our
0129 case as a *network device*.
0130 
0131 The *remove* function is called when the device disappears, or the
0132 driver is about to be unloaded. It serves to free the resources
0133 allocated in *probe* and to unregister the device from higher layers.
0134 
0135 Finally, the table of *compatible* devices states which devices the
0136 driver can handle. The Device Tree entry ``compatible`` is matched
0137 against the tables of all *platform drivers*.
0138 
0139 .. code:: c
0140 
0141            /* Match table for OF platform binding */
0142            static const struct of_device_id ctucan_of_match[] = {
0143                { .compatible = "ctu,canfd-2", },
0144                { .compatible = "ctu,ctucanfd", },
0145                { /* end of list */ },
0146            };
0147            MODULE_DEVICE_TABLE(of, ctucan_of_match);
0148 
0149            static int ctucan_probe(struct platform_device *pdev);
0150            static int ctucan_remove(struct platform_device *pdev);
0151 
0152            static struct platform_driver ctucanfd_driver = {
0153                .probe  = ctucan_probe,
0154                .remove = ctucan_remove,
0155                .driver = {
0156                    .name = DRIVER_NAME,
0157                    .of_match_table = ctucan_of_match,
0158                },
0159            };
0160            module_platform_driver(ctucanfd_driver);
0161 
0162 
0163 .. _sec:socketcan:netdev:
0164 
0165 Network device driver
0166 ^^^^^^^^^^^^^^^^^^^^^
0167 
0168 Each network device must support at least these operations:
0169 
0170 -  Bring the device up: ``ndo_open``
0171 
0172 -  Bring the device down: ``ndo_close``
0173 
0174 -  Submit TX frames to the device: ``ndo_start_xmit``
0175 
0176 -  Signal TX completion and errors to the network subsystem: ISR
0177 
0178 -  Submit RX frames to the network subsystem: ISR and NAPI
0179 
0180 There are two possible event sources: the device and the network
0181 subsystem. Device events are usually signaled via an interrupt, handled
0182 in an Interrupt Service Routine (ISR). Handlers for the events
0183 originating in the network subsystem are then specified in
0184 ``struct net_device_ops``.
0185 
0186 When the device is brought up, e.g., by calling ``ip link set can0 up``,
0187 the driver’s function ``ndo_open`` is called. It should validate the
0188 interface configuration and configure and enable the device. The
0189 analogous opposite is ``ndo_close``, called when the device is being
0190 brought down, be it explicitly or implicitly.
0191 
0192 When the system should transmit a frame, it does so by calling
0193 ``ndo_start_xmit``, which enqueues the frame into the device. If the
0194 device HW queue (FIFO, mailboxes or whatever the implementation is)
0195 becomes full, the ``ndo_start_xmit`` implementation informs the network
0196 subsystem that it should stop the TX queue (via ``netif_stop_queue``).
0197 It is then re-enabled later in ISR when the device has some space
0198 available again and is able to enqueue another frame.
0199 
0200 All the device events are handled in ISR, namely:
0201 
0202 #. **TX completion**. When the device successfully finishes transmitting
0203    a frame, the frame is echoed locally. On error, an informative error
0204    frame [2]_ is sent to the network subsystem instead. In both cases,
0205    the software TX queue is resumed so that more frames may be sent.
0206 
0207 #. **Error condition**. If something goes wrong (e.g., the device goes
0208    bus-off or RX overrun happens), error counters are updated, and
0209    informative error frames are enqueued to SW RX queue.
0210 
0211 #. **RX buffer not empty**. In this case, read the RX frames and enqueue
0212    them to SW RX queue. Usually NAPI is used as a middle layer (see ).
0213 
0214 .. _sec:socketcan:napi:
0215 
0216 NAPI
0217 ~~~~
0218 
0219 The frequency of incoming frames can be high and the overhead to invoke
0220 the interrupt service routine for each frame can cause significant
0221 system load. There are multiple mechanisms in the Linux kernel to deal
0222 with this situation. They evolved over the years of Linux kernel
0223 development and enhancements. For network devices, the current standard
0224 is NAPI – *the New API*. It is similar to classical top-half/bottom-half
0225 interrupt handling in that it only acknowledges the interrupt in the ISR
0226 and signals that the rest of the processing should be done in softirq
0227 context. On top of that, it offers the possibility to *poll* for new
0228 frames for a while. This has a potential to avoid the costly round of
0229 enabling interrupts, handling an incoming IRQ in ISR, re-enabling the
0230 softirq and switching context back to softirq.
0231 
0232 More detailed documentation of NAPI may be found on the pages of Linux
0233 Foundation `<https://wiki.linuxfoundation.org/networking/napi>`_.
0234 
0235 Integrating the core to Xilinx Zynq
0236 -----------------------------------
0237 
0238 The core interfaces a simple subset of the Avalon
0239 (search for Intel **Avalon Interface Specifications**)
0240 bus as it was originally used on
0241 Alterra FPGA chips, yet Xilinx natively interfaces with AXI
0242 (search for ARM **AMBA AXI and ACE Protocol Specification AXI3,
0243 AXI4, and AXI4-Lite, ACE and ACE-Lite**).
0244 The most obvious solution would be to use
0245 an Avalon/AXI bridge or implement some simple conversion entity.
0246 However, the core’s interface is half-duplex with no handshake
0247 signaling, whereas AXI is full duplex with two-way signaling. Moreover,
0248 even AXI-Lite slave interface is quite resource-intensive, and the
0249 flexibility and speed of AXI are not required for a CAN core.
0250 
0251 Thus a much simpler bus was chosen – APB (Advanced Peripheral Bus)
0252 (search for ARM **AMBA APB Protocol Specification**).
0253 APB-AXI bridge is directly available in
0254 Xilinx Vivado, and the interface adaptor entity is just a few simple
0255 combinatorial assignments.
0256 
0257 Finally, to be able to include the core in a block diagram as a custom
0258 IP, the core, together with the APB interface, has been packaged as a
0259 Vivado component.
0260 
0261 CTU CAN FD Driver design
0262 ------------------------
0263 
0264 The general structure of a CAN device driver has already been examined
0265 in . The next paragraphs provide a more detailed description of the CTU
0266 CAN FD core driver in particular.
0267 
0268 Low-level driver
0269 ~~~~~~~~~~~~~~~~
0270 
0271 The core is not intended to be used solely with SocketCAN, and thus it
0272 is desirable to have an OS-independent low-level driver. This low-level
0273 driver can then be used in implementations of OS driver or directly
0274 either on bare metal or in a user-space application. Another advantage
0275 is that if the hardware slightly changes, only the low-level driver
0276 needs to be modified.
0277 
0278 The code [3]_ is in part automatically generated and in part written
0279 manually by the core author, with contributions of the thesis’ author.
0280 The low-level driver supports operations such as: set bit timing, set
0281 controller mode, enable/disable, read RX frame, write TX frame, and so
0282 on.
0283 
0284 Configuring bit timing
0285 ~~~~~~~~~~~~~~~~~~~~~~
0286 
0287 On CAN, each bit is divided into four segments: SYNC, PROP, PHASE1, and
0288 PHASE2. Their duration is expressed in multiples of a Time Quantum
0289 (details in `CAN Specification, Version 2.0 <http://esd.cs.ucr.edu/webres/can20.pdf>`_, chapter 8).
0290 When configuring
0291 bitrate, the durations of all the segments (and time quantum) must be
0292 computed from the bitrate and Sample Point. This is performed
0293 independently for both the Nominal bitrate and Data bitrate for CAN FD.
0294 
0295 SocketCAN is fairly flexible and offers either highly customized
0296 configuration by setting all the segment durations manually, or a
0297 convenient configuration by setting just the bitrate and sample point
0298 (and even that is chosen automatically per Bosch recommendation if not
0299 specified). However, each CAN controller may have different base clock
0300 frequency and different width of segment duration registers. The
0301 algorithm thus needs the minimum and maximum values for the durations
0302 (and clock prescaler) and tries to optimize the numbers to fit both the
0303 constraints and the requested parameters.
0304 
0305 .. code:: c
0306 
0307            struct can_bittiming_const {
0308                char name[16];      /* Name of the CAN controller hardware */
0309                __u32 tseg1_min;    /* Time segment 1 = prop_seg + phase_seg1 */
0310                __u32 tseg1_max;
0311                __u32 tseg2_min;    /* Time segment 2 = phase_seg2 */
0312                __u32 tseg2_max;
0313                __u32 sjw_max;      /* Synchronisation jump width */
0314                __u32 brp_min;      /* Bit-rate prescaler */
0315                __u32 brp_max;
0316                __u32 brp_inc;
0317            };
0318 
0319 
0320 [lst:can_bittiming_const]
0321 
0322 A curious reader will notice that the durations of the segments PROP_SEG
0323 and PHASE_SEG1 are not determined separately but rather combined and
0324 then, by default, the resulting TSEG1 is evenly divided between PROP_SEG
0325 and PHASE_SEG1. In practice, this has virtually no consequences as the
0326 sample point is between PHASE_SEG1 and PHASE_SEG2. In CTU CAN FD,
0327 however, the duration registers ``PROP`` and ``PH1`` have different
0328 widths (6 and 7 bits, respectively), so the auto-computed values might
0329 overflow the shorter register and must thus be redistributed among the
0330 two [4]_.
0331 
0332 Handling RX
0333 ~~~~~~~~~~~
0334 
0335 Frame reception is handled in NAPI queue, which is enabled from ISR when
0336 the RXNE (RX FIFO Not Empty) bit is set. Frames are read one by one
0337 until either no frame is left in the RX FIFO or the maximum work quota
0338 has been reached for the NAPI poll run (see ). Each frame is then passed
0339 to the network interface RX queue.
0340 
0341 An incoming frame may be either a CAN 2.0 frame or a CAN FD frame. The
0342 way to distinguish between these two in the kernel is to allocate either
0343 ``struct can_frame`` or ``struct canfd_frame``, the two having different
0344 sizes. In the controller, the information about the frame type is stored
0345 in the first word of RX FIFO.
0346 
0347 This brings us a chicken-egg problem: we want to allocate the ``skb``
0348 for the frame, and only if it succeeds, fetch the frame from FIFO;
0349 otherwise keep it there for later. But to be able to allocate the
0350 correct ``skb``, we have to fetch the first work of FIFO. There are
0351 several possible solutions:
0352 
0353 #. Read the word, then allocate. If it fails, discard the rest of the
0354    frame. When the system is low on memory, the situation is bad anyway.
0355 
0356 #. Always allocate ``skb`` big enough for an FD frame beforehand. Then
0357    tweak the ``skb`` internals to look like it has been allocated for
0358    the smaller CAN 2.0 frame.
0359 
0360 #. Add option to peek into the FIFO instead of consuming the word.
0361 
0362 #. If the allocation fails, store the read word into driver’s data. On
0363    the next try, use the stored word instead of reading it again.
0364 
0365 Option 1 is simple enough, but not very satisfying if we could do
0366 better. Option 2 is not acceptable, as it would require modifying the
0367 private state of an integral kernel structure. The slightly higher
0368 memory consumption is just a virtual cherry on top of the “cake”. Option
0369 3 requires non-trivial HW changes and is not ideal from the HW point of
0370 view.
0371 
0372 Option 4 seems like a good compromise, with its disadvantage being that
0373 a partial frame may stay in the FIFO for a prolonged time. Nonetheless,
0374 there may be just one owner of the RX FIFO, and thus no one else should
0375 see the partial frame (disregarding some exotic debugging scenarios).
0376 Basides, the driver resets the core on its initialization, so the
0377 partial frame cannot be “adopted” either. In the end, option 4 was
0378 selected [5]_.
0379 
0380 .. _subsec:ctucanfd:rxtimestamp:
0381 
0382 Timestamping RX frames
0383 ^^^^^^^^^^^^^^^^^^^^^^
0384 
0385 The CTU CAN FD core reports the exact timestamp when the frame has been
0386 received. The timestamp is by default captured at the sample point of
0387 the last bit of EOF but is configurable to be captured at the SOF bit.
0388 The timestamp source is external to the core and may be up to 64 bits
0389 wide. At the time of writing, passing the timestamp from kernel to
0390 userspace is not yet implemented, but is planned in the future.
0391 
0392 Handling TX
0393 ~~~~~~~~~~~
0394 
0395 The CTU CAN FD core has 4 independent TX buffers, each with its own
0396 state and priority. When the core wants to transmit, a TX buffer in
0397 Ready state with the highest priority is selected.
0398 
0399 The priorities are 3bit numbers in register TX_PRIORITY
0400 (nibble-aligned). This should be flexible enough for most use cases.
0401 SocketCAN, however, supports only one FIFO queue for outgoing
0402 frames [6]_. The buffer priorities may be used to simulate the FIFO
0403 behavior by assigning each buffer a distinct priority and *rotating* the
0404 priorities after a frame transmission is completed.
0405 
0406 In addition to priority rotation, the SW must maintain head and tail
0407 pointers into the FIFO formed by the TX buffers to be able to determine
0408 which buffer should be used for next frame (``txb_head``) and which
0409 should be the first completed one (``txb_tail``). The actual buffer
0410 indices are (obviously) modulo 4 (number of TX buffers), but the
0411 pointers must be at least one bit wider to be able to distinguish
0412 between FIFO full and FIFO empty – in this situation,
0413 :math:`txb\_head \equiv txb\_tail\ (\textrm{mod}\ 4)`. An example of how
0414 the FIFO is maintained, together with priority rotation, is depicted in
0415 
0416 |
0417 
0418 +------+---+---+---+---+
0419 | TXB# | 0 | 1 | 2 | 3 |
0420 +======+===+===+===+===+
0421 | Seq  | A | B | C |   |
0422 +------+---+---+---+---+
0423 | Prio | 7 | 6 | 5 | 4 |
0424 +------+---+---+---+---+
0425 |      |   | T |   | H |
0426 +------+---+---+---+---+
0427 
0428 |
0429 
0430 +------+---+---+---+---+
0431 | TXB# | 0 | 1 | 2 | 3 |
0432 +======+===+===+===+===+
0433 | Seq  |   | B | C |   |
0434 +------+---+---+---+---+
0435 | Prio | 4 | 7 | 6 | 5 |
0436 +------+---+---+---+---+
0437 |      |   | T |   | H |
0438 +------+---+---+---+---+
0439 
0440 |
0441 
0442 +------+---+---+---+---+----+
0443 | TXB# | 0 | 1 | 2 | 3 | 0’ |
0444 +======+===+===+===+===+====+
0445 | Seq  | E | B | C | D |    |
0446 +------+---+---+---+---+----+
0447 | Prio | 4 | 7 | 6 | 5 |    |
0448 +------+---+---+---+---+----+
0449 |      |   | T |   |   | H  |
0450 +------+---+---+---+---+----+
0451 
0452 |
0453 
0454 .. kernel-figure:: fsm_txt_buffer_user.svg
0455 
0456    TX Buffer states with possible transitions
0457 
0458 .. _subsec:ctucanfd:txtimestamp:
0459 
0460 Timestamping TX frames
0461 ^^^^^^^^^^^^^^^^^^^^^^
0462 
0463 When submitting a frame to a TX buffer, one may specify the timestamp at
0464 which the frame should be transmitted. The frame transmission may start
0465 later, but not sooner. Note that the timestamp does not participate in
0466 buffer prioritization – that is decided solely by the mechanism
0467 described above.
0468 
0469 Support for time-based packet transmission was recently merged to Linux
0470 v4.19 `Time-based packet transmission <https://lwn.net/Articles/748879/>`_,
0471 but it remains yet to be researched
0472 whether this functionality will be practical for CAN.
0473 
0474 Also similarly to retrieving the timestamp of RX frames, the core
0475 supports retrieving the timestamp of TX frames – that is the time when
0476 the frame was successfully delivered. The particulars are very similar
0477 to timestamping RX frames and are described in .
0478 
0479 Handling RX buffer overrun
0480 ~~~~~~~~~~~~~~~~~~~~~~~~~~
0481 
0482 When a received frame does no more fit into the hardware RX FIFO in its
0483 entirety, RX FIFO overrun flag (STATUS[DOR]) is set and Data Overrun
0484 Interrupt (DOI) is triggered. When servicing the interrupt, care must be
0485 taken first to clear the DOR flag (via COMMAND[CDO]) and after that
0486 clear the DOI interrupt flag. Otherwise, the interrupt would be
0487 immediately [7]_ rearmed.
0488 
0489 **Note**: During development, it was discussed whether the internal HW
0490 pipelining cannot disrupt this clear sequence and whether an additional
0491 dummy cycle is necessary between clearing the flag and the interrupt. On
0492 the Avalon interface, it indeed proved to be the case, but APB being
0493 safe because it uses 2-cycle transactions. Essentially, the DOR flag
0494 would be cleared, but DOI register’s Preset input would still be high
0495 the cycle when the DOI clear request would also be applied (by setting
0496 the register’s Reset input high). As Set had higher priority than Reset,
0497 the DOI flag would not be reset. This has been already fixed by swapping
0498 the Set/Reset priority (see issue #187).
0499 
0500 Reporting Error Passive and Bus Off conditions
0501 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0502 
0503 It may be desirable to report when the node reaches *Error Passive*,
0504 *Error Warning*, and *Bus Off* conditions. The driver is notified about
0505 error state change by an interrupt (EPI, EWLI), and then proceeds to
0506 determine the core’s error state by reading its error counters.
0507 
0508 There is, however, a slight race condition here – there is a delay
0509 between the time when the state transition occurs (and the interrupt is
0510 triggered) and when the error counters are read. When EPI is received,
0511 the node may be either *Error Passive* or *Bus Off*. If the node goes
0512 *Bus Off*, it obviously remains in the state until it is reset.
0513 Otherwise, the node is *or was* *Error Passive*. However, it may happen
0514 that the read state is *Error Warning* or even *Error Active*. It may be
0515 unclear whether and what exactly to report in that case, but I
0516 personally entertain the idea that the past error condition should still
0517 be reported. Similarly, when EWLI is received but the state is later
0518 detected to be *Error Passive*, *Error Passive* should be reported.
0519 
0520 
0521 CTU CAN FD Driver Sources Reference
0522 -----------------------------------
0523 
0524 .. kernel-doc:: drivers/net/can/ctucanfd/ctucanfd.h
0525    :internal:
0526 
0527 .. kernel-doc:: drivers/net/can/ctucanfd/ctucanfd_base.c
0528    :internal:
0529 
0530 .. kernel-doc:: drivers/net/can/ctucanfd/ctucanfd_pci.c
0531    :internal:
0532 
0533 .. kernel-doc:: drivers/net/can/ctucanfd/ctucanfd_platform.c
0534    :internal:
0535 
0536 CTU CAN FD IP Core and Driver Development Acknowledgment
0537 ---------------------------------------------------------
0538 
0539 * Odrej Ille <ondrej.ille@gmail.com>
0540 
0541   * started the project as student at Department of Measurement, FEE, CTU
0542   * invested great amount of personal time and enthusiasm to the project over years
0543   * worked on more funded tasks
0544 
0545 * `Department of Measurement <https://meas.fel.cvut.cz/>`_,
0546   `Faculty of Electrical Engineering <http://www.fel.cvut.cz/en/>`_,
0547   `Czech Technical University <https://www.cvut.cz/en>`_
0548 
0549   * is the main investor into the project over many years
0550   * uses project in their CAN/CAN FD diagnostics framework for `Skoda Auto <https://www.skoda-auto.cz/>`_
0551 
0552 * `Digiteq Automotive <https://www.digiteqautomotive.com/en>`_
0553 
0554   * funding of the project CAN FD Open Cores Support Linux Kernel Based Systems
0555   * negotiated and paid CTU to allow public access to the project
0556   * provided additional funding of the work
0557 
0558 * `Department of Control Engineering <https://control.fel.cvut.cz/en>`_,
0559   `Faculty of Electrical Engineering <http://www.fel.cvut.cz/en/>`_,
0560   `Czech Technical University <https://www.cvut.cz/en>`_
0561 
0562   * solving the project CAN FD Open Cores Support Linux Kernel Based Systems
0563   * providing GitLab management
0564   * virtual servers and computational power for continuous integration
0565   * providing hardware for HIL continuous integration tests
0566 
0567 * `PiKRON Ltd. <http://pikron.com/>`_
0568 
0569   * minor funding to initiate preparation of the project open-sourcing
0570 
0571 * Petr Porazil <porazil@pikron.com>
0572 
0573   * design of PCIe transceiver addon board and assembly of boards
0574   * design and assembly of MZ_APO baseboard for MicroZed/Zynq based system
0575 
0576 * Martin Jerabek <martin.jerabek01@gmail.com>
0577 
0578   * Linux driver development
0579   * continuous integration platform architect and GHDL updates
0580   * theses `Open-source and Open-hardware CAN FD Protocol Support <https://dspace.cvut.cz/bitstream/handle/10467/80366/F3-DP-2019-Jerabek-Martin-Jerabek-thesis-2019-canfd.pdf>`_
0581 
0582 * Jiri Novak <jnovak@fel.cvut.cz>
0583 
0584   * project initiation, management and use at Department of Measurement, FEE, CTU
0585 
0586 * Pavel Pisa <pisa@cmp.felk.cvut.cz>
0587 
0588   * initiate open-sourcing, project coordination, management at Department of Control Engineering, FEE, CTU
0589 
0590 * Jaroslav Beran<jara.beran@gmail.com>
0591 
0592  * system integration for Intel SoC, core and driver testing and updates
0593 
0594 * Carsten Emde (`OSADL <https://www.osadl.org/>`_)
0595 
0596  * provided OSADL expertise to discuss IP core licensing
0597  * pointed to possible deadlock for LGPL and CAN bus possible patent case which lead to relicense IP core design to BSD like license
0598 
0599 * Reiner Zitzmann and Holger Zeltwanger (`CAN in Automation <https://www.can-cia.org/>`_)
0600 
0601  * provided suggestions and help to inform community about the project and invited us to events focused on CAN bus future development directions
0602 
0603 * Jan Charvat
0604 
0605  * implemented CTU CAN FD functional model for QEMU which has been integrated into QEMU mainline (`docs/system/devices/can.rst <https://www.qemu.org/docs/master/system/devices/can.html>`_)
0606  * Bachelor theses Model of CAN FD Communication Controller for QEMU Emulator
0607 
0608 Notes
0609 -----
0610 
0611 
0612 .. [1]
0613    Other buses have their own specific driver interface to set up the
0614    device.
0615 
0616 .. [2]
0617    Not to be mistaken with CAN Error Frame. This is a ``can_frame`` with
0618    ``CAN_ERR_FLAG`` set and some error info in its ``data`` field.
0619 
0620 .. [3]
0621    Available in CTU CAN FD repository
0622    `<https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core>`_
0623 
0624 .. [4]
0625    As is done in the low-level driver functions
0626    ``ctucan_hw_set_nom_bittiming`` and
0627    ``ctucan_hw_set_data_bittiming``.
0628 
0629 .. [5]
0630    At the time of writing this thesis, option 1 is still being used and
0631    the modification is queued in gitlab issue #222
0632 
0633 .. [6]
0634    Strictly speaking, multiple CAN TX queues are supported since v4.19
0635    `can: enable multi-queue for SocketCAN devices <https://lore.kernel.org/patchwork/patch/913526/>`_ but no mainline driver is using
0636    them yet.
0637 
0638 .. [7]
0639    Or rather in the next clock cycle