It's probably those 6 holes underneath the Atmega. See https://docs.m5stack.com/#/en/module/encoder?id=pinmap