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
vagrantc has quit [Quit: leaving]
hexdump0815 has quit [Ping timeout: 256 seconds]
hexdump0815 has joined #linux-amlogic
luka177 has quit [Ping timeout: 255 seconds]
luka177 has joined #linux-amlogic
JohnnyonFlame has quit [Read error: Connection reset by peer]
jacobk has joined #linux-amlogic
djrscally has joined #linux-amlogic
camus has joined #linux-amlogic
djrscally has quit [Ping timeout: 255 seconds]
f_[xmpp] has joined #linux-amlogic
<f_> Alright. None of the pinmux registers are being tampered with in BL2?
<f_> I wonder if SPL does something weird?
psydroid2 has joined #linux-amlogic
JohnnyonFlame has joined #linux-amlogic
GNUtoo has quit [Remote host closed the connection]
GNUtoo has joined #linux-amlogic
JohnnyonFlame has quit [Ping timeout: 260 seconds]
<f_> Nice, I didn't break gxbb dram init.
JohnnyonFlame has joined #linux-amlogic
<f_> But what is broken..sending SCP firmware :/
<minute> f_: where would you find amlogic bsp drivers for a311d?
* minute just wants to take a peek :D
<f_> They're behind a paywall.
<minute> argh
<minute> isn't... that not ok in terms of GPL
<f_> But you probably want the BSP with BPI-CM4 mods, right?
<minute> if that exists?
<f_> It does
<minute> well, yeah it has to, i remember it shipped with some non-mainline stuff
<f_> Also contains some of Amlogic's git history AFAICT
<minute> oh cool, thanks
<f_> AFAICT it's the kernel used in BananaPi's own images.
<f_> And I assume their images have working dual display support.
<f_> I could test actually, my CM4 runs their ubuntu image
<f_> and I think I have a DSI display.
<f_> Sending SCP firmware via Mailbox
<f_> sha fail.
<f_> I just changed arch to "arm" instead of "armv7m"..
<f_> That message seems to come from the SCP bootROM?
<f_> narmstrong: And BTW, pyamlboot works on my gxbb board.
<f_> Just had to adjust the makefile in amlogic-boot-fip.git.
<f_> Back to GXL; perhaps SPL does weird things when trying to init an SD card?
JohnnyonFlame has quit [Ping timeout: 255 seconds]
<narmstrong> Noice, no change in pyamlboot? Which board did you use ?
<f_> Videostrong KII Pro
<f_> Only change is add u-boot.bin.usb.tpl and u-boot.bin.usb.bl2 files
<f_> s/is add/required is adding/
<f_> narmstrong: Next step would be snagboot and DFU in SPL :)
<narmstrong> \o/
<f_> After getting eMMC to work...
<f_> Also: <de՝}Յ>
<f_> ^ this is what gets sent from UART instead of <debug_uart> for some reason :P
<f_> (before making the jump to EL3)
<f_> Anyway, I don't really know what's wrong with eMMC...
<f_> BL2 doesn't seem to do any init and straight just reads from it.
<f_> Pinmux registers are left untouched when booting from eMMC
luka177 has quit [Ping timeout: 276 seconds]
<f_> Aha.
<f_> BL1 seems to set the pinmux register correctly for eMMC?
<f_> (when booting from eMMC)
<f_> Alright.
<f_> I think power init is what's causing issues.
<f_> The only thing touching the pinmux reg7 register
<f_> Same as when I played around with reg7...
<f_> count = 0, no blocks read..so it fails.
<f_> Might be PWRSEQ?
<f_> Kwiboo: your patch doesn't seem to work(?)
<f_> spl/../drivers/mmc/meson_gx_mmc.c:301:(.text.meson_mmc_probe+0x1d0): undefined reference to `pwrseq_set_power'
<f_> PWRSEQ, SPL_PWRSEQ, MMC_PWRSEQ as well as SPL_MMC_PWRSEQ are all set, so not sure why it happens.
<f_> Strange.
chewitt has joined #linux-amlogic
<chewitt> minute: use the Khadas sources for A311D https://github.com/khadas/linux
<f_> chewitt: hm what's wrong with the BPI sources?
<f_> (apart from the fact that they're pretty hacked up)
<chewitt> there's a few different era's there, e.g. 4.19 used with VIM3 and 5.4 used with VIM4 (A311D2) but should also have A311D content in there
<chewitt> BPI fork either Khadas (G12B) or Hardkernel (SM1) sources and then "make them work" on their boards
<f_> Yeah I saw that.
<chewitt> some variant of s/khadas/bpi normally.. but the overall quality of hacking is low enough that I'd avoid them
<chewitt> the khadas folks have more of a clue about what they're doing
<f_> Isn't the Amlogic BSP badly hacked too?
<f_> :)
<chewitt> let's not go there :)
<f_> DataBus test fail!!!
<f_> ^ and let's not talk about BL2 either :)
<f_> Something I noticed in Amlogic software, their debug and error messages can be funny.
<f_> "Hello, we are in BL2X world !"
<f_> Oh, as for amlogic-boot-fip.git...
<f_> I wonder why it wasn't done before.
<minute> chewitt: alright
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 256 seconds]
<xdarklight> minute: it seems like Ping-Ke only wants to merge the rtw88 fix with your feedback: https://lore.kernel.org/linux-wireless/d585b2ed88254bbf8747a86324a25fa6@realtek.com/ - so gentle ping that you re-test with that patch and provide feedback
<f_> xdarklight: as said before I looked at what the bootROM did, and it does set that pinmux register to 0xf0000000
jacobk has quit [Ping timeout: 260 seconds]
<f_> But power_init seems to do weird stuff with that register...
<f_> so I tried without it..same result as with forcibly setting it to 0xf0000000.
<f_> https://bin.vitali64.duckdns.org/65621546 - different error now.
<f_> I think there are multiple issues to fix, pinctrl was only one of them.
<xdarklight> f_: do you have CONFIG_SPL_LOAD_FIT enabled? I'd like to know if we're going into the FIT or legacy case in spl_mmc.c
<f_> We're going into the FIT case for sure.
<xdarklight> good. can you please also print the value of the ret variable near "mmc_load_image_raw_sector: mmc block read error"
<f_> Did it before, I think it was -EIO.
<f_> And count == 0
<f_> I think we should look somewhere in blk_dread()...
psydroid2 has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
psydroid2 has joined #linux-amlogic
<xdarklight> f_: can you please print ret and status after https://elixir.bootlin.com/u-boot/v2023.10/source/drivers/mmc/mmc.c#L860 as well as enable that "switch failed" debug print and share the boot log?
<f_> hmm, doesn't get printed.
<f_> I'll try putting more printf()s.
<f_> That function isn't ran at all.
<xdarklight> hmm
<f_> Oh wait..
<f_> Forgot that little pinmux register change
<f_> __mmc_switch *is* ran
<f_> hm
<f_> Also, that `ret=-5` is mmc_bread.
<f_> But yes, `switch failed 1/179/0xf8 !`
<minute> xdarklight: oh sorry, put on my todo for monday
<xdarklight> minute: thank you!
<xdarklight> f_: can you please also print the status variable ?
<f_> Oh forgot, sorry.
<f_> >status: 0x980
<xdarklight> ok, so indeed: MMC_STATUS_SWITCH_ERROR(1 << 7)
<xdarklight> https://elixir.bootlin.com/u-boot/v2023.10/source/drivers/mmc/mmc.c#L847 can you print if we're getting here and what the timeout value is?
<f_> Doesn't seem like we're getting here.
<f_> Confirmed we're not getting there.
<f_> But timeout_ms = 500
<xdarklight> can you try something like https://bin.vitali64.duckdns.org/656236df (not compile-tested)
<f_> It hangs inside that function.
<xdarklight> hmm, not sure why it would completely hang
<xdarklight> I'll get dinner now, I'll be back online later (and probably be mostly offline for most of tomorrow)
<f_> Sure
chewitt has quit [Quit: Zzz..]
hexdump0815 has quit [Quit: WeeChat 3.8]
hexdump0815 has joined #linux-amlogic
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 256 seconds]
luka177 has joined #linux-amlogic
buzzmarshall has joined #linux-amlogic
vagrantc has joined #linux-amlogic
JohnnyonFlame has joined #linux-amlogic