blob: 33458cd0008641e8960fe7a59ee943de09a9566e [file] [log] [blame]
Jason Liudec11122011-11-25 00:18:02 +00001/*
2 * (C) Copyright 2009
3 * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Jason Liudec11122011-11-25 00:18:02 +00006 */
7
Lukasz Majewskia6fc1592017-11-07 11:34:15 +01008#ifndef __SYS_PROTO_IMX6_
9#define __SYS_PROTO_IMX6_
10
Stefano Babic33731bc2017-06-29 10:16:06 +020011#include <asm/mach-imx/sys_proto.h>
Lukasz Majewskiff7ae6f2017-10-31 13:26:24 +010012#include <asm/arch/iomux.h>
Stefan Agner6a6692f2017-09-13 14:29:44 -070013
14#define USBPHY_PWD 0x00000000
15
16#define USBPHY_PWD_RXPWDRX (1 << 20) /* receiver block power down */
17
18#define is_usbotg_phy_active(void) (!(readl(USB_PHY0_BASE_ADDR + USBPHY_PWD) & \
19 USBPHY_PWD_RXPWDRX))
Diego Dortae2ff4102017-10-05 09:15:58 -030020
21int imx6_pcie_toggle_power(void);
22int imx6_pcie_toggle_reset(void);
Lukasz Majewskiff7ae6f2017-10-31 13:26:24 +010023
24/**
25 * iomuxc_set_rgmii_io_voltage - set voltage level of RGMII/USB pins
26 *
27 * @param io_vol - the voltage IO level of pins
28 */
29static inline void iomuxc_set_rgmii_io_voltage(int io_vol)
30{
31 __raw_writel(io_vol, IOMUXC_SW_PAD_CTL_GRP_DDR_TYPE_RGMII);
32}
Lukasz Majewskia6fc1592017-11-07 11:34:15 +010033
34#endif /* __SYS_PROTO_IMX6_ */