How do I detect the RAM memory chip specification from within a Linux machine

This might help: Linux: Check Ram Speed and Type.

sudo dmidecode --type 17

Alternatively, if you can boot from a windows system, the Crucial System Scanner tool will give very good details on what is installed and what can be upgraded on the system (along with a shopping cart too). It will need an Internet connection.

Here is a quick reference from Crucial:
Guaranteed-compatible memory upgrades for your Dell Inspiron 640m Laptop/Notebook

I am assuming, you do not want to open the system and look at the memory sticks.
That is quick and simple too.