Biophysical mechanism for neural spiking dynamics