Beaglebone black peripheral mode not working after replacing factory image with newly compiled kerne


We are doing a customized board with reference to beaglebone black. For sake of testing, we compile a new kernel and flash to the original beaglebone black board. The kernel is based on ( git:// Base on 2017/05/03 version). The boot up of kernel is OK. But USB0 is not able to function as peripheral, i.e, when we plug in the USB0 to the PC, the PC is not able to detect it as a USB device. The same with the original image was working fine with USB0 as peripheral. The USB1 is working OK as a host though. Is there anything missing when we compiled the new kernel? Or which version of the linux kernel source that the factory image is using? Thank you for your help!