Early solar system to deep mantle: the geochemistry of planetary systems