Flameman/fonera

= fonera.2100-Flameman =

Note
Apologize for the poor status of this ewiki, I am developing for this board, so the wiki page will be improved and completed as soon as it it will be possible

feel free to contact me (see the contact below) in case you need support.

Introduction
Tiny computers are gradually becoming better and more useful. I think this trend is positively correlated with the manufacturers' decision to use *nix (when that's true). Fonera2100 uses kerenl2.4, a carefully designed, lightweight FON, which is derived from openWRT distribution, that tries to squeeze as much performance as possible into the smallest storage footprint. In this project will be used gentoo disto running on a full 2.6 kernel

The Target-goal of this page is
 * install uc-gentoo into mmc-sd
 * develop devices
 * make the board able to boot it
 * optimize uc-gentoo for embedded
 * produce a uc-gentoo-uclibc
 * add framebuffer and touch screen support
 * re-target all the project into "tiny PDA"

status @ 15-02-2009 ucgentoo boots from the mmc with root=/dev/mmc3

status @ 05-05-2009 spi display and spi touchscreen are working progress. the mmc_over_gpio is pretty running better performance bugs less.

People you could contact if you need help

 * flameman, i'm currently use this board for a project, email
 * msn daredevil-coder@hotmail.it
 * email flamemaniii@gmail.com
 * irc.nick flameman (channel #edev, #gentoo-mips, #openwrt)
 * you ... if you want ;-)

About this project
embedded target

Overview
The board (palm m105) consists of:


 * CPU : Atheros AR531X_COBRA - MIPS 4KEc V6.4 @ 183.50 mhz, that means Atheros 5312/2312+, that is mips32 core, [[Media:mips32-core.pdf|mips32-core.pdf]]
 * RAM soldered 16MB, Hynix hy57v281620etp-h [[Media:fonera2100-dram.pdf|fonera2100-dram.pdf]]
 * LAN Altima AC101 Auto-MDI(X) 10/100Mbit/sec
 * CWIFI RP-SMA (Reverse SMA), 2dBi areal
 * UART RS232
 * FLASH ST M25P64T-H-25P64V6P-MYS636 spi 8MB [[Media:fonera2100-flash.pdf|fonera2100-flash.pdf]]
 * POWER system=3.3V, feeder={5V DC, 2.0A}, 4 Watt
 * System PCB 93.5 mm x 25.5 mm x 70 mm
 * RTC the real time clock chip is provided by the cpu


 * CPU_TYPE   MIPS32 Release 1
 * SYSTEM_TYPE Atheros 5312/2312+
 * Defined at arch/mips/atheros: ATHEROS

Memory Locations
memory map of the board will be added as soon as possible

Open questions -- ...

other good hw
miniPCI:


 * Router Board: http://www.routerboard.com/rb500.html
 * Soekris: http://www.soekris.com/
 * Microtik http://www.mikrotik.com/
 * Wrap http://www.pcengines.ch/wrap.htm (FUORI PRODUZIONE)
 * Alix http://www.pcengines.ch/alix.htm
 * Magic Box http://www.magicbox.pl/

The heat problem
Heat in electronics mostly comes from dropping voltage by converting current into it, in our case, the voltage regulator in the Fonera drops 5V to 3.3V at 500mA, resulting in the dissipation of 850mW. That’s right, we are dumping 850mW right into the atmosphere in the form of heat.



You can have an idea of the temperature by a very cool thermographs - much nicer than my rather rudimentary method. You can also measure the temperature of the Fonera using a thermocouple connected to a Fluke 123 Scopemeter via an 80TK thermocouple module. The thermocouple was placed in between the heatsink and RF shield, the case closed, and the Fonera powered, as can be seen in the up picture



Images of the board




Uart


3.3V<--->5V, http://www.robot-italy.com/product_info.php?products_id=917

MMC/SD
about MMC/SD http://www.sandisk.com/oem/manuals.asp

It would be nice to be able to attach a MMC/SD Card to the LaFonera.2100 for bootstrap & storage.

MMC_spi_over_gpio driver for the LaFonera.2100
I develop a specific kernel module for kernel-2.6.26. It handles the card at 300Kbyte/sec.

mmc_spi_over_gpio tristate "mmc_spi_over_gpio MMC/SD card over SPI over GPIO support" Support for driving an MMC/SD card over GPIO pins via SPI.

A beta MMC Driver for kernel 2.6 is now available: It uses gpio bitbanging, the code is currently being reworked a bit to make it look nicer.

* seg fault on hotplug * limit to 512Mb of 2Gb -- quite fixed * issue detecting the total amount of bytes of the MMC -- under fixage
 * Known issues: (version 0.1 for fonera.2100)

Actually (15-02-2009) the driver runs stable, as long as you do not insert or remove the card while the driver is loaded. I am testing a sandisk-2Gb mmc

