In mixed characteristic and in equal characteristic p we define a filtration on topological Hochschild homology and its variants. This filtration is an analogue of the filtration of algebraic K-theory by motivic cohomology. Its graded pieces are related in mixed characteristic to the complex AΩ constructed in our previous work, and in equal characteristic p to crystalline cohomology. Our construction of the filtration on THH is via flat descent to semiperfectoid rings. As one application, we refine the construction of the AΩ-complex by giving a cohomological construction of Breuil--Kisin modules for proper smooth formal schemes over OK, where K is a discretely valued extension of Qp with perfect residue field. As another application, we define syntomic sheaves Zp(n) for all n≥0 on a large class of Zp-algebras, and identify them in terms of p-adic nearby cycles in mixed characteristic, and in terms of logarithmic de~Rham-Witt sheaves in equal characteristic p.