ChanServ changed the topic of #linux-sunxi to: Allwinner/sunxi development - Did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait for an answer! - This channel is logged at https://oftc.irclog.whitequark.org/linux-sunxi
Danct12 has joined #linux-sunxi
montjoie_ has joined #linux-sunxi
montjoie has quit [Ping timeout: 480 seconds]
wasutton3 has quit []
wasutton3 has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
vagrantc has joined #linux-sunxi
wasutton3 has quit [Ping timeout: 480 seconds]
Daanct12 has joined #linux-sunxi
wasutton3 has joined #linux-sunxi
paulk has quit [Remote host closed the connection]
paulk has joined #linux-sunxi
hexdump0815 has joined #linux-sunxi
hexdump01 has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has joined #linux-sunxi
vagrantc has quit [Quit: leaving]
apritzel has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
bauen1_ has joined #linux-sunxi
warpme has joined #linux-sunxi
bauen1 has quit [Ping timeout: 480 seconds]
DarkNeutrino has quit [Ping timeout: 480 seconds]
DarkNeutrino has joined #linux-sunxi
DarkNeutrino has quit [Ping timeout: 480 seconds]
DarkNeutrino has joined #linux-sunxi
chewitt has quit [Remote host closed the connection]
chewitt has joined #linux-sunxi
junari has joined #linux-sunxi
warpme has quit []
chewitt has quit [Remote host closed the connection]
chewitt has joined #linux-sunxi
kuba2k2 has joined #linux-sunxi
junari has quit [Remote host closed the connection]
junari has joined #linux-sunxi
warpme has joined #linux-sunxi
kuba2k2 has quit [Ping timeout: 480 seconds]
kuba2k2 has joined #linux-sunxi
Schreiber has quit [Ping timeout: 480 seconds]
CornflakeDeath has joined #linux-sunxi
gsz has joined #linux-sunxi
<CornflakeDeath> i've managed to get uart working in u-boot, but all it sends is its version, dram size, cpu frequency and "trying to boot from fel"
<CornflakeDeath> no matter which loglevel i choose in menuconfig. i tried enabling low-level debugging functions but that changed nothing. i also tried to "enable an early debug uart for debugging" but that needs more information like base address, input clock, register shift. when i entered some values i found it would just timeout instead of booting
<CornflakeDeath> what do i even do with this?
kilobyte_ has joined #linux-sunxi
kilobyte1 has quit [Ping timeout: 480 seconds]
<smaeul> CornflakeDeath: if it says "trying to boot from FEL", it is returning control to the boot ROM, so you can execute more FEL commands
<smaeul> what is your sunxi-fel command line?
junari has quit [Ping timeout: 480 seconds]
<smaeul> if you didn't tell it to do anything after the "spl" subcommand, then it's just sitting there waiting
<smaeul> but now you have DRAM initialized, so you can upload/execute some binary like U-Boot proper (and the "uboot" subcommand will do this automatically)
<CornflakeDeath> my commandline is sunxi-fel -v uboot u-boot-sunxi-with-spl.bin write 0x42000000 zImage write 0x43000000 <board>.dtb write 0x43100000 boot.scr
<smaeul> did you get any error from sunxi-fel?
<CornflakeDeath> none at all, it says it's writing image "u-boot...", then "starting u-boot" and exits
<CornflakeDeath> so it's just spl sending stuff over uart and u-boot is staying silent?
<smaeul> right
<smaeul> if you get to "Starting U-Boot (0x%08X).\n" then both SPL and all of the remaining FEL commands executed successfully
<CornflakeDeath> could u-boot's and spl's uart configs be different?
<smaeul> yes. U-Boot proper will use the devicetree for its console
<smaeul> both for choosing a UART and its pinmux
<smaeul> you need both CONFIG_UART0_PORT_F=y and referencing uart0_pf_pins from the uart0 node
<smaeul> U-Boots "debug UART" options can be helpful, but they're annoying because you have to write some C code to set up the clock/reset/pinmux... unless you cheat and use U-Boot with CONFIG_DEBUG_UART=y but SPL with CONFIG_DEBUG_UART=n, and rely on SPL leaving the UART already set up for you
<CornflakeDeath> i switched the device tree to a device that's more similar and still nothing, maybe there's something else going wrong
<CornflakeDeath> sometimes spl sends nothing over uart if i don't run uart0-helloworld-sdboot first
<smaeul> "more similar" doesn't help if that other device doesn't use port F UART
<smaeul> and there are no A13 devices in the U-Boot tree that do at the moment
<smaeul> in fact, the A13 devicetree doesn't have a uart0_pf_pins node, so you'll need to copy that from another SoC
Daanct12 has quit [Quit: WeeChat 4.0.4]
<smaeul> I'm not sure why uart0-helloworld-sdboot would make a difference -- If SPL is configured right, then uart0-helloworld-sdboot won't be necessary, and if SPL is configured wrong, it should break whatever uart0-helloworld-sdboot set up
<CornflakeDeath> i don't get this now. inet 86vs has uart on pf2 and pf4, why would its device tree be set to something else?
<smaeul> any board _can_ have UART on PF2/PF4, but they don't, because they use port F for the microSD card
<smaeul> so arch/arm/dts/sun5i-a13-inet-86vs.dts says to use UART1 on port G for the console
kuba2k2 has quit [Ping timeout: 480 seconds]
<smaeul> you'd need something like `sed -e s/uart1/uart0/ -e s/pg/pf/ arch/arm/dts/sun5i-a13-inet-86vs.dts`, plus copying the uart0_pf_pins node from arch/arm/dts/sun4i-a10.dtsi to arch/arm/dts/sun5i.dtsi
kuba2k2 has joined #linux-sunxi
<CornflakeDeath> okay, now it does get to u-boot, which sends an error: ns16550_serial serial@1c28000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
<smaeul> CornflakeDeath: did you put the uart0_pf_pins node inside the pio node, like it is on the other SoCs?
<smaeul> that error means U-Boot is missing a UCLASS_PINCONFIG device instance for that DT node, but pinconfig_post_bind() should have created such an instance for every node inside the pio node
<CornflakeDeath> sun5i-a13.dtsi has "&pio {" and i pasted that node under there
<CornflakeDeath> under the "compatible" line, is that correct?
<smaeul> yes, that should work
<CornflakeDeath> i tried recompiling it from a completely clean source tree except for these changes and i keep getting the same error
<CornflakeDeath> what even is the issue? it does use uart0 as i wanted it to
kuba2k3 has joined #linux-sunxi
<smaeul> CornflakeDeath: does that error prevent U-Boot from getting to a prompt? can you run the `dm tree` command from a prompt?
pg12 has quit [Remote host closed the connection]
<smaeul> if not, add a call to `dm_dump_tree(false);` from where the error gets printed in drivers/pinctrl/pinctrl-uclass.c
pg12 has joined #linux-sunxi
kuba2k2 has quit [Ping timeout: 480 seconds]
<smaeul> you could also add some debugging to pinconfig_post_bind()
kuba2k3 has quit [Ping timeout: 480 seconds]
kuba2k2 has joined #linux-sunxi
warpme has quit []
<jernej> did you measure time between first and second regulator enablement
<jernej> I suspect that DT workaround isn't good
<jernej> delay is applied after regulator is enabled, at least from what I see
<jernej> montjoie_ ^
bauen1_ has quit [Ping timeout: 480 seconds]
<jernej> hm... maybe ramp delay needs to be moved to reg_gmac_2v5
<jernej> oh, core also needs additional 20 ms to become ready
<jernej> so probably 2 delays are needed
<CornflakeDeath> smaeul: so, the issue was… *drum roll* i was just pressing arrow up and enter to launch it without actually reading the command, so it was running the wrong build every time. it works. thank you again
CornflakeDeath has quit [Quit: Page closed]
vveapon has quit []
vveapon has joined #linux-sunxi
<jernej> montjoie_: another possibility why you might have issue with powering up PHY on OPi3, is that you need TF-A hack or disabling regulators in it altogether. PHY regulators must be powered off at least 100 ms before powering on again, but that can't be described in DT yet.
<jernej> apritzel: maybe we can add DT regulator property for powering down delay?
montjoie_ is now known as montjoie
<montjoie> jernej: did you want to take leadership on this ? I have a slow down of my kerneltime for a least some months
<jernej> montjoie: hasn't been your regulator patch for net subsystem already accepted?
<jernej> I'm a bit confused what's the state here
<jernej> but yes, I can try push forward
<montjoie> only one has been accepter it remains dt and phy patch
<montjoie> i will try to push the current state with some fix added
<jernej> great, please add me in cc
<jernej> montjoie: is https://github.com/montjoie/linux/commits/opi3-v5 ok or does it need any fix?
<jernej> montjoie: interesting observation on my board: initially it works quite slow with scp (17 MB/s), but if you disable and enable interface, it works much faster (47 MB/s)
<montjoie> I need to compare my last next branch, probably the public one is obsolete
stipa has joined #linux-sunxi
kuba2k2 has quit [Ping timeout: 480 seconds]
vagrantc has joined #linux-sunxi
<montjoie> jernej: I found nothing more than this branch, go with it
kuba2k2 has joined #linux-sunxi
<smaeul> jernej: fwiw, regulator subsystem has a concept of minimum off time as "off_on_delay", and fixed-regulator has it in DT as "off-on-delay-us", but there's no generic binding
ad__ has quit []
ad__ has joined #linux-sunxi
mps_ has joined #linux-sunxi
<jernej> I've noticed off_on_delay, but I didn't dig enough to see where is it set
<jernej> but fixed regulator is completely fine here
<jernej> as it is the first regulator that has to be enabled
mps has quit [Ping timeout: 480 seconds]
<jernej> I need to test that theory
mps_ has quit [Ping timeout: 480 seconds]
ad__ has quit []
ad__ has joined #linux-sunxi
ad__ has quit []
ad__ has joined #linux-sunxi
ad__ has quit []
ad__ has joined #linux-sunxi
<jernej> doesn't work
mps has joined #linux-sunxi
JohnDoe_71Rus has quit []
ad__ has quit []
ad__ has joined #linux-sunxi
gsz has quit [Ping timeout: 480 seconds]
<jernej> regulator tracepoints show that AXP regulators are not powered off at boot, if left enabled by bootloader
kuba2k2 has quit [Ping timeout: 480 seconds]
mps has quit [Quit: leaving]
mps has joined #linux-sunxi
evgeny_boger has joined #linux-sunxi
evgeny_boger1 has joined #linux-sunxi
DarkNeutrino has quit [Read error: Connection reset by peer]
DarkNeutrino has joined #linux-sunxi
evgeny_boger has quit [Ping timeout: 480 seconds]
evgeny_boger1 has quit [Ping timeout: 480 seconds]
wasutton3 has quit []
wasutton3 has joined #linux-sunxi
bauen1 has joined #linux-sunxi
vagrantc has quit [Quit: leaving]
ad__ has quit []
ad__ has joined #linux-sunxi