diff mbox series

arm64: dts: renesas: beacon: Fix usb2_clksel

Message ID 20210826142451.495578-1-aford173@gmail.com (mailing list archive)
State Under Review
Delegated to: Geert Uytterhoeven
Headers show
Series arm64: dts: renesas: beacon: Fix usb2_clksel | expand

Commit Message

Adam Ford Aug. 26, 2021, 2:24 p.m. UTC
The clock driver only sets the bit when extal is available and
xtal is not.  Remove the xtal references to properly set the
clock selection bit.

Fixes: 56bc54496f5d ("arm64: dts: renesas: beacon: Fix USB extal reference")
Signed-off-by: Adam Ford <aford173@gmail.com>

Comments

Geert Uytterhoeven Sept. 21, 2021, 3:33 p.m. UTC | #1
Hi Adam,

On Thu, Aug 26, 2021 at 4:25 PM Adam Ford <aford173@gmail.com> wrote:
> The clock driver only sets the bit when extal is available and
> xtal is not.  Remove the xtal references to properly set the
> clock selection bit.
>
> Fixes: 56bc54496f5d ("arm64: dts: renesas: beacon: Fix USB extal reference")
> Signed-off-by: Adam Ford <aford173@gmail.com>

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi
> +++ b/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi
> @@ -323,7 +323,9 @@ &sdhi3 {
>
>  &usb2_clksel {
>         clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
> -                 <&versaclock5 3>, <&usb3s0_clk>;
> +                 <&versaclock5 3>;
> +       clock-names = "ehci_ohci", "hs-usb-if",
> +                     "usb_extal";

According to the bindings, there must be 4 clocks/clock-names.

>         status = "okay";
>  };

Looking at the driver implementation, it determines the presence
of the usb_extal and usb_xtal clocks by checking the clock rates.
According to the schematics, USB_XTAL is left unconnected.
Hence shouldn't you just remove the usb3s0_clk clock-frequency override
from arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi instead?

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 090dc9c4f57b..9908ad90d398 100644
--- a/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi
+++ b/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi
@@ -323,7 +323,9 @@  &sdhi3 {
 
 &usb2_clksel {
 	clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
-		  <&versaclock5 3>, <&usb3s0_clk>;
+		  <&versaclock5 3>;
+	clock-names = "ehci_ohci", "hs-usb-if",
+		      "usb_extal";
 	status = "okay";
 };