blob: cc70284f5557971facfa62482d7803582e7a7533 [file] [log] [blame]
Peng Fanb15705a2021-08-07 16:00:35 +08001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
Peng Fan690eea12021-08-07 16:00:45 +08003 * Copyright 2021 NXP
Peng Fanb15705a2021-08-07 16:00:35 +08004 */
5
6#ifndef _ASM_ARCH_IMX8ULP_CLOCK_H
7#define _ASM_ARCH_IMX8ULP_CLOCK_H
8
9/* Mainly for compatible to imx common code. */
10enum mxc_clock {
11 MXC_ARM_CLK = 0,
12 MXC_AHB_CLK,
13 MXC_IPG_CLK,
14 MXC_UART_CLK,
15 MXC_CSPI_CLK,
16 MXC_AXI_CLK,
17 MXC_DDR_CLK,
18 MXC_ESDHC_CLK,
19 MXC_ESDHC2_CLK,
Peng Fan690eea12021-08-07 16:00:45 +080020 MXC_ESDHC3_CLK,
Peng Fanb15705a2021-08-07 16:00:35 +080021 MXC_I2C_CLK,
22};
23
24u32 mxc_get_clock(enum mxc_clock clk);
25u32 get_lpuart_clk(void);
26#ifdef CONFIG_SYS_I2C_IMX_LPI2C
27int enable_i2c_clk(unsigned char enable, unsigned int i2c_num);
28u32 imx_get_i2cclk(unsigned int i2c_num);
29#endif
Peng Fan690eea12021-08-07 16:00:45 +080030void enable_usboh3_clk(unsigned char enable);
31int enable_usb_pll(ulong usb_phy_base);
Peng Fanb15705a2021-08-07 16:00:35 +080032#ifdef CONFIG_MXC_OCOTP
33void enable_ocotp_clk(unsigned char enable);
34#endif
35void init_clk_usdhc(u32 index);
Peng Fan690eea12021-08-07 16:00:45 +080036void init_clk_fspi(int index);
37void init_clk_ddr(void);
38int set_ddr_clk(u32 phy_freq_mhz);
Peng Fanb15705a2021-08-07 16:00:35 +080039void clock_init(void);
Peng Fan690eea12021-08-07 16:00:45 +080040void cgc1_enet_stamp_sel(u32 clk_src);
Ye Li3d3dfb02021-10-29 09:46:19 +080041void mxs_set_lcdclk(u32 base_addr, u32 freq_in_khz);
Ye Licb7e3752021-10-29 09:46:27 +080042void reset_lcdclk(void);
Ye Li3d3dfb02021-10-29 09:46:19 +080043void enable_mipi_dsi_clk(unsigned char enable);
Peng Fanb15705a2021-08-07 16:00:35 +080044#endif