2020-12-29 01:35:11

by Adam Ford

[permalink] [raw]
Subject: [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks

The AVB driver assumes there is an external clock, but it could
be driven by an external clock. In order to enable a programmable
clock, it needs to be added to the clocks list and enabled in the
driver. Since there currently only one clock, there is no
clock-names list either.

Update bindings to add the additional optional clock, and explicitly
name both of them.

Signed-off-by: Adam Ford <[email protected]>
---
.../devicetree/bindings/net/renesas,etheravb.yaml | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
index 244befb6402a..c1a06510f056 100644
--- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
+++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
@@ -49,7 +49,16 @@ properties:
interrupt-names: true

clocks:
- maxItems: 1
+ minItems: 1
+ maxItems: 2
+ items:
+ - description: AVB functional clock
+ - description: Optional TXC reference clock
+
+ clock-names:
+ items:
+ - const: fck
+ - const: txc_refclk

iommus:
maxItems: 1
--
2.25.1


2020-12-29 08:20:22

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks

Hello!

On 29.12.2020 0:31, Adam Ford wrote:

> The AVB driver assumes there is an external clock, but it could
> be driven by an external clock.

Driver can be driven by external clock? :-)

> In order to enable a programmable
> clock, it needs to be added to the clocks list and enabled in the
> driver. Since there currently only one clock, there is no
^ is
> clock-names list either.
>
> Update bindings to add the additional optional clock, and explicitly
> name both of them.
>
> Signed-off-by: Adam Ford <[email protected]>
[...]

MBR, Sergei

2021-01-08 14:17:00

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks

On Mon, Dec 28, 2020 at 10:32 PM Adam Ford <[email protected]> wrote:
> The AVB driver assumes there is an external clock, but it could
> be driven by an external clock. In order to enable a programmable
> clock, it needs to be added to the clocks list and enabled in the
> driver. Since there currently only one clock, there is no
> clock-names list either.
>
> Update bindings to add the additional optional clock, and explicitly
> name both of them.
>
> Signed-off-by: Adam Ford <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2021-01-08 14:26:31

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks

Hi Adam,

On Fri, Jan 8, 2021 at 3:11 PM Geert Uytterhoeven <[email protected]> wrote:
> On Mon, Dec 28, 2020 at 10:32 PM Adam Ford <[email protected]> wrote:
> > The AVB driver assumes there is an external clock, but it could
> > be driven by an external clock. In order to enable a programmable
> > clock, it needs to be added to the clocks list and enabled in the
> > driver. Since there currently only one clock, there is no
> > clock-names list either.
> >
> > Update bindings to add the additional optional clock, and explicitly
> > name both of them.
> >
> > Signed-off-by: Adam Ford <[email protected]>
>
> Reviewed-by: Geert Uytterhoeven <[email protected]>

Upon second look...

>> --- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
>> +++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
>> @@ -49,7 +49,16 @@ properties:
>> interrupt-names: true
>>
>> clocks:
>> - maxItems: 1
>> + minItems: 1
>> + maxItems: 2
>> + items:
>> + - description: AVB functional clock
>> + - description: Optional TXC reference clock
>> +
>> + clock-names:
>> + items:
>> + - const: fck
>> + - const: txc_refclk

On R-Car Gen3 and RZ/G2, RGMII is used, and this clock is called
"txcrefclk", i.e. without underscore.
On R-Car Gen2, GMII is used, and this clock is called "gtxrefclk".

Perhaps it should just be called "refclk"?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2021-01-11 20:21:41

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks

On Mon, 28 Dec 2020 15:31:17 -0600, Adam Ford wrote:
> The AVB driver assumes there is an external clock, but it could
> be driven by an external clock. In order to enable a programmable
> clock, it needs to be added to the clocks list and enabled in the
> driver. Since there currently only one clock, there is no
> clock-names list either.
>
> Update bindings to add the additional optional clock, and explicitly
> name both of them.
>
> Signed-off-by: Adam Ford <[email protected]>
> ---
> .../devicetree/bindings/net/renesas,etheravb.yaml | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>

Acked-by: Rob Herring <[email protected]>