We extend the relation between cluster integrable systems and q-difference equations beyond the Painlev ' e case. We consider the class of hyperelliptic curves where the Newton polygons contain only four boundary points. We present the corresponding cluster integrable Toda systems and identify their discrete automorphisms with certain reductions of the Hirota difference equation. We also construct nonautonomous versions of these equations and find that their solutions are expressed in terms of five-dimensional Nekrasov functions with Chern-Simons contributions, while these equations in the autonomous case are solved in terms of Riemann theta functions.