diff mbox series

[RFC,v2,01/10] dt-bindings: net: ti: Adds DUAL-EMAC mode support on PRU-ICSS2 for AM57xx SOCs

Message ID 20250124122353.1457174-2-basharath@couthit.com (mailing list archive)
State New
Headers show
Series PRU-ICSSM Ethernet Driver | expand

Commit Message

Basharath Hussain Khaja Jan. 24, 2025, 12:23 p.m. UTC
From: Parvathi Pudi <parvathi@couthit.com>

Documentation update for the newly added "pruss2_eth" device tree
node and its dependencies along with compatibility for PRU-ICSS
Industrial Ethernet Peripheral (IEP), PRU-ICSS Enhanced Capture
(eCAP) peripheral and using YAML binding document for AM57xx SoCs.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Parvathi Pudi <parvathi@couthit.com>
Signed-off-by: Basharath Hussain Khaja <basharath@couthit.com>
---
 .../devicetree/bindings/net/ti,icss-iep.yaml  |   5 +
 .../bindings/net/ti,icssm-prueth.yaml         | 147 ++++++++++++++++++
 .../bindings/net/ti,pruss-ecap.yaml           |  32 ++++
 .../devicetree/bindings/soc/ti/ti,pruss.yaml  |   9 ++
 4 files changed, 193 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
 create mode 100644 Documentation/devicetree/bindings/net/ti,pruss-ecap.yaml

Comments

Conor Dooley Jan. 24, 2025, 4:39 p.m. UTC | #1
On Fri, Jan 24, 2025 at 05:53:44PM +0530, Basharath Hussain Khaja wrote:
> From: Parvathi Pudi <parvathi@couthit.com>
> 
> Documentation update for the newly added "pruss2_eth" device tree
> node and its dependencies along with compatibility for PRU-ICSS
> Industrial Ethernet Peripheral (IEP), PRU-ICSS Enhanced Capture
> (eCAP) peripheral and using YAML binding document for AM57xx SoCs.
> 
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> Signed-off-by: Parvathi Pudi <parvathi@couthit.com>
> Signed-off-by: Basharath Hussain Khaja <basharath@couthit.com>

I find this hard to believe. If all these people handled the patch, the
signoff from Parvathi would be first, no? Should some of these people be
co-developers?

> ---
>  .../devicetree/bindings/net/ti,icss-iep.yaml  |   5 +
>  .../bindings/net/ti,icssm-prueth.yaml         | 147 ++++++++++++++++++
>  .../bindings/net/ti,pruss-ecap.yaml           |  32 ++++
>  .../devicetree/bindings/soc/ti/ti,pruss.yaml  |   9 ++
>  4 files changed, 193 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
>  create mode 100644 Documentation/devicetree/bindings/net/ti,pruss-ecap.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/ti,icss-iep.yaml b/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
> index e36e3a622904..aad7d37fb47e 100644
> --- a/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
> +++ b/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
> @@ -8,6 +8,8 @@ title: Texas Instruments ICSS Industrial Ethernet Peripheral (IEP) module
>  
>  maintainers:
>    - Md Danish Anwar <danishanwar@ti.com>
> +  - Parvathi Pudi <parvathi@couthit.com>
> +  - Basharath Hussain Khaja <basharath@couthit.com>
>  
>  properties:
>    compatible:
> @@ -20,6 +22,9 @@ properties:
>  
>        - const: ti,am654-icss-iep
>  
> +      - items:
> +          - enum:
> +              - ti,am5728-icss-iep

"items: - enum: <one item>" is the same as const.

>  
>    reg:
>      maxItems: 1
> diff --git a/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml b/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
> new file mode 100644
> index 000000000000..51e99beb5f5f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
> @@ -0,0 +1,147 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/ti,icssm-prueth.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments ICSSM PRUSS Ethernet
> +
> +maintainers:
> +  - Roger Quadros <rogerq@ti.com>
> +  - Andrew F. Davis <afd@ti.com>
> +  - Parvathi Pudi <parvathi@couthit.com>
> +  - Basharath Hussain Khaja <basharath@couthit.com>
> +
> +description:
> +  Ethernet based on the Programmable Real-Time Unit and Industrial
> +  Communication Subsystem.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,am57-prueth     # for AM57x SoC family
> +
> +  sram:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description:
> +      phandle to OCMC SRAM node
> +
> +  ti,mii-rt:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description:
> +      phandle to MII_RT module's syscon regmap
> +
> +  ti,iep:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description:
> +      phandle to IEP (Industrial Ethernet Peripheral) for ICSS
> +
> +  ecap:

