本文整理汇总了C++中IMX_GPIO_NR函数的典型用法代码示例。如果您正苦于以下问题:C++ IMX_GPIO_NR函数的具体用法?C++ IMX_GPIO_NR怎么用?C++ IMX_GPIO_NR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IMX_GPIO_NR函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ov5640_mipi_camera_io_init
static void ov5640_mipi_camera_io_init(void)
{
IOMUX_SETUP(mipi_pads);
pr_info("%s\n", __func__);
mipi_pwm = pwm_request(2, "mipi_clock");
if (IS_ERR(mipi_pwm)) {
pr_err("unable to request PWM for mipi_clock\n");
} else {
unsigned period = 1000/22;
pr_info("got pwm for mipi_clock\n");
pwm_config(mipi_pwm, period >> 1, period);
pwm_enable(mipi_pwm);
}
camera_reset(IMX_GPIO_NR(6, 9), 1, IMX_GPIO_NR(2, 5), IMX_GPIO_NR(6, 11));
/* for mx6dl, mipi virtual channel 1 connect to csi 1*/
if (cpu_is_mx6dl())
mxc_iomux_set_gpr_register(13, 3, 3, 1);
}
开发者ID:blacktigersoftware,项目名称:hummingboard-cuboxi-kernel,代码行数:20,代码来源:board-mx6_nitrogen6x.c
示例2: wand_suspend_exit
static void wand_suspend_exit(void) {
gpio_direction_output(IMX_GPIO_NR(2, 8), 1);
gpio_direction_output(IMX_GPIO_NR(2, 9), 1);
gpio_direction_output(IMX_GPIO_NR(2, 10), 1);
gpio_direction_output(IMX_GPIO_NR(2, 11), 1);
gpio_direction_output(WAND_WL_RST_N, 1);
if (wand_revision == WAND_REV_C1) {
gpio_set_value(WAND_BT_WAKE_C1, 1);
gpio_direction_output(WAND_WL_REF_ON_C1, 1);
} else {
gpio_direction_output(WAND_WL_REF_ON_AB, 1);
gpio_set_value(WAND_BT_WAKE_AB, 1);
}
gpio_direction_output(WAND_WL_REG_ON, 1);
gpio_set_value(WAND_WL_WAKE, 1);
gpio_set_value(WAND_USB_HOST_PWR_EN, 1);
}
开发者ID:gitter-badger,项目名称:ARRR,代码行数:20,代码来源:board-wand.c
示例3: board_mmc_getcd
int board_mmc_getcd(struct mmc *mmc)
{
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
int ret = 0;
switch (cfg->esdhc_base) {
case USDHC2_BASE_ADDR:
gpio_direction_input(IMX_GPIO_NR(1, 4));
ret = !gpio_get_value(IMX_GPIO_NR(1, 4));
break;
case USDHC4_BASE_ADDR:
gpio_direction_input(IMX_GPIO_NR(2, 6));
ret = !gpio_get_value(IMX_GPIO_NR(2, 6));
break;
default:
printf("Bad USDHC interface\n");
}
return ret;
}
开发者ID:0s4l,项目名称:u-boot-xlnx,代码行数:20,代码来源:cgtqmx6eval.c
示例4: pca100_sdhc2_init
static int pca100_sdhc2_init(struct device *dev, irq_handler_t detect_irq,
void *data)
{
int ret;
ret = request_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), detect_irq,
IRQF_TRIGGER_FALLING, "imx-mmc-detect", data);
if (ret)
printk(KERN_ERR
"pca100: Failed to request irq for sd/mmc detection\n");
return ret;
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:13,代码来源:mach-pca100.c
示例5: board_ehci_hcd_init
int board_ehci_hcd_init(int port)
{
if (port == 0) {
/* USB OTG PWRON */
imx_iomux_v3_setup_pad(NEW_PAD_CTRL(MX53_PAD_GPIO_4__GPIO1_4,
PAD_CTL_PKE | PAD_CTL_DSE_HIGH));
gpio_direction_output(IMX_GPIO_NR(1, 4), 0);
/* USB OTG Over Current */
imx_iomux_v3_setup_pad(MX53_PAD_GPIO_18__GPIO7_13);
} else if (port == 1) {
/* USB Host PWRON */
imx_iomux_v3_setup_pad(NEW_PAD_CTRL(MX53_PAD_GPIO_2__GPIO1_2,
PAD_CTL_PKE | PAD_CTL_DSE_HIGH));
gpio_direction_output(IMX_GPIO_NR(1, 2), 0);
/* USB Host Over Current */
imx_iomux_v3_setup_pad(MX53_PAD_GPIO_3__USBOH3_USBH1_OC);
}
return 0;
}
开发者ID:13xiaobang,项目名称:mini2440-uboot_2016.01,代码行数:22,代码来源:m53evk.c
示例6: setup_display
static void setup_display(void)
{
struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
int reg;
enable_ipu_clock();
imx_setup_hdmi();
/* Turn on LDB0,IPU,IPU DI0 clocks */
reg = __raw_readl(&mxc_ccm->CCGR3);
reg |= MXC_CCM_CCGR3_LDB_DI0_MASK;
writel(reg, &mxc_ccm->CCGR3);
/* set LDB0, LDB1 clk select to 011/011 */
reg = readl(&mxc_ccm->cs2cdr);
reg &= ~(MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_MASK
|MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_MASK);
reg |= (3<<MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_OFFSET)
|(3<<MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_OFFSET);
writel(reg, &mxc_ccm->cs2cdr);
reg = readl(&mxc_ccm->cscmr2);
reg |= MXC_CCM_CSCMR2_LDB_DI0_IPU_DIV;
writel(reg, &mxc_ccm->cscmr2);
reg = readl(&mxc_ccm->chsccdr);
reg |= (CHSCCDR_CLK_SEL_LDB_DI0
<<MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET);
writel(reg, &mxc_ccm->chsccdr);
reg = IOMUXC_GPR2_BGREF_RRMODE_EXTERNAL_RES
|IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_HIGH
|IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_LOW
|IOMUXC_GPR2_BIT_MAPPING_CH1_SPWG
|IOMUXC_GPR2_DATA_WIDTH_CH1_18BIT
|IOMUXC_GPR2_BIT_MAPPING_CH0_SPWG
|IOMUXC_GPR2_DATA_WIDTH_CH0_18BIT
|IOMUXC_GPR2_LVDS_CH1_MODE_DISABLED
|IOMUXC_GPR2_LVDS_CH0_MODE_ENABLED_DI0;
writel(reg, &iomux->gpr[2]);
reg = readl(&iomux->gpr[3]);
reg = (reg & ~IOMUXC_GPR3_LVDS0_MUX_CTL_MASK)
| (IOMUXC_GPR3_MUX_SRC_IPU1_DI0
<<IOMUXC_GPR3_LVDS0_MUX_CTL_OFFSET);
writel(reg, &iomux->gpr[3]);
/* LVDS Backlight GPIO on LVDS connector - output low */
SETUP_IOMUX_PAD(PAD_SD2_CLK__GPIO1_IO10 | DIO_PAD_CFG);
gpio_direction_output(IMX_GPIO_NR(1, 10), 0);
}
开发者ID:Noltari,项目名称:u-boot,代码行数:51,代码来源:gw_ventana.c
示例7: board_early_init_f
int board_early_init_f(void)
{
setup_iomux_uart();
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
/* Enable PERI_3V3, which is used by SD2, ENET, LVDS, BT */
imx_iomux_v3_setup_multiple_pads(peri_3v3_pads,
ARRAY_SIZE(peri_3v3_pads));
/* Active high for ncp692 */
gpio_direction_output(IMX_GPIO_NR(4, 16) , 1);
return 0;
}
开发者ID:CDACBANG,项目名称:u-boot-wingz,代码行数:14,代码来源:mx6sxsabresd.c
示例8: mx27pdk_init
static void __init mx27pdk_init(void)
{
int ret;
imx27_soc_init();
mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins),
"mx27pdk");
mx27_3ds_sdhc1_enable_level_translator();
imx27_add_imx_uart0(&uart_pdata);
imx27_add_fec(NULL);
imx27_add_imx_keypad(&mx27_3ds_keymap_data);
imx27_add_mxc_mmc(0, &sdhc1_pdata);
imx27_add_imx2_wdt();
otg_phy_init();
if (otg_mode_host) {
otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS_EXT);
if (otg_pdata.otg)
imx27_add_mxc_ehci_otg(&otg_pdata);
}
if (!otg_mode_host)
imx27_add_fsl_usb2_udc(&otg_device_pdata);
imx27_add_spi_imx1(&spi2_pdata);
imx27_add_spi_imx0(&spi1_pdata);
mx27_3ds_spi_devs[0].irq = gpio_to_irq(PMIC_INT);
spi_register_board_info(mx27_3ds_spi_devs,
ARRAY_SIZE(mx27_3ds_spi_devs));
if (mxc_expio_init(MX27_CS5_BASE_ADDR, IMX_GPIO_NR(3, 28)))
pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n");
imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data);
platform_add_devices(devices, ARRAY_SIZE(devices));
imx27_add_imx_fb(&mx27_3ds_fb_data);
ret = gpio_request_array(mx27_3ds_camera_gpios,
ARRAY_SIZE(mx27_3ds_camera_gpios));
if (ret) {
pr_err("Failed to request camera gpios");
iclink_ov2640.power = NULL;
}
imx27_add_mx2_camera(&mx27_3ds_cam_pdata);
imx27_add_imx_ssi(0, &mx27_3ds_ssi_pdata);
imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0);
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:50,代码来源:mach-mx27_3ds.c
示例9: board_recovery_init_f
int board_recovery_init_f(void)
{
gpio_direction_input(IMX_GPIO_NR(3, 16));
if (!gpio_get_value(IMX_GPIO_NR(3, 16))) {
puts("RECOVERY SWITCH PRESSED\n");
puts("trying to assume sensible defaults\n");
setenv("bootdelay", "30");
setenv("recovery", "1");
/* these have to be set before setup_display() */
setenv("hdmi_xres", "640");
setenv("hdmi_yres", "480");
setenv("hdmi_refresh", "60");
/* prevent a misconfigured preboot from breaking recovery */
setenv("preboot", "usb start");
} else {
setenv("recovery", "0");
}
return 0;
}
开发者ID:ajayramaswamy,项目名称:uboot-imx6dongle,代码行数:23,代码来源:gk802.c
示例10: do_enable_lvds
void do_enable_lvds(struct lcd_panel_info_t const *dev)
{
enable_lcdif_clock(dev->lcdif_base_addr);
enable_lvds(dev->lcdif_base_addr);
imx_iomux_v3_setup_multiple_pads(lvds_ctrl_pads,
ARRAY_SIZE(lvds_ctrl_pads));
#ifdef CONFIG_MAX7310_IOEXP
/* LVDS Enable pin */
gpio_exp_direction_output(LVDS_EN_PIN , 1);
#endif
/* Set Brightness to high */
gpio_direction_output(IMX_GPIO_NR(6, 3) , 1);
}
开发者ID:huhuikevin,项目名称:fsluboot,代码行数:16,代码来源:mx6sxsabreauto.c
示例11: pcm038_init
static void __init pcm038_init(void)
{
imx27_soc_init();
mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins),
"PCM038");
pcm038_init_sram();
imx27_add_imx_uart0(&uart_pdata);
imx27_add_imx_uart1(&uart_pdata);
imx27_add_imx_uart2(&uart_pdata);
mxc_gpio_mode(PE16_AF_OWIRE);
imx27_add_mxc_nand(&pcm038_nand_board_info);
/* only the i2c master 1 is used on this CPU card */
i2c_register_board_info(1, pcm038_i2c_devices,
ARRAY_SIZE(pcm038_i2c_devices));
imx27_add_imx_i2c(1, &pcm038_i2c1_data);
/* PE18 for user-LED D40 */
mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT);
mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
/* MC13783 IRQ */
mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN);
imx27_add_spi_imx0(&pcm038_spi0_data);
pcm038_spi_board_info[0].irq = gpio_to_irq(IMX_GPIO_NR(2, 23));
spi_register_board_info(pcm038_spi_board_info,
ARRAY_SIZE(pcm038_spi_board_info));
imx27_add_mxc_ehci_hs(2, &usbh2_pdata);
imx27_add_fec(NULL);
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
imx27_add_imx2_wdt();
imx27_add_mxc_w1();
#ifdef CONFIG_MACH_PCM970_BASEBOARD
pcm970_baseboard_init();
#endif
}
开发者ID:7L,项目名称:pi_plus,代码行数:46,代码来源:mach-pcm038.c
示例12: mx35_3ds_init
/*
* Board specific initialization.
*/
static void __init mx35_3ds_init(void)
{
struct platform_device *imx35_fb_pdev;
imx35_soc_init();
mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads));
imx35_add_fec(NULL);
imx35_add_imx2_wdt();
imx35_add_mxc_rtc();
platform_add_devices(devices, ARRAY_SIZE(devices));
imx35_add_imx_uart0(&uart_pdata);
if (otg_mode_host)
imx35_add_mxc_ehci_otg(&otg_pdata);
imx35_add_mxc_ehci_hs(&usb_host_pdata);
if (!otg_mode_host)
imx35_add_fsl_usb2_udc(&usb_otg_pdata);
imx35_add_mxc_nand(&mx35pdk_nand_board_info);
imx35_add_sdhci_esdhc_imx(0, NULL);
if (mxc_expio_init(MX35_CS5_BASE_ADDR, IMX_GPIO_NR(1, 1)))
pr_warn("Init of the debugboard failed, all "
"devices on the debugboard are unusable.\n");
imx35_add_imx_i2c0(&mx35_3ds_i2c0_data);
i2c_register_board_info(
0, i2c_devices_3ds, ARRAY_SIZE(i2c_devices_3ds));
imx35_add_ipu_core();
platform_device_register(&mx35_3ds_ov2640);
imx35_3ds_init_camera();
imx35_fb_pdev = imx35_add_mx3_sdc_fb(&mx3fb_pdata);
mx35_3ds_lcd.dev.parent = &imx35_fb_pdev->dev;
platform_device_register(&mx35_3ds_lcd);
imx35_3ds_init_mc13892();
}
开发者ID:24hours,项目名称:linux,代码行数:47,代码来源:mach-mx35_3ds.c
示例13: tx51_fec_init
static inline void tx51_fec_init(void)
{
int i;
/* Configure LAN8700 pads as GPIO and set up
* necessary strap options for PHY
*/
for (i = 0; i < ARRAY_SIZE(tx51_fec_gpios); i++) {
struct tx51_fec_gpio_setup *gs = &tx51_fec_gpios[i];
gpio_direction_output(IMX_GPIO_NR(gs->group, gs->shift ), gs->level);
mxc_iomux_v3_setup_pad(gs->pad);
}
/*
*Turn on phy power, leave in reset state
*/
gpio_set_value(TX51_FEC_PHY_PWR, 1);
/*
* Wait some time to let the phy activate the internal regulator
*/
mdelay(10);
/*
* Deassert reset, phy latches the rest of bootstrap pins
*/
gpio_set_value(TX51_FEC_PHY_RST, 1);
/* LAN7800 has an internal Power On Reset (POR) signal (OR'ed with
* the external RESET signal) which is deactivated 21ms after
* power on and latches the strap options.
* Delay for 22ms to ensure, that the internal POR is inactive
* before reconfiguring the strap pins.
*/
mdelay(22);
/*
* The phy is ready, now configure imx51 pads for fec operation
*/
mxc_iomux_v3_setup_multiple_pads(tx51_fec_pads,
ARRAY_SIZE(tx51_fec_pads));
}
开发者ID:MinimumLaw,项目名称:ravion-barebox,代码行数:43,代码来源:tx51.c
示例14: imx51_babbage_xload_init_devices
static int imx51_babbage_xload_init_devices(void)
{
static int spi0_chipselects[] = {
IMX_GPIO_NR(4, 25),
};
static struct spi_imx_master spi0_pdata = {
.chipselect = spi0_chipselects,
.num_chipselect = ARRAY_SIZE(spi0_chipselects),
};
static const struct spi_board_info spi0_devices[] = {
{
.name = "mtd_dataflash",
.chip_select = 0,
.max_speed_hz = 25 * 1000 * 1000,
.bus_num = 0,
},
};
开发者ID:alllecs,项目名称:barebox,代码行数:19,代码来源:board.c
示例15: setup_spi
static void setup_spi(void)
{
#ifdef CONFIG_TARGET_ZC5202
gpio_request(IMX_GPIO_NR(5, 17), "spi_cs0");
gpio_request(IMX_GPIO_NR(5, 9), "spi_cs1");
gpio_direction_output(IMX_GPIO_NR(5, 17), 1);
gpio_direction_output(IMX_GPIO_NR(5, 9), 1);
imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));
#endif
gpio_request(IMX_GPIO_NR(3, 20), "spi4_cs0");
gpio_direction_output(IMX_GPIO_NR(3, 20), 1);
imx_iomux_v3_setup_multiple_pads(ecspi4_pads, ARRAY_SIZE(ecspi4_pads));
enable_spi_clk(true, 3);
}
开发者ID:Digilent,项目名称:u-boot-digilent,代码行数:16,代码来源:el6x.c
示例16: ov5642_io_init
/*
* GPIO_6 GPIO[1]:6 (ov5642) - J5 - CSI0 power down
* GPIO_8 GPIO[1]:8 (ov5642) - J5 - CSI0 reset
* NANDF_CS0 GPIO[6]:11 (ov5642) - J5 - reset
* SD1_DAT0 GPIO[1]:16 (ov5642) - J5 - GP
*/
static void ov5642_io_init(void)
{
IOMUX_SETUP(csi0_sensor_pads);
camera_reset(GP_CSI0_PWN, 1, GP_CSI0_RST, IMX_GPIO_NR(6, 11));
/* For MX6Q GPR1 bit19 and bit20 meaning:
* Bit19: 0 - Enable mipi to IPU1 CSI0
* virtual channel is fixed to 0
* 1 - Enable parallel interface to IPU1 CSI0
* Bit20: 0 - Enable mipi to IPU2 CSI1
* virtual channel is fixed to 3
* 1 - Enable parallel interface to IPU2 CSI1
* IPU1 CSI1 directly connect to mipi csi2,
* virtual channel is fixed to 1
* IPU2 CSI0 directly connect to mipi csi2,
* virtual channel is fixed to 2
*/
if (cpu_is_mx6q())
mxc_iomux_set_gpr_register(1, 19, 1, 1);
else
mxc_iomux_set_gpr_register(13, 0, 3, 4);
}
开发者ID:blacktigersoftware,项目名称:hummingboard-cuboxi-kernel,代码行数:28,代码来源:board-mx6_nitrogen6x.c
示例17: novena_spl_setup_iomux_enet
static void novena_spl_setup_iomux_enet(void)
{
imx_iomux_v3_setup_multiple_pads(enet_pads1, ARRAY_SIZE(enet_pads1));
/* Assert Ethernet PHY nRST */
gpio_direction_output(IMX_GPIO_NR(3, 23), 0);
/*
* Use imx6 internal pull-ups to drive PHY mode pins during PHY reset
* de-assertion. The intention is to use weak signal drivers (pull-ups)
* to prevent the conflict between PHY pins becoming outputs after
* reset and imx6 still driving the pins. The issue is described in PHY
* datasheet, p.14
*/
gpio_direction_input(IMX_GPIO_NR(6, 30)); /* PHY_AD2 = 1 */
gpio_direction_input(IMX_GPIO_NR(6, 25)); /* MODE0 = 1 */
gpio_direction_input(IMX_GPIO_NR(6, 27)); /* MODE1 = 1 */
gpio_direction_input(IMX_GPIO_NR(6, 28)); /* MODE2 = 1 */
gpio_direction_input(IMX_GPIO_NR(6, 29)); /* MODE3 = 1 */
gpio_direction_input(IMX_GPIO_NR(6, 24)); /* CLK125_EN = 1 */
/* Following reset timing (p.53, fig.8 from the PHY datasheet) */
mdelay(10);
/* De-assert Ethernet PHY nRST */
gpio_set_value(IMX_GPIO_NR(3, 23), 1);
/* PHY is now configured, connect FEC to the pads */
imx_iomux_v3_setup_multiple_pads(enet_pads2, ARRAY_SIZE(enet_pads2));
/*
* PHY datasheet recommends on p.53 to wait at least 100us after reset
* before using MII, so we enforce the delay here
*/
udelay(100);
}
开发者ID:KellyLSB,项目名称:u-boot-novena,代码行数:36,代码来源:novena_spl.c
示例18: board_mmc_init
int board_mmc_init(bd_t *bis)
{
static const iomux_v3_cfg_t sd1_pads[] = {
NEW_PAD_CTRL(MX53_PAD_SD1_CMD__ESDHC1_CMD, SD_CMD_PAD_CTRL),
NEW_PAD_CTRL(MX53_PAD_SD1_CLK__ESDHC1_CLK, SD_PAD_CTRL),
NEW_PAD_CTRL(MX53_PAD_SD1_DATA0__ESDHC1_DAT0, SD_PAD_CTRL),
NEW_PAD_CTRL(MX53_PAD_SD1_DATA1__ESDHC1_DAT1, SD_PAD_CTRL),
NEW_PAD_CTRL(MX53_PAD_SD1_DATA2__ESDHC1_DAT2, SD_PAD_CTRL),
NEW_PAD_CTRL(MX53_PAD_SD1_DATA3__ESDHC1_DAT3, SD_PAD_CTRL),
MX53_PAD_EIM_DA13__GPIO3_13,
MX53_PAD_EIM_EB3__GPIO2_31, /* SD power */
};
esdhc_cfg.sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
imx_iomux_v3_setup_multiple_pads(sd1_pads, ARRAY_SIZE(sd1_pads));
/* GPIO 2_31 is SD power */
gpio_direction_output(IMX_GPIO_NR(2, 31), 0);
return fsl_esdhc_initialize(bis, &esdhc_cfg);
}
开发者ID:13xiaobang,项目名称:mini2440-uboot_2016.01,代码行数:23,代码来源:m53evk.c
示例19: GPMI_PAD_CTRL0
PAD_CTL_PUS_22K_UP | PAD_CTL_DSE_40ohm)
#define GPMI_PAD_CTRL0 (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP)
#define GPMI_PAD_CTRL1 (PAD_CTL_DSE_40ohm | PAD_CTL_SPEED_MED | \
PAD_CTL_SRE_FAST)
#define GPMI_PAD_CTRL2 (GPMI_PAD_CTRL0 | GPMI_PAD_CTRL1)
#ifdef CONFIG_SYS_I2C_MXC
#define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
/* I2C2 for PMIC */
struct i2c_pads_info i2c_pad_info2 = {
.scl = {
.i2c_mode = MX6SX_PAD_GPIO1_IO02__I2C2_SCL | PC,
.gpio_mode = MX6SX_PAD_GPIO1_IO02__GPIO1_IO_2 | PC,
.gp = IMX_GPIO_NR(1, 2),
},
.sda = {
.i2c_mode = MX6SX_PAD_GPIO1_IO03__I2C2_SDA | PC,
.gpio_mode = MX6SX_PAD_GPIO1_IO03__GPIO1_IO_3 | PC,
.gp = IMX_GPIO_NR(1, 3),
},
};
/* I2C3 */
struct i2c_pads_info i2c_pad_info3 = {
.scl = {
.i2c_mode = MX6SX_PAD_KEY_COL4__I2C3_SCL | PC,
.gpio_mode = MX6SX_PAD_KEY_COL4__GPIO2_IO_14 | PC,
.gp = IMX_GPIO_NR(2, 14),
},
开发者ID:huhuikevin,项目名称:fsluboot,代码行数:31,代码来源:mx6sxsabreauto.c
示例20: gpio_direction_output
gpio_direction_output(IOX_STCP, 0);
udelay(500);
/*
* shift register will be output to pins
*/
gpio_direction_output(IOX_STCP, 1);
};
#ifdef CONFIG_SYS_I2C_MXC
#define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
/* I2C1 for PMIC and EEPROM */
static struct i2c_pads_info i2c_pad_info1 = {
.scl = {
.i2c_mode = MX6_PAD_UART4_TX_DATA__I2C1_SCL | PC,
.gpio_mode = MX6_PAD_UART4_TX_DATA__GPIO1_IO28 | PC,
.gp = IMX_GPIO_NR(1, 28),
},
.sda = {
.i2c_mode = MX6_PAD_UART4_RX_DATA__I2C1_SDA | PC,
.gpio_mode = MX6_PAD_UART4_RX_DATA__GPIO1_IO29 | PC,
.gp = IMX_GPIO_NR(1, 29),
},
};
#ifdef CONFIG_POWER
#define I2C_PMIC 0
int power_init_board(void)
{
if (is_mx6ul_9x9_evk()) {
struct pmic *pfuze;
int ret;
开发者ID:OpenPhoenux,项目名称:gta04-uboot,代码行数:31,代码来源:mx6ul_14x14_evk.c
注:本文中的IMX_GPIO_NR函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论