2019-11-08 10:37:01

by Christophe Roullier

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: net: dwmac: increase 'maxItems' for 'clocks', 'clock-names' properties

This change is needed for some soc based on snps,dwmac, which have
more than 3 clocks.

Signed-off-by: Christophe Roullier <[email protected]>
---
Documentation/devicetree/bindings/net/snps,dwmac.yaml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 4845e29411e4..376a531062c2 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -27,6 +27,7 @@ select:
- snps,dwmac-3.710
- snps,dwmac-4.00
- snps,dwmac-4.10a
+ - snps,dwmac-4.20a
- snps,dwxgmac
- snps,dwxgmac-2.10

@@ -62,6 +63,7 @@ properties:
- snps,dwmac-3.710
- snps,dwmac-4.00
- snps,dwmac-4.10a
+ - snps,dwmac-4.20a
- snps,dwxgmac
- snps,dwxgmac-2.10

@@ -87,7 +89,8 @@ properties:

clocks:
minItems: 1
- maxItems: 3
+ maxItems: 5
+ additionalItems: true
items:
- description: GMAC main clock
- description: Peripheral registers interface clock
@@ -97,6 +100,8 @@ properties:
clock will be used and this is fine on some platforms.

clock-names:
+ minItems: 1
+ maxItems: 5
additionalItems: true
contains:
enum:
@@ -342,6 +347,7 @@ allOf:
- allwinner,sun50i-a64-emac
- snps,dwmac-4.00
- snps,dwmac-4.10a
+ - snps,dwmac-4.20a
- snps,dwxgmac
- snps,dwxgmac-2.10
- st,spear600-gmac
--
2.17.1


2019-11-08 10:44:52

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: net: dwmac: increase 'maxItems' for 'clocks', 'clock-names' properties

Hi,

On Fri, Nov 08, 2019 at 11:35:25AM +0100, Christophe Roullier wrote:
> This change is needed for some soc based on snps,dwmac, which have
> more than 3 clocks.
>
> Signed-off-by: Christophe Roullier <[email protected]>
> ---
> Documentation/devicetree/bindings/net/snps,dwmac.yaml | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> index 4845e29411e4..376a531062c2 100644
> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> @@ -27,6 +27,7 @@ select:
> - snps,dwmac-3.710
> - snps,dwmac-4.00
> - snps,dwmac-4.10a
> + - snps,dwmac-4.20a
> - snps,dwxgmac
> - snps,dwxgmac-2.10
>
> @@ -62,6 +63,7 @@ properties:
> - snps,dwmac-3.710
> - snps,dwmac-4.00
> - snps,dwmac-4.10a
> + - snps,dwmac-4.20a
> - snps,dwxgmac
> - snps,dwxgmac-2.10
>
> @@ -87,7 +89,8 @@ properties:
>
> clocks:
> minItems: 1
> - maxItems: 3
> + maxItems: 5
> + additionalItems: true

Those additional clocks should be documented

Maxime


Attachments:
(No filename) (1.28 kB)
signature.asc (235.00 B)
Download all attachments

2019-11-08 13:06:38

by Christophe Roullier

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: net: dwmac: increase 'maxItems' for 'clocks', 'clock-names' properties

On 11/8/19 11:42 AM, Maxime Ripard wrote:
> Hi,
>
> On Fri, Nov 08, 2019 at 11:35:25AM +0100, Christophe Roullier wrote:
>> This change is needed for some soc based on snps,dwmac, which have
>> more than 3 clocks.
>>
>> Signed-off-by: Christophe Roullier <[email protected]>
>> ---
>> Documentation/devicetree/bindings/net/snps,dwmac.yaml | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>> index 4845e29411e4..376a531062c2 100644
>> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>> @@ -27,6 +27,7 @@ select:
>> - snps,dwmac-3.710
>> - snps,dwmac-4.00
>> - snps,dwmac-4.10a
>> + - snps,dwmac-4.20a
>> - snps,dwxgmac
>> - snps,dwxgmac-2.10
>>
>> @@ -62,6 +63,7 @@ properties:
>> - snps,dwmac-3.710
>> - snps,dwmac-4.00
>> - snps,dwmac-4.10a
>> + - snps,dwmac-4.20a
>> - snps,dwxgmac
>> - snps,dwxgmac-2.10
>>
>> @@ -87,7 +89,8 @@ properties:
>>
>> clocks:
>> minItems: 1
>> - maxItems: 3
>> + maxItems: 5
>> + additionalItems: true
> Those additional clocks should be documented
>
> Maxime

Hi Maxime,

The problem it is specific to our soc, so is it possible to

propose "optional clock" for 2 extras clocks in snps,dwmac.yaml

and "official" description in soc yaml file (stm32-dwmac.yaml) ?

