Universal consistent truncation for 6d/7d gauge/gravity duals