Substrate to channel pn junction