2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2011-11-25 00:18:02 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2009
|
|
|
|
* Stefano Babic, DENX Software Engineering, sbabic@denx.de.
|
|
|
|
*/
|
|
|
|
|
2017-11-07 10:34:15 +00:00
|
|
|
#ifndef __SYS_PROTO_IMX6_
|
|
|
|
#define __SYS_PROTO_IMX6_
|
|
|
|
|
2017-06-29 08:16:06 +00:00
|
|
|
#include <asm/mach-imx/sys_proto.h>
|
2017-10-31 12:26:24 +00:00
|
|
|
#include <asm/arch/iomux.h>
|
2017-09-13 21:29:44 +00:00
|
|
|
|
|
|
|
#define USBPHY_PWD 0x00000000
|
|
|
|
|
|
|
|
#define USBPHY_PWD_RXPWDRX (1 << 20) /* receiver block power down */
|
|
|
|
|
|
|
|
#define is_usbotg_phy_active(void) (!(readl(USB_PHY0_BASE_ADDR + USBPHY_PWD) & \
|
|
|
|
USBPHY_PWD_RXPWDRX))
|
2017-10-05 12:15:58 +00:00
|
|
|
|
|
|
|
int imx6_pcie_toggle_power(void);
|
|
|
|
int imx6_pcie_toggle_reset(void);
|
2017-10-31 12:26:24 +00:00
|
|
|
|
2019-11-26 08:35:32 +00:00
|
|
|
enum ldo_reg {
|
|
|
|
LDO_ARM,
|
|
|
|
LDO_SOC,
|
|
|
|
LDO_PU,
|
|
|
|
};
|
|
|
|
|
|
|
|
int set_ldo_voltage(enum ldo_reg ldo, u32 mv);
|
|
|
|
|
2017-10-31 12:26:24 +00:00
|
|
|
/**
|
|
|
|
* iomuxc_set_rgmii_io_voltage - set voltage level of RGMII/USB pins
|
|
|
|
*
|
|
|
|
* @param io_vol - the voltage IO level of pins
|
|
|
|
*/
|
|
|
|
static inline void iomuxc_set_rgmii_io_voltage(int io_vol)
|
|
|
|
{
|
|
|
|
__raw_writel(io_vol, IOMUXC_SW_PAD_CTL_GRP_DDR_TYPE_RGMII);
|
|
|
|
}
|
2017-11-07 10:34:15 +00:00
|
|
|
|
|
|
|
#endif /* __SYS_PROTO_IMX6_ */
|