Can you have a 90 degree elbow going upward on drain line?
No, you should not do that.  As mentioned in a comment, the drain is going to fill up with gunk and clog. Depending on use, you'll find that you have to snake this line quite often.
While traps do hold water, they are limited in the depth of water they can hold.  Traps are also designed in such a way, that normal use stirs up any &quot;sediment&quot; and helps flush it away (self cleaning).

Uniform Plumbing Code
Chapter 10 Traps and Intercepters
1003.0 Traps - Described
1003.1 General Requirements. Each trap, except for
traps within an interceptor or similar device shall be self-cleaning. Traps for bathtubs, showers, lavatories, sinks,
laundry tubs, floor drains, urinals, drinking fountains, dental units, and similar fixtures shall be of standard design,
weight and shall be of ABS, cast brass, cast iron, lead, PP,
PVC, or other approved material.


I'm not sure how far away the vent is for this fixture. If that's 2&quot; pipe, it has to be within 8' of the trap weir.  If it's 1½&quot; pipe, the vent has to be within 6' of the trap weir.