I set up a PIC32MX470 to run at 100 MHz, then set Timer2 and OC2 as follows:
// Pinouts. RPB14 for OC2
RPB14R = 0b1011;
// Timer2 will drive OC.
PR2 = 3; // PB Clock is divided by PR2+1
// Output Compare 2 for PWM mode, 50% duty cycle
OC2RS = 2; // 1/2 of PR2+1
OC2R = 2;
OC2CON = 0x6;
T2CONSET = 0x8000;
OC2CONSET = 0x8000;
Using that setup, I was able to get a 25 MHz signal, though it doesn't seem to be what I would call rock-solid. There seems to be some jitter that I can't get around. The frequency is 25 MHz, but not always with a 50% duty cycle. It seems to occasionally be 60%.
Since you've switched to the MX470, though, you can use the REFCLK module to generate the 25 MHz. It's also a much simpler setup, and is rock solid 50% duty cycle.
// REFCLKO setup. Pin RPE3
RPE3R = 0b0011; // REFCLKO -> RE3
REFOCONSET = (0b10 << 16) | // RODIV setting, divide by 4
(1 << 12) | // Output Enable
(1 << 15) | // On
(1 << 9); // DIVSWEN, so the switch takes place
If you want 28.8 MHz, you can include the REFOTRIM bits to fractionally adjust the divider, but you will have more jitter, especially the closer you get to the midpoint of the register. 120MHz might make it a little better.