We recommend the following way for software and firmware upgrades. The priority reason is the stability of the upgrade process facing possible bugs. By these recommendations we concentrate on a limited number of upgrade steps which are used by the vast majority of users. Thus, if a bug appears there, it is likely to be reported and fixed, thus further bugs in these limited upgrade combinations get rare.
Do not forget a backup at each step.
Software
First, update to the latest patch release of your current major version, e.g. v1.6.0p2 → v1.6.0p30. Then, take the latest patch release of the next major version, e.g. v1.6.0p30 → v2.0.0p36. Then again latest patch release of the next major version, until you get to the current version and its latest patch release, e.g. as of the time writing this v2.0.0p36 → v2.1.0p28 → v2.2.0p2.
Take all intermediate major releases within the upgrade.
Firmware
Same as for software, first latest minor version, then latest minor version of next major version, and so on. E.g. v1.3.20 → v1.4.19 → v1.5.5 → v1.6.4 .
You need to take care of the availability of the software for each firmware version.