<pnill>
the only things that make sense to me are that I screwed something up with the dtb, or because I'm booting over FEL the USB controller is left in a bad state or something, or I did something wrong with the kernel
<pnill>
Hmm USB in general seems broken, I tried plugging in a USB stick and it doesn't show in dmesg or in lsusb
<pnill>
(with dr_mode set to host)
anarsoul|c has joined #linux-sunxi
<pnill>
I guess it's pinctrl issues again related to power settings
<pnill>
or at least assume that based on digging through dmesg
apritzel has joined #linux-sunxi
<pnill>
well, fixing the initial pinctrl power stuff broke my busybox shell but made the errors stop appearing... still have usb_phy_generic.2.auto: supply vcc not found, despite putting a bunch of stuff under usbphy2 like vcc-supply in my dtb.
<pnill>
also, hi apritzel: Idk if you're able to see backlog or something since you seemed to have timed out but I got configsys stuff working, setup a gadget and such but it wasn't showing on my system so I tried just putting things to 'host' and plugging a usb stick in but it doesn't show up at all...
<pnill>
There were no errors when using the gadget, it all seemed to init perfectly fine... but still no luck.
<pnill>
and now no luck getting USB working at all even in host with a usb stick, nothing in dmesg or lsusb
<pnill>
The only thing I see in dmesg that I think could be related is, [ 2.134418] usb_phy_generic usb_phy_generic.2.auto: supply vcc not found, using dummy regulator
reinforce has joined #linux-sunxi
cmeerw has joined #linux-sunxi
cmeerw has quit [Ping timeout: 250 seconds]
apritzel has quit [Ping timeout: 240 seconds]
jbrown has quit [Ping timeout: 260 seconds]
jbrown has joined #linux-sunxi
<pnill>
yeah, dunno what more I can do... looked at all the different dts to see if any applied vcc-supply or "vcc" for usbphy2, nothin... tried setting vcc under phy2 but still get that vcc not found looked at the source that grabs that thought it was just looking for "vcc" maybe I'm placing it in the wrong node.
<pnill>
still dunno if that's the issue just making the assumption that it is and that it may be the reason why USB isn't working in general
<pnill>
I'm not sure where to go from here 'porting' the dts
<pnill>
because I don't understand what each individual option is doing or what translates/has to be translated
<apritzel>
pnill: the Allwinner DT is in general unfortunately mostly nonsensical
<apritzel>
the drive VBUS GPIO is PL5, if I count correctly
<apritzel>
it might be worth to try that
<apritzel>
it's easy do do in U-Boot: "gpio set pl5"
<apritzel>
then measure the voltage on the USB socket
akaWolf has joined #linux-sunxi
<apritzel>
USB ID GPIO is the sense pin that tells the system whether a host or a device cable is connected, on a micro B socket, for instance
<apritzel>
pnill: if that works (try toggling the line as well), then you need something like reg_usb1_vbus in sun50i-a64-orangepi-win.dts (random example)
sunshavi has joined #linux-sunxi
<pnill>
so the weird thing is, I thought the usb was working in u-boot
<pnill>
because the OTG stuff was somewhat working
<pnill>
OTG/Gadget
<pnill>
in U-Boot
<apritzel>
USB host and USB gadget are completely separate in U-Boot
<pnill>
So I'm wondering if gpio set pl5
<pnill>
would drive power to a single port or two of em
<pnill>
Like idk if the microusb is wired to a separate controller
<pnill>
trying to boot u-boot right now so I can do the 'gpio set pl5' and measure voltage.
<apritzel>
yes, micro USB is controller 0, otherwise FEL and gadget wouldn't work
<apritzel>
so that is clear
<apritzel>
how many other USB sockets do you have?
<apritzel>
and for USB power you have all possibilities: all ports always-on, one port switchable, all ports switched by the same GPIO, ...
<pnill>
microusb and 2x standard
<pnill>
but within u-boot
<pnill>
I see voltage
<pnill>
after issuing gpio set pl5
<pnill>
should I try setting it to 0
<pnill>
and see if It drops?
<pnill>
I didn't test it before running it
<apritzel>
yes, try everything
<apritzel>
"gpio toggle pl5"
<apritzel>
if I understand their weird DT correctly, it looks like it powers the OTG port and one USB port, the other should be always powered
<apritzel>
and you also have an ID pin, apparently, so the micro B is a fully functional OTG socket
<pnill>
well the OTG port is 1.Xv without pl5 set
<pnill>
with pl5 set it's 5.5v
<pnill>
other two are like 0.00XXv so basically not powered
<pnill>
and 5.5v with pl5 set
<apritzel>
both of them?
<pnill>
yeah
<pnill>
but maybe it's possible they use this other interface to expand the USB
<pnill>
like this other 'control board' plugs in
<apritzel>
other interface?
<pnill>
and has some buttons on it
<pnill>
so I'm wondering if that's utilzing the usb bus some how.
<pnill>
Idk pinout doesn't look like USB though
<pnill>
it actually is labeled urx1/utx1 utx3/urx3
<apritzel>
but at least you found the USB issue now, didn't you? You need to copy the reg_usb1_vbus node from sun50i-a64-orangepi-win.dts (for instance)
<pnill>
yeah..., and ok I'll try that
<apritzel>
(and reference that node from the &usbphy node at the bottom
<pnill>
thanks man, would've been totally lost on this without your help
<apritzel>
there you can also add the ID GPIO (PC6)
cmeerw has quit [Ping timeout: 260 seconds]
<pnill>
so it'd be gpio = <&pio 11 05 GPIO_ACTIVE_HIGH> right?
warpme_ has quit [Quit: Connection closed for inactivity]
<apritzel>
well, that looks alright, maybe it's something general with the gadget setup?
<pnill>
Not sure... unless it's something like that stuff with u-boot where a specific return was given but it doesn't show any errors
<pnill>
and I turned on as much of the debugging stuff as I could
<pnill>
otherwise, my only theories were... FEL breaking it.
<pnill>
because it breaks the controller or USB stack or something before it makes it to kernel
<pnill>
but then I would think U-Boot gadget wouldn't have worked at all (even showing "malfunctioning device") previously
<pnill>
I thought maybe it was windows, but last night tried it on mac and that didn't see anything show up either.
<pnill>
lsusb/dmesg showed nothing at all
<apritzel>
pnill: oh, btw: did you try the USB mass storage gadget in U-Boot? CMD_USB_MASS_STORAGE=y, then "ums 0 mmc 1"?
<pnill>
no, I didn't try that...
<apritzel>
that exports the eMMC as a USB drive, from U-Boot
<pnill>
I thought about that being another way to potentially modify the files of the original thing..
<pnill>
instead of having to do it with a script in the kernel
<pnill>
or linux/side not really kernel
<apritzel>
doesn't help you so much with Windows users, though
<pnill>
Oh, it'd mount with the original fs wouldn't it?
<pnill>
I guess that makes sense.
<apritzel>
as you would need to mount an ext4 partition ...
<pnill>
I'm just wondering why this gadget isn't working it'd be really convenient lol
<apritzel>
ums just exports the whole eMMC as a block device
<pnill>
hmm
<pnill>
other option instead of gadget.. USB ethernet adapter at least for me to troubleshoot it.
<pnill>
on the other PCB where I don't have serial
<pnill>
just wish gadget would work
<pnill>
and don't get why it doesn't... like windows doesn't seem to even do the "malfunctioning" thing it did with u-boot
<pnill>
it just acts like nothing was connected at all
<pnill>
and dmesg doesn't show anything either on the board
<pnill>
I remember reading on a forum someone mentioning dmesg was throwing a log when they disconnected/connected from the port that was doing the gadget
<pnill>
oh well that's odd..
<pnill>
apritzel: I was able to connect a device to the micro-usb port and it was recognized.
<pnill>
shouldn't that not be possible if dr_mode = peripheral
vagrantc has quit [Quit: leaving]
<pnill>
like it should be set to that mode instead of the other
<pnill>
host vs peripheral or at least that's what I thought
<pnill>
like I know otg, it should only be 'dual' mode
<pnill>
but peripheral I thought you couldn't even plug in USB sticks or etc.
<apritzel>
no idea
<pnill>
and I don't think it's the board..
<pnill>
because the gadget setup worked in u-boot
<apritzel>
have you tried any other USB gadget in Linux?
<apritzel>
like a serial port?
<pnill>
no, just that one from the collabora blog post
<pnill>
let me try others.
<apritzel>
I think serial is both easy and useful
<pnill>
yeah, serial does nothing either...
<pnill>
the configfs-gadget text comes out on dmesg