diff mbox series

[1/3] arm64: dts: renesas: beacon: Fix USB extal reference

Message ID 20210513114617.30191-1-aford173@gmail.com
State Accepted
Commit 56bc54496f5d6bc638127bfc9df3742cbf0039e7
Headers show
Series [1/3] arm64: dts: renesas: beacon: Fix USB extal reference | expand

Commit Message

Adam Ford May 13, 2021, 11:46 a.m. UTC
The USB extal clock reference isn't associated to a crystal, it's
assoicated to a programmable clock, so remove the extal reference,
add the usb2_clksel.  Since usb_extal is referenced by the versaclock,
reference it here so the usb2_clksel can get the proper clock speed
of 50MHz.

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

Comments

Geert Uytterhoeven May 17, 2021, 10:06 a.m. UTC | #1
Hi Adam,

Thanks for your patch!

On Thu, May 13, 2021 at 1:46 PM Adam Ford <aford173@gmail.com> wrote:
> The USB extal clock reference isn't associated to a crystal, it's

> assoicated to a programmable clock, so remove the extal reference,


associated

> add the usb2_clksel.  Since usb_extal is referenced by the versaclock,

> reference it here so the usb2_clksel can get the proper clock speed

> of 50MHz.

>

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


Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

i.e. will queue in renesas-devel for v5.14, with the above fixed.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
Geert Uytterhoeven May 17, 2021, 10:07 a.m. UTC | #2
Hi Adam,

Thanks for your patch!

On Thu, May 13, 2021 at 1:46 PM Adam Ford <aford173@gmail.com> wrote:
> The RZ/G2 boards expect there to be a external clock reference for


an

> USB2 EHCI controllers.  For the Beacon boards, this reference clock

> is controlled by a programmable verasaclock.  Because the RZ/G2


versaclock

> family have a special clock driver when using an external clock,


has

> the third clock reference in the EHCI node needs to point to this

> special clock, called usb2_clksel.

>

> Since the usb2_clksel does not keep the usb_extal clock enabled,

> the 4th clock entry for the EHCI nodes needs to reference it to

> keep the clock running and make USB functional.

>

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


Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

i.e. will queue in renesas-devel for v5.14, with the above fixed.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
Geert Uytterhoeven May 17, 2021, 10:09 a.m. UTC | #3
On Thu, May 13, 2021 at 1:46 PM Adam Ford <aford173@gmail.com> wrote:
> There is a clock driver that's needed when using an external

> USB reference clock called usb2_clksel.

> Enable it in the defconfig.

>

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


Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

i.e. will queue in renesas-devel for v5.14.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi b/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi
index 8d3a4d6ee885..bd3d26b2a2bb 100644
--- a/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi
+++ b/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi
@@ -319,8 +319,10 @@ 
 	status = "okay";
 };
 
-&usb_extal_clk {
-	clock-frequency = <50000000>;
+&usb2_clksel {
+	clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
+		  <&versaclock5 3>, <&usb3s0_clk>;
+	status = "okay";
 };
 
 &usb3s0_clk {