<hexdump0815>
apritzel: jernej: i gave your latest atf and u-boot code a try on my x96q h313 tv box with the goal to maybe get usb and/or emmc working but so far failed - this is how for i get: https://pastebin.com/raw/ywhVKMwL
<hexdump0815>
apritzel: jernej: at the bottom of the pastebin i have added info which sources i used, which dts & dtsi and how this box differes from the opi zero 2 according to their legacy dts files
<jernej>
I haven't played with USB yet
<jernej>
without USB it boots?
<hexdump0815>
yes - even with usb in it boots, but it does not see any usb devices ... and i think apritzel: had usb working somehow at least at u-boot level if i remember correctly
<hexdump0815>
emmc i have working in linux as well with those settings, but u-boot does not seem to recognize it properly yet
<hexdump0815>
what confused me a bit is that according the the legacy dts for both opi zero 2 and this box vqmmc-supply and vmmc-supply point to ldo1 and ldo2 which are not yet defined - and at least for the kernel it works with aldo1 for both as well
eduardas has joined #linux-sunxi
eduardas has quit [Quit: Konversation terminated!]
tuxillo has quit [Remote host closed the connection]
tuxillo has joined #linux-sunxi
<apritzel>
hexdump0815: > eMMC in U-Boot: did you define CONFIG_MMC_SUNXI_SLOT_EXTRA=2? And I think it would be "mmc dev 1", wouldn't it?
<apritzel>
as for USB: my experiments were not conclusive: originally I thought it would be about U-Boot initialising it, but then I could not reproduce this reliably
<apritzel>
all I can tell that a better supply is required, at least: the error code I see in Linux is different now
<hexdump0815>
yes i have CONFIG_MMC_SUNXI_SLOT_EXTRA=2 and i alised mmc2 to mmc2
<apritzel>
hexdump0815: also: Jernej's U-Boot v2 patches do no support USB yet
atsampson has quit [Ping timeout: 260 seconds]
<hexdump0815>
apritzel: can you please have a look at my config and dts+dtsi linked at the end of my pastebin if it looks sane or if there is maybe anything wrong or missing?
hexdump0815 has quit [Quit: Ping timeout (120 seconds)]
<jernej>
apritzel: maybe that calibration register(s) must be set for some reason?
<apritzel>
jernej: so I tried a lot on Sunday, including setting this tune register (@0x18), also setting bit 5 in our HCI PHY CTL (aka PMU_UNK1) register
<apritzel>
but none of those changes made any difference, and I don't need any of those for it to work in U-boot
<apritzel>
in U-Boot it works very reliably, every time, with that patch as just posted
<jernej>
well, it may be so more fundamental, I also can't get HDMI to work for some reason, no matter what I try
<jernej>
s/so/something/
<jernej>
HDMI is mostly the same as on H6, so I have no idea why it doesn't work
<apritzel>
jernej: have you tried in both U-Boot and Linux?
<jernej>
there is no H6 HDMI driver in U-Boot
<jernej>
but I guess it shouldn't be hard to add
<apritzel>
oh, I forgot ...
<apritzel>
jernej: and you tried on the Opi-Zero2, I guess?
<jernej>
both, OPi and T95
<jernej>
first I thought I missed some regulator
<jernej>
on T95
<jernej>
but there is no such possibility on OPi
hexdump0815 has joined #linux-sunxi
<hexdump0815>
jernej: are your hdmi expriments somewhere online? hdmi for u-boot for h6 & h616 would be nice btw. :)
<jernej>
no, because there is literaly nothing to show
<apritzel>
hexdump0815: so where did you get those LDO1 & LDO2 regulators from? I don't see those pins on the 805 or 305, only on the 803, if you refer to gpio[01]_ldo, at least
<apritzel>
jernej: in your use case ;-)
<jernej>
apritzel: BSP DT referes to those misterious ldo regulators
<apritzel>
hexdump0815: if the eMMC is using 1.8V for the data pins, it's probably BLDO1 in the reference design for vqmmc
<jernej>
I tried decipher driver but I still couldn't figure out what they should be
<apritzel>
maybe that refers to external regulators? (sounds stupid, but hey ...)
<hexdump0815>
i think the bsp dts also mentions some axp806_power_sply and axp1530_power_sply ...
* apritzel
puts on his asbestos trousers ...
marvs has quit [Ping timeout: 265 seconds]
marvs has joined #linux-sunxi
marvs has joined #linux-sunxi
<apritzel>
so I assume this TV box boots from eMMC, which means that the regulators must be enabled at BROM time already?
<apritzel>
and we do have the AXP305 in this box? At which point it would make little sense to add another PMIC IC (this "AXP1530"), when you have quite decent 1.8V and 3.3V already
<jernej>
yes, it boots from emmc and yes, it has AXP305 (just checked)
<apritzel>
hexdump0815: on the first glance your configs and DTs look OK, just adjust the U-Boot USB bits according to the respective OPi-Zero2 patch
<hexdump0815>
apritzel: on it right now - just to be sure to not miscount gpios again: "usb_drv_vbus_gpio = <0x53 0x7 0x8 0x0 0x1 0xffffffff 0xffffffff>;" should map to "gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */" right?
<apritzel>
hexdump0815: yes
<hexdump0815>
apritzel: no luck with your usb patches on my x96q box so far - i have now set everything like you and only changed the usb vbus gpio to PH8, but nothing gets detected - situation is still the same as shown in my pastebin from the beginning today
<hexdump0815>
apritzel: wait - on one usb port i get "scanning bus usb@5101400 for devices... ERROR: CTL:TIMEOUT" and "unable to get device descriptor (error=-1)" now
ldevulder_ has joined #linux-sunxi
ldevulder has quit [Ping timeout: 256 seconds]
<apritzel>
hexdump0815: did you set CONFIG_USBx_VBUS_PIN="PH8"? U-Boot doesn't care about the DT property
<hexdump0815>
apritzel: yes i did ... i set it on 1 and once also tried to set it on 0-4
<apritzel>
if you have a USB device with some kind of power indicator (pen drive, hub, ...), you could verify the power switch functionality
<apritzel>
or you somehow measure the voltage between the 5V and GND pins in the connector
<hexdump0815>
yes, power is there on both ports ... i also tried with an externally powered hub, but it did not help
<apritzel>
"gpio toggle PH8" should switch that on and off, just to verify that this is indeed the right GPIO
<hexdump0815>
voltage on both ports is 5v
<hexdump0815>
the gpio toggle does not seem to do anything - it prints on the mcdline that it toggles, but the usb remains powered al lthe time
<apritzel>
hexdump0815: yeah, it's not uncommon that the bus power is hardwired to always on
<hexdump0815>
looks like this is the case here then
jstein has joined #linux-sunxi
mru has quit [Ping timeout: 264 seconds]
<Ashleee>
hexdump0815, RE rk3399 (since you are not in linux-rockchip atm) -- thanks, I used the original whole TPL (or w/e they call it with ddr blob in it) and just overwrote my uboot.img instead ... still the device randomly drops to only 2GB instead of 4GB RAM but at least it works and boots off network :) I think it is down to bad memory chips as it happens with stock android as well
<hexdump0815>
Ashleee: i'm reading it via irclog - so just write to me there and i'll see it :)
<Ashleee>
ah :)
<Ashleee>
already wrote some recap in there some time ago