narmstrong changed the topic of #linux-amlogic to: Amlogic mainline kernel development discussion - our wiki http://linux-meson.com/ - ml linux-amlogic@lists.infradead.org - official channel moved from Freenode - publicly logged on https://libera.irclog.whitequark.org/linux-amlogic
<Kwiboo> f_: Your recent changes made reading from memory multiple times work on my c2, and as you mentioned that did not solve the issue. However comparing regs with what atf-bl2 write to regs reviled a diff in the value being written to DDR0_PUB_MR2.
<Kwiboo> PUB_MR2: ((timings.cwl - 5) & 7 << 3) <<-- it is missing parentheses :-)
<Kwiboo> after changing it to (((timings.cwl - 5) & 7) << 3), the memory pattern test finally passed
<Kwiboo> so now writing and reading memory seem to be working, hope that small fix also make it work on your device :-)
montjoie has quit [Ping timeout: 260 seconds]
montjoie has joined #linux-amlogic
dlan has joined #linux-amlogic
naoki has joined #linux-amlogic
jacobk has joined #linux-amlogic
GNUtoo has quit [*.net *.split]
hexdump0815 has quit [Ping timeout: 244 seconds]
hexdump0815 has joined #linux-amlogic
GNUtoo has joined #linux-amlogic
buzzmarshall has quit [Quit: Konversation terminated!]
jacobk has quit [Ping timeout: 246 seconds]
jacobk has joined #linux-amlogic
jacobk has quit [Ping timeout: 248 seconds]
<lvrp16> rockosov: might have mobileeye v1 working within the month.
<lvrp16> Tomeu is giving a presentation at Embedded Recipes at the end of the month.
jacobk has joined #linux-amlogic
jacobk has quit [Ping timeout: 240 seconds]
Kwiboo has quit [Ping timeout: 252 seconds]
Kwiboo has joined #linux-amlogic
GNUtoo has quit [Remote host closed the connection]
GNUtoo has joined #linux-amlogic
jacobk has joined #linux-amlogic
Daanct12 has joined #linux-amlogic
dliviu has quit [Quit: Going away]
dliviu has joined #linux-amlogic
ldevulder_ has joined #linux-amlogic
ldevulder has quit [Ping timeout: 240 seconds]
ldevulder_ has quit [Ping timeout: 258 seconds]
ldevulder has joined #linux-amlogic
ldevulder_ has joined #linux-amlogic
ldevulder has quit [Ping timeout: 258 seconds]
ldevulder_ is now known as ldevulder
f_ has joined #linux-amlogic
<f_> Kwiboo: hehe, my bad.
<f_> Works for me too now
<f_> >reading 0x1000000 returns 2
<f_> Let's perhaps try getting that to work on gxl too
<f_> lepotato first, since it also uses DDR3
<f_> (but mine uses a different channel setting)
<Kwiboo> Great, btw, also looks like SPL runs at EL1, so to be able to execute ATF at EL3 a smc call to BL1 must be made to start execution
<f_> Indeed, SPL runs at EL1.
<Kwiboo> tried to use normal SPL atf load and it ended with a "Synchronous Abort" handler, esr 0x02000000, at almost first instruction of atf: vbar_el3,x0
<f_> hm
<f_> Probably needs the SCP firmware loaded first
<Kwiboo> something like https://git.vitali64.duckdns.org/archive/amlogic-bl2.git/tree/common/fip.c#n140 needs to be done to run atf at EL3
ldevulder has quit [Quit: Leaving]
<f_> yeah that's actually what normal TF-A does IIRC
<f_> SPL should do that too, so that's not the issue I think
<f_> If it's in amlogic's fork and in upsteam then I'd expect SPL to do the same thing
<f_> The issue could probably be the SCP firmware
<f_> Kwiboo: I get an "Error" handler, weird
<f_> esr 0xbf000002
<Kwiboo> U-Boot SPL expects it is already running at EL3 and just jumps into ATF, without any smc call
<f_> Kwiboo: Aha!
<f_> Did you enable SPL_ATF?
<f_> One important feature I'd like to have working is falcon mode
<f_> ^ narmstrong :)
<f_> Really just to make narmstrong happy lol
<f_> (and it can be handy at times too)
<f_> I personally have no use for it but it may benefit other folks
<f_> SPL_ATF makes the image too big. Time to rollback to TPL+SPL!
<f_> SPL and TPL are the only images where we can't use any form of compression
Daanct12 has quit [Quit: WeeChat 4.0.4]
<Kwiboo> haha, easiest was just to elevate SPL into EL3 :-D
f_ has quit [Ping timeout: 258 seconds]
ldevulder has joined #linux-amlogic
<Kwiboo> at top of board_init_f: if (current_el() == 1) smc_call(...); and then BL1 will re-start execution at EL3
buzzmarshall has joined #linux-amlogic
jacobk has quit [Ping timeout: 255 seconds]
kenny has quit [Quit: WeeChat 4.0.4]
jacobk has joined #linux-amlogic
kenny has joined #linux-amlogic
f_[xmpp] has quit [Remote host closed the connection]
<narmstrong> f: i do not how falcon would work with tf-a mode ? would the kernel replace the bl33 payload ?
<narmstrong> so TPL (init ddr) -> SPL (loads scp, bl31, bl32, bl33) -> u-boot (loads linux)
jacobk has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
neoninteger has quit [Ping timeout: 240 seconds]
neoninteger has joined #linux-amlogic
jacobk has joined #linux-amlogic
vagrantc has joined #linux-amlogic
f_[xmpp] has joined #linux-amlogic
f_ has joined #linux-amlogic
<f_> narmstrong: I don't really know but I think SPL could load linux directly
<f_> But hey, you wanted to use falcon mode, right? :)
<f_> Kwiboo: IIRC SPL was supposed to automatically elevate itself right? Unless I'm misremembering
<f_> TPL doesn't compile with the MMC drivers :/
<f_> Got lots of errors related to dm_mmc_ops and related functions
<f_> CONFIG_TPL_DM_MMC is nowhere to be found
jacobk has quit [Ping timeout: 248 seconds]
<f_> .......so let's declare it! :D
<Kwiboo> Yeah, I think it is just missing, adding it should probably make driver selection etc work
<f_> Just need to fix the various linking errors :D
<f_> I'll still ask in #u-boot
<Kwiboo> I should probably push/send out patches for mmc pwrseq, it was missing use of CONFIG_IS_ENABLED so fixed that to make it optional for TPL/SPL
<Kwiboo> What link issues are you having?
<f_> should be easily fixable
<Kwiboo> could be some Makefile using SPL_ and not SPL_TPL_
<f_> Indeed
<f_> Kwiboo: The lack of TPL_DM_MMC was on-purpose it seems
iprusov has quit [Quit: WeeChat 3.5]
iprusov has joined #linux-amlogic
<Kwiboo> I do not think there should be any issue extending it to TPL, but agree that if possible a minimal read func that does bare minimum could be enough, still the goal for u-boot seem to be move everything into driver model
<f_> lol
<narmstrong> pretty sure we could do a very bare mmc read from board init in TPL
<narmstrong> like amlogic does in bl1
<f_> and BL2
<f_> storage_init() only inits the NAND if present
<narmstrong> and using the mmc controller dedicated bound buffer, it will make the code trivial
<f_> this is how BL2 reads stuff from MMC
<Kwiboo> f_: try enable CONFIG_SPL_FIT_IMAGE_TINY=y and CONFIG_SPL_MMC_TINY=y, just saved me 6-8kb
<f_> CONFIG_SPL_FIT_IMAGE_TINY=y means you loose SPL_ATF though
<f_> I'll get TPL to work instead.
jacobk has joined #linux-amlogic
f_ is now known as f
f is now known as f_
gis has quit [Ping timeout: 240 seconds]
<Kwiboo> Was finally able to get into U-Boot proper: https://gist.github.com/Kwiboo/09bc9f7bcb40eee59bef53d9404771eb, will push a messy commit soon, power/pll/mailbox was just a 1:1 copy from old bl2 code...
<f_> wow
<f_> Kwiboo: this is SPL without TPL, right?
<f_> amazing!!
<f_> just need to do this properly with upstreamable code and port to gxl then
<Kwiboo> yes this was with only SPL, no debug messages and tuned some compile options to reduce size
f_ has quit [Ping timeout: 240 seconds]
<Kwiboo> also took advantage of the fit image support for adding sha256 hash, so no need to add code to calculate hash before sending bl30/bl301 via mailbox, just use precalculated values
gis has joined #linux-amlogic
<Kwiboo> u-boot-spl-dtb.bin is only 38kb so still some room for more code if needed
jacobk has quit [Ping timeout: 240 seconds]
jacobk has joined #linux-amlogic
<narmstrong> Super cool !
xdarklight has quit [Quit: ZNC - https://znc.in]
xdarklight has joined #linux-amlogic
vagrantc has quit [Ping timeout: 240 seconds]
f_[xmpp] has quit [Ping timeout: 258 seconds]
jacobk has quit [Ping timeout: 246 seconds]
neoninteger has quit [Remote host closed the connection]
neoninteger has joined #linux-amlogic
neoninteger has quit [Quit: ZNC 1.8.2 - https://znc.in]
jacobk has joined #linux-amlogic
neoninteger has joined #linux-amlogic
jacobk has quit [Ping timeout: 246 seconds]