Dear Yan,
There is wifi access in the major train stations such as Zurich, Geneva, Basle, Berne, Lucerne...
As for the train wifi: You will have wifi in the business section of most bilevel cars. Thats means most IC (Intercity) and some IR (Interegio) services.
As far as I know, NO wifi on the older single levels cars.
There is a separate 1st and 2nd class Swiss Pass, which one do you have?
FlyingSwiss