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
jacobk has joined #linux-amlogic
jacobk has quit [Ping timeout: 255 seconds]
montjoie_ has quit [Ping timeout: 246 seconds]
montjoie has joined #linux-amlogic
JerryXiao has quit [Server closed connection]
JerryXiao has joined #linux-amlogic
Danct12 has quit [Remote host closed the connection]
Danct12 has joined #linux-amlogic
luka177 has joined #linux-amlogic
Tartarus has quit [Server closed connection]
Tartarus has joined #linux-amlogic
camus has joined #linux-amlogic
Daanct12 has joined #linux-amlogic
camus1 has joined #linux-amlogic
camus has quit [Ping timeout: 255 seconds]
camus1 is now known as camus
asriel has quit [Quit: Don't drink the water. They put something in it to make you forget.]
asriel has joined #linux-amlogic
Daanct12 has quit [Quit: WeeChat 4.0.4]
Daanct12 has joined #linux-amlogic
hexdump01 has quit [Ping timeout: 258 seconds]
hexdump01 has joined #linux-amlogic
jacobk has joined #linux-amlogic
Terry13732293409 has quit [Quit: Bye Bye]
Terry13732293409 has joined #linux-amlogic
JohnnyonFlame has quit [Read error: Connection reset by peer]
aeroraptor has quit [Server closed connection]
aeroraptor has joined #linux-amlogic
hexdump01 has quit [Quit: WeeChat 1.9.1]
hexdump0815 has joined #linux-amlogic
<hexdump0815> xdarklight: chewitt: little update - i can meanwhile confirm hdmi out to be working on meson8,8b and 8m2 using the xdarklight tree
<hexdump0815> xdarklight: chewitt: it looks like xorg will only run in 16bit depth - is this a known limitation of the driver?
Daanct12 has quit [Ping timeout: 255 seconds]
vagrantc has quit [Quit: leaving]
Daanct12 has joined #linux-amlogic
luka177 has quit [Ping timeout: 255 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 255 seconds]
rockosov has quit [Ping timeout: 245 seconds]
rockosov has joined #linux-amlogic
rpardini has quit [Quit: gone]
luka177 has joined #linux-amlogic
f_ has joined #linux-amlogic
<f_> Kwiboo: I don't think CONFIG_FIT is needed
f_[xmpp] has joined #linux-amlogic
<f_> hi all btw
<f_> But I think I know why it fails to load anything
<f_> CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR isn't set I think
<f_> $ grep CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR .config
<f_> # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set
luka177 has quit [Ping timeout: 255 seconds]
<Kwiboo> f_: yes, noticed that also, I am still having issues with mmc, but starting to think it is because I have no dram
<narmstrong> f_: indeed otherwise it won't know where to load from, but it depends where we want the fit image to be stored, it could be in the first partition
<f_> I don't make use of partitions for loading images
<f_> Kwiboo: honestly I doubt my DRAM init works at all
<f_> :^)
<f_> And even if it works I still have to rewrite one of the functions
<f_> Really starting to like binman by the way
<Kwiboo> I have had very strange issue in sd_get_capabilities, it first sends CMD55, then tries to send CMD51, but somehow the arguments is changed to CMD8 :S
<f_> Somehow
<f_> This is how it's organised
<f_> the U-Boot SPL binary is signed with amlimage
<f_> and then the rest are all FIT images
<f_> Kwiboo: You can try importing my dram init code if you wish
<f_> and see if it makes a difference
<f_> Sure
* f_ afk.
<Kwiboo> for mmc I noticed that bl1 leave the always on flag set, but mmc driver will unset it, also when it triest to set high clock rate it will switch from 24mhz osc clock to 1ghz clock that is disabled, so limit to 24mhz and change logic
f_ has quit [Ping timeout: 246 seconds]
<narmstrong> perhaps you could run a memtest to check if the ddr is working ?
tsegers has quit [Server closed connection]
tsegers has joined #linux-amlogic
luka177 has joined #linux-amlogic
<hexdump0815> xdarklight: somehow ethernet does not seem to work on my meson8m2 boxes with gbit eth port - no errors or warniings, they are configured rgmii and phy detects the connection properly as 100mbit which is the case here
<hexdump0815> xdarklight: but i do not get any network connections - any idea what might be the cause? do you have any meson8 with gb eth working?
<hexdump0815> chewitt: as you seem to be the amlogic audio expert :) - i tried headphone audio on my m8s box, but do not get any sound out of it
<hexdump0815> chewitt: is the audio setup in here https://github.com/xdarklight/linux/blob/meson-mx-integration-6.3-20230410/arch/arm/boot/dts/meson8m2-m8s.dts maybe only for hdmi audio?
<hexdump0815> chewitt: what would be required to make headphone audio work as well - looks like there is no mixer where i could enable/disable anything
<hexdump0815> chewitt: soundcard is detected well: 0 [TRONSMARTMXIII ]: gx-sound-card - TRONSMART-MXIII
<hexdump0815> xdarklight: even if i set the network to rmii (mxiii instead of mxii-plus dtb) i'm getting the same behaviour: no error, but also not network connection
kilobyte_ch has quit [Ping timeout: 250 seconds]
kilobyte_ch has joined #linux-amlogic
buzzmarshall has joined #linux-amlogic
Daanct12 has quit [Quit: WeeChat 4.0.4]
Danct12 has quit [Remote host closed the connection]
jacobk has quit [Ping timeout: 246 seconds]
Danct12 has joined #linux-amlogic
vagrantc has joined #linux-amlogic
f_ has joined #linux-amlogic
<Kwiboo> f_: new lesson learned: mmc device cannot read data directly into tzram, have to use the tiny mmc internal sram as a bounce buffer
<Kwiboo> I have taken it as far as I can now: https://gist.github.com/Kwiboo/21f03074f2556d817ed9aa1c7c1b8569
<Kwiboo> That ushort in struct mmc_cmd seem to cause issue with my builds, could be compiler/linker bug, with it changed to uint correct cmd was passed along
<Kwiboo> meson mmc driver contains more changes than is needed, will try to cleanup later, started to align some code with linux during my testing session, but those changes may not fix anything
<Kwiboo> One intereseting thing is that reading 512 byte from sd-card into mmc sram fails, but for emmc it worked, but then fails because it cannot memcpy into dram
<f_> WHY DO I HAVE TO ENABLE JS JUST TO VIEW A DIFF
<f_> I enabled JS
<Kwiboo> add .diff or .patch to github url to get plain text
<f_> but thanks, didn't know this trick
<f_> that's a long diff you got there
<f_> narmstrong: Perhaps
<Kwiboo> Hehe, it is that code + amlimate on top of v2023.10-rc3 that I have been playing with, meson_gx_mmc.c diff have lots of parts that is unneccecerty
<Kwiboo> look for my HACK comments for the important part
<f_> hm
<Kwiboo> and the mmc sram bounce buffer should not be needed once you have dram working :)
<f_> Doubt it works ¯\_(ツ)_/¯
<f_> You see, when meson_write wrote at 0x72000?
<f_> 0x72000 is between 0x0 and 0xbfffffff
<f_> And that just happens to be where the DDR is
<f_> The fact that it failed to write to some random DRAM address proves that my init doesn't work
<f_> But I'd still need to verify/test for sure
<Kwiboo> Hehe, true, maybe some mmu tables needs to be configured
<f_> We're literally back to the same issue I had with my custom DRAM init when I was working on TF-A BL2
<narmstrong> No because there’s a 16MiB hole up to 0x1000000
<f_> hah
<narmstrong> On gxbb and gxl
<f_> That's why there was an offset then
<f_> Thought about that
<f_> Still would have to test by writing to some random address, to be sure.
<f_> that's a quick and dirty way of testing though.
<f_> Anyway, I'll modify amlimage first
<f_> sick of this size limit
<f_> and you have plenty of space between the header and 0xc000
<Kwiboo> you only have free space between header an start of code, 0x1000, and if you have emmc relocation code there is only free space between 0x420-0x1000
<f_> Yeah what I want to try is having SPL @ 0x1024
<Kwiboo> ahh, 3kb more space :)
<f_> this is the offset where you normally have the eMMC relocation code, but I'd like to try.
<f_> Of course that also means changing SPL_TEXT_BASE according to that
<f_> Kwiboo: Perhaps we should also use OF_PLATDATA?
<Kwiboo> looks like u-boot only will check 4k aligned code with CONFIG_POSITION_INDEPENDENT enabled, so you should probably be able to move it
<f_> Ah yeah, also 4K-aligned
<f_> so 0x1024 will not do I guess
<Kwiboo> it should probably work, there is an if CONFIG_POSITION_INDEPENDENT around 4k align check in arch/arm/cpu/armv8/start.S
<f_> Perhaps offset 0x1000?
<Kwiboo> Yes, OF_PLATDATA and other space saving flags should be enabled
<f_> ok I'll enable those first
<f_> I can't tiny-ify the FIT implementation, else I'd lose ATF support too.
<Kwiboo> offset 0x1000 = 4k, 0x400 = 1k
<f_> I know
<f_> We should now have ~3K less
<f_> sigh
<f_> ValueError: Cannot parse 'cd-gpios' in node 'mmc@72000'
<f_> and vim can't find any mention of cd-gpio
<f_> amlogic_meson_gx_mmc: WARNING: the driver amlogic_meson_gx_mmc was not found in the driver list
<f_> hmm
narmstrong has quit [Server closed connection]
narmstrong has joined #linux-amlogic
<Kwiboo> Yeah, use of OF_PLATDATA requires that drivers are changed to support it, it expect a driver names as compatible, or a driver alias
<f_> compatible = "amlogic,meson-gx-mmc\0amlogic,meson-gxbb-mmc";
<f_> ^ mmc@72000 compatible
<Kwiboo> Yeah, so that mangled into platdata, first compatible gets mangled into amlogic_meson_gx_mmc
<f_> I should also minify the device tree
<f_> so....
<f_> I'll modify the drivers to support OF_PLATDATA
<Kwiboo> a DM_DRIVER_ALIAS(amlogic_meson_gx_mmc, meson_mmm) could work, or params is the other way around
<f_> ValueError: Cannot parse/find driver for 'amlogic_meson_gxbb_vpu'
<f_> am I supposed to do this for each and every node?
<f_> such a dumb person
<f_> I thought 0xc000 was the SPL offset for a minutw
<f_> *minute
<f_> Did anyone know about CONFIG_IMX_SNPS_DDR_PHY?
<f_> Could be useful in G12A
<f_> But then with OF_PLATDATA it returns a huge amount of compiler errors
<f_> Ah no.
<f_> Now ld segfaults lol
<Kwiboo> I did some re-testing of sd-card read at 6 MHz instead of 24 MHz and then it worked better, BL1 left the clock at 6 MHz, both for SD and eMMC
<f_> I should try implementing your changes
<Kwiboo> still crashes trying to memcpy to dest=ffffc0, but at least it can read data
<f_> Kwiboo: Should it memcpy to >0x1000000
<Kwiboo> Yeah, I do not fully understand where it got that address from, but at least reading data seem to be semi working
<Kwiboo> Can clean up my changes in mmc driver to only keep the relevant changes, but will have to wait until little bit later
<f_> semi-working
<Kwiboo> hehe, it can read 1 block at the time into internal mmc sram, with full dram it should be possible to do multi block read into DRAM
<f_> Looks like SPL_ATF isn't needed.
<f_> mmc_load_image_raw_sector: mmc block read error
arnd has quit [Server closed connection]
arnd has joined #linux-amlogic
jacobk has joined #linux-amlogic
<f_> I'm importing your defconfig and seeing if it makes my SPL binary be a little smaller
<f_> well...not really importing
<f_> ....aaand I'll have to do.
<f_> *go
<f_> I always check logs
f_ has quit [Ping timeout: 248 seconds]
adema_ has quit [Server closed connection]
adema has joined #linux-amlogic
jacobk has quit [Ping timeout: 258 seconds]
jacobk has joined #linux-amlogic
<Kwiboo> f_: I have clened up all logging and have left what I think could be bare minimum at https://gist.github.com/Kwiboo/3a234b8d70faa83d88d85f705e3013a3
<Kwiboo> Also seem to be "working" similar with CONFIG_SPL_MMC_TINY=y
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
jacobk has quit [Ping timeout: 248 seconds]
jacobk has joined #linux-amlogic