netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
	kernel@pengutronix.de,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	Rob Herring <robh@kernel.org>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net-next 03/10] dt-bindings: net: can: add STM32 bxcan DT bindings
Date: Tue,  4 Apr 2023 16:59:01 +0200	[thread overview]
Message-ID: <20230404145908.1714400-4-mkl@pengutronix.de> (raw)
In-Reply-To: <20230404145908.1714400-1-mkl@pengutronix.de>

From: Dario Binacchi <dario.binacchi@amarulasolutions.com>

Add documentation of device tree bindings for the STM32 basic extended
CAN (bxcan) controller.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/all/20230328073328.3949796-3-dario.binacchi@amarulasolutions.com
[mkl: drop unneeded quotes]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 .../bindings/net/can/st,stm32-bxcan.yaml      | 85 +++++++++++++++++++
 1 file changed, 85 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml

diff --git a/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml
new file mode 100644
index 000000000000..769fa5c27b76
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml
@@ -0,0 +1,85 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/can/st,stm32-bxcan.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics bxCAN controller
+
+description: STMicroelectronics BxCAN controller for CAN bus
+
+maintainers:
+  - Dario Binacchi <dario.binacchi@amarulasolutions.com>
+
+allOf:
+  - $ref: can-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - st,stm32f4-bxcan
+
+  st,can-primary:
+    description:
+      Primary and secondary mode of the bxCAN peripheral is only relevant
+      if the chip has two CAN peripherals. In that case they share some
+      of the required logic.
+      To avoid misunderstandings, it should be noted that ST documentation
+      uses the terms master/slave instead of primary/secondary.
+    type: boolean
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    items:
+      - description: transmit interrupt
+      - description: FIFO 0 receive interrupt
+      - description: FIFO 1 receive interrupt
+      - description: status change error interrupt
+
+  interrupt-names:
+    items:
+      - const: tx
+      - const: rx0
+      - const: rx1
+      - const: sce
+
+  resets:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  st,gcan:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description:
+      The phandle to the gcan node which allows to access the 512-bytes
+      SRAM memory shared by the two bxCAN cells (CAN1 primary and CAN2
+      secondary) in dual CAN peripheral configuration.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - resets
+  - clocks
+  - st,gcan
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/stm32fx-clock.h>
+    #include <dt-bindings/mfd/stm32f4-rcc.h>
+
+    can1: can@40006400 {
+        compatible = "st,stm32f4-bxcan";
+        reg = <0x40006400 0x200>;
+        interrupts = <19>, <20>, <21>, <22>;
+        interrupt-names = "tx", "rx0", "rx1", "sce";
+        resets = <&rcc STM32F4_APB1_RESET(CAN1)>;
+        clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>;
+        st,can-primary;
+        st,gcan = <&gcan>;
+    };
-- 
2.39.2



  parent reply	other threads:[~2023-04-04 15:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 14:58 [PATCH net-next 0/10] pull-request: can-next 2023-04-04-2 Marc Kleine-Budde
2023-04-04 14:58 ` [PATCH net-next 01/10] can: isotp: add module parameter for maximum pdu size Marc Kleine-Budde
2023-04-06  0:30   ` patchwork-bot+netdevbpf
2023-04-04 14:59 ` [PATCH net-next 02/10] dt-bindings: arm: stm32: add compatible for syscon gcan node Marc Kleine-Budde
2023-04-04 14:59 ` Marc Kleine-Budde [this message]
2023-04-04 14:59 ` [PATCH net-next 04/10] ARM: dts: stm32: add CAN support on stm32f429 Marc Kleine-Budde
2023-04-04 14:59 ` [PATCH net-next 05/10] ARM: dts: stm32: add pin map for CAN controller on stm32f4 Marc Kleine-Budde
2023-04-04 14:59 ` [PATCH net-next 06/10] can: bxcan: add support for ST bxCAN controller Marc Kleine-Budde
2023-04-04 14:59 ` [PATCH net-next 07/10] can: rcar_canfd: rcar_canfd_probe(): fix plain integer in transceivers[] init Marc Kleine-Budde
2023-04-04 14:59 ` [PATCH net-next 08/10] dt-bindings: can: fsl,flexcan: add optional power-domains property Marc Kleine-Budde
2023-04-04 14:59 ` [PATCH net-next 09/10] can: esd_usb: Add support for CAN_CTRLMODE_BERR_REPORTING Marc Kleine-Budde
2023-04-04 14:59 ` [PATCH net-next 10/10] kvaser_usb: convert USB IDs to hexadecimal values Marc Kleine-Budde
  -- strict thread matches above, loose matches on Subject: below --
2023-04-04 11:34 [PATCH net-next 0/10] pull-request: can-next 2023-04-04 Marc Kleine-Budde
2023-04-04 11:34 ` [PATCH net-next 03/10] dt-bindings: net: can: add STM32 bxcan DT bindings Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230404145908.1714400-4-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=davem@davemloft.net \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).