Why's this one not got a ti prefix?

> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description:
> +      phandle to Enhanced Capture (eCAP) event for ICSS

Why do you need phandles for these things, can they not be looked up by
compatible? (e.g. multiple devices on one SoC).

> +
> +  interrupts:
> +    items:
> +      - description: High priority Rx Interrupt specifier.
> +      - description: Low priority Rx Interrupt specifier.
Basharath Hussain Khaja Jan. 29, 2025, 5:16 a.m. UTC | #2
> On Fri, Jan 24, 2025 at 05:53:44PM +0530, Basharath Hussain Khaja wrote:
>> From: Parvathi Pudi <parvathi@couthit.com>
>> 
>> Documentation update for the newly added "pruss2_eth" device tree
>> node and its dependencies along with compatibility for PRU-ICSS
>> Industrial Ethernet Peripheral (IEP), PRU-ICSS Enhanced Capture
>> (eCAP) peripheral and using YAML binding document for AM57xx SoCs.
>> 
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> Signed-off-by: Andrew F. Davis <afd@ti.com>
>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>> Signed-off-by: Parvathi Pudi <parvathi@couthit.com>
>> Signed-off-by: Basharath Hussain Khaja <basharath@couthit.com>
> 
> I find this hard to believe. If all these people handled the patch, the
> signoff from Parvathi would be first, no? Should some of these people be
> co-developers?
> 

Changes are about multiple modules. We have added our sign-off followed by original module authors.

>> ---
>>  .../devicetree/bindings/net/ti,icss-iep.yaml  |   5 +
>>  .../bindings/net/ti,icssm-prueth.yaml         | 147 ++++++++++++++++++
>>  .../bindings/net/ti,pruss-ecap.yaml           |  32 ++++
>>  .../devicetree/bindings/soc/ti/ti,pruss.yaml  |   9 ++
>>  4 files changed, 193 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
>>  create mode 100644 Documentation/devicetree/bindings/net/ti,pruss-ecap.yaml
>> 
>> diff --git a/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
>> b/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
>> index e36e3a622904..aad7d37fb47e 100644
>> --- a/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
>> +++ b/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
>> @@ -8,6 +8,8 @@ title: Texas Instruments ICSS Industrial Ethernet Peripheral
>> (IEP) module
>>  
>>  maintainers:
>>    - Md Danish Anwar <danishanwar@ti.com>
>> +  - Parvathi Pudi <parvathi@couthit.com>
>> +  - Basharath Hussain Khaja <basharath@couthit.com>
>>  
>>  properties:
>>    compatible:
>> @@ -20,6 +22,9 @@ properties:
>>  
>>        - const: ti,am654-icss-iep
>>  
>> +      - items:
>> +          - enum:
>> +              - ti,am5728-icss-iep
> 
> "items: - enum: <one item>" is the same as const.
> 

Sure, we will modify as below.

      - const: ti,am5728-icss-iep

>>  
>>    reg:
>>      maxItems: 1
>> diff --git a/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
>> b/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
>> new file mode 100644
>> index 000000000000..51e99beb5f5f
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
>> @@ -0,0 +1,147 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/net/ti,icssm-prueth.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Texas Instruments ICSSM PRUSS Ethernet
>> +
>> +maintainers:
>> +  - Roger Quadros <rogerq@ti.com>
>> +  - Andrew F. Davis <afd@ti.com>
>> +  - Parvathi Pudi <parvathi@couthit.com>
>> +  - Basharath Hussain Khaja <basharath@couthit.com>
>> +
>> +description:
>> +  Ethernet based on the Programmable Real-Time Unit and Industrial
>> +  Communication Subsystem.
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - ti,am57-prueth     # for AM57x SoC family
>> +
>> +  sram:
>> +    $ref: /schemas/types.yaml#/definitions/phandle
>> +    description:
>> +      phandle to OCMC SRAM node
>> +
>> +  ti,mii-rt:
>> +    $ref: /schemas/types.yaml#/definitions/phandle
>> +    description:
>> +      phandle to MII_RT module's syscon regmap
>> +
>> +  ti,iep:
>> +    $ref: /schemas/types.yaml#/definitions/phandle
>> +    description:
>> +      phandle to IEP (Industrial Ethernet Peripheral) for ICSS
>> +
>> +  ecap:
> 
> Why's this one not got a ti prefix?
> 

