One of the Sakharov's condition for baryogenesis is the violation of both C and CP. In the Standard Model, gauge interactions break maximally C, but CP is only broken through the Yukawa couplings in the poorly understood scalar sector. In extra-dimensional models, extra components of gauge fields behave as scalars in 4D and can acquire effective vev's through (finite) quantum effects (Hosotani mechanism). This mechanism is used to build a toy model with 2 extra-dimensions compactified on a flat torus $T^2$, where a SU(2) gauge symmetry is broken to U(1) and CP violation (in 4D) is expected. This is verified by computing a non-vanishing electric dipole moment.