Let $R$ be a PID and let $A \in Mat_n(R)$ with all of its eigenvalues in R. Is it true that I can always find $P \in GL_n(R)$ such that $P^{-1}AP$ is uppertriangular? If so can I have a reference for this. Otherwise what additional hypotheses on $A$ do I need in order for it to be true. If it helps the case I am interested in is when $R$ is the ring of integers of some extension of $\mathbb{Q}_p$ or even just $\mathcal{O}_{\mathbb{C}_p}$.
Thank you.