* [*] BUGS * * it seems there are limit in order to map all the device addresses * encounter a problem with my 2GB SD card: * mmc : MMC/SC * mmc : Card Found * mmc : card in op mode * mmc : SIZE : 231, nMUL : 6, COUNT : 3900, NAME : SD * mmc : Card Initialised * mmc : The inserted card has a capacity of 511.180.800 Bytes * mmc : adding disk * mmc: mmc1 mmc2 * mmc : Card was Found * * 487,5MB and not ~2GB as expected. * concerning large SD card suppport (>= approx. 1GB ) * registers differ a bit on cards with higher capacity. * * fixed to read/write 2Gb with a brute force patch *

fonera2100 GPIO mapping
Detailed: sw* means the connector on the fonera.2100 near the RJ45 GPIO	       Pin on LaFonera.2100 0		TP3 (test point on the back of the board) 1		pin 5 of SW1 2		WLAN LED 3		pin 1 of SW1 4		pin 2 of SW1 5		RESET (!) 6		RESET button 7		pin 6 of SW1

Hack: Solder the sd-card
SD Card     -   Fonera DO (pin 7)          SW1 CLK (pin 5)         SW2 DI (pin 2)          SW5 CS (pin 1)          SW6 Gnd (pin 3)         Gnd Vcc (pin 4)         Vcc

*     MMC/SD *     -- * *         9  1  2  3  4  5  6  7  8 *         --  SD card pin view *       /   [] [] [] [] [] [] []|| | *       | []                        | *       |                           | *       |                           | *       |                           | *       |                           | *       |                           | * *       Pin 8 and 9 stay not connected. * *        |  1  |  |  |  |  |  | |      CS      Chip select *        |     2  |  |  |  |  | |      DI      Data in *         |        3  |  |  |  | |      GND     Ground *        |           4  |  |  | |      VDD     Power *        |              5  |  | |      CLK     Clock *        |                 6  | |      GND     Ground *        |                    7 |      DO      Data out *        |                      8              Unused *        9                                     Unused *

* MMC-SD          fonera *  -- *    9 nc *    1 CS           GPIO.7 *   2 DI           GPIO.1 *   3 GND *   4 VDD          +3,3v *   5 CLK          GPIO.4 *   6 GND *   7 DO           GPIO.3 *   8 nc * * *     ____________ *     | *     |  port RJ45 *    |____________ *     | *     | **. *     | .  1 <- GPIO.3 > MMC/SD.DO *     |. 2 <- GPIO.4 > MMC/SD.CLK *    | .  3 *     | .  4 *     | .  5 <- GPIO.1 > MMC/SD.DI *     |. 6 <- GPIO.7 > MMC/SD.CS *    | ** *    | *     | * *

MMC/SD pinouts @ http://pinouts.ru/Memory/sdcard_pinout.shtml

mmc-spi adapter
This is a simple SD or MMC adapter card. It allows you to interface with any microcontrollers. It is perfect for mass storage, WAV/MP3 player and data logging. The adapter breaks out the SD/MMC socket to a standard 0.1" 11-pin header. It can be plug directly onto the boardboards. This adapter features innovations that set it apart from other SD card adapter. Innovations feature like on-board card detect LED, Push-Push socket, and 3.3V regulator. Which mean either 3.3V or 5.0V microcontroller can be connected directly with the board. You can even use this 3.3V to power external circuits up to 250mA.



Pinout:

VIN: Input power to the SD card (3.3V to 6.0V) GND: Common (Connects to the housing of the SD socket) 3V3: Output voltage from the on-board 3.3V regulator (250mA) NC: Connect to pin 9 on the SD card (not used in SPI mode) CS: Chip select DI: Serial input data SCK: Serial clock DO: Serial output data IRQ: Interrupt request, connect to pin 8 on the SD card (not used in SPI mode) CD: Card detect (active low) WP: Write protect

Features:

• On-board 3.3V regulator • Connect directly to 3.3V or 5.0V microcontroller • Card detect LED • Include 11-pin male header • Board dimension: 2.0”x1.3”

Hack: Unsolder the caps
In first tests, It's discovered the MMC/SD card is detected, but clk isn't really clear.. So you need to remove the capacitor on the SPI bus (C142, C143, C144, C145) to have clean signals.

MMC/SD card adapter
ebay, search for MMC/SD-USB adapter ... it should cost less than Euro 5, and you could unsolder the card adapter connecor

Hack: MMC/SD card adapter, do it Cheap
you can realize it Cheap from a 5.1/4 floppy cable

http://uanr.com/sdfloppy/ describes how to build a SD card reader from an old 5.25 floppy drive connector.

