If X and Y jog in the correct directions but Y homes the wrong way, that implies that your homall.g and homey.g files are homing Y the wrong way.
Looking at the front of your printer, which directions are +x and +y, and where are your endstop switches located?