Sony has release the Android 7.1 Nougat build instructions for comparable Xperia devices. This works with some devices but this build may be unstable and cause issues.

With Sony  making this available You can now develop Android N ROMs for unlocked Xperia devices via Sony’s Open Device program.  The recently released build guide gives developers the necessary instructions and tools to begin the development.

Here is the  AOSP List of Devices and Resources page, you’ll find links to all of Sony’s device configurations on the Sony Github. You’ll find everything you need on the AOSP for Xperia devices page.