If you have the Mazda connect unit, it's this piece of kit: https://www.amazon.com/gp/product/B0915RNFZ4/ref=ox_sc_act_title_3?smid=A3OFNY22QMAXGN&psc=1
and a CMU update.
instructions and stuff: https://forum.miata.net/vb/showthread.php?t=679114
As far as backup camera, FM sells them, they are compatible with the Mazda connect unit.