Magnetic structure and phase diagram of TmB4