Path: blob/master/arch/blackfin/mach-bf533/boards/stamp.c
15126 views
/*1* Copyright 2004-2009 Analog Devices Inc.2* 2005 National ICT Australia (NICTA)3* Aidan Williams <[email protected]>4*5* Licensed under the GPL-2 or later.6*/78#include <linux/device.h>9#include <linux/platform_device.h>10#include <linux/mtd/mtd.h>11#include <linux/mtd/partitions.h>12#include <linux/mtd/physmap.h>13#include <linux/spi/spi.h>14#include <linux/spi/flash.h>15#include <linux/spi/mmc_spi.h>16#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)17#include <linux/usb/isp1362.h>18#endif19#include <linux/irq.h>20#include <linux/i2c.h>21#include <asm/dma.h>22#include <asm/bfin5xx_spi.h>23#include <asm/reboot.h>24#include <asm/portmux.h>25#include <asm/dpmc.h>2627/*28* Name the Board for the /proc/cpuinfo29*/30const char bfin_board_name[] = "ADI BF533-STAMP";3132#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)33static struct platform_device rtc_device = {34.name = "rtc-bfin",35.id = -1,36};37#endif3839/*40* Driver needs to know address, irq and flag pin.41*/42#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)43#include <linux/smc91x.h>4445static struct smc91x_platdata smc91x_info = {46.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,47.leda = RPC_LED_100_10,48.ledb = RPC_LED_TX_RX,49};5051static struct resource smc91x_resources[] = {52{53.name = "smc91x-regs",54.start = 0x20300300,55.end = 0x20300300 + 16,56.flags = IORESOURCE_MEM,57}, {58.start = IRQ_PF7,59.end = IRQ_PF7,60.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,61},62};6364static struct platform_device smc91x_device = {65.name = "smc91x",66.id = 0,67.num_resources = ARRAY_SIZE(smc91x_resources),68.resource = smc91x_resources,69.dev = {70.platform_data = &smc91x_info,71},72};73#endif7475#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)76static struct resource net2272_bfin_resources[] = {77{78.start = 0x20300000,79.end = 0x20300000 + 0x100,80.flags = IORESOURCE_MEM,81}, {82.start = IRQ_PF10,83.end = IRQ_PF10,84.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,85},86};8788static struct platform_device net2272_bfin_device = {89.name = "net2272",90.id = -1,91.num_resources = ARRAY_SIZE(net2272_bfin_resources),92.resource = net2272_bfin_resources,93};94#endif9596#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE)97static struct mtd_partition stamp_partitions[] = {98{99.name = "bootloader(nor)",100.size = 0x40000,101.offset = 0,102}, {103.name = "linux kernel(nor)",104.size = 0x180000,105.offset = MTDPART_OFS_APPEND,106}, {107.name = "file system(nor)",108.size = MTDPART_SIZ_FULL,109.offset = MTDPART_OFS_APPEND,110}111};112113static struct physmap_flash_data stamp_flash_data = {114.width = 2,115.parts = stamp_partitions,116.nr_parts = ARRAY_SIZE(stamp_partitions),117};118119static struct resource stamp_flash_resource[] = {120{121.name = "cfi_probe",122.start = 0x20000000,123.end = 0x203fffff,124.flags = IORESOURCE_MEM,125}, {126.start = 0x7BB07BB0, /* AMBCTL0 setting when accessing flash */127.end = 0x7BB07BB0, /* AMBCTL1 setting when accessing flash */128.flags = IORESOURCE_MEM,129}, {130.start = GPIO_PF0,131.flags = IORESOURCE_IRQ,132}133};134135static struct platform_device stamp_flash_device = {136.name = "bfin-async-flash",137.id = 0,138.dev = {139.platform_data = &stamp_flash_data,140},141.num_resources = ARRAY_SIZE(stamp_flash_resource),142.resource = stamp_flash_resource,143};144#endif145146#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)147static struct mtd_partition bfin_spi_flash_partitions[] = {148{149.name = "bootloader(spi)",150.size = 0x00040000,151.offset = 0,152.mask_flags = MTD_CAP_ROM153}, {154.name = "linux kernel(spi)",155.size = 0x180000,156.offset = MTDPART_OFS_APPEND,157}, {158.name = "file system(spi)",159.size = MTDPART_SIZ_FULL,160.offset = MTDPART_OFS_APPEND,161}162};163164static struct flash_platform_data bfin_spi_flash_data = {165.name = "m25p80",166.parts = bfin_spi_flash_partitions,167.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),168.type = "m25p64",169};170171/* SPI flash chip (m25p64) */172static struct bfin5xx_spi_chip spi_flash_chip_info = {173.enable_dma = 0, /* use dma transfer with this chip*/174.bits_per_word = 8,175};176#endif177178#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)179/* SPI ADC chip */180static struct bfin5xx_spi_chip spi_adc_chip_info = {181.enable_dma = 1, /* use dma transfer with this chip*/182.bits_per_word = 16,183};184#endif185186#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)187static struct bfin5xx_spi_chip ad1836_spi_chip_info = {188.enable_dma = 0,189.bits_per_word = 16,190};191#endif192193#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)194static struct bfin5xx_spi_chip spidev_chip_info = {195.enable_dma = 0,196.bits_per_word = 8,197};198#endif199200#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)201#define MMC_SPI_CARD_DETECT_INT IRQ_PF5202static int bfin_mmc_spi_init(struct device *dev,203irqreturn_t (*detect_int)(int, void *), void *data)204{205return request_irq(MMC_SPI_CARD_DETECT_INT, detect_int,206IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,207"mmc-spi-detect", data);208}209210static void bfin_mmc_spi_exit(struct device *dev, void *data)211{212free_irq(MMC_SPI_CARD_DETECT_INT, data);213}214215static struct mmc_spi_platform_data bfin_mmc_spi_pdata = {216.init = bfin_mmc_spi_init,217.exit = bfin_mmc_spi_exit,218.detect_delay = 100, /* msecs */219};220221static struct bfin5xx_spi_chip mmc_spi_chip_info = {222.enable_dma = 0,223.bits_per_word = 8,224.pio_interrupt = 0,225};226#endif227228static struct spi_board_info bfin_spi_board_info[] __initdata = {229#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)230{231/* the modalias must be the same as spi device driver name */232.modalias = "m25p80", /* Name of spi_driver for this device */233.max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */234.bus_num = 0, /* Framework bus number */235.chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL2*/236.platform_data = &bfin_spi_flash_data,237.controller_data = &spi_flash_chip_info,238.mode = SPI_MODE_3,239},240#endif241242#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)243{244.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */245.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */246.bus_num = 0, /* Framework bus number */247.chip_select = 1, /* Framework chip select. */248.platform_data = NULL, /* No spi_driver specific config */249.controller_data = &spi_adc_chip_info,250},251#endif252253#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)254{255.modalias = "ad183x",256.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */257.bus_num = 0,258.chip_select = 4,259.platform_data = "ad1836", /* only includes chip name for the moment */260.controller_data = &ad1836_spi_chip_info,261.mode = SPI_MODE_3,262},263#endif264265#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)266{267.modalias = "spidev",268.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */269.bus_num = 0,270.chip_select = 1,271.controller_data = &spidev_chip_info,272},273#endif274#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)275{276.modalias = "mmc_spi",277.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */278.bus_num = 0,279.chip_select = 4,280.platform_data = &bfin_mmc_spi_pdata,281.controller_data = &mmc_spi_chip_info,282.mode = SPI_MODE_3,283},284#endif285};286287#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)288/* SPI (0) */289static struct resource bfin_spi0_resource[] = {290[0] = {291.start = SPI0_REGBASE,292.end = SPI0_REGBASE + 0xFF,293.flags = IORESOURCE_MEM,294},295[1] = {296.start = CH_SPI,297.end = CH_SPI,298.flags = IORESOURCE_DMA,299},300[2] = {301.start = IRQ_SPI,302.end = IRQ_SPI,303.flags = IORESOURCE_IRQ,304}305};306307/* SPI controller data */308static struct bfin5xx_spi_master bfin_spi0_info = {309.num_chipselect = 8,310.enable_dma = 1, /* master has the ability to do dma transfer */311.pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},312};313314static struct platform_device bfin_spi0_device = {315.name = "bfin-spi",316.id = 0, /* Bus number */317.num_resources = ARRAY_SIZE(bfin_spi0_resource),318.resource = bfin_spi0_resource,319.dev = {320.platform_data = &bfin_spi0_info, /* Passed to driver */321},322};323#endif /* spi master and devices */324325#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)326#ifdef CONFIG_SERIAL_BFIN_UART0327static struct resource bfin_uart0_resources[] = {328{329.start = BFIN_UART_THR,330.end = BFIN_UART_GCTL+2,331.flags = IORESOURCE_MEM,332},333{334.start = IRQ_UART0_RX,335.end = IRQ_UART0_RX + 1,336.flags = IORESOURCE_IRQ,337},338{339.start = IRQ_UART0_ERROR,340.end = IRQ_UART0_ERROR,341.flags = IORESOURCE_IRQ,342},343{344.start = CH_UART0_TX,345.end = CH_UART0_TX,346.flags = IORESOURCE_DMA,347},348{349.start = CH_UART0_RX,350.end = CH_UART0_RX,351.flags = IORESOURCE_DMA,352},353};354355static unsigned short bfin_uart0_peripherals[] = {356P_UART0_TX, P_UART0_RX, 0357};358359static struct platform_device bfin_uart0_device = {360.name = "bfin-uart",361.id = 0,362.num_resources = ARRAY_SIZE(bfin_uart0_resources),363.resource = bfin_uart0_resources,364.dev = {365.platform_data = &bfin_uart0_peripherals, /* Passed to driver */366},367};368#endif369#endif370371#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)372#ifdef CONFIG_BFIN_SIR0373static struct resource bfin_sir0_resources[] = {374{375.start = 0xFFC00400,376.end = 0xFFC004FF,377.flags = IORESOURCE_MEM,378},379{380.start = IRQ_UART0_RX,381.end = IRQ_UART0_RX+1,382.flags = IORESOURCE_IRQ,383},384{385.start = CH_UART0_RX,386.end = CH_UART0_RX+1,387.flags = IORESOURCE_DMA,388},389};390391static struct platform_device bfin_sir0_device = {392.name = "bfin_sir",393.id = 0,394.num_resources = ARRAY_SIZE(bfin_sir0_resources),395.resource = bfin_sir0_resources,396};397#endif398#endif399400#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)401#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART402static struct resource bfin_sport0_uart_resources[] = {403{404.start = SPORT0_TCR1,405.end = SPORT0_MRCS3+4,406.flags = IORESOURCE_MEM,407},408{409.start = IRQ_SPORT0_RX,410.end = IRQ_SPORT0_RX+1,411.flags = IORESOURCE_IRQ,412},413{414.start = IRQ_SPORT0_ERROR,415.end = IRQ_SPORT0_ERROR,416.flags = IORESOURCE_IRQ,417},418};419420static unsigned short bfin_sport0_peripherals[] = {421P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,422P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0423};424425static struct platform_device bfin_sport0_uart_device = {426.name = "bfin-sport-uart",427.id = 0,428.num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),429.resource = bfin_sport0_uart_resources,430.dev = {431.platform_data = &bfin_sport0_peripherals, /* Passed to driver */432},433};434#endif435#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART436static struct resource bfin_sport1_uart_resources[] = {437{438.start = SPORT1_TCR1,439.end = SPORT1_MRCS3+4,440.flags = IORESOURCE_MEM,441},442{443.start = IRQ_SPORT1_RX,444.end = IRQ_SPORT1_RX+1,445.flags = IORESOURCE_IRQ,446},447{448.start = IRQ_SPORT1_ERROR,449.end = IRQ_SPORT1_ERROR,450.flags = IORESOURCE_IRQ,451},452};453454static unsigned short bfin_sport1_peripherals[] = {455P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,456P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0457};458459static struct platform_device bfin_sport1_uart_device = {460.name = "bfin-sport-uart",461.id = 1,462.num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),463.resource = bfin_sport1_uart_resources,464.dev = {465.platform_data = &bfin_sport1_peripherals, /* Passed to driver */466},467};468#endif469#endif470471#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)472#include <linux/input.h>473#include <linux/gpio_keys.h>474475static struct gpio_keys_button bfin_gpio_keys_table[] = {476{BTN_0, GPIO_PF5, 0, "gpio-keys: BTN0"},477{BTN_1, GPIO_PF6, 0, "gpio-keys: BTN1"},478{BTN_2, GPIO_PF8, 0, "gpio-keys: BTN2"},479};480481static struct gpio_keys_platform_data bfin_gpio_keys_data = {482.buttons = bfin_gpio_keys_table,483.nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),484};485486static struct platform_device bfin_device_gpiokeys = {487.name = "gpio-keys",488.dev = {489.platform_data = &bfin_gpio_keys_data,490},491};492#endif493494#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)495#include <linux/i2c-gpio.h>496497static struct i2c_gpio_platform_data i2c_gpio_data = {498.sda_pin = GPIO_PF2,499.scl_pin = GPIO_PF3,500.sda_is_open_drain = 0,501.scl_is_open_drain = 0,502.udelay = 40,503};504505static struct platform_device i2c_gpio_device = {506.name = "i2c-gpio",507.id = 0,508.dev = {509.platform_data = &i2c_gpio_data,510},511};512#endif513514static struct i2c_board_info __initdata bfin_i2c_board_info[] = {515#if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE)516{517I2C_BOARD_INFO("ad7142_joystick", 0x2C),518.irq = 39,519},520#endif521#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)522{523I2C_BOARD_INFO("pcf8574_lcd", 0x22),524},525#endif526#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)527{528I2C_BOARD_INFO("pcf8574_keypad", 0x27),529.irq = 39,530},531#endif532#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)533{534I2C_BOARD_INFO("bfin-adv7393", 0x2B),535},536#endif537#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)538{539I2C_BOARD_INFO("ad5252", 0x2f),540},541#endif542};543544static const unsigned int cclk_vlev_datasheet[] =545{546VRPAIR(VLEV_085, 250000000),547VRPAIR(VLEV_090, 376000000),548VRPAIR(VLEV_095, 426000000),549VRPAIR(VLEV_100, 426000000),550VRPAIR(VLEV_105, 476000000),551VRPAIR(VLEV_110, 476000000),552VRPAIR(VLEV_115, 476000000),553VRPAIR(VLEV_120, 600000000),554VRPAIR(VLEV_125, 600000000),555VRPAIR(VLEV_130, 600000000),556};557558static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {559.tuple_tab = cclk_vlev_datasheet,560.tabsize = ARRAY_SIZE(cclk_vlev_datasheet),561.vr_settling_time = 25 /* us */,562};563564static struct platform_device bfin_dpmc = {565.name = "bfin dpmc",566.dev = {567.platform_data = &bfin_dmpc_vreg_data,568},569};570571#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)572static struct platform_device bfin_i2s = {573.name = "bfin-i2s",574.id = CONFIG_SND_BF5XX_SPORT_NUM,575/* TODO: add platform data here */576};577#endif578579#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)580static struct platform_device bfin_tdm = {581.name = "bfin-tdm",582.id = CONFIG_SND_BF5XX_SPORT_NUM,583/* TODO: add platform data here */584};585#endif586587#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)588static struct platform_device bfin_ac97 = {589.name = "bfin-ac97",590.id = CONFIG_SND_BF5XX_SPORT_NUM,591/* TODO: add platform data here */592};593#endif594595static struct platform_device *stamp_devices[] __initdata = {596597&bfin_dpmc,598599#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)600&rtc_device,601#endif602603#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)604&smc91x_device,605#endif606607#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)608&net2272_bfin_device,609#endif610611#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)612&bfin_spi0_device,613#endif614615#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)616#ifdef CONFIG_SERIAL_BFIN_UART0617&bfin_uart0_device,618#endif619#endif620621#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)622#ifdef CONFIG_BFIN_SIR0623&bfin_sir0_device,624#endif625#endif626627#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)628#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART629&bfin_sport0_uart_device,630#endif631#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART632&bfin_sport1_uart_device,633#endif634#endif635636#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)637&bfin_device_gpiokeys,638#endif639640#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)641&i2c_gpio_device,642#endif643644#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE)645&stamp_flash_device,646#endif647648#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)649&bfin_i2s,650#endif651652#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)653&bfin_tdm,654#endif655656#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)657&bfin_ac97,658#endif659};660661static int __init stamp_init(void)662{663int ret;664665printk(KERN_INFO "%s(): registering device resources\n", __func__);666667i2c_register_board_info(0, bfin_i2c_board_info,668ARRAY_SIZE(bfin_i2c_board_info));669670ret = platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));671if (ret < 0)672return ret;673674#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)675/*676* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC.677* the bfin-async-map driver takes care of flipping between678* flash and ethernet when necessary.679*/680ret = gpio_request(GPIO_PF0, "enet_cpld");681if (!ret) {682gpio_direction_output(GPIO_PF0, 1);683gpio_free(GPIO_PF0);684}685#endif686687spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));688return 0;689}690691arch_initcall(stamp_init);692693static struct platform_device *stamp_early_devices[] __initdata = {694#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)695#ifdef CONFIG_SERIAL_BFIN_UART0696&bfin_uart0_device,697#endif698#endif699700#if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)701#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART702&bfin_sport0_uart_device,703#endif704#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART705&bfin_sport1_uart_device,706#endif707#endif708};709710void __init native_machine_early_platform_add_devices(void)711{712printk(KERN_INFO "register early platform devices\n");713early_platform_add_devices(stamp_early_devices,714ARRAY_SIZE(stamp_early_devices));715}716717void native_machine_restart(char *cmd)718{719/* workaround pull up on cpld / flash pin not being strong enough */720gpio_request(GPIO_PF0, "flash_cpld");721gpio_direction_output(GPIO_PF0, 0);722}723724725