diff options
author | Frank Li <Frank.Li@nxp.com> | 2020-02-12 15:55:45 -0600 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2020-04-26 23:36:42 -0700 |
commit | 571b6b01a96fe9ecabbf8674e122185537617f7e (patch) | |
tree | 6219736e835a698732a09bcc2d7dbf2bc424a988 | |
parent | 3b203a29a9c96e47a91fb3beaf2bd24f1b0844cb (diff) |
MLK-23311-2: 8DXL enable second usb controller
USB OH clock is default enabled by SCFW because it shared
between two USB controller.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit 7a8ec829d4410c51550ad7a589645595042ba541)
-rw-r--r-- | arch/arm/dts/fsl-imx8dxl.dtsi | 6 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-imx8/imx-regs.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/imx8/clock.c | 2 | ||||
-rw-r--r-- | drivers/clk/imx/clk-imx8qxp.c | 6 | ||||
-rw-r--r-- | include/dt-bindings/clock/imx8qxp-clock.h | 3 |
5 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/dts/fsl-imx8dxl.dtsi b/arch/arm/dts/fsl-imx8dxl.dtsi index e11f632efd5..8d78773c825 100644 --- a/arch/arm/dts/fsl-imx8dxl.dtsi +++ b/arch/arm/dts/fsl-imx8dxl.dtsi @@ -1107,7 +1107,7 @@ usbphy2: usbphy@0x5b110000 { compatible = "fsl,imx8qm-usbphy", "fsl,imx7ulp-usbphy", "fsl,imx6ul-usbphy", "fsl,imx23-usbphy"; reg = <0x0 0x5b110000 0x0 0x1000>; - clocks = <&clk IMX8QXP_USB2_PHY_IPG_CLK>; + clocks = <&clk IMX8DXL_USB2_PHY2_IPG_CLK>; power-domains = <&pd_conn_usbotg1_phy>; }; @@ -1117,7 +1117,7 @@ interrupt-parent = <&wu>; interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>; fsl,usbphy = <&usbphy1>; - clocks = <&clk IMX8QXP_USB2_OH_AHB_CLK>; + clocks = <&clk IMX8QXP_CLK_DUMMY>; ahb-burst-config = <0x0>; tx-burst-size-dword = <0x10>; rx-burst-size-dword = <0x10>; @@ -1132,7 +1132,7 @@ interrupt-parent = <&wu>; interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>; fsl,usbphy = <&usbphy2>; - clocks = <&clk IMX8QXP_USB2_OH_AHB_CLK>; + clocks = <&clk IMX8QXP_CLK_DUMMY>; ahb-burst-config = <0x0>; tx-burst-size-dword = <0x10>; rx-burst-size-dword = <0x10>; diff --git a/arch/arm/include/asm/arch-imx8/imx-regs.h b/arch/arm/include/asm/arch-imx8/imx-regs.h index 5bf35384716..04622075503 100644 --- a/arch/arm/include/asm/arch-imx8/imx-regs.h +++ b/arch/arm/include/asm/arch-imx8/imx-regs.h @@ -51,6 +51,7 @@ #define USB_BASE_ADDR 0x5b0d0000 #define USB_PHY0_BASE_ADDR 0x5b100000 +#define USB_PHY1_BASE_ADDR 0x5b110000 #define CAAM_ARB_BASE_ADDR (0x31800000) #define CONFIG_SYS_FSL_SEC_ADDR (0x31400000) diff --git a/arch/arm/mach-imx/imx8/clock.c b/arch/arm/mach-imx/imx8/clock.c index ba62d095572..b0f12ffa639 100644 --- a/arch/arm/mach-imx/imx8/clock.c +++ b/arch/arm/mach-imx/imx8/clock.c @@ -213,7 +213,9 @@ void init_clk_gpmi_nand(void) void enable_usboh3_clk(unsigned char enable) { +#if !defined(CONFIG_IMX8DXL) lpcg_all_clock_on(USB_2_LPCG); +#endif return; } diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c index 708ad2c1a9b..ba2d438ac95 100644 --- a/drivers/clk/imx/clk-imx8qxp.c +++ b/drivers/clk/imx/clk-imx8qxp.c @@ -143,14 +143,20 @@ static struct imx8_lpcg_clks imx8qxp_lpcg_clks[] = { CLK_5( IMX8QXP_LSIO_FSPI0_HCLK, "FSPI0_HCLK", 0x10, FSPI_0_LPCG, IMX8QXP_LSIO_MEM_CLK ), CLK_5( IMX8QXP_LSIO_FSPI0_CLK, "FSPI0_CLK", 0, FSPI_0_LPCG, IMX8QXP_LSIO_FSPI0_DIV ), +#if !defined(CONFIG_IMX8DXL) CLK_5( IMX8QXP_USB2_OH_AHB_CLK, "USB2_OH_AHB", 24, USB_2_LPCG, IMX8QXP_AHB_CONN_CLK_ROOT ), CLK_5( IMX8QXP_USB2_OH_IPG_S_CLK, "USB2_OH_IPG_S", 16, USB_2_LPCG, IMX8QXP_IPG_CONN_CLK_ROOT ), CLK_5( IMX8QXP_USB2_OH_IPG_S_PL301_CLK, "USB2_OH_IPG_S_PL301", 20, USB_2_LPCG, IMX8QXP_IPG_CONN_CLK_ROOT ), +#endif CLK_5( IMX8QXP_USB2_PHY_IPG_CLK, "USB2_PHY_IPG", 28, USB_2_LPCG, IMX8QXP_IPG_CONN_CLK_ROOT ), CLK_5( IMX8QXP_USB3_IPG_CLK, "USB3_IPG", 16, USB_3_LPCG, IMX8QXP_IPG_CONN_CLK_ROOT ), CLK_5( IMX8QXP_USB3_CORE_PCLK, "USB3_CORE", 20, USB_3_LPCG, IMX8QXP_IPG_CONN_CLK_ROOT ), CLK_5( IMX8QXP_USB3_PHY_CLK, "USB3_PHY", 24, USB_3_LPCG, IMX8QXP_USB3_IPG_CLK ), + +#if defined(CONFIG_IMX8DXL) + CLK_5( IMX8DXL_USB2_PHY2_IPG_CLK, "USB3_ACLK", 28, USB_3_LPCG, IMX8QXP_IPG_CONN_CLK_ROOT ), +#endif CLK_5( IMX8QXP_USB3_ACLK, "USB3_ACLK", 28, USB_3_LPCG, IMX8QXP_USB3_ACLK_DIV ), CLK_5( IMX8QXP_USB3_BUS_CLK, "USB3_BUS", 0, USB_3_LPCG, IMX8QXP_USB3_BUS_DIV ), CLK_5( IMX8QXP_USB3_LPM_CLK, "USB3_LPM", 4, USB_3_LPCG, IMX8QXP_USB3_LPM_DIV ), diff --git a/include/dt-bindings/clock/imx8qxp-clock.h b/include/dt-bindings/clock/imx8qxp-clock.h index fb563e26d13..d67a7742cff 100644 --- a/include/dt-bindings/clock/imx8qxp-clock.h +++ b/include/dt-bindings/clock/imx8qxp-clock.h @@ -590,5 +590,6 @@ #define IMX8DXL_EQOS_PTP_CLK_S 541 #define IMX8DXL_EQOS_PTP_CLK 542 -#define IMX8QXP_CLK_END 543 +#define IMX8DXL_USB2_PHY2_IPG_CLK 543 +#define IMX8DXL_CLK_END 544 #endif /* __DT_BINDINGS_CLOCK_IMX8QXP_H */ |