blob: 1e5fa1a75ebc489e69dbbe7641675eecb374f4e0 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Jason Liudec11122011-11-25 00:18:02 +00002/*
3 * (C) Copyright 2009
4 * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
Jason Liudec11122011-11-25 00:18:02 +00005 */
6
Lukasz Majewskia6fc1592017-11-07 11:34:15 +01007#ifndef __SYS_PROTO_IMX6_
8#define __SYS_PROTO_IMX6_
9
Stefano Babic33731bc2017-06-29 10:16:06 +020010#include <asm/mach-imx/sys_proto.h>
Lukasz Majewskiff7ae6f2017-10-31 13:26:24 +010011#include <asm/arch/iomux.h>
Stefan Agner6a6692f2017-09-13 14:29:44 -070012
13#define USBPHY_PWD 0x00000000
14
15#define USBPHY_PWD_RXPWDRX (1 << 20) /* receiver block power down */
16
17#define is_usbotg_phy_active(void) (!(readl(USB_PHY0_BASE_ADDR + USBPHY_PWD) & \
18 USBPHY_PWD_RXPWDRX))
Diego Dortae2ff4102017-10-05 09:15:58 -030019
20int imx6_pcie_toggle_power(void);
21int imx6_pcie_toggle_reset(void);
Lukasz Majewskiff7ae6f2017-10-31 13:26:24 +010022
Marek Vasut02fec412019-11-26 09:35:32 +010023enum ldo_reg {
24 LDO_ARM,
25 LDO_SOC,
26 LDO_PU,
27};
28
29int set_ldo_voltage(enum ldo_reg ldo, u32 mv);
30
Lukasz Majewskiff7ae6f2017-10-31 13:26:24 +010031/**
32 * iomuxc_set_rgmii_io_voltage - set voltage level of RGMII/USB pins
33 *
34 * @param io_vol - the voltage IO level of pins
35 */
36static inline void iomuxc_set_rgmii_io_voltage(int io_vol)
37{
38 __raw_writel(io_vol, IOMUXC_SW_PAD_CTL_GRP_DDR_TYPE_RGMII);
39}
Lukasz Majewskia6fc1592017-11-07 11:34:15 +010040
41#endif /* __SYS_PROTO_IMX6_ */