? clocks:
??? minItems: 1
??? maxItems: 5
??? additionalItems: true
??? items:
????? - description: GMAC main clock
????? - description: Peripheral registers interface clock
????? - description:
????????? PTP reference clock. This clock is used for programming the
????????? Timestamp Addend Register. If not passed then the system
????????? clock will be used and this is fine on some platforms.

+????? - description: optional clock

+????? - description: optional clock

Thanks

Christophe

2019-11-15 07:51:59

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: net: dwmac: increase 'maxItems' for 'clocks', 'clock-names' properties

On Fri, Nov 08, 2019 at 01:02:14PM +0000, Christophe ROULLIER wrote:
> On 11/8/19 11:42 AM, Maxime Ripard wrote:
> > Hi,
> >
> > On Fri, Nov 08, 2019 at 11:35:25AM +0100, Christophe Roullier wrote:
> >> This change is needed for some soc based on snps,dwmac, which have
> >> more than 3 clocks.
> >>
> >> Signed-off-by: Christophe Roullier <[email protected]>
> >> ---
> >> Documentation/devicetree/bindings/net/snps,dwmac.yaml | 8 +++++++-
> >> 1 file changed, 7 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> >> index 4845e29411e4..376a531062c2 100644
> >> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> >> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> >> @@ -27,6 +27,7 @@ select:
> >> - snps,dwmac-3.710
> >> - snps,dwmac-4.00
> >> - snps,dwmac-4.10a
> >> + - snps,dwmac-4.20a
> >> - snps,dwxgmac
> >> - snps,dwxgmac-2.10
> >>
> >> @@ -62,6 +63,7 @@ properties:
> >> - snps,dwmac-3.710
> >> - snps,dwmac-4.00
> >> - snps,dwmac-4.10a
> >> + - snps,dwmac-4.20a
> >> - snps,dwxgmac
> >> - snps,dwxgmac-2.10
> >>
> >> @@ -87,7 +89,8 @@ properties:
> >>
> >> clocks:
> >> minItems: 1
> >> - maxItems: 3
> >> + maxItems: 5
> >> + additionalItems: true
> > Those additional clocks should be documented
> >
> > Maxime
>
> Hi Maxime,
>
> The problem it is specific to our soc, so is it possible to
>
> propose "optional clock" for 2 extras clocks in snps,dwmac.yaml
>
> and "official" description in soc yaml file (stm32-dwmac.yaml) ?
>
> ? clocks:
> ??? minItems: 1
> ??? maxItems: 5
> ??? additionalItems: true
> ??? items:
> ????? - description: GMAC main clock
> ????? - description: Peripheral registers interface clock
> ????? - description:
> ????????? PTP reference clock. This clock is used for programming the
> ????????? Timestamp Addend Register. If not passed then the system
> ????????? clock will be used and this is fine on some platforms.
>
> +????? - description: optional clock
>
> +????? - description: optional clock

I guess we'd really need to figure out what those clocks are doing,
they are probably helpful (and used, under a different name) by
others.

Hopefully the questions Rob asked will clear that out

Maxime


Attachments:
(No filename) (2.47 kB)
signature.asc (235.00 B)
Download all attachments

2020-01-09 09:11:34

by Christophe Roullier

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: net: dwmac: increase 'maxItems' for 'clocks', 'clock-names' properties

On 15/11/2019 08:50, Maxime Ripard wrote:
> On Fri, Nov 08, 2019 at 01:02:14PM +0000, Christophe ROULLIER wrote:
>> On 11/8/19 11:42 AM, Maxime Ripard wrote:
>>> Hi,
>>>
>>> On Fri, Nov 08, 2019 at 11:35:25AM +0100, Christophe Roullier wrote:
>>>> This change is needed for some soc based on snps,dwmac, which have
>>>> more than 3 clocks.
>>>>
>>>> Signed-off-by: Christophe Roullier <[email protected]>
>>>> ---
>>>> Documentation/devicetree/bindings/net/snps,dwmac.yaml | 8 +++++++-
>>>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>>>> index 4845e29411e4..376a531062c2 100644
>>>> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>>>> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>>>> @@ -27,6 +27,7 @@ select:
>>>> - snps,dwmac-3.710
>>>> - snps,dwmac-4.00
>>>> - snps,dwmac-4.10a
>>>> + - snps,dwmac-4.20a
>>>> - snps,dwxgmac
>>>> - snps,dwxgmac-2.10
>>>>
>>>> @@ -62,6 +63,7 @@ properties:
>>>> - snps,dwmac-3.710
>>>> - snps,dwmac-4.00
>>>> - snps,dwmac-4.10a
>>>> + - snps,dwmac-4.20a
>>>> - snps,dwxgmac
>>>> - snps,dwxgmac-2.10
>>>>
>>>> @@ -87,7 +89,8 @@ properties:
>>>>
>>>> clocks:
>>>> minItems: 1
>>>> - maxItems: 3
>>>> + maxItems: 5
>>>> + additionalItems: true
>>> Those additional clocks should be documented
>>>
>>> Maxime
>> Hi Maxime,
>>
>> The problem it is specific to our soc, so is it possible to
>>
>> propose "optional clock" for 2 extras clocks in snps,dwmac.yaml
>>
>> and "official" description in soc yaml file (stm32-dwmac.yaml) ?
>>
>> ? clocks:
>> ??? minItems: 1
>> ??? maxItems: 5
>> ??? additionalItems: true
>> ??? items:
>> ????? - description: GMAC main clock
>> ????? - description: Peripheral registers interface clock
>> ????? - description:
>> ????????? PTP reference clock. This clock is used for programming the
>> ????????? Timestamp Addend Register. If not passed then the system
>> ????????? clock will be used and this is fine on some platforms.
>>
>> +????? - description: optional clock
>>
>> +????? - description: optional clock
> I guess we'd really need to figure out what those clocks are doing,
> they are probably helpful (and used, under a different name) by
> others.
>
> Hopefully the questions Rob asked will clear that out

