A domain is a valuation ring if and only if the partially ordered set of ideals in this ring is totally ordered.
Does this equivalence hold when we restrict to prime ideals only? I.e. is a domain $R$ a valuation ring, if the partially ordered set $\operatorname{Spec}(R)$ is totally ordered?
No. Here is a counter-example deduced from Bourbaki, Commutative Algebra, Ch. V, Valuation Rings, § 4, exercise 7 d):
Let $K$ be an algebraically closed field with characteristic $0$, $B=K[X,Y]$. The polynomial $$P(X,Y)=X(X^2+Y^2)+X^2-Y^2$$ is irreducible, hence generates a prime ideal in $B$. $B/PB$ is a noetherian domain with Krull dimension $1$, so its localisation $A=\bigl(B/PB)_{(X,Y)}\;$ at the maximal ideal generated by the canonical images of $X$ and $Y$ is a local noetherian domain of dimension $1$ and henceforth $\operatorname{Spec}A$ is totally ordered by inclusion.
However this ring is not integrally closed, so it can't be a valuation ring.