[PATCH v3 1/2] dt-bindings: can: fsl,flexcan: add transceiver capabilities

Dimitri Fedrau via B4 Relay posted 2 patches 9 months, 4 weeks ago
There is a newer version of this series
[PATCH v3 1/2] dt-bindings: can: fsl,flexcan: add transceiver capabilities
Posted by Dimitri Fedrau via B4 Relay 9 months, 4 weeks ago
From: Dimitri Fedrau <dimitri.fedrau@liebherr.com>

Currently the flexcan driver does only support adding PHYs by using the
"old" regulator bindings. Add support for CAN transceivers as a PHY.

Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
---
 .../devicetree/bindings/net/can/fsl,flexcan.yaml          | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml b/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
index 73252fe56fe6c8e9fd19142208bb655dc86d47cd..81125883cf86b9d19616bde378f74bdb6a32f1b2 100644
--- a/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
+++ b/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
@@ -77,6 +77,9 @@ properties:
   xceiver-supply:
     description: Regulator that powers the CAN transceiver.
 
+  phys:
+    maxItems: 1
+
   big-endian:
     $ref: /schemas/types.yaml#/definitions/flag
     description: |
@@ -171,6 +174,18 @@ allOf:
         interrupts:
           maxItems: 1
         interrupt-names: false
+  - if:
+      required:
+        - xceiver-supply
+    then:
+      properties:
+        phys: false
+  - if:
+      required:
+        - phys
+    then:
+      properties:
+        xceiver-supply: false
 
 additionalProperties: false
 

-- 
2.39.5
Re: [PATCH v3 1/2] dt-bindings: can: fsl,flexcan: add transceiver capabilities
Posted by Conor Dooley 9 months, 3 weeks ago
On Fri, Feb 21, 2025 at 08:40:04AM +0100, Dimitri Fedrau via B4 Relay wrote:
> From: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
> 
> Currently the flexcan driver does only support adding PHYs by using the
> "old" regulator bindings. Add support for CAN transceivers as a PHY.
> 
> Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
> ---
>  .../devicetree/bindings/net/can/fsl,flexcan.yaml          | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml b/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
> index 73252fe56fe6c8e9fd19142208bb655dc86d47cd..81125883cf86b9d19616bde378f74bdb6a32f1b2 100644
> --- a/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
> +++ b/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
> @@ -77,6 +77,9 @@ properties:
>    xceiver-supply:
>      description: Regulator that powers the CAN transceiver.
>  
> +  phys:
> +    maxItems: 1
> +
>    big-endian:
>      $ref: /schemas/types.yaml#/definitions/flag
>      description: |
> @@ -171,6 +174,18 @@ allOf:
>          interrupts:
>            maxItems: 1
>          interrupt-names: false
> +  - if:
> +      required:
> +        - xceiver-supply
> +    then:
> +      properties:
> +        phys: false
> +  - if:
> +      required:
> +        - phys
> +    then:
> +      properties:
> +        xceiver-supply: false

The duplication here is not needed, they both will cause errors in the
same situation. With one dropped,
Acked-by: Conor Dooley <conor.dooley@microchip.com>

Re: [PATCH v3 1/2] dt-bindings: can: fsl,flexcan: add transceiver capabilities
Posted by Dimitri Fedrau 9 months, 3 weeks ago
Am Fri, Feb 21, 2025 at 04:59:16PM +0000 schrieb Conor Dooley:
> On Fri, Feb 21, 2025 at 08:40:04AM +0100, Dimitri Fedrau via B4 Relay wrote:
> > From: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
> > 
> > Currently the flexcan driver does only support adding PHYs by using the
> > "old" regulator bindings. Add support for CAN transceivers as a PHY.
> > 
> > Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
> > ---
> >  .../devicetree/bindings/net/can/fsl,flexcan.yaml          | 15 +++++++++++++++
> >  1 file changed, 15 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml b/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
> > index 73252fe56fe6c8e9fd19142208bb655dc86d47cd..81125883cf86b9d19616bde378f74bdb6a32f1b2 100644
> > --- a/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
> > +++ b/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml
> > @@ -77,6 +77,9 @@ properties:
> >    xceiver-supply:
> >      description: Regulator that powers the CAN transceiver.
> >  
> > +  phys:
> > +    maxItems: 1
> > +
> >    big-endian:
> >      $ref: /schemas/types.yaml#/definitions/flag
> >      description: |
> > @@ -171,6 +174,18 @@ allOf:
> >          interrupts:
> >            maxItems: 1
> >          interrupt-names: false
> > +  - if:
> > +      required:
> > +        - xceiver-supply
> > +    then:
> > +      properties:
> > +        phys: false
> > +  - if:
> > +      required:
> > +        - phys
> > +    then:
> > +      properties:
> > +        xceiver-supply: false
> 
> The duplication here is not needed, they both will cause errors in the
> same situation. With one dropped,
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> 

Thanks for your help, will drop one and sent out a V4.

Best regards,
Dimitri Fedrau