We will add "ti" prefix to ecap as "ti,ecap" in the next version.

>> +    $ref: /schemas/types.yaml#/definitions/phandle
>> +    description:
>> +      phandle to Enhanced Capture (eCAP) event for ICSS
> 
> Why do you need phandles for these things, can they not be looked up by
> compatible? (e.g. multiple devices on one SoC).
> 

ecap is another peripheral similar to IEP in ICSSM/ICSSG. We have created a separate driver for possible reuse with ICSSG in future.

>> +
>> +  interrupts:
>> +    items:
>> +      - description: High priority Rx Interrupt specifier.
> > +      - description: Low priority Rx Interrupt specifier.


Thanks & Best Regards,
Basharath
Conor Dooley Jan. 29, 2025, 5:48 p.m. UTC | #3
On Wed, Jan 29, 2025 at 10:46:52AM +0530, Basharath Hussain Khaja wrote:
> > On Fri, Jan 24, 2025 at 05:53:44PM +0530, Basharath Hussain Khaja wrote:
> >> From: Parvathi Pudi <parvathi@couthit.com>
> >> 
> >> Documentation update for the newly added "pruss2_eth" device tree
> >> node and its dependencies along with compatibility for PRU-ICSS
> >> Industrial Ethernet Peripheral (IEP), PRU-ICSS Enhanced Capture
> >> (eCAP) peripheral and using YAML binding document for AM57xx SoCs.
> >> 
> >> Signed-off-by: Roger Quadros <rogerq@ti.com>
> >> Signed-off-by: Andrew F. Davis <afd@ti.com>
> >> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> >> Signed-off-by: Parvathi Pudi <parvathi@couthit.com>
> >> Signed-off-by: Basharath Hussain Khaja <basharath@couthit.com>
> > 
> > I find this hard to believe. If all these people handled the patch, the
> > signoff from Parvathi would be first, no? Should some of these people be
> > co-developers?
> > 
> 
> Changes are about multiple modules. We have added our sign-off followed by original module authors.

I think what you're trying to say is that these people are
co-developers? Anyone that contributed to the content of this patch
needs to get a co-developed-by. If they're not co-developers, and you
just want to put them in the maintainers section, they don't get
sign-offs.

