This is my configuration on /recalbox/share/system/recalbox.conf
# ------------ D2 - GPIO Controllers ------------ #
##GPIO Controllers
## enable controllers on GPIO with mk_arcarde_joystick_rpi (0,1)
controllers.gpio.enabled=1
## mk_gpio arguments, map=1 for one controller, map=1,2 for 2 (map=1,map=1,2)
## controllers.gpio.args=map=1,2
controllers.gpio.args="map=5 gpio=5,6,13,19,21,4,26,12,23,20,16,18,-1"
Please ignore Exclamation mark! I had to put it in front of it because the number sign puts the line as headline