a Molecular structure of the CsI–DB21C7 complex. b Schematic representation of the gradient and homogeneous Cs doping of perovskite films. XPS core-level spectra for Cs 3d (c) and Pb 4f (d). The asterisk (*) indicates metallic Pb species. Top-view SEM images of control (e) and target (f) perovskite films revealing surface nanostructures upon treatment. The scale bar represents 500 nm. KPFM images of control (g) and target (h) perovskite films. i UPS spectra of perovskite films.