> >> ---
> >>  .../devicetree/bindings/net/ti,icss-iep.yaml  |   5 +
> >>  .../bindings/net/ti,icssm-prueth.yaml         | 147 ++++++++++++++++++
> >>  .../bindings/net/ti,pruss-ecap.yaml           |  32 ++++
> >>  .../devicetree/bindings/soc/ti/ti,pruss.yaml  |   9 ++
> >>  4 files changed, 193 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
> >>  create mode 100644 Documentation/devicetree/bindings/net/ti,pruss-ecap.yaml
> >> 
> >> diff --git a/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
> >> b/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
> >> index e36e3a622904..aad7d37fb47e 100644
> >> --- a/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
> >> +++ b/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
> >> @@ -8,6 +8,8 @@ title: Texas Instruments ICSS Industrial Ethernet Peripheral
> >> (IEP) module
> >>  
> >>  maintainers:
> >>    - Md Danish Anwar <danishanwar@ti.com>
> >> +  - Parvathi Pudi <parvathi@couthit.com>
> >> +  - Basharath Hussain Khaja <basharath@couthit.com>
> >>  
> >>  properties:
> >>    compatible:
> >> @@ -20,6 +22,9 @@ properties:
> >>  
> >>        - const: ti,am654-icss-iep
> >>  
> >> +      - items:
> >> +          - enum:
> >> +              - ti,am5728-icss-iep
> > 
> > "items: - enum: <one item>" is the same as const.
> > 
> 
> Sure, we will modify as below.
> 
>       - const: ti,am5728-icss-iep
> 
> >>  
> >>    reg:
> >>      maxItems: 1
> >> diff --git a/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
> >> b/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
> >> new file mode 100644
> >> index 000000000000..51e99beb5f5f
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
> >> @@ -0,0 +1,147 @@
> >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> >> +%YAML 1.2
> >> +---
> >> +$id: http://devicetree.org/schemas/net/ti,icssm-prueth.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: Texas Instruments ICSSM PRUSS Ethernet
> >> +
> >> +maintainers:
> >> +  - Roger Quadros <rogerq@ti.com>
> >> +  - Andrew F. Davis <afd@ti.com>
> >> +  - Parvathi Pudi <parvathi@couthit.com>
> >> +  - Basharath Hussain Khaja <basharath@couthit.com>
> >> +
> >> +description:
> >> +  Ethernet based on the Programmable Real-Time Unit and Industrial
> >> +  Communication Subsystem.
> >> +
> >> +properties:
> >> +  compatible:
> >> +    enum:
> >> +      - ti,am57-prueth     # for AM57x SoC family
> >> +
> >> +  sram:
> >> +    $ref: /schemas/types.yaml#/definitions/phandle
> >> +    description:
> >> +      phandle to OCMC SRAM node
> >> +
> >> +  ti,mii-rt:
> >> +    $ref: /schemas/types.yaml#/definitions/phandle
> >> +    description:
> >> +      phandle to MII_RT module's syscon regmap
> >> +
> >> +  ti,iep:
> >> +    $ref: /schemas/types.yaml#/definitions/phandle
> >> +    description:
> >> +      phandle to IEP (Industrial Ethernet Peripheral) for ICSS
> >> +
> >> +  ecap:
> > 
> > Why's this one not got a ti prefix?
> > 
> 
> We will add "ti" prefix to ecap as "ti,ecap" in the next version.
> 
> >> +    $ref: /schemas/types.yaml#/definitions/phandle
> >> +    description:
> >> +      phandle to Enhanced Capture (eCAP) event for ICSS
> > 
> > Why do you need phandles for these things, can they not be looked up by
> > compatible? (e.g. multiple devices on one SoC).
> > 
> 
> ecap is another peripheral similar to IEP in ICSSM/ICSSG. We have created a separate driver for possible reuse with ICSSG in future.

That's not an answer to my question.

> 
> >> +
> >> +  interrupts:
> >> +    items:
> >> +      - description: High priority Rx Interrupt specifier.
> > > +      - description: Low priority Rx Interrupt specifier.
> 
> 
> Thanks & Best Regards,
> Basharath
Basharath Hussain Khaja Feb. 3, 2025, 12:29 p.m. UTC | #4
> On Wed, Jan 29, 2025 at 10:46:52AM +0530, Basharath Hussain Khaja wrote:
>> > On Fri, Jan 24, 2025 at 05:53:44PM +0530, Basharath Hussain Khaja wrote:
>> >> From: Parvathi Pudi <parvathi@couthit.com>
>> >> 
>> >> Documentation update for the newly added "pruss2_eth" device tree
>> >> node and its dependencies along with compatibility for PRU-ICSS
>> >> Industrial Ethernet Peripheral (IEP), PRU-ICSS Enhanced Capture
>> >> (eCAP) peripheral and using YAML binding document for AM57xx SoCs.
>> >> 
>> >> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> >> Signed-off-by: Andrew F. Davis <afd@ti.com>
>> >> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>> >> Signed-off-by: Parvathi Pudi <parvathi@couthit.com>
>> >> Signed-off-by: Basharath Hussain Khaja <basharath@couthit.com>
>> > 
>> > I find this hard to believe. If all these people handled the patch, the
>> > signoff from Parvathi would be first, no? Should some of these people be
>> > co-developers?
>> > 
>> 
>> Changes are about multiple modules. We have added our sign-off followed by
>> original module authors.
> 
> I think what you're trying to say is that these people are
> co-developers? Anyone that contributed to the content of this patch
> needs to get a co-developed-by. If they're not co-developers, and you
> just want to put them in the maintainers section, they don't get
> sign-offs.
> 

Yes you may be right. We thought it would be good to include module
owners in signed-off-by, though it is a documentation file which was
not available earlier we have newly added. Due to that the ownership 
is with us. 

