The pixel detector for the CMS phase-II upgrade