Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2693489pxp; Tue, 22 Mar 2022 04:17:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKf8KkWJWZo3M3k+un8uP8AKI3oeStxHtex5oex/LYGANTSvXt80bvrOn2Z/Cp5HKPgiTY X-Received: by 2002:a17:90a:fcc:b0:1c6:62b5:45c0 with SMTP id 70-20020a17090a0fcc00b001c662b545c0mr4361667pjz.133.1647947868313; Tue, 22 Mar 2022 04:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647947868; cv=none; d=google.com; s=arc-20160816; b=jppchPEIDBBrjvzTflcpMx6XuV4/8D55H5yGny928wY3hSKNPDqqBbxpcMtkXGP9Mb QeTTl98tMwIu+GTdHKyUn3kv4FBe+3ObziqlC07UAOFG160NOtViPbrfSPGr+WJvDnt2 teYLo6TIdECo2Rkevx4JSLvEL1CU6Bs/bW9VbatFjNpzgfF5QesZ6g7dt40YUPT2qS59 bZ27Ykuz2GJm+zq49OIMNlRYLFl1LnI8ZXM3Yv8ep87s3TPwpO4rNcmeo3kD1QNijqpt nf3ARLHS5JUO1Zx1qihpu9WQRAwDSkwx6EsUZNO0le3Ywax13NqJatinNoBtXRuIqp9N 5ssQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:content-disposition :content-transfer-encoding:mime-version:in-reply-to:references:cc :user-agent:date:subject:to:from; bh=EazmRQc/RydZ2w5cYa+QMi1CmQt0WBNDDxr1mQ3XFzg=; b=H7UrfPQ2O5Qq1GsuOSSxqPgS3a04OjMsm+zU5vOeRQCrVY2ybln0A7H7I192ROO+Pf U8pnGq/uNrL9/g1MPGpjctJiMiZjzAQDATACMLp3YMpirN2z2RnF9K4std3y9LYN5H00 CNHvmFirAhmQm7smUjwhZFzHeQXEYlo7BryXkp+cUbrlzSZGDR4/jaWGXF/aZmPI1RA1 fT8JLKrrM4VY9uol53J3kU/ZujwU4yk6CSjtzpX+rWfVNmhWeOBq6FXH0RQTCjfKr++F y5wSXGKAlfNtjFJ9hDPGLQlxqfrZgkgzin78O7Hprbwvljvf3BtWCl5ui7cwM34/cwqR 6zjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmp.felk.cvut.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s21-20020a170902b19500b00153b2d16667si3006632plr.623.2022.03.22.04.17.35; Tue, 22 Mar 2022 04:17:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmp.felk.cvut.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbiCVIUI convert rfc822-to-8bit (ORCPT + 99 others); Tue, 22 Mar 2022 04:20:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229971AbiCVIUG (ORCPT ); Tue, 22 Mar 2022 04:20:06 -0400 Received: from mailgw.felk.cvut.cz (mailgw.felk.cvut.cz [147.32.82.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 028F15A5A3; Tue, 22 Mar 2022 01:18:36 -0700 (PDT) Received: from mailgw.felk.cvut.cz (localhost.localdomain [127.0.0.1]) by mailgw.felk.cvut.cz (Proxmox) with ESMTP id 3027330AE012; Tue, 22 Mar 2022 09:18:35 +0100 (CET) Received: from cmp.felk.cvut.cz (haar.felk.cvut.cz [147.32.84.19]) by mailgw.felk.cvut.cz (Proxmox) with ESMTPS id 41F7530AE000; Tue, 22 Mar 2022 09:18:34 +0100 (CET) Received: from haar.felk.cvut.cz (localhost [127.0.0.1]) by cmp.felk.cvut.cz (8.14.0/8.12.3/SuSE Linux 0.6) with ESMTP id 22M8IYRq010948; Tue, 22 Mar 2022 09:18:34 +0100 Received: (from pisa@localhost) by haar.felk.cvut.cz (8.14.0/8.13.7/Submit) id 22M8IXBX010947; Tue, 22 Mar 2022 09:18:33 +0100 X-Authentication-Warning: haar.felk.cvut.cz: pisa set sender to pisa@cmp.felk.cvut.cz using -f From: Pavel Pisa To: "Marc Kleine-Budde" Subject: Re: [PATCH v8 0/7] CTU CAN FD open-source IP core SocketCAN driver, PCI, platform integration and documentation Date: Tue, 22 Mar 2022 09:18:32 +0100 User-Agent: KMail/1.9.10 Cc: linux-can@vger.kernel.org, devicetree@vger.kernel.org, Oliver Hartkopp , Wolfgang Grandegger , David Miller , Rob Herring , mark.rutland@arm.com, Carsten Emde , armbru@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Marin Jerabek , Ondrej Ille , Jiri Novak , Jaroslav Beran , Petr Porazil , Pavel Machek , Drew Fustini References: <20220322074622.5gkjhs25epurecvx@pengutronix.de> In-Reply-To: <20220322074622.5gkjhs25epurecvx@pengutronix.de> X-KMail-QuotePrefix: > MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Message-Id: <202203220918.33033.pisa@cmp.felk.cvut.cz> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Marc, thanks for positive reply for our years effort. On Tuesday 22 of March 2022 08:46:22 Marc Kleine-Budde wrote: > On 22.03.2022 00:32:27, Pavel Pisa wrote: > > This driver adds support for the CTU CAN FD open-source IP core. > > The driver looks much better now. Good work. Please have a look at the > TX path of the mcp251xfd driver, especially the tx_stop_queue and > tx_wake_queue in mcp251xfd_start_xmit() and mcp251xfd_handle_tefif(). A > lockless implementation should work in your hardware, too. Is this blocker for now? I would like to start with years tested base. We have HW timestamping implemented for actual stable CTU CAN FD IP core version, support for variable number of TX buffers which count can be parameterized up to 8 in the prepared version and long term desire to configurable-SW defined multi-queue which our HW interface allows to dynamically server by รก TX buffers. But plan is to keep combinations of the design and driver compatible from the actual revision. I would be happy if we can agree on some base/minimal support and get it into mainline and use it as base for the followup patch series. I understand that I have sent code late for actual merge window, but I am really loaded by teaching, related RISC-V simulator https://github.com/cvut/qtrvsim , ESA and robotic projects at company. So I would prefer to go step by step and cooperate on updates and testing with my diploma students. > BTW: The PROP_SEG/PHASE_SEG1 issue is known: > > +A curious reader will notice that the durations of the segments PROP_SEG > > +and PHASE_SEG1 are not determined separately but rather combined and > > +then, by default, the resulting TSEG1 is evenly divided between PROP_SEG > > +and PHASE_SEG1. > > and the flexcan IP core in CAN-FD mode has the same problem. When > working on the bit timing parameter, I'll plan to have separate > PROP_SEG/PHASE_SEG1 min/max in the kernel, so that the bit timing > algorithm can take care of this. Hmm, when I have thought about that years ago I have not noticed real difference when time quanta is move between PROP_SEG and PHASE_SEG1. So for me it had no influence on the algorithm computation and could be done on the chip level when minimal and maximal sum is respected. But may it be I have overlooked something and there is difference for CAN FD. May it be my colleagues Jiri Novak and Ondrej Ille are more knowable. As for the optimal timequantas per bit value, I agree that it is not so simple. In the fact SJW and even tipple-sampling should be defined in percentage of bit time and then all should be optimized together and even combination with slight bitrate error should be preferred against other exact matching when there is significant difference in the other parameters values. But I am not ready to dive into it till our ESA space NanoXplore FPGA project passes final stage... By the way we have received report from Andrew Dennison about successful integration of CTU CAN FD into Litex based RISC-V system. Tested with the Linux our Linux kernel driver. The first iteration there, but he reported that some corrections from his actual development needs to be added to the public repo still to be usable out of the box https://github.com/AndrewD/litecan Best wishes, Pavel Pisa phone: +420 603531357 e-mail: pisa@cmp.felk.cvut.cz Department of Control Engineering FEE CVUT Karlovo namesti 13, 121 35, Prague 2 university: http://dce.fel.cvut.cz/ personal: http://cmp.felk.cvut.cz/~pisa projects: https://www.openhub.net/accounts/ppisa CAN related:http://canbus.pages.fel.cvut.cz/ Open Technologies Research Education and Exchange Services https://gitlab.fel.cvut.cz/otrees/org/-/wikis/home