As you suggested we will clean this in the next version as below.

Signed-off-by: Parvathi Pudi <parvathi@couthit.com>
Signed-off-by: Basharath Hussain Khaja <basharath@couthit.com>

>> >> ---
>> >>  .../devicetree/bindings/net/ti,icss-iep.yaml  |   5 +
>> >>  .../bindings/net/ti,icssm-prueth.yaml         | 147 ++++++++++++++++++
>> >>  .../bindings/net/ti,pruss-ecap.yaml           |  32 ++++
>> >>  .../devicetree/bindings/soc/ti/ti,pruss.yaml  |   9 ++
>> >>  4 files changed, 193 insertions(+)
>> >>  create mode 100644 Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
>> >>  create mode 100644 Documentation/devicetree/bindings/net/ti,pruss-ecap.yaml
>> >> 
>> >> diff --git a/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
>> >> b/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
>> >> index e36e3a622904..aad7d37fb47e 100644
>> >> --- a/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
>> >> +++ b/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
>> >> @@ -8,6 +8,8 @@ title: Texas Instruments ICSS Industrial Ethernet Peripheral
>> >> (IEP) module
>> >>  
>> >>  maintainers:
>> >>    - Md Danish Anwar <danishanwar@ti.com>
>> >> +  - Parvathi Pudi <parvathi@couthit.com>
>> >> +  - Basharath Hussain Khaja <basharath@couthit.com>
>> >>  
>> >>  properties:
>> >>    compatible:
>> >> @@ -20,6 +22,9 @@ properties:
>> >>  
>> >>        - const: ti,am654-icss-iep
>> >>  
>> >> +      - items:
>> >> +          - enum:
>> >> +              - ti,am5728-icss-iep
>> > 
>> > "items: - enum: <one item>" is the same as const.
>> > 
>> 
>> Sure, we will modify as below.
>> 
>>       - const: ti,am5728-icss-iep
>> 
>> >>  
>> >>    reg:
>> >>      maxItems: 1
>> >> diff --git a/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
>> >> b/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
>> >> new file mode 100644
>> >> index 000000000000..51e99beb5f5f
>> >> --- /dev/null
>> >> +++ b/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
>> >> @@ -0,0 +1,147 @@
>> >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> >> +%YAML 1.2
>> >> +---
>> >> +$id: http://devicetree.org/schemas/net/ti,icssm-prueth.yaml#
>> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> >> +
>> >> +title: Texas Instruments ICSSM PRUSS Ethernet
>> >> +
>> >> +maintainers:
>> >> +  - Roger Quadros <rogerq@ti.com>
>> >> +  - Andrew F. Davis <afd@ti.com>
>> >> +  - Parvathi Pudi <parvathi@couthit.com>
>> >> +  - Basharath Hussain Khaja <basharath@couthit.com>
>> >> +
>> >> +description:
>> >> +  Ethernet based on the Programmable Real-Time Unit and Industrial
>> >> +  Communication Subsystem.
>> >> +
>> >> +properties:
>> >> +  compatible:
>> >> +    enum:
>> >> +      - ti,am57-prueth     # for AM57x SoC family
>> >> +
>> >> +  sram:
>> >> +    $ref: /schemas/types.yaml#/definitions/phandle
>> >> +    description:
>> >> +      phandle to OCMC SRAM node
>> >> +
>> >> +  ti,mii-rt:
>> >> +    $ref: /schemas/types.yaml#/definitions/phandle
>> >> +    description:
>> >> +      phandle to MII_RT module's syscon regmap
>> >> +
>> >> +  ti,iep:
>> >> +    $ref: /schemas/types.yaml#/definitions/phandle
>> >> +    description:
>> >> +      phandle to IEP (Industrial Ethernet Peripheral) for ICSS
>> >> +
>> >> +  ecap:
>> > 
>> > Why's this one not got a ti prefix?
>> > 
>> 
>> We will add "ti" prefix to ecap as "ti,ecap" in the next version.
>> 
>> >> +    $ref: /schemas/types.yaml#/definitions/phandle
>> >> +    description:
>> >> +      phandle to Enhanced Capture (eCAP) event for ICSS
>> > 
>> > Why do you need phandles for these things, can they not be looked up by
>> > compatible? (e.g. multiple devices on one SoC).
>> > 
>> 
>> ecap is another peripheral similar to IEP in ICSSM/ICSSG. We have created a
>> separate driver for possible reuse with ICSSG in future.
> 
> That's not an answer to my question.
> 

