From: Patrick Wildt <patrick@blueri.se>
To: Ye Li <ye.li@nxp.com>
Cc: sbabic@denx.de, u-boot@lists.denx.de, festevam@gmail.com,
peng.fan@nxp.com, uboot-imx@nxp.com
Subject: Re: [PATCH 3/4] arm: imx8mq: Add USB clock init function
Date: Mon, 12 Jul 2021 16:33:06 +0200 [thread overview]
Message-ID: <YOxSok/SF9AFeWoW@mone.fritz.box> (raw)
In-Reply-To: <1613924784-63219-3-git-send-email-ye.li@nxp.com>
Am Sun, Feb 21, 2021 at 08:26:23AM -0800 schrieb Ye Li:
> Add clock function to setup relevant clocks for USB3.0 controllers and
> PHYs on i.MX8MQ
>
> Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Patrick Wildt <patrick@blueri.se>
Tested-by: Patrick Wildt <patrick@blueri.se>
> ---
> arch/arm/include/asm/arch-imx8m/clock.h | 1 +
> arch/arm/mach-imx/imx8m/clock_imx8mq.c | 22 ++++++++++++++++++++++
> 2 files changed, 23 insertions(+)
>
> diff --git a/arch/arm/include/asm/arch-imx8m/clock.h b/arch/arm/include/asm/arch-imx8m/clock.h
> index c545eb8..e806552 100644
> --- a/arch/arm/include/asm/arch-imx8m/clock.h
> +++ b/arch/arm/include/asm/arch-imx8m/clock.h
> @@ -257,6 +257,7 @@ u32 imx_get_uartclk(void);
> int clock_init(void);
> void init_clk_usdhc(u32 index);
> void init_uart_clk(u32 index);
> +void init_usb_clk(void);
> void init_wdog_clk(void);
> unsigned int mxc_get_clock(enum mxc_clock clk);
> int clock_enable(enum clk_ccgr_index index, bool enable);
> diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mq.c b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> index 759ec6d..cccd645 100644
> --- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> +++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> @@ -393,6 +393,28 @@ void init_wdog_clk(void)
> clock_enable(CCGR_WDOG3, 1);
> }
>
> +void init_usb_clk(void)
> +{
> + if (!is_usb_boot()) {
> + clock_enable(CCGR_USB_CTRL1, 0);
> + clock_enable(CCGR_USB_CTRL2, 0);
> + clock_enable(CCGR_USB_PHY1, 0);
> + clock_enable(CCGR_USB_PHY2, 0);
> + /* 500MHz */
> + clock_set_target_val(USB_BUS_CLK_ROOT, CLK_ROOT_ON |
> + CLK_ROOT_SOURCE_SEL(1));
> + /* 100MHz */
> + clock_set_target_val(USB_CORE_REF_CLK_ROOT, CLK_ROOT_ON |
> + CLK_ROOT_SOURCE_SEL(1));
> + /* 100MHz */
> + clock_set_target_val(USB_PHY_REF_CLK_ROOT, CLK_ROOT_ON |
> + CLK_ROOT_SOURCE_SEL(1));
> + clock_enable(CCGR_USB_CTRL1, 1);
> + clock_enable(CCGR_USB_CTRL2, 1);
> + clock_enable(CCGR_USB_PHY1, 1);
> + clock_enable(CCGR_USB_PHY2, 1);
> + }
> +}
>
> void init_nand_clk(void)
> {
> --
> 2.7.4
>
next prev parent reply other threads:[~2021-07-12 14:33 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-21 16:26 [PATCH 1/4] phy: phy-imx8mq-usb: Add USB PHY driver for i.MX8MQ Ye Li
2021-02-21 16:26 ` [PATCH 2/4] arm: dts: imx8mq: Add alias for two usb controllers Ye Li
2021-07-12 14:30 ` Patrick Wildt
2021-02-21 16:26 ` [PATCH 3/4] arm: imx8mq: Add USB clock init function Ye Li
2021-07-12 14:33 ` Patrick Wildt [this message]
2021-02-21 16:26 ` [PATCH 4/4] imx8mq_evk: Enable the USB3.0 host port Ye Li
2021-02-25 11:01 ` Fabio Estevam
2021-02-25 13:34 ` [EXT] " Ye Li
2021-02-25 13:49 ` Fabio Estevam
2021-02-27 6:04 ` Ye Li
2021-02-27 13:46 ` Fabio Estevam
2021-03-03 8:53 ` Bough Chen
2021-07-10 23:34 ` Patrick Wildt
2021-07-12 13:28 ` Fabio Estevam
2021-07-12 14:23 ` Patrick Wildt
2021-07-12 14:33 ` Patrick Wildt
2021-07-12 14:27 ` [PATCH 1/4] phy: phy-imx8mq-usb: Add USB PHY driver for i.MX8MQ Patrick Wildt
2021-07-12 21:31 ` Fabio Estevam
2021-07-13 5:53 ` Stefano Babic
2021-07-13 10:39 ` Marek Vasut
2021-07-13 10:46 ` Stefano Babic
2021-07-13 11:22 ` Patrick Wildt
2021-07-13 11:53 ` Marek Vasut
2021-07-13 11:54 ` Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YOxSok/SF9AFeWoW@mone.fritz.box \
--to=patrick@blueri.se \
--cc=festevam@gmail.com \
--cc=peng.fan@nxp.com \
--cc=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
--cc=ye.li@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.