The process in which the anatomical structure of the endocardium is generated and organized. The endocardium is an anatomical structure comprised of an endothelium and an extracellular matrix that forms the innermost layer of tissue of the heart, and lines the heart chambers.