Linux CAN drivers development
 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,
	Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>,
	Conor Dooley <conor.dooley@microchip.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net-next 05/12] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support
Date: Wed, 19 Feb 2025 12:21:10 +0100	[thread overview]
Message-ID: <20250219113354.529611-6-mkl@pengutronix.de> (raw)
In-Reply-To: <20250219113354.529611-1-mkl@pengutronix.de>

From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>

Add S32G2/S32G3 SoCs compatible strings.

A particularity for these SoCs is the presence of separate interrupts for
state change, bus errors, MBs 0-7 and MBs 8-127 respectively.

Increase maxItems of 'interrupts' to 4 for S32G based SoCs and keep the
same restriction for other SoCs.

Also, as part of this commit, move the 'allOf' after the required
properties to make the documentation easier to read.

Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20250113120704.522307-2-ciprianmarian.costea@oss.nxp.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 .../bindings/net/can/fsl,flexcan.yaml         | 44 +++++++++++++++++--
 1 file changed, 40 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml b/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
index 97dd1a7c5ed2..73252fe56fe6 100644
--- a/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
+++ b/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
@@ -10,9 +10,6 @@ title:
 maintainers:
   - Marc Kleine-Budde <mkl@pengutronix.de>
 
-allOf:
-  - $ref: can-controller.yaml#
-
 properties:
   compatible:
     oneOf:
@@ -28,6 +25,7 @@ properties:
           - fsl,vf610-flexcan
           - fsl,ls1021ar2-flexcan
           - fsl,lx2160ar1-flexcan
+          - nxp,s32g2-flexcan
       - items:
           - enum:
               - fsl,imx53-flexcan
@@ -43,12 +41,21 @@ properties:
           - enum:
               - fsl,ls1028ar1-flexcan
           - const: fsl,lx2160ar1-flexcan
+      - items:
+          - enum:
+              - nxp,s32g3-flexcan
+          - const: nxp,s32g2-flexcan
 
   reg:
     maxItems: 1
 
   interrupts:
-    maxItems: 1
+    minItems: 1
+    maxItems: 4
+
+  interrupt-names:
+    minItems: 1
+    maxItems: 4
 
   clocks:
     maxItems: 2
@@ -136,6 +143,35 @@ required:
   - reg
   - interrupts
 
+allOf:
+  - $ref: can-controller.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: nxp,s32g2-flexcan
+    then:
+      properties:
+        interrupts:
+          items:
+            - description: Message Buffer interrupt for mailboxes 0-7 and Enhanced RX FIFO
+            - description: Device state change
+            - description: Bus Error detection
+            - description: Message Buffer interrupt for mailboxes 8-127
+        interrupt-names:
+          items:
+            - const: mb-0
+            - const: state
+            - const: berr
+            - const: mb-1
+      required:
+        - interrupt-names
+    else:
+      properties:
+        interrupts:
+          maxItems: 1
+        interrupt-names: false
+
 additionalProperties: false
 
 examples:
-- 
2.47.2



  parent reply	other threads:[~2025-02-19 11:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 11:21 [PATCH net-next 0/12] pull-request: can-next 2025-02-19 Marc Kleine-Budde
2025-02-19 11:21 ` [PATCH net-next 01/12] can: c_can: Drop useless final probe failure message Marc Kleine-Budde
2025-02-20  9:40   ` patchwork-bot+netdevbpf
2025-02-19 11:21 ` [PATCH net-next 02/12] can: c_can: Simplify handling syscon error path Marc Kleine-Budde
2025-02-19 11:21 ` [PATCH net-next 03/12] can: c_can: Use of_property_present() to test existence of DT property Marc Kleine-Budde
2025-02-19 11:21 ` [PATCH net-next 04/12] can: c_can: Use syscon_regmap_lookup_by_phandle_args Marc Kleine-Budde
2025-02-19 11:21 ` Marc Kleine-Budde [this message]
2025-02-19 11:21 ` [PATCH net-next 06/12] can: flexcan: Add quirk to handle separate interrupt lines for mailboxes Marc Kleine-Budde
2025-02-19 11:21 ` [PATCH net-next 07/12] can: flexcan: add NXP S32G2/S32G3 SoC support Marc Kleine-Budde
2025-02-19 11:21 ` [PATCH net-next 08/12] dt-binding: can: mcp251xfd: remove duplicate word Marc Kleine-Budde
2025-02-19 11:21 ` [PATCH net-next 09/12] can: j1939: Extend stack documentation with buffer size behavior Marc Kleine-Budde
2025-02-19 11:21 ` [PATCH net-next 10/12] can: canxl: support Remote Request Substitution bit access Marc Kleine-Budde
2025-02-19 11:21 ` [PATCH net-next 11/12] can: gs_usb: add VID/PID for the CANnectivity firmware Marc Kleine-Budde
2025-02-19 11:21 ` [PATCH net-next 12/12] can: rockchip_canfd: rkcanfd_chip_fifo_setup(): remove duplicated setup of RX FIFO Marc Kleine-Budde
2025-02-20  9:23 ` [PATCH net-next 0/12] pull-request: can-next 2025-02-19 Paolo Abeni
2025-02-20  9:27   ` 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=20250219113354.529611-6-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=ciprianmarian.costea@oss.nxp.com \
    --cc=conor.dooley@microchip.com \
    --cc=davem@davemloft.net \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=netdev@vger.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