|
AM335X 的GPMC怎么接多个设备,GPIB谁用过
[复制链接]
最近公司做的一个电源设备,要做成LXI设备,支持GPIB,USB和LAN,LAN已经解决了,USB有现成的,GPIB初步打算使用TNT882或NAT9914,在网上找到了很多51驱动这两个芯片的资料,直接用IO口模拟时序,但我们使用的主控是TI AM335X,可以把TNT882或NAT9914接到AM335X的GPMC上,现在GPMC已经接了NAND,如果再接上NAT9914 CS和中断脚不同,其他脚都和NAND复用,但驱动要怎么修改呢?附上NAND驱动的入口
- static void evm_nand_init(int evm_id, int profile)
- {
- struct omap_nand_platform_data *pdata;
- struct gpmc_devices_info gpmc_device[2] = {
- { NULL, 0 },
- { NULL, 0 },
- };
- setup_pin_mux(nand_pin_mux);
- pdata = omap_nand_init(am335x_nand_partitions,
- ARRAY_SIZE(am335x_nand_partitions), 0, 0,
- &am335x_nand_timings);
- if (!pdata)
- return;
- pdata->ecc_opt =OMAP_ECC_BCH8_CODE_HW;
- pdata->elm_used = true;
- gpmc_device[0].pdata = pdata;
- gpmc_device[0].flag = GPMC_DEVICE_NAND;
- omap_init_gpmc(gpmc_device, sizeof(gpmc_device));
- omap_init_elm();
- }
复制代码
- /* Pin mux for nand flash module */
- static struct pinmux_config nand_pin_mux[] = {
- {"gpmc_ad0.gpmc_ad0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
- {"gpmc_ad1.gpmc_ad1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
- {"gpmc_ad2.gpmc_ad2", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
- {"gpmc_ad3.gpmc_ad3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
- {"gpmc_ad4.gpmc_ad4", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
- {"gpmc_ad5.gpmc_ad5", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
- {"gpmc_ad6.gpmc_ad6", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
- {"gpmc_ad7.gpmc_ad7", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
- {"gpmc_wait0.gpmc_wait0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
- {"gpmc_wpn.gpmc_wpn", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP},
- {"gpmc_csn0.gpmc_csn0", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
- {"gpmc_advn_ale.gpmc_advn_ale", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
- {"gpmc_oen_ren.gpmc_oen_ren", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
- {"gpmc_wen.gpmc_wen", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
- {"gpmc_ben0_cle.gpmc_ben0_cle", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
- {NULL, 0},
- };
复制代码
|
|