buzzmarshall has quit [Quit: Konversation terminated!]
Daanct12 has joined #linux-amlogic
Daanct12 has quit [Quit: Quitting]
tdebrouw has joined #linux-amlogic
tolszak has joined #linux-amlogic
<tolszak>
narmstrong: Hello, could you please let me know if there is something I can do, debug etc to find the cause of detecting the screen on odroid c2?
<narmstrong>
hi, you can try to boot with kernel cmdline "drm.debug=0x3f"
<tolszak>
with first and third screen looks like is initialized but after couple of seconds it shows no hdmi signal. But definitely sbc does something as screen wakes up.
<tolszak>
With long cable it didn didn't waker
<tolszak>
With long cable it didn't wake up
<narmstrong>
weird, looks like the HPD is not stable
<tolszak>
narmstrong: I've checked the other odroid c2 I have. the same issue
<tolszak>
narmstrong: those devices are from 2018, but I don't think there was updater hw since then
<narmstrong>
:-/
<narmstrong>
can you check an armbian image ? maybe there's a fix missing
<narmstrong>
Weird I’ll have a look at the armbian patchset
<tolszak>
narmstrong: I'm checking one more thing. For n2 plus I needed to compile 0001-drm-bridge-display-connector-implement-bus-fmts-call even for 5.15 kernel. I mean I removed max and min version from the patch. The comment from a few motnhs ago is fix black screen issue
<tolszak>
narmstrong: Will let you know
<tolszak>
narmstrong: Works! Damn. I'm sorry, I checked vanilla meta meson not the copy I have. The only difference is this: http://dpaste.com//9EXU2LWAJ
<tolszak>
narmstrong: I mean the X doesn't start still, but the screen is not off and I can see cursor.
<tolszak>
narmstrong: And yocto splash was visible.
<narmstrong>
ok indeed, what branch is it ?
<narmstrong>
my fixup attempt is wrong anyway, but this patch should'nt be needed anymore, did you update poky recently ?
<tolszak>
kirkstone
<tolszak>
narmstrong: the last commit was from 12th of Sept. I use kirkstone-4.0.4
<tolszak>
I will try new one
elastic_dog has joined #linux-amlogic
elastic_dog has quit [Killed (calcium.libera.chat (Nickname regained by services))]
camus has quit [Ping timeout: 268 seconds]
buzzmarshall has joined #linux-amlogic
jernej has joined #linux-amlogic
<tolszak>
narmstrong: Updated poky works with vanilla meson. Although X11 doesn't start still. It is not a problem for me though. I don't use X11. If you would like to have some more logs please let me know.
<narmstrong>
tolszak: X11 doesn't load all all boards or only on the C2 ?
<tolszak>
narmstrong: I think I tried 4.0.4 amlogic image sato on n2. But it was couple of months ago. I can check it if you want.
<tolszak>
narmstrong: Actually I will check it tomorrow morning and let you know. I already have the odroid c2 bits cached and n2 should be almost the same.
<narmstrong>
tolszak: ok thanks, if X11 on n2 doesn't boot, I'll need to fix that
<tolszak>
narmstrong: I mean devices boots, there is also cursor on screen, it's just there is error from X11 that no screen available or something
<mkorpershoek>
narmstrong: I've worked a little on "Port USB OTG to use Driver Model dwc2_otg instead of legacy in board_usb_* functions in mach-meson".
<mkorpershoek>
I'm testing as following:
<mkorpershoek>
1. Halt in U-Boot
<mkorpershoek>
If you have some time, I'm looking for suggestions.
<mkorpershoek>
2. => fastboot usb 0
<mkorpershoek>
3. Observe board being listed from host
<mkorpershoek>
4. hit Ctrl-c in U-Boot shell
<mkorpershoek>
5. Observe board disconnect from host
<mkorpershoek>
With CONFIG_DM_USB_GADGET=y, this no longer happens. From what I observe, this is because both the usb glue
<mkorpershoek>
(dwc3-meson-g12a) and the udc driver (dwc2-udc-otg) call generic_phy_init(). (for phy@3a000)
<mkorpershoek>
Because of this double generic_phy_init() call, the usage count of the USB phy is 2, and when we Ctrl-c in U-Boot
<mkorpershoek>
to halt fastboot, generic_phy_power_off() does not *really* powers off the phy.
<mkorpershoek>
This is because dwc3_meson_g12a_remove() is not called (only dwc2_udc_otg_remove() is called).
<mkorpershoek>
In my opinion, it's a little odd that both the glue driver and the udc driver are owners of the phy.
<mkorpershoek>
dwc3-meson-g12a is probed because it's a parent device of dwc2-udc-otg (usb@ff400000), but on removal of dwc2-udc-otg,
<mkorpershoek>
we don't remove dwc3-meson-g12a.
<mkorpershoek>
The "fix" so far i've found is to let dwc2-udc-otg handle the OTG phy (phy@3a000) and
<mkorpershoek>
let dwc3-meson-g12a handle the other PHYs. but that seems kind of wonky.
<narmstrong>
mkorpershoek: thx for the status, let me check something
<narmstrong>
u-boot usb was a little bit wonky
<mkorpershoek>
if it is of any help, my (wip) branch is here:
<narmstrong>
on linux, the support is the same, but to exit gadget otg switch is done to go back to host
<narmstrong>
I suppose this isn't done right ?
<mkorpershoek>
no. dwc2_udc_otg_remove() just deletes the gadget and some other resources (reset, clk, phy)
<narmstrong>
how is mode switching supported now since the u-boot phy interface doesn't support to setup mode ?
<narmstrong>
I'm surprise you get gadget without calling `dwc3_meson_g12a_force_mode(dev, USB_DR_MODE_PERIPHERAL);`
<narmstrong>
oh I know why, it's because dr-mode is set to peripheral on the vim3
<narmstrong>
without proper usb role switching implemented on u-boot like the linux, this won't work
<mkorpershoek>
https://dpaste.com/4E7W9KW7Z is a (verbose) log. dwc3-meson-g12a being a parent pf dwc-udc-otg it gets probed as well
<mkorpershoek>
/s/pf/of
<mkorpershoek>
I have not looked much into mode switching for now. I wanted the basic "=> fastboot, Ctrl-c" to work reliably first (i.e. host enumerates and detects a gadget disconnection)
<narmstrong>
yep so today it works because the usb_board_init() calls dwc3_meson_g12a_force_mode(PERIPHERAL), and then usb_board_cleanup() calls dwc3_meson_g12a_force_mode(HOST) and this does the trick
<narmstrong>
and for GXL, dwc3_meson_gxl_force_mode() calls phy_meson_gxl_usb2_set_mode() into the PHY
tolszak has quit [Ping timeout: 260 seconds]
<mkorpershoek>
hmm. the issue with CONFIG_DM_USB_GADGET is that it's dwc2_udc_otg_remove() that's called when usb_gadget_release() is called
<mkorpershoek>
are you suggesting that I should call dwc3_meson_g12a_force_mode(HOST) in dwc2_udc_otg_remove() for g12a based boards? seems weird/hacky
<narmstrong>
well DM_USB should implement a sort of USB role switch
<narmstrong>
either when using usb host or usb gadget
<narmstrong>
so by switching to gadget when trying to setup a gadget then setting it back like before when stopping, and the reverse for usb host comments
kenny has quit [Ping timeout: 260 seconds]
elastic_dog has quit [Ping timeout: 252 seconds]
elastic_dog has joined #linux-amlogic
naoki has joined #linux-amlogic
jernej has quit [Ping timeout: 260 seconds]
GNUtoo has quit [Remote host closed the connection]
tdebrouw has quit [Quit: Leaving.]
GNUtoo has joined #linux-amlogic
fiii has quit [Quit: Ping timeout (120 seconds)]
fiii has joined #linux-amlogic
elastic_1 has joined #linux-amlogic
elastic_dog has quit [Killed (platinum.libera.chat (Nickname regained by services))]