if god knows the future, there is no free will.
Consider the example of parents raising children. As they grow and learn, you allow them increasing latitude to make choices, and experienece the consequences of their choices. When they are young, you limit their choices to protect them from serious consequences. As they grow and learn, you allow then to make more choices, more serious choices. When they are teens, they will begin to make grown-up choices. Often, even we imperfect parents foresee that they are making a bad one. We encourage them to choose more wisely, we warn them of the consequences, but we cannot stop them from exercising their free will in a less-than-ideal manner. We do this because we know that if they are not free to err, they are also not free to be correct.
The theological case is the same, at a larger scale: without the freedom to sin, there is no virtue in overcoming temptation. A "god" who denies us the ability to be virtuous? That is a fair description of the devil!