We describe the operation of an electrodynamic ion trap in which the electric quadrupole field oscillates at two frequencies. This mode of operation allows simultaneous tight confinement of ions with extremely different charge-to-mass ratios, e.g., singly ionised atomic ions together with multiply charged nanoparticles. We derive the stability conditions for two-frequency operation from asymptotic properties of the solutions of the Mathieu equation and give a general treatment of the effect of damping on parametric resonances. Two-frequency operation is effective when the two species' mass ratios and charge ratios are sufficiently large, and further when the frequencies required to optimally trap each species are widely separated. This system resembles two coincident Paul traps, each operating close to a frequency optimized for one of the species, such that both species are tightly confined. This method of operation provides an advantage over single-frequency Paul traps, in which the more weakly confined species forms a sheath around a central core of tightly confined ions. We verify these ideas using numerical simulations and by measuring the parametric heating induced in experiments by the additional driving frequency.