i.MX8 Change USB OTG Clock

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8 Change USB OTG Clock

2,274 Views
cdgarren
Contributor I

I'm trying to change the USB OTG peripheral clock to AUDIO_PLL2 in order to have the same clock source for USB OTG and some SAI peripherals. I tried to make this change in my device tree:

 &usbotg1 {
        dr_mode = "peripheral";
        picophy,pre-emp-curr-control = <3>;
        picophy,dc-vol-level-adjust = <7>;
+       assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL2_OUT>;
        status = "okay";
 };

 

But my kernel no longer finishes booting. How can I accomplish this?

Labels (2)
0 Kudos
Reply
3 Replies

2,259 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

May I ask which kernel version are you planning to use?
Also, could you tell me the device you're using for your test?

Thank you,
Best regards,
Aldo.

0 Kudos
Reply

2,250 Views
cdgarren
Contributor I

This is with kernel version 5.4.47 and is running on an i.MX8MM

0 Kudos
Reply

2,235 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Got it, you'll need to change the parent clock not in the USB node but in the USB phy.

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm.dtsi?...

Please try the following:

usbphynop1: usbphynop1 {
                compatible = "usb-nop-xceiv";
                clocks = <&clk IMX8MM_CLK_USB_PHY_REF>;
                assigned-clocks = <&clk IMX8MM_CLK_USB_PHY_REF>;
-               assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_100M>;
+              assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL2_OUT>;
                clock-names = "main_clk";
        };

Best regards,
Aldo.