Its not revving above 4k rpms cuz its in limp mode. Have you connected any OBD scanner for detecting the codes? If No, than get it scanned to check if there are other errors causing the limp mode. For example: Two years back my D17A went into limp mode and i found a faulty knock sensor, if all the other things seems fine after OBD scanning, you can save up your money to buy another ECU by bridging the Auto ECU's Auto Transmission Solenoid by giving it a bypass wire, it will sense the Auto Transmission is there.
Give it a try otherwise buying a Manual ECU option is already available.