I am trying to connect NAND Flash to BeagleBone without daugter board. I connect flash to gpmc, but linux and u-boot doesn't see flash.
I chandged linux kernel arch/arm/mach-omap2/board-am335xevm.c:
/* Make some additions to configs */ /* Beaglebone Rev A3 and after */ static struct evm_dev_cfg beaglebone_dev_cfg[] = { {tps65217_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {ehrpwm_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {uart1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {gpio_led_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {evm_nand_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {NULL, 0, 0}, };
and u-boot board/ti/am335x/muc.c
static struct evm_pin_mux beaglebone_pin_mux[] = { {uart0_pin_mux, PROFILE_ALL, DEV_ON_BASEBOARD}, {i2c1_pin_mux, PROFILE_ALL & ~PROFILE_2 & ~PROFILE_4, DEV_ON_BASEBOARD}, //#ifdef CONFIG_NAND {nand_pin_mux, PROFILE_ALL /*& ~PROFILE_2 & ~PROFILE_3*/, DEV_ON_BASEBOARD}, //#endif #ifndef CONFIG_NO_ETH {mii1_pin_mux, PROFILE_ALL, DEV_ON_BASEBOARD}, #endif #ifdef CONFIG_MMC {mmc0_pin_mux, PROFILE_ALL, DEV_ON_BASEBOARD}, //{mmc1_pin_mux, PROFILE_ALL, DEV_ON_BASEBOARD}, /* Иначе инициал. перекрывает пины NAND */ #endif #ifdef CONFIG_SPI {spi0_pin_mux, PROFILE_2, DEV_ON_DGHTR_BRD}, #endif {0}, };
now u-boot and linux 'see' nand flash. But when i try to read data from flash error occurs...
u-boot writes some think like than:
when boot:
"Error: Bad compare! failed"
or when i try to read data
"NAND read from offset 260000 failed -74"
in Linux always writes ECC: correction... whats wrong?!