本文整理汇总了C++中MUX_PAD_CTRL函数的典型用法代码示例。如果您正苦于以下问题:C++ MUX_PAD_CTRL函数的具体用法?C++ MUX_PAD_CTRL怎么用?C++ MUX_PAD_CTRL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MUX_PAD_CTRL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setup_epdc
static void setup_epdc(void)
{
/*** epdc Maxim PMIC settings ***/
/* EPDC_PWRSTAT - GPIO2[31] for PWR_GOOD status */
imx_iomux_v3_setup_pad(MX7D_PAD_EPDC_PWR_STAT__GPIO2_IO31 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* EPDC_VCOM0 - GPIO4[14] for VCOM control */
imx_iomux_v3_setup_pad(MX7D_PAD_I2C4_SCL__GPIO4_IO14 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* EPDC_PWRWAKEUP - GPIO4[23] for EPD PMIC WAKEUP */
imx_iomux_v3_setup_pad(MX7D_PAD_EPDC_SDCE3__GPIO2_IO23 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* EPDC_PWRCTRL0 - GPIO4[20] for EPD PWR CTL0 */
imx_iomux_v3_setup_pad(MX7D_PAD_EPDC_PWR_COM__GPIO2_IO30 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* Set pixel clock rates for EPDC in clock.c */
panel_info.epdc_data.wv_modes.mode_init = 0;
panel_info.epdc_data.wv_modes.mode_du = 1;
panel_info.epdc_data.wv_modes.mode_gc4 = 3;
panel_info.epdc_data.wv_modes.mode_gc8 = 2;
panel_info.epdc_data.wv_modes.mode_gc16 = 2;
panel_info.epdc_data.wv_modes.mode_gc32 = 2;
panel_info.epdc_data.epdc_timings = panel_timings;
setup_epdc_power();
}
示例2: setup_epdc_power
static void setup_epdc_power(void)
{
/* Setup epdc voltage */
/* EIM_A17 - GPIO2[21] for PWR_GOOD status */
imx_iomux_v3_setup_pad(MX6_PAD_EIM_A17__GPIO2_IO21 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* Set as input */
gpio_direction_input(IMX_GPIO_NR(2, 21));
/* EIM_D17 - GPIO3[17] for VCOM control */
imx_iomux_v3_setup_pad(MX6_PAD_EIM_D17__GPIO3_IO17 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* Set as output */
gpio_direction_output(IMX_GPIO_NR(3, 17), 1);
/* EIM_D20 - GPIO3[20] for EPD PMIC WAKEUP */
imx_iomux_v3_setup_pad(MX6_PAD_EIM_D20__GPIO3_IO20 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* Set as output */
gpio_direction_output(IMX_GPIO_NR(3, 20), 1);
/* EIM_A18 - GPIO2[20] for EPD PWR CTL0 */
imx_iomux_v3_setup_pad(MX6_PAD_EIM_A18__GPIO2_IO20 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* Set as output */
gpio_direction_output(IMX_GPIO_NR(2, 20), 1);
}
示例3: setup_epdc_power
static void setup_epdc_power(void)
{
/* IOMUX_GPR1: bit30: Disable On-chip RAM EPDC Function */
struct iomuxc_gpr_base_regs *const iomuxc_gpr_regs
= (struct iomuxc_gpr_base_regs *) IOMUXC_GPR_BASE_ADDR;
clrsetbits_le32(&iomuxc_gpr_regs->gpr[1],
IOMUXC_GPR_GPR1_GPR_ENABLE_OCRAM_EPDC_MASK, 0);
/* Setup epdc voltage */
/* EPDC_PWRSTAT - GPIO2[31] for PWR_GOOD status */
imx_iomux_v3_setup_pad(MX7D_PAD_EPDC_PWR_STAT__GPIO2_IO31 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
gpio_direction_input(IMX_GPIO_NR(2, 31));
/* EPDC_VCOM0 - GPIO4[14] for VCOM control */
imx_iomux_v3_setup_pad(MX7D_PAD_I2C4_SCL__GPIO4_IO14 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* Set as output */
gpio_direction_output(IMX_GPIO_NR(4, 14), 1);
/* EPDC_PWRWAKEUP - GPIO2[23] for EPD PMIC WAKEUP */
imx_iomux_v3_setup_pad(MX7D_PAD_EPDC_SDCE3__GPIO2_IO23 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* Set as output */
gpio_direction_output(IMX_GPIO_NR(2, 23), 1);
/* EPDC_PWRCTRL0 - GPIO2[30] for EPD PWR CTL0 */
imx_iomux_v3_setup_pad(MX7D_PAD_EPDC_PWR_COM__GPIO2_IO30 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* Set as output */
gpio_direction_output(IMX_GPIO_NR(2, 30), 1);
}
示例4: setup_epdc_power
static void setup_epdc_power(void)
{
/* Setup epdc voltage */
/* EPDC_PWRSTAT - GPIO2[13] for PWR_GOOD status */
imx_iomux_v3_setup_pad(MX6_PAD_EPDC_PWRSTAT__GPIO_2_13 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
gpio_direction_input(IMX_GPIO_NR(2, 13));
/* EPDC_VCOM0 - GPIO2[3] for VCOM control */
imx_iomux_v3_setup_pad(MX6_PAD_EPDC_VCOM0__GPIO_2_3 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* Set as output */
gpio_direction_output(IMX_GPIO_NR(2, 3), 1);
/* EPDC_PWRWAKEUP - GPIO2[14] for EPD PMIC WAKEUP */
imx_iomux_v3_setup_pad(MX6_PAD_EPDC_PWRWAKEUP__GPIO_2_14 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* Set as output */
gpio_direction_output(IMX_GPIO_NR(2, 14), 1);
/* EPDC_PWRCTRL0 - GPIO2[7] for EPD PWR CTL0 */
imx_iomux_v3_setup_pad(MX6_PAD_EPDC_PWRCTRL0__GPIO_2_7 |
MUX_PAD_CTRL(EPDC_PAD_CTRL));
/* Set as output */
gpio_direction_output(IMX_GPIO_NR(2, 7), 1);
}
示例5: setup_iomux_uart
static void setup_iomux_uart(void)
{
static iomux_v3_cfg_t const uart1_pads[] = {
MX6_PAD_UART1_TXD__UART1_TXD | MUX_PAD_CTRL(UART_PAD_CTRL),
MX6_PAD_UART1_RXD__UART1_RXD | MUX_PAD_CTRL(UART_PAD_CTRL),
};
imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
}
示例6: cm_fx6_setup_usb_host
static int cm_fx6_setup_usb_host(void)
{
int err;
err = gpio_request(CM_FX6_USB_HUB_RST, "usb hub rst");
if (err)
return err;
SETUP_IOMUX_PAD(PAD_GPIO_0__USB_H1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL));
SETUP_IOMUX_PAD(PAD_SD3_RST__GPIO7_IO08 | MUX_PAD_CTRL(NO_PAD_CTRL));
return 0;
}
示例7: mx50_suspend_exit
static void mx50_suspend_exit()
{
iomux_v3_cfg_t iomux_setting =
(MX50_PAD_ECSPI2_SCLK__GPIO_4_16 &
~MUX_PAD_CTRL_MASK) | MUX_PAD_CTRL(0x84);
/* Power Up the band-gap and set the SELFBIAS bit. */
__raw_writel(MXC_ANADIG_REF_PWD,
apll_base + MXC_ANADIG_MISC_CLR);
udelay(100);
__raw_writel(MXC_ANADIG_REF_SELFBIAS_OFF,
apll_base + MXC_ANADIG_MISC_SET);
//if (board_is_mx50_rd3()) {
/* Enable the Pull/keeper */
mxc_iomux_v3_setup_pad(iomux_setting);
gpio_request(DCDC_EN, "dcdc-en");
gpio_direction_output(DCDC_EN, 1);
//}
mxc_iomux_v3_setup_multiple_pads(suspend_exit_pads,
ARRAY_SIZE(suspend_exit_pads));
nimbus_gpio_iomux_init();
}
示例8: nimbus_gpio_iomux_init
static void nimbus_gpio_iomux_init()
{
iomux_v3_cfg_t iomux_setting;
iomux_setting = (MX50_PAD_ECSPI2_SCLK__GPIO_4_16 & \
~MUX_PAD_CTRL_MASK) | \
MUX_PAD_CTRL(PAD_CTL_PKE | PAD_CTL_DSE_HIGH);
/* Enable the Pull/keeper */
mxc_iomux_v3_setup_pad(iomux_setting);
nimbus_led_ctrl(LEDID_WLAN,0,0);
nimbus_led_ctrl(LEDID_WIFI,0,0);
nimbus_led_ctrl(LEDID_CHARGER_RED,0,0);
nimbus_led_ctrl(LEDID_CHARGER_GREEN,0,0);
#if 0
if( gpio_get_value(SD1_CHANGE_FOUND)==0)
{
printk("Found SD changed during suspending.\n");
}
gpio_direction_output(SD1_CHANGE_CLEAR,1);
mdelay(1);
gpio_direction_output(SD1_CHANGE_CLEAR,0);
#endif
}
示例9: cm_fx6_init_usb_otg
static int cm_fx6_init_usb_otg(void)
{
int ret;
struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
ret = gpio_request(SB_FX6_USB_OTG_PWR, "usb-pwr");
if (ret) {
printf("USB OTG pwr gpio request failed: %d\n", ret);
return ret;
}
SETUP_IOMUX_PAD(PAD_EIM_D22__GPIO3_IO22 | MUX_PAD_CTRL(NO_PAD_CTRL));
SETUP_IOMUX_PAD(PAD_ENET_RX_ER__USB_OTG_ID |
MUX_PAD_CTRL(WEAK_PULLDOWN));
clrbits_le32(&iomux->gpr[1], IOMUXC_GPR1_OTG_ID_MASK);
/* disable ext. charger detect, or it'll affect signal quality at dp. */
return gpio_direction_output(SB_FX6_USB_OTG_PWR, 0);
}
示例10: board_eth_init
int board_eth_init(bd_t *bis)
{
struct phy_device *phydev;
struct mii_dev *bus;
unsigned short id1, id2;
int ret;
iomux_v3_cfg_t enet_reset = MX6_PAD_EIM_D23__GPIO3_IO23 |
MUX_PAD_CTRL(NO_PAD_CTRL);
/* check whether KSZ9031 or AR8035 has to be configured */
imx_iomux_v3_setup_multiple_pads(enet_pads_ar8035,
ARRAY_SIZE(enet_pads_ar8035));
imx_iomux_v3_setup_pad(enet_reset);
/* phy reset */
gpio_direction_output(IMX_GPIO_NR(3, 23), 0);
udelay(2000);
gpio_set_value(IMX_GPIO_NR(3, 23), 1);
udelay(500);
bus = fec_get_miibus(IMX_FEC_BASE, -1);
if (!bus)
return -EINVAL;
phydev = phy_find_by_mask(bus, (0xf << 4), PHY_INTERFACE_MODE_RGMII);
if (!phydev) {
printf("Error: phy device not found.\n");
ret = -ENODEV;
goto free_bus;
}
/* get the PHY id */
id1 = phy_read(phydev, MDIO_DEVAD_NONE, 2);
id2 = phy_read(phydev, MDIO_DEVAD_NONE, 3);
if ((id1 == 0x22) && ((id2 & 0xFFF0) == 0x1620)) {
/* re-configure for Micrel KSZ9031 */
printf("configure Micrel KSZ9031 Ethernet Phy at address %d\n",
phydev->addr);
/* phy reset: gpio3-23 */
gpio_set_value(IMX_GPIO_NR(3, 23), 0);
gpio_set_value(IMX_GPIO_NR(6, 30), (phydev->addr >> 2));
gpio_set_value(IMX_GPIO_NR(6, 25), 1);
gpio_set_value(IMX_GPIO_NR(6, 27), 1);
gpio_set_value(IMX_GPIO_NR(6, 28), 1);
gpio_set_value(IMX_GPIO_NR(6, 29), 1);
imx_iomux_v3_setup_multiple_pads(enet_pads_ksz9031,
ARRAY_SIZE(enet_pads_ksz9031));
gpio_set_value(IMX_GPIO_NR(6, 24), 1);
udelay(500);
gpio_set_value(IMX_GPIO_NR(3, 23), 1);
imx_iomux_v3_setup_multiple_pads(enet_pads_final_ksz9031,
ARRAY_SIZE(enet_pads_final_ksz9031));
} else if ((id1 == 0x004d) && (id2 == 0xd072)) {
示例11: mx51_babbage_init
/*
* Board specific initialization.
*/
static void __init mx51_babbage_init(void)
{
iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 |
MUX_PAD_CTRL(PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP);
imx51_soc_init();
#if defined(CONFIG_CPU_FREQ_IMX)
get_cpu_op = mx51_get_cpu_op;
#endif
mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads,
ARRAY_SIZE(mx51babbage_pads));
imx51_add_imx_uart(0, &uart_pdata);
imx51_add_imx_uart(1, NULL);
imx51_add_imx_uart(2, &uart_pdata);
babbage_fec_reset();
imx51_add_fec(NULL);
/* Set the PAD settings for the pwr key. */
mxc_iomux_v3_setup_pad(power_key);
imx_add_gpio_keys(&imx_button_data);
imx51_add_imx_i2c(0, &babbage_i2c_data);
imx51_add_imx_i2c(1, &babbage_i2c_data);
mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data);
if (otg_mode_host)
mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
else {
initialize_otg_port(NULL);
mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata);
}
gpio_usbh1_active();
mxc_register_device(&mxc_usbh1_device, &usbh1_config);
/* setback USBH1_STP to be function */
mxc_iomux_v3_setup_pad(usbh1stp);
babbage_usbhub_reset();
imx51_add_sdhci_esdhc_imx(0, &mx51_babbage_sd1_data);
imx51_add_sdhci_esdhc_imx(1, &mx51_babbage_sd2_data);
spi_register_board_info(mx51_babbage_spi_board_info,
ARRAY_SIZE(mx51_babbage_spi_board_info));
imx51_add_ecspi(0, &mx51_babbage_spi_pdata);
imx51_add_imx2_wdt(0, NULL);
}
示例12: cm_fx6_usb_hub_reset
static int cm_fx6_usb_hub_reset(void)
{
int err;
err = gpio_request(CM_FX6_USB_HUB_RST, "usb hub rst");
if (err) {
printf("USB hub rst gpio request failed: %d\n", err);
return -1;
}
SETUP_IOMUX_PAD(PAD_SD3_RST__GPIO7_IO08 | MUX_PAD_CTRL(NO_PAD_CTRL));
gpio_direction_output(CM_FX6_USB_HUB_RST, 0);
udelay(10);
gpio_direction_output(CM_FX6_USB_HUB_RST, 1);
mdelay(1);
return 0;
}
示例13: board_init
int board_init(void)
{
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
imx_iomux_v3_setup_pad(MX6_PAD_NANDF_D4__GPIO2_IO04 |
MUX_PAD_CTRL(NO_PAD_CTRL));
gpio_direction_output(IMX_GPIO_NR(2, 4), 0);
/* Set Low */
gpio_set_value(IMX_GPIO_NR(2, 4), 0);
udelay(1000);
/* Set High */
gpio_set_value(IMX_GPIO_NR(2, 4), 1);
return 0;
}
示例14: board_ehci_hcd_init
int board_ehci_hcd_init(int port)
{
u32 *usbnc_usb_uh1_ctrl = (u32 *)(MX6_USBNC_BASEADDR + 4);
switch (port) {
case 0:
return cm_fx6_init_usb_otg();
case 1:
SETUP_IOMUX_PAD(PAD_GPIO_0__USB_H1_PWR |
MUX_PAD_CTRL(NO_PAD_CTRL));
/* Set PWR polarity to match power switch's enable polarity */
setbits_le32(usbnc_usb_uh1_ctrl, USBNC_USB_H1_PWR_POL);
return cm_fx6_usb_hub_reset();
default:
break;
}
return 0;
}
示例15: mx50_suspend_enter
static void mx50_suspend_enter()
{
iomux_v3_cfg_t *p = suspend_enter_pads;
int i;
iomux_v3_cfg_t iomux_setting =
(MX50_PAD_ECSPI2_SCLK__GPIO_4_16 &
~MUX_PAD_CTRL_MASK) | MUX_PAD_CTRL(0x84);
/* Clear the SELF_BIAS bit and power down
* the band-gap.
*/
__raw_writel(MXC_ANADIG_REF_SELFBIAS_OFF,
apll_base + MXC_ANADIG_MISC_CLR);
__raw_writel(MXC_ANADIG_REF_PWD,
apll_base + MXC_ANADIG_MISC_SET);
//if (board_is_mx50_rd3()) {
/* Enable the Pull/keeper */
mxc_iomux_v3_setup_pad(iomux_setting);
gpio_request(DCDC_EN, "dcdc-en");
gpio_direction_output(DCDC_EN, 0);
//}
/* Set PADCTRL to 0 for all IOMUX. */
for (i = 0; i < ARRAY_SIZE(suspend_enter_pads); i++) {
suspend_exit_pads[i] = *p;
*p &= ~MUX_PAD_CTRL_MASK;
p++;
}
mxc_iomux_v3_get_multiple_pads(suspend_exit_pads,
ARRAY_SIZE(suspend_exit_pads));
mxc_iomux_v3_setup_multiple_pads(suspend_enter_pads,
ARRAY_SIZE(suspend_enter_pads));
nimbus_gpio_iomux_deinit();
//system_status=2;
}