|
|
Log in / Subscribe / Register

CAST Controller Area Network driver support

From:  Hal Feng <hal.feng-AT-starfivetech.com>
To:  Rob Herring <robh-AT-kernel.org>, Krzysztof Kozlowski <krzk+dt-AT-kernel.org>, Conor Dooley <conor+dt-AT-kernel.org>, Marc Kleine-Budde <mkl-AT-pengutronix.de>, Vincent Mailhol <mailhol.vincent-AT-wanadoo.fr>, "David S . Miller" <davem-AT-davemloft.net>, Eric Dumazet <edumazet-AT-google.com>, Jakub Kicinski <kuba-AT-kernel.org>, Paolo Abeni <pabeni-AT-redhat.com>, Philipp Zabel <p.zabel-AT-pengutronix.de>, Palmer Dabbelt <palmer-AT-dabbelt.com>, Paul Walmsley <paul.walmsley-AT-sifive.com>, Albert Ou <aou-AT-eecs.berkeley.edu>
Subject:  [PATCH v2 0/4] CAST Controller Area Network driver support
Date:  Sun, 22 Sep 2024 22:51:46 +0800
Message-ID:  <20240922145151.130999-1-hal.feng@starfivetech.com>
Cc:  Emil Renner Berthing <emil.renner.berthing-AT-canonical.com>, William Qiu <william.qiu-AT-starfivetech.com>, Hal Feng <hal.feng-AT-starfivetech.com>, devicetree-AT-vger.kernel.org, linux-can-AT-vger.kernel.org, netdev-AT-vger.kernel.org, linux-riscv-AT-lists.infradead.org, linux-kernel-AT-vger.kernel.org
Archive-link:  Article

This patchset adds support for the CAST Controller Area Network Bus
Controller (version fd-7x10N00S00) which is used in StarFive JH7110 SoC.
Note that the CAN FD license for JH7110 has expired, so JH7110 only
supports CAN CC now.

Changes since v1:
Patch 1:
- Add company information in the commit message.
Patch 2:
- Add description for the hardware.
- Move "allOf" stuff down after the property definitions.
- Rename compatible names, clock names, reset names and syscon register
  names.
- Rewrite the example.
Patch 3:
- Reorder all functions for readability.
- Simplify register definitions and register access functions.
- Improve syscon related code.
- Use clk_bulk interface.
- Enable the clocks during .ndo_open() and disable during .ndo_stop().
- Use can_put_echo_skb() and can_get_echo_skb().
- Stop the TX queue when entering .ndo_start_xmit() and restart the TX
  queue after the transmission finished.
- Simplify logic and remove redundant code.
- Improve coding style.
Patch 4:
- Update the nodes according to the new dt-bindings.

History:
v1: https://lore.kernel.org/all/20240129031239.17037-1-willia...

William Qiu (4):
  dt-bindings: vendor-prefixes: Add cast vendor prefix
  dt-bindings: can: Add CAST CAN Bus Controller
  can: Add driver for CAST CAN Bus Controller
  riscv: dts: starfive: jh7110: Add CAN nodes

 .../bindings/net/can/cast,can-ctrl.yaml       | 106 ++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 MAINTAINERS                                   |   8 +
 arch/riscv/boot/dts/starfive/jh7110.dtsi      |  32 +
 drivers/net/can/Kconfig                       |   7 +
 drivers/net/can/Makefile                      |   1 +
 drivers/net/can/cast_can.c                    | 936 ++++++++++++++++++
 7 files changed, 1092 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/can/cast,can-ctrl.yaml
 create mode 100644 drivers/net/can/cast_can.c


base-commit: 98f7e32f20d28ec452afb208f9cffc08448a2652
-- 
2.43.2




Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds