Device physics of perovskite solar cells