All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: rmobile: beacon-renesom: Enable USB and ethernet ref clocks
@ 2021-08-24 16:43 Adam Ford
  2021-08-24 16:43 ` [PATCH 2/2] ARM: rmobile: beacon-renesom: Enable Ethernet Adam Ford
  2021-08-24 18:02 ` [PATCH 1/2] ARM: rmobile: beacon-renesom: Enable USB and ethernet ref clocks Marek Vasut
  0 siblings, 2 replies; 7+ messages in thread
From: Adam Ford @ 2021-08-24 16:43 UTC (permalink / raw)
  To: u-boot; +Cc: biju.das.jz, marex, Adam Ford

There are two versaclock programmable clock chips used to provide
reference clocks for both USB and Ethernet.  Enable the driver
in the configs to run these clocks.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/configs/r8a774a1_beacon_defconfig b/configs/r8a774a1_beacon_defconfig
index 7ba4ac05f5..002b91176f 100644
--- a/configs/r8a774a1_beacon_defconfig
+++ b/configs/r8a774a1_beacon_defconfig
@@ -39,7 +39,9 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_CLK=y
+CONFIG_CLK_CCF=y
 CONFIG_CLK_RENESAS=y
+CONFIG_CLK_VERSACLOCK=y
 CONFIG_RCAR_GPIO=y
 CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
diff --git a/configs/r8a774b1_beacon_defconfig b/configs/r8a774b1_beacon_defconfig
index 44528cd2e1..389e0d9ccc 100644
--- a/configs/r8a774b1_beacon_defconfig
+++ b/configs/r8a774b1_beacon_defconfig
@@ -39,7 +39,9 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_CLK=y
+CONFIG_CLK_CCF=y
 CONFIG_CLK_RENESAS=y
+CONFIG_CLK_VERSACLOCK=y
 CONFIG_RCAR_GPIO=y
 CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
diff --git a/configs/r8a774e1_beacon_defconfig b/configs/r8a774e1_beacon_defconfig
index 9cde39f467..cb9f4e2ffa 100644
--- a/configs/r8a774e1_beacon_defconfig
+++ b/configs/r8a774e1_beacon_defconfig
@@ -39,7 +39,9 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_CLK=y
+CONFIG_CLK_CCF=y
 CONFIG_CLK_RENESAS=y
+CONFIG_CLK_VERSACLOCK=y
 CONFIG_RCAR_GPIO=y
 CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] ARM: rmobile: beacon-renesom: Enable Ethernet
  2021-08-24 16:43 [PATCH 1/2] ARM: rmobile: beacon-renesom: Enable USB and ethernet ref clocks Adam Ford
@ 2021-08-24 16:43 ` Adam Ford
  2021-08-24 18:00   ` Marek Vasut
  2021-08-24 18:02 ` [PATCH 1/2] ARM: rmobile: beacon-renesom: Enable USB and ethernet ref clocks Marek Vasut
  1 sibling, 1 reply; 7+ messages in thread
From: Adam Ford @ 2021-08-24 16:43 UTC (permalink / raw)
  To: u-boot; +Cc: biju.das.jz, marex, Adam Ford

Now that the versaclock driver is available, point the ethernet
node at these clocks and configure the RGMII to enable Ethernet.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm/dts/beacon-renesom-som.dtsi b/arch/arm/dts/beacon-renesom-som.dtsi
index d30bab3c8b..9fe541b607 100644
--- a/arch/arm/dts/beacon-renesom-som.dtsi
+++ b/arch/arm/dts/beacon-renesom-som.dtsi
@@ -60,8 +60,11 @@
 	pinctrl-0 = <&avb_pins>;
 	pinctrl-names = "default";
 	phy-handle = <&phy0>;
+	phy-mode = "rgmii-txid";
 	rx-internal-delay-ps = <1800>;
 	tx-internal-delay-ps = <2000>;
+	clocks = <&cpg CPG_MOD 812>, <&versaclock5 4>;
+	clock-names = "fck", "refclk";
 	status = "okay";
 
 	phy0: ethernet-phy@0 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] ARM: rmobile: beacon-renesom: Enable Ethernet
  2021-08-24 16:43 ` [PATCH 2/2] ARM: rmobile: beacon-renesom: Enable Ethernet Adam Ford
