rellla changed the topic of #linux-sunxi to: Allwinner/sunxi /development discussion - did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait! - https://github.com/linux-sunxi/ - Logs at http://irclog.whitequark.org/linux-sunxi - *only registered users can talk*
mmarc__ has quit [Ping timeout: 272 seconds]
lurchi_ is now known as lurchi__
indy has quit [Quit: ZNC - http://znc.sourceforge.net]
xzz53 has quit [Quit: ZNC 1.7.3 - https://znc.in]
xzz53 has joined #linux-sunxi
black_ink has quit [Quit: ZNC 1.7.3 - https://znc.in]
black_ink has joined #linux-sunxi
lkcl has quit [Ping timeout: 256 seconds]
gaston1980 has joined #linux-sunxi
lkcl has joined #linux-sunxi
<apritzel> smaeul: Can you confirm that this CPUIDLE hardware feature in the H6 and later waits for the core the enter WFI?
lkcl has quit [Ping timeout: 264 seconds]
Mangy_Dog has quit [Remote host closed the connection]
gaston1980 has quit [Quit: Konversation terminated!]
Wizzup has quit [Ping timeout: 240 seconds]
gaston1980 has joined #linux-sunxi
lkcl has joined #linux-sunxi
jstein has quit [Quit: quit]
lerc_ has joined #linux-sunxi
Wizzup has joined #linux-sunxi
<apritzel> smaeul: and not only delaying the sequence for some amount of time?
lerc has quit [Ping timeout: 258 seconds]
ganbold has joined #linux-sunxi
lkcl has quit [Ping timeout: 264 seconds]
apritzel has quit [Ping timeout: 256 seconds]
victhor has quit [Ping timeout: 264 seconds]
azend has quit [Ping timeout: 256 seconds]
lkcl has joined #linux-sunxi
gaston1980 has quit [Quit: Konversation terminated!]
cnxsoft has joined #linux-sunxi
ChriChri_ has joined #linux-sunxi
ChriChri has quit [Ping timeout: 240 seconds]
ChriChri_ is now known as ChriChri
azend has joined #linux-sunxi
lkcl has quit [Ping timeout: 240 seconds]
s_frit has quit [Remote host closed the connection]
s_frit has joined #linux-sunxi
lurchi_ has joined #linux-sunxi
lurchi__ has quit [Ping timeout: 240 seconds]
random_yanek has quit [Ping timeout: 260 seconds]
random_yanek has joined #linux-sunxi
lkcl has joined #linux-sunxi
reinforce has joined #linux-sunxi
cmeerw has joined #linux-sunxi
lkcl has quit [Ping timeout: 256 seconds]
indy has joined #linux-sunxi
apritzel has joined #linux-sunxi
lkcl has joined #linux-sunxi
hlauer has joined #linux-sunxi
apritzel has quit [Ping timeout: 272 seconds]
mmarc__ has joined #linux-sunxi
cmeerw has quit [Ping timeout: 260 seconds]
mmarc__ has quit [Remote host closed the connection]
mmarc__ has joined #linux-sunxi
mmarc__ has quit [Ping timeout: 264 seconds]
lurchi_ is now known as lurchi__
rojiro has quit [Remote host closed the connection]
rojiro has joined #linux-sunxi
lkcl has quit [Ping timeout: 272 seconds]
mmarc__ has joined #linux-sunxi
lkcl has joined #linux-sunxi
aballier_ has joined #linux-sunxi
ldevulder_ has quit [Ping timeout: 240 seconds]
aballier has quit [Ping timeout: 264 seconds]
matthias_bgg has joined #linux-sunxi
mmarc__ has quit [Remote host closed the connection]
mmarc__ has joined #linux-sunxi
mmarc__ has quit [Ping timeout: 272 seconds]
ldevulder has joined #linux-sunxi
ndufresne2 has joined #linux-sunxi
ndufresne has quit [Read error: Connection reset by peer]
ndufresne2 is now known as ndufresne
mmarc__ has joined #linux-sunxi
mmarc__ has quit [Ping timeout: 272 seconds]
mmarc__ has joined #linux-sunxi
damex has quit [Ping timeout: 246 seconds]
lurchi__ is now known as lurchi_
ldevulder_ has joined #linux-sunxi
ldevulder_ has quit [Excess Flood]
ldevulder_ has joined #linux-sunxi
ldevulder has quit [Ping timeout: 240 seconds]
damex has joined #linux-sunxi
prefixcactus has joined #linux-sunxi
pCactus has quit [Ping timeout: 256 seconds]
kaspter has joined #linux-sunxi
prefixcactus has quit [Ping timeout: 240 seconds]
pCactus has joined #linux-sunxi
damex has quit [Ping timeout: 240 seconds]
ndufresne2 has joined #linux-sunxi
nashpa has quit [Quit: Going away]
nashpa has joined #linux-sunxi
ndufresne has quit [Ping timeout: 272 seconds]
zumbi has quit [Ping timeout: 272 seconds]
ndufresne2 is now known as ndufresne
mripard has quit [Ping timeout: 272 seconds]
tuxillo has quit [Ping timeout: 272 seconds]
wens has quit [Ping timeout: 246 seconds]
zumbi has joined #linux-sunxi
wens has joined #linux-sunxi
mripard has joined #linux-sunxi
<daregap> Good day. I'd like to put the u-boot image on a SPI NOR flash chip. The board (pcduino 3 nano) originally doesn't have one, but I will add it via the pins. What steps are needed to compile a working SPI flash u-boot image? The wiki says I only need to enable "CONFIG_SPL_SPI_SUNXI=y" after loading the board defconfig.
<daregap> Is that it or are any more modifications needed?
<daregap> The board is AllWinner A20
<plaes> hopefully yes, if you're using the default SPI bus
tbueno has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
kaspter has quit [Quit: kaspter]
<daregap> And I can just burn the image onto the flash chip directly at offset 0 (start of flash data)?
<daregap> I guess I'll give it a try.
tbueno has joined #linux-sunxi
tbueno has quit [Client Quit]
tbueno has joined #linux-sunxi
<plaes> yeah, there even fel utility for that
<daregap> Can I use flashrom instead?
<daregap> I have an external SPI flash programmer
<daregap> CH341A:
<karlp> are you famililar with that tool already?
<daregap> yes
<daregap> I've flashed several Winbond BIOS chips with it
<daregap> I'll probably have to use a layout file since the uboot image and the flash size mismatch
victhor has joined #linux-sunxi
apritzel has joined #linux-sunxi
ScrumpyJack has joined #linux-sunxi
<apritzel> daregap: yes, if you just put u-boot-sunxi-with-spl.bin at offset 0 it should work
<apritzel> daregap: can fill the rest up with whatever you like
<daregap> yeah, was just about to ask what file to flash. The compiler created so many images with different names.
<apritzel> daregap: but keep in mind that you need to use the SPI0 pins on PortC, so PC0-2 for MOSI/MISO/CLK and PC23 for CS
<daregap> thanks
<apritzel> (for instance on the BananaPi M1 there is SPI0 on the headers, but from the PortI pins, so booting doesn't work)
tbueno has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
tbueno has joined #linux-sunxi
<daregap> PI10, PI11, PI12, PI13
mmarc__ has quit [Remote host closed the connection]
tbueno has quit [Client Quit]
<daregap> on A20
tbueno has joined #linux-sunxi
<apritzel> booting won't work from those pins, the BootROM configures the pinmux on PortC, and there is nothing we can do about it (it's ROM, after all, baked into the A20)
<daregap> damn
<daregap> well, there goes my idea out the window
<apritzel> sorry about that!
tbueno has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<apritzel> on other boards it works this way, I once booted a Pine64 through the header pins
tbueno has joined #linux-sunxi
<daregap> okay, planB = u-boot on NAND.
Mangy_Dog has joined #linux-sunxi
<daregap> Although I could try verifying that it doesn't work by wiring an oscilloscope to the SPI MOSI/CLK pin and confirming there is no traffic on them upon booting
tbueno has quit [Client Quit]
tbueno has joined #linux-sunxi
lurchi_ is now known as lurchi__
prefixcactus has joined #linux-sunxi
prefixcactus_ has joined #linux-sunxi
pCactus has quit [Ping timeout: 246 seconds]
prefixcactus_ is now known as qCactus
qCactus has left #linux-sunxi [#linux-sunxi]
qCactus has joined #linux-sunxi
qCactus has left #linux-sunxi [#linux-sunxi]
qCactus has joined #linux-sunxi
<qCactus> am I unmuted now?
mmarc__ has joined #linux-sunxi
<karlp> I can see you at least.
<qCactus> I am then
<qCactus> apritzel: so, where would you recommend I start? just substitute my mainline non-SPL uboot bin after forlinx's boot0, or try to concoct the SPL-boot0 frankenstein?
<qCactus> also, what's the difference between mainline u-boot and sunxi-uboot anyway?
<qCactus> i.e. what is in sunxi-uboot that is not present in mainline
lurchi__ is now known as lurchi_
mmarc__ has quit [Remote host closed the connection]
mmarc__ has joined #linux-sunxi
mmarc__ has quit [Ping timeout: 272 seconds]
mmarc__ has joined #linux-sunxi
tuxillo has joined #linux-sunxi
chewitt has joined #linux-sunxi
<apritzel> qCactus: what do you mean with "sunxi-uboot", exactly? The one shipped by the board vendor / Allwinner?
<qCactus> I meant the uboot-sunxi repo
<qCactus> but differences vs the one shipped by allwinner are something I'm not aware of either
<qCactus> apritzel: yes
<qCactus> that one
<apritzel> so this particular github repo is mostly outdated, AFAICT
<apritzel> I *think* this was the development vehicle in the early days
<apritzel> *before* everything was merged into mainline
<apritzel> qCactus: I would say you can ignore that
<apritzel> what Allwinner ships is .... I don't really have words for that
<apritzel> it's mostly just good enough to load Android
<apritzel> mainline U-Boot is superior in almost all regards (code quality *and* feature support)
<apritzel> if there is something missing, I want to know about it
<apritzel> so not using mainline U-Boot is a waste of time, if you ask me
<qCactus> I was mostly wondering if I could steal some code from there to get going and figure out what's missing
<qCactus> and when it does get going, merge the necessary bits in
<apritzel> Allwinner U-Boot does not contain any DRAM code
<apritzel> that's all in their closed source boot0 blob, which replaces the SPL
<qCactus> why the eff do they keep boot0 closed source, anyway?
<qCactus> seems like the only thing this accomplishes is hurting adoption of the family
<KotCzarny> trade secrets, NDAs etc
<qCactus> Allwinner doesn't sell software, after all, they sell the chips
<apritzel> don't ask "why" questions when it comes to Allwinner design decisions
<apritzel> that only gives you headaches
<KotCzarny> they sell their chips with android bsp usually
<apritzel> software is almost as important as the hardware to any customers (customers as in board vendors, that buy chips and sell products with it)
<apritzel> so no one would buy Allwinner chips if they wouldn't also provide a software stack with in (that is good enough to run some Android)
<apritzel> why Allwinner doesn't do it properly in the mainline is another question (which is more complex than it seems)
<KotCzarny> because then they would have to align with mainline software rules
<KotCzarny> and now they mostly have code guy(s) that has to 'make it work' only
<apritzel> ... and reinvent multiple wheels several times
<apritzel> eventually wasting *much* more time than they originally tried to save
<apritzel> qCactus: what still puzzles me is that your memtest passes, so I am still unsure if DRAM is the actual cause of your problems
<qCactus> Me too
ldevulder_ is now known as ldevulder
<qCactus> Maybe my code is faulty, though, but I can't see it.
<qCactus> I can pastebin it and maybe someone else could spot the problem
<apritzel> qCactus: yeah, I wanted to ask for that already
lurchi_ is now known as lurchi__
lurchi__ is now known as lurchi_
lkcl has quit [Ping timeout: 240 seconds]
qCactus has quit [Quit: Leaving for Mars]
qCactus has joined #linux-sunxi
lkcl has joined #linux-sunxi
mmarc__ has quit [Remote host closed the connection]
mmarc__ has joined #linux-sunxi
pCactus has joined #linux-sunxi
prefixcactus has quit [Read error: Connection reset by peer]
mmarc__ has quit [Ping timeout: 240 seconds]
qCactus is now known as prefixcactus
mmarc__ has joined #linux-sunxi
lurchi_ is now known as lurchi__
elros1 has joined #linux-sunxi
reinforce has quit [Quit: Leaving.]
pCactus has quit [Read error: Connection reset by peer]
pCactus has joined #linux-sunxi
mmarc__ has quit [Remote host closed the connection]
mmarc__ has joined #linux-sunxi
mmarc___ has joined #linux-sunxi
mmarc__ has quit [Ping timeout: 272 seconds]
JohnDoe_71Rus has joined #linux-sunxi
netlynx has joined #linux-sunxi
netlynx has quit [Changing host]
netlynx has joined #linux-sunxi
<smaeul> apritzel: yes, this was my original code, which prints 33 lines of output to a 115200 baud UART between setting the bit and WFI: https://tpaste.us/kkj7
<smaeul> so if there is a timeout, it's a rather large one
<smaeul> because the output was never cut off
<apritzel> smaeul: oh cool, I tried something quick yesterday from U-Boot, but can't write to the R_CPUCFG registers from EL2
<smaeul> yep :) to do any exploring, I had to drop ATF and run U-Boot in EL3
<smaeul> still, I will write some code to record the register changes from the ARISC side over the weekend
<apritzel> your result sounds good enough, just wanted to make sure that we survive the time between sunxi_pwr_domain_off() and psci_power_down_wfi()
<apritzel> smaeul: btw, as this just came up internally: do you care about supporting -O0 for the Allwinner TF-A port?
<apritzel> smaeul: this would break our upcoming nifty conditional compilation tricks, and I argue for -O0 being pointless in any case, so am pushing for making this a per-platform decision (with sunxi opting out)
<smaeul> I have no use for -O0, though I don't know what it would break except wasting/overflowing SRAM
rzerres has quit [Remote host closed the connection]
<smaeul> if they want new optimization options, we should instead push for -flto :D
<apritzel> smaeul: I think it's some 1990's narrative of "-O0 is easier to debug", which I disagree with, especially in 2021
<apritzel> smaeul: many tricks to avoid those pesky #ifdefs rely on toolchain garbage collection and at least some basic level of optimisation, which is not in effect with -O0
<apritzel> smaeul: Linux is documenting this explicitly, and only allows to allow -O0 for single file, if *really* needed
<karlp> -Og ...
<karlp> -O0 is garbage
<apritzel> yes, -O0 is *painful* to read, it's a lot of facepalming ...
<apritzel> I think the killer argument is that -O0 is not the code that actually runs, so you are debugging something else entirely
sunshavi has quit [Ping timeout: 264 seconds]
<karlp> 100% agreed
<apritzel> and the most interesting bugs are actually happening due to the compiler exercising its freedom to optimise, which is not happening with -O0
<apritzel> smaeul: btw: with -O the compiler would optimise conditional calls away, if the condition is static: so if (scpi_available) scpi_set_css_power_state(...) will break linking if scpi_set_css_power_state() is not defined
matthias_bgg has quit [Quit: Leaving]
prefixcactus has quit [Remote host closed the connection]
<apritzel> smaeul: ^^ -Ox will *not* break linking, but -O0 will
cmeerw has joined #linux-sunxi
elros1 has quit [Remote host closed the connection]
mmarc___ has quit [Remote host closed the connection]
mmarc__ has joined #linux-sunxi
mmarc__ has quit [Ping timeout: 272 seconds]
rzerres has joined #linux-sunxi
sunshavi has joined #linux-sunxi
rzerres has quit [Client Quit]
rzerres has joined #linux-sunxi
hlauer has quit [Ping timeout: 246 seconds]
rzerres has quit [Quit: ZNC 1.7.5 - https://znc.in]
rzerres has joined #linux-sunxi
vagrantc has joined #linux-sunxi
andy25225 has quit [Ping timeout: 240 seconds]
prefixcactus has joined #linux-sunxi
pCactus has quit [Read error: Connection reset by peer]
pCactus has joined #linux-sunxi
prefixcactus has quit [Ping timeout: 246 seconds]
mmarc__ has joined #linux-sunxi
lucascastro has quit [Ping timeout: 256 seconds]
andy25225 has joined #linux-sunxi
mmarc__ has quit [Ping timeout: 265 seconds]
lucascastro has joined #linux-sunxi
AndroUkeie has joined #linux-sunxi
AndroUkeie has quit [Read error: Connection reset by peer]
AndroUkeie has joined #linux-sunxi
lucascastro has quit [Ping timeout: 240 seconds]
AndroUkeie has quit [Read error: Connection reset by peer]
mmarc__ has joined #linux-sunxi
AndroUkeie has joined #linux-sunxi
AndroUkeie has quit [Read error: Connection reset by peer]
pCactus has quit [Read error: Connection reset by peer]
prefixcactus has joined #linux-sunxi
JohnDoe_71Rus has quit [Quit: KVIrc 5.0.1 Aria http://www.kvirc.net/]
prefixcactus has quit [Read error: Connection reset by peer]
pCactus has joined #linux-sunxi
prefixcactus has joined #linux-sunxi
pCactus has quit [Ping timeout: 265 seconds]
lucascastro has joined #linux-sunxi
mmarc__ has quit [Remote host closed the connection]
DrFrankensteinUK has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
DrFrankensteinUK has joined #linux-sunxi
rzerres has quit [Read error: Connection reset by peer]
rzerres has joined #linux-sunxi
dddddd__ has joined #linux-sunxi
hlauer has joined #linux-sunxi
dddddd_ has quit [Ping timeout: 256 seconds]
dddddd_ has joined #linux-sunxi
s_frit has quit [Remote host closed the connection]
s_frit has joined #linux-sunxi
dddddd__ has quit [Ping timeout: 256 seconds]
mmarc__ has joined #linux-sunxi
dddddd__ has joined #linux-sunxi
dddddd_ has quit [Ping timeout: 256 seconds]
andy25225 has quit [Ping timeout: 240 seconds]
dddddd__ has quit [Ping timeout: 256 seconds]
dddddd has joined #linux-sunxi
netlynx has quit [Quit: Ex-Chat]
andy25225 has joined #linux-sunxi
gaston1980 has joined #linux-sunxi
<karlp> wat? surely that's a product of -fffunction-sections and -gc-sections, not -Ox?
lucascastro has quit [Remote host closed the connection]
lucascastro has joined #linux-sunxi
cmeerw has quit [Ping timeout: 240 seconds]
lurchi__ is now known as lurchi_
hlauer has quit [Ping timeout: 272 seconds]
mmarc__ has quit [Remote host closed the connection]
mmarc__ has joined #linux-sunxi
lurchi_ is now known as lurchi__
mmarc__ has quit [Ping timeout: 265 seconds]
<apritzel> karlp: with -O0 the compiler won't optimise the if statement (constant in this case) away, so it still retains the reference to the scpi_set_css_power_state symbol (which we don't have)
<apritzel> karlp: there is a bit more to this than shown in this statement
<apritzel> karlp: I think this example illustrates it: https://pastebin.com/rAEqBqJ4, try compiling this without -lm, once with -O0, once with -O
gaston1980 has quit [Quit: Konversation terminated!]
gaston1980 has joined #linux-sunxi
gaston1980 has quit [Client Quit]
linkmauve has quit [Ping timeout: 256 seconds]
Mangy_Dog has quit [Ping timeout: 272 seconds]