  We investigate cosmological aspects of spontaneous baryogenesis driven by a
scalar field, and present general constraints that are independent of the
particle physics model. The relevant constraints are obtained by studying the
backreaction of the produced baryons on the scalar field, the cosmological
expansion history after baryogenesis, and the baryon isocurvature
perturbations. We show that cosmological considerations alone provide powerful
constraints, especially for the minimal scenario with a quadratic scalar
potential. Intriguingly, we find that for a given inflation scale, the other
parameters including the reheat temperature, decoupling temperature of the
baryon violating interactions, and the mass and decay constant of the scalar
are restricted to lie within ranges of at most a few orders of magnitude. We
also discuss possible extensions to the minimal setup, and propose two ideas
for evading constraints on isocurvature perturbations: one is to suppress the
baryon isocurvature with nonquadratic scalar potentials, another is to
compensate the baryon isocurvature with cold dark matter isocurvature by making
the scalar survive until the present.
