This paper studies an uplink simultaneous wireless information and power transfer (SWIPT) system with non-orthogonal multiple access (NOMA), consisting of two users and one energy-harvesting access point (AP). The users transmit their independent information simultaneously to the AP which harvests energy and decodes information at the same time by dynamic power splitting (DPS). We focus on the ergodic capacity maximization and derive the closed-form solution of optimal power splitting ratio at the AP by solving the formulated convex problem when the channel state information (CSI) is unknown at the transmitters. And when the CSI is known at the transmitters, the jointly optimized transmitter power control and receiver power splitting is derived. Furthermore, we introduce the orthogonal multiple access (OMA) scheme as the benchmark to compare the performance. Simulation results show that the proposed scheme significantly outperforms the OMA scheme.