**4. Conclusions**

In summary, we synthesized CCO and Mg:CCO nanoparticles and successfully applied them as HTLs in OSCs and PSCs. Mg incorporation induces a slight lattice expansion by substituting larger ionic radii Mg2<sup>+</sup> into the Cr3<sup>+</sup> site. Rietveld refinement suggests that Mg doping decreases CCO nanoparticle size along the *c* axis but increases CCO nanoparticle size along the in-plane directions. Overall, both XRD and TEM results indicate that nanoparticle sizes are smaller with Mg doping. The average value of the direct *Eg* is (3.26 ± 0.03) eV in all nanoparticle films. The *WF* values for all Mg concentrations are larger than the *IE* values, and their difference (*WF – IE*) increases with Mg concentration, consistent with increased *p*-type conductivity reported in the literature. OSCs and PSCs based on Mg:CCO HTLs show a consistent increase in average *Jsc* in all four absorber systems despite large uncertainties; however, an overall enhancement in *PCE* is not clearly discernible (except in PSCs) due to different trends in other parameters and sample variation. No elemental (Cu, Cr, and Mg) diffusion from CCO and Mg:CCO HTLs is detected by XPS at the surface of MAPbI3 films. CCO and Mg:CCO HTLs effectively extract charge from the absorber, as evident in more PL quenching and shorter lifetimes when MAPbI3 is deposited on the HTLs. Mg doping in CCO HTLs enhances the stabilized efficiency for MAPbI3 PSCs. This work provides new insights related to the role that an Mg:CCO HTL may play in improving performance in a wide range of OSCs and MAPbI3 PSCs.

**Author Contributions:** Conceptualization, J.W.P.H.; Nanoparticle synthesis, making suspensions and thin films, XRD, SEM, EDX, DLS, UV-vis, PESA, Kelvin Probe, ellipsometry, B.Z.; TEM, XRD, XPS analyses, S.T. and B.Z.; OSC fabrication and PL sample preparation, B.Z. and W.X.; PSC fabrication and XPS, W.A.D.-S. and D.B.M.; Se polymer synthesis, F.-Y.C. and Y.-J.C.; PL quenching measurements and analyses, Y.Z. and A.V.M.; writing—original draft preparation, B.Z.; writing—review and editing, S.T., J.W.P.H., W.A.D.-S., and D.B.M.

**Funding:** The work done at University of Texas at Dallas (J.W.P.H., B.Z., W.X., S.T.) was sponsored by the National Science Foundation (NSF) (Grant No. DMR-1305893). PL spectroscopy work (Y.Z. and A.V.M.) was supported by NSF-CAREER grant #1350800. J.W.P.H. acknowledges the support from Texas Instruments Distinguished Chair in Nanoelectronics. The work done at Duke University was funded by the Office of Energy Efficiency and Renewable Energy (EERE), U.S. Department of Energy, under Award Number DE-EE0006712 (W.A.D.-S., D.B.M.). W.A.D.-S. acknowledges support from the Fitzpatrick Institute for Photonics John T. Chambers Scholarship.

**Acknowledgments:** We thank Trey Daunis for review and editing this manuscript and Ivanic Bojana for the help of PL quenching measurements.

**Conflicts of Interest:** The authors declare no conflict of interest.
