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
megi2 has quit []
megi has joined #linux-sunxi
cnxsoft has joined #linux-sunxi
macromorgan has quit [Read error: Connection reset by peer]
macromorgan has joined #linux-sunxi
macromorgan is now known as Guest1217
Guest1217 has quit [Read error: Connection reset by peer]
macromorgan has joined #linux-sunxi
mripard has quit [Ping timeout: 480 seconds]
apritzel has quit [Ping timeout: 480 seconds]
_whitelogger has joined #linux-sunxi
Luke-Jr has quit [Remote host closed the connection]
wens has quit [Server closed connection]
wens has joined #linux-sunxi
Net147 has quit [Server closed connection]
Net147 has joined #linux-sunxi
Luke-Jr has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
samueldr has quit [nucleus.oftc.net coherence.oftc.net]
jakllsch has quit [nucleus.oftc.net coherence.oftc.net]
Luke-Jr has quit [nucleus.oftc.net coherence.oftc.net]
Asara has quit [nucleus.oftc.net coherence.oftc.net]
smaeul has quit [nucleus.oftc.net coherence.oftc.net]
cnxsoft has quit [nucleus.oftc.net coherence.oftc.net]
pnill_ has quit [nucleus.oftc.net coherence.oftc.net]
diveben has quit [nucleus.oftc.net coherence.oftc.net]
sunshavi_ has quit [nucleus.oftc.net coherence.oftc.net]
gnarface has quit [nucleus.oftc.net coherence.oftc.net]
NekoMay has quit [nucleus.oftc.net coherence.oftc.net]
cyrozap has quit [nucleus.oftc.net coherence.oftc.net]
sauce has quit [nucleus.oftc.net coherence.oftc.net]
Benjojo has quit [nucleus.oftc.net coherence.oftc.net]
clever has quit [nucleus.oftc.net coherence.oftc.net]
megi has quit [nucleus.oftc.net coherence.oftc.net]
bantu has quit [nucleus.oftc.net coherence.oftc.net]
paulk1 has quit [nucleus.oftc.net coherence.oftc.net]
hallyn has quit [nucleus.oftc.net coherence.oftc.net]
evgeny_boger has quit [nucleus.oftc.net coherence.oftc.net]
pmp-p has quit [nucleus.oftc.net coherence.oftc.net]
JohnDoe_71Rus has quit [nucleus.oftc.net coherence.oftc.net]
shosie has quit [nucleus.oftc.net coherence.oftc.net]
z3ntu has quit [nucleus.oftc.net coherence.oftc.net]
uis has quit [nucleus.oftc.net coherence.oftc.net]
jernej has quit [nucleus.oftc.net coherence.oftc.net]
chewitt has quit [nucleus.oftc.net coherence.oftc.net]
aggi has quit [nucleus.oftc.net coherence.oftc.net]
libv has quit [nucleus.oftc.net coherence.oftc.net]
prefixcactus has quit [nucleus.oftc.net coherence.oftc.net]
heap01_ has quit [nucleus.oftc.net coherence.oftc.net]
swiftgeek has quit [nucleus.oftc.net coherence.oftc.net]
sajattack[m] has quit [nucleus.oftc.net coherence.oftc.net]
renze_ has quit [nucleus.oftc.net coherence.oftc.net]
vpeter has quit [nucleus.oftc.net coherence.oftc.net]
Guest7735 has quit [nucleus.oftc.net coherence.oftc.net]
PPA has quit [nucleus.oftc.net coherence.oftc.net]
DavidHeidelberg[m] has quit [nucleus.oftc.net coherence.oftc.net]
aedancullen has quit [nucleus.oftc.net coherence.oftc.net]
Tooniis[m] has quit [nucleus.oftc.net coherence.oftc.net]
rellla has quit [nucleus.oftc.net coherence.oftc.net]
ndufresne has quit [nucleus.oftc.net coherence.oftc.net]
pg12 has quit [nucleus.oftc.net coherence.oftc.net]
DuClare has quit [nucleus.oftc.net coherence.oftc.net]
menomc has quit [nucleus.oftc.net coherence.oftc.net]
aperezdc has quit [nucleus.oftc.net coherence.oftc.net]
AntoniAloyTorrens[m] has quit [nucleus.oftc.net coherence.oftc.net]
diego71 has quit [nucleus.oftc.net coherence.oftc.net]
maz has quit [nucleus.oftc.net coherence.oftc.net]
arti has quit [nucleus.oftc.net coherence.oftc.net]
igraltist_1 has quit [nucleus.oftc.net coherence.oftc.net]
kmaincent has quit [nucleus.oftc.net coherence.oftc.net]
Esmil has quit [nucleus.oftc.net coherence.oftc.net]
t4h4[m] has quit [nucleus.oftc.net coherence.oftc.net]
cmeerw[m] has quit [nucleus.oftc.net coherence.oftc.net]
evadot has quit [nucleus.oftc.net coherence.oftc.net]
Nemo_bis has quit [nucleus.oftc.net coherence.oftc.net]
jelly has quit [nucleus.oftc.net coherence.oftc.net]
indy has quit [nucleus.oftc.net coherence.oftc.net]
ftg has quit [nucleus.oftc.net coherence.oftc.net]
mehdix has quit [nucleus.oftc.net coherence.oftc.net]
plaes has quit [nucleus.oftc.net coherence.oftc.net]
dittid[m] has quit [nucleus.oftc.net coherence.oftc.net]
oliv3r[m] has quit [nucleus.oftc.net coherence.oftc.net]
pgwipeout[m] has quit [nucleus.oftc.net coherence.oftc.net]
montjoie has quit [nucleus.oftc.net coherence.oftc.net]
ynezz has quit [nucleus.oftc.net coherence.oftc.net]
jemk_ has quit [nucleus.oftc.net coherence.oftc.net]
gamiee has quit [nucleus.oftc.net coherence.oftc.net]
Newbyte has quit [nucleus.oftc.net coherence.oftc.net]
dliviu has quit [nucleus.oftc.net coherence.oftc.net]
kilobyte_ch has quit [nucleus.oftc.net coherence.oftc.net]
rtp has quit [nucleus.oftc.net coherence.oftc.net]
Jacmet has quit [nucleus.oftc.net coherence.oftc.net]
insep has quit [nucleus.oftc.net coherence.oftc.net]
milek7 has quit [nucleus.oftc.net coherence.oftc.net]
JuniorJPDJ has quit [nucleus.oftc.net coherence.oftc.net]
ats has quit [nucleus.oftc.net coherence.oftc.net]
psydroid[m]1 has quit [nucleus.oftc.net coherence.oftc.net]
MatrixTravelerbot[m] has quit [nucleus.oftc.net coherence.oftc.net]
juri_ has quit [nucleus.oftc.net coherence.oftc.net]
veremitz has quit [nucleus.oftc.net coherence.oftc.net]
karlp has quit [nucleus.oftc.net coherence.oftc.net]
ad__ has quit [nucleus.oftc.net coherence.oftc.net]
macromorgan has quit [nucleus.oftc.net coherence.oftc.net]
anarsoul has quit [nucleus.oftc.net coherence.oftc.net]
vagrantc has quit [nucleus.oftc.net coherence.oftc.net]
key2__ has quit [nucleus.oftc.net coherence.oftc.net]
linusw__ has quit [nucleus.oftc.net coherence.oftc.net]
lvrp16__ has quit [nucleus.oftc.net coherence.oftc.net]
arnd_ has quit [nucleus.oftc.net coherence.oftc.net]
Turl has quit [nucleus.oftc.net coherence.oftc.net]
buZz has quit [nucleus.oftc.net coherence.oftc.net]
NishanthMenon has quit [nucleus.oftc.net coherence.oftc.net]
narmstrong has quit [nucleus.oftc.net coherence.oftc.net]
palmer has quit [nucleus.oftc.net coherence.oftc.net]
Nemo_bis has joined #linux-sunxi
insep has joined #linux-sunxi
psydroid[m]1 has joined #linux-sunxi
sunshavi_ has joined #linux-sunxi
Benjojo_ has joined #linux-sunxi
apritzel has joined #linux-sunxi
sunshavi_ has quit [Remote host closed the connection]
sunshavi_ has joined #linux-sunxi
hlauer has joined #linux-sunxi
cnxsoft has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
mripard has joined #linux-sunxi
pnill has joined #linux-sunxi
sunshavi_ has quit [synthon.oftc.net weber.oftc.net]
sunshavi has joined #linux-sunxi
clever has joined #linux-sunxi
sh1 has joined #linux-sunxi
gnarface has joined #linux-sunxi
cyrozap has joined #linux-sunxi
diveben has joined #linux-sunxi
Ultrasauce has joined #linux-sunxi
NekoMay has joined #linux-sunxi
apritzel has joined #linux-sunxi
evgeny_boger has joined #linux-sunxi
<apritzel> is there a problem with the Wiki? I get the "good ol'" Cloudflare Error 502, even with the proper https:// prefix
<gamiee> yes, same for me
rajkosto has joined #linux-sunxi
menomc has left #linux-sunxi [#linux-sunxi]
mnemoc has joined #linux-sunxi
<libv> hrm, i lost sight of the migration
<libv> let me restart the php5
<libv> and i should be able to spend time on the migration again by next week, next to chasing the few fosdem speakers for the graphics devroom
<libv> php restarted, works now
<libv> thanks for the heads up!
<apritzel> libv: indeed it works again, many thanks!
<libv> apritzel: the price will be that you will be tapped as a guinea pig for the migrated wiki somewhere next week ;)
<apritzel> libv: fair enough ...
<apritzel> can someone with some interest/experience in those poor ARM9 Allwinner SoCs have a look at the Wiki?
<apritzel> for instance what's this F1C100 (without the "s")? Is that an actual different thing?
<apritzel> and I read on the webs that the F1C200s is a pin compatible version of the F1C100s, but with 64MB of DRAM. Is that true, and can someone add this information?
<apritzel> macromorgan: can you please test the power plug-in patches I sent out? I test compiled on all sunxi board, and will have a try tonight on one of my boards, but it would be good to see if that works for you, still ;-)
<macromorgan> okay
<macromorgan> let me fire up one of my sacrificial CHIPs (the NAND lifespan is finite after all)...
<libv> apritzel: wasn't there someone asking about those on either irc or the ml several moons ago?
<libv> the arm9 ones
<apritzel> libv: yeah, interest seemed to have bubbled up a bit lately, there was (another) post for mainline U-Boot support about two weeks ago
<apritzel> but apparently this is very embedded, with many people cooking up their own solutions, and that bitrotting somewhere
<apritzel> support is in the kernel for three years now, but without USB, SPI, MMC, although those apparently work by just adding the DT nodes ...
rajkosto has quit [Read error: Connection reset by peer]
cnxsoft has quit []
<libv> has there been many instances of this hardware anyway, all i remember is that they were mostly used for picture frames
<libv> oh, licheepi nano
<libv> which is out of stock
<libv> at least distrelec has a few still
<apritzel> libv: yeah, not easy to get, and not as cheap (anymore?) as they were actually promised ...
<smaeul> btw relating to the wiki migration, page subscription emails contain (now-broken) http:// links. those need to be changed to use https://
<libv> smaeul: good point, thanks :)
JohnDoe_71Rus has joined #linux-sunxi
<macromorgan> apritzel: the patches don't work on a clean buildtree/CHIP_defconfig. I'll troubleshoot and see if it's an option we're missing or something else.
<macromorgan> fixed it... in the board/sunxi/board.c file change "IS_ENABLED(AXP_DISABLE_BOOT_ON_POWERON)" to "IS_ENABLED(CONFIG_AXP_DISABLE_BOOT_ON_POWERON)"
<macromorgan> now it works for me
<apritzel> macromorgan: indeed, many thanks for testing and pointing this out. I replied to the email
<macromorgan> cool... testing the sunxi-tools now
<macromorgan> not working, but want to see if it's my fault or not
<apritzel> let me order that LicheePi, but it will take two weeks ... ;-)
<macromorgan> yep, it's not booting
<macromorgan> sunxi-tools-apritzel is the f1c100 branch on your github, and sunxi-tools is the f1c100s-spiflash branch from icenowy's github
<apritzel> macromorgan: many thanks for testing, I will stare at the code again ...
<macromorgan> I'd be happy with my lichee pi if I could just get the damn thing to boot from SPI flash. I haven't looked more closely at it though
<gamiee> macromorgan: maybe SPL SPI driver missing ? (Just guess)
<macromorgan> it is missing, however I see an option that basically alludes to the BROM being able to read the SPI and load U-Boot too?
<macromorgan> CONFIG_SPL_SPI_SUNXI
<macromorgan> not sure how CONFIG_SPL_SPI_SUNXI works or if I'm even doing it right though
<apritzel> macromorgan: let's try to walk before we run ...
<macromorgan> aww... but I'm ready to move onto a UBIFS root on the SPI chip :-)
<apritzel> there are three separate things for SPI:
<apritzel> 1) the ability of sunxi-fel to access the SPI flash - this is the most convenient method of writing something there, but independent from actual booting
<apritzel> 2) the ability of the SPL to load U-Boot proper from SPI flash, when it was loaded by the BROM from there. This is what CONFIG_SPL_SPI_SUNXI enables, and it requires arch/arm/mach-sunxi/spl_spi_sunxi.c to support the SoC
<apritzel> 3) the ability of U-Boot proper (or Linux) to access the SPI flash, this is mostly governed by the right DT nodes, the drivers look alright, IIRC
<apritzel> macromorgan: what you tested is pure FEL boot, totally independent of any SPI flash
<macromorgan> so far I've tested the BROM loading the SPL stage from SPI flash (successful), SPL loading the U-Boot stage from SPI flash (failed), U-Boot reading from the SPI flash (successful with patches that need to be upstreamed), and Linux reading the SPI flash (successful with patches that need to be upstreamed)
<macromorgan> I've basically monkey-patched some stuff out of Icenowy's kernel and u-boot trees with success. The only missing part for me currently is jumping from SPL to U-Boot.
aggi has joined #linux-sunxi
<macromorgan> when I try I get "SPL: Unsupported Boot Device!" followed by "Trying to boot from sunxi SPI" at which point it stops
<macromorgan> the SPI flash however can probe and be read/written to successfully in U-Boot: "SF: Detected xt25f128b with page size 256 Bytes, erase size 4 KiB, total 16 MiB"
<macromorgan> in Linux among other things that SPI flash chip isn't supported yet (I actually submitted it upstream several months ago for the Odroid Go Advance). Upstream is waiting on a way to handle ID collisions because that flash ID collides with another vendor and doesn't honor the continuation bit like it should.
<apritzel> is the exact model really critical? I thought that there is a common set of basic commands that work across most SPI flash chips?
<apritzel> macromorgan: with what U-Boot version did you test the SPI booting? What Jesse sent does not include the required spl_spi_sunxi.c fixes
<macromorgan> I tried the 24 patch set (the older one) that I rebased on master 2 days ago
<apritzel> were there conflicts in spl_spi_sunxi.c?
<apritzel> if the base is older than a year, there are some non-trivial conflicts to resolve
<macromorgan> I don't remember honestly, but it was trivial I think for that file
<macromorgan> no, actually that was one of the ones that applied cleanly
<apritzel> this one is from July, so is probably fine
<macromorgan> I guess for now we'll just mainline the newer series and work on the SPI over time?
<apritzel> macromorgan: yes
<apritzel> macromorgan: can you run my sunxi-fel again, but use "spl" instead of "uboot" on the command line?
<apritzel> and then see if FEL is still alive afterwards, for instance by just trying a "sunxi-fel ver"?
<apritzel> (you might need to use spl/sunxi-spl.bin from the U-Boot build directory for that to work)
<macromorgan> negative... after the "Executing the SPL... done." line I get an error of "usb_bulk_send() ERROR -7: Operation timed out"
<macromorgan> that's with just the sunxi-spl.bin file
<apritzel> bummer, but thanks for trying!
<macromorgan> so one thing I notice... the SRAM address is 0, but the datasheet says it's 0x10000... that's something we should adjust right?
<macromorgan> I guess not
<apritzel> ah, of course ...
<apritzel> let me spin a patch ...
<apritzel> macromorgan: can you prepend a "1" to all addresses (in f1c100s_sram_swap_buffers[] and in the soc_id definition), then add ".spl_addr = 0x10000"?
<apritzel> although I don't understand how that works with the other branch then ...
<macromorgan> negative
<macromorgan> also while I see in the datasheet (looking at the f1c200s actually) the sram starts at 0x10000, when I update U-Boot to that it no longer works...
<apritzel> yeah, SRAM at 64K sounds odd for such an old chip, tbh, but that's indeed what the manual says (although it wouldn't be the first mistake there)
<apritzel> macromorgan: and thinking about it: I think it wouldn't have come that far if that would be wrong
<macromorgan> okay
<macromorgan> well it is 0 despite the data sheet then I guess
vagrantc has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
<macromorgan> who has 2 thumbs up and got SPI booting working? *this guy*
<macromorgan> this patch is what does it, however it has a bug in it: https://patchwork.ozlabs.org/project/uboot/patch/20210725231636.879913-7-me@yifangu.com/
<macromorgan> basically that patch tells every instance that we have an sun6i SPI controller (which for all intents and purposes we do), however the base address is the same as the sun4i controller.
<macromorgan> meaning we need to update spi0_base_address() to return the correct base address in the event that is_sun6i_gen_spi() is false but IS_ENABLED(CONFIG_MACH_SUNIV) is true
<macromorgan> when your patches get mainlined I'll push SPI to mainline
JohnDoe_71Rus has quit []
apritzel has joined #linux-sunxi
<apritzel> macromorgan: mmh, I thought I saw this address change in some SPI patch, but it must have been the sunxi-fel code
<apritzel> macromorgan: is it just one patch on top of 11/11 that make SPI booting work?
<macromorgan> I dunno, I did my test with the 24 patch series, I'll try again in a bit with the 11 patch series (I'm working on the kernel now that I have a functioning bootloader)
<macromorgan> even has a spiffy splashscreen from U-Boot
<apritzel> macromorgan: don't boot on power plug works on my BananaPi
<macromorgan> cool
<macromorgan> changing that one line fixed it on my CHIP too
<apritzel> I will wait for a few days if someone has comments on the AXP patch
<macromorgan> patches 5-8 from this series plus the fix I mention above (correcting the logic to select the base address of the SPI controller) is all you need to enable SPI flash booting from SPL on U-Boot: https://patchwork.ozlabs.org/project/uboot/list/?series=255112
<macromorgan> again, on top of the 11 patch series you are working on
<macromorgan> so when it's upstreamed I'll rebase this and push it forward
<apritzel> macromorgan: patch 05/27 is in 09/11
<apritzel> and 07/27 and 08/27 are not needed for SPL, so not for booting
<apritzel> so it should be just 06/27 plus the base address fix