diff options
author | Vincent Mailhol <mailhol.vincent@wanadoo.fr> | 2021-02-24 09:20:04 +0900 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2021-03-30 11:14:44 +0200 |
commit | 289ea9e4ae595545e736a63ccaadba65f880e9a4 (patch) | |
tree | 99332839339a7f2a05ce720d1d79faf3a0f9fba6 /include/linux/can/dev.h | |
parent | f318482a1c57315d0efccd2861f153f55c2117c6 (diff) | |
download | linux-289ea9e4ae595545e736a63ccaadba65f880e9a4.tar.gz linux-289ea9e4ae595545e736a63ccaadba65f880e9a4.tar.bz2 linux-289ea9e4ae595545e736a63ccaadba65f880e9a4.zip |
can: add new CAN FD bittiming parameters: Transmitter Delay Compensation (TDC)
At high bit rates, the propagation delay from the TX pin to the RX pin
of the transceiver causes measurement errors: the sample point on the
RX pin might occur on the previous bit.
This issue is addressed in ISO 11898-1 section 11.3.3 "Transmitter
delay compensation" (TDC).
This patch adds two new structures: can_tdc and can_tdc_const in order
to implement this TDC.
The structures are then added to can_priv.
A controller supports TDC if an only if can_priv::tdc_const is not
NULL.
TDC is active if and only if:
- fd flag is on
- can_priv::tdc.tdco is not zero.
It is the driver responsibility to check those two conditions are met.
No new controller modes are introduced (i.e. no CAN_CTRL_MODE_TDC) in
order not to be redundant with above logic.
The names of the parameters are chosen to match existing CAN
controllers specification. References:
- Bosch C_CAN FD8:
https://www.bosch-semiconductors.com/media/ip_modules/pdf_2/c_can_fd8/users_manual_c_can_fd8_r210_1.pdf
- Microchip CAN FD Controller Module:
http://ww1.microchip.com/downloads/en/DeviceDoc/MCP251XXFD-CAN-FD-Controller-Module-Family-Reference-Manual-20005678B.pdf
- SAM E701/S70/V70/V71 Family:
https://www.mouser.com/datasheet/2/268/60001527A-1284321.pdf
Link: https://lore.kernel.org/r/20210224002008.4158-2-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'include/linux/can/dev.h')
-rw-r--r-- | include/linux/can/dev.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index ac4d83a1ab81..4795da0eb949 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h @@ -42,6 +42,9 @@ struct can_priv { struct can_bittiming bittiming, data_bittiming; const struct can_bittiming_const *bittiming_const, *data_bittiming_const; + struct can_tdc tdc; + const struct can_tdc_const *tdc_const; + const u16 *termination_const; unsigned int termination_const_cnt; u16 termination; |