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
chewitt has quit [Remote host closed the connection]
vagrantc has quit [Quit: leaving]
vagrantc has joined #linux-sunxi
chewitt has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
ftg has quit [Read error: Connection reset by peer]
Luke-Jr has quit [Ping timeout: 480 seconds]
cnxsoft has joined #linux-sunxi
Luke-Jr has joined #linux-sunxi
gnarface has quit [Ping timeout: 480 seconds]
gnarface has joined #linux-sunxi
chewitt has quit [Read error: Connection reset by peer]
JohnDoe_71Rus has joined #linux-sunxi
vagrantc has quit [Ping timeout: 480 seconds]
Asara has quit [Read error: Connection reset by peer]
Asara has joined #linux-sunxi
apritzel has joined #linux-sunxi
cnxsoft has quit [Ping timeout: 480 seconds]
apritzel has quit [Ping timeout: 480 seconds]
tnovotny has joined #linux-sunxi
tnovotny has quit [Quit: Leaving]
cnxsoft has joined #linux-sunxi
apritzel has joined #linux-sunxi
<Nemo_bis> montjoie: thank for trying :)
<montjoie> I just fixed it
<montjoie> but I hit a strange behavour I cannot rproduce now
<montjoie> dma finish copy all data, but never call callback
<montjoie> now time to bench it
cnxsoft has quit [Ping timeout: 480 seconds]
cnxsoft has joined #linux-sunxi
cnxsoft has quit []
tnovotny has joined #linux-sunxi
tnovotny has quit []
tnovotny has joined #linux-sunxi
uis has quit []
uis has joined #linux-sunxi
apritzel_ has joined #linux-sunxi
apritzel_ has quit [Ping timeout: 480 seconds]
chewitt has joined #linux-sunxi
apritzel_ has joined #linux-sunxi
tnovotny has quit [Quit: Leaving]
chewitt has quit [Read error: Connection reset by peer]
chewitt has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
apritzel_ has quit [Ping timeout: 480 seconds]
apritzel_ has joined #linux-sunxi
JohnDoe_71Rus has quit []
vagrantc has joined #linux-sunxi
<macromorgan> is there a reliable way to trigger a jump to FEL mode via software? Specifically, I'm thinking from U-Boot (like jumping to a memory address or something).
<macromorgan> tried something to the effect of ((void(*)(void))0xffff0020)(); but it didn't quite get me there...
<macromorgan> I'm trying to allow users to reboot into FEL from Linux. My thought is to place a value in nvram and if that specific value is present when U-Boot (SPL stage or U-Boot proper) loads it clears the value then jumps to FEL somehow.
apritzel_ has left #linux-sunxi [#linux-sunxi]
apritzel has joined #linux-sunxi
<apritzel> macromorgan: that depends on the SoC you are aiming at
<apritzel> we had this idea for a while: a "felreset" command in U-Boot
<apritzel> but implementing this is tricky, especially for 64-bit SoCs
<macromorgan> the R8
<apritzel> for 32-bit SoCs it sounds possible from U-Boot, by carefully resetting all peripherals, bringing the core in a pristine state, then jumping to the FEL entry point
<macromorgan> would still be fine for me to have it in the "post SPL" phase, kind of like after you upload the SPL but before you do anything else
<apritzel> I once implement a GPIO FEL button feature in the SPL
<apritzel> it would configure and check a GPIO very early in the SPL, then jump to the FEL entry point in BROM
<macromorgan> how did you jump to the entry point?
<apritzel> so this could be used by checking some NVRAM instead (but I don't know the details of the A13 here)
<macromorgan> I tried it (just after the PMIC loaded so I could use the PMIC routines to check NVRAM) but it didn't work
<apritzel> mov r1, =0xffff0020; br r1
<macromorgan> okay, I'll try that
<apritzel> but you have to do this as early as possible
<macromorgan> hopefully I'm doing it early enough (before the DRAM is ready even...)
<apritzel> as the FEL code makes some assumption about being run in a certain state (system registers, peripherals, clocks, ...)
<macromorgan> okay, I think that gets me started at least
<macromorgan> I'll need to do the BARE MINIMUM hardware init to read the value over i2c, clear the value, de-init the hardware, then jump to the FEL address
<macromorgan> does that sound about right?
<macromorgan> too bad I can't just write a magic value in SRAM and read it at boot up
<apritzel> yeah, that is one way, I guess (at least that part is easier with later SoCs integrating an RTC and NVRAM)
<apritzel> macromorgan: you could also try to avoid resetting the core, and manually set the peripherals, clocks and registers into a reset state
<apritzel> but that might be more involved than a simple series of MMIO accesses to the I2C controller
<apritzel> as you don't want to be very quick or generic, you might be able to cut some corners here
<apritzel> is it just one single register you need to read via I2C?
<macromorgan> yep
<macromorgan> I just want to read a persistent value from Linux; I'm thinking the fastest way is to use the nvram on the PMIC
<apritzel> yeah, it's a shame that this simple thing (actually just one bit of information) is so involved
<apritzel> macromorgan: why do you want FEL reset from *Linux*?
<macromorgan> as a courtesy, just seems like a nice thing if possible
<macromorgan> might decide against it and instead do a fastboot from Linux (which is way easier since U-Boot initializes most everything by then)
<apritzel> macromorgan: yeah, if you don't need any particular FEL killer feature (like loading low level firmware), then fastboot or a UMS export sound more sane
<macromorgan> well for the R8 (the CHIP) Fastboot doesn't support the NAND sadly :-(
<macromorgan> it supports NAND, just not this NAND the way I'm trying to run it.
<macromorgan> either way though, no biggie, this sounds like it's not worth the effort when a paperclip is handy...