Here "righteousness that he had by faith" means that God considered him to be righteous because he had faith. Alternate translation: "a visible sign that God considered him righteous because he had believed in God before he was circumcised" (See: [[rc://en/ta/man/translate/figs-explicit]])
You can translate this in an active form. Alternate translation: "so that God would consider them righteous" (See: [[rc://en/ta/man/translate/figs-activepassive]])