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
montjoie has joined #linux-sunxi
montjoie_ has quit [Ping timeout: 480 seconds]
rsglobal[m] has quit []
KREYREN_oftc has quit [Remote host closed the connection]
hexdump01 has joined #linux-sunxi
hexdump0815 has quit [Ping timeout: 480 seconds]
tlwoerner_ has quit []
tlwoerner has joined #linux-sunxi
<Jookia> pwm driver done and sent off :)
JohnDoe_71Rus has joined #linux-sunxi
KNULLNoNeAll[m] has quit []
fraolt has quit [Quit: Client limit exceeded: 20000]
jernej has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
jernej has joined #linux-sunxi
ity has quit [Remote host closed the connection]
ity has joined #linux-sunxi
<tokyovigilante> that's what my tree is based on
<tokyovigilante> the h616-full tree is much older
<tokyovigilante> take your point about the iommu code though
<tokyovigilante> have checked, I'm pretty sure you're on the wrong branch there
Guest6573 has quit []
codekipper has quit [Quit: Connection closed for inactivity]
Namidairo has quit [Quit: ZNC - https://znc.in]
Namidairo has joined #linux-sunxi
Core2331 has joined #linux-sunxi
Core2331 has quit []
loki666 has joined #linux-sunxi
loki666 has quit []
loki666 has joined #linux-sunxi
<loki666> tokyovigilante yes but the probe function still does go-
<loki666> goto's to err_free_cache which doesn't exists in your branch
<loki666> enable CONFIG_SUN50I_IOMMU in your kernel config and you'll see it doesn't compile
dsimic is now known as Guest6901
dsimic has joined #linux-sunxi
<loki666> https://git.sr.ht/~tokyovigilante/linux/tree/anbernic-hdmi/item/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi#L668 the trailing '0' in emac0 compatible string looks also very suspicious
<loki666> probably unrelated to HDMI but could explain why I lost wifi
Guest6901 has quit [Ping timeout: 480 seconds]
<tokyovigilante> ah right, sorry, not sure how that's got in, has been working for me. I'll fix the IOMMU commit. The emac node is for the ethernet pins on the H616 which would be connected directly to a socket. Not sure how that 0 slipped in but nothing to do with wifi, I'd check you have the rtw88 module built and the correct firmware first
<tokyovigilante> the wifi is an entirely separate chip and uses SDIO for communication
<loki666> rtw88 module is there with firmware, but I get an error about external_clock
<tokyovigilante> That emac0 line is correct it seems
<loki666> ok
<tokyovigilante> have you had wifi working before?
<loki666> yes with 6.9 + RG35XX dts
<tokyovigilante> you probably just need to check your kconfig again, and make sure you have all the power patches in particular, I've never seen that pwrseq message but that's related to the power supply to the wifi chip, there's a pwrseq node in the -Plus DT which you can have a look at
<loki666> this commit was working
<tokyovigilante> Have you updated the DT since then? that's a pretty old WIP
<loki666> I'll check not on my computer right now
<tokyovigilante> you should have all the bits there, certainly wifi and hdmi can coexist, good work getting a buildroot config going, I'm just using a fedora userspace
<tokyovigilante> might be worth looking into FEL-boot and TFTP for the kernel if you are interested in developing
jernej has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
jernej has joined #linux-sunxi
ItsKaitlyn03 has joined #linux-sunxi
<ItsKaitlyn03> I got DRAM init going on my A133 :) I definitely didn't hack stuff together to make it work, but it WORKS! :D
<ItsKaitlyn03> i'll likely go through everything, i can guarantee this code is not stable and stuff is kinda janky
<ItsKaitlyn03> I need to fix stuff before I feel comfortable just putting this code out in the wild
<ItsKaitlyn03> it also only supports LPDDR4
<jernej> ItsKaitlyn03: did you compare register dump with vendor and your driver?
<jernej> suppoting only LPDDR4 is of course fine, you have to start somewhere :)
<ItsKaitlyn03> i dumped my dram params and based my stuff off of the h616 dram and just looked at the libdram a133 decomp and my own ida decomp, found any differences and patched them
<ItsKaitlyn03> also removed things I couldn't test
<ItsKaitlyn03> or things that don't exist on a133, that otherwise do on h616
loki666 has quit [Remote host closed the connection]
loki666 has joined #linux-sunxi
<ItsKaitlyn03> So now, should I try loading a kernel?
<ItsKaitlyn03> I doubt it'll work
<jernej> ItsKaitlyn03: you can try with memtest command in U-Boot, but you have to enable it in config first
<ItsKaitlyn03> whats the option?
<jernej> CONFIG_CMD_MEMTEST
<ItsKaitlyn03> okay i think u-boot is slightly messed up
<ItsKaitlyn03> i think it thinks the base SDRAM addr is 0
<ItsKaitlyn03> "Mem error @ 0x0000000000000510: found E3C0A003E28D00B7, expected 00000000000000A2"
<ItsKaitlyn03> oops
<jernej> ah, you have to define CONFIG_SYS_MEMTEST_START and CONFIG_SYS_MEMTEST_END
machinehum has joined #linux-sunxi
<jernej> start is 0x40000000
<ItsKaitlyn03> end would be 0x13FFFFFFF
<ItsKaitlyn03> yep?
<jernej> that's if you have 4 GB RAM
<ItsKaitlyn03> yeah i have 4gb of ram, but due to some weirdness i had with u-boot, it reports as 2GiB
<ItsKaitlyn03> ill have to fix it
<ItsKaitlyn03> "Testing 40000000 ... 13fffffff: Pattern 0000000000000000 Writing..."
<ItsKaitlyn03> have a feeling this might be a minute
<ItsKaitlyn03> also just realized it might break my u-boot because U-Boot is loaded into DRAM pretty sure
<ItsKaitlyn03> unless it'll just ignore U-BOot
<ItsKaitlyn03> ill just start from 0x4B000000
<ItsKaitlyn03> actually ill just start at 0x4B000000 and end at 0x4C000000
<ItsKaitlyn03> okay now its working
<ItsKaitlyn03> now its showing iterations
<ItsKaitlyn03> interesting
<ItsKaitlyn03> yeah it seems to be working fine
<ItsKaitlyn03> it might've been writing to things it shouldn't have, or something
<jernej> apritzel tokyoviginalte ItsKaitlyn03: Here is my assortiment of fixes for H616 DRAM driver: https://github.com/jernejsk/u-boot/commits/dram-fixes/
<jernej> please check and/or test and then I'll send patches to ML
<ItsKaitlyn03> pure H616 dram init doesn't work on A133, I tried. There is a bit of differences between H616 DRAM and A133 DRAM that causes H616 DRAM init to just not work, even though they're quite similar in some ways :P
<ItsKaitlyn03> I already have dual-phy stuff :P
<jernej> I pinged you so you can evaluate differences further :)
<jernej> in any case, H6 and H616 seem to have completely the same controller, so some functions can be shared
<jernej> I'm sure that's the case with A133 too, right?
<ItsKaitlyn03> nope, a lot of functions are handled differently in slightly different ways
<ItsKaitlyn03> prcm for ohms/rescal does not exist on a133
<ItsKaitlyn03> they do it in SYS_CFG
<jernej> yeah, but that's not controller part
<jernej> I have sunxi_mctl_ctl_reg structure in mind
<ItsKaitlyn03> yeah those are same-ish
<jernej> tokyovigilante: sorry, I misspelled your nick. Please check https://github.com/jernejsk/u-boot/commits/dram-fixes/
<ItsKaitlyn03> they share that in common afaik, but dram_para is different (addition of some tpr parameters) and some of the hacks h616 dram init does crashes on a133
<ItsKaitlyn03> i did try adding a bunch of "is_enabled" and try to conditionally handle a133, but i figured it would've made h616 dram init messy
<ItsKaitlyn03> i think I'll try to build mainline linux and see if I can just write it into memory somewhere and load it
<ItsKaitlyn03> afaik, A133 is supported in mainline somewhat(?)
<jernej> well, first you need something working and then we can discuss where to put it. but if PHY is not the same, then there is not much sense of having it in the same file
<ItsKaitlyn03> yeah, I want to go over DRAM a bit more
<jernej> do A100 and A133 use same die?
<ItsKaitlyn03> afaik, not really sure what A100 is. allwinner makes no mention of it, other than that A133 is based on A100. A100 might just be either an earlier variant of A100, or a slower A133 due to manufacturing constraints. hard to say really
<jernej> well, there are a few A100 drivers, so I guess A133 can use them
<ItsKaitlyn03> yeah a133 is based on a100. for a133, they use the a100 dts
<ItsKaitlyn03> in fact
<ItsKaitlyn03> they share the same chipid afaik
<jernej> other than that, I don't remember A133 specific support
<ItsKaitlyn03> both R818/A100/A133 are both 0x1855 chipid afaik
<ItsKaitlyn03> not both, all of those 3 are 0x1855
<ItsKaitlyn03> i think a100 was the first to release, then a133, and then r818
<ItsKaitlyn03> wonder what even happened to a100, its documented nowhere
ftg has joined #linux-sunxi
<loki666> tokyovigilante: update buildroot using linux-sunxi/for-next https://github.com/loki666/buildroot/tree/linux-sunxi/for-next
machinehum has quit [Quit: WeeChat 4.2.1]
KREYREN_oftc has joined #linux-sunxi
<ItsKaitlyn03> i guess its to be expected that booting a linux kernel w/o initrd just yields "starting kernel" and no other logs?
<jakllsch> is it "quiet"?
<ItsKaitlyn03> i just built the linux kernel and my dtb, and nothing
<ItsKaitlyn03> i even did setenv for bootargs and set the console to tty
<ItsKaitlyn03> obviously setting up the baudrate as well
<ItsKaitlyn03> just nothing
<ItsKaitlyn03> also doesn't help that the linux-sunxi build guide is basically old and outdated
<ItsKaitlyn03> earlyprintk doesn't exist on arm64(?)
<ItsKaitlyn03> or rather, i can't find it in the menuconfig
LordKalma has quit [Quit: Server has probably crashed]
LordKalma has joined #linux-sunxi
LordKalma has quit []
LordKalma has joined #linux-sunxi
<jernej> no, but there is earlycon
LordKalma has quit []
<ItsKaitlyn03> oh?
<ItsKaitlyn03> whats that
<ItsKaitlyn03> sorry I'm still learning the whole compiling linux stuff
<jernej> same thing, but on arm64
<ItsKaitlyn03> do i just shove it in my bootargs?
<jernej> I guess, not sure if it needs any kernel config to be enabled
<jernej> anyway, google it :)
<jernej> but if you managed to write DRAM driver, I think the rest won't be that hard :)
LordKalma has joined #linux-sunxi
<ItsKaitlyn03> looking at it, i dont think i need to recompile my kernel (looks like earlycon might just work)
<ItsKaitlyn03> HAH earlycon worked!
<ItsKaitlyn03> "Internal error: Oops - Undefined instruction: 0000000002000000 [#1] PREEMPT SMP"
<ItsKaitlyn03> Oh
<ItsKaitlyn03> I think I need bl31, yep?
<ItsKaitlyn03> "__arm_smccc_smc"
<ItsKaitlyn03> Yeah I need trusted firmware-a now
<ItsKaitlyn03> oops
warpme has joined #linux-sunxi
warpme has quit []
Tooniis[m] has quit []
JohnDoe_71Rus has quit [Quit: KVIrc KVIrc Quasar 5.2.2, revision: 5.2.0+git-7584-200e7bcec, build type: debug, sources date: 20160102, built on: 2024-05-13 20:04:01 UTC 5.2.0+git-7584-]
KREYREN_ has joined #linux-sunxi
KREYREN_oftc has quit [Ping timeout: 480 seconds]
<tokyovigilante> jernej: nice, thanks. will give them a test
<tokyovigilante> today.
<Jookia> i woke up in a cold sweat realizing i may have gotten punked by the t113 pwm datasheet
<Jookia> ItsKaitlyn03: congrats on the dram init!
<ItsKaitlyn03> currently going insane as to why linux wont init correctly with my own ramfs image
<Jookia> what's the error?
<ItsKaitlyn03> it just hangs at "Run <xyz> as init process"
<ItsKaitlyn03> nothing else
<Jookia> hmm
<ItsKaitlyn03> ive been trying various other ramfs images, i tried using alpine
<ItsKaitlyn03> nothing
<ItsKaitlyn03> it just doesnt work
<ItsKaitlyn03> and i dont understand why
<Jookia> interesting. maybe you could use kdb?
<Jookia> finding out if the kernel is hanging would be a good start
<jernej> ItsKaitlyn03: do you have TF-A?
<Jookia> yeah i think i got tricked by the datasheet
<Jookia> when it said the total cycles is (entire_period + 1) i assumed that meant it added an extra cycle HOWEVER, it could literally just be that its refering to the entire_period register being the (actual value - 1)...
<ItsKaitlyn03> i did stub out TF-A which in my defense I did get a bit hasty with it
<ItsKaitlyn03> i guess ill go ahead and actually make a proper BL31 impl for A133
<jernej> that would be a good step :)
<Jookia> kernel may be waiting for some atf thing to happen before running userspace
<ItsKaitlyn03> good point
<Jookia> that said i don't have atf on my t113 only u-boot and sadness
<ItsKaitlyn03> I'M IN
<ItsKaitlyn03> i got it booted
<ItsKaitlyn03> things are kind of not correct at all but it is booted on mainline linux
<ItsKaitlyn03> its not handling regulators properly at all, no PMIC at all
<Jookia> ItsKaitlyn03: wow!
<ItsKaitlyn03> this is just buildroot
<Jookia> time to dump the source code online? :D
<Jookia> what was the issue?
<ItsKaitlyn03> i need to clean up DRAM init
<ItsKaitlyn03> it was the lack of TF-A
<Jookia> ah
<ItsKaitlyn03> I just copied H616 BL31, and it works kind of, I need to fix the PMIC though because power control doesn't work at all
<Jookia> interesting
<Jookia> congrats though, that's really really cool
cyrevolt has quit []
<ItsKaitlyn03> I kinda janked everything together and I'll need to unjank before I put anything online
KREYREN_ has quit []
KREYREN_oftc has joined #linux-sunxi
<Jookia> :D
<ItsKaitlyn03> but just having this work is a really good sign :D
<KREYREN_oftc> How do you format the SPI chip for AllWinner A64 with u-boot so that it's able to boot? (the built binary can't be flashed as is bcs it's not the size of the chip and i am unable to get it past https://dpaste.org/6HHO1/raw)
* KREYREN_oftc assumes that the u-boot is corrupted on the SPI
<Jookia> ItsKaitlyn03: yeah, it's a lot of progress. thanks for the work :)
<ItsKaitlyn03> still need to figure out whats up with mmc0
<ItsKaitlyn03> but im also now booted into alpine linux
<ItsKaitlyn03> only shows one core
<ItsKaitlyn03> yeah it only detects one core, it might be due to my dtb though
<ItsKaitlyn03> im using the same one i am for u-boot
<ItsKaitlyn03> not optimal but i mean, it works
<Jookia> possibly yeah
JuniorJPDJ has quit []
<jernej> ItsKaitlyn03: bl31 is responsible for core management. You have to add code for enabling/disabling cores there
<ItsKaitlyn03> makes sense
t4h4[m] has quit []
obbardc has quit [Quit: Client limit exceeded: 20000]
cperon has quit []
ftg has quit [Read error: Connection reset by peer]
<tokyovigilante> ItsKaitlyn03: nice! first boot always very satisfying, and always after remembering something key you forgot, after you fixed the actual problem hours before
<ItsKaitlyn03> second goal tonight is to clean up dram initialization
<ItsKaitlyn03> i only tested it on my dram parameters, and it only supports LPDDR4 as that's all i have
KREYREN has quit []
error2[m] has quit []
sajattack[m] has quit []