<apritzel>
gamiee: is there any documentation for the Avaota C2? The schematics for the Chameleon seems to be a bit different (voltages for WiFi and eMMC, LEDs, etc)
<apritzel>
gamiee: oh, and thanks for the boards, they have arrived today!
apritzel has quit [Ping timeout: 480 seconds]
<IlikeTech>
apritzel: going to try otg mode again. In my usb controller node, I've set the role to otg. In my phy node, I've specified ID detection , Vbus detection, and a regulator for host mode. That should be all I need in my device tree, correct?
<IlikeTech>
oh, gone lol. Oops
hexdump01 has joined #linux-sunxi
hexdump0815 has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has joined #linux-sunxi
gsz has joined #linux-sunxi
warpme has joined #linux-sunxi
apritzel has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
gsz has quit [Ping timeout: 480 seconds]
gsz has joined #linux-sunxi
<apritzel>
IlikeTech: yes, that's what you need. Actually only the ID pin would be *required*, I think.
gsz_ has joined #linux-sunxi
gsz has quit [Ping timeout: 480 seconds]
gsz_ has quit [Ping timeout: 480 seconds]
gsz has joined #linux-sunxi
gsz has quit [Quit: leaving]
warpme has quit []
warpme has joined #linux-sunxi
bauen1 has quit [Ping timeout: 480 seconds]
<gamiee>
apritzel: Happy to hear that they arrived! I will take look if I have them.
<gamiee>
Also the board will be named Chameleon
<gamiee>
(As it was originally)
<IlikeTech>
apritzel: Okay, that's what I thought. Sadly still no luck. It seems to go into host mode by default but without turning on the power supply. I mounted debugfs and looked at the gpios file, and they are getting configured to the right mode and the inputs change as I would expect them to. However, it never seems to turn on the power supply, and
<IlikeTech>
even if I force it on, host mode doesn't work.
bauen1 has joined #linux-sunxi
<apritzel>
gamiee: on a closer look the existing schematic might be correct, it just contradicts the BSP in some places: like the DT says PG and PC are 1.8V, but I actually measured 3.3V, as the schematic says
<apritzel>
gamiee: and yeah, wanted to ask you about the naming already: We need a human readable name, and a DT compatible: "manufacturer,model", like: yuzukihd,chameleon
<gamiee>
apritzel: wifi should be different between old schematics, but everything else should be same. I don't have schematics, so I asked TL about getting them. About the name, it will be for sure named Chameleon (the current naming is incorrect). About if to use manufacturer as yuzukihd or pine64, I think it will be Yuzuki HD, but it's collab, so not sure. Also, this is second revision of chameleon, as the original YuzukiHD one (V1) had AW XR wifi instead of AI
<apritzel>
right, that's indeed one difference. Naming is tricky since it's OSHW, I guess, but I guess it's about who is actually making or ordering the PCBs
<apritzel>
so I guess Pine64 would be more correct, but I feel more she deserves the credit
warpme has quit []
warpme has joined #linux-sunxi
dsimic is now known as Guest1247
dsimic has joined #linux-sunxi
Guest1247 has quit [Ping timeout: 480 seconds]
bauen1_ has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has joined #linux-sunxi
<IlikeTech>
okay so some further testing has revealed that with the tree set to OTG, peripheral mode does appear to be working. However, when plugging in a device that pulls the OTG line low, it doesn't switch roles correctly
<IlikeTech>
(nor does it try to drive VBus)
bauen1 has joined #linux-sunxi
warpme has quit []
apritzel has quit [Ping timeout: 480 seconds]
hazardchem has quit [Remote host closed the connection]
JohnDoe_71Rus has quit [Quit: KVIrc KVIrc Quasar 5.2.4, revision: 5.2.4+git-7599-1a1db4926, build type: debug, sources date: 20160102, built on: 2024-08-14 20:12:56 UTC 5.2.4+git-7599-]
ftg has joined #linux-sunxi
digetx has quit [Read error: Connection reset by peer]
digetx has joined #linux-sunxi
<IlikeTech>
Okay, well that's interesting. So, in OTG mode, if I set it up to be a gadget peripheral, and then unplug it and plug in an OTG adapter and device, host mode works and it'll transition between the two
<IlikeTech>
as soon as the gadget device is disabled, then it stops working again
<apritzel>
IlikeTech: have you looked into the PHY code and chased down what happens there? I remember the code was not correct for the "modern" SoCs, with a multiplexed PHY for USB0, but haven't checked the pure MUSB SoCs.
<IlikeTech>
I've looked through the PHY code and as far as I can tell, that seems to be working (to the extent it was actually getting called. Right now I'm poking in the sunxi glue and the musb_core.c
<IlikeTech>
When I set up the peripheral mode, I could plug it into my computer, have it show up, and then unplug it and plug in a flash drive on a Micro-B to A adapter, and it would work. The PHY would correctly detect the ID and enable the VBus supply, and then disable it again when I unplugged the adapter.
<IlikeTech>
Plugging the board back into my computer, and the gadget device showed back up, so it does appear to switch roles (for both PHY and musb) correctly
digetx has quit [Read error: Connection reset by peer]
digetx has joined #linux-sunxi
<apritzel>
but you said above that it stopped working right after this point, as soon as you unplug it again?
<IlikeTech>
no, it continues to work until I disable the gadget driver
<IlikeTech>
so like, when I do 'ls /sys/class/udc/ > UDC', it starts working for both peripheral and host roles
<IlikeTech>
and switches between them correctly
<IlikeTech>
but when I do 'echo '' > UDC' both stop working
<IlikeTech>
the gadget driver makes a call to musb_start(), which appears to be what's missing otherwise
<IlikeTech>
dang. It looks like I've been chasing what's effective expected behavior for the musb controller