public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vincent Mailhol <mailhol@kernel.org>
To: Pavel Pisa <pisa@fel.cvut.cz>,
	linux-can@vger.kernel.org, Marc Kleine-Budde <mkl@pengutronix.de>,
	David Laight <david.laight.linux@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Andrea Daoud <andreadaoud6@gmail.com>,
	Wolfgang Grandegger <wg@grandegger.com>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org
Cc: Jiri Novak <jnovak@fel.cvut.cz>, Ondrej Ille <ondrej.ille@gmail.com>
Subject: Re: [PATCH v2] can: ctucanfd: fix SSP_SRC in cases when bit-rate is higher than 1 MBit.
Date: Mon, 5 Jan 2026 21:27:11 +0100	[thread overview]
Message-ID: <c5851986-837b-4ffb-9bf7-3131cf9c05d1@kernel.org> (raw)
In-Reply-To: <20260105111620.16580-1-pisa@fel.cvut.cz>



Le 05/01/2026 à 12:16, Pavel Pisa a écrit :
> From: Ondrej Ille <ondrej.ille@gmail.com>
> 
> The Secondary Sample Point Source field has been
> set to an incorrect value by some mistake in the
> past
> 
>   0b01 - SSP_SRC_NO_SSP - SSP is not used.
> 
> for data bitrates above 1 MBit/s. The correct/default
> value already used for lower bitrates is

Where does this 1 MBit/s threshold come from? Is this an empirical value?

The check is normally done on the data BRP. For example we had some
problems on the mcp251xfd, c.f. commit 5e1663810e11 ("can: mcp251xfd:
fix TDC setting for low data bit rates").

Can you use the TDC framework? Not only would you get a correct
calculation for when to activate/deactivate TDC, you will also have the
netlink reporting (refer to the above commit for an example).

>   0b00 - SSP_SRC_MEAS_N_OFFSET - SSP position = TRV_DELAY
>          (Measured Transmitter delay) + SSP_OFFSET.
> 
> The related configuration register structure is described
> in section 3.1.46 SSP_CFG of the CTU CAN FD
> IP CORE Datasheet.
> 
> The analysis leading to the proper configuration
> is described in section 2.8.3 Secondary sampling point
> of the datasheet.
> 
> The change has been tested on AMD/Xilinx Zynq
> with the next CTU CN FD IP core versions:
> 
>  - 2.6 aka master in the "integration with Zynq-7000 system" test
>    6.12.43-rt12+ #1 SMP PREEMPT_RT kernel with CTU CAN FD git
>    driver (change already included in the driver repo)
>  - older 2.5 snapshot with mainline kernels with this patch
>    applied locally in the multiple CAN latency tester nightly runs
>    6.18.0-rc4-rt3-dut #1 SMP PREEMPT_RT
>    6.19.0-rc3-dut
> 
> The logs, the datasheet and sources are available at
> 
>  https://canbus.pages.fel.cvut.cz/
> 
> Signed-off-by: Ondrej Ille <ondrej.ille@gmail.com>
> Signed-off-by: Pavel Pisa <pisa@fel.cvut.cz>


Yours sincerely,
Vincent Mailhol


  parent reply	other threads:[~2026-01-05 20:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 11:16 [PATCH v2] can: ctucanfd: fix SSP_SRC in cases when bit-rate is higher than 1 MBit Pavel Pisa
2026-01-05 12:49 ` Marc Kleine-Budde
2026-01-05 20:27 ` Vincent Mailhol [this message]
2026-01-06  0:53   ` Pavel Pisa
2026-01-06 22:14     ` Vincent Mailhol
2026-01-09  9:29       ` Marc Kleine-Budde
2026-01-09 10:50         ` Vincent Mailhol
2026-01-09 10:56           ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c5851986-837b-4ffb-9bf7-3131cf9c05d1@kernel.org \
    --to=mailhol@kernel.org \
    --cc=andreadaoud6@gmail.com \
    --cc=davem@davemloft.net \
    --cc=david.laight.linux@gmail.com \
    --cc=jnovak@fel.cvut.cz \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=ondrej.ille@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=pisa@fel.cvut.cz \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox