[U-Boot-Users] [OT] cs8900 in u-boot

Hi,
this is somewhat offtopic, but I know no better place to ask. I'm trying to make the cs8900 ethernet chip on the Cogent CSB226 work with u-boot and Linux. The chip is mapped to 0x08000000 / CS2 and it is connected in I/O mapped mode.
However, I do not see anything usefull in u-boot. This is how the port area looks after power on:
uboot> md.w 0x08000000 10 (1) (2) (3) 08000000: 0000 a1ff 0000 a1ff 0009 a1ff 0000 a1ff ................ 08000010: 0000 a1ff 3136 a1ff 00d6 a1ff 00d6 a1ff ....61..........
I would have expected the cs8900's magic number (0x0e62 00[03|05]) in the data registers (2),(3). However, when I write 0 to the Packet Page Pointer Port (1) to select register 0:
uboot> md.w 0x08000000 10 08000000: 0000 a1ff 0000 a1ff 3109 a1ff 0000 a1ff .........1...... 08000010: 0000 a1ff 3136 a1ff 00d6 a1ff 00d6 a1ff ....61..........
this is still not what I would have expected. It's especially strange that every second register contains 0xa1ff.
Did anybody else see something different? Is the u-boot driver working for anyone?
Cheers, Robert

On Mon, 2003-04-07 at 07:00, Robert Schwebel wrote:
Hi,
this is somewhat offtopic, but I know no better place to ask. I'm trying to make the cs8900 ethernet chip on the Cogent CSB226 work with u-boot and Linux. The chip is mapped to 0x08000000 / CS2 and it is connected in I/O mapped mode.
However, I do not see anything usefull in u-boot. This is how the port area looks after power on:
uboot> md.w 0x08000000 10 (1) (2) (3) 08000000: 0000 a1ff 0000 a1ff 0009 a1ff 0000 a1ff ................ 08000010: 0000 a1ff 3136 a1ff 00d6 a1ff 00d6 a1ff ....61..........
This almost looks like accessing a 16bit device with a 32bit CS, and so getting (the same) junk on the first 16bit for every read.
- Erwin
Cheers, Robert

In message 20030407050056.GL10694@pengutronix.de you wrote:
this is somewhat offtopic, but I know no better place to ask. I'm trying to make the cs8900 ethernet chip on the Cogent CSB226 work with u-boot and Linux. The chip is mapped to 0x08000000 / CS2 and it is connected in I/O mapped mode.
...
Did anybody else see something different? Is the u-boot driver working for anyone?
The driver is working fine for us on SMD2400, SMDK2410 and TRAB systems.
Best regards,
Wolfgang Denk

Hi Robert,
Because cs8900 is mostly ISA-oriented design, its connection is always a little cludgy and can be done in a number of different ways. I am not familiar with CSB226, but if you have a relevant piece of its schematics it could help. Also, the power-up configuration for cs8900 can be stored in serial EPROM. This includes the base address. Cirrus Logic has a very good application note (AN83) describing all this.
Robert Schwebel wrote:
However, I do not see anything usefull in u-boot. This is how the port area looks after power on:
uboot> md.w 0x08000000 10 (1) (2) (3) 08000000: 0000 a1ff 0000 a1ff 0009 a1ff 0000 a1ff ................ 08000010: 0000 a1ff 3136 a1ff 00d6 a1ff 00d6 a1ff ....61..........
By default cs8900 powers up responding to IO accesses to port 0x300. Thus, its real base address is probably 0x08000300 in your system. IO port accesses are emulated by connecting your CS and WE to IOR and IOW signals appropriately. Memory accesses may or maynot be possible depending on the schematics.
Also, make sure you configure your CS2 as 16-bit port. Another thing to watch for is byte swapping. What I saw when using cs8900 with MC68EZ328 is that when you connect the data bus straight, then registers are fine, but the buffer area bytes are swapped. We chose to do byte swapping on the data bus, but had to modify the driver to byte-swap register values.
Hope this helps a little. You can point me to schematics, we could figure out a little bit more.
Best regards, Vladimir
participants (4)
-
Erwin Rol
-
Robert Schwebel
-
Vladimir Gurevich
-
Wolfgang Denk