@ 2021-08-24 18:00   ` Marek Vasut
  0 siblings, 0 replies; 7+ messages in thread
From: Marek Vasut @ 2021-08-24 18:00 UTC (permalink / raw)
  To: Adam Ford, u-boot; +Cc: biju.das.jz

On 8/24/21 6:43 PM, Adam Ford wrote:
> Now that the versaclock driver is available, point the ethernet
> node at these clocks and configure the RGMII to enable Ethernet.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/arch/arm/dts/beacon-renesom-som.dtsi b/arch/arm/dts/beacon-renesom-som.dtsi
> index d30bab3c8b..9fe541b607 100644
> --- a/arch/arm/dts/beacon-renesom-som.dtsi
> +++ b/arch/arm/dts/beacon-renesom-som.dtsi
> @@ -60,8 +60,11 @@
>   	pinctrl-0 = <&avb_pins>;
>   	pinctrl-names = "default";
>   	phy-handle = <&phy0>;
> +	phy-mode = "rgmii-txid";
>   	rx-internal-delay-ps = <1800>;
>   	tx-internal-delay-ps = <2000>;
> +	clocks = <&cpg CPG_MOD 812>, <&versaclock5 4>;
> +	clock-names = "fck", "refclk";

The subject should be ARM: dts: rmobile, I can fix that, but see 1/2 
comment in a bit.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] ARM: rmobile: beacon-renesom: Enable USB and ethernet ref clocks
  2021-08-24 16:43 [PATCH 1/2] ARM: rmobile: beacon-renesom: Enable USB and ethernet ref clocks Adam Ford
  2021-08-24 16:43 ` [PATCH 2/2] ARM: rmobile: beacon-renesom: Enable Ethernet Adam Ford
@ 2021-08-24 18:02 ` Marek Vasut
  2021-08-24 18:13   ` Adam Ford
  1 sibling, 1 reply; 7+ messages in thread
From: Marek Vasut @ 2021-08-24 18:02 UTC (permalink / raw)
  To: Adam Ford, u-boot; +Cc: biju.das.jz

On 8/24/21 6:43 PM, Adam Ford wrote:
> There are two versaclock programmable clock chips used to provide
> reference clocks for both USB and Ethernet.  Enable the driver
> in the configs to run these clocks.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/configs/r8a774a1_beacon_defconfig b/configs/r8a774a1_beacon_defconfig
> index 7ba4ac05f5..002b91176f 100644
> --- a/configs/r8a774a1_beacon_defconfig
> +++ b/configs/r8a774a1_beacon_defconfig
> @@ -39,7 +39,9 @@ CONFIG_VERSION_VARIABLE=y
>   CONFIG_REGMAP=y
>   CONFIG_SYSCON=y
>   CONFIG_CLK=y
> +CONFIG_CLK_CCF=y
>   CONFIG_CLK_RENESAS=y
> +CONFIG_CLK_VERSACLOCK=y

There is a lot of duplication here, look into 
arch/arm/mach-rmobile/Kconfig.64 and for TARGET_BEACON_RZG2M (where are 
the others?) add "select CLK_VERSACLOCK" . You can also fix it up and 
add whatever other mandatory config options should be enabled for that 
platform. And then you reduce the defconfig too.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] ARM: rmobile: beacon-renesom: Enable USB and ethernet ref clocks
  2021-08-24 18:02 ` [PATCH 1/2] ARM: rmobile: beacon-renesom: Enable USB and ethernet ref clocks Marek Vasut
@ 2021-08-24 18:13   ` Adam Ford
  2021-08-24 18:30     ` Adam Ford
  2021-08-24 19:38     ` Marek Vasut
  0 siblings, 2 replies; 7+ messages in thread
