diff options
author | Lukasz Majewski <lukma@denx.de> | 2017-10-31 13:26:24 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2017-11-09 11:32:49 +0100 |
commit | ec1b26973cad9398104e740f96c36ef0a11d301d (patch) | |
tree | 7e50dc8ac5334046938cea939b1640a400c6b4a9 /arch/arm | |
parent | 8ea754da602b49a5200e6c3e874b1f7166516df6 (diff) |
imx6: iomux: Add generic function to set RGMII IO voltage on IMX6 SoCs
This commit provides generic function to set the RGMII/HSIC IO voltage
level on iMX6 devices.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/arch-mx6/iomux.h | 13 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-mx6/sys_proto.h | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-mx6/iomux.h b/arch/arm/include/asm/arch-mx6/iomux.h index 907cb408ff..ee3a56583b 100644 --- a/arch/arm/include/asm/arch-mx6/iomux.h +++ b/arch/arm/include/asm/arch-mx6/iomux.h @@ -178,4 +178,17 @@ |IOMUXC_GPR13_SATA_PHY_3_MASK \ |IOMUXC_GPR13_SATA_PHY_2_MASK \ |IOMUXC_GPR13_SATA_PHY_1_MASK) + +/* + * Setup RGMII voltage levels on iMX6 SoC - the + * + * IOMUXC_SW_PAD_CTL_GRP_DDR_TYPE_RGMII - register + * + * 1P2V_IO - USB_HSIC, MIPI_HSI + * 1P5V_IO - ENET pins + */ +#define IOMUXC_SW_PAD_CTL_GRP_DDR_TYPE_RGMII 0x020e0790 +#define DDR_SEL_1P2V_IO (0x2 << 18) +#define DDR_SEL_1P5V_IO (0x3 << 18) + #endif /* __ASM_ARCH_IOMUX_H__ */ diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h index b22a7a0f8b..72ab7d814f 100644 --- a/arch/arm/include/asm/arch-mx6/sys_proto.h +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h @@ -6,6 +6,7 @@ */ #include <asm/mach-imx/sys_proto.h> +#include <asm/arch/iomux.h> #define USBPHY_PWD 0x00000000 @@ -16,3 +17,13 @@ int imx6_pcie_toggle_power(void); int imx6_pcie_toggle_reset(void); + +/** + * 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); +} |