diff mbox series

[3/4] dt-bindings: net: can: Document transceiver implementation as phy

Message ID 20210409134056.18740-4-a-govindraju@ti.com
State Superseded
Headers show
Series CAN TRANSCEIVER: Add support for CAN transceivers | expand

Commit Message

Aswath Govindraju April 9, 2021, 1:40 p.m. UTC
From: Faiz Abbas <faiz_abbas@ti.com>

Some transceivers need a configuration step (for example, pulling the
standby or enable lines) for them to start sending messages. The
transceiver can be implemented as a phy with the configuration done in the
phy driver. The bit rate limitation can the be obtained by the driver using
the phy node.

Document the above implementation in the bosch mcan bindings

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
---
 Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Rob Herring April 12, 2021, 5:51 p.m. UTC | #1
On Fri, Apr 09, 2021 at 07:10:53PM +0530, Aswath Govindraju wrote:
> From: Faiz Abbas <faiz_abbas@ti.com>
> 
> Some transceivers need a configuration step (for example, pulling the
> standby or enable lines) for them to start sending messages. The
> transceiver can be implemented as a phy with the configuration done in the
> phy driver. The bit rate limitation can the be obtained by the driver using
> the phy node.
> 
> Document the above implementation in the bosch mcan bindings
> 
> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
> ---
>  Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> index 798fa5fb7bb2..2c01899b1a3e 100644
> --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> @@ -109,6 +109,12 @@ properties:
>    can-transceiver:
>      $ref: can-transceiver.yaml#
>  
> +  phys:
> +    minItems: 1

maxItems: 1

> +
> +  phy-names:
> +    const: can_transceiver

Kind of a pointless name. You don't really need a name if there's a 
single entry.

> +
>  required:
>    - compatible
>    - reg
> -- 
> 2.17.1
>
Aswath Govindraju April 14, 2021, 6:49 a.m. UTC | #2
Hi Rob,

On 12/04/21 11:21 pm, Rob Herring wrote:
> On Fri, Apr 09, 2021 at 07:10:53PM +0530, Aswath Govindraju wrote:
>> From: Faiz Abbas <faiz_abbas@ti.com>
>>
>> Some transceivers need a configuration step (for example, pulling the
>> standby or enable lines) for them to start sending messages. The
>> transceiver can be implemented as a phy with the configuration done in the
>> phy driver. The bit rate limitation can the be obtained by the driver using
>> the phy node.
>>
>> Document the above implementation in the bosch mcan bindings
>>
>> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
>> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
>> ---
>>  Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
>> index 798fa5fb7bb2..2c01899b1a3e 100644
>> --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
>> +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
>> @@ -109,6 +109,12 @@ properties:
>>    can-transceiver:
>>      $ref: can-transceiver.yaml#
>>  
>> +  phys:
>> +    minItems: 1
> 
> maxItems: 1

Will add this in the respin.

> 
>> +
>> +  phy-names:
>> +    const: can_transceiver
> 
> Kind of a pointless name. You don't really need a name if there's a 
> single entry.
> 

This name used by devm_phy_optional_get() in m_can driver to get the phy
data structure.

Thank you for the review.

Regards,
Aswath

>> +
>>  required:
>>    - compatible
>>    - reg
>> -- 
>> 2.17.1
>>
Rob Herring April 14, 2021, 1:24 p.m. UTC | #3
On Wed, Apr 14, 2021 at 1:49 AM Aswath Govindraju <a-govindraju@ti.com> wrote:
>
> Hi Rob,
>
> On 12/04/21 11:21 pm, Rob Herring wrote:
> > On Fri, Apr 09, 2021 at 07:10:53PM +0530, Aswath Govindraju wrote:
> >> From: Faiz Abbas <faiz_abbas@ti.com>
> >>
> >> Some transceivers need a configuration step (for example, pulling the
> >> standby or enable lines) for them to start sending messages. The
> >> transceiver can be implemented as a phy with the configuration done in the
> >> phy driver. The bit rate limitation can the be obtained by the driver using
> >> the phy node.
> >>
> >> Document the above implementation in the bosch mcan bindings
> >>
> >> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
> >> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
> >> ---
> >>  Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 6 ++++++
> >>  1 file changed, 6 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> >> index 798fa5fb7bb2..2c01899b1a3e 100644
> >> --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> >> +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
> >> @@ -109,6 +109,12 @@ properties:
> >>    can-transceiver:
> >>      $ref: can-transceiver.yaml#
> >>
> >> +  phys:
> >> +    minItems: 1
> >
> > maxItems: 1
>
> Will add this in the respin.
>
> >
> >> +
> >> +  phy-names:
> >> +    const: can_transceiver
> >
> > Kind of a pointless name. You don't really need a name if there's a
> > single entry.
> >
>
> This name used by devm_phy_optional_get() in m_can driver to get the phy
> data structure.

With no name, you'll get the 1st one. Looks like the phy subsystem
warns on this. That's wrong, so please fix that.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
index 798fa5fb7bb2..2c01899b1a3e 100644
--- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
+++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml
@@ -109,6 +109,12 @@  properties:
   can-transceiver:
     $ref: can-transceiver.yaml#
 
+  phys:
+    minItems: 1
+
+  phy-names:
+    const: can_transceiver
+
 required:
   - compatible
   - reg