In order to be able to home the Z-Axis to MIN or MAX you need 3 conditions:
either
MIN_HARDWARE_ENDSTOP_Z true and Z_MIN_PIN > -1 and Z_HOME_DIR-1
or
(MAX_HARDWARE_ENDSTOP_Z true and Z_MAX_PIN > -1 and Z_HOME_DIR 1
I don't see any difference between X and Y in the Configuration.h. Does the Y-Stepper motor work in both directions?
if yes, then probably it's a hardware issue, try without the X_MAX endstop.
either
MIN_HARDWARE_ENDSTOP_Z true and Z_MIN_PIN > -1 and Z_HOME_DIR-1
or
(MAX_HARDWARE_ENDSTOP_Z true and Z_MAX_PIN > -1 and Z_HOME_DIR 1
void Printer::homeZAxis() { long steps; if ((MIN_HARDWARE_ENDSTOP_Z && Z_MIN_PIN > -1 && Z_HOME_DIR==-1) || (MAX_HARDWARE_ENDSTOP_Z && Z_MAX_PIN > -1 && Z_HOME_DIR==1))
I don't see any difference between X and Y in the Configuration.h. Does the Y-Stepper motor work in both directions?
if yes, then probably it's a hardware issue, try without the X_MAX endstop.