Rob, do you have any ideas, suggestions ?

Thanks

> Maxime

2020-01-09 21:37:11

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: net: dwmac: increase 'maxItems' for 'clocks', 'clock-names' properties

On Thu, Jan 9, 2020 at 3:07 AM Christophe ROULLIER
<[email protected]> wrote:
>
> On 15/11/2019 08:50, Maxime Ripard wrote:
> > On Fri, Nov 08, 2019 at 01:02:14PM +0000, Christophe ROULLIER wrote:
> >> On 11/8/19 11:42 AM, Maxime Ripard wrote:
> >>> Hi,
> >>>
> >>> On Fri, Nov 08, 2019 at 11:35:25AM +0100, Christophe Roullier wrote:
> >>>> This change is needed for some soc based on snps,dwmac, which have
> >>>> more than 3 clocks.
> >>>>
> >>>> Signed-off-by: Christophe Roullier <[email protected]>
> >>>> ---
> >>>> Documentation/devicetree/bindings/net/snps,dwmac.yaml | 8 +++++++-
> >>>> 1 file changed, 7 insertions(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> >>>> index 4845e29411e4..376a531062c2 100644
> >>>> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> >>>> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> >>>> @@ -27,6 +27,7 @@ select:
> >>>> - snps,dwmac-3.710
> >>>> - snps,dwmac-4.00
> >>>> - snps,dwmac-4.10a
> >>>> + - snps,dwmac-4.20a
> >>>> - snps,dwxgmac
> >>>> - snps,dwxgmac-2.10
> >>>>
> >>>> @@ -62,6 +63,7 @@ properties:
> >>>> - snps,dwmac-3.710
> >>>> - snps,dwmac-4.00
> >>>> - snps,dwmac-4.10a
> >>>> + - snps,dwmac-4.20a
> >>>> - snps,dwxgmac
> >>>> - snps,dwxgmac-2.10
> >>>>
> >>>> @@ -87,7 +89,8 @@ properties:
> >>>>
> >>>> clocks:
> >>>> minItems: 1
> >>>> - maxItems: 3
> >>>> + maxItems: 5
> >>>> + additionalItems: true
> >>> Those additional clocks should be documented
> >>>
> >>> Maxime
> >> Hi Maxime,
> >>
> >> The problem it is specific to our soc, so is it possible to
> >>
> >> propose "optional clock" for 2 extras clocks in snps,dwmac.yaml
> >>
> >> and "official" description in soc yaml file (stm32-dwmac.yaml) ?
> >>
> >> clocks:
> >> minItems: 1
> >> maxItems: 5
> >> additionalItems: true
> >> items:
> >> - description: GMAC main clock
> >> - description: Peripheral registers interface clock
> >> - description:
> >> PTP reference clock. This clock is used for programming the
> >> Timestamp Addend Register. If not passed then the system
> >> clock will be used and this is fine on some platforms.
> >>
> >> + - description: optional clock
> >>
> >> + - description: optional clock
> > I guess we'd really need to figure out what those clocks are doing,
> > they are probably helpful (and used, under a different name) by
> > others.
> >
> > Hopefully the questions Rob asked will clear that out
>
> Rob, do you have any ideas, suggestions ?

Answer my questions from patch 2:

> What does 'power mode' mean? IIRC, some DW MACs have a clock for WoL
> called LPI or something. Are you sure this is ST specific and not DW
> config or version specific?