CTU CAN FD open-source IP core SocketCAN driver, PCI, platform integration and documentation
Subsystems (6)
Pavel Pisa
maintainerv5 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 FPGA based PCI Express board is available from project (https://gitlab.fel.cvut.cz/canbus/pcie-ctu_can_fd).
The CTU CAN FD core emulation send for review for QEMU mainline. Development repository for QEMU emulation - ctu-canfd branch of
https://gitlab.fel.cvut.cz/canbus/qemu-canbus
More about CAN bus related projects used and developed at CTU FEE on the guidepost page 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 the 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 5 changes:
- sent at 2020-08-15
- correct Kconfig formatting according to Randy Dunlap
- silence warnings reported by make W=1 C=1 flags. Changes suggested by Jakub Kicinski
- big thanks for core patch review by Pavel Machek resulting in more readability and formating updates
- fix power management errors found by Pavel Machek
- removed comments from d-t bindings as suggested by Rob Herring
- selected ctu,ctucanfd-2 as alternative name to ctu,ctucanfd which allows to bind to actual major HDL core sources version 2.x if for some reason driver adaptation would not work on version read from the core
- line length limit relaxed to 100 characters on some cases where it helps to readability
The version 4 changes:
- sent at 2020-08-04
- changes summary, 169 non-merge commits, 6 driver, 32 IP core sources enhancements and fixes, 58 tests in master and about additional 30 iso-testbench preparation branch.
- convert device-tree binding documentation to YAML
- QEMU model of CTU CAN FD IP core and generic extension of QEMU CAN bus emulation developed by Jan Charvat.
- driver tested on QEMU emulated Malta big-endian MIPS platform and big endian-support fixed.
- checkpatch from 5.4 kernel used to cleanup driver formatting
- header files generated from IP core IP-Xact description updated to include protocol exception (pex) field. Mechanism to set it from the driver is not provided yet.
The version 3 changes:
- sent at 2019-12-21
- 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 Ondrej 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 documentation, 502 in tests.
- not all continuous 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 feedback and fixes to the project.
The version 2 sent at 2019-02-27
The version 1 sent at 2019-02-22
Ondrej Ille has prepared the CTU CAN IP Core sources for new release. We are waiting with it for the driver review, our intention is to release IP when driver is reviewed and mainlined.
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]> finished work to extend 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/ctu-canfd
The patches has been sent for review to QEMU mainlining list.
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
.../bindings/net/can/ctu,ctucanfd.yaml | 63 + .../devicetree/bindings/vendor-prefixes.yaml | 2 + .../ctu/FSM_TXT_Buffer_user.png | Bin 0 -> 174807 bytes .../device_drivers/ctu/ctucanfd-driver.rst | 634 ++++++++++ drivers/net/can/Kconfig | 1 + drivers/net/can/Makefile | 1 + drivers/net/can/ctucanfd/Kconfig | 35 + drivers/net/can/ctucanfd/Makefile | 13 + drivers/net/can/ctucanfd/ctu_can_fd.c | 1105 +++++++++++++++++ drivers/net/can/ctucanfd/ctu_can_fd.h | 87 ++ drivers/net/can/ctucanfd/ctu_can_fd_frame.h | 189 +++ drivers/net/can/ctucanfd/ctu_can_fd_hw.c | 790 ++++++++++++ drivers/net/can/ctucanfd/ctu_can_fd_hw.h | 916 ++++++++++++++ drivers/net/can/ctucanfd/ctu_can_fd_pci.c | 314 +++++ .../net/can/ctucanfd/ctu_can_fd_platform.c | 142 +++ drivers/net/can/ctucanfd/ctu_can_fd_regs.h | 971 +++++++++++++++ 16 files changed, 5263 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/can/ctu,ctucanfd.yaml 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.20.1
Pavel Pisa
maintainerPATCH v5 5/6 can: ctucanfd: CTU CAN FD open-source IP core - platform/SoC support.
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/wiki/courses/b35apo/documentation/mz_apo/start .
Kit carrier board and mechanics design source files
https://gitlab.com/pikron/projects/mz_apo/microzed_apo
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 + .../net/can/ctucanfd/ctu_can_fd_platform.c | 142 ++++++++++++++++++ 3 files changed, 156 insertions(+) create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_platform.c
drivers/net/can/ctucanfd/Kconfig +11 -0
@@ -21,4 +21,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
@@ -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 +142 -0
142 lines not on this page · raw message
Signature · 1 line
2.20.1
Pavel Pisa
maintainerPATCH v5 6/6 docs: ctucanfd: CTU CAN FD open-source IP core documentation.
In reply to Pavel PisaCTU 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
.
--- .../ctu/FSM_TXT_Buffer_user.png | Bin 0 -> 174807 bytes .../device_drivers/ctu/ctucanfd-driver.rst | 634 ++++++++++++++++++ 2 files changed, 634 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
Documentation/networking/device_drivers/ctu/ctucanfd-driver.rst new file +634 -0
634 lines not on this page · raw message
Signature · 1 line
2.20.1
Pavel Pisa
maintainerPATCH v5 4/6 can: ctucanfd: CTU CAN FD open-source IP core - PCI bus support.
In reply to Pavel PisaPCI 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 | 314 ++++++++++++++++++++++ 3 files changed, 326 insertions(+) create mode 100644 drivers/net/can/ctucanfd/ctu_can_fd_pci.c
drivers/net/can/ctucanfd/Kconfig +9 -0
@@ -12,4 +12,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
@@ -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 +314 -0
314 lines not on this page · raw message
Signature · 1 line
2.20.1
Pavel Pisa
maintainerPATCH v5 3/6 can: ctucanfd: add support for CTU CAN FD open-source IP core - bus independent part.
In reply to Pavel PisaFrom: 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 bus related projects used and developed at CTU FEE at
http://canbus.pages.fel.cvut.cz/ .
--- drivers/net/can/Kconfig | 1 + drivers/net/can/Makefile | 1 + drivers/net/can/ctucanfd/Kconfig | 15 + drivers/net/can/ctucanfd/Makefile | 7 + drivers/net/can/ctucanfd/ctu_can_fd.c | 1105 +++++++++++++++++++ drivers/net/can/ctucanfd/ctu_can_fd.h | 87 ++ drivers/net/can/ctucanfd/ctu_can_fd_frame.h | 189 ++++ drivers/net/can/ctucanfd/ctu_can_fd_hw.c | 790 +++++++++++++ drivers/net/can/ctucanfd/ctu_can_fd_hw.h | 916 +++++++++++++++ drivers/net/can/ctucanfd/ctu_can_fd_regs.h | 971 ++++++++++++++++ 10 files changed, 4082 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
@@ -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
@@ -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 +15 -0
@@ -0,0 +1,15 @@ +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). + Guidepost CTU FEE CAN bus projects page http://canbus.pages.fel.cvut.cz/ . + +if CAN_CTUCANFD + +endif
drivers/net/can/ctucanfd/Makefile new file +7 -0
@@ -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 +1105 -0
1,105 lines not on this page · raw message
drivers/net/can/ctucanfd/ctu_can_fd.h new file +87 -0
87 lines not on this page · raw message
drivers/net/can/ctucanfd/ctu_can_fd_frame.h new file +189 -0
189 lines not on this page · raw message
drivers/net/can/ctucanfd/ctu_can_fd_hw.c new file +790 -0
790 lines not on this page · raw message
drivers/net/can/ctucanfd/ctu_can_fd_hw.h new file +916 -0
793 lines not on this page · raw message
drivers/net/can/ctucanfd/ctu_can_fd_regs.h new file +971 -0
971 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.20.1
Part of the diff is not shown here. View the raw message.
Pavel Pisa
maintainerPATCH v5 1/6 dt-bindings: vendor-prefix: add prefix for the Czech Technical University in Prague.
In reply to Pavel PisaThe Czech Technical University in Prague (CTU) is one of the biggest and oldest (founded 1707) technical universities in Europe. The abbreviation in Czech language is ČVUT according to official name in Czech language
České vysoké učení technické v Praze
The English translation
The Czech Technical University in Prague
The university pages in English
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -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.20.1
Pavel Pisa
maintainerPATCH v5 2/6 dt-bindings: net: can: binding for CTU CAN FD open-source IP core.
In reply to Pavel PisaThe device-tree bindings for open-source/open-hardware CAN FD IP core designed at the Czech Technical University in Prague.
CTU CAN FD IP core and other CTU CAN bus related projects listing and documentation page
http://canbus.pages.fel.cvut.cz/
--- .../bindings/net/can/ctu,ctucanfd.yaml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/can/ctu,ctucanfd.yaml
Documentation/devicetree/bindings/net/can/ctu,ctucanfd.yaml new file +63 -0
@@ -0,0 +1,63 @@ +# 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-2 + - const: ctu,ctucanfd + - const: ctu,ctucanfd + + reg: + maxItems: 1 + + interrupts: + 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>; + };
Signature · 1 line
2.20.1
Randy Dunlap
reviewerRe: [PATCH v5 3/6] can: ctucanfd: add support for CTU CAN FD open-source IP core - bus independent part.
In reply to Pavel PisaQuoted 6 lines · Pavel Pisa
drivers/net/can/ctucanfd/Kconfig new file +0
-0
drivers/net/can/ctucanfd/Kconfig line 9
Quoted 9 lines
drivers/net/can/ctucanfd/Kconfig new file +9
-0@@ -0,0 +1,15 @@ +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
Is that FPGA-based
?
Quoted 6 lines
drivers/net/can/ctucanfd/Kconfig new file +6
-0+ from project (https://gitlab.fel.cvut.cz/canbus/pcie-ctu_can_fd). + Guidepost CTU FEE CAN bus projects page http://canbus.pages.fel.cvut.cz/ . + +if CAN_CTUCANFD + +endif
Signature · 1 line
~Randy
Randy Dunlap
reviewerRe: [PATCH v5 5/6] can: ctucanfd: CTU CAN FD open-source IP core - platform/SoC support.
In reply to Pavel Pisadrivers/net/can/ctucanfd/Kconfig config CAN_CTUCANFD_PCI · line 26
Quoted 11 lines · Pavel Pisa
drivers/net/can/ctucanfd/Kconfig +3
-0@@ -21,4 +21,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
Can this be
depends on OF || COMPILE_TEST
?
Quoted 9 lines
drivers/net/can/ctucanfd/Kconfig +8
-0+ 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
Signature · 1 line
~Randy
Re: [PATCH v5 1/6] dt-bindings: vendor-prefix: add prefix for the Czech Technical University in Prague.
In reply to Pavel PisaQuoted 11 lines · Pavel Pisa
The Czech Technical University in Prague (CTU) is one of the biggest and oldest (founded 1707) technical universities in Europe. The abbreviation in Czech language is ČVUT according to official name in Czech language
České vysoké učení technické v Praze
The English translation
The Czech Technical University in Prague
Quoted 9 lines
The university pages in English
Signed-off-by Pavel Pisa <[email protected]>--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Re: [PATCH v5 2/6] dt-bindings: net: can: binding for CTU CAN FD open-source IP core.
In reply to Pavel PisaQuoted 20 lines · Pavel Pisa
The device-tree bindings for open-source/open-hardware CAN FD IP core designed at the Czech Technical University in Prague.
CTU CAN FD IP core and other CTU CAN bus related projects listing and documentation page
http://canbus.pages.fel.cvut.cz/
Signed-off-by Pavel Pisa <[email protected]>--- .../bindings/net/can/ctu,ctucanfd.yaml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/can/ctu,ctucanfd.yamlDocumentation/devicetree/bindings/net/can/ctu,ctucanfd.yaml new file +0
-0
Documentation/devicetree/bindings/net/can/ctu,ctucanfd.yaml line 1
Quoted 1 line
Documentation/devicetree/bindings/net/can/ctu,ctucanfd.yaml new file +1
-0@@ -0,0 +1,63 @@ +# SPDX-License-Identifier: GPL-2.0
Dual license please:
(GPL-2.0-only OR BSD-2-Clause)
With that,
Quoted 65 lines
Documentation/devicetree/bindings/net/can/ctu,ctucanfd.yaml new file +62
-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-2 + - const: ctu,ctucanfd + - const: ctu,ctucanfd + + reg: + maxItems: 1 + + interrupts: + 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>; + };Signature · 1 line
2.20.1
Pavel Pisa
maintainerRe: [PATCH v5 5/6] can: ctucanfd: CTU CAN FD open-source IP core - platform and next steps and mainlining chances
In reply to Randy DunlapHello Randy and Rob,
thanks much for review, I have corrected FPGA spelling and binding YAML license.
Quoted 10 lines · On Sunday 16 of August 2020 01:28:13 Randy Dunlap wrote:
Quoted 9 lines · Pavel Pisa
(quoted diff) +0
-0b/drivers/net/can/ctucanfd/Kconfig index
e1636373628a..a8c9cc38f216100644drivers/net/can/ctucanfd/Kconfig +0
-0@@ -21,4 +21,15 @@ config CAN_CTUCANFD_PCI PCIe board with PiKRON.com designed transceiver riser shield isavailable at https://gitlab.fel.cvut.cz/canbus/pcie-ctu_can_fd .
Quoted 7 lines
drivers/net/can/ctucanfd/Kconfig config CAN_CTUCANFD_PCI · line 26
Quoted 3 lines
drivers/net/can/ctucanfd/Kconfig +3
-0+config CAN_CTUCANFD_PLATFORM + tristate "CTU CAN-FD IP core platform (FPGA, SoC) driver" + depends on OFCan this be
depends on OF || COMPILE_TEST?
I am not sure for this change. Is it ensured/documented somewhere that header files provide dummy definition such way, that OF drivers builds even if OF support is disabled? If I remember well, CTU CAN FD OF module build fails if attempted in the frame of native x86_64 build where OF has been disabled. Does COMPILE_TEST ensure that such build succeeds.
As for the next steps, I expect that without any review of Marc Kleine-Budde or Wolfgang Grandegger from initial attempt for submission from February 2019, we are at the end of the road now.
If there is confirmed preference, I would shorten license headers in the C files, but I am not sure if SPDX-License-Identifier is recognized by copyright law and because code and CTU CAN FD IP can be used outside of Linux kernel by others, we would like to keep legally binding preamble. It is reduced by not listing address to obtain complete GPL-2.0 from anyway. And change of preamble requires to update main repository, because header files are generated from IP core IPXACT definition by Python based tools.
I am aware of only one other suggestion not followed yet and it is separation of part of ctucan_tx_interrupt() function into new one suggested by Pavel Machek. I agree that function length of 108 lines is big. When blank lines are removed we are on 68 lines and 28 lines are switch statement. The function consist of two nested loops. External one required to ensure no lost interrupt when edge triggered delivery or implementation is used. For me personally, it is more readable in the actual format then to separate and propagate local variables to another function. And particular function code received only formatting and ctu_can_fd_ -> ctucan_hw_ rename in past year so it is tested many/many times by manual PCI test and automated Zynq tests. Each of the following pipelines which contains two jobs ands by test of FPGA design and driver build and tests on real HW
https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top/pipelines
You can go through years of the testing and development back. So I have even tendency to not shuffle code which does not result in indisputable better readability and breaks more than year of unmodified code successful (pass) test result line and confidence.
Because I understand that you all are loaded a lot I expect that after ACK/review-by by Rob, there is no need to send v6 to
[email protected]
I am not sure about cross-post to
[email protected]
[email protected]
when the progress is stuck on
[email protected]
Problem is that linux-can seems to eat core driver patch, probably because it is too long.
Thanks to all for patience and if somebody does want to be loaded by minor updates, resends and pings to linux-can, send me note to not bother you again.
Thanks for your time,
Pavel
PS: I would be available on Drew Fustini's LPC 2020
BoF: upstream drivers for open source FPGA SoC peripherals today. If there is interrest I can provide some information and show some overview and results.
Randy Dunlap
reviewerRe: [PATCH v5 5/6] can: ctucanfd: CTU CAN FD open-source IP core - platform and next steps and mainlining chances
Quoted 24 lines · Pavel Pisa
Hello Randy and Rob,
thanks much for review, I have corrected FPGA spelling and binding YAML license.
Quoted 10 lines · On Sunday 16 of August 2020 01:28:13 Randy Dunlap wrote:
Quoted 9 lines · Pavel Pisa
(quoted diff) +0
-0b/drivers/net/can/ctucanfd/Kconfig index
e1636373628a..a8c9cc38f216100644drivers/net/can/ctucanfd/Kconfig +0
-0@@ -21,4 +21,15 @@ config CAN_CTUCANFD_PCI PCIe board with PiKRON.com designed transceiver riser shield isavailable at https://gitlab.fel.cvut.cz/canbus/pcie-ctu_can_fd .
Quoted 7 lines
drivers/net/can/ctucanfd/Kconfig config CAN_CTUCANFD_PCI · line 26
Quoted 3 lines
drivers/net/can/ctucanfd/Kconfig +3
-0+config CAN_CTUCANFD_PLATFORM + tristate "CTU CAN-FD IP core platform (FPGA, SoC) driver" + depends on OFCan this be
depends on OF || COMPILE_TEST?
Quoted 7 lines
I am not sure for this change. Is it ensured/documented somewhere that header files provide dummy definition such way, that OF drivers builds even if OF support is disabled? If I remember well, CTU CAN FD OF module build fails if attempted in the frame of native
x86_64build where OF has been disabled. DoesCOMPILE_TESTensure that such build succeeds.
COMPILE_TEST won't ensure anything.
OTOH, <linux/of.h> has lots of stubs for handling the case of CONFIG_OF not being enabled.
Signature · 1 line
~Randy