Bastard Sons of Dial-Up Episode 8 (http://BSoDtv.org/episodes.php) explains how to make an SD Card PCB.

touchscreen
under evaluation about these two driver chip


 * TOUCHSCREEN ads7843 [[Media:touchscreen-driver-ads7843.pdf|touchscreen-driver-ads7843.pdf]]
 * TOUCHSCREEN ads7846 [[Media:touchscreen-driver-ads7846.pdf|touchscreen-driver-ads7846.pdf]]

the package is smd, in ssop ... ssop to dil adaptor is required


 * ADS7846E SSOP-16 -> Surface Mount SMT SMD DIL adaptor TSSOP SSOP 16 PINS
 * ADS7846N TSSOP-16 -> Surface Mount SMT SMD DIL adaptor TSSOP SSOP 16 PINS



.

LCD
It’s Time to Test (and improve) the Knowledge about I2C/SPI LCD Interface!

Have you ever tried to deal with the I2C or SPI LCD interface before? If you haven’t, then you might want to test this out by your own!

It’s a lucky day to you, as today you’re going to develop an I2C LD interface, which it’s allow you to connect an LCD to the fonera with only two simple wires!

You will think it’s a useful tool, if you like more pins to be available for another use, which a normal LCD interface requires a minimum of six pins or you would like to make a control panel!

Basically, with this I2C or SPI LCD interface you can only use two wires from your microcontroller and use up to seven I2C LCD interfaces on the same I2C bus. Furthermore, you also can be easily wire a five button input pad, example like a control panel and free up your serial port for other use with this I2C/SPI LCD Interface.

The great thing about the I2C/SPI LCD interface is it can be used with the Basic Stamp, any Arduino, Microchip PIC or any other microcontroller, which has been built in or a bit banged I2C interface.

Anyway, the fonera will enjoyed by these pretty things, here

.

proof about 320x240 without serial interface
they are so pretty as no serial ! that mean more hw to control them

320x240 Graphic LCD, Backlight, STN Negative, Transmissive -20°C - +70°C 6:00, Negative Voltage Generator, Temperature Compensation

http://www.crystalfontz.com/products/index-grph.html


 * RAiO RA8835 Controller
 * CFAG320240C0-YMI-TZ -> 139.98mm x 120.24mm x 15.6mm
 * CFAG320240C0-YMI-TZ -> 154.79mm x 120.24mm x 15.6mm
 * Epson S1D13700 Controller
 * CFAG320240CX-FMI-T -> 148.02mm x 120.24mm x 15.6mm
 * CFAG320240CX-TFH-TTS -> 148.02mm x 120.24mm x 15.6mm
 * CFAG320240CX-YYH-T --> 148.02mm x 120.24mm x 15.6mm

the CFAG320240CX-TFH-TTS seems to be the One: 320x240 Graphic LCD, White Edge LED Backlight, FSTN Positive, Transflective -20°C - +70°C 6:00, Negative Voltage Generator, Temperature Compensation, 4-wire Analog Touch Screen (it costs $122)

Epson S1D13XXX framebuffer support CONFIG_FB_S1D13XXX:                                                                                                                  Support for S1D13XXX framebuffer device family (currently only working with S1D13806) Product specs @ http://www.erd.epson.com/vdc/html/legacy_13xxx.htm Symbol: FB_S1D13XXX

wonder if also consider or not the optrex touch screen

http://www.optrex.com/products/groupdetail.asp?tag=touch

tiny 48x48 LCD_i2c_over_gpio driver for the LaFonera.2100
This is a gorgeous 48x48 pixel serial color graphic LCD display. It is a small carrier board with Nokia 3210/3310 LCD (be sure it has metallic contacts !!! a lot of newer display has glass contacts )



The driver is under development: actually there is a not a kernel driver but all the stuff is running in user space attached to a minimal gpio kernel support. I mean the user space uses /dev/gpio to handle the display ... anyway it has to be tested and ported in the kernel space with a robust support. Also a text gen is under development and it will be able to generate fonts: so it will be possible to used the lcd this way

echo "hAllo world" > /dev/lcd

less tiny 132x132 color LCD_spi_over_gpio driver for the LaFonera.2100
This is a gorgeous 132x132 pixel serial color graphic LCD display. It is a small carrier board with Nokia 6610 LCD. This inexpensive LCD comes with a powerful software adjustable LED backlight. It uses a simple 3 wires serial SPI 9-bit interface. This is a nice compact color LCD board (1.7" x 2.2"). The very important and unique feature it can interface with 5V or 3.3V logic directly. Since the LCD takes 3.3V logic, there is an on-board logic converter so you can interface 5V microcontroller directly. There is also an on-board boost voltage circuit to drive the LED backlight at approximately 7.0V. You can even vampire a small current to from the boost circuit to power other circuitries. It is breadboard friendly so you can plug directly onto the breadboard. Only 6 connections are needed:




 * VCC (3.3V to 5.5V)
 * GND (supply ground)
 * RESET (LCD reset, active low)
 * SDATA (serial data)
 * SCLK (serial clock)
 * CS (chip select, active low)

Features:


 * LCD Logic: 3.3V or 5.0V
 * LED Backlight : 7V (On-board DC/DC converter)
 * 132x132 pixel
 * 0.1” spacing (breadboard ready)
 * 4,096 Color Display
 * 9-bit SPI
 * Uses the Epson S1D15G00 Controller
 * Connect directly to 3.3V or 5.0V

The driver is under development: actually there is a not a kernel driver but all the stuff is running in user space attached to a minimal gpio kernel support. I mean the user space uses /dev/gpio to handle the display ... anyway it has to be tested and ported in the kernel space with a robust support. Also a text gen is under development and it will be able to generate fonts: so it will be possible to used the lcd this way

echo "hAllo world" > /dev/lcd

framebuffer, tiny proof of concept
The frame buffer device provides an abstraction for the graphics hardware. It represents the frame buffer of some video hardware and allows application software to access the graphics hardware through a well-defined interface, so the software doesn't need to know anything about the low-level (hardware register) stuff.

Frame buffer devices work identically across the different architectures supported by Linux and make the implementation of   application programs easier and more portable; at this point, an X    server exists which uses the frame buffer device exclusively. On several non-X86 architectures, the frame buffer device is the only way to use the graphics hardware.

The device is accessed through special device nodes, usually located in the /dev directory, i.e. /dev/fb*.

You need an utility program called fbset to make full use of frame buffer devices.

more information:
 * kernel/Documentation/fb/framebuffer.txt

framebuffer_spi_over_gpio driver for the LaFonera.2100
nokia 6100 lcd (pcf8833 chip)

LCD Logic - 3.3V @ 2-3mA · LED Backlight - 6V-7V @ 40-50mA · Full 4,096 Color Display · 132 x 132 pixels

More information can be found at: Color LCD 128x128 Nokia Knock-Off

--- Y --> ___                   _ _ _ _ _ _ _ _ _|_ _|_ _                   |                         |             (0,0) |-| (131,0)        |          |                         |        |          |                         |        |          |                         |        |          |                         |        |          |   Nokia 6610 display    | X         |                         | |         |                         |        |          |                         |        |          |                         |        |          |                         |       \|/         |                         |           (0,131)  -  (131,131)

LCD Back pads PINOUT

1. VCC-Digital (3.3V) 2. RESET 3. SDATA 4. SCK 5. CS  6. VCC-Display (3.3V) 7. N/C 8. GND 9. LED GND 10. LED V+ (6-7V)



kernel example drivers/video/skeletonfb.c and set of examples of open drivers

pretty 320x240 Touch_LCD_over_uart driver for the LaFonera.2100
Touch Away! Our Serial LCD 320 x 240 Graphic LCD Display Terminal with touchscreen is designed to provide a cost effective RS-232 or RS-485 operator interface. A high contrast, extended temperature range 320 x 240 pixel LED backlight transflective LCD provides excellent viewing in direct light, as well as indoors. It has a 12:00 to 6:00pm viewing angle, which means it can be viewed from straight on to about 80 degress downward. The backlight automatically turns on when characters are received or inputs are activated, and shuts off after a programmable amount of no use.



Current draw is 32mA when LED backlight is off, 190mA when on.
 * Product name: ACS 320 x 240 LCD Display Terminal with Touchscreen and PS2
 * Number of Dots:  	 320 x 240
 * Module Dimension: 	94.7(W) x 83.3(H) x 11.6Max(T)
 * Viewing Area: 	81.4(W) x 61.0(H)
 * Active Area: 	76.78(W) x 57.58(H)
 * Dot Size: 	0.225(W) x 0.225(H)
 * Dot Pitch: 	0.24(W) x 0.24(H)
 * BackLight: 	LED(White)
 * Viewing Angle: 	+-40 degress H & V
 * Viewing Direction: 	12 O'CLOCK Superwide
 * LCD Type: 	FSTN-WHITE(Transflective)
 * Contrast Ratio: 	5-1
 * Operating Temperature: 	-20 to +70 degrees C
 * Price: 	$199.00 (you can but it @ http://vt100lcd.com/index_LCDTerminal.asp)
 * Power: it comes in on two of the unused DB-9 RS-232/RS-485 connector. 10 - 15VDC is required.

writing a framebuffer driver for an embedded spi interface
if you have a small Nokia knock-off LCD board that is currently connected to our embedded system using the spi protocol


 * you have a kernel module that correctly opens up the pins for data transfer, and accepts ioctl commands on /dev/ssplcd
 * you have the ability to set pixels, lines, and send bitmap images to the LCD screen from user land. The LCD has its own controller on board, so we do things like 'set row x, set col y, send RGB' etc.

supposing you also have X server (KDrive or fbdev) installed on the root filesystem (but it is incorrectly configured).

the next should be


 * Figure out how to get a framebuffer device up and running using the LCD board
 * Understand what exactly I need to be looking at - /dev/fb0, vesa, X server, ...?

Any suggestions or pointers would be so helpful. I'm not sure if I'm looking to be writing a new kernel module, or a new framebuffer device, or ...?

From my understanding, as long as I can correctly implement /dev/fb0 (kernel module or other) - then X can talk to this device and be none the wiser

usb lcd + touch screen
http://shop.wallbraun-electronics.de/product_info.php?info=p6_LCD-USB-Interface-V3-0-1-Set-inkl--LCD---Touch-Screen.html&XTCsid=mvdogvofvdhr8qdougc4o5edi7

.

microdrive_over_gpio
* gpio_CF : shifter Found * gpio_CF : card in op mode, no IRQ support * gpio_CF : resetting.. * gpio_CF : identify drive.. * gpio_CF : CF card detected, C/H/S=3968/16/63 sectors=3999744 (1953MB) * gpio_CF : detecting block size * gpio_CF : multiple sectors = 32 * init done: cfa: cfa1 cfa2 cfa3

it's under development and valuation (what is the best ? it's better to have a MMC of 300-500Kbyte/sec without any add of specific electronic ... or it's better to have a microdrive of 400Kyte/sec that requires a an electronic add on ??? still dunno =P ): actually there is a hardware shifter attached to the gpio that transplate serial stream into a parallel data. It's so slow and requires a level translator (3V<-->5V)

the kernel drive export his support to the "pATA/CF" level in a polled way: no IRQ support!

power switch
This piece of electronic is good if you want to switch ON/OFF an electric LOAD such bulb lamp or a remote workstation or such a stuff: 96 load lines are possible

the kernel module is an early and easy use of the gpio

framebuffer
http://www.elinux.org/Flameman/framebuffer

download
kernel 2.6.26 proof version with mmc-over-spi-over-gpio [[Media:kernel-gentoo-fonera.gz|kernel-gentoo-fonera.gz]] (not suggested for production cause it's experimental)

note you can tftp this kernel and make your fonera able to boot having the mmc-sd as rootfs (root=/dev/mmc3). You can also flash this kernel on your fonera to make it able to boot directly: this is the target of the final project!

DO NOT MOUNT,RW ROOTFS !!! THE MMC DRIVER IS STILL NOT SO PRETTY !!!

kernel 2.6.26 proof version with microdrive-over-gpio: extremely experimental, coming soon

issue with mmc_spi_over_gpio
info @ http://www.hjreggel.net/cardspeed/index.html#special-sd.html

mmc : MMC/SC for Fonera-2100 mmc_drv.ko : response : 0 mmc_drv.ko : response : 63 mmc_drv.ko : response : 1 mmc : Card Found mmc : card in op mode [*] mmc_get_csd_debug data.00: 0x0 data.01: 0x26 data.02: 0x0 data.03: 0x32 data.04: 0x5f data.05: 0x5a data.06: 0x83 data.07: 0xae data.08: 0xfe data.09: 0xfb data.10: 0x1d mmc : SIZE : 1885, nMUL : 6, COUNT : 15084, NAME : SD02G mmc : Card Initialised [*] mmc_get_csd_debug data.00: 0x0 data.01: 0x26 data.02: 0x0 data.03: 0x32 data.04: 0x5f data.05: 0x5a data.06: 0x83 data.07: 0xae data.08: 0xfe data.09: 0xfb data.10: 0x0 mmc : The inserted card has a capacity of 1977090048 Bytes mmc : adding disk mmc: mmc1 mmc2 mmc : Card was Found

right values are:

Command (m for help): Disk /dev/sda: 1977 MB, 1977614336 bytes 64 heads, 63 sectors/track, 957 cylinders Units = cylinders of 4032 * 512 = 2064384 bytes Disk identifier: 0x00000000

Device Boot     Start         End      Blocks   Id  System /dev/sda1              1          16       32224+   b  W95 FAT32 /dev/sda2             17         957     1897056   83  Linux

Command (m for help): sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00 sd 0:0:0:0: [sda] Assuming drive cache: write through sd 0:0:0:0: [sda] 3862528 512-byte hardware sectors (1978 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00 sd 0:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sda2 sd 0:0:0:0: [sda] Attached SCSI removable disk sd 0:0:0:0: Attached scsi generic sg0 type 0

JFFS2
These modules need to be loaded / compiled them right in. * "Device Drivers" o "Block Devices" + "Loopback Device Support" (loop) o "Memory Technology Device (MTD) support" + "Caching block device access to MTD devices" (mtdblock module) (required for block2mtd) + "Self-contained MTD device drivers..." # "MTD emulation using block device" (block2mtd), * "File Systems" o "Miscellaneous Filesystems" + "Journalling Flash File System v2 (JFFS2) support" # "Advanced compression options for JFFS2" * "JFFS2 ZLIB compression support"

Emerge proper tools: emerge sys-fs/mtd-utils

Make the device node block device: mknod /dev/mtdblock0 b 31 0

Reboot the system now and ensure the modules are loaded

expanding ram: 16Mb to 32Mb
good & tested chip number
 * k4s56162e-TL75
 * HY57V561620CLT-HI

check out the the sodmm here : http://www.alldata.com/

idea of how to unsolder and solder http://homepage.ntlworld.com/tenerifeworld/Fonera/Replacing%20the%20memory/

Is it possible to replace the m25p64 flash chip with the m25p128 to double the flash space? Daemondust 04:53, 23 Apr 2007 (CEST) Which type of SDRAM

Hi to all. The original SDRAM chip on the Fonera is a hynix HY57V281620ETP-H which features: 128 Mbit organized as 4 banks x 2 Mbit x 16, 133 MHz An ideal chip needed for the 32MB upgrade may be the hynix HY57V561620ETP-H which is: 256 Mbit organized as 4 banks x 4 Mbit x 16, 133 MHz. Unfortunately is difficult to buy single chips (or small amounts), so we prefer to use PC133 SDRAM modules (like a 512MB PC133 DIMM module - double sided, 8 chips per side - or 256MB PC133 SODIMM module - double sided, 4 chips per side - ). The question is that not all chips from these modules are organized as 4 banks x 4 Mbit x 16. For example, I saw a 512MB PC133 DIMM module with 16 Micron Technology MT48LC32M8A2BB-75 which is organized as 4 banks x 8 Mbit x 8, 133 MHz. Is it possible to do a Fonera RAM upgrade with this chip? (in other words: does the different organization of the same memory size make the difference?)

-> My understanding is that the 4 banks and the x16 is the physical interface to the CPU, so I guess the RAM will need to be of this organization. The "n Mbit" could possibly be increased further, as long as RedBoot is updated to use the additional memory. Kintel 00:54, 19 February 2008 (CET) [edit] Piggy packing 32MB

Hi,

I too thought about extending the Fonera's RAM. However, I would have gone a different route. Since it is quite hard to desolder SMD and you can potentially damage the PCB, I would have tried something like:

- Desoldering or cutting CS# on the original module (in such a way that a wire can still be attached to it) - Piggy packing the 32MB module on top of it, i.e. solder each pin except CS# to the lower chip. - pull high the lower chip's CS# - connect the upper chip's CS# to the PCB

Only thing is I'm not sure that pulling CS# high will actually tri-state the chip's outputs. Maybe you also / instead have to pull CKE low.

just my $0.02 [edit] List of working memory chips

Although I doubt many people have or will complete this modification, I think we should compile a list of working replacements for the original memory chip.

I can hereby confirm that the Micron MT48LC16M16A2-75 (:D) works flawlessly. But, for some reason the modified OpenWRT distribution that the Fonera is shipped with only shows 16 MB. DD-WRT on the other hand shows it all.

- Pinkevin

I can confirm A2V56S40BTP by PSC is workin. Found on a TwinMOS 128MB stick with 4 chips. If someone need one, I have some spares.PM me in the forum.

- Whitewiz Retrieved from "http://www.dd-wrt.com/wiki/index.php/Talk:LaFonera_Hardware_32MB_SDRAM_MOD"

ideas
compcache: have more (compressed) ram or faster (compressed) tmp disk You require kernel 2.6.x to compile these modules. http://code.google.com/p/compcache/wiki/CompilingAndUsing http://code.google.com/p/compcache/downloads/list

1. Checkout the source or download tarball from here. 2. Compile: * run 'make' in directory where you checked-out or untar'ed sources. 3. Usage: * Loading: run 'use_compcache.sh ' to load all required modules and setup swap device. If size is not specified, default size of 25% of RAM is used. * Unloading: run 'unuse_compcache.sh' to unload all modules and turn-off compcache swap device.

If you get any problem using (un)use_compcache scripts, you can do these steps manually as:

* Load kernel modules: o 4 kernel modules are created on compiling. You need to load all three of them (compcache.ko at last) + insmod lzo1x_compress.ko               + insmod lzo1x_decompress.ko                + insmod tlsf.ko                + insmod compcache.ko compcache_size_kbytes=5120 (compcache_size_kbytes param sets maximum size allocated for compressed pages) o device node /dev/ramzswap0 should be automatically created after loading compcache module. If not, then manually create it as: + mknod /dev/ramzswap0 b 253 0 (replace 253 with whatever major no. is assigned to this device: cat /proc/device | grep ramzswap) o Add ramzswap as swap device + swapon /dev/ramzswap0 -p 1 (give this swap device the highest priority). o Verify that ramzswap is active using: cat /proc/swaps. Its should show entry of /dev/ramzswap0.

Now, when system starts swapping, compcache will compress and store these pages in RAM itself! :)

uc-gentoo
stage3-mips3 big endian is currently running updated to 2008

A shot
@17-02-2009 removed /dev/mmc3, changed root=/dev/mmc2

reboot+dmesg: bootloader & kernel startup
RedBoot> +PHY ID is 0022:5521 Ethernet eth0: MAC address 00:18:84:14:86:74 IP: 192.168.1.11/255.255.255.0, Gateway: 192.168.1.1 Default server: 192.168.1.14

RedBoot(tm) bootstrap and debug environment [ROMRAM] Non-certified release, version v1.3.0 - built 16:57:58, Aug 7 2006

Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.

Board: ap51 RAM: 0x80000000-0x81000000, [0x80040450-0x80fe1000] available FLASH: 0xa8000000 - 0xa87f0000, 128 blocks of 0x00010000 bytes each. == Executing boot script in 10.000 seconds - enter ^C to abort RedBoot> ip_addr -l 192.168.1.11 -h 192.168.1.14 IP: 192.168.1.11/255.255.255.0, Gateway: 192.168.1.1 Default server: 192.168.1.14 RedBoot> load gentoo-fonera Using default protocol (TFTP) Entry point: 0x802e7ba0, address range: 0x80041000-0x80376264 RedBoot> exec Now booting linux kernel: Base address 0x80030000 Entry 0x802e7ba0 Cmdline : Linux version 2.6.26-rotary-wombat-mips32be-fonera-svn14268-dirty3 (root@queen-vittoria) (gcc version 3.4.5) #77 Thu Feb 12 19:50:42 CET 2009 CPU revision is: 00019064 (MIPS 4KEc) Determined physical RAM map: memory: 01000000 @ 00000000 (usable) Zone PFN ranges: Normal         0 ->     4096 Movable zone start PFN for each node early_node_map[1] active PFN ranges 0:       0 ->     4096 Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064 Kernel command line: console=ttyS0,9600 root=/dev/mmc2 init=/sbin/init Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes. Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 16 bytes PID hash table entries: 64 (order: 6, 256 bytes) console [ttyS0] enabled Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory: 12568k/16384k available (2731k kernel code, 3816k reserved, 433k data, 120k init, 0k highmem) Mount-cache hash table entries: 512 net_namespace: 484 bytes NET: Registered protocol family 16 Radio config found at offset 0xf8(0x1f8) NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 512 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) TCP reno registered NET: Registered protocol family 1 ar531x: Registering GPIODEV device squashfs: version 3.0 (2006/03/15) Phillip Lougher Registering mini_fo version $Id$ ev/ptmx driver msgmni has been set to 24 io scheduler noop registered io scheduler deadline registered (default) mmc : MMC/SC for Fonera-2100 (flameman) mmc_drv.ko : response : 0 mmc_drv.ko : response : 63 mmc_drv.ko : response : 1 mmc : Card Found mmc : card in op mode mmc : SIZE : 1885, nMUL : 6, COUNT : 15084, NAME : SD02G mmc : Card Initialised mmc : The inserted card has a capacity of 1977090048 Bytes mmc : adding disk mmc: mmc1 mmc2 mmc : Card was Found Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled serial8250: ttyS0 at MMIO 0xb1100003 (irq = 37) is a 16550A eth0: Atheros AR231x: 00:18:84:14:86:74, irq 4 ar2313_eth_mii: probed eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00) nf_conntrack version 0.5.0 (1024 buckets, 4096 max) ip_tables: (C) 2000-2006 Netfilter Core Team TCP vegas registered NET: Registered protocol family 17 RPC: Registered udp transport module. RPC: Registered tcp transport module. 802.1Q VLAN Support v1.8 Ben Greear  All bugs added by David S. Miller  kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. VFS: Mounted root (ext3 filesystem) readonly. Freeing unused kernel memory: 120k freed eth0: Configuring MAC for full duplex Algorithmics/MIPS FPU Emulator v1.5 mips1-hosted-by-(none) / # ls bin  dev      etc   lib  opt	root  sys  toor  var boot dev.tgz  home  mnt  proc	sbin  tmp  usr mips1-hosted-by-(none) / # cd root mips1-hosted-by-(none) root # ls mount.nfs	    nano-2.1.7-mips1	   nfs-utils-1.1.3	   test-mips myNET-host-lan-scan nano-2.1.7-mips1.tgz  nfs-utils-1.1.3.tar.gz mips1-hosted-by-(none) root # dmesg Linux version 2.6.26-rotary-wombat-mips32be-fonera-svn14268-dirty3 (root@queen-vittoria) (gcc version 3.4.5) #77 Thu Feb 12 19:50:42 CET 2009 CPU revision is: 00019064 (MIPS 4KEc) Determined physical RAM map: memory: 01000000 @ 00000000 (usable) Entering add_active_range(0, 0, 4096) 0 entries of 256 used Zone PFN ranges: Normal         0 ->     4096 Movable zone start PFN for each node early_node_map[1] active PFN ranges 0:       0 ->     4096 On node 0 totalpages: 4096 Normal zone: 32 pages used for memmap Normal zone: 0 pages reserved Normal zone: 4064 pages, LIFO batch:0 Movable zone: 0 pages used for memmap Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064 Kernel command line: console=ttyS0,9600 root=/dev/mmc2 init=/sbin/init Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes. Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 16 bytes PID hash table entries: 64 (order: 6, 256 bytes) console [ttyS0] enabled Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory: 12568k/16384k available (2731k kernel code, 3816k reserved, 433k data, 120k init, 0k highmem) Calibrating delay loop... 183.50 BogoMIPS (lpj=917504) Mount-cache hash table entries: 512 net_namespace: 484 bytes NET: Registered protocol family 16 Radio config found at offset 0xf8(0x1f8) NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 512 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) TCP reno registered NET: Registered protocol family 1 ar531x: Registering GPIODEV device squashfs: version 3.0 (2006/03/15) Phillip Lougher Registering mini_fo version $Id$ ev/ptmx driver msgmni has been set to 24 io scheduler noop registered io scheduler deadline registered (default) mmc : MMC/SC for Fonera-2100 mmc_drv.ko : response : 0 mmc_drv.ko : response : 63 mmc_drv.ko : response : 1 mmc : Card Found mmc : card in op mode mmc : SIZE : 1885, nMUL : 6, COUNT : 15084, NAME : SD02G mmc : Card Initialised mmc : The inserted card has a capacity of 1977090048 Bytes mmc : adding disk mmc: mmc1 mmc2 mmc : Card was Found Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled serial8250: ttyS0 at MMIO 0xb1100003 (irq = 37) is a 16550A eth0: Atheros AR231x: 00:18:84:14:86:74, irq 4 ar2313_eth_mii: probed eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00) nf_conntrack version 0.5.0 (1024 buckets, 4096 max) ip_tables: (C) 2000-2006 Netfilter Core Team TCP vegas registered NET: Registered protocol family 17 RPC: Registered udp transport module. RPC: Registered tcp transport module. 802.1Q VLAN Support v1.8 Ben Greear  All bugs added by David S. Miller  kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. VFS: Mounted root (ext3 filesystem) readonly. Freeing unused kernel memory: 120k freed eth0: Configuring MAC for full duplex Algorithmics/MIPS FPU Emulator v1.5

inside the mmc-rootfs, meet the the ucinit-proof (read only first mount)
mips1-hosted-by-(fonera.2100) root # myinit [*] ucinit init stuff mount -t proc none /proc/ mount stuff, rootfs.ro, nodevpts hostname: fonera.2100 config net: {eth0 192.168.1.6/24 gateway 192.168.1.1} login

login : root Password: ************* M e  s  s  a  g  e      O  f      T  h  e      D  a  y  i  n  s  e  r  t     c  o  i  n  s     p  l  e  a  s  e       Unable to change tty /dev/console: Read-only file system

mips1-hosted-by-(fonera.2100) ~ # hostname fonera.2100

mips1-hosted-by-(fonera.2100) ~ # ls mount.nfs	    nano-2.1.7-mips1	   nfs-utils-1.1.3	   test-mips myNET-host-lan-scan nano-2.1.7-mips1.tgz  nfs-utils-1.1.3.tar.gz

mips1-hosted-by-(fonera.2100) ~ # gcc -v Using built-in specs. Target: mips-unknown-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure --prefix=/usr --bindir=/usr/mips-unknown-linux-gnu/gcc-bin/4.1.2 --includedir=/usr/lib/gcc/mips-unknown-linux-gnu/4.1.2/include --datadir=/usr/share/gcc-data/mips-unknown-linux-gnu/4.1.2 --mandir=/usr/share/gcc-data/mips-unknown-linux-gnu/4.1.2/man --infodir=/usr/share/gcc-data/mips-unknown-linux-gnu/4.1.2/info --with-gxx-include-dir=/usr/lib/gcc/mips-unknown-linux-gnu/4.1.2/include/g++-v4 --host=mips-unknown-linux-gnu --build=mips-unknown-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --disable-multilib --enable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,treelang,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2)

mips1-hosted-by-(fonera.2100) ~ # as --version GNU assembler (GNU Binutils) 2.18, 2007, configured for a target of `mips-unknown-linux-gnu'.

mips1-hosted-by-(fonera.2100) ~ # mybasta basta

system shutdown

About devtools
crossbuilder script made to build up what is needed

About the status of this project
Actually (15-02-2009) i am able to boot the board with uc-gentoo (-glibc) from the mmc-sd the uc-libc stages are still under development =P and the MMC_over_gpio is still not able to correctly identify the byte amount of a MMC card: it's working with a brutal patch

02-03-2009: the mmc_over_gpio has been debugged and i understand exactly what is the problem, a rewrite in running, also ... that diver needs a prettier make up ... and finally it need a mutex just cause mmc and lcd will share the physically spi lines