Greetings,
I am using a 2041rdb and I am trying to develop my USB host controller driver. During the port PHY connection part of the initialization, I lose connection with CPU for some reason.
I have looked at some linux codes for reference and i dont know what i am missing here.
What i am doing;
1. Reset host controller with USB1_USBCMD register. and poll on the reset bit.
2. Set CM field of USB1_USBMODE to 0x3.
3. Set up snoop windows.
4. Enable UTMI PHY and select UTMI as the clock source on USB1_CONTROL
5. Select UTMI interface on USB1_PORTSC.
I lose connection when I am trying step 5. I am aware of the endianess issue and i checked DCFG_DEVDISR1 register.
When i load uboot and try this sequence it works fine. But when i am trying to run my own software something happens to CPU. I am open to any suggestions at the moment.