π
<-
Chat plein-écran
[^]

USB controller port power

C, C++, ASM...

USB controller port power

Unread postby nspiredev500 » 31 Aug 2020, 11:02

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?
User avatar
nspiredev500
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Level up: 60%
 
Posts: 12
Joined: 03 Jul 2020, 12:22
Gender: Not specified
Calculator(s):
GitHub: nspiredev500

Re: USB controller port power

Unread postby Vogtinator » 01 Sep 2020, 18:02

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?
User avatar
VogtinatorPremium
Niveau 8: ER (Espèce Rare: nerd)
Niveau 8: ER (Espèce Rare: nerd)
Level up: 63.3%
 
Posts: 167
Joined: 29 Mar 2014, 15:55
Gender: Male
Calculator(s):


Return to Native: Ndless, Linux, ...

Who is online

Users browsing this forum: No registered users and 2 guests

-
Search
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Découvre les nouvelles fonctionnalités en Python de l'OS 5.2 pour les Nspire CX II
Découvre les nouvelles fonctionnalités en Python de l'OS 5.5 pour la 83PCE/84+C-T Python Edition
Omega, le fork étendant les capacités de ta NumWorks, même en mode examen !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...

Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
490 utilisateurs:
>476 invités
>8 membres
>6 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)

-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)