On a generalized Cahn--Hilliard model with $p$-Laplacian