ramips: mt7621: add support for memory detection