Transcription factor that acts as a key regulator of spermatogenesis. Acts by regulating expression of genes required for the haploid phase during spermiogenesis, such as genes required for cilium assembly and function (By similarity). Recognizes and binds the X-box, a regulatory motif with DNA sequence 5'-GTNRCC(0-3N)RGYAAC-3' present on promoters (PubMed:10330134). Probably activates transcription of the testis-specific histone gene H1-6 (By similarity). Homodimer; probably only forms homodimers in testis (By similarity). Heterodimer; heterodimerizes with RFX1 and RFX3 (PubMed:10330134). Mainly expressed in the nucleus and at lower level in cytoplasm. Belongs to the RFX family.