Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-29-2013, 02:14 AM   #1
Registered: Mar 2013
Posts: 65

Rep: Reputation: Disabled
How to create driver for EEPROM (AT25256A) using SPI interface with LPC3250

I am working on ARM9 based LPC3250 controller with kernel version 2.6.34 using FDI3250 board. In my board LPC3250 has interfaced with EEPROM (AT25256A) using SPI protocol.
I want to make driver for slave and want to perform read and write operations from EEPROM. For that i have made below changes in kernel

1.changes done in kernel menuconfig for SPI driver are:

Enabled device drivers -> misc devices -> EEPROM support -> SPI EEPROM from most vendors

2.Added slave registration on board file

/* AT25 driver registration */
static int __init fdi3250_spi_devices_register(void)
static struct spi_board_info info[] = {
.modalias = "spidev",
.max_speed_hz = 5000000,
.bus_num = 0,
.chip_select = 0,
.controller_data = &spi0_chip_info,

static struct spi_eeprom eeprom = {
.name = "at25256a",
.byte_len = 0x8000,
.page_size = 64,
.flags = EE_ADDR2,

static struct spi_board_info info[] = {
.modalias = "at25",
.max_speed_hz = 5000000,
.bus_num = 0,
.chip_select = 0,
.platform_data = &eeprom,
.controller_data = &spi0_chip_info,
return spi_register_board_info(info, ARRAY_SIZE(info));

Then i have ported the uImage in kernel and after kernel booting i mount the sysfs using below commands

mkdir /sys
mount -t sysfs sysfs sys

After that i found that EEPROM folder has not created at below path

From the observations what i have to conclude? is driver installed successfully or not?
If not installed what other changes i have do to make install?
If installed then what could be the other problems?

Please help me.

Thanks & Regards,


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SPI interface in mpc83xx NishaK Linux - Kernel 5 02-28-2013 05:49 AM
SPI bus for upgrading EEprom ravi_chobey Linux - Embedded & Single-board computer 1 11-08-2012 06:59 PM
Can i register a ssc driver (a serial interface device) to be a spi driver ? 5883 Programming 0 03-04-2012 06:14 PM
SPI interface with AT91SAM9261 sunr2007 Linux - Embedded & Single-board computer 0 08-03-2009 03:43 AM
TV card, no sound, eeprom invalid, no eeprom present (err=-121) cncman Linux - Hardware 1 08-05-2006 07:24 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration