I want to make a host controller driver for the TI-Nspire CX, but I have encountered a roadblock:
After resetting the controller, I want to enable the power on the USB port.
I tried the normal EHCI way of setting the port power bit in the PORTSC register, but it just hangs. It doesn't just hang normally, not even IRQs are working.
I looked at the linux driver for the chipidea USB controller, and they enable the port power through a regulator, not in the PORTSC register.
I also tried setting the output of GPIO2 to 0, like on hackspire, but it also didn't help.
But there has to be a way, since I dumped the PORTSC register after I attached a USB device, and the controller was in host mode and port power enabled.
The strange thing is that when the controller was in host mode with port power enabled and is then reset, the port power stays on, so it doesn't seem like the USB controller is actually controlling it.
Also setting the power to on works when the calculator was connected to TI-Connect before running.
Does anyone have another idea?
USB controller port power
2 posts
• Page 1 of 1
USB controller port power
Lua io and os libraries: https://github.com/nspiredev500/nspire-lua
OSExt: https://github.com/nspiredev500/OSExt
n-as on-calc assembler: https://github.com/nspiredev500/nspire- ... g/n-asv1.0
OSExt: https://github.com/nspiredev500/OSExt
n-as on-calc assembler: https://github.com/nspiredev500/nspire- ... g/n-asv1.0
-
nspiredev500
Niveau 4: MC (Membre Confirmé)- Posts: 17
- Joined: 03 Jul 2020, 12:22
- Gender:
- Calculator(s):→ MyCalcs profile
- GitHub: nspiredev500
Re: USB controller port power
AFAIK it's controlled over GPIOs: https://hackspire.org/index.php?title=GPIO_Pins
The Linux device tree confirme that: https://github.com/torvalds/linux/blob/ ... cx.dts#L73
How did you mesure that it's indeed outputting 5V? Did GPIO20 indicate that something is plugged in?
The Linux device tree confirme that: https://github.com/torvalds/linux/blob/ ... cx.dts#L73
How did you mesure that it's indeed outputting 5V? Did GPIO20 indicate that something is plugged in?
-
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)- Posts: 217
- Joined: 29 Mar 2014, 15:55
- Gender:
- Calculator(s):→ MyCalcs profile
2 posts
• Page 1 of 1
Return to Native: Ndless, Linux, ...
Who is online
Users browsing this forum: ClaudeBot [spider] and 5 guests