What patching method are you using for 1) it should be able to add data and 2) if it has a hash check of some form you should be able to bypass it.
Still trimming involves removing junk data, reverse trimming would involve putting it back.
Some tools might be able to do it but frankly a hex editor is probably easier.
The junk data is probably 0000 0000 0000 until the end of the file.
Two main ways:
Have a large file of all 00's (personally I am going to suggest 32 megabytes of it) and copy /b it onto the rom.
General idea is
"copy /b trimmedrom.nds+00file.file+00file.file untrimmedrom.nds"
repeat the 00file.file as many times as you like.
Now you can cut the rom down to size again. Either use a hex editor or something like filecutter from cracker:
http://crackerscrap.com/ (click projects)
32 megabytes = 33,554,432 bytes or finishes at 0200 0000 (well technically 01FF FFFF is the last entry)
64 megabytes = 67,108,864 bytes or finishes at 0400 0000
128 megabytes =134,217,728 bytes or finishes at 0800 0000
You can do the maths on the others as and when they come.
Secondary knowledge: the DS rom has the size it is trimmed to (give or take the "safety" factor) at 80 hex in the rom:
http://nocash.emubase.de/gbatek.htm#dscartridgeheader
From megaman battle network 5 (EU version):
C3 84 6E 01
Which when you reverse it (think ABCD reads D C B A but with bytes)
01 6E 84 C3 which is the end of the rom if you check it. This is how "safe" trimmers work, old style trimmers just cut until they no longer see 00.
Notes: some carts, patchers and whatver else may use this junk space so just filling it back up may not restore the original hash but you only appear to want space.
Some games use something other than 00 padding, some FF, some FF00FF00 or 00FF00FF and some might use something else entirely (although I have yet to see it on the DS).