dt-bindings: clocks: imx8mp: Add ID for usb suspend clock
PATCH RESEND v3 1/3 dt-bindings: clocks: imx8mp: Add ID for usb suspend clock
usb suspend clock has a gate shared with usb_root_clk.
--- include/dt-bindings/clock/imx8mp-clock.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/dt-bindings/clock/imx8mp-clock.h +2 -1
@@ -324,8 +324,9 @@#define IMX8MP_CLK_CLKOUT2_SEL 317#define IMX8MP_CLK_CLKOUT2_DIV 318#define IMX8MP_CLK_CLKOUT2 319 +#define IMX8MP_CLK_USB_SUSP 320 -#define IMX8MP_CLK_END 320 +#define IMX8MP_CLK_END 321#define IMX8MP_CLK_AUDIOMIX_SAI1_IPG 0#define IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1 1
Signature · 1 line
2.34.1
PATCH RESEND v3 2/3 clk: imx: imx8mp: add shared clk gate for usb suspend clk
32K usb suspend clock gate is shared with usb_root_clk.
--- drivers/clk/imx/clk-imx8mp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/imx/clk-imx8mp.c +3 -1
@@ -17,6 +17,7 @@static u32 share_count_nand;static u32 share_count_media; +static u32 share_count_usb;static const char *const pll_ref_sels[] = {"osc_24m" ,"dummy" ,"dummy" ,"dummy" , };static const char *const audio_pll1_bypass_sels[] = {"audio_pll1" ,"audio_pll1_ref_sel" , };
@@ -673,7 +674,8 @@ static int imx8mp_clocks_probe(struct platform_device *pdev) hws[IMX8MP_CLK_UART2_ROOT ] =imx_clk_hw_gate4 ("uart2_root_clk" ,"uart2" , ccm_base +0x44a0 ,0 ); hws[IMX8MP_CLK_UART3_ROOT ] =imx_clk_hw_gate4 ("uart3_root_clk" ,"uart3" , ccm_base +0x44b0 ,0 ); hws[IMX8MP_CLK_UART4_ROOT ] =imx_clk_hw_gate4 ("uart4_root_clk" ,"uart4" , ccm_base +0x44c0 ,0 ); - hws[IMX8MP_CLK_USB_ROOT ] =imx_clk_hw_gate4 ("usb_root_clk" ,"hsio_axi" , ccm_base +0x44d0 ,0 ); + hws[IMX8MP_CLK_USB_ROOT ] =imx_clk_hw_gate2_shared2 ("usb_root_clk" ,"hsio_axi" , ccm_base +0x44d0 ,0 , &share_count_usb); + hws[IMX8MP_CLK_USB_SUSP ] =imx_clk_hw_gate2_shared2 ("usb_suspend_clk" ,"osc_32k" , ccm_base +0x44d0 ,0 , &share_count_usb); hws[IMX8MP_CLK_USB_PHY_ROOT ] =imx_clk_hw_gate4 ("usb_phy_root_clk" ,"usb_phy_ref" , ccm_base +0x44f0 ,0 ); hws[IMX8MP_CLK_USDHC1_ROOT ] =imx_clk_hw_gate4 ("usdhc1_root_clk" ,"usdhc1" , ccm_base +0x4510 ,0 ); hws[IMX8MP_CLK_USDHC2_ROOT ] =imx_clk_hw_gate4 ("usdhc2_root_clk" ,"usdhc2" , ccm_base +0x4520 ,0 );
Signature · 1 line
2.34.1
Stephen Boyd
maintainerRe: [PATCH RESEND v3 2/3] clk: imx: imx8mp: add shared clk gate for usb suspend clk
Quoting Li Jun (2022-09-23 03:45:04)
Quoted 4 lines
32K usb suspend clock gate is shared with
usb_root_clk.Fixes 9c140d9926761 ("clk: imx: Add support for i.MX8MP clock driver")Cc [email protected] # v5.19+
Why is stable Cced? The commit text doesn't tell me what sort of regression is being fixed. Please help!
RE: [PATCH RESEND v3 2/3] clk: imx: imx8mp: add shared clk gate for usb suspend clk
Hi Stephen,
Quoted 15 lines
-----Original Message-----
From: Stephen Boyd <[email protected]>
Sent: Friday, September 30, 2022 8:54 AM
To: Jun Li <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <[email protected]>; [email protected]; [email protected]; Peng Fan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH RESEND v3 2/3] clk: imx: imx8mp: add shared clk gate for usb suspend clkQuoting Li Jun (2022-09-23 03:45:04)
Quoted 8 lines
Quoted 5 lines
32K usb suspend clock gate is shared with
usb_root_clk.Fixes 9c140d9926761 ("clk: imx: Add support for i.MX8MP clockdriver")
Cc: [email protected] # v5.19+Why is stable Cced? The commit text doesn't tell me what sort of regression is being fixed. Please help!
Sorry, I missed this again, Rob commented on this. I will resend with commit text improved to explain this.
Thanks
Li Jun
PATCH RESEND v3 3/3 arm64: dts: imx8mp: correct usb clocks
In reply to Li JunAfter commit cf7f3f4fa9e5 ("clk: imx8mp: fix usb_root_clk parent"), usb_root_clk is no longer for suspend clock so update dts accordingly to use right bus clock and suspend clock.
--- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +6 -6
@@ -1169,7 +1169,7 @@ usb3_0: usb@32f10100 { reg = <0x32f10100 0x8>, <0x381f0000 0x20>; clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, - <&clk IMX8MP_CLK_USB_ROOT>; + <&clk IMX8MP_CLK_USB_SUSP>; clock-names = "hsio", "suspend"; interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>; power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
@@ -1182,9 +1182,9 @@ usb3_0: usb@32f10100 { usb_dwc3_0: usb@38100000 { compatible = "snps,dwc3"; reg = <0x38100000 0x10000>; - clocks = <&clk IMX8MP_CLK_HSIO_AXI>, + clocks = <&clk IMX8MP_CLK_USB_ROOT>, <&clk IMX8MP_CLK_USB_CORE_REF>, - <&clk IMX8MP_CLK_USB_ROOT>; + <&clk IMX8MP_CLK_USB_SUSP>; clock-names = "bus_early", "ref", "suspend"; interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; phys = <&usb3_phy0>, <&usb3_phy0>;
@@ -1211,7 +1211,7 @@ usb3_1: usb@32f10108 { reg = <0x32f10108 0x8>, <0x382f0000 0x20>; clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, - <&clk IMX8MP_CLK_USB_ROOT>; + <&clk IMX8MP_CLK_USB_SUSP>; clock-names = "hsio", "suspend"; interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>; power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
@@ -1224,9 +1224,9 @@ usb3_1: usb@32f10108 { usb_dwc3_1: usb@38200000 { compatible = "snps,dwc3"; reg = <0x38200000 0x10000>; - clocks = <&clk IMX8MP_CLK_HSIO_AXI>, + clocks = <&clk IMX8MP_CLK_USB_ROOT>, <&clk IMX8MP_CLK_USB_CORE_REF>, - <&clk IMX8MP_CLK_USB_ROOT>; + <&clk IMX8MP_CLK_USB_SUSP>; clock-names = "bus_early", "ref", "suspend"; interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; phys = <&usb3_phy1>, <&usb3_phy1>;
Signature · 1 line
2.34.1