We can use compatible if we have only one instance of a peripheral in the SOC. 
On the AM57x SOC we have two identical ICSS instances(ICSS1 and ICSS2). So we 
use phandles to differentiate between the two instances. Currently this patch 
series adds support for ICSS2 instance on the AM57x SOC. Support for ICSS1 instance 
will be added in subsequent patches.

>> 
>> >> +
>> >> +  interrupts:
>> >> +    items:
>> >> +      - description: High priority Rx Interrupt specifier.
>> > > +      - description: Low priority Rx Interrupt specifier.
>> 
>> 

Thanks & Best Regards,
Basharath
Conor Dooley Feb. 4, 2025, 6:16 p.m. UTC | #5
On Mon, Feb 03, 2025 at 05:59:55PM +0530, Basharath Hussain Khaja wrote:
> >> >> +    $ref: /schemas/types.yaml#/definitions/phandle
> >> >> +    description:
> >> >> +      phandle to Enhanced Capture (eCAP) event for ICSS
> >> > 
> >> > Why do you need phandles for these things, can they not be looked up by
> >> > compatible? (e.g. multiple devices on one SoC).
> >> > 
> >> 
> >> ecap is another peripheral similar to IEP in ICSSM/ICSSG. We have created a
> >> separate driver for possible reuse with ICSSG in future.
> > 
> > That's not an answer to my question.
> > 
> 
> We can use compatible if we have only one instance of a peripheral in the SOC. 
> On the AM57x SOC we have two identical ICSS instances(ICSS1 and ICSS2). So we 
> use phandles to differentiate between the two instances. Currently this patch 
> series adds support for ICSS2 instance on the AM57x SOC. Support for ICSS1 instance 
> will be added in subsequent patches.

Cool, that's an acceptance answer, thanks.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/ti,icss-iep.yaml b/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
index e36e3a622904..aad7d37fb47e 100644
--- a/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
+++ b/Documentation/devicetree/bindings/net/ti,icss-iep.yaml
@@ -8,6 +8,8 @@  title: Texas Instruments ICSS Industrial Ethernet Peripheral (IEP) module
 
 maintainers:
   - Md Danish Anwar <danishanwar@ti.com>
+  - Parvathi Pudi <parvathi@couthit.com>
+  - Basharath Hussain Khaja <basharath@couthit.com>
 
 properties:
   compatible:
@@ -20,6 +22,9 @@  properties:
 
       - const: ti,am654-icss-iep
 
+      - items:
+          - enum:
+              - ti,am5728-icss-iep
 
   reg:
     maxItems: 1
