Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1492624pxj; Fri, 18 Jun 2021 08:17:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAemeoAxAi9asHWobXxHrHjcByrAxHrCRVXhteaINZHmdKmI7vDhL5x2Ei/HWZZJt7aXiZ X-Received: by 2002:a02:cd8c:: with SMTP id l12mr3726412jap.111.1624029463867; Fri, 18 Jun 2021 08:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624029463; cv=none; d=google.com; s=arc-20160816; b=RSR+y+2ehqKylIHmuoJgJNxZAFrd17B2ch+w+WQggJ1TEHQdQFnielsxCptrKSlsx0 ElXrxmgrNCnDYj0D/LnRbSgrdFQ7A8/G5wN5697ss5NWd0rJKDV/MuaqArsGVb20+N7D NoCiaPhc6XtApfkUQPByFML6Ei9+uktUb6fuZ1iCkYj8r2W/SKFG++ya+zPp+J8SO3Jw x2Kc8bki6xzRW6lvVJ+v5MJHk0PK4pa3mEyVqOzdPjH6v+R/meOE5lnSXoK+YEwfrzb1 /nDQ/mGv3BQJidgqMrDLjFasPLXR4v9qTsczxywHzb6RaQ5c8GEEbFCzvYrWXFNXOQrg Mo6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=GmYDHUqIPNopHFPRBW+pZ21Hwg+r/5QHfev4SgGAEFQ=; b=FffBLApuFxN5w/aIqjJr9M/TM1ylamkcqHIPuH/uMr3M3TNscLDd7v4fGREm1JYGSA ju7re5gL7jpNfksg+r24iRlVTyPjv+Yv9RVOJgiYVvDcFr1GeQSeX7aHaQIL1SA6+0Lj Zp7OqnVqUizQTL8Vca5pdgQdsXTR5IS4Kok9Bv5yGzwfr3nSEEUeg0VRsYeHmznTLtBV Xzr614RjzM0a+cjNgEg645zV6uRK0qEOm2slUnVn9NfGhfLCxVXx+Tp8+KLsxyfmrhoL 4ev+iPWnHtmSX4IQwmG7aL4Esew4b0Pr1eI4xQbjvlBEwAG1fsfZxCiuDVEPDGT36rfp wxoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c93si8979702jai.83.2021.06.18.08.17.31; Fri, 18 Jun 2021 08:17:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233472AbhFRKZh convert rfc822-to-8bit (ORCPT + 99 others); Fri, 18 Jun 2021 06:25:37 -0400 Received: from mail-lf1-f49.google.com ([209.85.167.49]:37720 "EHLO mail-lf1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233092AbhFRKZf (ORCPT ); Fri, 18 Jun 2021 06:25:35 -0400 Received: by mail-lf1-f49.google.com with SMTP id p7so15746042lfg.4; Fri, 18 Jun 2021 03:23:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=5lJmmJOJ0EpO1wHCkdkF75XWhHVKX9ri+BWC0WJ2EQw=; b=Ep/eNkcTj/d/8jRI1yZK5IA8g9VfmdYQ9Wcca/W1ED9xABA47sa9fweFAPlzcDithF +0szjC+a+bYjASfu1orlrwL3zrM2LSr3NWmVcDnuk7Bfoc00UxQfYxTgEkCK+/eBT82c E5RhiqVEqoeU4P7ZfovZGo628eiNl7uCxyGh5AnSOAhrqM+Htj5uZVc+/NLjxQunFHBw NIwVflxk7+6pM5W3pLGux2Zb0AymjSGVEc2AL2jnQRahCFt10EVDD0rbJBCp7nllYLYd Ey0Tn0D0QLi+IZXnV4pTbKhE5Kxi9Nz+MCawtpr6WnCZm1tjL965JiDAV0fdOVRGeCwM 9LoQ== X-Gm-Message-State: AOAM531R+8eVj4GOW98J9S10JQufBvKLg9ZhA5oLevz7VYU8C1h44OKg kaberNXr/wNNBha9nPCNOG1HAFF6+q3jS9xW325sryhiVNHOjA== X-Received: by 2002:a05:6512:3d08:: with SMTP id d8mr2579457lfv.393.1624011804126; Fri, 18 Jun 2021 03:23:24 -0700 (PDT) MIME-Version: 1.0 References: <20210603151550.140727-1-mailhol.vincent@wanadoo.fr> <20210603151550.140727-3-mailhol.vincent@wanadoo.fr> <20210618093424.xohvsqaaq5qf2bjn@pengutronix.de> In-Reply-To: <20210618093424.xohvsqaaq5qf2bjn@pengutronix.de> From: Vincent MAILHOL Date: Fri, 18 Jun 2021 19:23:12 +0900 Message-ID: Subject: Re: [PATCH v2 2/2] can: netlink: add interface for CAN-FD Transmitter Delay Compensation (TDC) To: Marc Kleine-Budde Cc: linux-can , netdev , open list , Oliver Hartkopp Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri. 18 Jun 2021 at 18:34, Marc Kleine-Budde wrote: > On 04.06.2021 00:15:50, Vincent Mailhol wrote: > > Add the netlink interface for TDC parameters of struct can_tdc_const > > and can_tdc. > > > > Contrary to the can_bittiming(_const) structures for which there is > > just a single IFLA_CAN(_DATA)_BITTMING(_CONST) entry per structure, > > here, we create a nested entry IFLA_CAN_TDC. Within this nested entry, > > additional IFLA_CAN_TDC_TDC* entries are added for each of the TDC > > parameters of the newly introduced struct can_tdc_const and struct > > can_tdc. > > > > For struct can_tdc_const, these are: > > IFLA_CAN_TDC_TDCV_MAX > > IFLA_CAN_TDC_TDCO_MAX > > IFLA_CAN_TDC_TDCF_MAX > > > > For struct can_tdc, these are: > > IFLA_CAN_TDC_TDCV > > IFLA_CAN_TDC_TDCO > > IFLA_CAN_TDC_TDCF > > I just noticed in the mcp2518fd data sheet: > > | bit 14-8 TDCO[6:0]: Transmitter Delay Compensation Offset bits; > | Secondary Sample Point (SSP) Two’s complement; offset can be positive, > | zero, or negative. > | > | 011 1111 = 63 x TSYSCLK > | ... > | 000 0000 = 0 x TSYSCLK > | ... > | 111 1111 = –64 x TSYSCLK > > Have you takes this into account? I have not. And I fail to understand what would be the physical meaning if TDCO is zero or negative. TDCV indicates the position of the bit start on the RX pin. If TDCO is zero, the measurement occurs on the bit start when all the ringing occurs. That is a really bad choice to do the measurement. If it is negative, it means that you are measuring the previous bit o_O !? Maybe I am missing something but I just do not get it. I believe you started to implement the mcp2518fd. Can you force a zero and a negative value and tell me if the bus is stable? Yours sincerely, Vincent Mailhol