The librem5 is using NXPs mfgtools: https://github.com/NXPmicro/mfgtools . I'd be great to have this in PureOS (we're currently cloning this in https://source.puri.sm/Librem5/librem5-devkit-tools from a mirror on our server). License is BSD-3 clause.
This could be part (a dependency) of a bigger "Librem-5 dev-tools" package available in PureOS to ease development for the phone.