Skip to contentSkip to conversation

CTU CAN FD open-source IP core SocketCAN driver, PCI, platform integration and documentation

PATCH Superseded [email protected] 2 participants 13 messages Dec 21, 2019 – Aug 3, 2020

Subsystems (6)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

v3 cover CTU CAN FD open-source IP core SocketCAN driver, PCI, platform integration and documentation

From: Pavel Pisa <[email protected]>

This driver adds support for the CTU CAN FD open-source IP core. More documentation and core sources at project page
(https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core).
The core integration to Xilinx Zynq system as platform driver is available (https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top).
Implementation on Intel FGA based PCI Express board is available from project (https://gitlab.fel.cvut.cz/canbus/pcie-ctu_can_fd).
More about CAN related projects used and developed at the Faculty of the Electrical Engineering (http://www.fel.cvut.cz/en/)
of Czech Technical University (https://www.cvut.cz/en)
in at Prague http://canbus.pages.fel.cvut.cz/ .

Martin Jerabek (1):
can: ctucanfd: add support for CTU CAN FD open-source IP core - bus
independent part.

Pavel Pisa (5):
dt-bindings: vendor-prefix: add prefix for Czech Technical University
in Prague.
dt-bindings: net: can: binding for CTU CAN FD open-source IP core.
can: ctucanfd: CTU CAN FD open-source IP core - PCI bus support.
can: ctucanfd: CTU CAN FD open-source IP core - platform/SoC support.
docs: ctucanfd: CTU CAN FD open-source IP core documentation.

The version 3 chages:
- adapts device tree bindings documentation according to
Rob Herring suggestions.
- the driver has been separated to individual modules for core support, PCI bus integration and platform, SoC integration.
- the FPGA design has been cleaned up and CAN protocol FSM redesigned by Onrej Ille (the core redesign has been reason to pause attempts to driver submission)
- the work from February 2019 on core, test framework and driver 1601 commits in total, 436 commits in the core sources, 144 commits in the driver, 151 docuemnation, 502 in tests.
- not all continuos integration tests updated for latest design version yet
https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core/pipelines
- Zynq hardware in the loop test show no issues for after driver PCI and platform separation and latest VHDL sources updates.
- driver code has been periodically tested on 4.18.5-rt3 and 4.19 long term stable kernels.
- test of the patches before submission is run on 5.4 kernel
- the core has been integrated by Jaroslav Beran <[email protected]> into Intel FPGA based SoC used in the tester developed for Skoda auto at Department of Measurement, Faculty of Electrical Engineering, Czech Technical University https://meas.fel.cvut.cz/ . He has contributed feedbak and fixes to the project.

Ondrej Ille prepares the CTU CAN IP Core sources for new release now. It should happen in one or two months. Intention is to finalize review of the patches and updates according to the comments by that time, ideally to be on the way to mainline when IP is released.

DKMS CTU CAN FD driver build by OpenBuildService to ease integration into Debian systems when driver is not provided by the distribution

https://build.opensuse.org/package/show/home:ppisa/ctu_can_fd

Jan Charvat <[email protected]> started the work to extend our already mainlined QEMU SJA1000 and SocketCAN support to provide even CAN FD support and CTU CAN FD core support

https://gitlab.fel.cvut.cz/canbus/qemu-canbus/tree/charvj10-canfd

Planned time of the thesis submission is the summer 2020. QEMU mainlining efforts should start in optimal case by that time.

Thanks in advance to all who help us to deliver the project into public.

Thanks to all colleagues, reviewers and other providing feedback, infrastructure and enthusiasm and motivation for open-source work.

Build infrastructure and hardware is provided by
Department of Control Engineering,
Faculty of Electrical Engineering,
Czech Technical University in Prague
https://dce.fel.cvut.cz/en

 .../devicetree/bindings/net/can/ctu,ctucanfd.txt   |   61 ++
 .../devicetree/bindings/vendor-prefixes.yaml       |    2 +
 .../device_drivers/ctu/FSM_TXT_Buffer_user.png     |  Bin 0 -> 174807 bytes
 .../device_drivers/ctu/ctucanfd-driver.rst         |  613 +++++++++++
 drivers/net/can/Kconfig                            |    1 +
 drivers/net/can/Makefile                           |    1 +
 drivers/net/can/ctucanfd/Kconfig                   |   38 +
 drivers/net/can/ctucanfd/Makefile                  |   13 +
 drivers/net/can/ctucanfd/ctu_can_fd.c              | 1116 ++++++++++++++++++++
 drivers/net/can/ctucanfd/ctu_can_fd.h              |   88 ++
 drivers/net/can/ctucanfd/ctu_can_fd_frame.h        |  190 ++++
 drivers/net/can/ctucanfd/ctu_can_fd_hw.c           |  781 ++++++++++++++
 drivers/net/can/ctucanfd/ctu_can_fd_hw.h           |  917 ++++++++++++++++
 drivers/net/can/ctucanfd/ctu_can_fd_pci.c          |  316 ++++++
 drivers/net/can/ctucanfd/ctu_can_fd_platform.c     |  145 +++
 drivers/net/can/ctucanfd/ctu_can_fd_regs.h         |  965 +++++++++++++++++
 16 files changed, 5247 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/can/ctu,ctucanfd.txt
 create mode 100644 Documentation/networking/device_drivers/ctu/FSM_TXT_Buffer_user.png
 create mode 100644 Documentation/networking/device_drivers/ctu/ctucanfd-driver.rst
 create mode 100644 drivers/net/can/ctucanfd/Kconfig
 create mode 100644 drivers/net/can/ctucanfd/Makefile
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd.c
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd.h
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_frame.h
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_hw.c
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_hw.h
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_pci.c
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_platform.c
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_regs.h
Signature · 1 line
2.11.0
author maintainer
#1 lore raw

PATCH v3 1/6 dt-bindings: vendor-prefix: add prefix for Czech Technical University in Prague.

From: Pavel Pisa <[email protected]>

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 967e78c5ec0a..dedb10f1b250 100644
@@ -215,6 +215,8 @@ patternProperties:
     description: Hangzhou C-SKY Microsystems Co., Ltd
   "^csq,.*":
     description: Shenzen Chuangsiqi Technology Co.,Ltd.
+  "^ctu,.*":
+    description: Czech Technical University in Prague
   "^cubietech,.*":
     description: Cubietech, Ltd.
   "^cypress,.*":
Signature · 1 line
2.11.0
author maintainer
#3 lore raw

PATCH v3 2/6 dt-bindings: net: can: binding for CTU CAN FD open-source IP core.

In reply to [email protected]

From: Pavel Pisa <[email protected]>

---
 .../devicetree/bindings/net/can/ctu,ctucanfd.txt   | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/can/ctu,ctucanfd.txt
Documentation/devicetree/bindings/net/can/ctu,ctucanfd.txt new file +61 -0
new file mode 100644
index 000000000000..4cb2f04cb412
@@ -0,0 +1,61 @@
+Memory Mapped CTU CAN FD Open-source IP Core Device Tree Bindings
+-----------------------------------------------------------------
+
+
+The core sources and documentation on project page
+
+  https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core
+  http://canbus.pages.fel.cvut.cz/ctucanfd_ip_core/Progdokum.pdf
+
+Integration in Xilinx Zynq SoC based system together with
+OpenCores SJA1000 compatible controllers
+
+  https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top
+
+Martin Jerabek's dimploma thesis with integration and testing
+framework description
+
+ https://dspace.cvut.cz/bitstream/handle/10467/80366/F3-DP-2019-Jerabek-Martin-Jerabek-thesis-2019-canfd.pdf
+
+Required properties:
+
+- compatible : should be one of "ctu,ctucanfd", "ctu,canfd-2".
+      The "canfd-2" has been reserved for older revision of the IP core.
+      The revision can be read from the IP core register as well.
+
+- reg = <(baseaddr) (size)> : specify mapping into physical address
+      space of the processor system.
+
+- interrupts : property with a value describing the interrupt source
+      required for the CTU CAN FD. For Zynq SoC system format is
+      <(is_spi) (number) (type)> where is_spi defines if it is SPI
+      (shared peripheral) interrupt, the second number is translated
+      to the vector by addition of 32 on Zynq-7000 systems and type
+      is IRQ_TYPE_LEVEL_HIGH (4) for Zynq.
+
+- clocks: phandle of reference clock (100 MHz is appropriate
+      for FPGA implementation on Zynq-7000 system).
+
+Optional properties:
+
+- clock-names: not used in actual design but if more clocks are used
+      by cores then "can_clk" would be clock source name for the clocks
+      used to define CAN time-quanta.
+
+Example when integrated to Zynq-7000 system DTS:
+
+        / {
+            /* ... */
+            amba: amba {
+                #address-cells = <1>;
+                #size-cells = <1>;
+                compatible = "simple-bus";
+
+                ctu_can_fd_0: can@43c30000 {
+                    compatible = "ctu,ctucanfd";
+                    interrupts = <0 30 4>;
+                    clocks = <&clkc 15>;
+                    reg = <0x43c30000 0x10000>;
+                };
+            };
+        };
Signature · 1 line
2.11.0
maintainer Reviewed-by on v3 2/6
#4 lore raw

Re: [PATCH v3 2/6] dt-bindings: net: can: binding for CTU CAN FD open-source IP core.

Quoted 7 lines · On Sat, Dec 21, 2019 at 03:07:31PM +0100, [email protected] wrote:

From: Pavel Pisa <[email protected]>

---
 .../devicetree/bindings/net/can/ctu,ctucanfd.txt   | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/can/ctu,ctucanfd.txt

Bindings are moving DT schema format now. Not something I'd require on a respin I've already reviewed, but OTOH it's been 10 months to respin from v2. So:

If you have a v4, then please convert to a schema.

Rob

author maintainer
#5 lore raw

Re: [PATCH v3 2/6] dt-bindings: net: can: binding for CTU CAN FD open-source IP core.

Hello Rob,

thanks much for review.

Quoted 7 lines · On Saturday 04 of January 2020 00:53:59 Rob Herring wrote:
Quoted 2 lines · On Sat, Dec 21, 2019 at 03:07:31PM +0100, [email protected] wrote:

From: Pavel Pisa <[email protected]>

 .../devicetree/bindings/net/can/ctu,ctucanfd.txt   | 61

Bindings are moving DT schema format now. Not something I'd require on a respin I've already reviewed, but OTOH it's been 10 months to respin from v2. So:

Please, can you send me pointer to some CAN or other bindings doc which is well formed according to future direction? I have not dig deeper but I have not found relevant discussion about introduction of DT schema format.

Quoted 1 line

If you have a v4, then please convert to a schema.

I expect that we need at least one more iteration. When recheck, I have found that I have forgot to update paths in RST documentation when moved from standalone automatic CI build into kernel tree

[PATCH v3 6/6] docs: ctucanfd: CTU CAN FD open-source IP core documentation.
https://lkml.org/lkml/2019/12/21/96

And the most important is review of the driver core to allow the project (http://canbus.pages.fel.cvut.cz/) to move forward.

[PATCH v3 3/6] can: ctucanfd: add support for CTU CAN FD open-source IP core - bus independent part.
https://lkml.org/lkml/2019/12/21/95

The code has no errors and a few questionable warnings reported by 4.19 patchcheck (we have run many iterations of it to cleanup code) but 5.4 kernel patchcheck is more strict as I noticed after submission and reports a few more warnings and some of them could be easily resolved.

What makes me to feel good is that CTU CAN FD IP core development stabilized, there are only changes to better cover the core by test framework and more than one month there is no commit disturbing CI build process of IP core integration for Xilinx Zynq. CI builds complete driver and FPGA design and then deploys and runs tests between multiple CTU CAN FD cores and against OpenCores SJA1000 cores with FD tolerance

https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top/pipelines

https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top/-/jobs/51334

The second link points to one of many logs of test running on MZ_APO (Xilinx Zynq) education kits designed for Department of Control Engineering
https://dce.fel.cvut.cz/en at PiKRON.com. MZ_APO kist are used in Computer Architectures and Real-time Systems Programming courses.

Thanks for help,

Pavel

author maintainer
#6 lore raw

Re: [PATCH v3 2/6] dt-bindings: net: can: binding for CTU CAN FD open-source IP core.

In reply to Rob Herring

Hello Rob,

Quoted 10 lines · On Saturday 04 of January 2020 00:53:59 Rob Herring wrote:
Quoted 8 lines · On Sat, Dec 21, 2019 at 03:07:31PM +0100, [email protected] wrote:

From: Pavel Pisa <[email protected]>

---
 .../devicetree/bindings/net/can/ctu,ctucanfd.txt   | 61
++++++++++++++++++++++ 1 file changed, 61 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/net/can/ctu,ctucanfd.txt

Quoted 7 lines

Bindings are moving DT schema format now. Not something I'd require on a respin I've already reviewed, but OTOH it's been 10 months to respin from v2. So:

If you have a v4, then please convert to a schema.

The first, thanks much for Device-tree part review, it is only one received from relevant person for last six months. So I have wait update for v4 patches and focused on teaching forced to be distance one
https://cw.fel.cvut.cz/wiki/courses/b35apo/lectures/start
another part of the CTU CAN FD project.

QEMU emulation for the CTU CAN FD IP core
is result of Jan Charvat's bachelor thesis led by me. The patches are waiting for QEMU developers review

https://lists.nongnu.org/archive/html/qemu-devel/2020-07/msg04653.html

The other people have significant interrest in our project, Oliver Hartkopp, CAN in Automation representatives etc.

https://can-newsletter.org/hardware/semiconductors/200609_open-source-ip-core-compliant-with-iso-can-fd_ctu/

https://can-newsletter.org/hardware/semiconductors/181121_can-fd-core-as-an-open-project_university

Project is integrated into complex CAN LIN etc.. tester build for Skoda Auto based on Intel SoC as well.

I am trying to resolve that only one review feedback which I have received before v4 patches sending. I have spent half day to update and integrate self build packages to my stable Debian to can run

make -k dt_binding_check

but unfortunately, I have not achieved promissing result even when tested on Linux kernel unpatched sources. I used actual git dt-schema/dt-doc-validate with 5.4 kernel build but I get only long series of

pi@baree:/usr/src/linux-5.4-rt/_build/arm/px6$ make dt_binding_check -k
GNUmakefile:40: *** mixed implicit and normal rules: deprecated syntax
make -C /usr/src/linux-5.4-rt O=/usr/src/linux-5.4-rt/_build/arm/px6/ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- QTDIR=/usr/share/qt4 dt_binding_check
  CHKDT   Documentation/devicetree/bindings/arm/actions.yaml
/usr/src/linux-5.4-rt/Documentation/devicetree/bindings/arm/actions.yaml:  found incompatible YAML document
  in "<unicode string>", line 2, column 1
make[3]: *** [/usr/src/linux-5.4-rt/Documentation/devicetree/bindings/Makefile:12: Documentation/devicetree/bindings/arm/actions.example.dts] Error 1
  CHKDT   Documentation/devicetree/bindings/arm/al,alpine.yaml
/usr/src/linux-5.4-rt/Documentation/devicetree/bindings/arm/al,alpine.yaml:  found incompatible YAML document
  in "<unicode string>", line 2, column 1
make[3]: *** [/usr/src/linux-5.4-rt/Documentation/devicetree/bindings/Makefile:12: Documentation/devicetree/bindings/arm/al,alpine.example.dts] Error 1
  CHKDT   Documentation/devicetree/bindings/arm/altera.yaml
/usr/src/linux-5.4-rt/Documentation/devicetree/bindings/arm/altera.yaml:  found incompatible YAML document
  in "<unicode string>", line 2, column 1
make[3]: *** [/usr/src/linux-5.4-rt/Documentation/devicetree/bindings/Makefile:12: Documentation/devicetree/bindings/arm/altera.example.dts] Error 1
  CHKDT   Documentation/devicetree/bindings/arm/altera/socfpga-clk-manager.yaml
/usr/src/linux-5.4-rt/Documentation/devicetree/bindings/arm/altera/socfpga-clk-manager.yaml:  found incompatible YAML document
  in "<unicode string>", line 2, column 1
make[3]: *** [/usr/src/linux-5.4-rt/Documentation/devicetree/bindings/Makefile:12: Documentation/devicetree/bindings/arm/altera/socfpga-clk-manager.example.dts] Error 1
  CHKDT   Documentation/devicetree/bindings/arm/amlogic.yaml

The same for ctu,ctucanfd.yam .
Please, if you have working setup, test if the followup content of Documentation/devicetree/bindings/net/can/ctu,ctucanfd.yaml is acceptable

Thanks in advance,

Pavel

# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/can/ctu,ctucanfd.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: CTU CAN FD Open-source IP Core Device Tree Bindings

description: |
Open-source CAN FD IP core developed at the Czech Technical University in Prague

The core sources and documentation on project page
[1] sources : https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core
[2] datasheet : https://canbus.pages.fel.cvut.cz/ctucanfd_ip_core/Progdokum.pdf

Integration in Xilinx Zynq SoC based system together with OpenCores SJA1000 compatible controllers

    [3] project : https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top
  Martin Jerabek dimploma thesis with integration and testing
  framework description
    [4] PDF : https://dspace.cvut.cz/bitstream/handle/10467/80366/F3-DP-2019-Jerabek-Martin-Jerabek-thesis-2019-canfd.pdf

maintainers:
- Pavel Pisa <[email protected]>
- Ondrej Ille <[email protected]>
- Martin Jerabek <[email protected]>

properties:
compatible:
oneOf:
- items:
- const: ctu,ctucanfd
- const: ctu,canfd-2
- const: ctu,ctucanfd

reg:
description:
mapping into bus address space, offset and size
maxItems: 1

interrupts:
description: |
interrupt source. For Zynq SoC system, format is <(is_spi) (number) (type)> where is_spi defines if it is SPI (shared peripheral) interrupt, the second number is translated to the vector by addition of 32 on Zynq-7000 systems and type is IRQ_TYPE_LEVEL_HIGH (4) for Zynq.
maxItems: 1

clocks:
description: |
phandle of reference clock (100 MHz is appropriate for FPGA implementation on Zynq-7000 system).
maxItems: 1

required:
- compatible
- reg
- interrupts
- clocks

additionalProperties: false

examples:
- |

    ctu_can_fd_0: can@43c30000 {
      compatible = "ctu,ctucanfd";
      interrupts = <0 30 4>;
      clocks = <&clkc 15>;
      reg = <0x43c30000 0x10000>;
    };
author maintainer
#7 lore raw

Re: [PATCH v3 2/6] dt-bindings: net: can: binding for CTU CAN FD open-source IP core.

Hello Rob ad others,

Quoted 19 lines · On Wednesday 29 of July 2020 01:12:31 Pavel Pisa wrote:
Quoted 17 lines · On Saturday 04 of January 2020 00:53:59 Rob Herring wrote:
Quoted 8 lines · On Sat, Dec 21, 2019 at 03:07:31PM +0100, [email protected] wrote:

From: Pavel Pisa <[email protected]>

---
 .../devicetree/bindings/net/can/ctu,ctucanfd.txt   | 61
++++++++++++++++++++++ 1 file changed, 61 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/net/can/ctu,ctucanfd.txt

Bindings are moving DT schema format now. Not something I'd require on a respin I've already reviewed, but OTOH it's been 10 months to respin from v2. So:

If you have a v4, then please convert to a schema.

...

Quoted 10 lines

I am trying to resolve that only one review feedback which I have received before v4 patches sending. I have spent half day to update and integrate self build packages to my stable Debian to can run

make -k dt_binding_check

but unfortunately, I have not achieved promissing result even when tested on Linux kernel unpatched sources. I used actual git dt-schema/dt-doc-validate with 5.4 kernel build but I get only long series of

I have succeed to run make dt_binding_check on stable Debian with 5.4 kernel with only denumerable bunch of errors, probably normal one. Details to make dt_binding_check usable on stable Debian later.

When invoked with base directory specified

/usr/local/bin/dt-doc-validate -u /usr/src/linux-5.4/Documentation/devicetree/bindings/ net/can/ctu,ctucanfd.yaml

then no problem is reported in ctu,ctucanfd.yaml . Please is the specification correct even after human check?

Quoted 8 lines
pi@baree:/usr/src/linux-5.4-rt/_build/arm/px6$ make dt_binding_check -k
GNUmakefile:40: *** mixed implicit and normal rules: deprecated syntax
make -C /usr/src/linux-5.4-rt O=/usr/src/linux-5.4-rt/_build/arm/px6/
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- QTDIR=/usr/share/qt4
dt_binding_check CHKDT   Documentation/devicetree/bindings/arm/actions.yaml
/usr/src/linux-5.4-rt/Documentation/devicetree/bindings/arm/actions.yaml: 
found incompatible YAML document in "<unicode string>", line 2, column 1
make[3]: ***

The remark to save time of others, actual stable Debian Buster provides package python3-ruamel.yaml in 0.15.34-1+b1 version. But use of make dt_binding_check and dt-doc-validate and dt-validate with this version lead to many errors "found incompatible YAML document". The validation tools can be make to work when next packages are added and replaced in stable Debian

python3-pyrsistent 0.15.5-1
python3-pyfakefs 4.0.2-1
python3-zipp 1.0.0-3
python3-importlib-metadata 1.6.0
python3-jsonschema 3.2.0-3
python3-ruamel.yaml.clib 0.2.0-3
python3-ruamel.yaml 0.16.10-2

The dependencies and interdependence of the tools are really wide and that the tools are unusable in the actual regular Debian stable distribution should be described somewhere visible enough to save developers time.

Best wishes,

Pavel

Signature · 9 lines
                Pavel Pisa
    phone:      +420 603531357
    e-mail:     [email protected]
    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/
maintainer
#8 lore raw

Re: [PATCH v3 2/6] dt-bindings: net: can: binding for CTU CAN FD open-source IP core.

Quoted 57 lines · Pavel Pisa

Hello Rob ad others,

Quoted 19 lines · On Wednesday 29 of July 2020 01:12:31 Pavel Pisa wrote:
Quoted 17 lines · On Saturday 04 of January 2020 00:53:59 Rob Herring wrote:
Quoted 8 lines · On Sat, Dec 21, 2019 at 03:07:31PM +0100, [email protected] wrote:

From: Pavel Pisa <[email protected]>

---
 .../devicetree/bindings/net/can/ctu,ctucanfd.txt   | 61
++++++++++++++++++++++ 1 file changed, 61 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/net/can/ctu,ctucanfd.txt

Bindings are moving DT schema format now. Not something I'd require on a respin I've already reviewed, but OTOH it's been 10 months to respin from v2. So:

If you have a v4, then please convert to a schema.

...

Quoted 10 lines

I am trying to resolve that only one review feedback which I have received before v4 patches sending. I have spent half day to update and integrate self build packages to my stable Debian to can run

make -k dt_binding_check

but unfortunately, I have not achieved promissing result even when tested on Linux kernel unpatched sources. I used actual git dt-schema/dt-doc-validate with 5.4 kernel build but I get only long series of

I have succeed to run make dt_binding_check on stable Debian with 5.4 kernel with only denumerable bunch of errors, probably normal one. Details to make dt_binding_check usable on stable Debian later.

When invoked with base directory specified

/usr/local/bin/dt-doc-validate -u /usr/src/linux-5.4/Documentation/devicetree/bindings/ net/can/ctu,ctucanfd.yaml

then no problem is reported in ctu,ctucanfd.yaml . Please is the specification correct even after human check?

Quoted 8 lines
pi@baree:/usr/src/linux-5.4-rt/_build/arm/px6$ make dt_binding_check -k
GNUmakefile:40: *** mixed implicit and normal rules: deprecated syntax
make -C /usr/src/linux-5.4-rt O=/usr/src/linux-5.4-rt/_build/arm/px6/
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- QTDIR=/usr/share/qt4
dt_binding_check CHKDT   Documentation/devicetree/bindings/arm/actions.yaml
/usr/src/linux-5.4-rt/Documentation/devicetree/bindings/arm/actions.yaml:
found incompatible YAML document in "<unicode string>", line 2, column 1
make[3]: ***
Quoted 5 lines

The remark to save time of others, actual stable Debian Buster provides package python3-ruamel.yaml in 0.15.34-1+b1 version. But use of make dt_binding_check and dt-doc-validate and dt-validate with this version lead to many errors "found incompatible YAML document". The validation tools can be make to work when next packages are added and replaced in stable Debian

pip/setup.py should check the dependencies which includes 'ruamel.yaml>0.15.69'. Did you not use pip?

Quoted 4 lines

python3-pyrsistent 0.15.5-1
python3-pyfakefs 4.0.2-1
python3-zipp 1.0.0-3
python3-importlib-metadata 1.6.0

These must all be indirect dependencies as I have no idea what they provide.

Quoted 8 lines

python3-jsonschema 3.2.0-3
python3-ruamel.yaml.clib 0.2.0-3
python3-ruamel.yaml 0.16.10-2

The dependencies and interdependence of the tools are really wide and that the tools are unusable in the actual regular Debian stable distribution should be described somewhere visible enough to save developers time.

I can't document distro specifics for what I don't have. Manually documenting dependencies and their versions seems like a recipe for inaccurate and out of date documentation.

Rob

author maintainer
#9 lore raw

PATCH v3 3/6 can: ctucanfd: add support for CTU CAN FD open-source IP core - bus independent part.

In reply to [email protected]

From: Martin Jerabek <[email protected]>

This driver adds support for the CTU CAN FD open-source IP core. More documentation and core sources at project page
(https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core).
The core integration to Xilinx Zynq system as platform driver is available (https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top).
Implementation on Intel FGA based PCI Express board is available from project (https://gitlab.fel.cvut.cz/canbus/pcie-ctu_can_fd).

More about CAN related projects used and developed at the Faculty of the Electrical Engineering (http://www.fel.cvut.cz/en/)
of Czech Technical University (https://www.cvut.cz/en)
in at Prague http://canbus.pages.fel.cvut.cz/ .

---
 drivers/net/can/Kconfig                     |    1 +
 drivers/net/can/Makefile                    |    1 +
 drivers/net/can/ctucanfd/Kconfig            |   18 +
 drivers/net/can/ctucanfd/Makefile           |    7 +
 drivers/net/can/ctucanfd/ctu_can_fd.c       | 1116 +++++++++++++++++++++++++++
 drivers/net/can/ctucanfd/ctu_can_fd.h       |   88 +++
 drivers/net/can/ctucanfd/ctu_can_fd_frame.h |  190 +++++
 drivers/net/can/ctucanfd/ctu_can_fd_hw.c    |  781 +++++++++++++++++++
 drivers/net/can/ctucanfd/ctu_can_fd_hw.h    |  917 ++++++++++++++++++++++
 drivers/net/can/ctucanfd/ctu_can_fd_regs.h  |  965 +++++++++++++++++++++++
 10 files changed, 4084 insertions(+)
 create mode 100644 drivers/net/can/ctucanfd/Kconfig
 create mode 100644 drivers/net/can/ctucanfd/Makefile
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd.c
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd.h
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_frame.h
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_hw.c
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_hw.h
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_regs.h
drivers/net/can/Kconfig +1 -0
index 17c166cc8482..458afc4b81f2 100644
@@ -168,6 +168,7 @@ config PCH_CAN
 
 source "drivers/net/can/c_can/Kconfig"
 source "drivers/net/can/cc770/Kconfig"
+source "drivers/net/can/ctucanfd/Kconfig"
 source "drivers/net/can/ifi_canfd/Kconfig"
 source "drivers/net/can/m_can/Kconfig"
 source "drivers/net/can/mscan/Kconfig"
drivers/net/can/Makefile +1 -0
index 22164300122d..28b39cd122f0 100644
@@ -21,6 +21,7 @@ obj-y				+= softing/
 obj-$(CONFIG_CAN_AT91)		+= at91_can.o
 obj-$(CONFIG_CAN_CC770)		+= cc770/
 obj-$(CONFIG_CAN_C_CAN)		+= c_can/
+obj-$(CONFIG_CAN_CTUCANFD)	+= ctucanfd/
 obj-$(CONFIG_CAN_FLEXCAN)	+= flexcan.o
 obj-$(CONFIG_CAN_GRCAN)		+= grcan.o
 obj-$(CONFIG_CAN_IFI_CANFD)	+= ifi_canfd/
drivers/net/can/ctucanfd/Kconfig new file +18 -0
new file mode 100644
index 000000000000..a3b65088c9f7
@@ -0,0 +1,18 @@
+config CAN_CTUCANFD
+	tristate "CTU CAN-FD IP core"
+	---help---
+	  This driver adds support for the CTU CAN FD open-source IP core.
+	  More documentation and core sources at project page
+	  (https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core).
+	  The core integration to Xilinx Zynq system as platform driver
+	  is available (https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top).
+	  Implementation on Intel FGA based PCI Express board is available
+	  from project (https://gitlab.fel.cvut.cz/canbus/pcie-ctu_can_fd).
+	  More about CAN related projects used and developed at the Faculty
+	  of the Electrical Engineering (http://www.fel.cvut.cz/en/)
+	  of Czech Technical University (https://www.cvut.cz/en)
+	  in at Prague http://canbus.pages.fel.cvut.cz/ .
+
+if CAN_CTUCANFD
+
+endif
drivers/net/can/ctucanfd/Makefile new file +7 -0
new file mode 100644
index 000000000000..8d47008d0076
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Makefile for the CTU CAN-FD IP module drivers
+#
+
+obj-$(CONFIG_CAN_CTUCANFD) := ctucanfd.o
+ctucanfd-y := ctu_can_fd.o ctu_can_fd_hw.o
drivers/net/can/ctucanfd/ctu_can_fd.c new file +1116 -0

1,116 lines not on this page · raw message

drivers/net/can/ctucanfd/ctu_can_fd.h new file +88 -0

88 lines not on this page · raw message

drivers/net/can/ctucanfd/ctu_can_fd_frame.h new file +190 -0

190 lines not on this page · raw message

drivers/net/can/ctucanfd/ctu_can_fd_hw.c new file +781 -0

781 lines not on this page · raw message

drivers/net/can/ctucanfd/ctu_can_fd_hw.h new file +917 -0

786 lines not on this page · raw message

drivers/net/can/ctucanfd/ctu_can_fd_regs.h new file +965 -0

965 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.11.0

Part of the diff is not shown here. View the raw message.

author maintainer
#10 lore raw

PATCH v3 4/6 can: ctucanfd: CTU CAN FD open-source IP core - PCI bus support.

In reply to [email protected]

From: Pavel Pisa <[email protected]>

PCI bus adaptation for CTU CAN FD open-source IP core.

The project providing FPGA design for Intel EP4CGX15 based DB4CGX15 PCIe board with PiKRON.com designed transceiver riser shield is available at https://gitlab.fel.cvut.cz/canbus/pcie-ctu_can_fd .

---
 drivers/net/can/ctucanfd/Kconfig          |   9 +
 drivers/net/can/ctucanfd/Makefile         |   3 +
 drivers/net/can/ctucanfd/ctu_can_fd_pci.c | 316 ++++++++++++++++++++++++++++++
 3 files changed, 328 insertions(+)
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_pci.c
drivers/net/can/ctucanfd/Kconfig +9 -0
index a3b65088c9f7..798040e9bcef 100644
@@ -15,4 +15,13 @@ config CAN_CTUCANFD
 
 if CAN_CTUCANFD
 
+config CAN_CTUCANFD_PCI
+    tristate "CTU CAN-FD IP core PCI/PCIe driver"
+    depends on PCI
+	---help---
+	  This driver adds PCI/PCIe support for CTU CAN-FD IP core.
+	  The project providing FPGA design for Intel EP4CGX15 based DB4CGX15
+	  PCIe board with PiKRON.com designed transceiver riser shield is available
+	  at https://gitlab.fel.cvut.cz/canbus/pcie-ctu_can_fd .
+
 endif
drivers/net/can/ctucanfd/Makefile +3 -0
index 8d47008d0076..eb945260952d 100644
@@ -5,3 +5,6 @@
 
 obj-$(CONFIG_CAN_CTUCANFD) := ctucanfd.o
 ctucanfd-y := ctu_can_fd.o ctu_can_fd_hw.o
+
+obj-$(CONFIG_CAN_CTUCANFD_PCI) += ctucanfd_pci.o
+ctucanfd_pci-y := ctu_can_fd_pci.o
drivers/net/can/ctucanfd/ctu_can_fd_pci.c new file +316 -0

316 lines not on this page · raw message

Signature · 1 line
2.11.0
author maintainer
#11 lore raw

PATCH v3 5/6 can: ctucanfd: CTU CAN FD open-source IP core - platform/SoC support.

In reply to [email protected]

From: Pavel Pisa <[email protected]>

Platform bus adaptation for CTU CAN FD open-source IP core.

The core has been tested together with OpenCores SJA1000
modified to be CAN FD frames tolerant on MicroZed Zynq based
MZ_APO education kits designed by Petr Porazil from PiKRON.com company. FPGA design https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top.
The kit description at the Computer Architectures course pages
https://cw.fel.cvut.cz/b182/courses/b35apo/documentation/mz_apo/start .

The work is documented in Martin Jeřábek's diploma theses Open-source and Open-hardware CAN FD Protocol Support
https://dspace.cvut.cz/handle/10467/80366
.

---
 drivers/net/can/ctucanfd/Kconfig               |  11 ++
 drivers/net/can/ctucanfd/Makefile              |   3 +
 drivers/net/can/ctucanfd/ctu_can_fd_platform.c | 145 +++++++++++++++++++++++++
 3 files changed, 159 insertions(+)
 create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_platform.c
drivers/net/can/ctucanfd/Kconfig +11 -0
index 798040e9bcef..c5b7c000fbb3 100644
@@ -24,4 +24,15 @@ config CAN_CTUCANFD_PCI
 	  PCIe board with PiKRON.com designed transceiver riser shield is available
 	  at https://gitlab.fel.cvut.cz/canbus/pcie-ctu_can_fd .
 
+config CAN_CTUCANFD_PLATFORM
+	tristate "CTU CAN-FD IP core platform (FPGA, SoC) driver"
+	depends on OF
+	---help---
+	  The core has been tested together with OpenCores SJA1000
+	  modified to be CAN FD frames tolerant on MicroZed Zynq based
+	  MZ_APO education kits designed by Petr Porazil from PiKRON.com
+	  company. FPGA design https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top.
+	  The kit description at the Computer Architectures course pages
+	  https://cw.fel.cvut.cz/b182/courses/b35apo/documentation/mz_apo/start .
+
 endif
drivers/net/can/ctucanfd/Makefile +3 -0
index eb945260952d..a77ca72d534e 100644
@@ -8,3 +8,6 @@ ctucanfd-y := ctu_can_fd.o ctu_can_fd_hw.o
 
 obj-$(CONFIG_CAN_CTUCANFD_PCI) += ctucanfd_pci.o
 ctucanfd_pci-y := ctu_can_fd_pci.o
+
+obj-$(CONFIG_CAN_CTUCANFD_PLATFORM) += ctucanfd_platform.o
+ctucanfd_platform-y += ctu_can_fd_platform.o
drivers/net/can/ctucanfd/ctu_can_fd_platform.c new file +145 -0

145 lines not on this page · raw message

Signature · 1 line
2.11.0
author maintainer
#12 lore raw

PATCH v3 6/6 docs: ctucanfd: CTU CAN FD open-source IP core documentation.

In reply to [email protected]

From: Pavel Pisa <[email protected]>

CTU CAN FD IP core documentation based on Martin Jeřábek's diploma theses Open-source and Open-hardware CAN FD Protocol Support
https://dspace.cvut.cz/handle/10467/80366
.

---
 .../device_drivers/ctu/FSM_TXT_Buffer_user.png     | Bin 0 -> 174807 bytes
 .../device_drivers/ctu/ctucanfd-driver.rst         | 613 +++++++++++++++++++++
 2 files changed, 613 insertions(+)
 create mode 100644 Documentation/networking/device_drivers/ctu/FSM_TXT_Buffer_user.png
 create mode 100644 Documentation/networking/device_drivers/ctu/ctucanfd-driver.rst
Documentation/networking/device_drivers/ctu/FSM_TXT_Buffer_user.png new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..5dceb594fca1f668fbc2eb7c1fb5706e99137d28
GIT binary patch
Documentation/networking/device_drivers/ctu/ctucanfd-driver.rst new file +613 -0

613 lines not on this page · raw message

Signature · 1 line
2.11.0