diff --git a/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml b/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
new file mode 100644
index 000000000000..51e99beb5f5f
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ti,icssm-prueth.yaml
@@ -0,0 +1,147 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/ti,icssm-prueth.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments ICSSM PRUSS Ethernet
+
+maintainers:
+  - Roger Quadros <rogerq@ti.com>
+  - Andrew F. Davis <afd@ti.com>
+  - Parvathi Pudi <parvathi@couthit.com>
+  - Basharath Hussain Khaja <basharath@couthit.com>
+
+description:
+  Ethernet based on the Programmable Real-Time Unit and Industrial
+  Communication Subsystem.
+
+properties:
+  compatible:
+    enum:
+      - ti,am57-prueth     # for AM57x SoC family
+
+  sram:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      phandle to OCMC SRAM node
+
+  ti,mii-rt:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      phandle to MII_RT module's syscon regmap
+
+  ti,iep:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      phandle to IEP (Industrial Ethernet Peripheral) for ICSS
+
+  ecap:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      phandle to Enhanced Capture (eCAP) event for ICSS
+
+  interrupts:
+    items:
+      - description: High priority Rx Interrupt specifier.
+      - description: Low priority Rx Interrupt specifier.
+
+  interrupt-names:
+    items:
+      - const: rx_hp
+      - const: rx_lp
+
+  ethernet-ports:
+    type: object
+    additionalProperties: false
+
+    properties:
+      '#address-cells':
+        const: 1
+      '#size-cells':
+        const: 0
+
+    patternProperties:
+      ^ethernet-port@[0-1]$:
+        type: object
+        description: ICSSM PRUETH external ports
+        $ref: ethernet-controller.yaml#
+        unevaluatedProperties: false
+
+        properties:
+          reg:
+            items:
+              - enum: [0, 1]
+            description: ICSSM PRUETH port number
+
+          interrupts:
+            maxItems: 3
+
+          interrupt-names:
+            items:
+              - const: rx
+              - const: emac_ptp_tx
+              - const: hsr_ptp_tx
+
+        required:
+          - reg
+
+    anyOf:
+      - required:
+          - ethernet-port@0
+      - required:
+          - ethernet-port@1
+
+required:
+  - compatible
+  - sram
+  - ti,mii-rt
+  - ti,iep
+  - ecap
+  - ethernet-ports
+  - interrupts
+  - interrupt-names
+
+allOf:
+  - $ref: /schemas/remoteproc/ti,pru-consumer.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    /* Dual-MAC Ethernet application node on PRU-ICSS2 */
+    pruss2_eth: pruss2-eth {
+      compatible = "ti,am57-prueth";
+      ti,prus = <&pru2_0>, <&pru2_1>;
+      sram = <&ocmcram1>;
+      ti,mii-rt = <&pruss2_mii_rt>;
+      ti,iep = <&pruss2_iep>;
+      ecap = <&pruss2_ecap>;
+      interrupts = <20 2 2>, <21 3 3>;
+      interrupt-names = "rx_hp", "rx_lp";
+      interrupt-parent = <&pruss2_intc>;
+
+      ethernet-ports {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        pruss2_emac0: ethernet-port@0 {
+          reg = <0>;
+          phy-handle = <&pruss2_eth0_phy>;
+          phy-mode = "mii";
+          interrupts = <20 2 2>, <26 6 6>, <23 6 6>;
+          interrupt-names = "rx", "emac_ptp_tx", "hsr_ptp_tx";
+          /* Filled in by bootloader */
+          local-mac-address = [00 00 00 00 00 00];
+        };
+
+        pruss2_emac1: ethernet-port@1 {
+          reg = <1>;
+          phy-handle = <&pruss2_eth1_phy>;
+          phy-mode = "mii";
+          interrupts = <21 3 3>, <27 9 7>, <24 9 7>;
+          interrupt-names = "rx", "emac_ptp_tx", "hsr_ptp_tx";
+          /* Filled in by bootloader */
+          local-mac-address = [00 00 00 00 00 00];
+        };
+      };
+    };
diff --git a/Documentation/devicetree/bindings/net/ti,pruss-ecap.yaml b/Documentation/devicetree/bindings/net/ti,pruss-ecap.yaml
new file mode 100644
index 000000000000..42f217099b2e
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ti,pruss-ecap.yaml
@@ -0,0 +1,32 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/ti,pruss-ecap.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments PRU-ICSS Enhanced Capture (eCAP) event module
+
+maintainers:
+  - Murali Karicheri <m-karicheri2@ti.com>
+  - Parvathi Pudi <parvathi@couthit.com>
+  - Basharath Hussain Khaja <basharath@couthit.com>
+
+properties:
+  compatible:
+    const: ti,pruss-ecap
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    pruss2_ecap: ecap@30000 {
+        compatible = "ti,pruss-ecap";
+        reg = <0x30000 0x60>;
+    };
diff --git a/Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml b/Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml
index 927b3200e29e..594f54264a8c 100644
--- a/Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml
+++ b/Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml
@@ -251,6 +251,15 @@  patternProperties:
 
     type: object
 
+  ecap@[a-f0-9]+$:
+    description:
+      PRU-ICSS has a Enhanced Capture (eCAP) event module which can generate
+      and capture periodic timer based events which will be used for features
+      like RX Pacing to rise interrupt when the timer event has occurred.
+      Each PRU-ICSS instance has one eCAP modeule irrespective of SOCs.
+
+    type: object
+
   mii-rt@[a-f0-9]+$:
     description: |
       Real-Time Ethernet to support multiple industrial communication protocols.