The potential barrier in the depletion region layer is due to :
Depletion region:
Hence, the potential difference is due to ions.
what is mean by potential barrier and depletion layer.