From: Adam Ford @ 2021-08-24 18:13 UTC (permalink / raw)
  To: Marek Vasut; +Cc: U-Boot Mailing List, Biju Das

On Tue, Aug 24, 2021 at 1:02 PM Marek Vasut <marex@denx.de> wrote:
>
> On 8/24/21 6:43 PM, Adam Ford wrote:
> > There are two versaclock programmable clock chips used to provide
> > reference clocks for both USB and Ethernet.  Enable the driver
> > in the configs to run these clocks.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > diff --git a/configs/r8a774a1_beacon_defconfig b/configs/r8a774a1_beacon_defconfig
> > index 7ba4ac05f5..002b91176f 100644
> > --- a/configs/r8a774a1_beacon_defconfig
> > +++ b/configs/r8a774a1_beacon_defconfig
> > @@ -39,7 +39,9 @@ CONFIG_VERSION_VARIABLE=y
> >   CONFIG_REGMAP=y
> >   CONFIG_SYSCON=y
> >   CONFIG_CLK=y
> > +CONFIG_CLK_CCF=y
> >   CONFIG_CLK_RENESAS=y
> > +CONFIG_CLK_VERSACLOCK=y
>
> There is a lot of duplication here, look into
> arch/arm/mach-rmobile/Kconfig.64 and for TARGET_BEACON_RZG2M (where are
> the others?) add "select CLK_VERSACLOCK" . You can also fix it up and
> add whatever other mandatory config options should be enabled for that
> platform. And then you reduce the defconfig too.

Are you OK if i put that into board/beacon/beacon-rzg2m/Kconfig?
there is a check to see if TARGET_BEACON_RZG2H || TARGET_BEACON_RZG2M
|| TARGET_BEACON_RZG2N is set.  From there, i should be able to select
the common options that are required and it won't have to be
duplicated in either the defconfigs or the
arch/arm/mach-rmobile/Kconfig.64

adam

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] ARM: rmobile: beacon-renesom: Enable USB and ethernet ref clocks
  2021-08-24 18:13   ` Adam Ford
@ 2021-08-24 18:30     ` Adam Ford
  2021-08-24 19:38     ` Marek Vasut
  1 sibling, 0 replies; 7+ messages in thread
From: Adam Ford @ 2021-08-24 18:30 UTC (permalink / raw)
  To: Marek Vasut; +Cc: U-Boot Mailing List, Biju Das

On Tue, Aug 24, 2021 at 1:13 PM Adam Ford <aford173@gmail.com> wrote:
>
> On Tue, Aug 24, 2021 at 1:02 PM Marek Vasut <marex@denx.de> wrote:
> >
> > On 8/24/21 6:43 PM, Adam Ford wrote:
> > > There are two versaclock programmable clock chips used to provide
> > > reference clocks for both USB and Ethernet.  Enable the driver
> > > in the configs to run these clocks.
> > >
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > >
> > > diff --git a/configs/r8a774a1_beacon_defconfig b/configs/r8a774a1_beacon_defconfig
> > > index 7ba4ac05f5..002b91176f 100644
> > > --- a/configs/r8a774a1_beacon_defconfig
> > > +++ b/configs/r8a774a1_beacon_defconfig
> > > @@ -39,7 +39,9 @@ CONFIG_VERSION_VARIABLE=y
> > >   CONFIG_REGMAP=y
> > >   CONFIG_SYSCON=y
> > >   CONFIG_CLK=y
> > > +CONFIG_CLK_CCF=y
> > >   CONFIG_CLK_RENESAS=y
> > > +CONFIG_CLK_VERSACLOCK=y
> >
> > There is a lot of duplication here, look into
> > arch/arm/mach-rmobile/Kconfig.64 and for TARGET_BEACON_RZG2M (where are
> > the others?) add "select CLK_VERSACLOCK" . You can also fix it up and
> > add whatever other mandatory config options should be enabled for that
> > platform. And then you reduce the defconfig too.
>
> Are you OK if i put that into board/beacon/beacon-rzg2m/Kconfig?
> there is a check to see if TARGET_BEACON_RZG2H || TARGET_BEACON_RZG2M
> || TARGET_BEACON_RZG2N is set.  From there, i should be able to select
> the common options that are required and it won't have to be
> duplicated in either the defconfigs or the
> arch/arm/mach-rmobile/Kconfig.64

My idea won't work.  sorry for the noise.  I'll re-do it as you requested.

>
> adam

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] ARM: rmobile: beacon-renesom: Enable USB and ethernet ref clocks
  2021-08-24 18:13   ` Adam Ford
  2021-08-24 18:30     ` Adam Ford
@ 2021-08-24 19:38     ` Marek Vasut
  1 sibling, 0 replies; 7+ messages in thread
