* [PATCH v3 0/3] add FlexCAN support for S32G2/S32G3 SoCs
@ 2024-11-19 8:01 Ciprian Costea
2024-11-19 8:01 ` [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support Ciprian Costea
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Ciprian Costea @ 2024-11-19 8:01 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-can, netdev, devicetree, linux-kernel, imx, NXP Linux Team,
Christophe Lizzi, Alberto Ruiz, Enric Balletbo,
Ciprian Marian Costea
From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
S32G2 and S32G3 SoCs share the FlexCAN module with i.MX SoCs, with some
hardware integration particularities.
Main difference covered by this patchset relates to interrupt management.
On S32G2/S32G3 SoC, there are separate interrupts for state change, bus
errors, MBs 0-7 and MBs 8-127 respectively.
The intent of this patchset is to be upstream'ed on the official Linux
repo [0].
Since S32G2/S32G3 SoCs share the FlexCAN controller with I.MX platforms,
we find value in an allignment on Linux Factory tree [1]. Hence, we are
looking forward to integrate any feedback which you have based on your
expertise on this proposed patchset, before finally submitting upstream
for review.
[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
[1] https://bitbucket.sw.nxp.com/projects/LFAC/repos/linux-nxp/browse
Changes in V3:
- Refactored FlexCan binding documentation changes
- Rephrased/Clarified some commit messages
Changes in V2:
- Fixed several issues in FlexCan binding documentation
Ciprian Marian Costea (3):
dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support
can: flexcan: add NXP S32G2/S32G3 SoC support
can: flexcan: handle S32G2/S32G3 separate interrupt lines
.../bindings/net/can/fsl,flexcan.yaml | 25 +++++++++++++--
drivers/net/can/flexcan/flexcan-core.c | 31 +++++++++++++++++++
drivers/net/can/flexcan/flexcan.h | 3 ++
3 files changed, 56 insertions(+), 3 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support
2024-11-19 8:01 [PATCH v3 0/3] add FlexCAN support for S32G2/S32G3 SoCs Ciprian Costea
@ 2024-11-19 8:01 ` Ciprian Costea
2024-11-19 8:01 ` [PATCH v3 2/3] can: flexcan: add NXP " Ciprian Costea
2024-11-19 8:07 ` [PATCH v3 0/3] add FlexCAN support for S32G2/S32G3 SoCs Ciprian Marian Costea
2 siblings, 0 replies; 9+ messages in thread
From: Ciprian Costea @ 2024-11-19 8:01 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-can, netdev, devicetree, linux-kernel, imx, NXP Linux Team,
Christophe Lizzi, Alberto Ruiz, Enric Balletbo,
Ciprian Marian Costea
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>
---
.../bindings/net/can/fsl,flexcan.yaml | 25 ++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml b/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
index 97dd1a7c5ed2..cb7204c06acf 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,6 +41,10 @@ properties:
- enum:
- fsl,ls1028ar1-flexcan
- const: fsl,lx2160ar1-flexcan
+ - items:
+ - enum:
+ - nxp,s32g3-flexcan
+ - const: nxp,s32g2-flexcan
reg:
maxItems: 1
@@ -136,6 +138,23 @@ required:
- reg
- interrupts
+allOf:
+ - $ref: can-controller.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: nxp,s32g2-flexcan
+ then:
+ properties:
+ interrupts:
+ minItems: 4
+ maxItems: 4
+ else:
+ properties:
+ interrupts:
+ maxItems: 1
+
additionalProperties: false
examples:
--
2.45.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v3 2/3] can: flexcan: add NXP S32G2/S32G3 SoC support
2024-11-19 8:01 [PATCH v3 0/3] add FlexCAN support for S32G2/S32G3 SoCs Ciprian Costea
2024-11-19 8:01 ` [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support Ciprian Costea
@ 2024-11-19 8:01 ` Ciprian Costea
2024-11-19 8:07 ` [PATCH v3 0/3] add FlexCAN support for S32G2/S32G3 SoCs Ciprian Marian Costea
2 siblings, 0 replies; 9+ messages in thread
From: Ciprian Costea @ 2024-11-19 8:01 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-can, netdev, devicetree, linux-kernel, imx, NXP Linux Team,
Christophe Lizzi, Alberto Ruiz, Enric Balletbo,
Ciprian Marian Costea
From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
Add device type data for S32G2/S32G3 SoC.
FlexCAN module from S32G2/S32G3 is similar with i.MX SoCs, but interrupt
management is different. This initial S32G2/S32G3 SoC FlexCAN support
paves the road to address such differences.
Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
---
drivers/net/can/flexcan/flexcan-core.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c
index ac1a860986df..f0dee04800d3 100644
--- a/drivers/net/can/flexcan/flexcan-core.c
+++ b/drivers/net/can/flexcan/flexcan-core.c
@@ -386,6 +386,15 @@ static const struct flexcan_devtype_data fsl_lx2160a_r1_devtype_data = {
FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX_RTR,
};
+static const struct flexcan_devtype_data nxp_s32g2_devtype_data = {
+ .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
+ FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_BROKEN_PERR_STATE |
+ FLEXCAN_QUIRK_USE_RX_MAILBOX | FLEXCAN_QUIRK_SUPPORT_FD |
+ FLEXCAN_QUIRK_SUPPORT_ECC |
+ FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX |
+ FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX_RTR,
+};
+
static const struct can_bittiming_const flexcan_bittiming_const = {
.name = DRV_NAME,
.tseg1_min = 4,
@@ -2041,6 +2050,7 @@ static const struct of_device_id flexcan_of_match[] = {
{ .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, },
{ .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, },
{ .compatible = "fsl,lx2160ar1-flexcan", .data = &fsl_lx2160a_r1_devtype_data, },
+ { .compatible = "nxp,s32g2-flexcan", .data = &nxp_s32g2_devtype_data, },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, flexcan_of_match);
--
2.45.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v3 0/3] add FlexCAN support for S32G2/S32G3 SoCs
2024-11-19 8:01 [PATCH v3 0/3] add FlexCAN support for S32G2/S32G3 SoCs Ciprian Costea
2024-11-19 8:01 ` [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support Ciprian Costea
2024-11-19 8:01 ` [PATCH v3 2/3] can: flexcan: add NXP " Ciprian Costea
@ 2024-11-19 8:07 ` Ciprian Marian Costea
2 siblings, 0 replies; 9+ messages in thread
From: Ciprian Marian Costea @ 2024-11-19 8:07 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-can, netdev, devicetree, linux-kernel, imx, NXP Linux Team,
Christophe Lizzi, Alberto Ruiz, Enric Balletbo
On 11/19/2024 10:01 AM, Ciprian Costea wrote:
> From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
>
> S32G2 and S32G3 SoCs share the FlexCAN module with i.MX SoCs, with some
> hardware integration particularities.
>
> Main difference covered by this patchset relates to interrupt management.
> On S32G2/S32G3 SoC, there are separate interrupts for state change, bus
> errors, MBs 0-7 and MBs 8-127 respectively.
>
> The intent of this patchset is to be upstream'ed on the official Linux
> repo [0].
>
> Since S32G2/S32G3 SoCs share the FlexCAN controller with I.MX platforms,
> we find value in an allignment on Linux Factory tree [1]. Hence, we are
> looking forward to integrate any feedback which you have based on your
> expertise on this proposed patchset, before finally submitting upstream
> for review.
>
> [0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
> [1] https://bitbucket.sw.nxp.com/projects/LFAC/repos/linux-nxp/browse
>
> Changes in V3:
> - Refactored FlexCan binding documentation changes
> - Rephrased/Clarified some commit messages
>
> Changes in V2:
> - Fixed several issues in FlexCan binding documentation
>
> Ciprian Marian Costea (3):
> dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support
> can: flexcan: add NXP S32G2/S32G3 SoC support
> can: flexcan: handle S32G2/S32G3 separate interrupt lines
>
> .../bindings/net/can/fsl,flexcan.yaml | 25 +++++++++++++--
> drivers/net/can/flexcan/flexcan-core.c | 31 +++++++++++++++++++
> drivers/net/can/flexcan/flexcan.h | 3 ++
> 3 files changed, 56 insertions(+), 3 deletions(-)
>
Hello,
Please disregard this patch series. I will send a new one with
appropriate description.
Ciprian
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 0/3] add FlexCAN support for S32G2/S32G3 SoCs
@ 2024-11-29 14:25 Ciprian Costea
2024-11-29 14:25 ` [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support Ciprian Costea
0 siblings, 1 reply; 9+ messages in thread
From: Ciprian Costea @ 2024-11-29 14:25 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-can, devicetree, linux-kernel, NXP S32 Linux, imx,
Christophe Lizzi, Alberto Ruiz, Enric Balletbo,
Ciprian Marian Costea
From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
S32G2 and S32G3 SoCs share the FlexCAN module with i.MX SoCs, with some
hardware integration particularities.
Main difference covered by this patchset relates to interrupt management.
On S32G2/S32G3 SoC, there are separate interrupts for state change, bus
errors, MBs 0-7 and MBs 8-127 respectively.
Changes in V3:
- Added Vincent Mailhol's Reviewed-by tag on the second patch
- Changed to 'platform_get_irq_byname' for second range of mailboxes
- Made several rephasing in bindings doc
- Removed Frank Li's Reviewed-by tags since changes were made afterwards.
Changes in V2:
- Separated 'FLEXCAN_QUIRK_NR_IRQ_3' quirk addition from S32G SoC Flexcan
support.
- Provided more information in dt-bindings documentation with respect to
FlexCAN module integration on S32G SoCs.
- Fixed and irq resource freeing management issue.
Ciprian Marian Costea (3):
dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support
can: flexcan: Add quirk to handle separate interrupt lines for
mailboxes
can: flexcan: add NXP S32G2/S32G3 SoC support
.../bindings/net/can/fsl,flexcan.yaml | 46 +++++++++++++++++--
drivers/net/can/flexcan/flexcan-core.c | 35 +++++++++++++-
drivers/net/can/flexcan/flexcan.h | 5 ++
3 files changed, 81 insertions(+), 5 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support
2024-11-29 14:25 Ciprian Costea
@ 2024-11-29 14:25 ` Ciprian Costea
2024-11-29 14:37 ` Marc Kleine-Budde
2024-11-29 16:05 ` Krzysztof Kozlowski
0 siblings, 2 replies; 9+ messages in thread
From: Ciprian Costea @ 2024-11-29 14:25 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-can, devicetree, linux-kernel, NXP S32 Linux, imx,
Christophe Lizzi, Alberto Ruiz, Enric Balletbo,
Ciprian Marian Costea
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>
---
.../bindings/net/can/fsl,flexcan.yaml | 46 +++++++++++++++++--
1 file changed, 42 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..10b658e85ef2 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,37 @@ 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: Error detection
+ - description: Message Buffer interrupt for mailboxes 8-127
+ interrupt-names:
+ items:
+ - const: mb-0
+ - const: state
+ - const: berr
+ - const: mb-1
+ required:
+ - compatible
+ - reg
+ - interrupts
+ - interrupt-names
+ else:
+ properties:
+ interrupts:
+ maxItems: 1
+
additionalProperties: false
examples:
--
2.45.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support
2024-11-29 14:25 ` [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support Ciprian Costea
@ 2024-11-29 14:37 ` Marc Kleine-Budde
2024-11-29 15:20 ` Ciprian Marian Costea
2024-11-29 16:05 ` Krzysztof Kozlowski
1 sibling, 1 reply; 9+ messages in thread
From: Marc Kleine-Budde @ 2024-11-29 14:37 UTC (permalink / raw)
To: Ciprian Costea
Cc: Vincent Mailhol, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
linux-can, devicetree, linux-kernel, NXP S32 Linux, imx,
Christophe Lizzi, Alberto Ruiz, Enric Balletbo
[-- Attachment #1: Type: text/plain, Size: 3489 bytes --]
On 29.11.2024 16:25:33, Ciprian Costea wrote:
> 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>
> ---
> .../bindings/net/can/fsl,flexcan.yaml | 46 +++++++++++++++++--
> 1 file changed, 42 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..10b658e85ef2 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,37 @@ 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: Error detection
> + - description: Message Buffer interrupt for mailboxes 8-127
> + interrupt-names:
> + items:
> + - const: mb-0
> + - const: state
> + - const: berr
Nitpick:
- description: Error detection
and
- const: err
or
- description: Bus Error detection
and
- const: berr
regards,
Marc
> + - const: mb-1
> + required:
> + - compatible
> + - reg
> + - interrupts
> + - interrupt-names
> + else:
> + properties:
> + interrupts:
> + maxItems: 1
> +
> additionalProperties: false
>
> examples:
> --
> 2.45.2
>
>
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support
2024-11-29 14:37 ` Marc Kleine-Budde
@ 2024-11-29 15:20 ` Ciprian Marian Costea
0 siblings, 0 replies; 9+ messages in thread
From: Ciprian Marian Costea @ 2024-11-29 15:20 UTC (permalink / raw)
To: Marc Kleine-Budde
Cc: Vincent Mailhol, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
linux-can, devicetree, linux-kernel, NXP S32 Linux, imx,
Christophe Lizzi, Alberto Ruiz, Enric Balletbo
On 11/29/2024 4:37 PM, Marc Kleine-Budde wrote:
> On 29.11.2024 16:25:33, Ciprian Costea wrote:
>> 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>
>> ---
>> .../bindings/net/can/fsl,flexcan.yaml | 46 +++++++++++++++++--
>> 1 file changed, 42 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..10b658e85ef2 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,37 @@ 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: Error detection
>> + - description: Message Buffer interrupt for mailboxes 8-127
>> + interrupt-names:
>> + items:
>> + - const: mb-0
>> + - const: state
>> + - const: berr
>
> Nitpick:
>
> - description: Error detection
> and
> - const: err
>
> or
>
> - description: Bus Error detection
> and
> - const: berr
>
> regards,
> Marc
>
Hello Marc,
Good point. I will change irq description to 'Bus Error detection' in V4.
Best Regards,
Ciprian
>> + - const: mb-1
>> + required:
>> + - compatible
>> + - reg
>> + - interrupts
>> + - interrupt-names
>> + else:
>> + properties:
>> + interrupts:
>> + maxItems: 1
>> +
>> additionalProperties: false
>>
>> examples:
>> --
>> 2.45.2
>>
>>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support
2024-11-29 14:25 ` [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support Ciprian Costea
2024-11-29 14:37 ` Marc Kleine-Budde
@ 2024-11-29 16:05 ` Krzysztof Kozlowski
2024-12-02 12:25 ` Ciprian Marian Costea
1 sibling, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-11-29 16:05 UTC (permalink / raw)
To: Ciprian Costea, Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-can, devicetree, linux-kernel, NXP S32 Linux, imx,
Christophe Lizzi, Alberto Ruiz, Enric Balletbo
On 29/11/2024 15:25, Ciprian Costea wrote:
> + properties:
> + interrupts:
> + items:
> + - description: Message Buffer interrupt for mailboxes 0-7 and Enhanced RX FIFO
> + - description: Device state change
> + - description: Error detection
> + - description: Message Buffer interrupt for mailboxes 8-127
> + interrupt-names:
> + items:
> + - const: mb-0
> + - const: state
> + - const: berr
> + - const: mb-1
> + required:
> + - compatible
> + - reg
Drop, aren't they already required?
> + - interrupts
> + - interrupt-names
> + else:
> + properties:
> + interrupts:
> + maxItems: 1
Missing constraints for interrupt-names, e.g. :false.
> +
> additionalProperties: false
>
> examples:
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support
2024-11-29 16:05 ` Krzysztof Kozlowski
@ 2024-12-02 12:25 ` Ciprian Marian Costea
0 siblings, 0 replies; 9+ messages in thread
From: Ciprian Marian Costea @ 2024-12-02 12:25 UTC (permalink / raw)
To: Krzysztof Kozlowski, Marc Kleine-Budde, Vincent Mailhol,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-can, devicetree, linux-kernel, NXP S32 Linux, imx,
Christophe Lizzi, Alberto Ruiz, Enric Balletbo
On 11/29/2024 6:05 PM, Krzysztof Kozlowski wrote:
> On 29/11/2024 15:25, Ciprian Costea wrote:
>> + properties:
>> + interrupts:
>> + items:
>> + - description: Message Buffer interrupt for mailboxes 0-7 and Enhanced RX FIFO
>> + - description: Device state change
>> + - description: Error detection
>> + - description: Message Buffer interrupt for mailboxes 8-127
>> + interrupt-names:
>> + items:
>> + - const: mb-0
>> + - const: state
>> + - const: berr
>> + - const: mb-1
>> + required:
>> + - compatible
>> + - reg
>
>
> Drop, aren't they already required?
>
Yes, I was not sure if 'required' here overrides or appends the items to
the 'global' required declaration.
Now I know it appends them, so I will only keep 'interrupt-names'. Thanks.
>> + - interrupts
>> + - interrupt-names
>> + else:
>> + properties:
>> + interrupts:
>> + maxItems: 1
>
>
> Missing constraints for interrupt-names, e.g. :false.
>
Correct, I will add 'interrupt-names' constraint in V4.
>
>> +
>> additionalProperties: false
>>
>> examples:
>
>
> Best regards,
> Krzysztof
Best Regards,
Ciprian
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-12-02 12:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19 8:01 [PATCH v3 0/3] add FlexCAN support for S32G2/S32G3 SoCs Ciprian Costea
2024-11-19 8:01 ` [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support Ciprian Costea
2024-11-19 8:01 ` [PATCH v3 2/3] can: flexcan: add NXP " Ciprian Costea
2024-11-19 8:07 ` [PATCH v3 0/3] add FlexCAN support for S32G2/S32G3 SoCs Ciprian Marian Costea
-- strict thread matches above, loose matches on Subject: below --
2024-11-29 14:25 Ciprian Costea
2024-11-29 14:25 ` [PATCH v3 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support Ciprian Costea
2024-11-29 14:37 ` Marc Kleine-Budde
2024-11-29 15:20 ` Ciprian Marian Costea
2024-11-29 16:05 ` Krzysztof Kozlowski
2024-12-02 12:25 ` Ciprian Marian Costea
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox