Thanks OyyoDams!
That is the first thing I tried, but no matter how I configure the joystick, the Y axis is always inverted.
I have tried in the configuration to press up the joystick when is asked to press "joy up" and still appears inverted. I have tried to press down the joystick when is asked to press "joy up", but again, the Y axis is inverted.
Maybe I should look on some config file, where I can see the exact mapping of the controller?