From: Marek Vasut @ 2021-08-24 19:38 UTC (permalink / raw)
  To: Adam Ford; +Cc: U-Boot Mailing List, Biju Das

On 8/24/21 8:13 PM, Adam Ford wrote:
> On Tue, Aug 24, 2021 at 1:02 PM Marek Vasut <marex@denx.de> wrote:
>>
>> On 8/24/21 6:43 PM, Adam Ford wrote:
>>> There are two versaclock programmable clock chips used to provide
>>> reference clocks for both USB and Ethernet.  Enable the driver
>>> in the configs to run these clocks.
>>>
>>> Signed-off-by: Adam Ford <aford173@gmail.com>
>>>
>>> diff --git a/configs/r8a774a1_beacon_defconfig b/configs/r8a774a1_beacon_defconfig
>>> index 7ba4ac05f5..002b91176f 100644
>>> --- a/configs/r8a774a1_beacon_defconfig
>>> +++ b/configs/r8a774a1_beacon_defconfig
>>> @@ -39,7 +39,9 @@ CONFIG_VERSION_VARIABLE=y
>>>    CONFIG_REGMAP=y
>>>    CONFIG_SYSCON=y
>>>    CONFIG_CLK=y
>>> +CONFIG_CLK_CCF=y
>>>    CONFIG_CLK_RENESAS=y
>>> +CONFIG_CLK_VERSACLOCK=y
>>
>> There is a lot of duplication here, look into
>> arch/arm/mach-rmobile/Kconfig.64 and for TARGET_BEACON_RZG2M (where are
>> the others?) add "select CLK_VERSACLOCK" . You can also fix it up and
>> add whatever other mandatory config options should be enabled for that
>> platform. And then you reduce the defconfig too.
> 
> Are you OK if i put that into board/beacon/beacon-rzg2m/Kconfig?
> there is a check to see if TARGET_BEACON_RZG2H || TARGET_BEACON_RZG2M
> || TARGET_BEACON_RZG2N is set.  From there, i should be able to select
> the common options that are required and it won't have to be
> duplicated in either the defconfigs or the
> arch/arm/mach-rmobile/Kconfig.64

Yeah, the less duplication the better.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-24 19:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 16:43 [PATCH 1/2] ARM: rmobile: beacon-renesom: Enable USB and ethernet ref clocks Adam Ford
2021-08-24 16:43 ` [PATCH 2/2] ARM: rmobile: beacon-renesom: Enable Ethernet Adam Ford
2021-08-24 18:00   ` Marek Vasut
2021-08-24 18:02 ` [PATCH 1/2] ARM: rmobile: beacon-renesom: Enable USB and ethernet ref clocks Marek Vasut
2021-08-24 18:13   ` Adam Ford
2021-08-24 18:30     ` Adam Ford
2021-08-24 19:38     ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.